juxscript 1.1.239 → 1.1.243

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 (297) hide show
  1. package/index.js +7 -137
  2. package/lib/components/dataframe.ts +0 -569
  3. package/lib/components/tag.ts +68 -0
  4. package/lib/styles/shadcn.css +20 -7
  5. package/lib/utils/idgen.ts +6 -0
  6. package/package.json +5 -6
  7. package/index.d.ts +0 -239
  8. package/index.d.ts.map +0 -1
  9. package/lib/components/alert.d.ts +0 -36
  10. package/lib/components/alert.d.ts.map +0 -1
  11. package/lib/components/alert.js +0 -172
  12. package/lib/components/alert.ts +0 -219
  13. package/lib/components/app.d.ts +0 -89
  14. package/lib/components/app.d.ts.map +0 -1
  15. package/lib/components/app.js +0 -175
  16. package/lib/components/app.ts +0 -247
  17. package/lib/components/badge.d.ts +0 -26
  18. package/lib/components/badge.d.ts.map +0 -1
  19. package/lib/components/badge.js +0 -91
  20. package/lib/components/badge.ts +0 -118
  21. package/lib/components/base/Animations.d.ts +0 -36
  22. package/lib/components/base/Animations.d.ts.map +0 -1
  23. package/lib/components/base/Animations.js +0 -70
  24. package/lib/components/base/Animations.ts +0 -112
  25. package/lib/components/base/BaseComponent.d.ts +0 -294
  26. package/lib/components/base/BaseComponent.d.ts.map +0 -1
  27. package/lib/components/base/BaseComponent.js +0 -735
  28. package/lib/components/base/BaseComponent.ts +0 -884
  29. package/lib/components/base/FormInput.d.ts +0 -77
  30. package/lib/components/base/FormInput.d.ts.map +0 -1
  31. package/lib/components/base/FormInput.js +0 -171
  32. package/lib/components/base/FormInput.ts +0 -237
  33. package/lib/components/blueprint.d.ts +0 -40
  34. package/lib/components/blueprint.d.ts.map +0 -1
  35. package/lib/components/blueprint.js +0 -327
  36. package/lib/components/button.d.ts +0 -70
  37. package/lib/components/button.d.ts.map +0 -1
  38. package/lib/components/button.js +0 -177
  39. package/lib/components/button.ts +0 -237
  40. package/lib/components/card.d.ts +0 -35
  41. package/lib/components/card.d.ts.map +0 -1
  42. package/lib/components/card.js +0 -130
  43. package/lib/components/card.ts +0 -177
  44. package/lib/components/chart.d.ts +0 -49
  45. package/lib/components/chart.d.ts.map +0 -1
  46. package/lib/components/chart.js +0 -205
  47. package/lib/components/chart.ts +0 -254
  48. package/lib/components/checkbox.d.ts +0 -33
  49. package/lib/components/checkbox.d.ts.map +0 -1
  50. package/lib/components/checkbox.js +0 -202
  51. package/lib/components/checkbox.ts +0 -260
  52. package/lib/components/code.d.ts +0 -52
  53. package/lib/components/code.d.ts.map +0 -1
  54. package/lib/components/code.js +0 -201
  55. package/lib/components/code.ts +0 -260
  56. package/lib/components/container.d.ts +0 -60
  57. package/lib/components/container.d.ts.map +0 -1
  58. package/lib/components/container.js +0 -195
  59. package/lib/components/container.ts +0 -259
  60. package/lib/components/data.d.ts +0 -36
  61. package/lib/components/data.d.ts.map +0 -1
  62. package/lib/components/data.js +0 -110
  63. package/lib/components/data.ts +0 -135
  64. package/lib/components/dataframe/DataFrameSource.d.ts +0 -118
  65. package/lib/components/dataframe/DataFrameSource.d.ts.map +0 -1
  66. package/lib/components/dataframe/DataFrameSource.js +0 -421
  67. package/lib/components/dataframe/DataFrameSource.ts +0 -532
  68. package/lib/components/dataframe/ImportSettingsModal.d.ts +0 -60
  69. package/lib/components/dataframe/ImportSettingsModal.d.ts.map +0 -1
  70. package/lib/components/dataframe/ImportSettingsModal.js +0 -442
  71. package/lib/components/dataframe/ImportSettingsModal.ts +0 -531
  72. package/lib/components/dataframe.d.ts +0 -110
  73. package/lib/components/dataframe.d.ts.map +0 -1
  74. package/lib/components/dataframe.js +0 -470
  75. package/lib/components/datepicker.d.ts +0 -40
  76. package/lib/components/datepicker.d.ts.map +0 -1
  77. package/lib/components/datepicker.js +0 -193
  78. package/lib/components/datepicker.ts +0 -251
  79. package/lib/components/dialog.d.ts +0 -39
  80. package/lib/components/dialog.d.ts.map +0 -1
  81. package/lib/components/dialog.js +0 -131
  82. package/lib/components/dialog.ts +0 -178
  83. package/lib/components/divider.d.ts +0 -31
  84. package/lib/components/divider.d.ts.map +0 -1
  85. package/lib/components/divider.js +0 -72
  86. package/lib/components/divider.ts +0 -104
  87. package/lib/components/dropdown-menu.d.ts +0 -42
  88. package/lib/components/dropdown-menu.d.ts.map +0 -1
  89. package/lib/components/dropdown-menu.js +0 -177
  90. package/lib/components/dropdown-menu.ts +0 -214
  91. package/lib/components/dropdown.d.ts +0 -41
  92. package/lib/components/dropdown.d.ts.map +0 -1
  93. package/lib/components/dropdown.js +0 -136
  94. package/lib/components/dropdown.ts +0 -188
  95. package/lib/components/element.d.ts +0 -51
  96. package/lib/components/element.d.ts.map +0 -1
  97. package/lib/components/element.js +0 -209
  98. package/lib/components/element.ts +0 -271
  99. package/lib/components/event-chain.d.ts +0 -9
  100. package/lib/components/event-chain.d.ts.map +0 -1
  101. package/lib/components/event-chain.js +0 -33
  102. package/lib/components/fileupload.d.ts +0 -98
  103. package/lib/components/fileupload.d.ts.map +0 -1
  104. package/lib/components/fileupload.js +0 -351
  105. package/lib/components/fileupload.ts +0 -449
  106. package/lib/components/grid.d.ts +0 -88
  107. package/lib/components/grid.d.ts.map +0 -1
  108. package/lib/components/grid.js +0 -208
  109. package/lib/components/grid.ts +0 -295
  110. package/lib/components/heading.d.ts +0 -25
  111. package/lib/components/heading.d.ts.map +0 -1
  112. package/lib/components/heading.js +0 -83
  113. package/lib/components/heading.ts +0 -113
  114. package/lib/components/helpers.d.ts +0 -9
  115. package/lib/components/helpers.d.ts.map +0 -1
  116. package/lib/components/helpers.js +0 -30
  117. package/lib/components/helpers.ts +0 -41
  118. package/lib/components/hero.d.ts +0 -60
  119. package/lib/components/hero.d.ts.map +0 -1
  120. package/lib/components/hero.js +0 -239
  121. package/lib/components/hero.ts +0 -302
  122. package/lib/components/history/StateHistory.d.ts +0 -91
  123. package/lib/components/history/StateHistory.d.ts.map +0 -1
  124. package/lib/components/history/StateHistory.js +0 -154
  125. package/lib/components/history/StateHistory.ts +0 -200
  126. package/lib/components/icon.d.ts +0 -36
  127. package/lib/components/icon.d.ts.map +0 -1
  128. package/lib/components/icon.js +0 -135
  129. package/lib/components/icon.ts +0 -182
  130. package/lib/components/icons.d.ts +0 -25
  131. package/lib/components/icons.d.ts.map +0 -1
  132. package/lib/components/icons.js +0 -440
  133. package/lib/components/icons.ts +0 -464
  134. package/lib/components/image.d.ts +0 -42
  135. package/lib/components/image.d.ts.map +0 -1
  136. package/lib/components/image.js +0 -204
  137. package/lib/components/image.ts +0 -260
  138. package/lib/components/include.d.ts +0 -86
  139. package/lib/components/include.d.ts.map +0 -1
  140. package/lib/components/include.js +0 -238
  141. package/lib/components/include.ts +0 -281
  142. package/lib/components/input.d.ts +0 -85
  143. package/lib/components/input.d.ts.map +0 -1
  144. package/lib/components/input.js +0 -362
  145. package/lib/components/input.ts +0 -473
  146. package/lib/components/layer.d.ts +0 -72
  147. package/lib/components/layer.d.ts.map +0 -1
  148. package/lib/components/layer.js +0 -219
  149. package/lib/components/layer.ts +0 -304
  150. package/lib/components/link.d.ts +0 -41
  151. package/lib/components/link.d.ts.map +0 -1
  152. package/lib/components/link.js +0 -216
  153. package/lib/components/link.ts +0 -268
  154. package/lib/components/list.d.ts +0 -83
  155. package/lib/components/list.d.ts.map +0 -1
  156. package/lib/components/list.js +0 -314
  157. package/lib/components/list.ts +0 -423
  158. package/lib/components/loading.d.ts +0 -25
  159. package/lib/components/loading.d.ts.map +0 -1
  160. package/lib/components/loading.js +0 -76
  161. package/lib/components/loading.ts +0 -104
  162. package/lib/components/menu.d.ts +0 -38
  163. package/lib/components/menu.d.ts.map +0 -1
  164. package/lib/components/menu.js +0 -205
  165. package/lib/components/menu.ts +0 -279
  166. package/lib/components/modal.d.ts +0 -97
  167. package/lib/components/modal.d.ts.map +0 -1
  168. package/lib/components/modal.js +0 -463
  169. package/lib/components/modal.ts +0 -576
  170. package/lib/components/nav.d.ts +0 -46
  171. package/lib/components/nav.d.ts.map +0 -1
  172. package/lib/components/nav.js +0 -193
  173. package/lib/components/nav.ts +0 -261
  174. package/lib/components/paragraph.d.ts +0 -30
  175. package/lib/components/paragraph.d.ts.map +0 -1
  176. package/lib/components/paragraph.js +0 -93
  177. package/lib/components/paragraph.ts +0 -123
  178. package/lib/components/pen.d.ts +0 -125
  179. package/lib/components/pen.d.ts.map +0 -1
  180. package/lib/components/pen.js +0 -443
  181. package/lib/components/pen.ts +0 -567
  182. package/lib/components/progress.d.ts +0 -40
  183. package/lib/components/progress.d.ts.map +0 -1
  184. package/lib/components/progress.js +0 -116
  185. package/lib/components/progress.ts +0 -163
  186. package/lib/components/radio.d.ts +0 -43
  187. package/lib/components/radio.d.ts.map +0 -1
  188. package/lib/components/radio.js +0 -226
  189. package/lib/components/radio.ts +0 -303
  190. package/lib/components/registry.d.ts +0 -34
  191. package/lib/components/registry.d.ts.map +0 -1
  192. package/lib/components/registry.js +0 -163
  193. package/lib/components/registry.ts +0 -193
  194. package/lib/components/req.d.ts +0 -155
  195. package/lib/components/req.d.ts.map +0 -1
  196. package/lib/components/req.js +0 -253
  197. package/lib/components/req.ts +0 -303
  198. package/lib/components/script.d.ts +0 -14
  199. package/lib/components/script.d.ts.map +0 -1
  200. package/lib/components/script.js +0 -33
  201. package/lib/components/script.ts +0 -41
  202. package/lib/components/select.d.ts +0 -42
  203. package/lib/components/select.d.ts.map +0 -1
  204. package/lib/components/select.js +0 -209
  205. package/lib/components/select.ts +0 -281
  206. package/lib/components/sidebar.d.ts +0 -59
  207. package/lib/components/sidebar.d.ts.map +0 -1
  208. package/lib/components/sidebar.js +0 -298
  209. package/lib/components/sidebar.ts +0 -395
  210. package/lib/components/stack/BaseStack.d.ts +0 -65
  211. package/lib/components/stack/BaseStack.d.ts.map +0 -1
  212. package/lib/components/stack/BaseStack.js +0 -274
  213. package/lib/components/stack/BaseStack.ts +0 -328
  214. package/lib/components/stack/HStack.d.ts +0 -18
  215. package/lib/components/stack/HStack.d.ts.map +0 -1
  216. package/lib/components/stack/HStack.js +0 -22
  217. package/lib/components/stack/HStack.ts +0 -25
  218. package/lib/components/stack/VStack.d.ts +0 -19
  219. package/lib/components/stack/VStack.d.ts.map +0 -1
  220. package/lib/components/stack/VStack.js +0 -23
  221. package/lib/components/stack/VStack.ts +0 -26
  222. package/lib/components/stack/ZStack.d.ts +0 -18
  223. package/lib/components/stack/ZStack.d.ts.map +0 -1
  224. package/lib/components/stack/ZStack.js +0 -22
  225. package/lib/components/stack/ZStack.ts +0 -25
  226. package/lib/components/style.d.ts +0 -14
  227. package/lib/components/style.d.ts.map +0 -1
  228. package/lib/components/style.js +0 -33
  229. package/lib/components/style.ts +0 -41
  230. package/lib/components/switch.d.ts +0 -34
  231. package/lib/components/switch.d.ts.map +0 -1
  232. package/lib/components/switch.js +0 -209
  233. package/lib/components/switch.ts +0 -272
  234. package/lib/components/table.d.ts +0 -137
  235. package/lib/components/table.d.ts.map +0 -1
  236. package/lib/components/table.js +0 -1019
  237. package/lib/components/table.ts +0 -1225
  238. package/lib/components/tabs.d.ts +0 -53
  239. package/lib/components/tabs.d.ts.map +0 -1
  240. package/lib/components/tabs.js +0 -275
  241. package/lib/components/tabs.ts +0 -349
  242. package/lib/components/theme-toggle.d.ts +0 -45
  243. package/lib/components/theme-toggle.d.ts.map +0 -1
  244. package/lib/components/theme-toggle.js +0 -218
  245. package/lib/components/theme-toggle.ts +0 -297
  246. package/lib/components/tooltip.d.ts +0 -31
  247. package/lib/components/tooltip.d.ts.map +0 -1
  248. package/lib/components/tooltip.js +0 -112
  249. package/lib/components/tooltip.ts +0 -148
  250. package/lib/components/watcher.d.ts +0 -195
  251. package/lib/components/watcher.d.ts.map +0 -1
  252. package/lib/components/watcher.js +0 -241
  253. package/lib/components/watcher.ts +0 -261
  254. package/lib/components/write.d.ts +0 -107
  255. package/lib/components/write.d.ts.map +0 -1
  256. package/lib/components/write.js +0 -222
  257. package/lib/components/write.ts +0 -272
  258. package/lib/data/DataPipeline.d.ts +0 -113
  259. package/lib/data/DataPipeline.d.ts.map +0 -1
  260. package/lib/data/DataPipeline.js +0 -359
  261. package/lib/data/DataPipeline.ts +0 -452
  262. package/lib/facades/dataframe.jux +0 -0
  263. package/lib/globals.d.ts +0 -21
  264. package/lib/reactivity/state.d.ts +0 -36
  265. package/lib/reactivity/state.d.ts.map +0 -1
  266. package/lib/reactivity/state.js +0 -67
  267. package/lib/reactivity/state.ts +0 -78
  268. package/lib/storage/DataFrame.d.ts +0 -284
  269. package/lib/storage/DataFrame.d.ts.map +0 -1
  270. package/lib/storage/DataFrame.js +0 -1022
  271. package/lib/storage/DataFrame.ts +0 -1195
  272. package/lib/storage/DataFrameSource.d.ts +0 -158
  273. package/lib/storage/DataFrameSource.d.ts.map +0 -1
  274. package/lib/storage/DataFrameSource.js +0 -409
  275. package/lib/storage/DataFrameSource.ts +0 -556
  276. package/lib/storage/FileStorage.d.ts +0 -53
  277. package/lib/storage/FileStorage.d.ts.map +0 -1
  278. package/lib/storage/FileStorage.js +0 -80
  279. package/lib/storage/FileStorage.ts +0 -95
  280. package/lib/storage/IndexedDBDriver.d.ts +0 -75
  281. package/lib/storage/IndexedDBDriver.d.ts.map +0 -1
  282. package/lib/storage/IndexedDBDriver.js +0 -177
  283. package/lib/storage/IndexedDBDriver.ts +0 -226
  284. package/lib/storage/TabularDriver.d.ts +0 -118
  285. package/lib/storage/TabularDriver.d.ts.map +0 -1
  286. package/lib/storage/TabularDriver.js +0 -731
  287. package/lib/storage/TabularDriver.ts +0 -874
  288. package/lib/utils/codeparser.d.ts +0 -29
  289. package/lib/utils/codeparser.d.ts.map +0 -1
  290. package/lib/utils/codeparser.js +0 -409
  291. package/lib/utils/fetch.d.ts +0 -176
  292. package/lib/utils/fetch.d.ts.map +0 -1
  293. package/lib/utils/fetch.js +0 -427
  294. package/lib/utils/formatId.d.ts +0 -16
  295. package/lib/utils/formatId.d.ts.map +0 -1
  296. package/lib/utils/formatId.js +0 -27
  297. package/lib/utils/path-resolver.js +0 -23
@@ -1,112 +0,0 @@
1
- /**
2
- * Animation Modifiers Extension
3
- *
4
- * Provides animation and transition control for all components.
5
- * This is the ONLY feature-oriented modifier we use at this phase.
6
- *
7
- * Automatically applied to BaseComponent - all components have these methods.
8
- */
9
-
10
- import type { BaseComponent } from './BaseComponent.js';
11
-
12
- export interface Animations {
13
- // Transform (for animations)
14
- transform(value: string): this;
15
- transformOrigin(value: string): this;
16
- rotate(degrees: number): this;
17
- rotateX(degrees: number): this;
18
- rotateY(degrees: number): this;
19
- rotateZ(degrees: number): this;
20
- scale(value: number): this;
21
- scaleX(value: number): this;
22
- scaleY(value: number): this;
23
- translateX(value: string): this;
24
- translateY(value: string): this;
25
- translate(x: string, y: string): this;
26
- flipX(): this;
27
- flipY(): this;
28
- flipBoth(): this;
29
-
30
- // Transition & Animation
31
- transition(value: string): this;
32
- transitionDuration(value: string): this;
33
- transitionDelay(value: string): this;
34
- animation(value: string): this;
35
- }
36
-
37
- /**
38
- * Helper to add inline style
39
- */
40
- function addInlineStyle(component: BaseComponent<any>, property: string, value: string): void {
41
- const currentStyle = component.state.style || '';
42
-
43
- // Parse existing styles into a map
44
- const styleMap = new Map<string, string>();
45
-
46
- currentStyle.split(';').forEach((style: string) => {
47
- const trimmed = style.trim();
48
- if (!trimmed) return;
49
-
50
- const colonIndex = trimmed.indexOf(':');
51
- if (colonIndex === -1) return;
52
-
53
- const prop = trimmed.substring(0, colonIndex).trim();
54
- const val = trimmed.substring(colonIndex + 1).trim();
55
-
56
- if (prop && val) {
57
- styleMap.set(prop, val);
58
- }
59
- });
60
-
61
- // Update or add the new property
62
- styleMap.set(property, value);
63
-
64
- // Rebuild style string
65
- const styles: string[] = [];
66
- styleMap.forEach((val, prop) => {
67
- styles.push(`${prop}: ${val}`);
68
- });
69
-
70
- component.state.style = styles.join('; ');
71
- }
72
-
73
- /**
74
- * Apply animation extensions to a component instance
75
- * Called automatically in BaseComponent constructor
76
- */
77
- export function applyAnimations<T extends BaseComponent<any>>(component: T): T & Animations {
78
- const ext = component as T & Animations;
79
-
80
- // Transform
81
- ext.transform = (v) => { addInlineStyle(component, 'transform', v); return ext; };
82
- ext.transformOrigin = (v) => { addInlineStyle(component, 'transform-origin', v); return ext; };
83
-
84
- // Rotation (all axes)
85
- ext.rotate = (deg) => { addInlineStyle(component, 'transform', `rotate(${deg}deg)`); return ext; };
86
- ext.rotateX = (deg) => { addInlineStyle(component, 'transform', `rotateX(${deg}deg)`); return ext; };
87
- ext.rotateY = (deg) => { addInlineStyle(component, 'transform', `rotateY(${deg}deg)`); return ext; };
88
- ext.rotateZ = (deg) => { addInlineStyle(component, 'transform', `rotateZ(${deg}deg)`); return ext; };
89
-
90
- // Scale (all axes)
91
- ext.scale = (v) => { addInlineStyle(component, 'transform', `scale(${v})`); return ext; };
92
- ext.scaleX = (v) => { addInlineStyle(component, 'transform', `scaleX(${v})`); return ext; };
93
- ext.scaleY = (v) => { addInlineStyle(component, 'transform', `scaleY(${v})`); return ext; };
94
-
95
- // Translate
96
- ext.translateX = (v) => { addInlineStyle(component, 'transform', `translateX(${v})`); return ext; };
97
- ext.translateY = (v) => { addInlineStyle(component, 'transform', `translateY(${v})`); return ext; };
98
- ext.translate = (x, y) => { addInlineStyle(component, 'transform', `translate(${x}, ${y})`); return ext; };
99
-
100
- // Flip (mirror) transforms
101
- ext.flipX = () => { addInlineStyle(component, 'transform', 'scaleX(-1)'); return ext; };
102
- ext.flipY = () => { addInlineStyle(component, 'transform', 'scaleY(-1)'); return ext; };
103
- ext.flipBoth = () => { addInlineStyle(component, 'transform', 'scale(-1, -1)'); return ext; };
104
-
105
- // Transition & Animation
106
- ext.transition = (v) => { addInlineStyle(component, 'transition', v); return ext; };
107
- ext.transitionDuration = (v) => { addInlineStyle(component, 'transition-duration', v); return ext; };
108
- ext.transitionDelay = (v) => { addInlineStyle(component, 'transition-delay', v); return ext; };
109
- ext.animation = (v) => { addInlineStyle(component, 'animation', v); return ext; };
110
-
111
- return ext;
112
- }
@@ -1,294 +0,0 @@
1
- import { State } from '../../reactivity/state.js';
2
- import { Animations } from './Animations.js';
3
- /**
4
- * Base state interface that ALL component states must extend
5
- */
6
- export interface BaseState {
7
- visible?: boolean;
8
- disabled?: boolean;
9
- loading?: boolean;
10
- class?: string;
11
- style?: string;
12
- attributes?: Record<string, string>;
13
- label?: string;
14
- required?: boolean;
15
- name?: string;
16
- errorMessage?: string;
17
- }
18
- /**
19
- * Abstract base class for all JUX components
20
- * Provides common storage, event routing, and lifecycle methods
21
- *
22
- * Children must provide:
23
- * - TRIGGER_EVENTS constant (readonly string[])
24
- * - CALLBACK_EVENTS constant (readonly string[])
25
- * - render() implementation
26
- */
27
- export declare abstract class BaseComponent<TState extends BaseState = BaseState> {
28
- state: TState;
29
- container: HTMLElement | null;
30
- _id: string;
31
- id: string;
32
- protected _bindings: Array<{
33
- event: string;
34
- handler: Function;
35
- }>;
36
- protected _syncBindings: Array<{
37
- property: string;
38
- stateObj: State<any>;
39
- toState?: Function;
40
- toComponent?: Function;
41
- }>;
42
- protected _triggerHandlers: Map<string, Function>;
43
- protected _callbackHandlers: Map<string, Function>;
44
- protected _isUpdatingSync: boolean;
45
- protected _inputElement: HTMLElement | null;
46
- protected _labelElement: HTMLLabelElement | null;
47
- protected _errorElement: HTMLElement | null;
48
- protected _onValidate?: (value: any) => boolean | string;
49
- protected _hasBeenValidated: boolean;
50
- constructor(id: string, initialState: TState);
51
- protected abstract getTriggerEvents(): readonly string[];
52
- protected abstract getCallbackEvents(): readonly string[];
53
- abstract render(targetId?: string | HTMLElement | BaseComponent<any>): this;
54
- /**
55
- * REACTIVE UPDATE HOOK (PUBLIC, CONCRETE)
56
- * Called automatically when this.state[prop] changes via Proxy.
57
- * Default implementation handles base properties.
58
- * Children can override to add component-specific logic.
59
- */
60
- update(prop: string, value: any): void;
61
- /**
62
- * ✨ Notify external State<T> objects when component state changes
63
- * Prevents infinite loops with guard flag
64
- */
65
- protected _notifySyncedState(prop: string, value: any): void;
66
- /**
67
- * Set component style
68
- */
69
- style(value: string): this;
70
- /**
71
- * Set component class
72
- */
73
- class(value: string): this;
74
- /**
75
- * Add a CSS class to the component
76
- */
77
- addClass(value: string): this;
78
- /**
79
- * Remove a CSS class from the component
80
- */
81
- removeClass(value: string): this;
82
- /**
83
- * Toggle a CSS class on the component
84
- */
85
- toggleClass(value: string): this;
86
- /**
87
- * Set component visibility
88
- */
89
- visible(value: boolean): this;
90
- /**
91
- * Show the component
92
- */
93
- show(): this;
94
- /**
95
- * Hide the component
96
- */
97
- hide(): this;
98
- /**
99
- * Toggle component visibility
100
- */
101
- toggleVisibility(): this;
102
- /**
103
- * Set a single HTML attribute
104
- */
105
- attr(name: string, value: string): this;
106
- /**
107
- * Set multiple HTML attributes
108
- */
109
- attrs(attributes: Record<string, string>): this;
110
- /**
111
- * Remove an HTML attribute
112
- */
113
- removeAttr(name: string): this;
114
- /**
115
- * Set disabled state for interactive elements
116
- */
117
- disabled(value: boolean): this;
118
- /**
119
- * Enable the component
120
- */
121
- enable(): this;
122
- /**
123
- * Disable the component
124
- */
125
- disable(): this;
126
- /**
127
- * Set loading state
128
- */
129
- loading(value: boolean): this;
130
- /**
131
- * Focus the first focusable element in the component
132
- */
133
- focus(): this;
134
- /**
135
- * Blur the currently focused element in the component
136
- */
137
- blur(): this;
138
- /**
139
- * Remove the component from the DOM
140
- */
141
- remove(): this;
142
- bind(event: string, handler: Function): this;
143
- sync(property: string, stateObj: State<any>, toStateOrTransform?: Function, toComponent?: Function): this;
144
- protected _isTriggerEvent(event: string): boolean;
145
- protected _isCallbackEvent(event: string): boolean;
146
- protected _triggerCallback(eventName: string, ...args: any[]): void;
147
- /**
148
- * Register a click event handler
149
- */
150
- click(handler: (e: MouseEvent) => void): this;
151
- /**
152
- * Register a double-click event handler
153
- */
154
- dblclick(handler: (e: MouseEvent) => void): this;
155
- /**
156
- * Register a change event handler
157
- */
158
- change(handler: (e: Event) => void): this;
159
- /**
160
- * Register an input event handler
161
- */
162
- input(handler: (e: Event) => void): this;
163
- /**
164
- * Register a mouseover event handler
165
- */
166
- hover(handler: (e: MouseEvent) => void): this;
167
- /**
168
- * Register a mouseout event handler
169
- */
170
- mouseout(handler: (e: MouseEvent) => void): this;
171
- /**
172
- * Register a mousedown event handler
173
- */
174
- mousedown(handler: (e: MouseEvent) => void): this;
175
- /**
176
- * Register a mouseup event handler
177
- */
178
- mouseup(handler: (e: MouseEvent) => void): this;
179
- /**
180
- * Register a focus event handler (renamed to onFocus to avoid conflict with focus() method)
181
- */
182
- onFocus(handler: (e: FocusEvent) => void): this;
183
- /**
184
- * Register a blur event handler (renamed to onBlur to avoid conflict with blur() method)
185
- */
186
- onBlur(handler: (e: FocusEvent) => void): this;
187
- /**
188
- * Register a keydown event handler
189
- */
190
- keydown(handler: (e: KeyboardEvent) => void): this;
191
- /**
192
- * Register a keyup event handler
193
- */
194
- keyup(handler: (e: KeyboardEvent) => void): this;
195
- /**
196
- * Register a keypress event handler
197
- */
198
- keypress(handler: (e: KeyboardEvent) => void): this;
199
- /**
200
- * Register a submit event handler
201
- */
202
- submit(handler: (e: Event) => void): this;
203
- /**
204
- * Register a scroll event handler
205
- */
206
- scroll(handler: (e: Event) => void): this;
207
- /**
208
- * Register a contextmenu (right-click) event handler
209
- */
210
- contextmenu(handler: (e: MouseEvent) => void): this;
211
- /**
212
- * Roll back to previous state
213
- */
214
- rollback(): this;
215
- /**
216
- * Roll forward to next state
217
- */
218
- rollforward(): this;
219
- /**
220
- * Get complete timeline of this component's changes
221
- */
222
- timeline(): Array<any>;
223
- /**
224
- * Get only state changes for this component
225
- */
226
- stateHistory(): import("../history/StateHistory.js").StateSnapshot<any>[];
227
- /**
228
- * Get only events for this component
229
- */
230
- eventHistory(): import("../history/StateHistory.js").EventSnapshot[];
231
- protected _setupContainer(targetId?: string | HTMLElement | BaseComponent<any>): HTMLElement;
232
- protected _wireStandardEvents(element: HTMLElement): void;
233
- /**
234
- * Wire sync subscriptions with guard flag
235
- */
236
- protected _wireAllSyncs(): void;
237
- /**
238
- * ✅ Read-only accessor for component state (getter, not a method)
239
- *
240
- * Usage:
241
- * const myState = component.props; // ✅ Correct
242
- * const myState = component.props(); // ❌ Error: props is not a function
243
- */
244
- get props(): Readonly<TState>;
245
- /**
246
- * Set label for form inputs
247
- */
248
- label(value: string): this;
249
- /**
250
- * Set required state for form inputs
251
- */
252
- required(value: boolean): this;
253
- /**
254
- * Set name attribute for form inputs
255
- */
256
- name(value: string): this;
257
- /**
258
- * Set custom validation handler
259
- */
260
- onValidate(handler: (value: any) => boolean | string): this;
261
- /**
262
- * Validate form input (override in form components)
263
- */
264
- validate(): boolean;
265
- /**
266
- * Check if form input is valid (override in form components)
267
- */
268
- isValid(): boolean;
269
- /**
270
- * Get current value (override in form components)
271
- */
272
- getValue(): any;
273
- /**
274
- * Set current value (override in form components)
275
- */
276
- setValue(value: any): this;
277
- protected _showError(message: string): void;
278
- protected _clearError(): void;
279
- /**
280
- * Build label element for form inputs
281
- */
282
- protected _renderLabel(): HTMLLabelElement;
283
- /**
284
- * Build error element for form inputs
285
- */
286
- protected _renderError(): HTMLElement;
287
- /**
288
- * Wire up two-way sync for form inputs
289
- */
290
- protected _wireFormSync(inputElement: HTMLElement, eventName?: string): void;
291
- }
292
- export interface BaseComponent extends Animations {
293
- }
294
- //# sourceMappingURL=BaseComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseComponent.d.ts","sourceRoot":"","sources":["BaseComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAKlD,OAAO,EAAmB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,M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