@tachui/core 0.7.1-alpha → 0.8.1-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.
Files changed (286) hide show
  1. package/README.md +20 -2
  2. package/dist/bundles/assets.d.ts +19 -0
  3. package/dist/bundles/assets.d.ts.map +1 -0
  4. package/dist/bundles/common.d.ts +1 -1
  5. package/dist/bundles/common.d.ts.map +1 -1
  6. package/dist/bundles/context.d.ts +22 -0
  7. package/dist/bundles/context.d.ts.map +1 -0
  8. package/dist/bundles/minimal.d.ts +8 -18
  9. package/dist/bundles/minimal.d.ts.map +1 -1
  10. package/dist/bundles/production-minimal.d.ts +2 -16
  11. package/dist/bundles/production-minimal.d.ts.map +1 -1
  12. package/dist/common.js +405 -828
  13. package/dist/compiler/advanced-parser.d.ts.map +1 -1
  14. package/dist/compiler/codegen.d.ts.map +1 -1
  15. package/dist/compiler/index.js +6 -1387
  16. package/dist/compiler/parser.d.ts +1 -1
  17. package/dist/compiler/parser.d.ts.map +1 -1
  18. package/dist/compiler/plugin.d.ts.map +1 -1
  19. package/dist/compiler/types.d.ts +28 -0
  20. package/dist/compiler/types.d.ts.map +1 -1
  21. package/dist/component-XAzF1xqs.js +487 -0
  22. package/dist/component-base-x2XmHFjy.js +255 -0
  23. package/dist/components/index.d.ts +4 -38
  24. package/dist/components/index.d.ts.map +1 -1
  25. package/dist/components/index.js +7 -4167
  26. package/dist/components/wrapper.d.ts +5 -152
  27. package/dist/components/wrapper.d.ts.map +1 -1
  28. package/dist/concatenated-component-ByPl3_FF.js +2933 -0
  29. package/dist/constants/index.d.ts +1 -1
  30. package/dist/constants/layout.d.ts +47 -4
  31. package/dist/constants/layout.d.ts.map +1 -1
  32. package/dist/constants/layout.js +84 -0
  33. package/dist/css-classes/index.js +176 -0
  34. package/dist/{dom-bridge-Cx-s6Ihx.js → dom-bridge-CAa1N2zX.js} +28 -28
  35. package/dist/{effect-CytAc9em.js → effect-B9Knft0b.js} +3 -3
  36. package/dist/essential.js +397 -826
  37. package/dist/index-DEBd8cq7.js +1144 -0
  38. package/dist/index-DIvMCJQO.js +268 -0
  39. package/dist/index-vdsiw6gQ.js +777 -0
  40. package/dist/index.d.ts +9 -9
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +397 -826
  43. package/dist/minimal-prod.js +101 -155
  44. package/dist/minimal.js +118 -170
  45. package/dist/modifiers/background.d.ts +41 -11
  46. package/dist/modifiers/background.d.ts.map +1 -1
  47. package/dist/modifiers/base.d.ts +6 -33
  48. package/dist/modifiers/base.d.ts.map +1 -1
  49. package/dist/modifiers/base.js +487 -0
  50. package/dist/modifiers/builder.d.ts +103 -195
  51. package/dist/modifiers/builder.d.ts.map +1 -1
  52. package/dist/modifiers/builder.js +9 -0
  53. package/dist/modifiers/core.d.ts +9 -401
  54. package/dist/modifiers/core.d.ts.map +1 -1
  55. package/dist/modifiers/{utils.d.ts → factories.d.ts} +18 -5
  56. package/dist/modifiers/factories.d.ts.map +1 -0
  57. package/dist/modifiers/index.d.ts +8 -52
  58. package/dist/modifiers/index.d.ts.map +1 -1
  59. package/dist/modifiers/index.js +38 -0
  60. package/dist/modifiers/presets.d.ts +368 -0
  61. package/dist/modifiers/presets.d.ts.map +1 -0
  62. package/dist/modifiers/registry.js +10 -0
  63. package/dist/modifiers/types.d.ts +39 -211
  64. package/dist/modifiers/types.d.ts.map +1 -1
  65. package/dist/modifiers/types.js +4 -0
  66. package/dist/observed-object-Cos-FtjP.js +269 -0
  67. package/dist/performance-optimizer-stub-CtfXUwl4.js +38 -0
  68. package/dist/plugin-BCAdZXKq.js +1680 -0
  69. package/dist/plugins/index.d.ts +5 -6
  70. package/dist/plugins/index.d.ts.map +1 -1
  71. package/dist/plugins/index.js +147 -297
  72. package/dist/plugins/simplified-index.d.ts +5 -6
  73. package/dist/plugins/simplified-index.d.ts.map +1 -1
  74. package/dist/production-minimal-BY_gMc-l.js +2532 -0
  75. package/dist/reactive/index.js +96 -95
  76. package/dist/reactive/types.js +4 -0
  77. package/dist/runtime/concatenation-aria.d.ts +24 -0
  78. package/dist/runtime/concatenation-aria.d.ts.map +1 -0
  79. package/dist/runtime/concatenation-aria.js +53 -0
  80. package/dist/runtime/concatenation-full.d.ts +30 -0
  81. package/dist/runtime/concatenation-full.d.ts.map +1 -0
  82. package/dist/runtime/concatenation-full.js +77 -0
  83. package/dist/runtime/concatenation-minimal.d.ts +25 -0
  84. package/dist/runtime/concatenation-minimal.d.ts.map +1 -0
  85. package/dist/runtime/concatenation-minimal.js +40 -0
  86. package/dist/runtime/dom-bridge.js +5 -5
  87. package/dist/runtime/element-override.d.ts.map +1 -1
  88. package/dist/runtime/index.d.ts +0 -7
  89. package/dist/runtime/index.d.ts.map +1 -1
  90. package/dist/runtime/renderer.d.ts.map +1 -1
  91. package/dist/runtime/renderer.js +7 -8
  92. package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
  93. package/dist/runtime/types.js +1 -0
  94. package/dist/{scheduler-7SvC3a21.js → scheduler-BKeqwrYE.js} +130 -130
  95. package/dist/validation/build-time-stub.d.ts +33 -0
  96. package/dist/validation/build-time-stub.d.ts.map +1 -0
  97. package/dist/validation/debug-tools-stub.d.ts +67 -0
  98. package/dist/validation/debug-tools-stub.d.ts.map +1 -0
  99. package/dist/validation/index.d.ts +23 -78
  100. package/dist/validation/index.d.ts.map +1 -1
  101. package/dist/validation/index.js +609 -6470
  102. package/dist/validation/lifecycle-validation.d.ts.map +1 -1
  103. package/dist/validation/performance-optimizer-stub.d.ts +50 -0
  104. package/dist/validation/performance-optimizer-stub.d.ts.map +1 -0
  105. package/dist/validation/plugin-registration.d.ts +5 -1
  106. package/dist/validation/plugin-registration.d.ts.map +1 -1
  107. package/dist/validation/production-bypass-core.d.ts +69 -0
  108. package/dist/validation/production-bypass-core.d.ts.map +1 -0
  109. package/package.json +61 -5
  110. package/dist/ScrollView-h-6wYMAm.js +0 -515
  111. package/dist/Spacer-BbteDQ9I.js +0 -5337
  112. package/dist/binding-CmdpowkI.js +0 -2276
  113. package/dist/components/BasicInput.d.ts +0 -116
  114. package/dist/components/BasicInput.d.ts.map +0 -1
  115. package/dist/components/Button.d.ts +0 -252
  116. package/dist/components/Button.d.ts.map +0 -1
  117. package/dist/components/Divider.d.ts +0 -141
  118. package/dist/components/Divider.d.ts.map +0 -1
  119. package/dist/components/EnhancedLink.d.ts +0 -365
  120. package/dist/components/EnhancedLink.d.ts.map +0 -1
  121. package/dist/components/Form.d.ts +0 -141
  122. package/dist/components/Form.d.ts.map +0 -1
  123. package/dist/components/Grid.d.ts +0 -698
  124. package/dist/components/Grid.d.ts.map +0 -1
  125. package/dist/components/GridResponsive.d.ts +0 -214
  126. package/dist/components/GridResponsive.d.ts.map +0 -1
  127. package/dist/components/Image.d.ts +0 -162
  128. package/dist/components/Image.d.ts.map +0 -1
  129. package/dist/components/List.d.ts +0 -287
  130. package/dist/components/List.d.ts.map +0 -1
  131. package/dist/components/Menu.d.ts +0 -159
  132. package/dist/components/Menu.d.ts.map +0 -1
  133. package/dist/components/Picker.d.ts +0 -153
  134. package/dist/components/Picker.d.ts.map +0 -1
  135. package/dist/components/ScrollView.d.ts +0 -222
  136. package/dist/components/ScrollView.d.ts.map +0 -1
  137. package/dist/components/Section.d.ts +0 -153
  138. package/dist/components/Section.d.ts.map +0 -1
  139. package/dist/components/Show.d.ts +0 -64
  140. package/dist/components/Show.d.ts.map +0 -1
  141. package/dist/components/Spacer.d.ts +0 -35
  142. package/dist/components/Spacer.d.ts.map +0 -1
  143. package/dist/components/Text.d.ts +0 -242
  144. package/dist/components/Text.d.ts.map +0 -1
  145. package/dist/components/Toggle.d.ts +0 -207
  146. package/dist/components/Toggle.d.ts.map +0 -1
  147. package/dist/concatenated-component-DPcl2TEO.js +0 -6779
  148. package/dist/context--zQFIImS.js +0 -283
  149. package/dist/debug/index.d.ts +0 -61
  150. package/dist/debug/index.d.ts.map +0 -1
  151. package/dist/debug.js +0 -178
  152. package/dist/developer-experience/enhanced-errors.d.ts +0 -128
  153. package/dist/developer-experience/enhanced-errors.d.ts.map +0 -1
  154. package/dist/developer-experience/enhanced-types.d.ts +0 -281
  155. package/dist/developer-experience/enhanced-types.d.ts.map +0 -1
  156. package/dist/developer-experience/index.d.ts +0 -44
  157. package/dist/developer-experience/index.d.ts.map +0 -1
  158. package/dist/index-Nfi2SBQh.js +0 -3268
  159. package/dist/modifiers/attributes.d.ts +0 -203
  160. package/dist/modifiers/attributes.d.ts.map +0 -1
  161. package/dist/modifiers/backdrop.d.ts +0 -59
  162. package/dist/modifiers/backdrop.d.ts.map +0 -1
  163. package/dist/modifiers/border.d.ts +0 -217
  164. package/dist/modifiers/border.d.ts.map +0 -1
  165. package/dist/modifiers/effects.d.ts +0 -159
  166. package/dist/modifiers/effects.d.ts.map +0 -1
  167. package/dist/modifiers/elements.d.ts +0 -240
  168. package/dist/modifiers/elements.d.ts.map +0 -1
  169. package/dist/modifiers/filters.d.ts +0 -275
  170. package/dist/modifiers/filters.d.ts.map +0 -1
  171. package/dist/modifiers/flexbox.d.ts +0 -82
  172. package/dist/modifiers/flexbox.d.ts.map +0 -1
  173. package/dist/modifiers/font.d.ts +0 -71
  174. package/dist/modifiers/font.d.ts.map +0 -1
  175. package/dist/modifiers/grid.d.ts +0 -92
  176. package/dist/modifiers/grid.d.ts.map +0 -1
  177. package/dist/modifiers/margin.d.ts +0 -128
  178. package/dist/modifiers/margin.d.ts.map +0 -1
  179. package/dist/modifiers/padding.d.ts +0 -204
  180. package/dist/modifiers/padding.d.ts.map +0 -1
  181. package/dist/modifiers/responsive/advanced-utilities.d.ts +0 -118
  182. package/dist/modifiers/responsive/advanced-utilities.d.ts.map +0 -1
  183. package/dist/modifiers/responsive/breakpoints.d.ts +0 -81
  184. package/dist/modifiers/responsive/breakpoints.d.ts.map +0 -1
  185. package/dist/modifiers/responsive/css-generator.d.ts +0 -100
  186. package/dist/modifiers/responsive/css-generator.d.ts.map +0 -1
  187. package/dist/modifiers/responsive/dev-tools.d.ts +0 -107
  188. package/dist/modifiers/responsive/dev-tools.d.ts.map +0 -1
  189. package/dist/modifiers/responsive/index.d.ts +0 -29
  190. package/dist/modifiers/responsive/index.d.ts.map +0 -1
  191. package/dist/modifiers/responsive/layout-patterns.d.ts +0 -230
  192. package/dist/modifiers/responsive/layout-patterns.d.ts.map +0 -1
  193. package/dist/modifiers/responsive/performance.d.ts +0 -130
  194. package/dist/modifiers/responsive/performance.d.ts.map +0 -1
  195. package/dist/modifiers/responsive/responsive-builder.d.ts +0 -133
  196. package/dist/modifiers/responsive/responsive-builder.d.ts.map +0 -1
  197. package/dist/modifiers/responsive/responsive-modifier.d.ts +0 -123
  198. package/dist/modifiers/responsive/responsive-modifier.d.ts.map +0 -1
  199. package/dist/modifiers/responsive/types.d.ts +0 -183
  200. package/dist/modifiers/responsive/types.d.ts.map +0 -1
  201. package/dist/modifiers/responsive/utilities.d.ts +0 -149
  202. package/dist/modifiers/responsive/utilities.d.ts.map +0 -1
  203. package/dist/modifiers/scroll.d.ts +0 -143
  204. package/dist/modifiers/scroll.d.ts.map +0 -1
  205. package/dist/modifiers/shadows.d.ts +0 -114
  206. package/dist/modifiers/shadows.d.ts.map +0 -1
  207. package/dist/modifiers/size.d.ts +0 -113
  208. package/dist/modifiers/size.d.ts.map +0 -1
  209. package/dist/modifiers/text.d.ts +0 -147
  210. package/dist/modifiers/text.d.ts.map +0 -1
  211. package/dist/modifiers/transformations.d.ts +0 -329
  212. package/dist/modifiers/transformations.d.ts.map +0 -1
  213. package/dist/modifiers/transitions.d.ts +0 -98
  214. package/dist/modifiers/transitions.d.ts.map +0 -1
  215. package/dist/modifiers/typography.d.ts +0 -192
  216. package/dist/modifiers/typography.d.ts.map +0 -1
  217. package/dist/modifiers/utility.d.ts +0 -69
  218. package/dist/modifiers/utility.d.ts.map +0 -1
  219. package/dist/modifiers/utils.d.ts.map +0 -1
  220. package/dist/plugins/simplified-error-handler.d.ts +0 -83
  221. package/dist/plugins/simplified-error-handler.d.ts.map +0 -1
  222. package/dist/runtime/dev-tools.d.ts +0 -240
  223. package/dist/runtime/dev-tools.d.ts.map +0 -1
  224. package/dist/runtime/development-warnings.d.ts +0 -42
  225. package/dist/runtime/development-warnings.d.ts.map +0 -1
  226. package/dist/runtime/error-boundary.d.ts +0 -302
  227. package/dist/runtime/error-boundary.d.ts.map +0 -1
  228. package/dist/runtime/error-recovery.d.ts +0 -267
  229. package/dist/runtime/error-recovery.d.ts.map +0 -1
  230. package/dist/runtime/error-reporting.d.ts +0 -287
  231. package/dist/runtime/error-reporting.d.ts.map +0 -1
  232. package/dist/runtime/error-utils.d.ts +0 -204
  233. package/dist/runtime/error-utils.d.ts.map +0 -1
  234. package/dist/runtime/performance.d.ts +0 -217
  235. package/dist/runtime/performance.d.ts.map +0 -1
  236. package/dist/sui-compat.d.ts +0 -110
  237. package/dist/sui-compat.d.ts.map +0 -1
  238. package/dist/validation/advanced-debugging.d.ts +0 -319
  239. package/dist/validation/advanced-debugging.d.ts.map +0 -1
  240. package/dist/validation/build-time/detection.d.ts +0 -32
  241. package/dist/validation/build-time/detection.d.ts.map +0 -1
  242. package/dist/validation/build-time/index.d.ts +0 -84
  243. package/dist/validation/build-time/index.d.ts.map +0 -1
  244. package/dist/validation/build-time/plugins.d.ts +0 -75
  245. package/dist/validation/build-time/plugins.d.ts.map +0 -1
  246. package/dist/validation/build-time/rules.d.ts +0 -73
  247. package/dist/validation/build-time/rules.d.ts.map +0 -1
  248. package/dist/validation/build-time/transformer.d.ts +0 -23
  249. package/dist/validation/build-time/transformer.d.ts.map +0 -1
  250. package/dist/validation/build-time/types.d.ts +0 -212
  251. package/dist/validation/build-time/types.d.ts.map +0 -1
  252. package/dist/validation/comprehensive.d.ts +0 -160
  253. package/dist/validation/comprehensive.d.ts.map +0 -1
  254. package/dist/validation/debug-tools.d.ts +0 -251
  255. package/dist/validation/debug-tools.d.ts.map +0 -1
  256. package/dist/validation/developer-experience.d.ts +0 -243
  257. package/dist/validation/developer-experience.d.ts.map +0 -1
  258. package/dist/validation/documentation-integration.d.ts +0 -269
  259. package/dist/validation/documentation-integration.d.ts.map +0 -1
  260. package/dist/validation/enhanced-runtime.d.ts +0 -279
  261. package/dist/validation/enhanced-runtime.d.ts.map +0 -1
  262. package/dist/validation/error-reporting.d.ts +0 -186
  263. package/dist/validation/error-reporting.d.ts.map +0 -1
  264. package/dist/validation/ide-integration.d.ts +0 -328
  265. package/dist/validation/ide-integration.d.ts.map +0 -1
  266. package/dist/validation/performance-optimizer.d.ts +0 -218
  267. package/dist/validation/performance-optimizer.d.ts.map +0 -1
  268. package/dist/validation/production-bypass.d.ts +0 -175
  269. package/dist/validation/production-bypass.d.ts.map +0 -1
  270. package/dist/validation/simple.d.ts +0 -111
  271. package/dist/validation/simple.d.ts.map +0 -1
  272. package/dist/viewport/adapters/web-adapter.d.ts +0 -227
  273. package/dist/viewport/adapters/web-adapter.d.ts.map +0 -1
  274. package/dist/viewport/components.d.ts +0 -131
  275. package/dist/viewport/components.d.ts.map +0 -1
  276. package/dist/viewport/environment.d.ts +0 -75
  277. package/dist/viewport/environment.d.ts.map +0 -1
  278. package/dist/viewport/index.d.ts +0 -138
  279. package/dist/viewport/index.d.ts.map +0 -1
  280. package/dist/viewport/index.js +0 -2085
  281. package/dist/viewport/platform-detection.d.ts +0 -59
  282. package/dist/viewport/platform-detection.d.ts.map +0 -1
  283. package/dist/viewport/types.d.ts +0 -301
  284. package/dist/viewport/types.d.ts.map +0 -1
  285. package/dist/viewport/viewport-manager.d.ts +0 -118
  286. package/dist/viewport/viewport-manager.d.ts.map +0 -1
@@ -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 { OptimizedPluginErrorHandler, SimplifiedPluginErrorHandler, globalPluginErrorHandler, ErrorRecoveryUtils } from './simplified-error-handler';
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=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/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,EAChB,MAAM,8BAA8B,CAAA;AAGrC,YAAY,EACV,YAAY,EACZ,cAAc,EACd,4BAA4B,EAC5B,mBAAmB,EACpB,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,EACf,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAEhB,yBAAyB,IAAI,0BAA0B,EACxD,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,WAAW,EACZ,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/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;AAKjC,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,WAAW,GACZ,MAAM,kBAAkB,CAAA"}
@@ -1,25 +1,25 @@
1
- var E = Object.defineProperty, y = (t, e, r) => e in t ? E(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, f = (t, e, r) => y(t, typeof e != "symbol" ? e + "" : e, r);
2
- let d = class extends Error {
3
- constructor(e, r) {
4
- super(e), this.code = r, this.name = "PluginError";
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
- f(this, "plugins", /* @__PURE__ */ new Map()), f(this, "instance"), this.instance = e;
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 r = this.plugins.get(e);
16
- if (!r)
17
- throw new d(`Plugin "${e}" is not installed`);
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
- r.uninstall && await r.uninstall(), console.log(`🗑️ Plugin "${e}" uninstalled successfully`);
21
- } catch (s) {
22
- throw console.log(`🗑️ Plugin "${e}" uninstalled successfully (cleanup failed)`), s;
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 d("Plugin must have a valid name string", "INVALID_NAME");
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 d("Plugin must have a valid version string", "INVALID_VERSION");
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 d("Plugin must have an install function", "INVALID_INSTALL");
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 _ = Object.defineProperty, M = (t, e, r) => e in t ? _(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, T = (t, e, r) => M(t, e + "", r);
48
- class b {
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
- T(this, "components", /* @__PURE__ */ new Map());
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((r) => r.category === e);
72
+ return this.list().filter((t) => t.category === e);
73
73
  }
74
74
  listByPlugin(e) {
75
- return this.list().filter((r) => r.plugin === e);
75
+ return this.list().filter((t) => t.plugin === e);
76
76
  }
77
77
  unregister(e) {
78
- const r = this.components.has(e);
79
- return this.components.delete(e), r && console.log(`🗑️ Component "${e}" unregistered`), r;
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 r = [];
83
- for (const [s, i] of this.components.entries())
84
- i.plugin === e && (this.components.delete(s), r.push(s));
85
- return r.length > 0 && console.log(`🗑️ Unregistered ${r.length} components from plugin "${e}": ${r.join(", ")}`), r;
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 r of this.components.values()) {
99
- const s = r.category || "uncategorized";
100
- e.categories.set(s, (e.categories.get(s) || 0) + 1);
101
- const i = r.plugin || "core";
102
- if (e.plugins.set(i, (e.plugins.get(i) || 0) + 1), r.tags)
103
- for (const n of r.tags)
104
- e.tags.set(n, (e.tags.get(n) || 0) + 1);
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 C = Object.defineProperty, O = (t, e, r) => e in t ? C(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, h = (t, e, r) => O(t, typeof e != "symbol" ? e + "" : e, r);
115
- class B {
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
- h(this, "plugins"), h(this, "components"), h(this, "services"), h(this, "currentInstallingPlugin", null), this.components = new b(), this.services = /* @__PURE__ */ new Map(), this.plugins = new $(this);
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, r, s) {
119
+ registerComponent(e, t, n) {
120
120
  this.components.register({
121
121
  name: e,
122
- component: r,
123
- category: s?.category,
124
- tags: s?.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, r) {
129
- this.services.has(e) && !this.services.get(e) && console.warn(`Service "${e}" already registered, overwriting`), this.services.set(e, r), console.log(`⚙️ Service "${e}" registered`);
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 r = this.services.has(e);
139
- return this.services.delete(e), r && console.log(`🗑️ Service "${e}" unregistered`), r;
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 r of e)
173
+ for (const t of e)
174
174
  try {
175
- await this.uninstallPlugin(r);
176
- } catch (s) {
177
- console.error(`Failed to uninstall plugin "${r}":`, s);
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 m = new B();
183
- function k(t) {
184
- return m.installPlugin(t);
182
+ const g = new b();
183
+ function D(s) {
184
+ return g.installPlugin(s);
185
185
  }
186
- function F(t, e, r) {
187
- return m.registerComponent(t, e, r);
186
+ function T(s, e, t) {
187
+ return g.registerComponent(s, e, t);
188
188
  }
189
- function Q(t, e) {
190
- return m.registerService(t, e);
189
+ function x(s, e) {
190
+ return g.registerService(s, e);
191
191
  }
192
192
  class a extends Error {
193
- constructor(e, r) {
194
- super(e), this.code = r, this.name = "PluginError";
193
+ constructor(e, t) {
194
+ super(e), this.code = t, this.name = "PluginError";
195
195
  }
196
196
  }
197
- function g(t) {
198
- return !t || typeof t != "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(t);
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 N(t, e) {
201
- if (!g(t) || !g(e))
200
+ function R(s, e) {
201
+ if (!m(s) || !m(e))
202
202
  throw new Error("Invalid semantic version format");
203
- const r = (n) => {
204
- const [o, c] = n.split("-"), [v, w, P] = o.split(".").map(Number);
205
- return { major: v, minor: w, patch: P, prerelease: c };
206
- }, s = r(t), i = r(e);
207
- return s.major !== i.major ? s.major < i.major ? -1 : 1 : s.minor !== i.minor ? s.minor < i.minor ? -1 : 1 : s.patch !== i.patch ? s.patch < i.patch ? -1 : 1 : s.prerelease && i.prerelease ? s.prerelease < i.prerelease ? -1 : s.prerelease > i.prerelease ? 1 : 0 : s.prerelease && !i.prerelease ? -1 : !s.prerelease && i.prerelease ? 1 : 0;
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 H(t) {
210
- return !t || typeof t != "string" ? !1 : /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(t);
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(t) {
213
- return t.replace(/^@[^/]+\//, "");
212
+ function j(s) {
213
+ return s.replace(/^@[^/]+\//, "");
214
214
  }
215
- const U = {
215
+ const B = {
216
216
  /**
217
217
  * Logs plugin debug information in development mode
218
218
  */
219
- log(t, e, r) {
220
- process.env.NODE_ENV === "development" && (console.group(`🔌 [${t}]`), console.log(e), r && console.log("Data:", r), console.groupEnd());
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(t, e) {
226
- process.env.NODE_ENV === "development" && console.warn(`⚠️ [${t}] ${e}`);
225
+ warn(s, e) {
226
+ process.env.NODE_ENV === "development" && console.warn(`⚠️ [${s}] ${e}`);
227
227
  }
228
228
  };
229
- var z = Object.defineProperty, I = (t, e, r) => e in t ? z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, u = (t, e, r) => I(t, typeof e != "symbol" ? e + "" : e, r);
230
- class q {
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
- u(this, "loadPromises", /* @__PURE__ */ new Map()), u(this, "loadedPlugins", /* @__PURE__ */ new Map()), u(this, "loadMetrics", /* @__PURE__ */ new Map()), u(this, "maxRetries", 3), u(this, "baseRetryDelay", 100);
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 r = this.doLoadPluginWithRetry(e);
241
- this.loadPromises.set(e, r);
240
+ const t = this.doLoadPluginWithRetry(e);
241
+ this.loadPromises.set(e, t);
242
242
  try {
243
- const s = await r;
244
- return this.loadedPlugins.set(e, s), s;
245
- } catch (s) {
246
- throw this.loadPromises.delete(e), s;
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, r = 1) {
250
- const s = {
249
+ async doLoadPluginWithRetry(e, t = 1) {
250
+ const n = {
251
251
  startTime: performance.now(),
252
- attempts: r,
252
+ attempts: t,
253
253
  success: !1,
254
254
  cacheHit: !1
255
255
  };
256
- this.loadMetrics.set(e, s);
256
+ this.loadMetrics.set(e, n);
257
257
  try {
258
- const i = await this.doLoadPlugin(e);
259
- return s.endTime = performance.now(), s.duration = s.endTime - s.startTime, s.success = !0, process.env.NODE_ENV === "development" && console.log(`🚀 Plugin "${e}" loaded in ${s.duration.toFixed(2)}ms (attempt ${r})`), i;
260
- } catch (i) {
261
- if (s.endTime = performance.now(), s.duration = s.endTime - s.startTime, r < this.maxRetries) {
262
- const n = this.baseRetryDelay * Math.pow(2, r - 1);
263
- return process.env.NODE_ENV === "development" && console.warn(`⚠️ Plugin "${e}" load failed (attempt ${r}), retrying in ${n}ms...`), await this.delay(n), this.doLoadPluginWithRetry(e, r + 1);
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 ${r} attempts`), new a(`Failed to load plugin "${e}" after ${r} attempts: ${i}`);
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 r = await import(
270
+ const t = await import(
271
271
  /* webpackChunkName: "plugin-[request]" */
272
272
  e
273
- ), s = r.default || r;
274
- if (!s || typeof s != "object")
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 (!s.name || !s.version || typeof s.install != "function")
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 s;
279
- } catch (r) {
280
- throw new a(`Dynamic import failed for "${e}": ${r}`);
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 r = this.loadMetrics.get(e);
286
- r.cacheHit = !0;
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((r) => setTimeout(r, e));
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, r]) => ({
304
+ return Array.from(this.loadMetrics.entries()).map(([e, t]) => ({
305
305
  plugin: e,
306
- metrics: r
306
+ metrics: t
307
307
  }));
308
308
  }
309
309
  getPerformanceStats() {
310
- const e = this.getAllMetrics(), r = e.filter((o) => o.metrics.success), s = e.filter((o) => !o.metrics.success), i = r.reduce((o, c) => o + (c.metrics.duration || 0), 0), n = r.length > 0 ? i / r.length : 0;
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: r.length,
314
- failed: s.length,
313
+ successful: t.length,
314
+ failed: n.length,
315
315
  cached: this.loadedPlugins.size,
316
- averageLoadTime: n,
317
- totalLoadTime: i,
318
- cacheHitRate: r.length > 0 ? r.filter((o) => o.metrics.cacheHit).length / r.length : 0
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 Z(t) {
338
+ function U(s) {
339
339
  return async () => {
340
340
  try {
341
- const e = await t(), r = "default" in e ? e.default : e;
342
- if (!r || typeof r != "object")
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 (!r.name || !r.version || typeof r.install != "function")
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 r;
346
+ return t;
347
347
  } catch (e) {
348
348
  throw new a(`Failed to load plugin: ${e}`);
349
349
  }
350
350
  };
351
351
  }
352
- var L = Object.defineProperty, D = (t, e, r) => e in t ? L(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, l = (t, e, r) => D(t, typeof e != "symbol" ? e + "" : e, r);
353
- class p {
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 (!t.metadata.name || !t.metadata.version)
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: t.metadata.name,
505
- version: t.metadata.version,
506
- description: t.metadata.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 "${t.metadata.name}". Consider updating to simplified API.`), await t.initialize(e);
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
- t.cleanup && await t.cleanup();
365
+ s.cleanup && await s.cleanup();
512
366
  }
513
367
  };
514
368
  }
515
- function x(t) {
516
- return t && typeof t == "object" && t.metadata && typeof t.metadata.name == "string" && typeof t.metadata.version == "string" && typeof t.initialize == "function";
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 G(t) {
519
- return x(t) ? V(t) : t;
372
+ function H(s) {
373
+ return C(s) ? S(s) : s;
520
374
  }
521
375
  export {
522
- A as ErrorRecoveryUtils,
523
- q as OptimizedLazyPluginLoader,
524
- p as OptimizedPluginErrorHandler,
525
- U as PluginDevUtils,
376
+ F as OptimizedLazyPluginLoader,
377
+ B as PluginDevUtils,
526
378
  a as PluginError,
527
- b as SimplifiedComponentRegistry,
528
- q as SimplifiedLazyPluginLoader,
529
- W as SimplifiedPluginErrorHandler,
530
- $ as SimplifiedPluginManager,
531
- B as SimplifiedTachUIInstance,
532
- G as adaptPlugin,
533
- N as compareSemver,
534
- Z as createLazyPlugin,
535
- V as createLegacyPluginAdapter,
536
- S as globalPluginErrorHandler,
537
- m as globalTachUIInstance,
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
- F as registerComponent,
542
- Q as registerService,
543
- H as validatePluginName,
544
- g as validateSemver
391
+ T as registerComponent,
392
+ x as registerService,
393
+ V as validatePluginName,
394
+ m as validateSemver
545
395
  };