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,272 +0,0 @@
1
- /**
2
- * Write - Simple content writer with no component tracking
3
- * Perfect for quick HTML output without ID management
4
- */
5
-
6
- export interface WriteOptions {
7
- tagType?: string;
8
- className?: string;
9
- style?: string;
10
- attributes?: Record<string, string>;
11
- html?: boolean; // If true, treat content as HTML; if false, treat as text
12
- }
13
-
14
- /**
15
- * Write content directly to a target element
16
- *
17
- * Usage:
18
- * // Write text (defaults to body)
19
- * jux.write('Hello World!').render();
20
- *
21
- * // Write to specific target
22
- * jux.write('Content').render('#container');
23
- *
24
- * // Write HTML
25
- * jux.write('<strong>Bold text</strong>').html(true).render('#container');
26
- *
27
- * // Write with styling
28
- * jux.write('Styled text').style('color: red;').render('#container');
29
- */
30
- export class Write {
31
- private content: string;
32
- private options: WriteOptions;
33
-
34
- constructor(content: string, options: WriteOptions = {}) {
35
- this.content = content;
36
- this.options = {
37
- tagType: 'div',
38
- className: '',
39
- style: '',
40
- attributes: {},
41
- html: false,
42
- ...options
43
- };
44
- }
45
-
46
- /* ═════════════════════════════════════════════════════════════════
47
- * FLUENT API
48
- * ═════════════════════════════════════════════════════════════════ */
49
-
50
- /**
51
- * Set HTML mode (treat content as HTML)
52
- */
53
- html(enabled: boolean = true): this {
54
- this.options.html = enabled;
55
- return this;
56
- }
57
-
58
- /**
59
- * Set tag type
60
- */
61
- tagType(value: string): this {
62
- this.options.tagType = value;
63
- return this;
64
- }
65
-
66
- /**
67
- * Set CSS class
68
- */
69
- className(value: string): this {
70
- this.options.className = value;
71
- return this;
72
- }
73
-
74
- /**
75
- * Set inline styles
76
- */
77
- style(value: string): this {
78
- this.options.style = value;
79
- return this;
80
- }
81
-
82
- /**
83
- * Set custom attributes
84
- */
85
- attrs(attributes: Record<string, string>): this {
86
- this.options.attributes = attributes;
87
- return this;
88
- }
89
-
90
- /* ═════════════════════════════════════════════════════════════════
91
- * RENDER METHODS
92
- * ═════════════════════════════════════════════════════════════════ */
93
-
94
- /**
95
- * Render content to target element
96
- */
97
- render(targetSelector?: string): this {
98
- const target = this._getTarget(targetSelector);
99
- if (!target) return this;
100
-
101
- const element = this._createElement();
102
- target.appendChild(element);
103
-
104
- return this;
105
- }
106
-
107
- /**
108
- * Replace target content (clear first, then render)
109
- */
110
- replace(targetSelector?: string): this {
111
- const target = this._getTarget(targetSelector);
112
- if (!target) return this;
113
-
114
- target.innerHTML = '';
115
- const element = this._createElement();
116
- target.appendChild(element);
117
-
118
- return this;
119
- }
120
-
121
- /**
122
- * Render before target element
123
- */
124
- before(targetSelector: string): this {
125
- const target = document.querySelector(targetSelector);
126
- if (!target || !(target instanceof HTMLElement)) {
127
- console.warn(`Write: Target element "${targetSelector}" not found`);
128
- return this;
129
- }
130
-
131
- const element = this._createElement();
132
- target.parentNode?.insertBefore(element, target);
133
-
134
- return this;
135
- }
136
-
137
- /**
138
- * Render after target element
139
- */
140
- after(targetSelector: string): this {
141
- const target = document.querySelector(targetSelector);
142
- if (!target || !(target instanceof HTMLElement)) {
143
- console.warn(`Write: Target element "${targetSelector}" not found`);
144
- return this;
145
- }
146
-
147
- const element = this._createElement();
148
- target.parentNode?.insertBefore(element, target.nextSibling);
149
-
150
- return this;
151
- }
152
-
153
- /**
154
- * Prepend to target (insert as first child)
155
- */
156
- prepend(targetSelector?: string): this {
157
- const target = this._getTarget(targetSelector);
158
- if (!target) return this;
159
-
160
- const element = this._createElement();
161
- target.insertBefore(element, target.firstChild);
162
-
163
- return this;
164
- }
165
-
166
- /**
167
- * Append to target (alias for render)
168
- */
169
- append(targetSelector?: string): this {
170
- return this.render(targetSelector);
171
- }
172
-
173
- /* ═════════════════════════════════════════════════════════════════
174
- * PRIVATE HELPERS
175
- * ═════════════════════════════════════════════════════════════════ */
176
-
177
- private _getTarget(selector?: string): HTMLElement | null {
178
- const targetSelector = selector || 'body';
179
- const target = document.querySelector(targetSelector);
180
-
181
- if (!target || !(target instanceof HTMLElement)) {
182
- console.warn(`Write: Target element "${targetSelector}" not found`);
183
- return null;
184
- }
185
-
186
- return target;
187
- }
188
-
189
- private _createElement(): HTMLElement {
190
- const element = document.createElement(this.options.tagType!);
191
-
192
- // Set content (text or HTML)
193
- if (this.options.html) {
194
- element.innerHTML = this.content;
195
- } else {
196
- element.textContent = this.content;
197
- }
198
-
199
- // Apply className
200
- if (this.options.className) {
201
- element.className = this.options.className;
202
- }
203
-
204
- // Apply inline styles
205
- if (this.options.style) {
206
- element.setAttribute('style', this.options.style);
207
- }
208
-
209
- // Apply custom attributes
210
- if (this.options.attributes) {
211
- Object.entries(this.options.attributes).forEach(([key, value]) => {
212
- element.setAttribute(key, value);
213
- });
214
- }
215
-
216
- return element;
217
- }
218
- }
219
-
220
- /**
221
- * Factory function - simple, no overloads
222
- */
223
- export function write(content: string, options: WriteOptions = {}): Write {
224
- return new Write(content, options);
225
- }
226
-
227
- /* ═════════════════════════════════════════════════════════════════
228
- * SHORTHAND HELPERS
229
- * ═════════════════════════════════════════════════════════════════ */
230
-
231
- /**
232
- * Write text (explicit)
233
- */
234
- export function writeText(content: string, options: Omit<WriteOptions, 'html'> = {}): Write {
235
- return new Write(content, { ...options, html: false });
236
- }
237
-
238
- /**
239
- * Write HTML (explicit)
240
- */
241
- export function writeHtml(content: string, options: Omit<WriteOptions, 'html'> = {}): Write {
242
- return new Write(content, { ...options, html: true });
243
- }
244
-
245
- /**
246
- * Write paragraph
247
- */
248
- export function writeParagraph(content: string, options: Omit<WriteOptions, 'tagType'> = {}): Write {
249
- return new Write(content, { ...options, tagType: 'p' });
250
- }
251
-
252
- /**
253
- * Write heading
254
- */
255
- export function writeHeading(content: string, level: 1 | 2 | 3 | 4 | 5 | 6 = 2, options: Omit<WriteOptions, 'tagType'> = {}): Write {
256
- return new Write(content, { ...options, tagType: `h${level}` });
257
- }
258
-
259
- /**
260
- * Write span
261
- */
262
- export function writeSpan(content: string, options: Omit<WriteOptions, 'tagType'> = {}): Write {
263
- return new Write(content, { ...options, tagType: 'span' });
264
- }
265
-
266
- /**
267
- * Write div (explicit)
268
- */
269
- export function writeDiv(content: string, options: Omit<WriteOptions, 'tagType'> = {}): Write {
270
- return new Write(content, { ...options, tagType: 'div' });
271
- }
272
-
@@ -1,113 +0,0 @@
1
- import { DataFrame } from '../storage/DataFrame.js';
2
- export interface PipelineOptions {
3
- dbName?: string;
4
- storeName?: string;
5
- }
6
- export interface FetchOptions {
7
- delimiter?: string;
8
- hasHeader?: boolean;
9
- headerRow?: number;
10
- mimeType?: 'csv' | 'tsv' | 'json' | 'auto';
11
- }
12
- export interface GatherOptions extends FetchOptions {
13
- /** Authorization bearer token */
14
- bearer?: string;
15
- /** API key (sent as x-api-key header) */
16
- apiKey?: string;
17
- /** Custom headers for URL fetches */
18
- headers?: Record<string, string>;
19
- /** IndexedDB database name override */
20
- dbName?: string;
21
- /** IndexedDB store name override */
22
- storeName?: string;
23
- }
24
- export interface IntoOptions {
25
- /** Override which columns to use (for Table targets) */
26
- columns?: string[];
27
- /** Column name → display label mapping */
28
- columnLabels?: Record<string, string>;
29
- /** Key for option labels (Dropdown/Select/List targets) */
30
- labelKey?: string;
31
- /** Key for option values (Dropdown/Select targets) */
32
- valueKey?: string;
33
- }
34
- /**
35
- * DataPipeline — Headless, promise-based data loading and transformation.
36
- *
37
- * Usage:
38
- * const df = await jux.gather('raw/myfile.xlsx').result();
39
- * const df = await jux.gather('https://api.com/data', { bearer: 'xxx' }).result();
40
- * const df = await jux.gather(myUpload).select('name').result();
41
- * const df = await jux.gather([{a:1}, {b:2}]).result();
42
- * await jux.gather(key).filter(r => r.active).intoTable(myTable);
43
- */
44
- export declare class DataPipeline {
45
- private _driver;
46
- private _pending;
47
- private _transforms;
48
- private _gatherOptions;
49
- constructor(options?: PipelineOptions);
50
- /**
51
- * Auto-detect source type and load accordingly.
52
- *
53
- * - string starting with http/https → URL fetch
54
- * - string → IndexedDB storage key
55
- * - File → parse file
56
- * - Array → row objects
57
- * - DataFrame → clone
58
- * - object with .storageKey → FileUpload cached key
59
- * - object with string keys + array values → column-oriented data
60
- */
61
- from(source: any, options?: GatherOptions): this;
62
- fromStorage(key: string): this;
63
- fromUrl(url: string, options?: GatherOptions): this;
64
- fromFile(file: File, options?: FetchOptions): this;
65
- fromRows(rows: Record<string, any>[], columns?: string[]): this;
66
- fromColumns(columns: Record<string, any[]>): this;
67
- fromJson(json: Record<string, any>[] | Record<string, any[]> | string): this;
68
- fromUpload(upload: any): this;
69
- transform(fn: (df: DataFrame) => DataFrame): this;
70
- select(...cols: string[]): this;
71
- filter(predicate: (row: Record<string, any>, index: number) => boolean): this;
72
- sort(column: string, descending?: boolean): this;
73
- head(n?: number): this;
74
- tail(n?: number): this;
75
- rename(mapping: Record<string, string>): this;
76
- withColumn(name: string, fn: (row: Record<string, any>, index: number) => any): this;
77
- dropna(columns?: string[]): this;
78
- dropDuplicates(columns?: string[]): this;
79
- result(): Promise<DataFrame>;
80
- toRows(): Promise<Record<string, any>[]>;
81
- toArray(column: string): Promise<any[]>;
82
- toDistinct(column: string): Promise<any[]>;
83
- toOptions(labelKey: string, valueKey?: string): Promise<{
84
- label: string;
85
- value: any;
86
- }[]>;
87
- toList(column: string): Promise<string[]>;
88
- intoTable(table: any, columnLabels?: Record<string, string>): Promise<DataFrame>;
89
- intoDropdown(dropdown: any, labelKey: string, valueKey?: string): Promise<DataFrame>;
90
- intoList(list: any, column: string): Promise<DataFrame>;
91
- into(target: any, options?: IntoOptions): Promise<DataFrame>;
92
- store(key: string, metadata?: Record<string, any>): Promise<DataFrame>;
93
- private _loadFromStorage;
94
- private _loadFromUrl;
95
- private _loadFromFile;
96
- private _detectMimeType;
97
- }
98
- /**
99
- * Factory function — primary entry point via jux.gather()
100
- *
101
- * Smart single-arg:
102
- * jux.gather('raw/myfile.xlsx') // storage key
103
- * jux.gather('https://api.com/data', { bearer: 'xxx' }) // URL with auth
104
- * jux.gather(myUpload) // FileUpload
105
- * jux.gather([{a:1}, {b:2}]) // inline rows
106
- * jux.gather(existingDf) // clone DataFrame
107
- *
108
- * Explicit source:
109
- * jux.gather().fromStorage(key)
110
- * jux.gather().fromUrl(url, opts)
111
- */
112
- export declare function gather(source?: any, options?: GatherOptions): DataPipeline;
113
- //# sourceMappingURL=DataPipeline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataPipeline.d.ts","sourceRoot":"","sources":["DataPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,WAAW,eAAe;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;CAC9C;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IAC/C,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IACxB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,QAAQ,CAAmC;IACnD,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