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,65 +0,0 @@
1
- import { BaseComponent, BaseState } from '../base/BaseComponent.js';
2
- export interface StackState extends BaseState {
3
- spacing: 'none' | 'tight' | 'normal' | 'loose';
4
- align: 'start' | 'center' | 'end' | 'stretch';
5
- justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
6
- divider: boolean;
7
- responsive: boolean;
8
- }
9
- export declare abstract class BaseStack extends BaseComponent<StackState> {
10
- protected abstract baseClassName: string;
11
- protected _container: HTMLElement | null;
12
- protected _children: any[];
13
- protected _childStyleFunction: ((index: number) => string) | null;
14
- protected _autoRendered: boolean;
15
- constructor(id: string);
16
- protected getTriggerEvents(): readonly string[];
17
- protected getCallbackEvents(): readonly string[];
18
- /**
19
- * Set all children at once (replaces existing)
20
- */
21
- items(children: any[]): this;
22
- /**
23
- * Add children to the end
24
- */
25
- addItems(...children: any[]): this;
26
- /**
27
- * Add a single child
28
- */
29
- addItem(child: any): this;
30
- /**
31
- * Replace child at index
32
- */
33
- replaceItem(index: number, child: any): this;
34
- /**
35
- * Remove child at index
36
- */
37
- removeItem(index: number): this;
38
- /**
39
- * Remove all children
40
- */
41
- clearItems(): this;
42
- /**
43
- * Get current children array (read-only)
44
- */
45
- getItems(): readonly any[];
46
- spacing(value: 'none' | 'tight' | 'normal' | 'loose'): this;
47
- align(value: 'start' | 'center' | 'end' | 'stretch'): this;
48
- justify(value: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'): this;
49
- divider(value?: boolean): this;
50
- responsive(value?: boolean): this;
51
- childStyle(fn: (index: number) => string): this;
52
- protected getChildStyle(index: number): string;
53
- fade(topOpacity?: number, step?: number): this;
54
- cascade(offset?: number, direction?: 'horizontal' | 'vertical' | 'both'): this;
55
- scaleProgressive(topScale?: number, step?: number): this;
56
- protected buildClasses(): string;
57
- protected renderChild(child: any, index: number): HTMLElement;
58
- /**
59
- * Refresh children when items change
60
- */
61
- protected _refreshChildren(): void;
62
- render(targetId?: string | HTMLElement | BaseComponent<any>): this;
63
- update(prop: string, value: any): void;
64
- }
65
- //# source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AG,CAAC,GAAG,IAAI;IAwBlE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;CAGzC"}
@@ -1,274 +0,0 @@
1
- import { BaseComponent } from '../base/BaseComponent.js';
2
- const TRIGGER_EVENTS = [];
3
- const CALLBACK_EVENTS = [];
4
- export class BaseStack extends BaseComponent {
5
- // ✅ ULTRA-MINIMAL: Only id required
6
- constructor(id) {
7
- super(id, {
8
- visible: true,
9
- disabled: false,
10
- loading: false,
11
- class: '',
12
- style: '',
13
- attributes: {},
14
- spacing: 'normal',
15
- align: 'start',
16
- justify: 'start',
17
- divider: false,
18
- responsive: false
19
- });
20
- this._container = null;
21
- this._children = [];
22
- this._childStyleFunction = null;
23
- this._autoRendered = false;
24
- // ✅ Auto-render on next tick
25
- queueMicrotask(() => {
26
- if (!this._autoRendered && !this.container) {
27
- this._autoRendered = true;
28
- this.render('app');
29
- }
30
- });
31
- }
32
- getTriggerEvents() {
33
- return TRIGGER_EVENTS;
34
- }
35
- getCallbackEvents() {
36
- return CALLBACK_EVENTS;
37
- }
38
- /* ═════════════════════════════════════════════════════════════════
39
- * CHILDREN MANAGEMENT (Fluent API)
40
- * ═════════════════════════════════════════════════════════════════ */
41
- /**
42
- * Set all children at once (replaces existing)
43
- */
44
- items(children) {
45
- this._children = children;
46
- this._refreshChildren();
47
- return this;
48
- }
49
- /**
50
- * Add children to the end
51
- */
52
- addItems(...children) {
53
- this._children.push(...children);
54
- this._refreshChildren();
55
- return this;
56
- }
57
- /**
58
- * Add a single child
59
- */
60
- addItem(child) {
61
- this._children.push(child);
62
- this._refreshChildren();
63
- return this;
64
- }
65
- /**
66
- * Replace child at index
67
- */
68
- replaceItem(index, child) {
69
- if (index >= 0 && index < this._children.length) {
70
- this._children[index] = child;
71
- this._refreshChildren();
72
- }
73
- return this;
74
- }
75
- /**
76
- * Remove child at index
77
- */
78
- removeItem(index) {
79
- if (index >= 0 && index < this._children.length) {
80
- this._children.splice(index, 1);
81
- this._refreshChildren();
82
- }
83
- return this;
84
- }
85
- /**
86
- * Remove all children
87
- */
88
- clearItems() {
89
- this._children = [];
90
- this._refreshChildren();
91
- return this;
92
- }
93
- /**
94
- * Get current children array (read-only)
95
- */
96
- getItems() {
97
- return this._children;
98
- }
99
- /* ═════════════════════════════════════════════════════════════════
100
- * STACK LAYOUT API
101
- * ═════════════════════════════════════════════════════════════════ */
102
- spacing(value) {
103
- this.state.spacing = value;
104
- if (this._container) {
105
- this._container.className = this.buildClasses();
106
- }
107
- return this;
108
- }
109
- align(value) {
110
- this.state.align = value;
111
- if (this._container) {
112
- this._container.className = this.buildClasses();
113
- }
114
- return this;
115
- }
116
- justify(value) {
117
- this.state.justify = value;
118
- if (this._container) {
119
- this._container.className = this.buildClasses();
120
- }
121
- return this;
122
- }
123
- divider(value = true) {
124
- this.state.divider = value;
125
- if (this._container) {
126
- this._container.className = this.buildClasses();
127
- }
128
- return this;
129
- }
130
- responsive(value = true) {
131
- this.state.responsive = value;
132
- if (this._container) {
133
- this._container.className = this.buildClasses();
134
- }
135
- return this;
136
- }
137
- /* ═════════════════════════════════════════════════════════════════
138
- * CHILD STYLING
139
- * ═════════════════════════════════════════════════════════════════ */
140
- childStyle(fn) {
141
- this._childStyleFunction = fn;
142
- this._refreshChildren();
143
- return this;
144
- }
145
- getChildStyle(index) {
146
- return this._childStyleFunction ? this._childStyleFunction(index) : '';
147
- }
148
- /* ═════════════════════════════════════════════════════════════════
149
- * Z-STACK SPECIFIC EFFECTS
150
- * ═════════════════════════════════════════════════════════════════ */
151
- fade(topOpacity = 1, step = 0.2) {
152
- this._childStyleFunction = (index) => `opacity: ${Math.max(0, topOpacity - index * step)};`;
153
- this._refreshChildren();
154
- return this;
155
- }
156
- cascade(offset = 20, direction = 'both') {
157
- this._childStyleFunction = (index) => {
158
- if (direction === 'horizontal') {
159
- return `margin-left: ${index * offset}px;`;
160
- }
161
- else if (direction === 'vertical') {
162
- return `margin-top: ${index * offset}px;`;
163
- }
164
- else {
165
- return `margin-left: ${index * offset}px; margin-top: ${index * offset}px;`;
166
- }
167
- };
168
- this._refreshChildren();
169
- return this;
170
- }
171
- scaleProgressive(topScale = 1, step = 0.1) {
172
- this._childStyleFunction = (index) => `transform: scale(${Math.max(0.1, topScale - index * step)});`;
173
- this._refreshChildren();
174
- return this;
175
- }
176
- /* ═════════════════════════════════════════════════════════════════
177
- * RENDER & UPDATE
178
- * ═════════════════════════════════════════════════════════════════ */
179
- buildClasses() {
180
- const { spacing, align, justify, divider, responsive, class: userClass } = this.state;
181
- const classes = [this.baseClassName];
182
- if (spacing !== 'normal') {
183
- classes.push(`${this.baseClassName}-${spacing}`);
184
- }
185
- if (align !== 'start') {
186
- classes.push(`jux-stack-${align}`);
187
- }
188
- if (justify !== 'start') {
189
- classes.push(`jux-stack-justify-${justify}`);
190
- }
191
- if (divider) {
192
- classes.push(`${this.baseClassName}-divider`);
193
- }
194
- if (responsive) {
195
- classes.push(`${this.baseClassName}-responsive`);
196
- }
197
- if (userClass) {
198
- classes.push(userClass);
199
- }
200
- return classes.join(' ');
201
- }
202
- renderChild(child, index) {
203
- let childElement;
204
- if (child && typeof child === 'object' && '_container' in child && child._container instanceof HTMLElement) {
205
- childElement = child._container;
206
- }
207
- else if (child && typeof child === 'object' && typeof child.render === 'function') {
208
- const tempContainer = document.createElement('div');
209
- tempContainer.style.display = 'contents';
210
- child.render(tempContainer);
211
- if (child.container && child.container.firstElementChild) {
212
- childElement = child.container.firstElementChild;
213
- }
214
- else if (tempContainer.firstElementChild) {
215
- childElement = tempContainer.firstElementChild;
216
- }
217
- else {
218
- childElement = tempContainer;
219
- }
220
- }
221
- else if (child instanceof HTMLElement) {
222
- childElement = child;
223
- }
224
- else if (typeof child === 'string') {
225
- childElement = document.createElement('div');
226
- childElement.innerHTML = child;
227
- }
228
- else {
229
- childElement = document.createElement('div');
230
- childElement.textContent = String(child);
231
- }
232
- // Apply child styles
233
- const styleStr = this.getChildStyle(index);
234
- if (styleStr) {
235
- const existingStyle = childElement.getAttribute('style') || '';
236
- childElement.setAttribute('style', existingStyle + '; ' + styleStr);
237
- }
238
- return childElement;
239
- }
240
- /**
241
- * Refresh children when items change
242
- */
243
- _refreshChildren() {
244
- if (!this._container)
245
- return;
246
- // Clear existing children
247
- this._container.innerHTML = '';
248
- // Re-render all children
249
- this._children.forEach((child, index) => {
250
- const childEl = this.renderChild(child, index);
251
- this._container.appendChild(childEl);
252
- });
253
- }
254
- render(targetId) {
255
- const container = this._setupContainer(targetId);
256
- const stackDiv = document.createElement('div');
257
- stackDiv.id = this._id;
258
- stackDiv.className = this.buildClasses();
259
- if (this.state.style) {
260
- stackDiv.setAttribute('style', this.state.style);
261
- }
262
- this._children.forEach((child, index) => {
263
- const childEl = this.renderChild(child, index);
264
- stackDiv.appendChild(childEl);
265
- });
266
- this._wireStandardEvents(stackDiv);
267
- container.appendChild(stackDiv);
268
- this._container = stackDiv;
269
- return this;
270
- }
271
- update(prop, value) {
272
- // Stacks don't need reactive updates
273
- }
274
- }
@@ -1,328 +0,0 @@
1
- import { BaseComponent, BaseState } from '../base/BaseComponent.js';
2
-
3
- const TRIGGER_EVENTS = [] as const;
4
- const CALLBACK_EVENTS = [] as const;
5
-
6
- export interface StackState extends BaseState {
7
- spacing: 'none' | 'tight' | 'normal' | 'loose';
8
- align: 'start' | 'center' | 'end' | 'stretch';
9
- justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
10
- divider: boolean;
11
- responsive: boolean;
12
- }
13
-
14
- export abstract class BaseStack extends BaseComponent<StackState> {
15
- protected abstract baseClassName: string;
16
- protected _container: HTMLElement | null = null;
17
- protected _children: any[] = [];
18
- protected _childStyleFunction: ((index: number) => string) | null = null;
19
- protected _autoRendered: boolean = false;
20
-
21
- // ✅ ULTRA-MINIMAL: Only id required
22
- constructor(id: string) {
23
- super(id, {
24
- visible: true,
25
- disabled: false,
26
- loading: false,
27
- class: '',
28
- style: '',
29
- attributes: {},
30
- spacing: 'normal',
31
- align: 'start',
32
- justify: 'start',
33
- divider: false,
34
- responsive: false
35
- });
36
-
37
- // ✅ Auto-render on next tick
38
- queueMicrotask(() => {
39
- if (!this._autoRendered && !this.container) {
40
- this._autoRendered = true;
41
- this.render('app');
42
- }
43
- });
44
- }
45
-
46
- protected getTriggerEvents(): readonly string[] {
47
- return TRIGGER_EVENTS;
48
- }
49
-
50
- protected getCallbackEvents(): readonly string[] {
51
- return CALLBACK_EVENTS;
52
- }
53
-
54
- /* ═════════════════════════════════════════════════════════════════
55
- * CHILDREN MANAGEMENT (Fluent API)
56
- * ═════════════════════════════════════════════════════════════════ */
57
-
58
- /**
59
- * Set all children at once (replaces existing)
60
- */
61
- items(children: any[]): this {
62
- this._children = children;
63
- this._refreshChildren();
64
- return this;
65
- }
66
-
67
- /**
68
- * Add children to the end
69
- */
70
- addItems(...children: any[]): this {
71
- this._children.push(...children);
72
- this._refreshChildren();
73
- return this;
74
- }
75
-
76
- /**
77
- * Add a single child
78
- */
79
- addItem(child: any): this {
80
- this._children.push(child);
81
- this._refreshChildren();
82
- return this;
83
- }
84
-
85
- /**
86
- * Replace child at index
87
- */
88
- replaceItem(index: number, child: any): this {
89
- if (index >= 0 && index < this._children.length) {
90
- this._children[index] = child;
91
- this._refreshChildren();
92
- }
93
- return this;
94
- }
95
-
96
- /**
97
- * Remove child at index
98
- */
99
- removeItem(index: number): this {
100
- if (index >= 0 && index < this._children.length) {
101
- this._children.splice(index, 1);
102
- this._refreshChildren();
103
- }
104
- return this;
105
- }
106
-
107
- /**
108
- * Remove all children
109
- */
110
- clearItems(): this {
111
- this._children = [];
112
- this._refreshChildren();
113
- return this;
114
- }
115
-
116
- /**
117
- * Get current children array (read-only)
118
- */
119
- getItems(): readonly any[] {
120
- return this._children;
121
- }
122
-
123
- /* ═════════════════════════════════════════════════════════════════
124
- * STACK LAYOUT API
125
- * ═════════════════════════════════════════════════════════════════ */
126
-
127
- spacing(value: 'none' | 'tight' | 'normal' | 'loose'): this {
128
- this.state.spacing = value;
129
- if (this._container) {
130
- this._container.className = this.buildClasses();
131
- }
132
- return this;
133
- }
134
-
135
- align(value: 'start' | 'center' | 'end' | 'stretch'): this {
136
- this.state.align = value;
137
- if (this._container) {
138
- this._container.className = this.buildClasses();
139
- }
140
- return this;
141
- }
142
-
143
- justify(value: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'): this {
144
- this.state.justify = value;
145
- if (this._container) {
146
- this._container.className = this.buildClasses();
147
- }
148
- return this;
149
- }
150
-
151
- divider(value: boolean = true): this {
152
- this.state.divider = value;
153
- if (this._container) {
154
- this._container.className = this.buildClasses();
155
- }
156
- return this;
157
- }
158
-
159
- responsive(value: boolean = true): this {
160
- this.state.responsive = value;
161
- if (this._container) {
162
- this._container.className = this.buildClasses();
163
- }
164
- return this;
165
- }
166
-
167
- /* ═════════════════════════════════════════════════════════════════
168
- * CHILD STYLING
169
- * ═════════════════════════════════════════════════════════════════ */
170
-
171
- childStyle(fn: (index: number) => string): this {
172
- this._childStyleFunction = fn;
173
- this._refreshChildren();
174
- return this;
175
- }
176
-
177
- protected getChildStyle(index: number): string {
178
- return this._childStyleFunction ? this._childStyleFunction(index) : '';
179
- }
180
-
181
- /* ═════════════════════════════════════════════════════════════════
182
- * Z-STACK SPECIFIC EFFECTS
183
- * ═════════════════════════════════════════════════════════════════ */
184
-
185
- fade(topOpacity: number = 1, step: number = 0.2): this {
186
- this._childStyleFunction = (index) => `opacity: ${Math.max(0, topOpacity - index * step)};`;
187
- this._refreshChildren();
188
- return this;
189
- }
190
-
191
- cascade(offset: number = 20, direction: 'horizontal' | 'vertical' | 'both' = 'both'): this {
192
- this._childStyleFunction = (index) => {
193
- if (direction === 'horizontal') {
194
- return `margin-left: ${index * offset}px;`;
195
- } else if (direction === 'vertical') {
196
- return `margin-top: ${index * offset}px;`;
197
- } else {
198
- return `margin-left: ${index * offset}px; margin-top: ${index * offset}px;`;
199
- }
200
- };
201
- this._refreshChildren();
202
- return this;
203
- }
204
-
205
- scaleProgressive(topScale: number = 1, step: number = 0.1): this {
206
- this._childStyleFunction = (index) => `transform: scale(${Math.max(0.1, topScale - index * step)});`;
207
- this._refreshChildren();
208
- return this;
209
- }
210
-
211
- /* ═════════════════════════════════════════════════════════════════
212
- * RENDER & UPDATE
213
- * ═════════════════════════════════════════════════════════════════ */
214
-
215
- protected buildClasses(): string {
216
- const { spacing, align, justify, divider, responsive, class: userClass } = this.state;
217
-
218
- const classes = [this.baseClassName];
219
-
220
- if (spacing !== 'normal') {
221
- classes.push(`${this.baseClassName}-${spacing}`);
222
- }
223
-
224
- if (align !== 'start') {
225
- classes.push(`jux-stack-${align}`);
226
- }
227
-
228
- if (justify !== 'start') {
229
- classes.push(`jux-stack-justify-${justify}`);
230
- }
231
-
232
- if (divider) {
233
- classes.push(`${this.baseClassName}-divider`);
234
- }
235
-
236
- if (responsive) {
237
- classes.push(`${this.baseClassName}-responsive`);
238
- }
239
-
240
- if (userClass) {
241
- classes.push(userClass);
242
- }
243
-
244
- return classes.join(' ');
245
- }
246
-
247
- protected renderChild(child: any, index: number): HTMLElement {
248
- let childElement: HTMLElement;
249
-
250
- if (child && typeof child === 'object' && '_container' in child && child._container instanceof HTMLElement) {
251
- childElement = child._container;
252
- } else if (child && typeof child === 'object' && typeof child.render === 'function') {
253
- const tempContainer = document.createElement('div');
254
- tempContainer.style.display = 'contents';
255
-
256
- child.render(tempContainer);
257
-
258
- if (child.container && child.container.firstElementChild) {
259
- childElement = child.container.firstElementChild as HTMLElement;
260
- } else if (tempContainer.firstElementChild) {
261
- childElement = tempContainer.firstElementChild as HTMLElement;
262
- } else {
263
- childElement = tempContainer;
264
- }
265
- } else if (child instanceof HTMLElement) {
266
- childElement = child;
267
- } else if (typeof child === 'string') {
268
- childElement = document.createElement('div');
269
- childElement.innerHTML = child;
270
- } else {
271
- childElement = document.createElement('div');
272
- childElement.textContent = String(child);
273
- }
274
-
275
- // Apply child styles
276
- const styleStr = this.getChildStyle(index);
277
- if (styleStr) {
278
- const existingStyle = childElement.getAttribute('style') || '';
279
- childElement.setAttribute('style', existingStyle + '; ' + styleStr);
280
- }
281
-
282
- return childElement;
283
- }
284
-
285
- /**
286
- * Refresh children when items change
287
- */
288
- protected _refreshChildren(): void {
289
- if (!this._container) return;
290
-
291
- // Clear existing children
292
- this._container.innerHTML = '';
293
-
294
- // Re-render all children
295
- this._children.forEach((child, index) => {
296
- const childEl = this.renderChild(child, index);
297
- this._container!.appendChild(childEl);
298
- });
299
- }
300
-
301
- render(targetId?: string | HTMLElement | BaseComponent<any>): this {
302
- const container = this._setupContainer(targetId);
303
-
304
- const stackDiv = document.createElement('div');
305
- stackDiv.id = this._id;
306
- stackDiv.className = this.buildClasses();
307
-
308
- if (this.state.style) {
309
- stackDiv.setAttribute('style', this.state.style);
310
- }
311
-
312
- this._children.forEach((child, index) => {
313
- const childEl = this.renderChild(child, index);
314
- stackDiv.appendChild(childEl);
315
- });
316
-
317
- this._wireStandardEvents(stackDiv);
318
-
319
- container.appendChild(stackDiv);
320
- this._container = stackDiv;
321
-
322
- return this;
323
- }
324
-
325
- update(prop: string, value: any): void {
326
- // Stacks don't need reactive updates
327
- }
328
- }
@@ -1,18 +0,0 @@
1
- import { BaseStack } from './BaseStack.js';
2
- export declare class HStack extends BaseStack {
3
- protected baseClassName: string;
4
- constructor(id: string);
5
- }
6
- /**
7
- * Create a horizontal stack (auto-renders)
8
- *
9
- * @example
10
- * hstack('nav')
11
- * .items([
12
- * jux.link('home').text('Home'),
13
- * jux.link('about').text('About')
14
- * ])
15
- * .spacing('tight');
16
- */
17
- export declare function hstack(id: string): HStack;
18
- //# sourceMappingURL=HStack.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HStack.d.ts","sourceRoot":"","sources":["HStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,qBAAa,MAAO,SAAQ,SAAS;IACjC,SAAS,CAAC,aAAa,SAAgB;gBAG3B,EAAE,EAAE,MAAM;CAGzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEzC"}