@tachui/core 0.7.1-alpha → 0.8.0-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 +2 -2
- package/dist/bundles/common.d.ts +1 -1
- package/dist/bundles/common.d.ts.map +1 -1
- package/dist/bundles/minimal.d.ts +2 -16
- package/dist/bundles/minimal.d.ts.map +1 -1
- package/dist/bundles/production-minimal.d.ts +2 -16
- package/dist/bundles/production-minimal.d.ts.map +1 -1
- package/dist/common.js +403 -827
- package/dist/compiler/advanced-parser.d.ts.map +1 -1
- package/dist/compiler/index.js +14 -8
- package/dist/component-XAzF1xqs.js +487 -0
- package/dist/component-base-x2XmHFjy.js +255 -0
- package/dist/components/index.d.ts +4 -38
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -4167
- package/dist/components/wrapper.d.ts +5 -152
- package/dist/components/wrapper.d.ts.map +1 -1
- package/dist/concatenated-component-ByPl3_FF.js +2933 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/layout.d.ts +47 -4
- package/dist/constants/layout.d.ts.map +1 -1
- package/dist/constants/layout.js +84 -0
- package/dist/css-classes/index.js +176 -0
- package/dist/{dom-bridge-Cx-s6Ihx.js → dom-bridge-CAa1N2zX.js} +28 -28
- package/dist/{effect-CytAc9em.js → effect-B9Knft0b.js} +3 -3
- package/dist/essential.js +395 -825
- package/dist/index-DCPJFUm9.js +1407 -0
- package/dist/index-DIvMCJQO.js +268 -0
- package/dist/index-vdsiw6gQ.js +777 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +395 -825
- package/dist/minimal-prod.js +101 -155
- package/dist/minimal.js +104 -170
- package/dist/modifiers/background.d.ts +41 -11
- package/dist/modifiers/background.d.ts.map +1 -1
- package/dist/modifiers/base.d.ts +6 -33
- package/dist/modifiers/base.d.ts.map +1 -1
- package/dist/modifiers/base.js +487 -0
- package/dist/modifiers/builder.d.ts +103 -195
- package/dist/modifiers/builder.d.ts.map +1 -1
- package/dist/modifiers/builder.js +9 -0
- package/dist/modifiers/core.d.ts +9 -401
- package/dist/modifiers/core.d.ts.map +1 -1
- package/dist/modifiers/{utils.d.ts → factories.d.ts} +18 -5
- package/dist/modifiers/factories.d.ts.map +1 -0
- package/dist/modifiers/index.d.ts +8 -52
- package/dist/modifiers/index.d.ts.map +1 -1
- package/dist/modifiers/index.js +38 -0
- package/dist/modifiers/presets.d.ts +368 -0
- package/dist/modifiers/presets.d.ts.map +1 -0
- package/dist/modifiers/registry.js +10 -0
- package/dist/modifiers/types.d.ts +39 -211
- package/dist/modifiers/types.d.ts.map +1 -1
- package/dist/modifiers/types.js +4 -0
- package/dist/performance-optimizer-stub-CtfXUwl4.js +38 -0
- package/dist/plugins/index.d.ts +5 -6
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +147 -297
- package/dist/plugins/simplified-index.d.ts +5 -6
- package/dist/plugins/simplified-index.d.ts.map +1 -1
- package/dist/production-minimal-BY_gMc-l.js +2532 -0
- package/dist/reactive/index.js +96 -95
- package/dist/reactive/types.js +4 -0
- package/dist/runtime/dom-bridge.js +5 -5
- package/dist/runtime/element-override.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -7
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/renderer.d.ts.map +1 -1
- package/dist/runtime/renderer.js +7 -8
- package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
- package/dist/runtime/types.js +1 -0
- package/dist/{scheduler-7SvC3a21.js → scheduler-BKeqwrYE.js} +130 -130
- package/dist/validation/build-time-stub.d.ts +33 -0
- package/dist/validation/build-time-stub.d.ts.map +1 -0
- package/dist/validation/debug-tools-stub.d.ts +67 -0
- package/dist/validation/debug-tools-stub.d.ts.map +1 -0
- package/dist/validation/index.d.ts +23 -78
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +609 -6470
- package/dist/validation/lifecycle-validation.d.ts.map +1 -1
- package/dist/validation/performance-optimizer-stub.d.ts +50 -0
- package/dist/validation/performance-optimizer-stub.d.ts.map +1 -0
- package/dist/validation/plugin-registration.d.ts +5 -1
- package/dist/validation/plugin-registration.d.ts.map +1 -1
- package/dist/validation/production-bypass-core.d.ts +69 -0
- package/dist/validation/production-bypass-core.d.ts.map +1 -0
- package/package.json +41 -5
- package/dist/ScrollView-h-6wYMAm.js +0 -515
- package/dist/Spacer-BbteDQ9I.js +0 -5337
- package/dist/binding-CmdpowkI.js +0 -2276
- package/dist/components/BasicInput.d.ts +0 -116
- package/dist/components/BasicInput.d.ts.map +0 -1
- package/dist/components/Button.d.ts +0 -252
- package/dist/components/Button.d.ts.map +0 -1
- package/dist/components/Divider.d.ts +0 -141
- package/dist/components/Divider.d.ts.map +0 -1
- package/dist/components/EnhancedLink.d.ts +0 -365
- package/dist/components/EnhancedLink.d.ts.map +0 -1
- package/dist/components/Form.d.ts +0 -141
- package/dist/components/Form.d.ts.map +0 -1
- package/dist/components/Grid.d.ts +0 -698
- package/dist/components/Grid.d.ts.map +0 -1
- package/dist/components/GridResponsive.d.ts +0 -214
- package/dist/components/GridResponsive.d.ts.map +0 -1
- package/dist/components/Image.d.ts +0 -162
- package/dist/components/Image.d.ts.map +0 -1
- package/dist/components/List.d.ts +0 -287
- package/dist/components/List.d.ts.map +0 -1
- package/dist/components/Menu.d.ts +0 -159
- package/dist/components/Menu.d.ts.map +0 -1
- package/dist/components/Picker.d.ts +0 -153
- package/dist/components/Picker.d.ts.map +0 -1
- package/dist/components/ScrollView.d.ts +0 -222
- package/dist/components/ScrollView.d.ts.map +0 -1
- package/dist/components/Section.d.ts +0 -153
- package/dist/components/Section.d.ts.map +0 -1
- package/dist/components/Show.d.ts +0 -64
- package/dist/components/Show.d.ts.map +0 -1
- package/dist/components/Spacer.d.ts +0 -35
- package/dist/components/Spacer.d.ts.map +0 -1
- package/dist/components/Text.d.ts +0 -242
- package/dist/components/Text.d.ts.map +0 -1
- package/dist/components/Toggle.d.ts +0 -207
- package/dist/components/Toggle.d.ts.map +0 -1
- package/dist/concatenated-component-DPcl2TEO.js +0 -6779
- package/dist/context--zQFIImS.js +0 -283
- package/dist/debug/index.d.ts +0 -61
- package/dist/debug/index.d.ts.map +0 -1
- package/dist/debug.js +0 -178
- package/dist/developer-experience/enhanced-errors.d.ts +0 -128
- package/dist/developer-experience/enhanced-errors.d.ts.map +0 -1
- package/dist/developer-experience/enhanced-types.d.ts +0 -281
- package/dist/developer-experience/enhanced-types.d.ts.map +0 -1
- package/dist/developer-experience/index.d.ts +0 -44
- package/dist/developer-experience/index.d.ts.map +0 -1
- package/dist/index-Nfi2SBQh.js +0 -3268
- package/dist/modifiers/attributes.d.ts +0 -203
- package/dist/modifiers/attributes.d.ts.map +0 -1
- package/dist/modifiers/backdrop.d.ts +0 -59
- package/dist/modifiers/backdrop.d.ts.map +0 -1
- package/dist/modifiers/border.d.ts +0 -217
- package/dist/modifiers/border.d.ts.map +0 -1
- package/dist/modifiers/effects.d.ts +0 -159
- package/dist/modifiers/effects.d.ts.map +0 -1
- package/dist/modifiers/elements.d.ts +0 -240
- package/dist/modifiers/elements.d.ts.map +0 -1
- package/dist/modifiers/filters.d.ts +0 -275
- package/dist/modifiers/filters.d.ts.map +0 -1
- package/dist/modifiers/flexbox.d.ts +0 -82
- package/dist/modifiers/flexbox.d.ts.map +0 -1
- package/dist/modifiers/font.d.ts +0 -71
- package/dist/modifiers/font.d.ts.map +0 -1
- package/dist/modifiers/grid.d.ts +0 -92
- package/dist/modifiers/grid.d.ts.map +0 -1
- package/dist/modifiers/margin.d.ts +0 -128
- package/dist/modifiers/margin.d.ts.map +0 -1
- package/dist/modifiers/padding.d.ts +0 -204
- package/dist/modifiers/padding.d.ts.map +0 -1
- package/dist/modifiers/responsive/advanced-utilities.d.ts +0 -118
- package/dist/modifiers/responsive/advanced-utilities.d.ts.map +0 -1
- package/dist/modifiers/responsive/breakpoints.d.ts +0 -81
- package/dist/modifiers/responsive/breakpoints.d.ts.map +0 -1
- package/dist/modifiers/responsive/css-generator.d.ts +0 -100
- package/dist/modifiers/responsive/css-generator.d.ts.map +0 -1
- package/dist/modifiers/responsive/dev-tools.d.ts +0 -107
- package/dist/modifiers/responsive/dev-tools.d.ts.map +0 -1
- package/dist/modifiers/responsive/index.d.ts +0 -29
- package/dist/modifiers/responsive/index.d.ts.map +0 -1
- package/dist/modifiers/responsive/layout-patterns.d.ts +0 -230
- package/dist/modifiers/responsive/layout-patterns.d.ts.map +0 -1
- package/dist/modifiers/responsive/performance.d.ts +0 -130
- package/dist/modifiers/responsive/performance.d.ts.map +0 -1
- package/dist/modifiers/responsive/responsive-builder.d.ts +0 -133
- package/dist/modifiers/responsive/responsive-builder.d.ts.map +0 -1
- package/dist/modifiers/responsive/responsive-modifier.d.ts +0 -123
- package/dist/modifiers/responsive/responsive-modifier.d.ts.map +0 -1
- package/dist/modifiers/responsive/types.d.ts +0 -183
- package/dist/modifiers/responsive/types.d.ts.map +0 -1
- package/dist/modifiers/responsive/utilities.d.ts +0 -149
- package/dist/modifiers/responsive/utilities.d.ts.map +0 -1
- package/dist/modifiers/scroll.d.ts +0 -143
- package/dist/modifiers/scroll.d.ts.map +0 -1
- package/dist/modifiers/shadows.d.ts +0 -114
- package/dist/modifiers/shadows.d.ts.map +0 -1
- package/dist/modifiers/size.d.ts +0 -113
- package/dist/modifiers/size.d.ts.map +0 -1
- package/dist/modifiers/text.d.ts +0 -147
- package/dist/modifiers/text.d.ts.map +0 -1
- package/dist/modifiers/transformations.d.ts +0 -329
- package/dist/modifiers/transformations.d.ts.map +0 -1
- package/dist/modifiers/transitions.d.ts +0 -98
- package/dist/modifiers/transitions.d.ts.map +0 -1
- package/dist/modifiers/typography.d.ts +0 -192
- package/dist/modifiers/typography.d.ts.map +0 -1
- package/dist/modifiers/utility.d.ts +0 -69
- package/dist/modifiers/utility.d.ts.map +0 -1
- package/dist/modifiers/utils.d.ts.map +0 -1
- package/dist/plugins/simplified-error-handler.d.ts +0 -83
- package/dist/plugins/simplified-error-handler.d.ts.map +0 -1
- package/dist/runtime/dev-tools.d.ts +0 -240
- package/dist/runtime/dev-tools.d.ts.map +0 -1
- package/dist/runtime/development-warnings.d.ts +0 -42
- package/dist/runtime/development-warnings.d.ts.map +0 -1
- package/dist/runtime/error-boundary.d.ts +0 -302
- package/dist/runtime/error-boundary.d.ts.map +0 -1
- package/dist/runtime/error-recovery.d.ts +0 -267
- package/dist/runtime/error-recovery.d.ts.map +0 -1
- package/dist/runtime/error-reporting.d.ts +0 -287
- package/dist/runtime/error-reporting.d.ts.map +0 -1
- package/dist/runtime/error-utils.d.ts +0 -204
- package/dist/runtime/error-utils.d.ts.map +0 -1
- package/dist/runtime/performance.d.ts +0 -217
- package/dist/runtime/performance.d.ts.map +0 -1
- package/dist/sui-compat.d.ts +0 -110
- package/dist/sui-compat.d.ts.map +0 -1
- package/dist/validation/advanced-debugging.d.ts +0 -319
- package/dist/validation/advanced-debugging.d.ts.map +0 -1
- package/dist/validation/build-time/detection.d.ts +0 -32
- package/dist/validation/build-time/detection.d.ts.map +0 -1
- package/dist/validation/build-time/index.d.ts +0 -84
- package/dist/validation/build-time/index.d.ts.map +0 -1
- package/dist/validation/build-time/plugins.d.ts +0 -75
- package/dist/validation/build-time/plugins.d.ts.map +0 -1
- package/dist/validation/build-time/rules.d.ts +0 -73
- package/dist/validation/build-time/rules.d.ts.map +0 -1
- package/dist/validation/build-time/transformer.d.ts +0 -23
- package/dist/validation/build-time/transformer.d.ts.map +0 -1
- package/dist/validation/build-time/types.d.ts +0 -212
- package/dist/validation/build-time/types.d.ts.map +0 -1
- package/dist/validation/comprehensive.d.ts +0 -160
- package/dist/validation/comprehensive.d.ts.map +0 -1
- package/dist/validation/debug-tools.d.ts +0 -251
- package/dist/validation/debug-tools.d.ts.map +0 -1
- package/dist/validation/developer-experience.d.ts +0 -243
- package/dist/validation/developer-experience.d.ts.map +0 -1
- package/dist/validation/documentation-integration.d.ts +0 -269
- package/dist/validation/documentation-integration.d.ts.map +0 -1
- package/dist/validation/enhanced-runtime.d.ts +0 -279
- package/dist/validation/enhanced-runtime.d.ts.map +0 -1
- package/dist/validation/error-reporting.d.ts +0 -186
- package/dist/validation/error-reporting.d.ts.map +0 -1
- package/dist/validation/ide-integration.d.ts +0 -328
- package/dist/validation/ide-integration.d.ts.map +0 -1
- package/dist/validation/performance-optimizer.d.ts +0 -218
- package/dist/validation/performance-optimizer.d.ts.map +0 -1
- package/dist/validation/production-bypass.d.ts +0 -175
- package/dist/validation/production-bypass.d.ts.map +0 -1
- package/dist/validation/simple.d.ts +0 -111
- package/dist/validation/simple.d.ts.map +0 -1
- package/dist/viewport/adapters/web-adapter.d.ts +0 -227
- package/dist/viewport/adapters/web-adapter.d.ts.map +0 -1
- package/dist/viewport/components.d.ts +0 -131
- package/dist/viewport/components.d.ts.map +0 -1
- package/dist/viewport/environment.d.ts +0 -75
- package/dist/viewport/environment.d.ts.map +0 -1
- package/dist/viewport/index.d.ts +0 -138
- package/dist/viewport/index.d.ts.map +0 -1
- package/dist/viewport/index.js +0 -2085
- package/dist/viewport/platform-detection.d.ts +0 -59
- package/dist/viewport/platform-detection.d.ts.map +0 -1
- package/dist/viewport/types.d.ts +0 -301
- package/dist/viewport/types.d.ts.map +0 -1
- package/dist/viewport/viewport-manager.d.ts +0 -118
- package/dist/viewport/viewport-manager.d.ts.map +0 -1
package/dist/plugins/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
let
|
|
3
|
-
constructor(e,
|
|
4
|
-
super(e), this.code =
|
|
1
|
+
var P = Object.defineProperty, w = (s, e, t) => e in s ? P(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, h = (s, e, t) => w(s, typeof e != "symbol" ? e + "" : e, t);
|
|
2
|
+
let c = class extends Error {
|
|
3
|
+
constructor(e, t) {
|
|
4
|
+
super(e), this.code = t, this.name = "PluginError";
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
class
|
|
7
|
+
class y {
|
|
8
8
|
constructor(e) {
|
|
9
|
-
|
|
9
|
+
h(this, "plugins", /* @__PURE__ */ new Map()), h(this, "instance"), this.instance = e;
|
|
10
10
|
}
|
|
11
11
|
async install(e) {
|
|
12
12
|
this.validatePluginBasics(e), await e.install(this.instance), this.plugins.set(e.name, e), console.log(`✅ Plugin "${e.name}" v${e.version} installed successfully`);
|
|
13
13
|
}
|
|
14
14
|
async uninstall(e) {
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
throw new
|
|
15
|
+
const t = this.plugins.get(e);
|
|
16
|
+
if (!t)
|
|
17
|
+
throw new c(`Plugin "${e}" is not installed`);
|
|
18
18
|
this.plugins.delete(e);
|
|
19
19
|
try {
|
|
20
|
-
|
|
21
|
-
} catch (
|
|
22
|
-
throw console.log(`🗑️ Plugin "${e}" uninstalled successfully (cleanup failed)`),
|
|
20
|
+
t.uninstall && await t.uninstall(), console.log(`🗑️ Plugin "${e}" uninstalled successfully`);
|
|
21
|
+
} catch (n) {
|
|
22
|
+
throw console.log(`🗑️ Plugin "${e}" uninstalled successfully (cleanup failed)`), n;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
isInstalled(e) {
|
|
@@ -36,18 +36,18 @@ class $ {
|
|
|
36
36
|
}
|
|
37
37
|
validatePluginBasics(e) {
|
|
38
38
|
if (!e.name || typeof e.name != "string")
|
|
39
|
-
throw new
|
|
39
|
+
throw new c("Plugin must have a valid name string", "INVALID_NAME");
|
|
40
40
|
if (!e.version || typeof e.version != "string")
|
|
41
|
-
throw new
|
|
41
|
+
throw new c("Plugin must have a valid version string", "INVALID_VERSION");
|
|
42
42
|
if (!e.install || typeof e.install != "function")
|
|
43
|
-
throw new
|
|
43
|
+
throw new c("Plugin must have an install function", "INVALID_INSTALL");
|
|
44
44
|
this.plugins.has(e.name) && console.warn(`Plugin "${e.name}" is already installed, overwriting`);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
class
|
|
47
|
+
var $ = Object.defineProperty, _ = (s, e, t) => e in s ? $(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, E = (s, e, t) => _(s, e + "", t);
|
|
48
|
+
class I {
|
|
49
49
|
constructor() {
|
|
50
|
-
|
|
50
|
+
E(this, "components", /* @__PURE__ */ new Map());
|
|
51
51
|
}
|
|
52
52
|
register(e) {
|
|
53
53
|
if (!e.name || typeof e.name != "string")
|
|
@@ -69,20 +69,20 @@ class b {
|
|
|
69
69
|
return Array.from(this.components.values());
|
|
70
70
|
}
|
|
71
71
|
listByCategory(e) {
|
|
72
|
-
return this.list().filter((
|
|
72
|
+
return this.list().filter((t) => t.category === e);
|
|
73
73
|
}
|
|
74
74
|
listByPlugin(e) {
|
|
75
|
-
return this.list().filter((
|
|
75
|
+
return this.list().filter((t) => t.plugin === e);
|
|
76
76
|
}
|
|
77
77
|
unregister(e) {
|
|
78
|
-
const
|
|
79
|
-
return this.components.delete(e),
|
|
78
|
+
const t = this.components.has(e);
|
|
79
|
+
return this.components.delete(e), t && console.log(`🗑️ Component "${e}" unregistered`), t;
|
|
80
80
|
}
|
|
81
81
|
unregisterByPlugin(e) {
|
|
82
|
-
const
|
|
83
|
-
for (const [
|
|
84
|
-
|
|
85
|
-
return
|
|
82
|
+
const t = [];
|
|
83
|
+
for (const [n, r] of this.components.entries())
|
|
84
|
+
r.plugin === e && (this.components.delete(n), t.push(n));
|
|
85
|
+
return t.length > 0 && console.log(`🗑️ Unregistered ${t.length} components from plugin "${e}": ${t.join(", ")}`), t;
|
|
86
86
|
}
|
|
87
87
|
clear() {
|
|
88
88
|
const e = this.components.size;
|
|
@@ -95,13 +95,13 @@ class b {
|
|
|
95
95
|
plugins: /* @__PURE__ */ new Map(),
|
|
96
96
|
tags: /* @__PURE__ */ new Map()
|
|
97
97
|
};
|
|
98
|
-
for (const
|
|
99
|
-
const
|
|
100
|
-
e.categories.set(
|
|
101
|
-
const
|
|
102
|
-
if (e.plugins.set(
|
|
103
|
-
for (const
|
|
104
|
-
e.tags.set(
|
|
98
|
+
for (const t of this.components.values()) {
|
|
99
|
+
const n = t.category || "uncategorized";
|
|
100
|
+
e.categories.set(n, (e.categories.get(n) || 0) + 1);
|
|
101
|
+
const r = t.plugin || "core";
|
|
102
|
+
if (e.plugins.set(r, (e.plugins.get(r) || 0) + 1), t.tags)
|
|
103
|
+
for (const i of t.tags)
|
|
104
|
+
e.tags.set(i, (e.tags.get(i) || 0) + 1);
|
|
105
105
|
}
|
|
106
106
|
return {
|
|
107
107
|
totalComponents: e.totalComponents,
|
|
@@ -111,22 +111,22 @@ class b {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
class
|
|
114
|
+
var M = Object.defineProperty, z = (s, e, t) => e in s ? M(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, u = (s, e, t) => z(s, typeof e != "symbol" ? e + "" : e, t);
|
|
115
|
+
class b {
|
|
116
116
|
constructor() {
|
|
117
|
-
|
|
117
|
+
u(this, "plugins"), u(this, "components"), u(this, "services"), u(this, "currentInstallingPlugin", null), this.components = new I(), this.services = /* @__PURE__ */ new Map(), this.plugins = new y(this);
|
|
118
118
|
}
|
|
119
|
-
registerComponent(e,
|
|
119
|
+
registerComponent(e, t, n) {
|
|
120
120
|
this.components.register({
|
|
121
121
|
name: e,
|
|
122
|
-
component:
|
|
123
|
-
category:
|
|
124
|
-
tags:
|
|
122
|
+
component: t,
|
|
123
|
+
category: n?.category,
|
|
124
|
+
tags: n?.tags,
|
|
125
125
|
plugin: this.currentInstallingPlugin || void 0
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
registerService(e,
|
|
129
|
-
this.services.has(e) && !this.services.get(e) && console.warn(`Service "${e}" already registered, overwriting`), this.services.set(e,
|
|
128
|
+
registerService(e, t) {
|
|
129
|
+
this.services.has(e) && !this.services.get(e) && console.warn(`Service "${e}" already registered, overwriting`), this.services.set(e, t), console.log(`⚙️ Service "${e}" registered`);
|
|
130
130
|
}
|
|
131
131
|
getService(e) {
|
|
132
132
|
return this.services.get(e);
|
|
@@ -135,8 +135,8 @@ class B {
|
|
|
135
135
|
return this.services.has(e);
|
|
136
136
|
}
|
|
137
137
|
unregisterService(e) {
|
|
138
|
-
const
|
|
139
|
-
return this.services.delete(e),
|
|
138
|
+
const t = this.services.has(e);
|
|
139
|
+
return this.services.delete(e), t && console.log(`🗑️ Service "${e}" unregistered`), t;
|
|
140
140
|
}
|
|
141
141
|
async installPlugin(e) {
|
|
142
142
|
this.currentInstallingPlugin = e.name;
|
|
@@ -170,66 +170,66 @@ class B {
|
|
|
170
170
|
}
|
|
171
171
|
async reset() {
|
|
172
172
|
const e = this.getInstalledPlugins();
|
|
173
|
-
for (const
|
|
173
|
+
for (const t of e)
|
|
174
174
|
try {
|
|
175
|
-
await this.uninstallPlugin(
|
|
176
|
-
} catch (
|
|
177
|
-
console.error(`Failed to uninstall plugin "${
|
|
175
|
+
await this.uninstallPlugin(t);
|
|
176
|
+
} catch (n) {
|
|
177
|
+
console.error(`Failed to uninstall plugin "${t}":`, n);
|
|
178
178
|
}
|
|
179
179
|
this.components.clear(), this.services.clear(), console.log("🔄 TachUI instance reset completed");
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
const
|
|
183
|
-
function
|
|
184
|
-
return
|
|
182
|
+
const g = new b();
|
|
183
|
+
function D(s) {
|
|
184
|
+
return g.installPlugin(s);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
return
|
|
186
|
+
function T(s, e, t) {
|
|
187
|
+
return g.registerComponent(s, e, t);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
return
|
|
189
|
+
function x(s, e) {
|
|
190
|
+
return g.registerService(s, e);
|
|
191
191
|
}
|
|
192
192
|
class a extends Error {
|
|
193
|
-
constructor(e,
|
|
194
|
-
super(e), this.code =
|
|
193
|
+
constructor(e, t) {
|
|
194
|
+
super(e), this.code = t, this.name = "PluginError";
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
return !
|
|
197
|
+
function m(s) {
|
|
198
|
+
return !s || typeof s != "string" ? !1 : /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(s);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
if (!
|
|
200
|
+
function R(s, e) {
|
|
201
|
+
if (!m(s) || !m(e))
|
|
202
202
|
throw new Error("Invalid semantic version format");
|
|
203
|
-
const
|
|
204
|
-
const [o,
|
|
205
|
-
return { major:
|
|
206
|
-
},
|
|
207
|
-
return
|
|
203
|
+
const t = (i) => {
|
|
204
|
+
const [o, d] = i.split("-"), [f, p, v] = o.split(".").map(Number);
|
|
205
|
+
return { major: f, minor: p, patch: v, prerelease: d };
|
|
206
|
+
}, n = t(s), r = t(e);
|
|
207
|
+
return n.major !== r.major ? n.major < r.major ? -1 : 1 : n.minor !== r.minor ? n.minor < r.minor ? -1 : 1 : n.patch !== r.patch ? n.patch < r.patch ? -1 : 1 : n.prerelease && r.prerelease ? n.prerelease < r.prerelease ? -1 : n.prerelease > r.prerelease ? 1 : 0 : n.prerelease && !r.prerelease ? -1 : !n.prerelease && r.prerelease ? 1 : 0;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return !
|
|
209
|
+
function V(s) {
|
|
210
|
+
return !s || typeof s != "string" ? !1 : /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(s);
|
|
211
211
|
}
|
|
212
|
-
function j(
|
|
213
|
-
return
|
|
212
|
+
function j(s) {
|
|
213
|
+
return s.replace(/^@[^/]+\//, "");
|
|
214
214
|
}
|
|
215
|
-
const
|
|
215
|
+
const B = {
|
|
216
216
|
/**
|
|
217
217
|
* Logs plugin debug information in development mode
|
|
218
218
|
*/
|
|
219
|
-
log(
|
|
220
|
-
process.env.NODE_ENV === "development" && (console.group(`🔌 [${
|
|
219
|
+
log(s, e, t) {
|
|
220
|
+
process.env.NODE_ENV === "development" && (console.group(`🔌 [${s}]`), console.log(e), t && console.log("Data:", t), console.groupEnd());
|
|
221
221
|
},
|
|
222
222
|
/**
|
|
223
223
|
* Creates a development-only warning
|
|
224
224
|
*/
|
|
225
|
-
warn(
|
|
226
|
-
process.env.NODE_ENV === "development" && console.warn(`⚠️ [${
|
|
225
|
+
warn(s, e) {
|
|
226
|
+
process.env.NODE_ENV === "development" && console.warn(`⚠️ [${s}] ${e}`);
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
var
|
|
230
|
-
class
|
|
229
|
+
var L = Object.defineProperty, A = (s, e, t) => e in s ? L(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, l = (s, e, t) => A(s, typeof e != "symbol" ? e + "" : e, t);
|
|
230
|
+
class F {
|
|
231
231
|
constructor() {
|
|
232
|
-
|
|
232
|
+
l(this, "loadPromises", /* @__PURE__ */ new Map()), l(this, "loadedPlugins", /* @__PURE__ */ new Map()), l(this, "loadMetrics", /* @__PURE__ */ new Map()), l(this, "maxRetries", 3), l(this, "baseRetryDelay", 100);
|
|
233
233
|
}
|
|
234
234
|
// ms
|
|
235
235
|
async loadPlugin(e) {
|
|
@@ -237,58 +237,58 @@ class q {
|
|
|
237
237
|
return this.recordCacheHit(e), this.loadedPlugins.get(e);
|
|
238
238
|
if (this.loadPromises.has(e))
|
|
239
239
|
return this.loadPromises.get(e);
|
|
240
|
-
const
|
|
241
|
-
this.loadPromises.set(e,
|
|
240
|
+
const t = this.doLoadPluginWithRetry(e);
|
|
241
|
+
this.loadPromises.set(e, t);
|
|
242
242
|
try {
|
|
243
|
-
const
|
|
244
|
-
return this.loadedPlugins.set(e,
|
|
245
|
-
} catch (
|
|
246
|
-
throw this.loadPromises.delete(e),
|
|
243
|
+
const n = await t;
|
|
244
|
+
return this.loadedPlugins.set(e, n), n;
|
|
245
|
+
} catch (n) {
|
|
246
|
+
throw this.loadPromises.delete(e), n;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
async doLoadPluginWithRetry(e,
|
|
250
|
-
const
|
|
249
|
+
async doLoadPluginWithRetry(e, t = 1) {
|
|
250
|
+
const n = {
|
|
251
251
|
startTime: performance.now(),
|
|
252
|
-
attempts:
|
|
252
|
+
attempts: t,
|
|
253
253
|
success: !1,
|
|
254
254
|
cacheHit: !1
|
|
255
255
|
};
|
|
256
|
-
this.loadMetrics.set(e,
|
|
256
|
+
this.loadMetrics.set(e, n);
|
|
257
257
|
try {
|
|
258
|
-
const
|
|
259
|
-
return
|
|
260
|
-
} catch (
|
|
261
|
-
if (
|
|
262
|
-
const
|
|
263
|
-
return process.env.NODE_ENV === "development" && console.warn(`⚠️ Plugin "${e}" load failed (attempt ${
|
|
258
|
+
const r = await this.doLoadPlugin(e);
|
|
259
|
+
return n.endTime = performance.now(), n.duration = n.endTime - n.startTime, n.success = !0, process.env.NODE_ENV === "development" && console.log(`🚀 Plugin "${e}" loaded in ${n.duration.toFixed(2)}ms (attempt ${t})`), r;
|
|
260
|
+
} catch (r) {
|
|
261
|
+
if (n.endTime = performance.now(), n.duration = n.endTime - n.startTime, t < this.maxRetries) {
|
|
262
|
+
const i = this.baseRetryDelay * Math.pow(2, t - 1);
|
|
263
|
+
return process.env.NODE_ENV === "development" && console.warn(`⚠️ Plugin "${e}" load failed (attempt ${t}), retrying in ${i}ms...`), await this.delay(i), this.doLoadPluginWithRetry(e, t + 1);
|
|
264
264
|
}
|
|
265
|
-
throw process.env.NODE_ENV === "development" && console.error(`❌ Plugin "${e}" failed to load after ${
|
|
265
|
+
throw process.env.NODE_ENV === "development" && console.error(`❌ Plugin "${e}" failed to load after ${t} attempts`), new a(`Failed to load plugin "${e}" after ${t} attempts: ${r}`);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
async doLoadPlugin(e) {
|
|
269
269
|
try {
|
|
270
|
-
const
|
|
270
|
+
const t = await import(
|
|
271
271
|
/* webpackChunkName: "plugin-[request]" */
|
|
272
272
|
e
|
|
273
|
-
),
|
|
274
|
-
if (!
|
|
273
|
+
), n = t.default || t;
|
|
274
|
+
if (!n || typeof n != "object")
|
|
275
275
|
throw new a(`Plugin "${e}" must export a plugin object`);
|
|
276
|
-
if (!
|
|
276
|
+
if (!n.name || !n.version || typeof n.install != "function")
|
|
277
277
|
throw new a(`Plugin "${e}" must have name, version, and install method`);
|
|
278
|
-
return
|
|
279
|
-
} catch (
|
|
280
|
-
throw new a(`Dynamic import failed for "${e}": ${
|
|
278
|
+
return n;
|
|
279
|
+
} catch (t) {
|
|
280
|
+
throw new a(`Dynamic import failed for "${e}": ${t}`);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
recordCacheHit(e) {
|
|
284
284
|
if (this.loadMetrics.has(e)) {
|
|
285
|
-
const
|
|
286
|
-
|
|
285
|
+
const t = this.loadMetrics.get(e);
|
|
286
|
+
t.cacheHit = !0;
|
|
287
287
|
}
|
|
288
288
|
process.env.NODE_ENV === "development" && console.log(`💾 Plugin "${e}" served from cache`);
|
|
289
289
|
}
|
|
290
290
|
delay(e) {
|
|
291
|
-
return new Promise((
|
|
291
|
+
return new Promise((t) => setTimeout(t, e));
|
|
292
292
|
}
|
|
293
293
|
// Performance monitoring methods
|
|
294
294
|
isLoading(e) {
|
|
@@ -301,21 +301,21 @@ class q {
|
|
|
301
301
|
return this.loadMetrics.get(e);
|
|
302
302
|
}
|
|
303
303
|
getAllMetrics() {
|
|
304
|
-
return Array.from(this.loadMetrics.entries()).map(([e,
|
|
304
|
+
return Array.from(this.loadMetrics.entries()).map(([e, t]) => ({
|
|
305
305
|
plugin: e,
|
|
306
|
-
metrics:
|
|
306
|
+
metrics: t
|
|
307
307
|
}));
|
|
308
308
|
}
|
|
309
309
|
getPerformanceStats() {
|
|
310
|
-
const e = this.getAllMetrics(),
|
|
310
|
+
const e = this.getAllMetrics(), t = e.filter((o) => o.metrics.success), n = e.filter((o) => !o.metrics.success), r = t.reduce((o, d) => o + (d.metrics.duration || 0), 0), i = t.length > 0 ? r / t.length : 0;
|
|
311
311
|
return {
|
|
312
312
|
totalPlugins: e.length,
|
|
313
|
-
successful:
|
|
314
|
-
failed:
|
|
313
|
+
successful: t.length,
|
|
314
|
+
failed: n.length,
|
|
315
315
|
cached: this.loadedPlugins.size,
|
|
316
|
-
averageLoadTime:
|
|
317
|
-
totalLoadTime:
|
|
318
|
-
cacheHitRate:
|
|
316
|
+
averageLoadTime: i,
|
|
317
|
+
totalLoadTime: r,
|
|
318
|
+
cacheHitRate: t.length > 0 ? t.filter((o) => o.metrics.cacheHit).length / t.length : 0
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
clearCache(e) {
|
|
@@ -335,211 +335,61 @@ class q {
|
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function U(s) {
|
|
339
339
|
return async () => {
|
|
340
340
|
try {
|
|
341
|
-
const e = await
|
|
342
|
-
if (!
|
|
341
|
+
const e = await s(), t = "default" in e ? e.default : e;
|
|
342
|
+
if (!t || typeof t != "object")
|
|
343
343
|
throw new a("Plugin module must export a plugin object");
|
|
344
|
-
if (!
|
|
344
|
+
if (!t.name || !t.version || typeof t.install != "function")
|
|
345
345
|
throw new a("Plugin must have name, version, and install method");
|
|
346
|
-
return
|
|
346
|
+
return t;
|
|
347
347
|
} catch (e) {
|
|
348
348
|
throw new a(`Failed to load plugin: ${e}`);
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
constructor() {
|
|
355
|
-
l(this, "errorMetrics", /* @__PURE__ */ new Map()), l(this, "circuitBreakers", /* @__PURE__ */ new Map()), l(this, "errorQueue", []), l(this, "batchTimer"), l(this, "maxFailuresBeforeCircuitBreak", 3), l(this, "circuitBreakerResetTime", 3e4), l(this, "errorBatchSize", 10), l(this, "errorBatchTimeout", 1e3), l(this, "maxErrorHistory", 100);
|
|
356
|
-
}
|
|
357
|
-
handleInstallError(e, r) {
|
|
358
|
-
const s = `install:${e.name}`;
|
|
359
|
-
if (this.recordError(s, r), this.isCircuitOpen(s)) {
|
|
360
|
-
process.env.NODE_ENV === "development" && console.warn(`🚫 Circuit breaker open for plugin ${e.name}, skipping detailed error handling`);
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
process.env.NODE_ENV === "development" && console.error(`❌ Failed to install plugin ${e.name}:`, r), r instanceof a && (this.recordErrorType(s, `plugin-error-${r.code}`), process.env.NODE_ENV === "development" && console.warn(`Plugin ${e.name} installation failed with code: ${r.code}`)), r.message.includes("dependencies") && (this.recordErrorType(s, "dependency-error"), process.env.NODE_ENV === "development" && console.warn(`Plugin ${e.name} has unmet dependencies`)), this.queueError("plugin-install-failed", { plugin: { name: e.name, version: e.version }, error: r.message });
|
|
364
|
-
}
|
|
365
|
-
handleRuntimeError(e, r) {
|
|
366
|
-
const s = `runtime:${e}`;
|
|
367
|
-
this.recordError(s, r), !this.isCircuitOpen(s) && (process.env.NODE_ENV === "development" && console.error(`❌ Runtime error in plugin ${e}:`, r), r instanceof a && r.code === "CRITICAL" ? (this.recordErrorType(s, "critical-error"), process.env.NODE_ENV === "development" && console.warn(`Plugin ${e} encountered a critical error`), this.queueError("plugin-critical-error", { pluginName: e, error: r.message })) : (this.recordErrorType(s, "runtime-error"), this.queueError("plugin-runtime-error", { pluginName: e, error: r.message })));
|
|
368
|
-
}
|
|
369
|
-
handleUninstallError(e, r) {
|
|
370
|
-
const s = `uninstall:${e}`;
|
|
371
|
-
this.recordError(s, r), process.env.NODE_ENV === "development" && (console.error(`❌ Failed to uninstall plugin ${e}:`, r), console.warn(`Plugin ${e} may not have cleaned up properly`)), this.queueError("plugin-uninstall-error", { pluginName: e, error: r.message });
|
|
372
|
-
}
|
|
373
|
-
recordError(e, r) {
|
|
374
|
-
const s = performance.now();
|
|
375
|
-
this.errorMetrics.has(e) || this.errorMetrics.set(e, {
|
|
376
|
-
count: 0,
|
|
377
|
-
lastOccurrence: s,
|
|
378
|
-
firstOccurrence: s,
|
|
379
|
-
errorTypes: /* @__PURE__ */ new Map(),
|
|
380
|
-
resolved: !1
|
|
381
|
-
});
|
|
382
|
-
const i = this.errorMetrics.get(e);
|
|
383
|
-
i.count++, i.lastOccurrence = s, i.resolved = !1, this.updateCircuitBreaker(e);
|
|
384
|
-
}
|
|
385
|
-
recordErrorType(e, r) {
|
|
386
|
-
const s = this.errorMetrics.get(e);
|
|
387
|
-
if (s) {
|
|
388
|
-
const i = s.errorTypes.get(r) || 0;
|
|
389
|
-
s.errorTypes.set(r, i + 1);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
updateCircuitBreaker(e) {
|
|
393
|
-
this.circuitBreakers.has(e) || this.circuitBreakers.set(e, {
|
|
394
|
-
isOpen: !1,
|
|
395
|
-
failureCount: 0,
|
|
396
|
-
lastFailureTime: 0
|
|
397
|
-
});
|
|
398
|
-
const r = this.circuitBreakers.get(e);
|
|
399
|
-
r.failureCount++, r.lastFailureTime = performance.now(), r.failureCount >= this.maxFailuresBeforeCircuitBreak && !r.isOpen && (r.isOpen = !0, process.env.NODE_ENV === "development" && console.warn(`🚫 Circuit breaker opened for ${e} after ${r.failureCount} failures`), r.resetTimeout = window.setTimeout(() => {
|
|
400
|
-
this.resetCircuitBreaker(e);
|
|
401
|
-
}, this.circuitBreakerResetTime));
|
|
402
|
-
}
|
|
403
|
-
isCircuitOpen(e) {
|
|
404
|
-
const r = this.circuitBreakers.get(e);
|
|
405
|
-
return r ? r.isOpen : !1;
|
|
406
|
-
}
|
|
407
|
-
resetCircuitBreaker(e) {
|
|
408
|
-
const r = this.circuitBreakers.get(e);
|
|
409
|
-
r && (r.isOpen = !1, r.failureCount = 0, r.resetTimeout && (clearTimeout(r.resetTimeout), r.resetTimeout = void 0), process.env.NODE_ENV === "development" && console.log(`🔄 Circuit breaker reset for ${e}`));
|
|
410
|
-
}
|
|
411
|
-
queueError(e, r) {
|
|
412
|
-
this.errorQueue.push({
|
|
413
|
-
type: e,
|
|
414
|
-
data: r,
|
|
415
|
-
timestamp: performance.now()
|
|
416
|
-
}), this.errorQueue.length > this.maxErrorHistory && (this.errorQueue = this.errorQueue.slice(-this.maxErrorHistory)), this.errorQueue.length >= this.errorBatchSize ? this.flushErrorQueue() : this.batchTimer || (this.batchTimer = window.setTimeout(() => {
|
|
417
|
-
this.flushErrorQueue();
|
|
418
|
-
}, this.errorBatchTimeout));
|
|
419
|
-
}
|
|
420
|
-
flushErrorQueue() {
|
|
421
|
-
if (this.errorQueue.length === 0) return;
|
|
422
|
-
const e = [...this.errorQueue];
|
|
423
|
-
this.errorQueue = [], this.batchTimer && (clearTimeout(this.batchTimer), this.batchTimer = void 0);
|
|
424
|
-
for (const r of e)
|
|
425
|
-
this.emitError(r.type, r.data);
|
|
426
|
-
process.env.NODE_ENV === "development" && e.length > 1 && console.log(`📦 Processed ${e.length} batched errors`);
|
|
427
|
-
}
|
|
428
|
-
emitError(e, r) {
|
|
429
|
-
typeof window < "u" ? window.dispatchEvent(new CustomEvent(`tachui:${e}`, { detail: r })) : typeof process < "u" && process.emit && process.emit(`tachui:${e}`, r);
|
|
430
|
-
}
|
|
431
|
-
// Performance monitoring methods
|
|
432
|
-
getErrorMetrics(e) {
|
|
433
|
-
return e ? this.errorMetrics.get(e) || {
|
|
434
|
-
count: 0,
|
|
435
|
-
lastOccurrence: 0,
|
|
436
|
-
firstOccurrence: 0,
|
|
437
|
-
errorTypes: /* @__PURE__ */ new Map(),
|
|
438
|
-
resolved: !0
|
|
439
|
-
} : new Map(this.errorMetrics);
|
|
440
|
-
}
|
|
441
|
-
getCircuitBreakerStatus(e) {
|
|
442
|
-
return e ? this.circuitBreakers.get(e) || {
|
|
443
|
-
isOpen: !1,
|
|
444
|
-
failureCount: 0,
|
|
445
|
-
lastFailureTime: 0
|
|
446
|
-
} : new Map(this.circuitBreakers);
|
|
447
|
-
}
|
|
448
|
-
getPerformanceStats() {
|
|
449
|
-
const e = Array.from(this.errorMetrics.entries()), r = e.reduce((n, [, o]) => n + o.count, 0), s = Array.from(this.circuitBreakers.values()).filter((n) => n.isOpen).length, i = /* @__PURE__ */ new Map();
|
|
450
|
-
for (const [, n] of e)
|
|
451
|
-
for (const [o, c] of n.errorTypes)
|
|
452
|
-
i.set(o, (i.get(o) || 0) + c);
|
|
453
|
-
return {
|
|
454
|
-
totalErrors: r,
|
|
455
|
-
uniqueErrorKeys: this.errorMetrics.size,
|
|
456
|
-
activeCircuitBreakers: s,
|
|
457
|
-
queuedErrors: this.errorQueue.length,
|
|
458
|
-
errorsByType: Object.fromEntries(i),
|
|
459
|
-
memoryUsage: {
|
|
460
|
-
errorMetrics: this.errorMetrics.size,
|
|
461
|
-
circuitBreakers: this.circuitBreakers.size,
|
|
462
|
-
queuedErrors: this.errorQueue.length,
|
|
463
|
-
estimatedMemoryKB: this.errorMetrics.size * 2 + this.circuitBreakers.size * 1 + this.errorQueue.length * 0.5
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
markErrorResolved(e) {
|
|
468
|
-
const r = this.errorMetrics.get(e);
|
|
469
|
-
r && (r.resolved = !0, this.resetCircuitBreaker(e));
|
|
470
|
-
}
|
|
471
|
-
clearErrorHistory(e) {
|
|
472
|
-
e ? (this.errorMetrics.delete(e), this.circuitBreakers.delete(e)) : (this.errorMetrics.clear(), this.circuitBreakers.clear(), this.errorQueue = [], this.batchTimer && (clearTimeout(this.batchTimer), this.batchTimer = void 0));
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
const S = new p(), W = p, A = {
|
|
476
|
-
/**
|
|
477
|
-
* Safely execute plugin operation with error handling
|
|
478
|
-
*/
|
|
479
|
-
async safeExecute(t, e, r) {
|
|
480
|
-
try {
|
|
481
|
-
return await r();
|
|
482
|
-
} catch (s) {
|
|
483
|
-
console.error(`❌ [${t}] ${e} failed:`, s), S.handleRuntimeError(t, s);
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
/**
|
|
488
|
-
* Create an error boundary for plugin operations
|
|
489
|
-
*/
|
|
490
|
-
createErrorBoundary(t) {
|
|
491
|
-
return {
|
|
492
|
-
async exec(e) {
|
|
493
|
-
return A.safeExecute(t, "operation", e);
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
function V(t) {
|
|
499
|
-
if (!t.metadata)
|
|
352
|
+
function S(s) {
|
|
353
|
+
if (!s.metadata)
|
|
500
354
|
throw new a("Legacy plugin must have metadata property");
|
|
501
|
-
if (!
|
|
355
|
+
if (!s.metadata.name || !s.metadata.version)
|
|
502
356
|
throw new a("Legacy plugin metadata must include name and version");
|
|
503
357
|
return {
|
|
504
|
-
name:
|
|
505
|
-
version:
|
|
506
|
-
description:
|
|
358
|
+
name: s.metadata.name,
|
|
359
|
+
version: s.metadata.version,
|
|
360
|
+
description: s.metadata.description,
|
|
507
361
|
async install(e) {
|
|
508
|
-
process.env.NODE_ENV === "development" && console.warn(`⚠️ Using legacy adapter for plugin "${
|
|
362
|
+
process.env.NODE_ENV === "development" && console.warn(`⚠️ Using legacy adapter for plugin "${s.metadata.name}". Consider updating to simplified API.`), await s.initialize(e);
|
|
509
363
|
},
|
|
510
364
|
async uninstall() {
|
|
511
|
-
|
|
365
|
+
s.cleanup && await s.cleanup();
|
|
512
366
|
}
|
|
513
367
|
};
|
|
514
368
|
}
|
|
515
|
-
function
|
|
516
|
-
return
|
|
369
|
+
function C(s) {
|
|
370
|
+
return s && typeof s == "object" && s.metadata && typeof s.metadata.name == "string" && typeof s.metadata.version == "string" && typeof s.initialize == "function";
|
|
517
371
|
}
|
|
518
|
-
function
|
|
519
|
-
return
|
|
372
|
+
function H(s) {
|
|
373
|
+
return C(s) ? S(s) : s;
|
|
520
374
|
}
|
|
521
375
|
export {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
p as OptimizedPluginErrorHandler,
|
|
525
|
-
U as PluginDevUtils,
|
|
376
|
+
F as OptimizedLazyPluginLoader,
|
|
377
|
+
B as PluginDevUtils,
|
|
526
378
|
a as PluginError,
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
k as installPlugin,
|
|
539
|
-
x as isLegacyPlugin,
|
|
379
|
+
I as SimplifiedComponentRegistry,
|
|
380
|
+
F as SimplifiedLazyPluginLoader,
|
|
381
|
+
y as SimplifiedPluginManager,
|
|
382
|
+
b as SimplifiedTachUIInstance,
|
|
383
|
+
H as adaptPlugin,
|
|
384
|
+
R as compareSemver,
|
|
385
|
+
U as createLazyPlugin,
|
|
386
|
+
S as createLegacyPluginAdapter,
|
|
387
|
+
g as globalTachUIInstance,
|
|
388
|
+
D as installPlugin,
|
|
389
|
+
C as isLegacyPlugin,
|
|
540
390
|
j as normalizePluginName,
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
391
|
+
T as registerComponent,
|
|
392
|
+
x as registerService,
|
|
393
|
+
V as validatePluginName,
|
|
394
|
+
m as validateSemver
|
|
545
395
|
};
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { SimplifiedPluginManager } from './simplified-plugin-manager';
|
|
8
8
|
export { SimplifiedComponentRegistry } from './simplified-component-registry';
|
|
9
|
-
export { SimplifiedTachUIInstance, globalTachUIInstance, installPlugin, registerComponent, registerService } from './simplified-tachui-instance';
|
|
10
|
-
export type { TachUIPlugin, TachUIInstance, ComponentRegistrationOptions, ServiceRegistration } from './simplified-types';
|
|
9
|
+
export { SimplifiedTachUIInstance, globalTachUIInstance, installPlugin, registerComponent, registerService, } from './simplified-tachui-instance';
|
|
10
|
+
export type { TachUIPlugin, TachUIInstance, ComponentRegistrationOptions, ServiceRegistration, } from './simplified-types';
|
|
11
11
|
export { PluginError } from './simplified-types';
|
|
12
12
|
export type { ComponentRegistration } from './simplified-component-registry';
|
|
13
|
-
export { validateSemver, compareSemver, validatePluginName, normalizePluginName, PluginDevUtils } from './simplified-utils';
|
|
14
|
-
export { OptimizedLazyPluginLoader, createLazyPlugin, OptimizedLazyPluginLoader as SimplifiedLazyPluginLoader } from './simplified-lazy-loader';
|
|
15
|
-
export {
|
|
16
|
-
export { createLegacyPluginAdapter, isLegacyPlugin, adaptPlugin } from './legacy-adapter';
|
|
13
|
+
export { validateSemver, compareSemver, validatePluginName, normalizePluginName, PluginDevUtils, } from './simplified-utils';
|
|
14
|
+
export { OptimizedLazyPluginLoader, createLazyPlugin, OptimizedLazyPluginLoader as SimplifiedLazyPluginLoader, } from './simplified-lazy-loader';
|
|
15
|
+
export { createLegacyPluginAdapter, isLegacyPlugin, adaptPlugin, } from './legacy-adapter';
|
|
17
16
|
//# sourceMappingURL=simplified-index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simplified-index.d.ts","sourceRoot":"","sources":["../../src/plugins/simplified-index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAC7E,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,
|
|
1
|
+
{"version":3,"file":"simplified-index.d.ts","sourceRoot":"","sources":["../../src/plugins/simplified-index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAC7E,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,8BAA8B,CAAA;AAGrC,YAAY,EACV,YAAY,EACZ,cAAc,EACd,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhD,YAAY,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAG5E,OAAO,EACL,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,GACf,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAEhB,yBAAyB,IAAI,0BAA0B,GACxD,MAAM,0BAA0B,CAAA;AAMjC,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,WAAW,GACZ,MAAM,kBAAkB,CAAA"}
|