@rakun-kit/react 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @rakun-kit/react
2
+
3
+ React helpers for rendering Rakun web modules.
4
+
5
+ Apps provide a module registry, so framework adapters stay open:
6
+
7
+ ```tsx
8
+ import { createModuleRegistry, ModuleRenderer } from "@rakun-kit/react";
9
+
10
+ const registry = createModuleRegistry({
11
+ Hero: () => import("./modules/Hero"),
12
+ Footer: () => import("./modules/Footer"),
13
+ });
14
+
15
+ export function Page({ modules }) {
16
+ return <ModuleRenderer modules={modules} registry={registry} />;
17
+ }
18
+ ```
19
+
20
+ Vite, Next, and custom adapters can all feed the same renderer with different
21
+ loading strategies.
22
+
23
+ With Vite, use `import.meta.glob`:
24
+
25
+ ```tsx
26
+ import { createModuleRegistryFromGlob, ModuleRenderer } from "@rakun-kit/react";
27
+
28
+ const registry = createModuleRegistryFromGlob(
29
+ import.meta.glob("./modules/*.{tsx,jsx}"),
30
+ );
31
+
32
+ export function Page({ modules }) {
33
+ return <ModuleRenderer modules={modules} registry={registry} />;
34
+ }
35
+ ```
36
+
37
+ The default key is the file name without extension, so `./modules/Hero.tsx`
38
+ matches a Rakun module with `_type: "Hero"`.
39
+
40
+ For nested folders or custom names:
41
+
42
+ ```tsx
43
+ const registry = createModuleRegistryFromGlob(
44
+ import.meta.glob("./modules/**/*.tsx"),
45
+ {
46
+ getName: (path) => path.split("/").at(-2),
47
+ },
48
+ );
49
+ ```
50
+
51
+ With Next, keep the dynamic import in app code:
52
+
53
+ ```tsx
54
+ import { ModuleRenderer } from "@rakun-kit/react";
55
+
56
+ export function Page({ modules }) {
57
+ return (
58
+ <ModuleRenderer
59
+ modules={modules}
60
+ loadModule={(name) => import(`@/modules/${name}`)}
61
+ />
62
+ );
63
+ }
64
+ ```
65
+
66
+ This is intentionally a function instead of a path string: Next needs to see the
67
+ dynamic import from inside the application bundle.
68
+
69
+ Use `PageLayoutRenderer` when Rakun returns layout slots:
70
+
71
+ ```tsx
72
+ import { PageLayoutRenderer } from "@rakun-kit/react";
73
+
74
+ export function Page({ page }) {
75
+ return (
76
+ <PageLayoutRenderer
77
+ page={page}
78
+ loadModule={(name) => import(`@/modules/${name}`)}
79
+ renderContent={({ children }) => <main>{children}</main>}
80
+ />
81
+ );
82
+ }
83
+ ```
84
+
85
+ Given a layout like `header -> content -> footer`, only the content modules are
86
+ wrapped in `<main>`.
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModuleErrorBoundary = void 0;
4
+ const react_1 = require("react");
5
+ class ModuleErrorBoundary extends react_1.Component {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.state = {
9
+ error: null,
10
+ };
11
+ }
12
+ static getDerivedStateFromError(error) {
13
+ return { error };
14
+ }
15
+ componentDidCatch(error, info) {
16
+ this.props.onError?.(error, info);
17
+ }
18
+ render() {
19
+ if (this.state.error) {
20
+ return this.props.renderError?.({
21
+ error: this.state.error,
22
+ module: this.props.module,
23
+ index: this.props.index,
24
+ }) ?? null;
25
+ }
26
+ return this.props.children;
27
+ }
28
+ }
29
+ exports.ModuleErrorBoundary = ModuleErrorBoundary;
30
+ //# sourceMappingURL=ErrorBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/ErrorBoundary.tsx"],"names":[],"mappings":";;;AAAA,iCAAkE;AAgBlE,MAAa,mBAEX,SAAQ,iBAAgC;IAF1C;;QAGE,UAAK,GAAU;YACb,KAAK,EAAE,IAAI;SACZ,CAAC;IAqBJ,CAAC;IAnBC,MAAM,CAAC,wBAAwB,CAAC,KAAc;QAC5C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,iBAAiB,CAAC,KAAc,EAAE,IAAe;QAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;gBAC9B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBACzB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;aACxB,CAAC,IAAI,IAAI,CAAC;QACb,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF;AA1BD,kDA0BC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.LazyViewport = LazyViewport;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ function LazyViewport({ children, fallback = null, rootMargin = "300px", threshold = 0, }) {
8
+ const ref = (0, react_1.useRef)(null);
9
+ const activated = (0, react_1.useRef)(false);
10
+ const [isActive, setIsActive] = (0, react_1.useState)(false);
11
+ const activate = (0, react_1.useCallback)(() => {
12
+ if (activated.current)
13
+ return;
14
+ activated.current = true;
15
+ const run = () => setIsActive(true);
16
+ const requestIdle = globalThis.requestIdleCallback;
17
+ if (typeof requestIdle === "function") {
18
+ requestIdle(run);
19
+ return;
20
+ }
21
+ setTimeout(run, 0);
22
+ }, []);
23
+ (0, react_1.useEffect)(() => {
24
+ if (typeof IntersectionObserver === "undefined") {
25
+ activate();
26
+ return;
27
+ }
28
+ const node = ref.current;
29
+ if (!node)
30
+ return;
31
+ const observer = new IntersectionObserver(([entry]) => {
32
+ if (!entry?.isIntersecting)
33
+ return;
34
+ observer.disconnect();
35
+ activate();
36
+ }, { rootMargin, threshold });
37
+ observer.observe(node);
38
+ return () => observer.disconnect();
39
+ }, [activate, rootMargin, threshold]);
40
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-rakun-lazy": true, children: isActive ? children : fallback }));
41
+ }
42
+ //# sourceMappingURL=LazyViewport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LazyViewport.js","sourceRoot":"","sources":["../../src/LazyViewport.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAiBb,oCAqDC;;AApED,iCAMe;AASf,SAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,GAAG,IAAI,EACf,UAAU,GAAG,OAAO,EACpB,SAAS,GAAG,CAAC,GACK;IAClB,MAAM,GAAG,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IAChC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAChC,IAAI,SAAS,CAAC,OAAO;YAAE,OAAO;QAC9B,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAEzB,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,WAAW,GAAG,UAAU,CAAC,mBAAmB,CAAC;QAEnD,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;YACtC,WAAW,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO;QACT,CAAC;QAED,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,OAAO,oBAAoB,KAAK,WAAW,EAAE,CAAC;YAChD,QAAQ,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;QACzB,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CACvC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE;YACV,IAAI,CAAC,KAAK,EAAE,cAAc;gBAAE,OAAO;YACnC,QAAQ,CAAC,UAAU,EAAE,CAAC;YACtB,QAAQ,EAAE,CAAC;QACb,CAAC,EACD,EAAE,UAAU,EAAE,SAAS,EAAE,CAC1B,CAAC;QAEF,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvB,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAEtC,OAAO,CACL,gCAAK,GAAG,EAAE,GAAG,qCACV,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAC3B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ModuleRenderer = ModuleRenderer;
5
+ exports.PageLayoutRenderer = PageLayoutRenderer;
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
8
+ const web_1 = require("@rakun-kit/core/web");
9
+ const ErrorBoundary_1 = require("./ErrorBoundary.js");
10
+ const LazyViewport_1 = require("./LazyViewport.js");
11
+ const registry_1 = require("./registry.js");
12
+ const lazyComponentCache = new WeakMap();
13
+ const defaultGetKey = ({ module, index, }) => `${module._id}:${index}`;
14
+ const renderFallback = (fallback, module, index) => {
15
+ if (typeof fallback === "function") {
16
+ return fallback({ module, index });
17
+ }
18
+ return fallback ?? null;
19
+ };
20
+ function getLazyComponent(load) {
21
+ const cached = lazyComponentCache.get(load);
22
+ if (cached)
23
+ return cached;
24
+ const Component = (0, react_1.lazy)(async () => {
25
+ const moduleImport = await load();
26
+ const resolved = (0, registry_1.resolveModuleImport)(moduleImport);
27
+ return { default: resolved.component };
28
+ });
29
+ lazyComponentCache.set(load, Component);
30
+ return Component;
31
+ }
32
+ function ModuleView({ module, index, registry, loadModule, fallback, missing, }) {
33
+ const entry = registry?.[module._type];
34
+ if (!entry && !loadModule) {
35
+ return missing?.({ module, index }) ?? null;
36
+ }
37
+ const record = entry
38
+ ? (0, registry_1.getRegistryRecord)(entry)
39
+ : { load: (() => loadModule?.(module._type)) };
40
+ const Component = record.component ?? (record.load ? getLazyComponent(record.load) : null);
41
+ const Fallback = record.fallback;
42
+ if (!Component) {
43
+ return missing?.({ module, index }) ?? null;
44
+ }
45
+ const fallbackNode = Fallback
46
+ ? (0, jsx_runtime_1.jsx)(Fallback, { ...module })
47
+ : renderFallback(fallback, module, index);
48
+ return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: fallbackNode, children: (0, jsx_runtime_1.jsx)(Component, { ...module }) }));
49
+ }
50
+ function RenderModule({ module, index, entry, registry, loadModule, fallback, missing, error, lazyByViewport, eager, rootMargin, threshold, getKey, }) {
51
+ const context = {
52
+ module,
53
+ index,
54
+ entry,
55
+ };
56
+ const fallbackNode = renderFallback(fallback, module, index);
57
+ const node = ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ModuleErrorBoundary, { module: module, index: index, renderError: error, children: (0, jsx_runtime_1.jsx)(ModuleView, { module: module, index: index, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing }) }));
58
+ return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: fallbackNode, children: lazyByViewport && index >= eager ? ((0, jsx_runtime_1.jsx)(LazyViewport_1.LazyViewport, { fallback: fallbackNode, rootMargin: rootMargin, threshold: threshold, children: node })) : (node) }, getKey(context)));
59
+ }
60
+ function ModuleRenderer({ modules, page, layout, registry, loadModule, fallback, missing, error, eager = 3, lazy: lazyByViewport = true, rootMargin, threshold, getKey = defaultGetKey, }) {
61
+ const entries = (0, react_1.useMemo)(() => {
62
+ const source = layout ??
63
+ (page ? (0, web_1.getPageLayout)(page) : [{ type: "content", modules: modules ?? [] }]);
64
+ return (0, web_1.iteratePageModules)(source);
65
+ }, [layout, modules, page]);
66
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: entries.map((entry) => {
67
+ return ((0, jsx_runtime_1.jsx)(RenderModule, { module: entry.module, index: entry.index, entry: entry, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing, error: error, lazyByViewport: lazyByViewport, eager: eager, rootMargin: rootMargin, threshold: threshold, getKey: getKey }, `${entry.module._id}:${entry.index}`));
68
+ }) }));
69
+ }
70
+ function PageLayoutRenderer({ modules, page, layout, registry, loadModule, fallback, missing, error, eager = 3, lazy: lazyByViewport = true, rootMargin, threshold, getKey = defaultGetKey, renderContent = ({ children }) => (0, jsx_runtime_1.jsx)("main", { children: children }), }) {
71
+ const source = (0, react_1.useMemo)(() => layout ??
72
+ (page
73
+ ? (0, web_1.getPageLayout)(page)
74
+ : [{ type: "content", modules: modules ?? [] }]), [layout, modules, page]);
75
+ let moduleIndex = 0;
76
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: source.map((item, layoutIndex) => {
77
+ if (item.type === "module") {
78
+ const moduleItem = item;
79
+ if (!moduleItem.module)
80
+ return null;
81
+ const index = moduleIndex++;
82
+ const entry = {
83
+ type: "layout",
84
+ key: moduleItem.key,
85
+ module: moduleItem.module,
86
+ index,
87
+ layoutIndex,
88
+ };
89
+ return ((0, jsx_runtime_1.jsx)(RenderModule, { module: moduleItem.module, index: index, entry: entry, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing, error: error, lazyByViewport: lazyByViewport, eager: eager, rootMargin: rootMargin, threshold: threshold, getKey: getKey }, `layout:${moduleItem.key}:${moduleItem.module._id}`));
90
+ }
91
+ const contentItem = item;
92
+ const contentModules = contentItem.modules;
93
+ const children = contentModules.map((module, contentIndex) => {
94
+ const index = moduleIndex++;
95
+ const entry = {
96
+ type: "content",
97
+ module,
98
+ index,
99
+ layoutIndex,
100
+ moduleIndex: contentIndex,
101
+ };
102
+ return ((0, jsx_runtime_1.jsx)(RenderModule, { module: module, index: index, entry: entry, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing, error: error, lazyByViewport: lazyByViewport, eager: eager, rootMargin: rootMargin, threshold: threshold, getKey: getKey }, `content:${module._id}:${contentIndex}`));
103
+ });
104
+ return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: renderContent({
105
+ item: contentItem,
106
+ modules: contentModules,
107
+ children,
108
+ index: layoutIndex,
109
+ }) }, `content:${layoutIndex}`));
110
+ }) }));
111
+ }
112
+ //# sourceMappingURL=ModuleRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleRenderer.js","sourceRoot":"","sources":["../../src/ModuleRenderer.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAoNb,wCA+CC;AAED,gDA4GC;;AA/WD,iCAMe;AAEf,6CAO6B;AAC7B,mDAAsD;AACtD,iDAA8C;AAC9C,yCASoB;AAoCpB,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAGnC,CAAC;AAEJ,MAAM,aAAa,GAAG,CAA6B,EACjD,MAAM,EACN,KAAK,GACwB,EAAU,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC;AAErE,MAAM,cAAc,GAAG,CACrB,QAAqD,EACrD,MAAe,EACf,KAAa,EACF,EAAE;IACb,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACnC,OAAO,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,QAAQ,IAAI,IAAI,CAAC;AAC1B,CAAC,CAAC;AAEF,SAAS,gBAAgB,CACvB,IAA4B;IAE5B,MAAM,MAAM,GAAG,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,MAAM,SAAS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iBACnB,CAAC,IANW,WAAW,WAAW,EAAE,CAO5B,CACZ,CAAC;QACJ,CAAC,CAAC,GACD,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ErrorBoundary.js"), exports);
18
+ __exportStar(require("./LazyViewport.js"), exports);
19
+ __exportStar(require("./ModuleRenderer.js"), exports);
20
+ __exportStar(require("./registry.js"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,iDAA+B;AAC/B,mDAAiC;AACjC,6CAA2B"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveModuleImport = exports.getRegistryRecord = exports.createModuleRegistryFromGlob = exports.getModuleNameFromPath = exports.createModuleRegistry = void 0;
4
+ const createModuleRegistry = (registry) => registry;
5
+ exports.createModuleRegistry = createModuleRegistry;
6
+ const getModuleNameFromPath = (path) => {
7
+ const fileName = path.split("/").pop();
8
+ if (!fileName)
9
+ return null;
10
+ const match = fileName.match(/^(.+?)\.(?:[cm]?[jt]sx?)$/);
11
+ return match?.[1] ?? null;
12
+ };
13
+ exports.getModuleNameFromPath = getModuleNameFromPath;
14
+ const createModuleRegistryFromGlob = (modules, options = {}) => {
15
+ const registry = {};
16
+ const getName = options.getName ?? exports.getModuleNameFromPath;
17
+ for (const [path, load] of Object.entries(modules)) {
18
+ const name = getName(path);
19
+ if (!name)
20
+ continue;
21
+ registry[name] = load;
22
+ }
23
+ return registry;
24
+ };
25
+ exports.createModuleRegistryFromGlob = createModuleRegistryFromGlob;
26
+ const getRegistryRecord = (entry) => typeof entry === "function" ? { load: entry } : entry;
27
+ exports.getRegistryRecord = getRegistryRecord;
28
+ const resolveModuleImport = (moduleImport) => {
29
+ const component = moduleImport.default ?? moduleImport.component;
30
+ if (!component) {
31
+ throw new Error("Rakun module import must export default or component.");
32
+ }
33
+ return {
34
+ component,
35
+ fallback: moduleImport.Fallback ?? moduleImport.fallback,
36
+ isLazy: moduleImport.isLazy,
37
+ };
38
+ };
39
+ exports.resolveModuleImport = resolveModuleImport;
40
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/registry.ts"],"names":[],"mappings":";;;AA6DO,MAAM,oBAAoB,GAAG,CAGlC,QAAmB,EACR,EAAE,CAAC,QAAQ,CAAC;AAJZ,QAAA,oBAAoB,wBAIR;AAElB,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAiB,EAAE;IACnE,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE3B,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC1D,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC5B,CAAC,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 import type { ModuleErrorRenderer } from "./registry.js";
4
+ type Props<TModule extends PageModule = PageModule> = {
5
+ children: ReactNode;
6
+ module?: TModule;
7
+ index?: number;
8
+ renderError?: ModuleErrorRenderer<TModule>;
9
+ onError?: (error: unknown, info: ErrorInfo) => void;
10
+ };
11
+ type State = {
12
+ error: unknown;
13
+ };
14
+ export declare class ModuleErrorBoundary<TModule extends PageModule = PageModule> extends Component<Props<TModule>, State> {
15
+ state: State;
16
+ static getDerivedStateFromError(error: unknown): State;
17
+ componentDidCatch(error: unknown, info: ErrorInfo): void;
18
+ render(): ReactNode;
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,KAAK,KAAK,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,IAAI;IACpD,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,qBAAa,mBAAmB,CAC9B,OAAO,SAAS,UAAU,GAAG,UAAU,CACvC,SAAQ,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IACxC,KAAK,EAAE,KAAK,CAEV;IAEF,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK;IAItD,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;IAIxD,MAAM,IAAI,SAAS;CAWpB"}
@@ -0,0 +1,26 @@
1
+ import { Component } from "react";
2
+ export class ModuleErrorBoundary extends Component {
3
+ constructor() {
4
+ super(...arguments);
5
+ this.state = {
6
+ error: null,
7
+ };
8
+ }
9
+ static getDerivedStateFromError(error) {
10
+ return { error };
11
+ }
12
+ componentDidCatch(error, info) {
13
+ this.props.onError?.(error, info);
14
+ }
15
+ render() {
16
+ if (this.state.error) {
17
+ return this.props.renderError?.({
18
+ error: this.state.error,
19
+ module: this.props.module,
20
+ index: this.props.index,
21
+ }) ?? null;
22
+ }
23
+ return this.props.children;
24
+ }
25
+ }
26
+ //# sourceMappingURL=ErrorBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AAgBlE,MAAM,OAAO,mBAEX,SAAQ,SAAgC;IAF1C;;QAGE,UAAK,GAAU;YACb,KAAK,EAAE,IAAI;SACZ,CAAC;IAqBJ,CAAC;IAnBC,MAAM,CAAC,wBAAwB,CAAC,KAAc;QAC5C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,iBAAiB,CAAC,KAAc,EAAE,IAAe;QAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;gBAC9B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBACzB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;aACxB,CAAC,IAAI,IAAI,CAAC;QACb,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from "react";
2
+ export type LazyViewportProps = {
3
+ children: ReactNode;
4
+ fallback?: ReactNode;
5
+ rootMargin?: string;
6
+ threshold?: number | number[];
7
+ };
8
+ export declare function LazyViewport({ children, fallback, rootMargin, threshold, }: LazyViewportProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=LazyViewport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LazyViewport.d.ts","sourceRoot":"","sources":["../../src/LazyViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAe,EACf,UAAoB,EACpB,SAAa,GACd,EAAE,iBAAiB,2CAgDnB"}
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState, } from "react";
4
+ export function LazyViewport({ children, fallback = null, rootMargin = "300px", threshold = 0, }) {
5
+ const ref = useRef(null);
6
+ const activated = useRef(false);
7
+ const [isActive, setIsActive] = useState(false);
8
+ const activate = useCallback(() => {
9
+ if (activated.current)
10
+ return;
11
+ activated.current = true;
12
+ const run = () => setIsActive(true);
13
+ const requestIdle = globalThis.requestIdleCallback;
14
+ if (typeof requestIdle === "function") {
15
+ requestIdle(run);
16
+ return;
17
+ }
18
+ setTimeout(run, 0);
19
+ }, []);
20
+ useEffect(() => {
21
+ if (typeof IntersectionObserver === "undefined") {
22
+ activate();
23
+ return;
24
+ }
25
+ const node = ref.current;
26
+ if (!node)
27
+ return;
28
+ const observer = new IntersectionObserver(([entry]) => {
29
+ if (!entry?.isIntersecting)
30
+ return;
31
+ observer.disconnect();
32
+ activate();
33
+ }, { rootMargin, threshold });
34
+ observer.observe(node);
35
+ return () => observer.disconnect();
36
+ }, [activate, rootMargin, threshold]);
37
+ return (_jsx("div", { ref: ref, "data-rakun-lazy": true, children: isActive ? children : fallback }));
38
+ }
39
+ //# sourceMappingURL=LazyViewport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LazyViewport.js","sourceRoot":"","sources":["../../src/LazyViewport.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAEL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AASf,MAAM,UAAU,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,GAAG,IAAI,EACf,UAAU,GAAG,OAAO,EACpB,SAAS,GAAG,CAAC,GACK;IAClB,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,IAAI,SAAS,CAAC,OAAO;YAAE,OAAO;QAC9B,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAEzB,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,WAAW,GAAG,UAAU,CAAC,mBAAmB,CAAC;QAEnD,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;YACtC,WAAW,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO;QACT,CAAC;QAED,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,oBAAoB,KAAK,WAAW,EAAE,CAAC;YAChD,QAAQ,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;QACzB,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CACvC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE;YACV,IAAI,CAAC,KAAK,EAAE,cAAc;gBAAE,OAAO;YACnC,QAAQ,CAAC,UAAU,EAAE,CAAC;YACtB,QAAQ,EAAE,CAAC;QACb,CAAC,EACD,EAAE,UAAU,EAAE,SAAS,EAAE,CAC1B,CAAC;QAEF,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvB,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAEtC,OAAO,CACL,cAAK,GAAG,EAAE,GAAG,qCACV,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAC3B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type ReactNode } from "react";
2
+ import type { PageModule, PageOutput } from "@rakun-kit/core/contracts";
3
+ import { type PageLayout, type PageLayoutContentItem, type PageModuleEntry } from "@rakun-kit/core/web";
4
+ import { type MissingModuleRenderer, type ModuleErrorRenderer, type ModuleRendererFallback, type RakunModuleRegistry } from "./registry.js";
5
+ export type ModuleRenderContext<TModule extends PageModule = PageModule> = {
6
+ module: TModule;
7
+ index: number;
8
+ entry: PageModuleEntry;
9
+ };
10
+ export type ModuleRendererProps<TModule extends PageModule = PageModule> = {
11
+ modules?: TModule[];
12
+ page?: Pick<PageOutput, "layout" | "modules">;
13
+ layout?: PageLayout;
14
+ registry?: RakunModuleRegistry<TModule>;
15
+ loadModule?: (name: string) => Promise<unknown>;
16
+ fallback?: ModuleRendererFallback<TModule>;
17
+ missing?: MissingModuleRenderer<TModule>;
18
+ error?: ModuleErrorRenderer<TModule>;
19
+ eager?: number;
20
+ lazy?: boolean;
21
+ rootMargin?: string;
22
+ threshold?: number | number[];
23
+ getKey?: (context: ModuleRenderContext<TModule>) => string;
24
+ };
25
+ export type PageLayoutRenderContext<TModule extends PageModule = PageModule> = {
26
+ item: PageLayoutContentItem;
27
+ modules: TModule[];
28
+ children: ReactNode;
29
+ index: number;
30
+ };
31
+ export type PageLayoutRendererProps<TModule extends PageModule = PageModule> = ModuleRendererProps<TModule> & {
32
+ renderContent?: (context: PageLayoutRenderContext<TModule>) => ReactNode;
33
+ };
34
+ export declare function ModuleRenderer<TModule extends PageModule = PageModule>({ modules, page, layout, registry, loadModule, fallback, missing, error, eager, lazy: lazyByViewport, rootMargin, threshold, getKey, }: ModuleRendererProps<TModule>): import("react/jsx-runtime").JSX.Element;
35
+ export declare function PageLayoutRenderer<TModule extends PageModule = PageModule>({ modules, page, layout, registry, loadModule, fallback, missing, error, eager, lazy: lazyByViewport, rootMargin, threshold, getKey, renderContent, }: PageLayoutRendererProps<TModule>): import("react/jsx-runtime").JSX.Element;
36
+ //# sourceMappingURL=ModuleRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleRenderer.d.ts","sourceRoot":"","sources":["../../src/ModuleRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,M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uB,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,IAAI;IAC7E,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,IACzE,mBAAmB,CAAC,OAAO,CAAC,GAAG;IAC7B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC;CAC1E,CAAC;AAqJJ,wBAAgB,cAAc,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,EAAE,EACtE,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAS,EACT,IAAI,EAAE,cAAqB,EAC3B,UAAU,EACV,SAAS,EACT,MAAsB,GACvB,EAAE,mBAAmB,CAAC,OAAO,CAAC,2CAiC9B;AAED,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,EAAE,EAC1E,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAS,EACT,IAAI,EAAE,cAAqB,EAC3B,UAAU,EACV,SAAS,EACT,MAAsB,EACtB,aAAyD,GAC1D,EAAE,uBAAuB,CAAC,OAAO,CAAC,2CA6FlC"}
@@ -0,0 +1,108 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Suspense, lazy, useMemo, } from "react";
4
+ import { getPageLayout, iteratePageModules, } from "@rakun-kit/core/web";
5
+ import { ModuleErrorBoundary } from "./ErrorBoundary.js";
6
+ import { LazyViewport } from "./LazyViewport.js";
7
+ import { getRegistryRecord, resolveModuleImport, } from "./registry.js";
8
+ const lazyComponentCache = new WeakMap();
9
+ const defaultGetKey = ({ module, index, }) => `${module._id}:${index}`;
10
+ const renderFallback = (fallback, module, index) => {
11
+ if (typeof fallback === "function") {
12
+ return fallback({ module, index });
13
+ }
14
+ return fallback ?? null;
15
+ };
16
+ function getLazyComponent(load) {
17
+ const cached = lazyComponentCache.get(load);
18
+ if (cached)
19
+ return cached;
20
+ const Component = lazy(async () => {
21
+ const moduleImport = await load();
22
+ const resolved = resolveModuleImport(moduleImport);
23
+ return { default: resolved.component };
24
+ });
25
+ lazyComponentCache.set(load, Component);
26
+ return Component;
27
+ }
28
+ function ModuleView({ module, index, registry, loadModule, fallback, missing, }) {
29
+ const entry = registry?.[module._type];
30
+ if (!entry && !loadModule) {
31
+ return missing?.({ module, index }) ?? null;
32
+ }
33
+ const record = entry
34
+ ? getRegistryRecord(entry)
35
+ : { load: (() => loadModule?.(module._type)) };
36
+ const Component = record.component ?? (record.load ? getLazyComponent(record.load) : null);
37
+ const Fallback = record.fallback;
38
+ if (!Component) {
39
+ return missing?.({ module, index }) ?? null;
40
+ }
41
+ const fallbackNode = Fallback
42
+ ? _jsx(Fallback, { ...module })
43
+ : renderFallback(fallback, module, index);
44
+ return (_jsx(Suspense, { fallback: fallbackNode, children: _jsx(Component, { ...module }) }));
45
+ }
46
+ function RenderModule({ module, index, entry, registry, loadModule, fallback, missing, error, lazyByViewport, eager, rootMargin, threshold, getKey, }) {
47
+ const context = {
48
+ module,
49
+ index,
50
+ entry,
51
+ };
52
+ const fallbackNode = renderFallback(fallback, module, index);
53
+ const node = (_jsx(ModuleErrorBoundary, { module: module, index: index, renderError: error, children: _jsx(ModuleView, { module: module, index: index, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing }) }));
54
+ return (_jsx(Suspense, { fallback: fallbackNode, children: lazyByViewport && index >= eager ? (_jsx(LazyViewport, { fallback: fallbackNode, rootMargin: rootMargin, threshold: threshold, children: node })) : (node) }, getKey(context)));
55
+ }
56
+ export function ModuleRenderer({ modules, page, layout, registry, loadModule, fallback, missing, error, eager = 3, lazy: lazyByViewport = true, rootMargin, threshold, getKey = defaultGetKey, }) {
57
+ const entries = useMemo(() => {
58
+ const source = layout ??
59
+ (page ? getPageLayout(page) : [{ type: "content", modules: modules ?? [] }]);
60
+ return iteratePageModules(source);
61
+ }, [layout, modules, page]);
62
+ return (_jsx(_Fragment, { children: entries.map((entry) => {
63
+ return (_jsx(RenderModule, { module: entry.module, index: entry.index, entry: entry, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing, error: error, lazyByViewport: lazyByViewport, eager: eager, rootMargin: rootMargin, threshold: threshold, getKey: getKey }, `${entry.module._id}:${entry.index}`));
64
+ }) }));
65
+ }
66
+ export function PageLayoutRenderer({ modules, page, layout, registry, loadModule, fallback, missing, error, eager = 3, lazy: lazyByViewport = true, rootMargin, threshold, getKey = defaultGetKey, renderContent = ({ children }) => _jsx("main", { children: children }), }) {
67
+ const source = useMemo(() => layout ??
68
+ (page
69
+ ? getPageLayout(page)
70
+ : [{ type: "content", modules: modules ?? [] }]), [layout, modules, page]);
71
+ let moduleIndex = 0;
72
+ return (_jsx(_Fragment, { children: source.map((item, layoutIndex) => {
73
+ if (item.type === "module") {
74
+ const moduleItem = item;
75
+ if (!moduleItem.module)
76
+ return null;
77
+ const index = moduleIndex++;
78
+ const entry = {
79
+ type: "layout",
80
+ key: moduleItem.key,
81
+ module: moduleItem.module,
82
+ index,
83
+ layoutIndex,
84
+ };
85
+ return (_jsx(RenderModule, { module: moduleItem.module, index: index, entry: entry, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing, error: error, lazyByViewport: lazyByViewport, eager: eager, rootMargin: rootMargin, threshold: threshold, getKey: getKey }, `layout:${moduleItem.key}:${moduleItem.module._id}`));
86
+ }
87
+ const contentItem = item;
88
+ const contentModules = contentItem.modules;
89
+ const children = contentModules.map((module, contentIndex) => {
90
+ const index = moduleIndex++;
91
+ const entry = {
92
+ type: "content",
93
+ module,
94
+ index,
95
+ layoutIndex,
96
+ moduleIndex: contentIndex,
97
+ };
98
+ return (_jsx(RenderModule, { module: module, index: index, entry: entry, registry: registry, loadModule: loadModule, fallback: fallback, missing: missing, error: error, lazyByViewport: lazyByViewport, eager: eager, rootMargin: rootMargin, threshold: threshold, getKey: getKey }, `content:${module._id}:${contentIndex}`));
99
+ });
100
+ return (_jsx(Suspense, { fallback: null, children: renderContent({
101
+ item: contentItem,
102
+ modules: contentModules,
103
+ children,
104
+ index: layoutIndex,
105
+ }) }, `content:${layoutIndex}`));
106
+ }) }));
107
+ }
108
+ //# sourceMappingURL=ModuleRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleRenderer.js","sourceRoot":"","sources":["../../src/ModuleRenderer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,GAGR,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,aAAa,EAKb,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GAOpB,MAAM,YAAY,CAAC;AAoCpB,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAGnC,CAAC;AAEJ,MAAM,aAAa,GAAG,CAA6B,EACjD,MAAM,EACN,KAAK,GACwB,EAAU,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC;AAErE,MAAM,cAAc,GAAG,CACrB,QAAqD,EACrD,MAAe,EACf,KAAa,EACF,EAAE;IACb,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACnC,OAAO,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,QAAQ,IAAI,IAAI,CAAC;AAC1B,CAAC,CAAC;AAEF,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aAAa,CAAC;oBACb,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,cAAc;oBACvB,QAAQ;oBACR,KAAK,EAAE,WAAW;iBACnB,CAAC,IANW,WAAW,WAAW,EAAE,CAO5B,CACZ,CAAC;QACJ,CAAC,CAAC,GACD,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./ErrorBoundary.js";
2
+ export * from "./LazyViewport.js";
3
+ export * from "./ModuleRenderer.js";
4
+ export * from "./registry.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./ErrorBoundary.js";
2
+ export * from "./LazyViewport.js";
3
+ export * from "./ModuleRenderer.js";
4
+ export * from "./registry.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { ComponentType, ReactNode } from "react";
2
+ import type { PageModule } from "@rakun-kit/core/contracts";
3
+ export type RakunModuleComponent = ComponentType<any>;
4
+ export type RakunModuleImport = {
5
+ default?: RakunModuleComponent;
6
+ component?: RakunModuleComponent;
7
+ Fallback?: RakunModuleComponent;
8
+ fallback?: RakunModuleComponent;
9
+ isLazy?: boolean;
10
+ };
11
+ export type RakunModuleLoader = () => Promise<RakunModuleImport>;
12
+ export type RakunModuleRecord<TModule extends PageModule = PageModule> = {
13
+ component?: RakunModuleComponent;
14
+ fallback?: RakunModuleComponent;
15
+ load?: RakunModuleLoader;
16
+ isLazy?: boolean;
17
+ };
18
+ export type RakunModuleRegistryEntry<TModule extends PageModule = PageModule> = RakunModuleLoader | RakunModuleRecord<TModule>;
19
+ export type RakunModuleRegistry<TModule extends PageModule = PageModule> = Record<string, RakunModuleRegistryEntry<TModule>>;
20
+ export type RakunModuleGlob = Record<string, RakunModuleLoader>;
21
+ export type CreateModuleRegistryFromGlobOptions = {
22
+ getName?: (path: string) => string | null | undefined;
23
+ };
24
+ export type MissingModuleRenderArgs<TModule extends PageModule = PageModule> = {
25
+ module: TModule;
26
+ index: number;
27
+ };
28
+ export type ModuleFallbackRenderArgs<TModule extends PageModule = PageModule> = {
29
+ module: TModule;
30
+ index: number;
31
+ };
32
+ export type ModuleErrorRenderArgs<TModule extends PageModule = PageModule> = {
33
+ error: unknown;
34
+ module?: TModule;
35
+ index?: number;
36
+ };
37
+ export type ModuleRendererFallback<TModule extends PageModule = PageModule> = ReactNode | ((args: ModuleFallbackRenderArgs<TModule>) => ReactNode);
38
+ export type MissingModuleRenderer<TModule extends PageModule = PageModule> = (args: MissingModuleRenderArgs<TModule>) => ReactNode;
39
+ export type ModuleErrorRenderer<TModule extends PageModule = PageModule> = (args: ModuleErrorRenderArgs<TModule>) => ReactNode;
40
+ export declare const createModuleRegistry: <TRegistry extends RakunModuleRegistry<PageModule>>(registry: TRegistry) => TRegistry;
41
+ export declare const getModuleNameFromPath: (path: string) => string | null;
42
+ export declare const createModuleRegistryFromGlob: (modules: RakunModuleGlob, options?: CreateModuleRegistryFromGlobOptions) => RakunModuleRegistry;
43
+ export declare const getRegistryRecord: <TModule extends PageModule>(entry: RakunModuleRegistryEntry<TModule>) => RakunModuleRecord<TModule>;
44
+ export declare const resolveModuleImport: <TModule extends PageModule>(moduleImport: RakunModuleImport) => Required<Pick<RakunModuleRecord<TModule>, "component">> & Pick<RakunModuleRecord<TModule>, "fallback" | "isLazy">;
45
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 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UAAU,EAC1D,OAAO,wBAAwB,CAAC,OAAO,CAAC,KACvC,iBAAiB,CAAC,OAAO,CAC2B,CAAC;AAExD,eAAO,MAAM,mBAAmB,GAAI,OAAO,SAAS,UAAU,EAC5D,cAAc,iBAAiB,KAC9B,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,GACxD,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,QAAQ,CAYvD,CAAC"}
@@ -0,0 +1,32 @@
1
+ export const createModuleRegistry = (registry) => registry;
2
+ export const getModuleNameFromPath = (path) => {
3
+ const fileName = path.split("/").pop();
4
+ if (!fileName)
5
+ return null;
6
+ const match = fileName.match(/^(.+?)\.(?:[cm]?[jt]sx?)$/);
7
+ return match?.[1] ?? null;
8
+ };
9
+ export const createModuleRegistryFromGlob = (modules, options = {}) => {
10
+ const registry = {};
11
+ const getName = options.getName ?? getModuleNameFromPath;
12
+ for (const [path, load] of Object.entries(modules)) {
13
+ const name = getName(path);
14
+ if (!name)
15
+ continue;
16
+ registry[name] = load;
17
+ }
18
+ return registry;
19
+ };
20
+ export const getRegistryRecord = (entry) => typeof entry === "function" ? { load: entry } : entry;
21
+ export const resolveModuleImport = (moduleImport) => {
22
+ const component = moduleImport.default ?? moduleImport.component;
23
+ if (!component) {
24
+ throw new Error("Rakun module import must export default or component.");
25
+ }
26
+ return {
27
+ component,
28
+ fallback: moduleImport.Fallback ?? moduleImport.fallback,
29
+ isLazy: moduleImport.isLazy,
30
+ };
31
+ };
32
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/registry.ts"],"names":[],"mappings":"AA6DA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAGlC,QAAmB,EACR,EAAE,CAAC,QAAQ,CAAC;AAEzB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAiB,EAAE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AAC,QAAQ,IAAI,YAAY,CAAC,QAAQ;QACxD,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/zod/v4/core/json-schema.d.cts","../../node_modules/zod/v4/core/standard-schema.d.cts","../../node_modules/zod/v4/core/registries.d.cts","../../node_modules/zod/v4/core/to-json-schema.d.cts","../../node_modules/zod/v4/core/util.d.cts","../../node_modules/zod/v4/core/versions.d.cts","../../node_modules/zod/v4/core/schemas.d.cts","../../node_modules/zod/v4/core/checks.d.cts","../../node_modules/zod/v4/core/errors.d.cts","../../node_modules/zod/v4/core/core.d.cts","../../node_modules/zod/v4/core/parse.d.cts","../../node_modules/zod/v4/core/regexes.d.cts","../../node_modules/zod/v4/locales/ar.d.cts","../../node_modules/zod/v4/locales/az.d.cts","../../node_modules/zod/v4/locales/be.d.cts","../../node_modules/zod/v4/locales/bg.d.cts","../../node_modules/zod/v4/locales/ca.d.cts","../../node_modules/zod/v4/locales/cs.d.cts","../../node_modules/zod/v4/locales/da.d.cts","../../node_modules/zod/v4/locales/de.d.cts","../../node_modules/zod/v4/locales/en.d.cts","../../node_modules/zod/v4/locales/eo.d.cts","../../node_modules/zod/v4/locales/es.d.cts","../../node_modules/zod/v4/locales/fa.d.cts","../../node_modules/zod/v4/locales/fi.d.cts","../../node_modules/zod/v4/locales/fr.d.cts","../../node_modules/zod/v4/locales/fr-CA.d.cts","../../node_modules/zod/v4/locales/he.d.cts","../../node_modules/zod/v4/locales/hu.d.cts","../../node_modules/zod/v4/locales/hy.d.cts","../../node_modules/zod/v4/locales/id.d.cts","../../node_modules/zod/v4/locales/is.d.cts","../../node_modules/zod/v4/locales/it.d.cts","../../node_modules/zod/v4/locales/ja.d.cts","../../node_modules/zod/v4/locales/ka.d.cts","../../node_modules/zod/v4/locales/kh.d.cts","../../node_modules/zod/v4/locales/km.d.cts","../../node_modules/zod/v4/locales/ko.d.cts","../../node_modules/zod/v4/locales/lt.d.cts","../../node_modules/zod/v4/locales/mk.d.cts","../../node_modules/zod/v4/locales/ms.d.cts","../../node_modules/zod/v4/locales/nl.d.cts","../../node_modules/zod/v4/locales/no.d.cts","../../node_modules/zod/v4/locales/ota.d.cts","../../node_modules/zod/v4/locales/ps.d.cts","../../node_modules/zod/v4/locales/pl.d.cts","../../node_modules/zod/v4/locales/pt.d.cts","../../node_modules/zod/v4/locales/ru.d.cts","../../node_modules/zod/v4/locales/sl.d.cts","../../node_modules/zod/v4/locales/sv.d.cts","../../node_modules/zod/v4/locales/ta.d.cts","../../node_modules/zod/v4/locales/th.d.cts","../../node_modules/zod/v4/locales/tr.d.cts","../../node_modules/zod/v4/locales/ua.d.cts","../../node_modules/zod/v4/locales/uk.d.cts","../../node_modules/zod/v4/locales/ur.d.cts","../../node_modules/zod/v4/locales/uz.d.cts","../../node_modules/zod/v4/locales/vi.d.cts","../../node_modules/zod/v4/locales/zh-CN.d.cts","../../node_modules/zod/v4/locales/zh-TW.d.cts","../../node_modules/zod/v4/locales/yo.d.cts","../../node_modules/zod/v4/locales/index.d.cts","../../node_modules/zod/v4/core/doc.d.cts","../../node_modules/zod/v4/core/api.d.cts","../../node_modules/zod/v4/core/json-schema-processors.d.cts","../../node_modules/zod/v4/core/json-schema-generator.d.cts","../../node_modules/zod/v4/core/index.d.cts","../../node_modules/zod/v4/classic/errors.d.cts","../../node_modules/zod/v4/classic/parse.d.cts","../../node_modules/zod/v4/classic/schemas.d.cts","../../node_modules/zod/v4/classic/checks.d.cts","../../node_modules/zod/v4/classic/compat.d.cts","../../node_modules/zod/v4/classic/from-json-schema.d.cts","../../node_modules/zod/v4/classic/iso.d.cts","../../node_modules/zod/v4/classic/coerce.d.cts","../../node_modules/zod/v4/classic/external.d.cts","../../node_modules/zod/index.d.cts","../../core/dist/esm/schemas/manager/create.d.ts","../../core/dist/esm/schemas/manager/update.d.ts","../../core/dist/esm/schemas/manager/delete.d.ts","../../core/dist/esm/schemas/manager/get.d.ts","../../core/dist/esm/schemas/manager/list.d.ts","../../core/dist/esm/schemas/manager/setDefaultLanguage.d.ts","../../core/dist/esm/schemas/manager/updatePassword.d.ts","../../core/dist/esm/schemas/manager/literals/list.d.ts","../../core/dist/esm/schemas/manager/literals/upsert.d.ts","../../core/dist/esm/schemas/manager/auth/accountInfo.d.ts","../../core/dist/esm/schemas/manager/auth/login.d.ts","../../core/dist/esm/schemas/manager/auth/logout.d.ts","../../core/dist/esm/schemas/manager/auth/deleteSession.d.ts","../../core/dist/esm/schemas/manager/auth/totp/enrollTotp.d.ts","../../core/dist/esm/schemas/manager/auth/totp/confirmTotp.d.ts","../../core/dist/esm/schemas/manager/auth/totp/verifyTotp.d.ts","../../core/dist/esm/schemas/manager/auth/webauthn/webauthnRegisterOptions.d.ts","../../core/dist/esm/schemas/manager/auth/webauthn/webauthnRegisterVerify.d.ts","../../core/dist/esm/schemas/manager/auth/webauthn/webauthnAuthOptions.d.ts","../../core/dist/esm/schemas/manager/auth/webauthn/webauthnAuthVerify.d.ts","../../core/dist/esm/schemas/manager/media/prepareUpload.d.ts","../../core/dist/esm/schemas/manager/media/finalizeUpload.d.ts","../../core/dist/esm/schemas/manager/media/getMediaUrl.d.ts","../../core/dist/esm/schemas/manager/media/createFolder.d.ts","../../core/dist/esm/schemas/manager/media/listFolders.d.ts","../../core/dist/esm/schemas/web/page.d.ts","../../core/dist/esm/contracts.d.ts","../src/registry.ts","../src/ErrorBoundary.tsx","../src/LazyViewport.tsx","../../core/dist/esm/web/page.d.ts","../../core/dist/esm/web/index.d.ts","../src/ModuleRenderer.tsx","../src/index.ts"],"fileIdsList":[[134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159],[133],[164],[159],[53,54],[55],[132],[123],[123,126],[118,121,123,124,125,126,127,128,129,130,131],[57,59,126],[123,124],[58,123,125],[59,61,63,64,65,66],[61,63,65,66],[61,63,65],[58,61,63,64,66],[57,59,60,61,62,63,64,65,66,67,68,118,119,120,121,122],[57,59,60,63],[59,60,63],[63,66],[57,58,60,61,62,64,65,66],[57,58,59,63,123],[63,64,65,66],[65],[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,113,114,115,116,117],[55,56,160,161],[55,56],[55,56,160,161,162,163,165],[56,161,162,163,166],[55,56,160]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"dc0a7f107690ee5cd8afc8dbf05c4df78085471ce16bdd9881642ec738bc81fe","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"c1a2e05eb6d7ca8d7e4a7f4c93ccf0c2857e842a64c98eaee4d85841ee9855e6","impliedFormat":1},{"version":"835fb2909ce458740fb4a49fc61709896c6864f5ce3db7f0a88f06c720d74d02","impliedFormat":1},{"version":"6e5857f38aa297a859cab4ec891408659218a5a2610cd317b6dcbef9979459cc","impliedFormat":1},{"version":"ead8e39c2e11891f286b06ae2aa71f208b1802661fcdb2425cffa4f494a68854","impliedFormat":1},{"version":"82919acbb38870fcf5786ec1292f0f5afe490f9b3060123e48675831bd947192","impliedFormat":1},{"version":"e222701788ec77bd57c28facbbd142eadf5c749a74d586bc2f317db7e33544b1","impliedFormat":1},{"version":"09154713fae0ed7befacdad783e5bd1970c06fc41a5f866f7f933b96312ce764","impliedFormat":1},{"version":"8d67b13da77316a8a2fabc21d340866ddf8a4b99e76a6c951cc45189142df652","impliedFormat":1},{"version":"a91c8d28d10fee7fe717ddf3743f287b68770c813c98f796b6e38d5d164bd459","impliedFormat":1},{"version":"68add36d9632bc096d7245d24d6b0b8ad5f125183016102a3dad4c9c2438ccb0","impliedFormat":1},{"version":"3a819c2928ee06bbcc84e2797fd3558ae2ebb7e0ed8d87f71732fb2e2acc87b4","impliedFormat":1},{"version":"f6f827cd43e92685f194002d6b52a9408309cda1cec46fb7ca8489a95cbd2fd4","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","impliedFormat":1},{"version":"a270a1a893d1aee5a3c1c8c276cd2778aa970a2741ee2ccf29cc3210d7da80f5","impliedFormat":1},{"version":"add0ce7b77ba5b308492fa68f77f24d1ed1d9148534bdf05ac17c30763fc1a79","impliedFormat":1},{"version":"8926594ee895917e90701d8cbb5fdf77fc238b266ac540f929c7253f8ad6233d","impliedFormat":1},{"version":"2f67911e4bf4e0717dc2ded248ce2d5e4398d945ee13889a6852c1233ea41508","impliedFormat":1},{"version":"d8430c275b0f59417ea8e173cfb888a4477b430ec35b595bf734f3ec7a7d729f","impliedFormat":1},{"version":"69364df1c776372d7df1fb46a6cb3a6bf7f55e700f533a104e3f9d70a32bec18","impliedFormat":1},{"version":"6042774c61ece4ba77b3bf375f15942eb054675b7957882a00c22c0e4fe5865c","impliedFormat":1},{"version":"5a3bd57ed7a9d9afef74c75f77fce79ba3c786401af9810cdf45907c4e93f30e","impliedFormat":1},{"version":"ed8763205f02fb65e84eff7432155258df7f93b7d938f01785cb447d043d53f3","impliedFormat":1},{"version":"30db853bb2e60170ba11e39ab48bacecb32d06d4def89eedf17e58ebab762a65","impliedFormat":1},{"version":"e27451b24234dfed45f6cf22112a04955183a99c42a2691fb4936d63cfe42761","impliedFormat":1},{"version":"2316301dd223d31962d917999acf8e543e0119c5d24ec984c9f22cb23247160c","impliedFormat":1},{"version":"58d65a2803c3b6629b0e18c8bf1bc883a686fcf0333230dd0151ab6e85b74307","impliedFormat":1},{"version":"e818471014c77c103330aee11f00a7a00b37b35500b53ea6f337aefacd6174c9","impliedFormat":1},{"version":"d4a5b1d2ff02c37643e18db302488cd64c342b00e2786e65caac4e12bda9219b","impliedFormat":1},{"version":"29f823cbe0166e10e7176a94afe609a24b9e5af3858628c541ff8ce1727023cd","impliedFormat":1},"459c8985cadb07503d29cf7fed68567c9902027c19e9427cc70f22c4372d4726","e30ceed68dd2bc2473aad817ee09fc21a360c7d2473ac735a1bf9e477b72cdfa","05c859399d2d79c219638327932278ce18e82c6e40d9081cb51ff55aa75ded99","8e16bb53e29f2422bbad7e7ffd52ad182731b3b5dd281b7b318e83f565ef3e98","7e531f6de36aa2af9fce3d7de3cc29d3d2d562cfff53946456464014ff6d977c","16dfd356c2d4463f39c92953f1d05df999d3e51e3b4a1e89289640601e0e5a77","d21ca9f89669f342643eef85202f2dbeefcf66c7b46ed91d13f5f6e5d9e48d88","39dd025305c30a13d768b5bfae91bf4cd781302b8be5e7e6aeec9716ce50c7f8","9802d50887998e83f8d17a9c351d3b4f8ba0c7fff310d75d34a0cf221154371e","253bc13fd7431b23bfd0ff6df68dbf00691033dbc63f394ea43ac58ced44e511","edea7c2bb6587e646bd401affe5c1ee0d9e754ced39c5a3b95da0bbd6d18332e","76e139ca9ff918f6e183090b01ba3eb952a1b7b9d6380f705b80665fd84ec1d3","dcf317ea980bd6ae95ae91c19697e3ac20f141a0e951ff9c43a24ac15460a473","3d8ea7684b754648f6855dfb443821c07310d85dbbf5560d90cbb7a8c22a2671","55d86a8b2f5826dc2d7b5cea9476d157522a7dd0b127aff618d2b6d6977980e0","5f04968e322e6e19ac987163db853b44217defebadf7e6757448ee0da424677e","468206d04c97d80fac6542f0e00b0f62f3f32639a34faed9f219a98ec9dcfdb2","fe741dc030e205570bce3f224e8f89ed7f5b38c642acb29acb0eada241481054","747b3694064efd9eb9bf8e3cbd025e29eeb61e88b3c4b23ede80f22d9cf810ab","37a15b0c384dd406949bc2426140dde5822c238e8b4d3e21f5d224e1b52eab1e","e26b172d0043b9f46f32ed39d550c7ad849864d835daa64b7a2bce2f7cfe946b","68cf27c6763a67025c6deaeb12853c1cb085ae4c762f23d44c5d5dca1577d480","3d4133266ab5ad41b5fa4d033468957b2b551a8bbe3ef84ec9a707b6149c36f1","9553a197af2a294c5276b4e90bbee5982741b7cd132cd6929d76bfb8b387da5a","091c3e0f174314e26f6c33d7facaa7c5621a4925b341545193bb3e12b62909a1","108449f067fd737a7957c6e52e56b3aee03b2808c247567d3ddb4f55b5e7e127","d1185a72fa4f096db4e5845b81228f837ccdca4ae729a2785e4539f8d54c1e5c",{"version":"4d4b7f7b6af3f0a81f6a559a5d7aa35b6413755945034b65db5ccea748b8850d","signature":"f49ed507772be5446821a32e91bc3c22738400e5d5e817deaabb5714235aa728"},{"version":"e15047b811a3249cc920e65beb530257395d1559d13bd7309018897ace282ac4","signature":"a14b32e104c5c91f1038072b1af660e314b4534f31bddc81a1fa83a0e6c60145"},{"version":"5c2c433bde1689e30591318ad5c9f9f329464e1f362015dd1d87cea0859b2d04","signature":"dae196125944b7a2d9c7a987ea235fcaa4482bc5c6311b199a0f4ad0c178b1c2"},"83851ed3dabc374d27a31bd8bbb7999e01349cb1615c50cbeaaeffc546b939c8","d0f37bbfbd9e137018cd452bf048901254d6f5f226c7f0264a9f7856e32351bd",{"version":"be01705da3bf26d6e5c45b2c49a522d595d0f08d057a358c0104439ebf3e91fd","signature":"de47810a5726359a452b321e34e7fbe28f8d97142420fc77a9cb30861f44b710"},"aa51c3b82735761c20e770433a5de497ff863dfc3bceeae7cec79fe4112d6898"],"root":[[161,163],166,167],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"jsx":4,"module":99,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":8},"referencedMap":[[160,1],[143,2],[146,2],[144,2],[145,2],[148,2],[147,2],[149,2],[152,2],[153,2],[150,2],[151,2],[134,2],[136,2],[137,2],[138,2],[141,2],[142,2],[157,2],[155,2],[156,2],[158,2],[154,2],[139,2],[135,2],[140,2],[159,2],[165,3],[164,4],[55,5],[56,6],[133,7],[127,8],[131,9],[128,9],[124,8],[132,10],[129,11],[130,9],[125,12],[126,13],[120,14],[64,15],[66,16],[65,17],[123,18],[122,19],[121,20],[67,15],[59,21],[63,22],[60,23],[61,24],[69,25],[70,25],[71,25],[72,25],[73,25],[74,25],[75,25],[76,25],[77,25],[78,25],[79,25],[80,25],[81,25],[83,25],[82,25],[84,25],[85,25],[86,25],[87,25],[118,26],[88,25],[89,25],[90,25],[91,25],[92,25],[93,25],[94,25],[95,25],[96,25],[97,25],[98,25],[99,25],[100,25],[102,25],[101,25],[103,25],[104,25],[105,25],[106,25],[107,25],[108,25],[109,25],[110,25],[111,25],[112,25],[113,25],[114,25],[117,25],[115,25],[116,25],[162,27],[163,28],[166,29],[167,30],[161,31]],"latestChangedDtsFile":"./esm/index.d.ts","version":"6.0.2"}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@rakun-kit/react",
3
+ "version": "1.0.0",
4
+ "description": "React rendering helpers for Rakun web modules.",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "Yago Claros",
8
+ "url": "https://github.com/Yelsier"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/Yelsier/rakun.git",
13
+ "directory": "react"
14
+ },
15
+ "bugs": {
16
+ "url": "https://github.com/Yelsier/rakun/issues"
17
+ },
18
+ "homepage": "https://github.com/Yelsier/rakun/tree/main/react#readme",
19
+ "type": "module",
20
+ "main": "./dist/cjs/index.js",
21
+ "module": "./dist/esm/index.js",
22
+ "types": "./dist/esm/index.d.ts",
23
+ "scripts": {
24
+ "build": "rm -rf dist && npm run build:esm && npm run build:cjs",
25
+ "build:esm": "tsc -b --force tsconfig.build.json && node ../scripts/fix-dist-imports.mjs dist/esm",
26
+ "build:cjs": "rm -rf dist/cjs && tsc -p tsconfig.build.cjs.json && node ../scripts/fix-dist-imports.mjs dist/cjs && node ../scripts/write-cjs-package-json.mjs dist/cjs"
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "dependencies": {
32
+ "@rakun-kit/core": "^1.0.5"
33
+ },
34
+ "peerDependencies": {
35
+ "react": ">=18.0.0",
36
+ "react-dom": ">=18.0.0"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "react-dom": {
40
+ "optional": true
41
+ }
42
+ },
43
+ "devDependencies": {
44
+ "@types/react": "^19.2.2",
45
+ "react": "^19.2.0",
46
+ "react-dom": "^19.2.0"
47
+ },
48
+ "exports": {
49
+ ".": {
50
+ "types": "./dist/esm/index.d.ts",
51
+ "import": "./dist/esm/index.js",
52
+ "require": "./dist/cjs/index.js",
53
+ "default": "./dist/esm/index.js"
54
+ }
55
+ }
56
+ }