@fluixi/core 1.0.0-alpha.100 → 1.0.0-alpha.102
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 +11 -11
- package/dist/cdn/core.global.js +2 -2
- package/dist/src/cdn/core.cjs +2 -7
- package/dist/src/cdn/core.mjs +2 -8
- package/dist/src/index.cjs +2 -18
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.mjs +2 -18
- package/dist/src/jsx-runtime.d.ts +1 -1
- package/dist/src/jsx-runtime.js +1 -4
- package/dist/src/lib/client/{chunk-FDOPDB6Z.mjs → chunk-PLBLUAUD.mjs} +1 -1
- package/dist/src/lib/client/index.cjs +2 -2
- package/dist/src/lib/client/index.d.ts +1 -1
- package/dist/src/lib/client/index.js +2 -2
- package/dist/src/lib/client/index.mjs +4 -4
- package/dist/src/lib/client/{router-4PTBPZLQ.mjs → router-LQ57EOB4.mjs} +2 -2
- package/dist/src/lib/core.cjs +1 -17
- package/dist/src/lib/core.d.ts +2 -6
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +6 -22
- package/dist/src/lib/core.mjs +1 -17
- package/dist/src/lib/i18n/index.cjs +1 -1
- package/dist/src/lib/i18n/index.mjs +1 -1
- package/dist/src/lib/index.cjs +2 -8
- package/dist/src/lib/index.d.ts +3 -9
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +3 -26
- package/dist/src/lib/index.mjs +2 -9
- package/dist/src/lib/jsx-runtime/index.cjs +1 -1
- package/dist/src/lib/jsx-runtime/index.mjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.cjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.mjs +1 -1
- package/dist/src/lib/plugins/index.cjs +1 -1
- package/dist/src/lib/plugins/index.mjs +1 -1
- package/dist/src/lib/plugins/route-codegen.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-codegen.js +0 -6
- package/dist/src/lib/plugins/route-scanner.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-scanner.js +0 -6
- package/dist/src/lib/render/component.d.ts +0 -3
- package/dist/src/lib/render/component.d.ts.map +1 -1
- package/dist/src/lib/render/component.js +0 -21
- package/dist/src/lib/render/index.cjs +1 -10
- package/dist/src/lib/render/index.d.ts +1 -4
- package/dist/src/lib/render/index.d.ts.map +1 -1
- package/dist/src/lib/render/index.js +1 -21
- package/dist/src/lib/render/index.mjs +1 -10
- package/dist/src/lib/render/lazy.js +1 -1
- package/dist/src/lib/render/suspense.cjs +0 -5
- package/dist/src/lib/render/suspense.d.ts +1 -2
- package/dist/src/lib/render/suspense.d.ts.map +1 -1
- package/dist/src/lib/render/suspense.js +1 -8
- package/dist/src/lib/render/suspense.mjs +0 -5
- package/dist/src/lib/render/versions.cjs +1 -1
- package/dist/src/lib/render/versions.mjs +1 -1
- package/dist/src/lib/router/data.d.ts.map +1 -1
- package/dist/src/lib/router/data.js +0 -5
- package/dist/src/lib/router/index.cjs +1 -1
- package/dist/src/lib/router/index.js +5 -5
- package/dist/src/lib/router/index.mjs +1 -1
- package/dist/src/lib/server/hydration.d.ts +0 -6
- package/dist/src/lib/server/hydration.d.ts.map +1 -1
- package/dist/src/lib/server/hydration.js +0 -22
- package/dist/src/lib/server/index.cjs +1 -1
- package/dist/src/lib/server/index.d.ts +1 -7
- package/dist/src/lib/server/index.d.ts.map +1 -1
- package/dist/src/lib/server/index.js +1 -12
- package/dist/src/lib/server/index.mjs +1 -1
- package/dist/src/lib/server/reactive.d.ts.map +1 -1
- package/dist/src/lib/server/reactive.js +0 -35
- package/dist/src/lib/storage/index.cjs +1 -1
- package/dist/src/lib/storage/index.mjs +1 -1
- package/dist/src/routes.cjs +1 -1
- package/dist/src/routes.mjs +1 -1
- package/dist/src/server.d.ts +0 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +0 -1
- package/dist/src/utils.cjs +1 -1
- package/dist/src/utils.mjs +1 -1
- package/dist/src/version.generated.cjs +1 -1
- package/dist/src/version.generated.d.ts +1 -1
- package/dist/src/version.generated.js +1 -1
- package/dist/src/version.generated.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +20 -24
- package/src/index.ts +0 -2
- package/dist/cli/generate.cjs +0 -5639
- package/dist/cli/generate.d.ts +0 -7
- package/dist/cli/generate.d.ts.map +0 -1
- package/dist/cli/generate.js +0 -2580
- package/dist/cli/generate.mjs +0 -5644
- package/dist/cli/index.cjs +0 -5639
- package/dist/cli/index.d.ts +0 -7
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -2580
- package/dist/cli/index.mjs +0 -5644
- package/dist/cli/run.cjs +0 -64
- package/dist/cli/run.d.ts +0 -3
- package/dist/cli/run.d.ts.map +0 -1
- package/dist/cli/run.js +0 -62
- package/dist/cli/run.mjs +0 -40
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - Components execute once
|
|
6
6
|
* - Fine-grained reactivity (no VDOM)
|
|
7
7
|
* - Server-side rendering with hydration
|
|
8
|
-
* - JSX and
|
|
8
|
+
* - JSX and `html` tagged templates
|
|
9
9
|
*/
|
|
10
10
|
export { createEffect, createMemo, createSignal, createResource, createRoot, createComputed, createRenderEffect, onCleanup, getOwner, runWithOwner, batch, untrack, createDeferred, setOwner, } from '@fluixi/reactive/signal';
|
|
11
11
|
export { createDebounce, createSelector } from '@fluixi/reactive/signal';
|
|
@@ -20,20 +20,14 @@ import { Component, ComponentProps, LifecycleCallback, LazyComponent, RefObject,
|
|
|
20
20
|
export type { Component, ComponentProps, LifecycleCallback, LazyComponent, RefObject, SuspenseProps, };
|
|
21
21
|
export { classMap, styleMap, type ClassMapInput, type ClassCondition, type StyleMapInput, type StyleValue, } from '@fluixi/dom';
|
|
22
22
|
export * from './control-flow.js';
|
|
23
|
-
export { insert, spread, setAttribute, setProperty, addClass, removeClass, toggleClass, delegateEvents, isDOMNode,
|
|
23
|
+
export { insert, spread, setAttribute, setProperty, addClass, removeClass, toggleClass, delegateEvents, isDOMNode, hydrate, } from '@fluixi/dom';
|
|
24
24
|
export { jsx, jsxs, Fragment } from './jsx-runtime/index.js';
|
|
25
25
|
export type { JSXElement } from './jsx-runtime/index.js';
|
|
26
26
|
/**
|
|
27
27
|
* Framework version
|
|
28
28
|
*/
|
|
29
29
|
export declare const VERSION = "0.0.1";
|
|
30
|
-
/**
|
|
31
|
-
* Framework name
|
|
32
|
-
*/
|
|
33
30
|
export declare const FRAMEWORK_NAME = "Fluixi";
|
|
34
|
-
/**
|
|
35
|
-
* Get framework info
|
|
36
|
-
*/
|
|
37
31
|
export declare function getFrameworkInfo(): {
|
|
38
32
|
name: string;
|
|
39
33
|
version: string;
|
|
@@ -41,7 +35,7 @@ export declare function getFrameworkInfo(): {
|
|
|
41
35
|
ssr: boolean;
|
|
42
36
|
hydration: boolean;
|
|
43
37
|
jsx: boolean;
|
|
44
|
-
|
|
38
|
+
htmlTagged: boolean;
|
|
45
39
|
signals: boolean;
|
|
46
40
|
fineGrained: boolean;
|
|
47
41
|
lazy: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,cAAc,EACd,QAAQ,GACT,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EACL,UAAU,IA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M,aAAa,CAAC;AAIrB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE7D,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIzD;;GAEG;AACH,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,eAAO,MAAM,cAAc,WAAW,CAAC;AAEvC,wBAAgB,gBAAgB;;;;;;;;;;;;;;EAgB/B;AAID,OAAO,EACL,YAAY,IAAI,aAAa,EAC7B,YAAY,IAAI,aAAa,EAC7B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,KAAK,IAAI,MAAM,EACf,OAAO,IAAI,QAAQ,EACnB,SAAS,IAAI,UAAU,EACxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,eAAe,IAAI,gBAAgB,EACnC,OAAO,IAAI,QAAQ,EACnB,SAAS,IAAI,UAAU,EAEvB,SAAS,IAAI,UAAU,EACvB,OAAO,IAAI,QAAQ,EACnB,MAAM,IAAI,OAAO,EACjB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,WAAW,IAAI,YAAY,EAE5B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,IAAI,cAAc,EAC/B,UAAU,IAAI,WAAW,EAC1B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAKtD,wBAmCE"}
|
package/dist/src/lib/index.js
CHANGED
|
@@ -5,18 +5,14 @@
|
|
|
5
5
|
* - Components execute once
|
|
6
6
|
* - Fine-grained reactivity (no VDOM)
|
|
7
7
|
* - Server-side rendering with hydration
|
|
8
|
-
* - JSX and
|
|
8
|
+
* - JSX and `html` tagged templates
|
|
9
9
|
*/
|
|
10
|
-
// ============================================================================
|
|
11
10
|
// REACTIVE PRIMITIVES (from @fluixi/reactive)
|
|
12
|
-
// ============================================================================
|
|
13
11
|
export { createEffect, createMemo, createSignal, createResource, createRoot, createComputed, createRenderEffect, onCleanup, getOwner, runWithOwner, batch, untrack, createDeferred, setOwner, } from '@fluixi/reactive/signal';
|
|
14
12
|
export { createDebounce, createSelector } from '@fluixi/reactive/signal';
|
|
15
13
|
export { readSignal as read, reduceSignal as reduce, } from '@fluixi/reactive/operators';
|
|
16
14
|
export { createStore, untrackStore, Store } from '@fluixi/reactive/store';
|
|
17
|
-
// ============================================================================
|
|
18
15
|
// createComponent & LIFECYCLE
|
|
19
|
-
// ============================================================================
|
|
20
16
|
export { createComponent, onMount, onUnmount, lazy,
|
|
21
17
|
// Hooks
|
|
22
18
|
useEffect, useMemo, useRef, useReducer, useEventListener, useCallback, render, portal, isRenderable, initDelegation, cleanupDelegation,
|
|
@@ -29,15 +25,9 @@ getSharedConfig, $component, } from './render/index.js';
|
|
|
29
25
|
export * from './context/index.js';
|
|
30
26
|
// Isomorphic request state (server-resolved -> serialized -> client-seeded).
|
|
31
27
|
export { createIsomorphicState, } from './isomorphic.js';
|
|
32
|
-
// ============================================================================
|
|
33
28
|
// RENDERING (CLIENT)
|
|
34
|
-
// ============================================================================
|
|
35
|
-
// export { render } from './core/index.js';
|
|
36
|
-
// export type { RenderOptions } from './render/index.js';
|
|
37
29
|
// html`` / svg`` markers are re-exported from the main entry (lib/core.ts).
|
|
38
|
-
// ============================================================================
|
|
39
30
|
// DOM UTILITIES (from @fluixi/dom)
|
|
40
|
-
// ============================================================================
|
|
41
31
|
export {
|
|
42
32
|
// Framework-agnostic reactive attribute maps (return Accessor<string>)
|
|
43
33
|
classMap, styleMap, } from '@fluixi/dom';
|
|
@@ -48,25 +38,15 @@ insert, spread, setAttribute, setProperty, addClass, removeClass, toggleClass,
|
|
|
48
38
|
// Event Handling
|
|
49
39
|
delegateEvents,
|
|
50
40
|
// Utilities
|
|
51
|
-
isDOMNode,
|
|
52
|
-
// ============================================================================
|
|
41
|
+
isDOMNode, hydrate, } from '@fluixi/dom';
|
|
53
42
|
// JSX RUNTIME
|
|
54
|
-
// ============================================================================
|
|
55
43
|
export { jsx, jsxs, Fragment } from './jsx-runtime/index.js';
|
|
56
|
-
// ============================================================================
|
|
57
44
|
// FRAMEWORK METADATA
|
|
58
|
-
// ============================================================================
|
|
59
45
|
/**
|
|
60
46
|
* Framework version
|
|
61
47
|
*/
|
|
62
48
|
export const VERSION = '0.0.1';
|
|
63
|
-
/**
|
|
64
|
-
* Framework name
|
|
65
|
-
*/
|
|
66
49
|
export const FRAMEWORK_NAME = 'Fluixi';
|
|
67
|
-
/**
|
|
68
|
-
* Get framework info
|
|
69
|
-
*/
|
|
70
50
|
export function getFrameworkInfo() {
|
|
71
51
|
return {
|
|
72
52
|
name: FRAMEWORK_NAME,
|
|
@@ -75,7 +55,7 @@ export function getFrameworkInfo() {
|
|
|
75
55
|
ssr: true,
|
|
76
56
|
hydration: true,
|
|
77
57
|
jsx: true,
|
|
78
|
-
|
|
58
|
+
htmlTagged: true,
|
|
79
59
|
signals: true,
|
|
80
60
|
fineGrained: true,
|
|
81
61
|
lazy: true,
|
|
@@ -84,9 +64,7 @@ export function getFrameworkInfo() {
|
|
|
84
64
|
},
|
|
85
65
|
};
|
|
86
66
|
}
|
|
87
|
-
// ============================================================================
|
|
88
67
|
// DEFAULT EXPORT
|
|
89
|
-
// ============================================================================
|
|
90
68
|
import { createSignal as _createSignal, createEffect as _createEffect, createMemo as _createMemo, createRoot as _createRoot, batch as _batch, untrack as _untrack, onCleanup as _onCleanup, } from '@fluixi/reactive/signal';
|
|
91
69
|
import { createComponent as _createComponent, onMount as _onMount, onUnmount as _onUnmount,
|
|
92
70
|
// lazy as _lazy,
|
|
@@ -108,7 +86,6 @@ export default {
|
|
|
108
86
|
// Context (from component for proper support)
|
|
109
87
|
createContext: _createContext,
|
|
110
88
|
useContext: _useContext,
|
|
111
|
-
// Components
|
|
112
89
|
createComponent: _createComponent,
|
|
113
90
|
onMount: _onMount,
|
|
114
91
|
onUnmount: _onUnmount,
|
package/dist/src/lib/index.mjs
CHANGED
|
@@ -44,7 +44,7 @@ import { createRoot as createRoot2 } from "@fluixi/reactive/signal";
|
|
|
44
44
|
import { registerCoreVersion } from "@fluixi/dom";
|
|
45
45
|
|
|
46
46
|
// src/version.generated.ts
|
|
47
|
-
var VERSION = "1.0.0-alpha.
|
|
47
|
+
var VERSION = "1.0.0-alpha.102";
|
|
48
48
|
|
|
49
49
|
// src/lib/render/versions.ts
|
|
50
50
|
import { stampVersions, warnOnVersionSkew, versions } from "@fluixi/dom";
|
|
@@ -387,9 +387,6 @@ function render(code, container, options = {}) {
|
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
-
function isLitTemplateResult(value) {
|
|
391
|
-
return value && typeof value === "object" && (value["_$litType$"] !== void 0 || value["_$litDirective$"] !== void 0);
|
|
392
|
-
}
|
|
393
390
|
function portal(code, target, options = {}) {
|
|
394
391
|
const container = document.createElement("div");
|
|
395
392
|
container.setAttribute("data-portal", "true");
|
|
@@ -406,7 +403,6 @@ function isRenderable(value) {
|
|
|
406
403
|
if (value == null) return true;
|
|
407
404
|
if (typeof value === "function") return true;
|
|
408
405
|
if (isDOMNode(value)) return true;
|
|
409
|
-
if (isLitTemplateResult(value)) return true;
|
|
410
406
|
if (Array.isArray(value)) return true;
|
|
411
407
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
412
408
|
return true;
|
|
@@ -533,7 +529,6 @@ import {
|
|
|
533
529
|
toggleClass,
|
|
534
530
|
delegateEvents as delegateEvents2,
|
|
535
531
|
isDOMNode as isDOMNode2,
|
|
536
|
-
isLitTemplateResult as isLitTemplateResult2,
|
|
537
532
|
hydrate
|
|
538
533
|
} from "@fluixi/dom";
|
|
539
534
|
|
|
@@ -562,7 +557,7 @@ function getFrameworkInfo() {
|
|
|
562
557
|
ssr: true,
|
|
563
558
|
hydration: true,
|
|
564
559
|
jsx: true,
|
|
565
|
-
|
|
560
|
+
htmlTagged: true,
|
|
566
561
|
signals: true,
|
|
567
562
|
fineGrained: true,
|
|
568
563
|
lazy: true,
|
|
@@ -583,7 +578,6 @@ var index_default = {
|
|
|
583
578
|
// Context (from component for proper support)
|
|
584
579
|
createContext: createContext3,
|
|
585
580
|
useContext: useContext3,
|
|
586
|
-
// Components
|
|
587
581
|
createComponent,
|
|
588
582
|
onMount,
|
|
589
583
|
onUnmount,
|
|
@@ -655,7 +649,6 @@ export {
|
|
|
655
649
|
insert2 as insert,
|
|
656
650
|
isDOMNode2 as isDOMNode,
|
|
657
651
|
isDev,
|
|
658
|
-
isLitTemplateResult2 as isLitTemplateResult,
|
|
659
652
|
isRenderable,
|
|
660
653
|
export_jsx as jsx,
|
|
661
654
|
export_jsxs as jsxs,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
|
|
3
3
|
// src/lib/jsx-runtime/jsx-dev-runtime.ts
|
|
4
4
|
export * from "@fluixi/jsx/jsx-dev-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
|
|
3
3
|
// src/lib/plugins/vite.ts
|
|
4
4
|
import { fluixi, createVitePlugin } from "@fluixi/vite-plugin";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-codegen.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/route-codegen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAevD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EAAE,EACtB,SAAS,EAAE,MAAM,GAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"route-codegen.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/route-codegen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAevD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EAAE,EACtB,SAAS,EAAE,MAAM,GAChB,MAAM,CAYR"}
|
|
@@ -24,9 +24,6 @@ export function generateRouteModule(routes, routesDir) {
|
|
|
24
24
|
lines.push(`// Auto-generated by fluixi route plugin`);
|
|
25
25
|
lines.push(`// Do not edit manually`);
|
|
26
26
|
lines.push(``);
|
|
27
|
-
// router is lit-free; the old './router' barrel imported @fluixi/lit (extends
|
|
28
|
-
// HTMLElement at module init) which crashed SSR/prod server bundles. (runWithOwner was
|
|
29
|
-
// imported here but never used in the generated output: dropped.)
|
|
30
27
|
lines.push(`import { lazy } from '@fluixi/core/router';`);
|
|
31
28
|
lines.push(``);
|
|
32
29
|
lines.push(`export const routes = ${generateRouteArray(routes, routesDir, 0)};`);
|
|
@@ -44,7 +41,6 @@ function generateRouteObject(route, routesDir, depth) {
|
|
|
44
41
|
const indent = ' '.repeat(depth);
|
|
45
42
|
const props = [];
|
|
46
43
|
const importPath = buildImportPath(route.filePath, routesDir);
|
|
47
|
-
// Path
|
|
48
44
|
const routePath = computeRoutePath(route);
|
|
49
45
|
props.push(`${indent} path: ${JSON.stringify(routePath)}`);
|
|
50
46
|
// Component: lazy-loaded via dynamic import + Suspense
|
|
@@ -54,9 +50,7 @@ function generateRouteObject(route, routesDir, depth) {
|
|
|
54
50
|
// levels that have no data, which kept the router's if (d.data) check clean.
|
|
55
51
|
if (route.hasRouteData) {
|
|
56
52
|
props.push(`${indent} data: (args, __owner, __isCancelled, __deps) => import(${JSON.stringify(importPath)}).then(m => { if (typeof __isCancelled === 'function' && __isCancelled()) return undefined; if (!m.routeData) return undefined; if (typeof m.routeDeps === 'function') { if (typeof __deps === 'function') __deps(m.routeDeps); args = { ...args, deps: m.routeDeps() }; } return m.routeData(args); })`);
|
|
57
|
-
// props.push(`${indent} data: (args) => import(${JSON.stringify(importPath)}).then(m => m.routeData ? m.routeData(args) : undefined)`);
|
|
58
53
|
}
|
|
59
|
-
// Children
|
|
60
54
|
if (route.children.length > 0) {
|
|
61
55
|
const childArray = generateRouteArray(route.children, routesDir, depth + 1);
|
|
62
56
|
props.push(`${indent} children: ${childArray}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-scanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/route-scanner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"route-scanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/route-scanner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,QAAQ,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B;IAC1B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAMD;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,WAAgB,GACxB,YAAY,EAAE,CAShB"}
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
import * as fs from 'fs';
|
|
8
8
|
import * as path from 'path';
|
|
9
9
|
const DEFAULT_EXTENSIONS = ['.tsx', '.ts', '.jsx', '.js'];
|
|
10
|
-
// ============================================================================
|
|
11
10
|
// SCANNING
|
|
12
|
-
// ============================================================================
|
|
13
11
|
/**
|
|
14
12
|
* Scan a routes directory and return a tree of ScannedRoute nodes.
|
|
15
13
|
*/
|
|
@@ -96,9 +94,7 @@ function scanDirectory(dir, rootDir, parentUrlPath, extensions) {
|
|
|
96
94
|
// Sort: static routes first, then dynamic, then catch-all
|
|
97
95
|
return sortRoutes(routes);
|
|
98
96
|
}
|
|
99
|
-
// ============================================================================
|
|
100
97
|
// ROUTE BUILDING
|
|
101
|
-
// ============================================================================
|
|
102
98
|
function buildFileRoute(fileName, dir, rootDir, parentUrlPath, isLayout) {
|
|
103
99
|
const baseName = stripExtension(fileName);
|
|
104
100
|
const filePath = path.relative(rootDir, path.join(dir, fileName));
|
|
@@ -156,9 +152,7 @@ function buildFileRoute(fileName, dir, rootDir, parentUrlPath, isLayout) {
|
|
|
156
152
|
dir
|
|
157
153
|
};
|
|
158
154
|
}
|
|
159
|
-
// ============================================================================
|
|
160
155
|
// UTILITIES
|
|
161
|
-
// ============================================================================
|
|
162
156
|
function hasValidExtension(fileName, extensions) {
|
|
163
157
|
return extensions.some((ext) => fileName.endsWith(ext));
|
|
164
158
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/lib/render/component.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAIL,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,UAAU,EAGV,KAAK,EAEL,YAAY,EASb,MAAM,yBAAyB,CAAC;AAKjC,KAAK,KAAK,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/lib/render/component.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAIL,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,UAAU,EAGV,KAAK,EAEL,YAAY,EASb,MAAM,yBAAyB,CAAC;AAKjC,KAAK,KAAK,GAAG,GAAG,CAAC;AAIjB,UAAU,YAAY;IACpB,OAAO,EAAE,KAAK,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAOD;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG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G;AACH,OAAO,EAAE,YAAY,EAAE,CAAC;AAIxB;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAID;;;;;;;;;GASG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAG/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAI5C;AAED,YAAY,EAAE,SAAS,EACrB,cAAc,EAAC,MAAM,aAAa,CAAA"}
|
|
@@ -32,16 +32,12 @@ export function setOwner(owner) {
|
|
|
32
32
|
export function getContextOwner() {
|
|
33
33
|
return sharedConfig.context || sharedConfig.owner;
|
|
34
34
|
}
|
|
35
|
-
// ============================================================================
|
|
36
35
|
// GLOBAL STATE
|
|
37
|
-
// ============================================================================
|
|
38
36
|
/**
|
|
39
37
|
* Development mode flag
|
|
40
38
|
*/
|
|
41
39
|
export const DEV = typeof process !== 'undefined' && process.env?.NODE_ENV === 'development';
|
|
42
|
-
// ============================================================================
|
|
43
40
|
// OWNER-BASED LIFECYCLE COORDINATION
|
|
44
|
-
// ============================================================================
|
|
45
41
|
// Every component has a reactive Owner (from createRoot).
|
|
46
42
|
// onMount and useEffect attach callbacks to the Owner via a Symbol-keyed
|
|
47
43
|
// property. A single queueMicrotask per Owner flushes them in order:
|
|
@@ -152,15 +148,6 @@ export function createComponent(Comp, props) {
|
|
|
152
148
|
}
|
|
153
149
|
const cached = new WeakMap();
|
|
154
150
|
export function $component(value, props) {
|
|
155
|
-
// if(isComponent(value) || isRoutes(value) || isRouter(value)) {
|
|
156
|
-
// // if(!cached.has(value)){
|
|
157
|
-
// // cached.set(value, ()=>untrack(()=>value(props)))
|
|
158
|
-
// // }else{
|
|
159
|
-
// // console.log('skipp track', value)
|
|
160
|
-
// // }
|
|
161
|
-
// // return cached.get(value)()
|
|
162
|
-
// return untrack(() => value(props))
|
|
163
|
-
// }
|
|
164
151
|
const component = (typeof value === 'function')
|
|
165
152
|
? untrack(() => value(props))
|
|
166
153
|
: value;
|
|
@@ -184,9 +171,7 @@ export function $component(value, props) {
|
|
|
184
171
|
}
|
|
185
172
|
return component;
|
|
186
173
|
}
|
|
187
|
-
// ============================================================================
|
|
188
174
|
// LIFECYCLE HOOKS
|
|
189
|
-
// ============================================================================
|
|
190
175
|
/**
|
|
191
176
|
* Register a callback to run when component mounts
|
|
192
177
|
*
|
|
@@ -272,9 +257,7 @@ export function onUnmount(fn) {
|
|
|
272
257
|
* ```
|
|
273
258
|
*/
|
|
274
259
|
export { onCleanup };
|
|
275
|
-
// ============================================================================
|
|
276
260
|
// HOOKS
|
|
277
|
-
// ============================================================================
|
|
278
261
|
/**
|
|
279
262
|
* Create a reactive effect
|
|
280
263
|
*
|
|
@@ -470,9 +453,7 @@ export { getOwner };
|
|
|
470
453
|
* Re-exported for convenience
|
|
471
454
|
*/
|
|
472
455
|
export { runWithOwner };
|
|
473
|
-
// ============================================================================
|
|
474
456
|
// HELPER FUNCTIONS (INTERNAL)
|
|
475
|
-
// ============================================================================
|
|
476
457
|
/**
|
|
477
458
|
* Helper to check if we're in a component context
|
|
478
459
|
* @internal
|
|
@@ -480,9 +461,7 @@ export { runWithOwner };
|
|
|
480
461
|
export function hasLifecycleContext() {
|
|
481
462
|
return getOwner() !== null;
|
|
482
463
|
}
|
|
483
|
-
// ============================================================================
|
|
484
464
|
// DEV MODE UTILITIES
|
|
485
|
-
// ============================================================================
|
|
486
465
|
/**
|
|
487
466
|
* Check if in development mode
|
|
488
467
|
*
|
|
@@ -37,7 +37,6 @@ __export(index_exports, {
|
|
|
37
37
|
initDelegation: () => initDelegation,
|
|
38
38
|
isDev: () => isDev,
|
|
39
39
|
isJSXElement: () => isJSXElement,
|
|
40
|
-
isLitResult: () => isLitResult,
|
|
41
40
|
isNode: () => isNode,
|
|
42
41
|
isPromise: () => isPromise,
|
|
43
42
|
isRenderable: () => isRenderable,
|
|
@@ -63,7 +62,7 @@ var import_signal6 = require("@fluixi/reactive/signal");
|
|
|
63
62
|
var import_dom = require("@fluixi/dom");
|
|
64
63
|
|
|
65
64
|
// src/version.generated.ts
|
|
66
|
-
var VERSION = "1.0.0-alpha.
|
|
65
|
+
var VERSION = "1.0.0-alpha.102";
|
|
67
66
|
|
|
68
67
|
// src/lib/render/versions.ts
|
|
69
68
|
var import_dom2 = require("@fluixi/dom");
|
|
@@ -243,10 +242,6 @@ function isNode(value) {
|
|
|
243
242
|
if (typeof Node === "function" && value instanceof Node) return true;
|
|
244
243
|
return !!(value && typeof value === "object" && typeof value.nodeType === "number");
|
|
245
244
|
}
|
|
246
|
-
function isLitResult(value) {
|
|
247
|
-
if (!value || typeof value !== "object") return false;
|
|
248
|
-
return !!(typeof value["_$litType$"] !== "undefined" || typeof value["_$litDirective$"] !== "undefined" || Array.isArray(value.strings) && Array.isArray(value.values));
|
|
249
|
-
}
|
|
250
245
|
function isPromise(value) {
|
|
251
246
|
return !!(value && typeof value === "object" && typeof value.then === "function" || value instanceof Promise);
|
|
252
247
|
}
|
|
@@ -538,9 +533,6 @@ function render(code, container, options = {}) {
|
|
|
538
533
|
}
|
|
539
534
|
};
|
|
540
535
|
}
|
|
541
|
-
function isLitTemplateResult(value) {
|
|
542
|
-
return value && typeof value === "object" && (value["_$litType$"] !== void 0 || value["_$litDirective$"] !== void 0);
|
|
543
|
-
}
|
|
544
536
|
function portal(code, target, options = {}) {
|
|
545
537
|
const container = document.createElement("div");
|
|
546
538
|
container.setAttribute("data-portal", "true");
|
|
@@ -557,7 +549,6 @@ function isRenderable(value) {
|
|
|
557
549
|
if (value == null) return true;
|
|
558
550
|
if (typeof value === "function") return true;
|
|
559
551
|
if ((0, import_dom9.isDOMNode)(value)) return true;
|
|
560
|
-
if (isLitTemplateResult(value)) return true;
|
|
561
552
|
if (Array.isArray(value)) return true;
|
|
562
553
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
563
554
|
return true;
|
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Following SolidJS structure: render logic separated from component creation
|
|
9
9
|
*/
|
|
10
|
-
/**
|
|
11
|
-
* Render options
|
|
12
|
-
*/
|
|
13
10
|
export interface RenderOptions {
|
|
14
11
|
/**
|
|
15
12
|
* Whether to hydrate existing content
|
|
@@ -87,7 +84,7 @@ export declare function initDelegation(): void;
|
|
|
87
84
|
*/
|
|
88
85
|
export declare function cleanupDelegation(): void;
|
|
89
86
|
export { createComponent, onMount, onUnmount, useEffect, useRef, useReducer, useMemo, useEventListener, useCallback, onCleanup, batch, createMemo, createEffect, getOwner, runWithOwner, isDev, devOnly, DEV, getSharedConfig, $component, } from './component.js';
|
|
90
|
-
export { Suspense, SuspenseList, type SuspenseProps, type SuspenseListProps, isNode,
|
|
87
|
+
export { Suspense, SuspenseList, type SuspenseProps, type SuspenseListProps, isNode, isPromise, isJSXElement, } from './suspense.js';
|
|
91
88
|
export { lazy } from "./lazy.js";
|
|
92
89
|
export type { LazyOptions, LazyComponent } from "./lazy.js";
|
|
93
90
|
export { deferred } from "./deferred.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/render/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/render/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAID;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,GAAG,EACf,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE,aAAkB,GAC1B,MAAM,IAAI,CA8CZ;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,GAAG,EACf,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,aAAkB,GAC1B,MAAM,IAAI,CAaZ;AAID;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAahD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAGrC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAGxC;AAKD,OAAO,EACL,eAAe,EACf,OAAO,EACP,SAAS,EACT,SAAS,EACT,MAAM,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,KAAK,EACL,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,GAAG,EACH,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,QAAQ,EACR,YAAY,EAEZ,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEtB,MAAM,EACN,SAAS,EACT,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAC9B,YAAY,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,WAAW,CAAA;AACzD,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AACtC,YAAY,EAAC,eAAe,EAAE,YAAY,EAAC,MAAM,eAAe,CAAA;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,YAAY,EACV,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,SAAS,GACV,MAAM,gBAAgB,CAAC"}
|
|
@@ -11,9 +11,7 @@ import { isServer } from '@fluixi/dom';
|
|
|
11
11
|
import { createRoot } from '@fluixi/reactive/signal';
|
|
12
12
|
import { stampVersions, warnOnVersionSkew } from './versions.js';
|
|
13
13
|
import { isDOMNode, delegateEvents, insert, } from '@fluixi/dom';
|
|
14
|
-
// ============================================================================
|
|
15
14
|
// RENDERING (CLIENT)
|
|
16
|
-
// ============================================================================
|
|
17
15
|
/**
|
|
18
16
|
* Render a component into a DOM element
|
|
19
17
|
*
|
|
@@ -77,19 +75,7 @@ export function render(code, container, options = {}) {
|
|
|
77
75
|
}
|
|
78
76
|
};
|
|
79
77
|
}
|
|
80
|
-
/**
|
|
81
|
-
* Type guard for Lit template results
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
84
|
-
function isLitTemplateResult(value) {
|
|
85
|
-
return (value &&
|
|
86
|
-
typeof value === 'object' &&
|
|
87
|
-
(value['_$litType$'] !== undefined ||
|
|
88
|
-
value['_$litDirective$'] !== undefined));
|
|
89
|
-
}
|
|
90
|
-
// ============================================================================
|
|
91
78
|
// PORTAL RENDERING
|
|
92
|
-
// ============================================================================
|
|
93
79
|
/**
|
|
94
80
|
* Render into a different part of the DOM tree
|
|
95
81
|
*
|
|
@@ -117,9 +103,7 @@ export function portal(code, target, options = {}) {
|
|
|
117
103
|
}
|
|
118
104
|
};
|
|
119
105
|
}
|
|
120
|
-
// ============================================================================
|
|
121
106
|
// UTILITIES
|
|
122
|
-
// ============================================================================
|
|
123
107
|
/**
|
|
124
108
|
* Check if a value can be rendered
|
|
125
109
|
*/
|
|
@@ -130,8 +114,6 @@ export function isRenderable(value) {
|
|
|
130
114
|
return true;
|
|
131
115
|
if (isDOMNode(value))
|
|
132
116
|
return true;
|
|
133
|
-
if (isLitTemplateResult(value))
|
|
134
|
-
return true;
|
|
135
117
|
if (Array.isArray(value))
|
|
136
118
|
return true;
|
|
137
119
|
if (typeof value === 'string' ||
|
|
@@ -167,14 +149,12 @@ export function cleanupDelegation() {
|
|
|
167
149
|
return;
|
|
168
150
|
// Clear delegated events manually if needed
|
|
169
151
|
}
|
|
170
|
-
// ============================================================================
|
|
171
152
|
// EXPORTS
|
|
172
|
-
// ============================================================================
|
|
173
153
|
// Re-export component creation
|
|
174
154
|
export { createComponent, onMount, onUnmount, useEffect, useRef, useReducer, useMemo, useEventListener, useCallback, onCleanup, batch, createMemo, createEffect, getOwner, runWithOwner, isDev, devOnly, DEV, getSharedConfig, $component, } from './component.js';
|
|
175
155
|
export { Suspense, SuspenseList,
|
|
176
156
|
// type ShowProps,
|
|
177
|
-
isNode,
|
|
157
|
+
isNode, isPromise, isJSXElement, } from './suspense.js';
|
|
178
158
|
export { lazy } from "./lazy.js";
|
|
179
159
|
export { deferred } from "./deferred.js";
|
|
180
160
|
export { Await } from './await.js';
|
|
@@ -6,7 +6,7 @@ import { createRoot as createRoot2 } from "@fluixi/reactive/signal";
|
|
|
6
6
|
import { registerCoreVersion } from "@fluixi/dom";
|
|
7
7
|
|
|
8
8
|
// src/version.generated.ts
|
|
9
|
-
var VERSION = "1.0.0-alpha.
|
|
9
|
+
var VERSION = "1.0.0-alpha.102";
|
|
10
10
|
|
|
11
11
|
// src/lib/render/versions.ts
|
|
12
12
|
import { stampVersions, warnOnVersionSkew, versions } from "@fluixi/dom";
|
|
@@ -220,10 +220,6 @@ function isNode(value) {
|
|
|
220
220
|
if (typeof Node === "function" && value instanceof Node) return true;
|
|
221
221
|
return !!(value && typeof value === "object" && typeof value.nodeType === "number");
|
|
222
222
|
}
|
|
223
|
-
function isLitResult(value) {
|
|
224
|
-
if (!value || typeof value !== "object") return false;
|
|
225
|
-
return !!(typeof value["_$litType$"] !== "undefined" || typeof value["_$litDirective$"] !== "undefined" || Array.isArray(value.strings) && Array.isArray(value.values));
|
|
226
|
-
}
|
|
227
223
|
function isPromise(value) {
|
|
228
224
|
return !!(value && typeof value === "object" && typeof value.then === "function" || value instanceof Promise);
|
|
229
225
|
}
|
|
@@ -519,9 +515,6 @@ function render(code, container, options = {}) {
|
|
|
519
515
|
}
|
|
520
516
|
};
|
|
521
517
|
}
|
|
522
|
-
function isLitTemplateResult(value) {
|
|
523
|
-
return value && typeof value === "object" && (value["_$litType$"] !== void 0 || value["_$litDirective$"] !== void 0);
|
|
524
|
-
}
|
|
525
518
|
function portal(code, target, options = {}) {
|
|
526
519
|
const container = document.createElement("div");
|
|
527
520
|
container.setAttribute("data-portal", "true");
|
|
@@ -538,7 +531,6 @@ function isRenderable(value) {
|
|
|
538
531
|
if (value == null) return true;
|
|
539
532
|
if (typeof value === "function") return true;
|
|
540
533
|
if (isDOMNode(value)) return true;
|
|
541
|
-
if (isLitTemplateResult(value)) return true;
|
|
542
534
|
if (Array.isArray(value)) return true;
|
|
543
535
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
544
536
|
return true;
|
|
@@ -570,7 +562,6 @@ export {
|
|
|
570
562
|
initDelegation,
|
|
571
563
|
isDev,
|
|
572
564
|
isJSXElement,
|
|
573
|
-
isLitResult,
|
|
574
565
|
isNode,
|
|
575
566
|
isPromise,
|
|
576
567
|
isRenderable,
|
|
@@ -24,7 +24,6 @@ __export(suspense_exports, {
|
|
|
24
24
|
Suspense: () => Suspense,
|
|
25
25
|
SuspenseList: () => SuspenseList,
|
|
26
26
|
isJSXElement: () => isJSXElement,
|
|
27
|
-
isLitResult: () => isLitResult,
|
|
28
27
|
isNode: () => isNode,
|
|
29
28
|
isPromise: () => isPromise
|
|
30
29
|
});
|
|
@@ -37,10 +36,6 @@ function isNode(value) {
|
|
|
37
36
|
if (typeof Node === "function" && value instanceof Node) return true;
|
|
38
37
|
return !!(value && typeof value === "object" && typeof value.nodeType === "number");
|
|
39
38
|
}
|
|
40
|
-
function isLitResult(value) {
|
|
41
|
-
if (!value || typeof value !== "object") return false;
|
|
42
|
-
return !!(typeof value["_$litType$"] !== "undefined" || typeof value["_$litDirective$"] !== "undefined" || Array.isArray(value.strings) && Array.isArray(value.values));
|
|
43
|
-
}
|
|
44
39
|
function isPromise(value) {
|
|
45
40
|
return !!(value && typeof value === "object" && typeof value.then === "function" || value instanceof Promise);
|
|
46
41
|
}
|
|
@@ -16,7 +16,6 @@ export interface SuspenseListProps {
|
|
|
16
16
|
}
|
|
17
17
|
export declare const $SUSPENSE: unique symbol;
|
|
18
18
|
declare function isNode(value: any): value is Node;
|
|
19
|
-
declare function isLitResult(value: any): boolean;
|
|
20
19
|
declare function isPromise<T = any>(value: any): value is Promise<T>;
|
|
21
20
|
declare function isJSXElement(value: any): boolean;
|
|
22
21
|
/**
|
|
@@ -61,5 +60,5 @@ export declare function Suspense(props: SuspenseProps): any;
|
|
|
61
60
|
* ```
|
|
62
61
|
*/
|
|
63
62
|
export declare function SuspenseList(props: SuspenseListProps): any;
|
|
64
|
-
export { isNode,
|
|
63
|
+
export { isNode, isPromise, isJSXElement };
|
|
65
64
|
//# sourceMappingURL=suspense.d.ts.map
|