-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.mjs
More file actions
112 lines (103 loc) · 5.81 KB
/
Copy pathplugin.mjs
File metadata and controls
112 lines (103 loc) · 5.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Plugin: landing — auto-generated, do not edit
export default function(sdk, deps) {
const React = deps.react;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// factory-ext-react:react
var require_react = __commonJS({
"factory-ext-react:react"(exports, module) {
module.exports = deps.react;
}
});
// factory-ext-@brainquest/plugin-sdk:../hooks
var require_hooks = __commonJS({
"factory-ext-@brainquest/plugin-sdk:../hooks"(exports, module) {
module.exports = sdk;
}
});
// factory-ext-react-router-dom:react-router-dom
var require_react_router_dom = __commonJS({
"factory-ext-react-router-dom:react-router-dom"(exports, module) {
module.exports = deps["react-router-dom"];
}
});
// factory-ext-lucide-react:lucide-react
var require_lucide_react = __commonJS({
"factory-ext-lucide-react:lucide-react"(exports, module) {
module.exports = deps["lucide-react"];
}
});
// factory-host:../../store
var require_store = __commonJS({
"factory-host:../../store"(exports, module) {
module.exports = deps.host;
}
});
// factory-host:@/components/ui/button
var require_button = __commonJS({
"factory-host:@/components/ui/button"(exports, module) {
module.exports = deps.host;
}
});
// src/plugins/landing/LandingPage.tsx
var LandingPage_exports = {};
__export(LandingPage_exports, {
default: () => LandingPage
});
function LandingPage() {
const { subjects } = (0, import_store.useApp)();
const nav = (0, import_react_router_dom.useNavigate)();
const hasSubjects = subjects.length > 0;
return /* @__PURE__ */ React.createElement("div", { className: "h-screen bg-gray-50 flex items-center justify-center px-6" }, /* @__PURE__ */ React.createElement("div", { className: "max-w-md text-center space-y-8" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React.createElement("h1", { className: "text-2xl font-bold text-gray-900 tracking-tight" }, "BrainQuest"), /* @__PURE__ */ React.createElement("p", { className: "text-sm text-gray-500 leading-relaxed" }, "Przygotuj si\u0119 do matury z polskiego. Czytaj opracowania, odkrywaj powi\u0105zania mi\u0119dzy poj\u0119ciami i \u0107wicz na prawdziwych arkuszach egzaminacyjnych \u2014 z feedbackiem od nauczyciela.")), /* @__PURE__ */ React.createElement("div", { className: "grid gap-3 text-left" }, [
{ icon: import_lucide_react.BookOpen, title: "Czytaj i odkrywaj", desc: "Interaktywne opracowania lektur z terminami do odkrycia" },
{ icon: import_lucide_react.Search, title: "Mapa wiedzy", desc: "Zobacz powi\u0105zania mi\u0119dzy poj\u0119ciami w 3D" },
{ icon: import_lucide_react.FileText, title: "Egzaminy z ocen\u0105", desc: "Rozwi\u0105\u017C arkusz i wy\u015Blij do sprawdzenia" }
].map((f) => /* @__PURE__ */ React.createElement("div", { key: f.title, className: "flex gap-3 items-start rounded-lg border border-gray-200 bg-white px-4 py-3" }, /* @__PURE__ */ React.createElement(f.icon, { size: 16, className: "text-gray-400 mt-0.5 flex-shrink-0" }), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "text-xs font-semibold text-gray-900" }, f.title), /* @__PURE__ */ React.createElement("div", { className: "text-[11px] text-gray-500 mt-0.5" }, f.desc))))), /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, hasSubjects ? /* @__PURE__ */ React.createElement(import_button.Button, { className: "w-full", onClick: () => nav(`/${subjects[0].id}/baza`) }, "Kontynuuj nauk\u0119") : /* @__PURE__ */ React.createElement(import_button.Button, { className: "w-full", onClick: () => nav("/baza") }, "Rozpocznij nauk\u0119"))));
}
var import_react_router_dom, import_lucide_react, import_store, import_button;
var init_LandingPage = __esm({
"src/plugins/landing/LandingPage.tsx"() {
import_react_router_dom = __toESM(require_react_router_dom(), 1);
import_lucide_react = __toESM(require_lucide_react(), 1);
import_store = __toESM(require_store(), 1);
import_button = __toESM(require_button(), 1);
}
});
// src/plugins/landing/plugin.ts
var import_react = __toESM(require_react(), 1);
var import_hooks = __toESM(require_hooks(), 1);
(0, import_hooks.addFilter)("routes", (routes) => [
...routes,
{ path: "/", scope: "global", component: (0, import_react.lazy)(() => Promise.resolve().then(() => (init_LandingPage(), LandingPage_exports))), pluginId: "landing" }
]);
}