juxscript 1.0.88 → 1.0.90

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.
Files changed (89) hide show
  1. package/bin/cli.js +243 -92
  2. package/index.js +21 -0
  3. package/lib/componentsv2/base/BaseEngine.d.ts +10 -0
  4. package/lib/componentsv2/base/BaseEngine.d.ts.map +1 -1
  5. package/lib/componentsv2/base/BaseEngine.js +28 -7
  6. package/lib/componentsv2/base/BaseEngine.js.map +1 -1
  7. package/lib/componentsv2/base/BaseEngine.ts +29 -0
  8. package/lib/componentsv2/base/OptionsContract.d.ts +20 -0
  9. package/lib/componentsv2/base/OptionsContract.d.ts.map +1 -0
  10. package/lib/componentsv2/base/OptionsContract.js +107 -0
  11. package/lib/componentsv2/base/OptionsContract.js.map +1 -0
  12. package/lib/componentsv2/base/OptionsContract.ts +139 -0
  13. package/lib/componentsv2/element/component.d.ts +22 -0
  14. package/lib/componentsv2/element/component.d.ts.map +1 -1
  15. package/lib/componentsv2/element/component.js +22 -0
  16. package/lib/componentsv2/element/component.js.map +1 -1
  17. package/lib/componentsv2/element/component.ts +23 -1
  18. package/lib/componentsv2/element/engine.d.ts +31 -14
  19. package/lib/componentsv2/element/engine.d.ts.map +1 -1
  20. package/lib/componentsv2/element/engine.js +74 -23
  21. package/lib/componentsv2/element/engine.js.map +1 -1
  22. package/lib/componentsv2/element/engine.ts +86 -29
  23. package/lib/componentsv2/element/skin.d.ts.map +1 -1
  24. package/lib/componentsv2/element/skin.js +7 -10
  25. package/lib/componentsv2/element/skin.js.map +1 -1
  26. package/lib/componentsv2/element/skin.ts +7 -11
  27. package/lib/componentsv2/grid/engine.d.ts +48 -3
  28. package/lib/componentsv2/grid/engine.d.ts.map +1 -1
  29. package/lib/componentsv2/grid/engine.js +109 -14
  30. package/lib/componentsv2/grid/engine.js.map +1 -1
  31. package/lib/componentsv2/grid/engine.ts +120 -16
  32. package/lib/componentsv2/input/engine.d.ts +48 -5
  33. package/lib/componentsv2/input/engine.d.ts.map +1 -1
  34. package/lib/componentsv2/input/engine.js +108 -15
  35. package/lib/componentsv2/input/engine.js.map +1 -1
  36. package/lib/componentsv2/input/engine.ts +119 -16
  37. package/lib/componentsv2/input/skin.d.ts.map +1 -1
  38. package/lib/componentsv2/input/skin.js +1 -4
  39. package/lib/componentsv2/input/skin.js.map +1 -1
  40. package/lib/componentsv2/input/skin.ts +1 -4
  41. package/lib/componentsv2/list/component.d.ts +28 -6
  42. package/lib/componentsv2/list/component.d.ts.map +1 -1
  43. package/lib/componentsv2/list/component.js +28 -6
  44. package/lib/componentsv2/list/component.js.map +1 -1
  45. package/lib/componentsv2/list/component.ts +28 -6
  46. package/lib/componentsv2/list/engine.d.ts +61 -9
  47. package/lib/componentsv2/list/engine.d.ts.map +1 -1
  48. package/lib/componentsv2/list/engine.js +156 -95
  49. package/lib/componentsv2/list/engine.js.map +1 -1
  50. package/lib/componentsv2/list/engine.ts +175 -108
  51. package/machinery/build3.js +21 -0
  52. package/machinery/compiler3.js +638 -0
  53. package/machinery/serve.js +255 -0
  54. package/machinery/watcher.js +53 -64
  55. package/package.json +11 -3
  56. package/lib/componentsv2/index.d.ts +0 -41
  57. package/lib/componentsv2/index.d.ts.map +0 -1
  58. package/lib/componentsv2/index.js +0 -223
  59. package/lib/componentsv2/index.js.map +0 -1
  60. package/lib/componentsv2/index.ts +0 -256
  61. package/lib/componentsv2/juxerror/component.d.ts +0 -28
  62. package/lib/componentsv2/juxerror/component.d.ts.map +0 -1
  63. package/lib/componentsv2/juxerror/component.js +0 -101
  64. package/lib/componentsv2/juxerror/component.js.map +0 -1
  65. package/lib/componentsv2/juxerror/component.ts +0 -125
  66. package/lib/componentsv2/juxerror/engine.d.ts +0 -35
  67. package/lib/componentsv2/juxerror/engine.d.ts.map +0 -1
  68. package/lib/componentsv2/juxerror/engine.js +0 -190
  69. package/lib/componentsv2/juxerror/engine.js.map +0 -1
  70. package/lib/componentsv2/juxerror/engine.ts +0 -241
  71. package/lib/componentsv2/juxerror/skin.d.ts +0 -11
  72. package/lib/componentsv2/juxerror/skin.d.ts.map +0 -1
  73. package/lib/componentsv2/juxerror/skin.js +0 -180
  74. package/lib/componentsv2/juxerror/skin.js.map +0 -1
  75. package/lib/componentsv2/juxerror/skin.ts +0 -200
  76. package/lib/componentsv2/juxerror/structure.css +0 -351
  77. package/machinery/ast.js +0 -347
  78. package/machinery/compiler.js +0 -706
  79. package/machinery/diagnose.js +0 -72
  80. package/machinery/doc-generator.js +0 -136
  81. package/machinery/imports.js +0 -155
  82. package/machinery/jux-module-pattern.md +0 -118
  83. package/machinery/server.js +0 -86
  84. package/machinery/ts-shim.js +0 -46
  85. package/machinery/verifier.js +0 -135
  86. package/tests/dropdown-test.js +0 -25
  87. package/tests/juxerrors/bad_syntax.jux +0 -8
  88. package/tests/juxerrors/ghost_dep.jux +0 -10
  89. package/tests/server_plugin_test.ts +0 -191
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC,CAAC,uBAAuB;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,sBAAsB;AACtB,OAAO,EAAE,IAAI,EAAE,IAAI,EA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AAC;AAC3B,CAAC;AAED,+BAA+B;AAC/B,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,QAAQ;IACR,OAAO;IACP,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE;QACL,kBAAkB;QAClB,kBAAkB;QAClB,eAAe;QACf,kBAAkB;KACrB;CACJ,CAAC"}
@@ -1,256 +0,0 @@
1
- import { GlobalBus } from './base/GlobalBus.js';
2
-
3
- import { ServerSQLitePlugin } from './plugins/ServerSQLitePlugin.js'; // The Real Server Deal
4
- import { LocalStoragePlugin } from './plugins/LocalStoragePlugin.js';
5
- import { IndexedDBPlugin } from './plugins/IndexedDBPlugin.js';
6
- import { ClientSQLitePlugin } from './plugins/ClientSQLitePlugin.js';
7
-
8
-
9
- import { List } from './list/component.js';
10
- import { Grid } from './grid/component.js';
11
- import { Input } from './input/component.js';
12
-
13
- import { Element } from './element/component.js';
14
-
15
- import { JuxError } from './juxerror/component.js';
16
-
17
- // Export individually
18
- export { List, Grid, Input, Element, JuxError };
19
-
20
- /**
21
- * Curated documentation for core framework capabilities.
22
- * These strings are appended to the reflection data in juxDef.tree.
23
- */
24
- const STATIC_DOCS: Record<string, string> = {
25
- // BaseEngine / Lifecycle
26
- 'rollback': 'Reverts state to previous Snapshot (Time Travel Undo).',
27
- 'rollforward': 'Redoes a previously rolled-back state change.',
28
- 'dispose': 'Cleans up global listeners to prevent memory leaks.',
29
- 'on': 'Subscribes to a local event on this component instance.',
30
- 'off': 'Unsubscribes from a local event.',
31
- 'listenTo': 'Subscribes to the Global "Neighborhood" Event Bus.',
32
- 'render': 'Mounts the component visual (Skin) to the DOM.',
33
- 'addPlugin': 'Injects external services/drivers (DI) into the engine.',
34
-
35
- // Plugin Mixins
36
- 'query': 'Executes a raw SQL query against the attached database driver (via SQLitePlugin).',
37
- 'sqlRun': 'Executes a write operation against Client-Side WASM SQLite.',
38
- 'sqlExec': 'Executes a read query against Client-Side WASM SQLite.',
39
-
40
- // List Config / Knobs
41
- 'knobs': 'Configures multiple UI features at once (add, edit, move, etc).',
42
- 'enableNoItems': 'Sets a custom message for empty states.',
43
- 'enableSearch': 'Shows a toolbar input for real-time text filtering.',
44
-
45
- // Data Mutation
46
- 'addItems': 'Bulk insert optimization (single render cycle).',
47
- 'addItem': 'Adds a single item object or string.',
48
- 'updateItem': 'Patches properties of an item at specific index.',
49
- 'removeItem': 'Deletes item at index.',
50
- 'moveItem': 'Reorders item from index A to B (Drag & Drop).',
51
-
52
- // Input Config
53
- 'setValue': 'Programmatically sets the input value.',
54
- 'setError': 'Displays validation error message below input.',
55
- 'setLabel': 'Updates the field label.'
56
- };
57
-
58
- export const tree = () => {
59
- // Internal access to engines (private to this scope/getter)
60
- const engines = (typeof window !== 'undefined' ? (window as any).juxEngines : {}) || {};
61
- const root: Record<string, any> = {};
62
-
63
- // Reflection Helper: Inspects function source to gather docs
64
- const inspectStart = (name: string, fn: Function): string => {
65
- try {
66
- const source = fn.toString();
67
-
68
- // 1. Signature / Params
69
- // Matches "methodName(a, b) {" or "(a, b) =>"
70
- let params = '';
71
- const paramMatch = source.match(/^[^(]*\(([^)]*)\)/);
72
- if (paramMatch) {
73
- // Start from arg list
74
- params = paramMatch[1].replace(/\s+/g, ' ').trim();
75
- }
76
-
77
- // 2. Returns this? (Heuristic)
78
- // Checks for "return this" or explicit arrow return of instance
79
- const returnsThis = /return\s+this/.test(source) || /=>\s*this/.test(source);
80
-
81
- // 3. Emissions (Heuristic)
82
- // Scans for this.emit('event-name', ...)
83
- const emissions = new Set<string>();
84
- const emitRegex = /this\.emit\(\s*['"]([^'"]+)['"]/g;
85
- let match;
86
- while ((match = emitRegex.exec(source)) !== null) {
87
- emissions.add(match[1]);
88
- }
89
-
90
- // Format Output
91
- let doc = `${name}(${params})`;
92
- const extras: string[] = [];
93
-
94
- if (returnsThis) extras.push('returns this');
95
- if (emissions.size > 0) extras.push(`emits: ${Array.from(emissions).join(', ')}`);
96
-
97
- if (extras.length > 0) {
98
- doc += ` -> ${extras.join(' | ')}`;
99
- }
100
-
101
- // 4. Append Static Docs if available
102
- if (STATIC_DOCS[name]) {
103
- doc += ` // ${STATIC_DOCS[name]}`;
104
- }
105
-
106
- return doc;
107
- } catch (e) {
108
- return `${name}(?)`;
109
- }
110
- };
111
-
112
- Object.keys(engines).forEach(id => {
113
- const engine = engines[id];
114
-
115
- // Collect all discoverable methods (Instance + Inherited)
116
- const capabilities: string[] = [];
117
- const processed = new Set<string>();
118
-
119
- // Safe interaction helper
120
- const addMethod = (k: string) => {
121
- if (processed.has(k)) return;
122
- if (k === 'constructor') return;
123
-
124
- try {
125
- // FIX: Always access via instance to ensure 'this' context is correct for getters
126
- // and to avoid invoking methods on the prototype object which lacks private state.
127
- const val = (engine as any)[k];
128
-
129
- if (typeof val === 'function') {
130
- processed.add(k);
131
- capabilities.push(inspectStart(k, val));
132
- }
133
- } catch (e) {
134
- // Ignore properties that cannot be accessed (e.g. strict mode violations, private getters)
135
- }
136
- };
137
-
138
- // 1. Instance (Factory-added methods like .render, .knobs)
139
- Object.getOwnPropertyNames(engine).forEach(k => addMethod(k));
140
-
141
- // 2. Prototype Chain (Class Inheritance)
142
- let proto = Object.getPrototypeOf(engine);
143
- while (proto && proto !== Object.prototype) {
144
- Object.getOwnPropertyNames(proto).forEach(k => addMethod(k));
145
- proto = Object.getPrototypeOf(proto);
146
- }
147
-
148
- // Safe snapshot
149
- root[id] = {
150
- type: engine.constructor.name,
151
- state: { ...engine.state },
152
- listeners: engine.eventRegistry || {},
153
- capabilities: capabilities.sort()
154
- };
155
- });
156
- return root;
157
- };
158
-
159
- export const use = (query: string) => {
160
- const engines = (typeof window !== 'undefined' ? (window as any).juxEngines : {}) || {};
161
- const keys = Object.keys(engines);
162
-
163
- // 1. Exact Match
164
- if (engines[query]) {
165
- (window as any).jux = engines[query];
166
- console.log(`🎯 Active Engine set to: %c${query}`, 'font-weight:bold; color:#00ff00');
167
- console.log(` You can now call methods on %cwindow.jux`, 'font-style:italic');
168
- return engines[query];
169
- }
170
-
171
- // 2. Fuzzy/Smart Match
172
- const candidates = keys.filter(k => k.toLowerCase().includes(query.toLowerCase()));
173
-
174
- if (candidates.length === 1) {
175
- const match = candidates[0];
176
- (window as any).jux = engines[match];
177
- console.log(`🎯 Smart Match! Active Engine set to: %c${match}`, 'font-weight:bold; color:#00ff00');
178
- console.log(` You can now call methods on %cwindow.jux`, 'font-style:italic');
179
- return engines[match];
180
- }
181
-
182
- // 3. Ambiguous or No Match
183
- if (candidates.length > 1) {
184
- console.warn(`⚠️ Ambiguous match for "${query}". Did you mean:`);
185
- console.table(candidates);
186
- } else {
187
- console.warn(`❌ Engine "${query}" not found. Available IDs:`, keys);
188
- }
189
- };
190
-
191
- export const engines = () => {
192
- const engines = (typeof window !== 'undefined' ? (window as any).juxEngines : {}) || {};
193
- const keys = Object.keys(engines);
194
- console.group('🔑 Available Engines');
195
- keys.forEach(k => console.log(`"${k}"`));
196
- console.groupEnd();
197
- return keys;
198
- };
199
-
200
- export const log = () => {
201
- console.group('JUX Runtime Inspector');
202
-
203
- console.groupCollapsed('📦 Component Tree (Active Instances)');
204
- const treeData = tree();
205
- if (Object.keys(treeData).length === 0) {
206
- console.log("No active components found.");
207
- } else {
208
- console.table(Object.keys(treeData).map(k => ({
209
- ID: k,
210
- Type: treeData[k].type,
211
- Items: (treeData[k].state.items?.length) ?? 'N/A'
212
- })));
213
- console.log(treeData);
214
- }
215
- console.groupEnd();
216
-
217
- console.groupCollapsed('📡 Global Event Bus');
218
- console.log(GlobalBus.registry);
219
- console.groupEnd();
220
-
221
- console.groupEnd();
222
- };
223
-
224
- /**
225
- * juxDef: Global Introspection & Debugging Tool
226
- * Exposed to window.juxDef for console access.
227
- */
228
- export const juxDef = {
229
- tree,
230
- use,
231
- engines,
232
- log
233
- };
234
-
235
- // Automatically attach to window for DevTables/Console access
236
- if (typeof window !== 'undefined') {
237
- // @ts-ignore
238
- window.juxDef = juxDef;
239
- }
240
-
241
- // Export as a namespace object
242
- export const juxV2 = {
243
- List,
244
- Grid,
245
- Input,
246
- JuxError,
247
- Element,
248
- reflection: juxDef,
249
- events: GlobalBus,
250
- plugins: {
251
- ServerSQLitePlugin,
252
- LocalStoragePlugin,
253
- IndexedDBPlugin,
254
- ClientSQLitePlugin
255
- }
256
- };
@@ -1,28 +0,0 @@
1
- import { JuxErrorEngine, JuxErrorOptions } from './engine.js';
2
- import { JuxErrorSkin } from './skin.js';
3
- export type JuxErrorComponent = JuxErrorEngine & {
4
- render: (target?: string | HTMLElement) => JuxErrorComponent;
5
- injectCSS: (id: string, cssContent: string) => void;
6
- installGlobalHandler: () => JuxErrorComponent;
7
- uninstallGlobalHandler: () => JuxErrorComponent;
8
- };
9
- /**
10
- * Factory Function
11
- * usage: jux.error('my-error').render().installGlobalHandler()
12
- *
13
- * Strategy: FUNCTIONAL COMPOSITION
14
- * We instantiate the pure Logic (Engine) and the View (Skin).
15
- * We augment the Engine instance with a function, .render(), that delegates to the Skin method, renderSkin().
16
- * This keeps the Engine class pure/headless, while offering a convenient API.
17
- */
18
- export declare function JuxError(id?: string, options?: JuxErrorOptions): JuxErrorComponent;
19
- export declare namespace JuxError {
20
- var getInstance: () => JuxErrorComponent;
21
- var show: (error: Error | string) => void;
22
- var showCompileError: (file: string, line: number, message: string, code?: string) => void;
23
- var showNetworkError: (url: string, status: number, message: string) => void;
24
- var dismiss: () => void;
25
- }
26
- export { JuxErrorEngine, JuxErrorSkin };
27
- export type { JuxErrorState, StackFrame } from './engine.js';
28
- //# sourceMappingURL=component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG;IAC7C,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,KAAK,iBAAiB,CAAC;IAC7D,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;IAC9C,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;CACnD,CAAC;AAMF;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EAAE,GAAE,MAAoB,EAAE,OAAO,GAAE,eAAoB,GAAG,iBAAiB,CAuDnG;yBAvDe,QAAQ;2BA8DG,iBAAiB;sBAYpB,KAAK,GAAG,MAAM,KAAG,IAAI;iCAOV,MAAM,QAAQ,MAAM,WAAW,MAAM,SAAS,MAAM,KAAG,IAAI;gCAO5D,MAAM,UAAU,MAAM,WAAW,MAAM,KAAG,IAAI;uBAOzD,IAAI;;AAI3B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;AACxC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -1,101 +0,0 @@
1
- import { JuxErrorEngine } from './engine.js';
2
- import { JuxErrorSkin } from './skin.js';
3
- // Module-level singleton reference
4
- let _instance = null;
5
- let _cleanupGlobalHandler = null;
6
- /**
7
- * Factory Function
8
- * usage: jux.error('my-error').render().installGlobalHandler()
9
- *
10
- * Strategy: FUNCTIONAL COMPOSITION
11
- * We instantiate the pure Logic (Engine) and the View (Skin).
12
- * We augment the Engine instance with a function, .render(), that delegates to the Skin method, renderSkin().
13
- * This keeps the Engine class pure/headless, while offering a convenient API.
14
- */
15
- export function JuxError(id = 'jux-error', options = {}) {
16
- // 1. Create the Logic
17
- const engine = new JuxErrorEngine(id, options);
18
- // Registration (Debug/Introspection)
19
- if (typeof window !== 'undefined') {
20
- // @ts-ignore
21
- window.juxEngines = window.juxEngines || {};
22
- // @ts-ignore
23
- window.juxEngines[id] = engine;
24
- // @ts-ignore
25
- window.juxEnginesKeys = Object.keys(window.juxEngines);
26
- }
27
- // 2. Create the View (wired to the engine)
28
- const skin = new JuxErrorSkin(engine);
29
- // 3. Augment the Engine with Render capability
30
- // @ts-ignore - Dynamic augmentation
31
- engine.render = (target) => {
32
- const container = typeof target === 'string'
33
- ? document.getElementById(target)
34
- : target || document.body;
35
- if (container) {
36
- skin.renderSkin(container);
37
- }
38
- else {
39
- console.warn(`Jux Error: Target ${target} not found.`);
40
- }
41
- return engine;
42
- };
43
- // 4. Augment with Styling capability
44
- // @ts-ignore
45
- engine.injectCSS = (id, cssContent) => skin.injectCSS(id, cssContent);
46
- // 5. Augment with Global Handler capability
47
- // @ts-ignore
48
- engine.installGlobalHandler = () => {
49
- if (!_cleanupGlobalHandler) {
50
- _cleanupGlobalHandler = JuxErrorEngine.installGlobalHandler(engine);
51
- }
52
- return engine;
53
- };
54
- // @ts-ignore
55
- engine.uninstallGlobalHandler = () => {
56
- if (_cleanupGlobalHandler) {
57
- _cleanupGlobalHandler();
58
- _cleanupGlobalHandler = null;
59
- }
60
- return engine;
61
- };
62
- return engine;
63
- }
64
- // --- Static Singleton API ---
65
- /**
66
- * Get or create the singleton error overlay instance
67
- */
68
- JuxError.getInstance = () => {
69
- if (!_instance) {
70
- _instance = JuxError('jux-error-singleton')
71
- .render()
72
- .installGlobalHandler();
73
- }
74
- return _instance;
75
- };
76
- /**
77
- * Quick show - uses singleton
78
- */
79
- JuxError.show = (error) => {
80
- JuxError.getInstance().show(error);
81
- };
82
- /**
83
- * Quick compile error - uses singleton
84
- */
85
- JuxError.showCompileError = (file, line, message, code) => {
86
- JuxError.getInstance().showCompileError(file, line, message, code);
87
- };
88
- /**
89
- * Quick network error - uses singleton
90
- */
91
- JuxError.showNetworkError = (url, status, message) => {
92
- JuxError.getInstance().showNetworkError(url, status, message);
93
- };
94
- /**
95
- * Quick dismiss - uses singleton
96
- */
97
- JuxError.dismiss = () => {
98
- JuxError.getInstance().dismiss();
99
- };
100
- export { Ju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E,IAAa,EAAQ,EAAE;IAC7F,QAAQ,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF;;GAEG;AACH,QAAQ,CAAC,gBAAgB,GAAG,CAAC,GAAW,EAAE,MAAc,EAAE,OAAe,EAAQ,EAAE;IAC/E,QAAQ,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF;;GAEG;AACH,QAAQ,CAAC,OAAO,GAAG,GAAS,EAAE;IAC1B,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC;AACrC,CAAC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC"}
@@ -1,125 +0,0 @@
1
- import { JuxErrorEngine, JuxErrorOptions } from './engine.js';
2
- import { JuxErrorSkin } from './skin.js';
3
-
4
- // Define the Component Type (Engine + Render Capability)
5
- export type JuxErrorComponent = JuxErrorEngine & {
6
- render: (target?: string | HTMLElement) => JuxErrorComponent;
7
- injectCSS: (id: string, cssContent: string) => void;
8
- installGlobalHandler: () => JuxErrorComponent;
9
- uninstallGlobalHandler: () => JuxErrorComponent;
10
- };
11
-
12
- // Module-level singleton reference
13
- let _instance: JuxErrorComponent | null = null;
14
- let _cleanupGlobalHandler: (() => void) | null = null;
15
-
16
- /**
17
- * Factory Function
18
- * usage: jux.error('my-error').render().installGlobalHandler()
19
- *
20
- * Strategy: FUNCTIONAL COMPOSITION
21
- * We instantiate the pure Logic (Engine) and the View (Skin).
22
- * We augment the Engine instance with a function, .render(), that delegates to the Skin method, renderSkin().
23
- * This keeps the Engine class pure/headless, while offering a convenient API.
24
- */
25
- export function JuxError(id: string = 'jux-error', options: JuxErrorOptions = {}): JuxErrorComponent {
26
- // 1. Create the Logic
27
- const engine = new JuxErrorEngine(id, options);
28
-
29
- // Registration (Debug/Introspection)
30
- if (typeof window !== 'undefined') {
31
- // @ts-ignore
32
- window.juxEngines = window.juxEngines || {};
33
- // @ts-ignore
34
- window.juxEngines[id] = engine;
35
- // @ts-ignore
36
- window.juxEnginesKeys = Object.keys(window.juxEngines);
37
- }
38
-
39
- // 2. Create the View (wired to the engine)
40
- const skin = new JuxErrorSkin(engine);
41
-
42
- // 3. Augment the Engine with Render capability
43
- // @ts-ignore - Dynamic augmentation
44
- engine.render = (target?: string | HTMLElement) => {
45
- const container = typeof target === 'string'
46
- ? document.getElementById(target)
47
- : target || document.body;
48
-
49
- if (container) {
50
- skin.renderSkin(container);
51
- } else {
52
- console.warn(`Jux Error: Target ${target} not found.`);
53
- }
54
- return engine as JuxErrorComponent;
55
- };
56
-
57
- // 4. Augment with Styling capability
58
- // @ts-ignore
59
- engine.injectCSS = (id: string, cssContent: string) => skin.injectCSS(id, cssContent);
60
-
61
- // 5. Augment with Global Handler capability
62
- // @ts-ignore
63
- engine.installGlobalHandler = () => {
64
- if (!_cleanupGlobalHandler) {
65
- _cleanupGlobalHandler = JuxErrorEngine.installGlobalHandler(engine);
66
- }
67
- return engine as JuxErrorComponent;
68
- };
69
-
70
- // @ts-ignore
71
- engine.uninstallGlobalHandler = () => {
72
- if (_cleanupGlobalHandler) {
73
- _cleanupGlobalHandler();
74
- _cleanupGlobalHandler = null;
75
- }
76
- return engine as JuxErrorComponent;
77
- };
78
-
79
- return engine as JuxErrorComponent;
80
- }
81
-
82
- // --- Static Singleton API ---
83
-
84
- /**
85
- * Get or create the singleton error overlay instance
86
- */
87
- JuxError.getInstance = (): JuxErrorComponent => {
88
- if (!_instance) {
89
- _instance = JuxError('jux-error-singleton')
90
- .render()
91
- .installGlobalHandler();
92
- }
93
- return _instance;
94
- };
95
-
96
- /**
97
- * Quick show - uses singleton
98
- */
99
- JuxError.show = (error: Error | string): void => {
100
- JuxError.getInstance().show(error);
101
- };
102
-
103
- /**
104
- * Quick compile error - uses singleton
105
- */
106
- JuxError.showCompileError = (file: string, line: number, message: string, code?: string): void => {
107
- JuxError.getInstance().showCompileError(file, line, message, code);
108
- };
109
-
110
- /**
111
- * Quick network error - uses singleton
112
- */
113
- JuxError.showNetworkError = (url: string, status: number, message: string): void => {
114
- JuxError.getInstance().showNetworkError(url, status, message);
115
- };
116
-
117
- /**
118
- * Quick dismiss - uses singleton
119
- */
120
- JuxError.dismiss = (): void => {
121
- JuxError.getInstance().dismiss();
122
- };
123
-
124
- export { JuxErrorEngine, JuxErrorSkin };
125
- export type { JuxErrorState, StackFrame } from './engine.js';
@@ -1,35 +0,0 @@
1
- import { BaseEngine, BaseState } from '../base/BaseEngine.js';
2
- export interface StackFrame {
3
- file: string;
4
- line: number;
5
- column: number;
6
- function: string;
7
- code?: string;
8
- isUserCode: boolean;
9
- }
10
- export interface JuxErrorState extends BaseState {
11
- title: string;
12
- message: string;
13
- stack: StackFrame[];
14
- rawStack: string;
15
- timestamp: number;
16
- errorType: 'runtime' | 'compile' | 'network' | 'validation' | 'unknown';
17
- culpritFrame: StackFrame | null;
18
- expanded: boolean;
19
- }
20
- export interface JuxErrorOptions {
21
- autoShow?: boolean;
22
- }
23
- export declare class JuxErrorEngine extends BaseEngine<JuxErrorState, JuxErrorOptions> {
24
- #private;
25
- constructor(id?: string, options?: JuxErrorOptions);
26
- protected prepareState(id: string, options: JuxErrorOptions): JuxErrorState;
27
- show(error: Error | string, type?: JuxErrorState['errorType']): this;
28
- showCompileError(file: string, line: number, message: string, code?: string): this;
29
- showNetworkError(url: string, status: number, message: string): this;
30
- showValidationError(field: string, message: string): this;
31
- dismiss(): this;
32
- toggleExpanded(): this;
33
- static installGlobalHandler(engine: JuxErrorEngine): () => void;
34
- }
35
- //# sourceMappingURL=engine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;A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