@tachui/core 0.8.0-alpha → 0.8.5-alpha
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 +58 -2
- package/dist/assets/AssetCollection.d.ts.map +1 -1
- package/dist/assets/ColorAsset.d.ts.map +1 -1
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js +486 -0
- package/dist/assets/types.d.ts +8 -68
- package/dist/assets/types.d.ts.map +1 -1
- package/dist/binding-CYpEQquE.js +308 -0
- package/dist/build-plugins/index.d.ts +3 -0
- package/dist/build-plugins/index.d.ts.map +1 -0
- package/dist/build-plugins/modifier-types.d.ts +12 -0
- package/dist/build-plugins/modifier-types.d.ts.map +1 -0
- package/dist/build-tools/typegen-runner.d.ts +29 -0
- package/dist/build-tools/typegen-runner.d.ts.map +1 -0
- package/dist/bundles/assets.d.ts +19 -0
- package/dist/bundles/assets.d.ts.map +1 -0
- package/dist/bundles/context.d.ts +22 -0
- package/dist/bundles/context.d.ts.map +1 -0
- package/dist/bundles/minimal.d.ts +8 -2
- package/dist/bundles/minimal.d.ts.map +1 -1
- package/dist/common.js +427 -393
- package/dist/compiler/codegen.d.ts.map +1 -1
- package/dist/compiler/index.js +6 -1393
- package/dist/compiler/parser.d.ts +1 -1
- package/dist/compiler/parser.d.ts.map +1 -1
- package/dist/compiler/plugin.d.ts.map +1 -1
- package/dist/compiler/types.d.ts +28 -0
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/{component-XAzF1xqs.js → component-CECyfUOE.js} +80 -68
- package/dist/{component-base-x2XmHFjy.js → component-base-CJ__jTlr.js} +9 -7
- package/dist/component-context-B6qX_Qsg.js +176 -0
- package/dist/components/factory.d.ts +24 -0
- package/dist/components/factory.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +8 -6
- package/dist/components/wrapper.d.ts +70 -30
- package/dist/components/wrapper.d.ts.map +1 -1
- package/dist/concatenated-component-_tF1eMvy.js +2288 -0
- package/dist/concatenation/concatenated-component.d.ts +16 -2
- package/dist/concatenation/concatenated-component.d.ts.map +1 -1
- package/dist/concatenation/text-optimizer.d.ts.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/constants/layout.d.ts +2 -9
- package/dist/constants/layout.d.ts.map +1 -1
- package/dist/css-classes/index.js +15 -173
- package/dist/{effect-B9Knft0b.js → effect-DGmdACI2.js} +3 -3
- package/dist/enhanced-renderer-Bwqsh8Ku.js +172 -0
- package/dist/essential.js +425 -391
- package/dist/{index-DIvMCJQO.js → factories-Co2Lv2kJ.js} +13 -13
- package/dist/factory-D7jAY5Kn.js +485 -0
- package/dist/gradients/css-generator.js +99 -0
- package/dist/gradients/index.js +56 -0
- package/dist/gradients/reactive.d.ts.map +1 -1
- package/dist/gradients/types.d.ts +3 -91
- package/dist/gradients/types.d.ts.map +1 -1
- package/dist/hooks-DeLasj54.js +446 -0
- package/dist/index-JQ1sW1SK.js +2049 -0
- package/dist/index-X8MVY78C.js +618 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +426 -392
- package/dist/minimal-prod.js +94 -93
- package/dist/minimal.js +126 -106
- package/dist/modifiers/alignment.d.ts +5 -0
- package/dist/modifiers/alignment.d.ts.map +1 -0
- package/dist/modifiers/base.d.ts +6 -7
- package/dist/modifiers/base.d.ts.map +1 -1
- package/dist/modifiers/base.js +24 -16
- package/dist/modifiers/builder.d.ts +28 -165
- package/dist/modifiers/builder.d.ts.map +1 -1
- package/dist/modifiers/builder.js +7 -7
- package/dist/modifiers/core.d.ts +0 -1
- package/dist/modifiers/core.d.ts.map +1 -1
- package/dist/modifiers/corner-radius.d.ts +8 -0
- package/dist/modifiers/corner-radius.d.ts.map +1 -0
- package/dist/modifiers/index.d.ts +9 -6
- package/dist/modifiers/index.d.ts.map +1 -1
- package/dist/modifiers/index.js +36 -30
- package/dist/modifiers/layout-priority.d.ts +8 -0
- package/dist/modifiers/layout-priority.d.ts.map +1 -0
- package/dist/modifiers/opacity.d.ts +8 -0
- package/dist/modifiers/opacity.d.ts.map +1 -0
- package/dist/modifiers/presets.d.ts.map +1 -1
- package/dist/modifiers/proxy.d.ts +4 -0
- package/dist/modifiers/proxy.d.ts.map +1 -0
- package/dist/modifiers/registration-utils.d.ts +7 -0
- package/dist/modifiers/registration-utils.d.ts.map +1 -0
- package/dist/modifiers/registry.d.ts +18 -9
- package/dist/modifiers/registry.d.ts.map +1 -1
- package/dist/modifiers/registry.js +2 -2
- package/dist/modifiers/type-generator.d.ts +82 -0
- package/dist/modifiers/type-generator.d.ts.map +1 -0
- package/dist/modifiers/types.d.ts +2 -479
- package/dist/modifiers/types.d.ts.map +1 -1
- package/dist/modifiers/types.js +1 -4
- package/dist/observed-object-DepiqSgg.js +269 -0
- package/dist/optimization-CbKNA9w4.js +21 -0
- package/dist/plugin-BCAdZXKq.js +1680 -0
- package/dist/plugins/index.js +28 -8
- package/dist/plugins/simplified-lazy-loader.d.ts.map +1 -1
- package/dist/presets-B9x94uRn.js +381 -0
- package/dist/proxy-Cqmbiyx0.js +175 -0
- package/dist/reactive/cleanup.d.ts.map +1 -1
- package/dist/reactive/computed.d.ts +1 -1
- package/dist/reactive/computed.d.ts.map +1 -1
- package/dist/reactive/context.d.ts +4 -3
- package/dist/reactive/context.d.ts.map +1 -1
- package/dist/reactive/index.d.ts +1 -0
- package/dist/reactive/index.d.ts.map +1 -1
- package/dist/reactive/index.js +84 -490
- package/dist/reactive/signal-list.d.ts +100 -0
- package/dist/reactive/signal-list.d.ts.map +1 -0
- package/dist/reactive/signal.d.ts.map +1 -1
- package/dist/reactive/types.d.ts +2 -89
- package/dist/reactive/types.d.ts.map +1 -1
- package/dist/reactive/types.js +1 -4
- package/dist/registration-utils-CNsN4eoU.js +27 -0
- package/dist/runtime/component.d.ts.map +1 -1
- package/dist/runtime/concatenation-aria.d.ts +24 -0
- package/dist/runtime/concatenation-aria.d.ts.map +1 -0
- package/dist/runtime/concatenation-aria.js +58 -0
- package/dist/runtime/concatenation-full.d.ts +30 -0
- package/dist/runtime/concatenation-full.d.ts.map +1 -0
- package/dist/runtime/concatenation-full.js +85 -0
- package/dist/runtime/concatenation-minimal.d.ts +25 -0
- package/dist/runtime/concatenation-minimal.d.ts.map +1 -0
- package/dist/runtime/concatenation-minimal.js +45 -0
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/dom-bridge.d.ts +1 -1
- package/dist/runtime/dom-bridge.d.ts.map +1 -1
- package/dist/runtime/dom-bridge.js +239 -12
- package/dist/runtime/event-delegation.d.ts +59 -0
- package/dist/runtime/event-delegation.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +3 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +96 -0
- package/dist/runtime/layout-scheduler.d.ts +89 -0
- package/dist/runtime/layout-scheduler.d.ts.map +1 -0
- package/dist/runtime/props.d.ts.map +1 -1
- package/dist/runtime/renderer.d.ts +54 -2
- package/dist/runtime/renderer.d.ts.map +1 -1
- package/dist/runtime/renderer.js +11 -7
- package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +2 -226
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime/types.js +1 -1
- package/dist/scheduler-DI_8ykMk.js +169 -0
- package/dist/signal-list-BdpxSodS.js +525 -0
- package/dist/state/index.js +319 -0
- package/dist/theme-BFaKUcjZ.js +677 -0
- package/dist/utils/clone-helpers.d.ts +11 -0
- package/dist/utils/clone-helpers.d.ts.map +1 -0
- package/dist/validation/index.js +28 -26
- package/dist/version.d.ts +19 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +6 -0
- package/package.json +69 -9
- package/dist/concatenated-component-ByPl3_FF.js +0 -2933
- package/dist/dom-bridge-CAa1N2zX.js +0 -406
- package/dist/index-DCPJFUm9.js +0 -1407
- package/dist/index-vdsiw6gQ.js +0 -777
- package/dist/modifiers/as-html-validator.d.ts +0 -20
- package/dist/modifiers/as-html-validator.d.ts.map +0 -1
- package/dist/modifiers/as-html.d.ts +0 -65
- package/dist/modifiers/as-html.d.ts.map +0 -1
- package/dist/modifiers/background.d.ts +0 -51
- package/dist/modifiers/background.d.ts.map +0 -1
- package/dist/modifiers/basic-sanitizer.d.ts +0 -54
- package/dist/modifiers/basic-sanitizer.d.ts.map +0 -1
- package/dist/modifiers/css.d.ts +0 -86
- package/dist/modifiers/css.d.ts.map +0 -1
- package/dist/production-minimal-BY_gMc-l.js +0 -2532
- package/dist/scheduler-BKeqwrYE.js +0 -814
package/dist/runtime/renderer.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { D as
|
|
2
|
-
import "../scheduler-
|
|
3
|
-
import "../
|
|
1
|
+
import { D as m, g as n, h as p, r as a, f as d, t as M } from "../concatenated-component-_tF1eMvy.js";
|
|
2
|
+
import "../scheduler-DI_8ykMk.js";
|
|
3
|
+
import "../theme-BFaKUcjZ.js";
|
|
4
|
+
import "../effect-DGmdACI2.js";
|
|
5
|
+
import "@tachui/types/reactive";
|
|
4
6
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
m as DOMRenderer,
|
|
8
|
+
n as getRendererMetrics,
|
|
9
|
+
p as h,
|
|
10
|
+
a as renderComponent,
|
|
11
|
+
d as resetRendererMetrics,
|
|
12
|
+
M as text
|
|
9
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-role-manager.d.ts","sourceRoot":"","sources":["../../src/runtime/semantic-role-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAG3B,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAqB;IAE5C,MAAM,CAAC,WAAW,IAAI,mBAAmB;IAOzC;;OAEG;IACH,uBAAuB,CACrB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI;
|
|
1
|
+
{"version":3,"file":"semantic-role-manager.d.ts","sourceRoot":"","sources":["../../src/runtime/semantic-role-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAG3B,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAqB;IAE5C,MAAM,CAAC,WAAW,IAAI,mBAAmB;IAOzC;;OAEG;IACH,uBAAuB,CACrB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI;IAgDP;;OAEG;IACH,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAI1D;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKjC;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE;IAM3B;;;OAGG;IACH,kBAAkB,CAChB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,iBAAiB,CAAC,EAAE,GAAG,EACvB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI;CAoBR;AAGD,eAAO,MAAM,mBAAmB,qBAAoC,CAAA;AAGpE,eAAO,MAAM,uBAAuB,GAClC,SAAS,WAAW,EACpB,KAAK,MAAM,EACX,eAAe,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SACqC,CAAA;AAE5E,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,iCACD,CAAA;AAC1C,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,YAAyC,CAAA"}
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -1,230 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runtime System Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* Core types for the TachUI runtime system including component
|
|
5
|
-
* lifecycle, DOM manipulation, and performance monitoring.
|
|
3
|
+
* Re-exported from @tachui/types for backward compatibility
|
|
6
4
|
*/
|
|
7
|
-
|
|
8
|
-
* Core component definition
|
|
9
|
-
*/
|
|
10
|
-
export interface Component<P = {}> {
|
|
11
|
-
(props: P): ComponentInstance;
|
|
12
|
-
displayName?: string;
|
|
13
|
-
defaultProps?: Partial<P>;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Component props with children support
|
|
17
|
-
*/
|
|
18
|
-
export interface ComponentProps {
|
|
19
|
-
children?: ComponentChildren;
|
|
20
|
-
key?: string | number;
|
|
21
|
-
ref?: ComponentRef;
|
|
22
|
-
debugLabel?: string;
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Strict component props for type safety
|
|
27
|
-
*/
|
|
28
|
-
export interface StrictComponentProps {
|
|
29
|
-
children?: ComponentChildren;
|
|
30
|
-
key?: string | number;
|
|
31
|
-
ref?: ComponentRef;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Props validation function
|
|
35
|
-
*/
|
|
36
|
-
export type PropsValidator<P> = (props: P) => boolean | string;
|
|
37
|
-
/**
|
|
38
|
-
* Props with validation
|
|
39
|
-
*/
|
|
40
|
-
export interface ValidatedProps<P extends ComponentProps> {
|
|
41
|
-
validator?: PropsValidator<P>;
|
|
42
|
-
required?: (keyof P)[];
|
|
43
|
-
defaults?: Partial<P> | undefined;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Supported children types
|
|
47
|
-
*/
|
|
48
|
-
export type ComponentChildren = string | number | boolean | ComponentInstance | ComponentChildren[] | RenderFunction | null | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* Children render function
|
|
51
|
-
*/
|
|
52
|
-
export type ChildrenRenderer = (children: ComponentChildren) => DOMNode[];
|
|
53
|
-
/**
|
|
54
|
-
* Fragment component for multiple children
|
|
55
|
-
*/
|
|
56
|
-
export interface Fragment {
|
|
57
|
-
children: ComponentChildren[];
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Component instance returned by component functions
|
|
61
|
-
*/
|
|
62
|
-
export interface ComponentInstance<P extends ComponentProps = ComponentProps> {
|
|
63
|
-
type: 'component';
|
|
64
|
-
render: RenderFunction;
|
|
65
|
-
props: P;
|
|
66
|
-
prevProps?: P;
|
|
67
|
-
children?: ComponentChildren;
|
|
68
|
-
context?: ComponentContext;
|
|
69
|
-
cleanup?: LifecycleCleanup[];
|
|
70
|
-
id: string;
|
|
71
|
-
ref?: Ref | undefined;
|
|
72
|
-
mounted?: boolean;
|
|
73
|
-
domElements?: Map<string, Element>;
|
|
74
|
-
primaryElement?: Element;
|
|
75
|
-
domReady?: boolean;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Render function that creates DOM nodes
|
|
79
|
-
*/
|
|
80
|
-
export type RenderFunction = () => DOMNode | DOMNode[];
|
|
81
|
-
/**
|
|
82
|
-
* DOM node representation
|
|
83
|
-
*/
|
|
84
|
-
export interface DOMNode {
|
|
85
|
-
type: 'element' | 'text' | 'comment';
|
|
86
|
-
tag?: string;
|
|
87
|
-
props?: Record<string, any>;
|
|
88
|
-
children?: DOMNode[];
|
|
89
|
-
text?: string;
|
|
90
|
-
element?: Element | Text | Comment | undefined;
|
|
91
|
-
dispose?: (() => void) | undefined;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Component context for dependency injection
|
|
95
|
-
*/
|
|
96
|
-
export interface ComponentContext {
|
|
97
|
-
id: string;
|
|
98
|
-
parent?: ComponentContext;
|
|
99
|
-
providers: Map<symbol, any>;
|
|
100
|
-
consumers: Set<symbol>;
|
|
101
|
-
cleanup: Set<() => void>;
|
|
102
|
-
setState(propertyName: string, value: any): void;
|
|
103
|
-
getState(propertyName: string): any;
|
|
104
|
-
hasState(propertyName: string): boolean;
|
|
105
|
-
setBinding(propertyName: string, binding: any): void;
|
|
106
|
-
getBinding(propertyName: string): any;
|
|
107
|
-
provide<T>(symbol: symbol, value: T): void;
|
|
108
|
-
consume<T>(symbol: symbol): T | undefined;
|
|
109
|
-
onCleanup(fn: () => void): void;
|
|
110
|
-
dispose(): void;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Component lifecycle hooks
|
|
114
|
-
*/
|
|
115
|
-
export interface LifecycleHooks<P extends ComponentProps = ComponentProps> {
|
|
116
|
-
onMount?: () => undefined | (() => void);
|
|
117
|
-
onUpdate?: (prevProps: P, nextProps: P) => void;
|
|
118
|
-
onPropsChange?: (prevProps: P, nextProps: P, changedKeys: (keyof P)[]) => void;
|
|
119
|
-
onChildrenChange?: (prevChildren: ComponentChildren, nextChildren: ComponentChildren) => void;
|
|
120
|
-
onUnmount?: () => void;
|
|
121
|
-
onError?: (error: Error) => void;
|
|
122
|
-
shouldUpdate?: (prevProps: P, nextProps: P) => boolean;
|
|
123
|
-
onRender?: () => void;
|
|
124
|
-
onDOMReady?: (elements: Map<string, Element>, primary?: Element) => void | (() => void);
|
|
125
|
-
onDOMError?: (error: DOMError, context: string) => void;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* DOM Error type for enhanced error handling
|
|
129
|
-
*/
|
|
130
|
-
export interface DOMError extends Error {
|
|
131
|
-
code?: string;
|
|
132
|
-
element?: Element;
|
|
133
|
-
context?: string;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Cleanup function type
|
|
137
|
-
*/
|
|
138
|
-
export type LifecycleCleanup = () => void;
|
|
139
|
-
/**
|
|
140
|
-
* Component reference
|
|
141
|
-
*/
|
|
142
|
-
export interface ComponentRef<T = any> {
|
|
143
|
-
current: T | null;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Ref callback function
|
|
147
|
-
*/
|
|
148
|
-
export type RefCallback<T = any> = (ref: T | null) => void;
|
|
149
|
-
/**
|
|
150
|
-
* Ref types union
|
|
151
|
-
*/
|
|
152
|
-
export type Ref<T = any> = ComponentRef<T> | RefCallback<T> | null;
|
|
153
|
-
/**
|
|
154
|
-
* Performance metrics
|
|
155
|
-
*/
|
|
156
|
-
export interface PerformanceMetrics {
|
|
157
|
-
componentId: string;
|
|
158
|
-
mountTime: number;
|
|
159
|
-
renderTime: number;
|
|
160
|
-
updateCount: number;
|
|
161
|
-
lastUpdate: number;
|
|
162
|
-
memoryUsage: number;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Context provider value
|
|
166
|
-
*/
|
|
167
|
-
export interface ContextProvider<T> {
|
|
168
|
-
symbol: symbol;
|
|
169
|
-
value: T;
|
|
170
|
-
subscribers: Set<ComponentContext>;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Dependency injection service registration
|
|
174
|
-
*/
|
|
175
|
-
export interface ServiceRegistration<T = any> {
|
|
176
|
-
key: symbol | string;
|
|
177
|
-
implementation: T | (() => T);
|
|
178
|
-
singleton?: boolean;
|
|
179
|
-
scoped?: boolean;
|
|
180
|
-
dependencies?: (symbol | string)[];
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* DI container interface
|
|
184
|
-
*/
|
|
185
|
-
export interface IDIContainer {
|
|
186
|
-
register<T>(key: symbol | string, implementation: T | (() => T), options?: {
|
|
187
|
-
singleton?: boolean;
|
|
188
|
-
scoped?: boolean;
|
|
189
|
-
dependencies?: (symbol | string)[];
|
|
190
|
-
}): void;
|
|
191
|
-
resolve<T>(key: symbol | string): T;
|
|
192
|
-
has(key: symbol | string): boolean;
|
|
193
|
-
clear(): void;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Context subscription info
|
|
197
|
-
*/
|
|
198
|
-
export interface ContextSubscription {
|
|
199
|
-
contextSymbol: symbol;
|
|
200
|
-
componentId: string;
|
|
201
|
-
unsubscribe: () => void;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Mount options
|
|
205
|
-
*/
|
|
206
|
-
export interface MountOptions {
|
|
207
|
-
container: Element;
|
|
208
|
-
hydrate?: boolean;
|
|
209
|
-
onError?: (error: Error) => void;
|
|
210
|
-
enablePerformanceTracking?: boolean;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Update options
|
|
214
|
-
*/
|
|
215
|
-
export interface UpdateOptions {
|
|
216
|
-
force?: boolean;
|
|
217
|
-
suppressEffects?: boolean;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Component tree node for development tools
|
|
221
|
-
*/
|
|
222
|
-
export interface ComponentTreeNode {
|
|
223
|
-
id: string;
|
|
224
|
-
name: string;
|
|
225
|
-
props: ComponentProps;
|
|
226
|
-
children: ComponentTreeNode[];
|
|
227
|
-
metrics: PerformanceMetrics;
|
|
228
|
-
context: string[];
|
|
229
|
-
}
|
|
5
|
+
export * from '@tachui/types/runtime';
|
|
230
6
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/runtime/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/runtime/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,uBAAuB,CAAA"}
|
package/dist/runtime/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "@tachui/types/runtime";
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { l as a } from "./theme-BFaKUcjZ.js";
|
|
2
|
+
function o(e) {
|
|
3
|
+
const s = a();
|
|
4
|
+
s && !s.disposed ? s.cleanups.push(e) : __DEV__ && console.warn("onCleanup called outside of reactive context");
|
|
5
|
+
}
|
|
6
|
+
function S(e) {
|
|
7
|
+
"dispose" in e && typeof e.dispose == "function" && e.dispose();
|
|
8
|
+
}
|
|
9
|
+
function m(e) {
|
|
10
|
+
const [s, t] = e();
|
|
11
|
+
return o(t), s;
|
|
12
|
+
}
|
|
13
|
+
function q() {
|
|
14
|
+
const e = [];
|
|
15
|
+
let s = !1;
|
|
16
|
+
return {
|
|
17
|
+
add(t) {
|
|
18
|
+
if (s) {
|
|
19
|
+
__DEV__ && console.warn("Adding cleanup to disposed group");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
e.push(t);
|
|
23
|
+
},
|
|
24
|
+
dispose() {
|
|
25
|
+
if (!s) {
|
|
26
|
+
s = !0;
|
|
27
|
+
for (const t of e)
|
|
28
|
+
try {
|
|
29
|
+
t();
|
|
30
|
+
} catch (u) {
|
|
31
|
+
console.error("Error in cleanup function:", u);
|
|
32
|
+
}
|
|
33
|
+
e.length = 0;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
get disposed() {
|
|
37
|
+
return s;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function v(e, s) {
|
|
42
|
+
const t = setTimeout(e, s);
|
|
43
|
+
return o(() => clearTimeout(t)), t;
|
|
44
|
+
}
|
|
45
|
+
function E(e, s) {
|
|
46
|
+
const t = setInterval(e, s);
|
|
47
|
+
return o(() => clearInterval(t)), t;
|
|
48
|
+
}
|
|
49
|
+
function b(e, s, t, u) {
|
|
50
|
+
e.addEventListener(s, t, u), o(() => e.removeEventListener(s, t, u));
|
|
51
|
+
}
|
|
52
|
+
typeof globalThis.__DEV__ > "u" && (globalThis.__DEV__ = process.env.NODE_ENV !== "production");
|
|
53
|
+
var h = Object.defineProperty, f = (e, s, t) => s in e ? h(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t, i = (e, s, t) => f(e, typeof s != "symbol" ? s + "" : s, t);
|
|
54
|
+
class l {
|
|
55
|
+
constructor() {
|
|
56
|
+
i(this, "pending", /* @__PURE__ */ new Set()), i(this, "isFlushScheduled", !1);
|
|
57
|
+
}
|
|
58
|
+
schedule(s) {
|
|
59
|
+
this.pending.add(s), this.isFlushScheduled || (this.isFlushScheduled = !0, queueMicrotask(() => this.flush()));
|
|
60
|
+
}
|
|
61
|
+
flush() {
|
|
62
|
+
if (this.pending.size === 0) {
|
|
63
|
+
this.isFlushScheduled = !1;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const s = Array.from(this.pending);
|
|
67
|
+
this.pending.clear(), this.isFlushScheduled = !1;
|
|
68
|
+
for (const t of s)
|
|
69
|
+
try {
|
|
70
|
+
t();
|
|
71
|
+
} catch (u) {
|
|
72
|
+
console.error("Error in scheduled task:", u);
|
|
73
|
+
}
|
|
74
|
+
this.pending.size > 0 && (this.isFlushScheduled = !0, queueMicrotask(() => this.flush()));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
class p {
|
|
78
|
+
schedule(s) {
|
|
79
|
+
try {
|
|
80
|
+
s();
|
|
81
|
+
} catch (t) {
|
|
82
|
+
console.error("Error in sync scheduled task:", t);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
flush() {
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
var d = /* @__PURE__ */ ((e) => (e[e.Immediate = 0] = "Immediate", e[e.High = 1] = "High", e[e.Normal = 2] = "Normal", e[e.Low = 3] = "Low", e[e.Idle = 4] = "Idle", e))(d || {});
|
|
89
|
+
class _ {
|
|
90
|
+
constructor() {
|
|
91
|
+
i(this, "queues", /* @__PURE__ */ new Map()), i(this, "taskIdCounter", 0), i(this, "isFlushScheduled", !1);
|
|
92
|
+
for (const s of Object.values(d))
|
|
93
|
+
typeof s == "number" && this.queues.set(s, /* @__PURE__ */ new Set());
|
|
94
|
+
}
|
|
95
|
+
schedule(s, t = 2) {
|
|
96
|
+
const u = {
|
|
97
|
+
fn: s,
|
|
98
|
+
priority: t,
|
|
99
|
+
id: ++this.taskIdCounter
|
|
100
|
+
}, n = this.queues.get(t);
|
|
101
|
+
n && n.add(u), this.isFlushScheduled || (this.isFlushScheduled = !0, t === 0 ? this.flush() : queueMicrotask(() => this.flush()));
|
|
102
|
+
}
|
|
103
|
+
flush() {
|
|
104
|
+
this.isFlushScheduled = !1;
|
|
105
|
+
for (const s of [
|
|
106
|
+
0,
|
|
107
|
+
1,
|
|
108
|
+
2,
|
|
109
|
+
3,
|
|
110
|
+
4
|
|
111
|
+
/* Idle */
|
|
112
|
+
]) {
|
|
113
|
+
const t = this.queues.get(s);
|
|
114
|
+
if (!t || t.size === 0) continue;
|
|
115
|
+
const u = Array.from(t).sort((n, c) => n.id - c.id);
|
|
116
|
+
t.clear();
|
|
117
|
+
for (const n of u)
|
|
118
|
+
try {
|
|
119
|
+
n.fn();
|
|
120
|
+
} catch (c) {
|
|
121
|
+
console.error(`Error in priority ${s} task:`, c);
|
|
122
|
+
}
|
|
123
|
+
if (t.size === 0 && this.hasMoreTasks()) {
|
|
124
|
+
queueMicrotask(() => this.flush());
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
hasMoreTasks() {
|
|
130
|
+
for (const s of this.queues.values())
|
|
131
|
+
if (s.size > 0) return !0;
|
|
132
|
+
return !1;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
let r = new l();
|
|
136
|
+
function I() {
|
|
137
|
+
return r;
|
|
138
|
+
}
|
|
139
|
+
function w(e) {
|
|
140
|
+
r = e;
|
|
141
|
+
}
|
|
142
|
+
function F(e = !0) {
|
|
143
|
+
e ? r = new l() : r = new p();
|
|
144
|
+
}
|
|
145
|
+
function C(e) {
|
|
146
|
+
r.schedule(e);
|
|
147
|
+
}
|
|
148
|
+
function M(e, s) {
|
|
149
|
+
r instanceof _ ? r.schedule(e, s) : r.schedule(e);
|
|
150
|
+
}
|
|
151
|
+
function k(e) {
|
|
152
|
+
typeof requestIdleCallback < "u" ? requestIdleCallback(e) : setTimeout(e, 0);
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
d as T,
|
|
156
|
+
b as a,
|
|
157
|
+
E as b,
|
|
158
|
+
q as c,
|
|
159
|
+
S as d,
|
|
160
|
+
m as e,
|
|
161
|
+
v as f,
|
|
162
|
+
F as g,
|
|
163
|
+
I as h,
|
|
164
|
+
C as i,
|
|
165
|
+
M as j,
|
|
166
|
+
w as k,
|
|
167
|
+
o,
|
|
168
|
+
k as s
|
|
169
|
+
};
|