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.
- package/index.js +7 -137
- package/lib/components/dataframe.ts +0 -569
- package/lib/components/tag.ts +68 -0
- package/lib/styles/shadcn.css +20 -7
- package/lib/utils/idgen.ts +6 -0
- package/package.json +5 -6
- package/index.d.ts +0 -239
- package/index.d.ts.map +0 -1
- package/lib/components/alert.d.ts +0 -36
- package/lib/components/alert.d.ts.map +0 -1
- package/lib/components/alert.js +0 -172
- package/lib/components/alert.ts +0 -219
- package/lib/components/app.d.ts +0 -89
- package/lib/components/app.d.ts.map +0 -1
- package/lib/components/app.js +0 -175
- package/lib/components/app.ts +0 -247
- package/lib/components/badge.d.ts +0 -26
- package/lib/components/badge.d.ts.map +0 -1
- package/lib/components/badge.js +0 -91
- package/lib/components/badge.ts +0 -118
- package/lib/components/base/Animations.d.ts +0 -36
- package/lib/components/base/Animations.d.ts.map +0 -1
- package/lib/components/base/Animations.js +0 -70
- package/lib/components/base/Animations.ts +0 -112
- package/lib/components/base/BaseComponent.d.ts +0 -294
- package/lib/components/base/BaseComponent.d.ts.map +0 -1
- package/lib/components/base/BaseComponent.js +0 -735
- package/lib/components/base/BaseComponent.ts +0 -884
- package/lib/components/base/FormInput.d.ts +0 -77
- package/lib/components/base/FormInput.d.ts.map +0 -1
- package/lib/components/base/FormInput.js +0 -171
- package/lib/components/base/FormInput.ts +0 -237
- package/lib/components/blueprint.d.ts +0 -40
- package/lib/components/blueprint.d.ts.map +0 -1
- package/lib/components/blueprint.js +0 -327
- package/lib/components/button.d.ts +0 -70
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js +0 -177
- package/lib/components/button.ts +0 -237
- package/lib/components/card.d.ts +0 -35
- package/lib/components/card.d.ts.map +0 -1
- package/lib/components/card.js +0 -130
- package/lib/components/card.ts +0 -177
- package/lib/components/chart.d.ts +0 -49
- package/lib/components/chart.d.ts.map +0 -1
- package/lib/components/chart.js +0 -205
- package/lib/components/chart.ts +0 -254
- package/lib/components/checkbox.d.ts +0 -33
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js +0 -202
- package/lib/components/checkbox.ts +0 -260
- package/lib/components/code.d.ts +0 -52
- package/lib/components/code.d.ts.map +0 -1
- package/lib/components/code.js +0 -201
- package/lib/components/code.ts +0 -260
- package/lib/components/container.d.ts +0 -60
- package/lib/components/container.d.ts.map +0 -1
- package/lib/components/container.js +0 -195
- package/lib/components/container.ts +0 -259
- package/lib/components/data.d.ts +0 -36
- package/lib/components/data.d.ts.map +0 -1
- package/lib/components/data.js +0 -110
- package/lib/components/data.ts +0 -135
- package/lib/components/dataframe/DataFrameSource.d.ts +0 -118
- package/lib/components/dataframe/DataFrameSource.d.ts.map +0 -1
- package/lib/components/dataframe/DataFrameSource.js +0 -421
- package/lib/components/dataframe/DataFrameSource.ts +0 -532
- package/lib/components/dataframe/ImportSettingsModal.d.ts +0 -60
- package/lib/components/dataframe/ImportSettingsModal.d.ts.map +0 -1
- package/lib/components/dataframe/ImportSettingsModal.js +0 -442
- package/lib/components/dataframe/ImportSettingsModal.ts +0 -531
- package/lib/components/dataframe.d.ts +0 -110
- package/lib/components/dataframe.d.ts.map +0 -1
- package/lib/components/dataframe.js +0 -470
- package/lib/components/datepicker.d.ts +0 -40
- package/lib/components/datepicker.d.ts.map +0 -1
- package/lib/components/datepicker.js +0 -193
- package/lib/components/datepicker.ts +0 -251
- package/lib/components/dialog.d.ts +0 -39
- package/lib/components/dialog.d.ts.map +0 -1
- package/lib/components/dialog.js +0 -131
- package/lib/components/dialog.ts +0 -178
- package/lib/components/divider.d.ts +0 -31
- package/lib/components/divider.d.ts.map +0 -1
- package/lib/components/divider.js +0 -72
- package/lib/components/divider.ts +0 -104
- package/lib/components/dropdown-menu.d.ts +0 -42
- package/lib/components/dropdown-menu.d.ts.map +0 -1
- package/lib/components/dropdown-menu.js +0 -177
- package/lib/components/dropdown-menu.ts +0 -214
- package/lib/components/dropdown.d.ts +0 -41
- package/lib/components/dropdown.d.ts.map +0 -1
- package/lib/components/dropdown.js +0 -136
- package/lib/components/dropdown.ts +0 -188
- package/lib/components/element.d.ts +0 -51
- package/lib/components/element.d.ts.map +0 -1
- package/lib/components/element.js +0 -209
- package/lib/components/element.ts +0 -271
- package/lib/components/event-chain.d.ts +0 -9
- package/lib/components/event-chain.d.ts.map +0 -1
- package/lib/components/event-chain.js +0 -33
- package/lib/components/fileupload.d.ts +0 -98
- package/lib/components/fileupload.d.ts.map +0 -1
- package/lib/components/fileupload.js +0 -351
- package/lib/components/fileupload.ts +0 -449
- package/lib/components/grid.d.ts +0 -88
- package/lib/components/grid.d.ts.map +0 -1
- package/lib/components/grid.js +0 -208
- package/lib/components/grid.ts +0 -295
- package/lib/components/heading.d.ts +0 -25
- package/lib/components/heading.d.ts.map +0 -1
- package/lib/components/heading.js +0 -83
- package/lib/components/heading.ts +0 -113
- package/lib/components/helpers.d.ts +0 -9
- package/lib/components/helpers.d.ts.map +0 -1
- package/lib/components/helpers.js +0 -30
- package/lib/components/helpers.ts +0 -41
- package/lib/components/hero.d.ts +0 -60
- package/lib/components/hero.d.ts.map +0 -1
- package/lib/components/hero.js +0 -239
- package/lib/components/hero.ts +0 -302
- package/lib/components/history/StateHistory.d.ts +0 -91
- package/lib/components/history/StateHistory.d.ts.map +0 -1
- package/lib/components/history/StateHistory.js +0 -154
- package/lib/components/history/StateHistory.ts +0 -200
- package/lib/components/icon.d.ts +0 -36
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js +0 -135
- package/lib/components/icon.ts +0 -182
- package/lib/components/icons.d.ts +0 -25
- package/lib/components/icons.d.ts.map +0 -1
- package/lib/components/icons.js +0 -440
- package/lib/components/icons.ts +0 -464
- package/lib/components/image.d.ts +0 -42
- package/lib/components/image.d.ts.map +0 -1
- package/lib/components/image.js +0 -204
- package/lib/components/image.ts +0 -260
- package/lib/components/include.d.ts +0 -86
- package/lib/components/include.d.ts.map +0 -1
- package/lib/components/include.js +0 -238
- package/lib/components/include.ts +0 -281
- package/lib/components/input.d.ts +0 -85
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js +0 -362
- package/lib/components/input.ts +0 -473
- package/lib/components/layer.d.ts +0 -72
- package/lib/components/layer.d.ts.map +0 -1
- package/lib/components/layer.js +0 -219
- package/lib/components/layer.ts +0 -304
- package/lib/components/link.d.ts +0 -41
- package/lib/components/link.d.ts.map +0 -1
- package/lib/components/link.js +0 -216
- package/lib/components/link.ts +0 -268
- package/lib/components/list.d.ts +0 -83
- package/lib/components/list.d.ts.map +0 -1
- package/lib/components/list.js +0 -314
- package/lib/components/list.ts +0 -423
- package/lib/components/loading.d.ts +0 -25
- package/lib/components/loading.d.ts.map +0 -1
- package/lib/components/loading.js +0 -76
- package/lib/components/loading.ts +0 -104
- package/lib/components/menu.d.ts +0 -38
- package/lib/components/menu.d.ts.map +0 -1
- package/lib/components/menu.js +0 -205
- package/lib/components/menu.ts +0 -279
- package/lib/components/modal.d.ts +0 -97
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js +0 -463
- package/lib/components/modal.ts +0 -576
- package/lib/components/nav.d.ts +0 -46
- package/lib/components/nav.d.ts.map +0 -1
- package/lib/components/nav.js +0 -193
- package/lib/components/nav.ts +0 -261
- package/lib/components/paragraph.d.ts +0 -30
- package/lib/components/paragraph.d.ts.map +0 -1
- package/lib/components/paragraph.js +0 -93
- package/lib/components/paragraph.ts +0 -123
- package/lib/components/pen.d.ts +0 -125
- package/lib/components/pen.d.ts.map +0 -1
- package/lib/components/pen.js +0 -443
- package/lib/components/pen.ts +0 -567
- package/lib/components/progress.d.ts +0 -40
- package/lib/components/progress.d.ts.map +0 -1
- package/lib/components/progress.js +0 -116
- package/lib/components/progress.ts +0 -163
- package/lib/components/radio.d.ts +0 -43
- package/lib/components/radio.d.ts.map +0 -1
- package/lib/components/radio.js +0 -226
- package/lib/components/radio.ts +0 -303
- package/lib/components/registry.d.ts +0 -34
- package/lib/components/registry.d.ts.map +0 -1
- package/lib/components/registry.js +0 -163
- package/lib/components/registry.ts +0 -193
- package/lib/components/req.d.ts +0 -155
- package/lib/components/req.d.ts.map +0 -1
- package/lib/components/req.js +0 -253
- package/lib/components/req.ts +0 -303
- package/lib/components/script.d.ts +0 -14
- package/lib/components/script.d.ts.map +0 -1
- package/lib/components/script.js +0 -33
- package/lib/components/script.ts +0 -41
- package/lib/components/select.d.ts +0 -42
- package/lib/components/select.d.ts.map +0 -1
- package/lib/components/select.js +0 -209
- package/lib/components/select.ts +0 -281
- package/lib/components/sidebar.d.ts +0 -59
- package/lib/components/sidebar.d.ts.map +0 -1
- package/lib/components/sidebar.js +0 -298
- package/lib/components/sidebar.ts +0 -395
- package/lib/components/stack/BaseStack.d.ts +0 -65
- package/lib/components/stack/BaseStack.d.ts.map +0 -1
- package/lib/components/stack/BaseStack.js +0 -274
- package/lib/components/stack/BaseStack.ts +0 -328
- package/lib/components/stack/HStack.d.ts +0 -18
- package/lib/components/stack/HStack.d.ts.map +0 -1
- package/lib/components/stack/HStack.js +0 -22
- package/lib/components/stack/HStack.ts +0 -25
- package/lib/components/stack/VStack.d.ts +0 -19
- package/lib/components/stack/VStack.d.ts.map +0 -1
- package/lib/components/stack/VStack.js +0 -23
- package/lib/components/stack/VStack.ts +0 -26
- package/lib/components/stack/ZStack.d.ts +0 -18
- package/lib/components/stack/ZStack.d.ts.map +0 -1
- package/lib/components/stack/ZStack.js +0 -22
- package/lib/components/stack/ZStack.ts +0 -25
- package/lib/components/style.d.ts +0 -14
- package/lib/components/style.d.ts.map +0 -1
- package/lib/components/style.js +0 -33
- package/lib/components/style.ts +0 -41
- package/lib/components/switch.d.ts +0 -34
- package/lib/components/switch.d.ts.map +0 -1
- package/lib/components/switch.js +0 -209
- package/lib/components/switch.ts +0 -272
- package/lib/components/table.d.ts +0 -137
- package/lib/components/table.d.ts.map +0 -1
- package/lib/components/table.js +0 -1019
- package/lib/components/table.ts +0 -1225
- package/lib/components/tabs.d.ts +0 -53
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js +0 -275
- package/lib/components/tabs.ts +0 -349
- package/lib/components/theme-toggle.d.ts +0 -45
- package/lib/components/theme-toggle.d.ts.map +0 -1
- package/lib/components/theme-toggle.js +0 -218
- package/lib/components/theme-toggle.ts +0 -297
- package/lib/components/tooltip.d.ts +0 -31
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js +0 -112
- package/lib/components/tooltip.ts +0 -148
- package/lib/components/watcher.d.ts +0 -195
- package/lib/components/watcher.d.ts.map +0 -1
- package/lib/components/watcher.js +0 -241
- package/lib/components/watcher.ts +0 -261
- package/lib/components/write.d.ts +0 -107
- package/lib/components/write.d.ts.map +0 -1
- package/lib/components/write.js +0 -222
- package/lib/components/write.ts +0 -272
- package/lib/data/DataPipeline.d.ts +0 -113
- package/lib/data/DataPipeline.d.ts.map +0 -1
- package/lib/data/DataPipeline.js +0 -359
- package/lib/data/DataPipeline.ts +0 -452
- package/lib/facades/dataframe.jux +0 -0
- package/lib/globals.d.ts +0 -21
- package/lib/reactivity/state.d.ts +0 -36
- package/lib/reactivity/state.d.ts.map +0 -1
- package/lib/reactivity/state.js +0 -67
- package/lib/reactivity/state.ts +0 -78
- package/lib/storage/DataFrame.d.ts +0 -284
- package/lib/storage/DataFrame.d.ts.map +0 -1
- package/lib/storage/DataFrame.js +0 -1022
- package/lib/storage/DataFrame.ts +0 -1195
- package/lib/storage/DataFrameSource.d.ts +0 -158
- package/lib/storage/DataFrameSource.d.ts.map +0 -1
- package/lib/storage/DataFrameSource.js +0 -409
- package/lib/storage/DataFrameSource.ts +0 -556
- package/lib/storage/FileStorage.d.ts +0 -53
- package/lib/storage/FileStorage.d.ts.map +0 -1
- package/lib/storage/FileStorage.js +0 -80
- package/lib/storage/FileStorage.ts +0 -95
- package/lib/storage/IndexedDBDriver.d.ts +0 -75
- package/lib/storage/IndexedDBDriver.d.ts.map +0 -1
- package/lib/storage/IndexedDBDriver.js +0 -177
- package/lib/storage/IndexedDBDriver.ts +0 -226
- package/lib/storage/TabularDriver.d.ts +0 -118
- package/lib/storage/TabularDriver.d.ts.map +0 -1
- package/lib/storage/TabularDriver.js +0 -731
- package/lib/storage/TabularDriver.ts +0 -874
- package/lib/utils/codeparser.d.ts +0 -29
- package/lib/utils/codeparser.d.ts.map +0 -1
- package/lib/utils/codeparser.js +0 -409
- package/lib/utils/fetch.d.ts +0 -176
- package/lib/utils/fetch.d.ts.map +0 -1
- package/lib/utils/fetch.js +0 -427
- package/lib/utils/formatId.d.ts +0 -16
- package/lib/utils/formatId.d.ts.map +0 -1
- package/lib/utils/formatId.js +0 -27
- package/lib/utils/path-resolver.js +0 -23
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "juxscript",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.243",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A JavaScript UX authorship platform",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"types": "index.d.ts",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
8
|
"access": "public",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"default": "./index.js"
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts"
|
|
18
17
|
},
|
|
19
18
|
"./package.json": "./package.json"
|
|
20
19
|
},
|
package/index.d.ts
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { alert } from './lib/components/alert.js';
|
|
2
|
-
import { app } from './lib/components/app.js';
|
|
3
|
-
import { badge } from './lib/components/badge.js';
|
|
4
|
-
import { button } from './lib/components/button.js';
|
|
5
|
-
import { card } from './lib/components/card.js';
|
|
6
|
-
import { chart } from './lib/components/chart.js';
|
|
7
|
-
import { checkbox } from './lib/components/checkbox.js';
|
|
8
|
-
import { code } from './lib/components/code.js';
|
|
9
|
-
import { container } from './lib/components/container.js';
|
|
10
|
-
import { data } from './lib/components/data.js';
|
|
11
|
-
import { gather } from './lib/data/DataPipeline.js';
|
|
12
|
-
import { datepicker } from './lib/components/datepicker.js';
|
|
13
|
-
import { dialog } from './lib/components/dialog.js';
|
|
14
|
-
import { divider } from './lib/components/divider.js';
|
|
15
|
-
import { dropdown } from './lib/components/dropdown.js';
|
|
16
|
-
import { dropdownMenu } from './lib/components/dropdown-menu.js';
|
|
17
|
-
import { dataframe } from './lib/components/dataframe.js';
|
|
18
|
-
import { element } from './lib/components/element.js';
|
|
19
|
-
import { fileupload } from './lib/components/fileupload.js';
|
|
20
|
-
import { grid } from './lib/components/grid.js';
|
|
21
|
-
import { heading } from './lib/components/heading.js';
|
|
22
|
-
import { getOrCreateContainer } from './lib/components/helpers.js';
|
|
23
|
-
import { hero } from './lib/components/hero.js';
|
|
24
|
-
import { icon } from './lib/components/icon.js';
|
|
25
|
-
import { image } from './lib/components/image.js';
|
|
26
|
-
import { include } from './lib/components/include.js';
|
|
27
|
-
import { input } from './lib/components/input.js';
|
|
28
|
-
import { link, navLink, externalLink } from './lib/components/link.js';
|
|
29
|
-
import { list } from './lib/components/list.js';
|
|
30
|
-
import { loading } from './lib/components/loading.js';
|
|
31
|
-
import { menu } from './lib/components/menu.js';
|
|
32
|
-
import { modal } from './lib/components/modal.js';
|
|
33
|
-
import { nav } from './lib/components/nav.js';
|
|
34
|
-
import { paragraph } from './lib/components/paragraph.js';
|
|
35
|
-
import { pen } from './lib/components/pen.js';
|
|
36
|
-
import { progress } from './lib/components/progress.js';
|
|
37
|
-
import { radio } from './lib/components/radio.js';
|
|
38
|
-
import { script } from './lib/components/script.js';
|
|
39
|
-
import { select } from './lib/components/select.js';
|
|
40
|
-
import { sidebar } from './lib/components/sidebar.js';
|
|
41
|
-
import { style } from './lib/components/style.js';
|
|
42
|
-
import { switchComponent } from './lib/components/switch.js';
|
|
43
|
-
import { table } from './lib/components/table.js';
|
|
44
|
-
import { tabs } from './lib/components/tabs.js';
|
|
45
|
-
import { themeToggle } from './lib/components/theme-toggle.js';
|
|
46
|
-
import { tooltip } from './lib/components/tooltip.js';
|
|
47
|
-
import { write } from './lib/components/write.js';
|
|
48
|
-
import { renderIcon, renderEmoji } from './lib/components/icons.js';
|
|
49
|
-
import { state } from './lib/reactivity/state.js';
|
|
50
|
-
import { registry } from './lib/components/registry.js';
|
|
51
|
-
import { stateHistory } from './lib/components/history/StateHistory.js';
|
|
52
|
-
import { watcher } from './lib/components/watcher.js';
|
|
53
|
-
export { state, registry, stateHistory };
|
|
54
|
-
export { tabularDriver, TabularDriver } from './lib/storage/TabularDriver.js';
|
|
55
|
-
export { DataFrame, GroupedDataFrame } from './lib/storage/DataFrame.js';
|
|
56
|
-
export type { DataType, ColumnSchema, DataFrameOptions } from './lib/storage/DataFrame.js';
|
|
57
|
-
export { DataFrameSource, dataFrameSource } from './lib/storage/DataFrameSource.js';
|
|
58
|
-
export type { SourceOptions, APIOptions, StreamOptions, MultiSheetResult } from './lib/storage/DataFrameSource.js';
|
|
59
|
-
export { indexedDBDriver } from './lib/storage/IndexedDBDriver.js';
|
|
60
|
-
export { fileStorage } from './lib/storage/FileStorage.js';
|
|
61
|
-
export { gather, DataPipeline } from './lib/data/DataPipeline.js';
|
|
62
|
-
export type { PipelineOptions, FetchOptions, GatherOptions, IntoOptions } from './lib/data/DataPipeline.js';
|
|
63
|
-
export { dataframe } from './lib/components/dataframe.js';
|
|
64
|
-
import { VStack, vstack } from './lib/components/stack/VStack.js';
|
|
65
|
-
import { HStack, hstack } from './lib/components/stack/HStack.js';
|
|
66
|
-
import { ZStack, zstack } from './lib/components/stack/ZStack.js';
|
|
67
|
-
export { Link, link, navLink, externalLink } from './lib/components/link.js';
|
|
68
|
-
export type { LinkOptions } from './lib/components/link.js';
|
|
69
|
-
export { layer, overlay } from './lib/components/layer.js';
|
|
70
|
-
/**
|
|
71
|
-
* JUX Namespace - Main API
|
|
72
|
-
*/
|
|
73
|
-
export declare const jux: {
|
|
74
|
-
alert: typeof alert;
|
|
75
|
-
app: typeof app;
|
|
76
|
-
badge: typeof badge;
|
|
77
|
-
button: typeof button;
|
|
78
|
-
card: typeof card;
|
|
79
|
-
chart: typeof chart;
|
|
80
|
-
checkbox: typeof checkbox;
|
|
81
|
-
code: typeof code;
|
|
82
|
-
container: typeof container;
|
|
83
|
-
data: typeof data;
|
|
84
|
-
dataframe: typeof dataframe;
|
|
85
|
-
datepicker: typeof datepicker;
|
|
86
|
-
dialog: typeof dialog;
|
|
87
|
-
divider: typeof divider;
|
|
88
|
-
dropdown: typeof dropdown;
|
|
89
|
-
dropdownMenu: typeof dropdownMenu;
|
|
90
|
-
element: typeof element;
|
|
91
|
-
fileupload: typeof fileupload;
|
|
92
|
-
gather: typeof gather;
|
|
93
|
-
grid: typeof grid;
|
|
94
|
-
heading: typeof heading;
|
|
95
|
-
hero: typeof hero;
|
|
96
|
-
icon: typeof icon;
|
|
97
|
-
image: typeof image;
|
|
98
|
-
include: typeof include;
|
|
99
|
-
input: typeof input;
|
|
100
|
-
list: typeof list;
|
|
101
|
-
link: typeof link;
|
|
102
|
-
navLink: typeof navLink;
|
|
103
|
-
externalLink: typeof externalLink;
|
|
104
|
-
loading: typeof loading;
|
|
105
|
-
menu: typeof menu;
|
|
106
|
-
modal: typeof modal;
|
|
107
|
-
nav: typeof nav;
|
|
108
|
-
paragraph: typeof paragraph;
|
|
109
|
-
pen: typeof pen;
|
|
110
|
-
progress: typeof progress;
|
|
111
|
-
radio: typeof radio;
|
|
112
|
-
req: import("./lib/components/req.js").Req;
|
|
113
|
-
script: typeof script;
|
|
114
|
-
select: typeof select;
|
|
115
|
-
sidebar: typeof sidebar;
|
|
116
|
-
style: typeof style;
|
|
117
|
-
switch: typeof switchComponent;
|
|
118
|
-
table: typeof table;
|
|
119
|
-
tabs: typeof tabs;
|
|
120
|
-
themeToggle: typeof themeToggle;
|
|
121
|
-
tooltip: typeof tooltip;
|
|
122
|
-
write: typeof write;
|
|
123
|
-
vstack: typeof vstack;
|
|
124
|
-
hstack: typeof hstack;
|
|
125
|
-
zstack: typeof zstack;
|
|
126
|
-
fetch: typeof import("./lib/utils/fetch.js").juxFetch & {
|
|
127
|
-
all: typeof import("./lib/utils/fetch.js").fetchAll;
|
|
128
|
-
get: <T = any>(url: string, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method">) => {
|
|
129
|
-
url: string;
|
|
130
|
-
options: import("./lib/utils/fetch.js").FetchOptions;
|
|
131
|
-
method(value: string): /*elided*/ any;
|
|
132
|
-
body(value: any): /*elided*/ any;
|
|
133
|
-
params(value: Record<string, any>): /*elided*/ any;
|
|
134
|
-
headers(value: Record<string, string>): /*elided*/ any;
|
|
135
|
-
header(key: string, value: string): /*elided*/ any;
|
|
136
|
-
timeout(value: number): /*elided*/ any;
|
|
137
|
-
credentials(value: RequestCredentials): /*elided*/ any;
|
|
138
|
-
log(value: import("./lib/utils/fetch.js").LogLevel): /*elided*/ any;
|
|
139
|
-
parseResponse(value: boolean): /*elided*/ any;
|
|
140
|
-
onUnauthorized(callback: () => void): /*elided*/ any;
|
|
141
|
-
onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
|
|
142
|
-
send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
143
|
-
fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
144
|
-
then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
145
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
|
|
146
|
-
finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
147
|
-
};
|
|
148
|
-
post: <T = any>(url: string, body?: any, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method" | "body">) => {
|
|
149
|
-
url: string;
|
|
150
|
-
options: import("./lib/utils/fetch.js").FetchOptions;
|
|
151
|
-
method(value: string): /*elided*/ any;
|
|
152
|
-
body(value: any): /*elided*/ any;
|
|
153
|
-
params(value: Record<string, any>): /*elided*/ any;
|
|
154
|
-
headers(value: Record<string, string>): /*elided*/ any;
|
|
155
|
-
header(key: string, value: string): /*elided*/ any;
|
|
156
|
-
timeout(value: number): /*elided*/ any;
|
|
157
|
-
credentials(value: RequestCredentials): /*elided*/ any;
|
|
158
|
-
log(value: import("./lib/utils/fetch.js").LogLevel): /*elided*/ any;
|
|
159
|
-
parseResponse(value: boolean): /*elided*/ any;
|
|
160
|
-
onUnauthorized(callback: () => void): /*elided*/ any;
|
|
161
|
-
onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
|
|
162
|
-
send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
163
|
-
fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
164
|
-
then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
165
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
|
|
166
|
-
finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
167
|
-
};
|
|
168
|
-
put: <T = any>(url: string, body?: any, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method" | "body">) => {
|
|
169
|
-
url: string;
|
|
170
|
-
options: import("./lib/utils/fetch.js").FetchOptions;
|
|
171
|
-
method(value: string): /*elided*/ any;
|
|
172
|
-
body(value: any): /*elided*/ any;
|
|
173
|
-
params(value: Record<string, any>): /*elided*/ any;
|
|
174
|
-
headers(value: Record<string, string>): /*elided*/ any;
|
|
175
|
-
header(key: string, value: string): /*elided*/ any;
|
|
176
|
-
timeout(value: number): /*elided*/ any;
|
|
177
|
-
credentials(value: RequestCredentials): /*elided*/ any;
|
|
178
|
-
log(value: import("./lib/utils/fetch.js").LogLevel): /*elided*/ any;
|
|
179
|
-
parseResponse(value: boolean): /*elided*/ any;
|
|
180
|
-
onUnauthorized(callback: () => void): /*elided*/ any;
|
|
181
|
-
onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
|
|
182
|
-
send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
183
|
-
fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
184
|
-
then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
185
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
|
|
186
|
-
finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
187
|
-
};
|
|
188
|
-
patch: <T = any>(url: string, body?: any, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method" | "body">) => {
|
|
189
|
-
url: string;
|
|
190
|
-
options: import("./lib/utils/fetch.js").FetchOptions;
|
|
191
|
-
method(value: string): /*elided*/ any;
|
|
192
|
-
body(value: any): /*elided*/ any;
|
|
193
|
-
params(value: Record<string, any>): /*elided*/ any;
|
|
194
|
-
headers(value: Record<string, string>): /*elided*/ any;
|
|
195
|
-
header(key: string, value: string): /*elided*/ any;
|
|
196
|
-
timeout(value: number): /*elided*/ any;
|
|
197
|
-
credentials(value: RequestCredentials): /*elided*/ any;
|
|
198
|
-
log(value: import("./lib/utils/fetch.js").LogLevel): /*elided*/ any;
|
|
199
|
-
parseResponse(value: boolean): /*elided*/ any;
|
|
200
|
-
onUnauthorized(callback: () => void): /*elided*/ any;
|
|
201
|
-
onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
|
|
202
|
-
send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
203
|
-
fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
204
|
-
then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
205
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
|
|
206
|
-
finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
207
|
-
};
|
|
208
|
-
delete: <T = any>(url: string, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method">) => {
|
|
209
|
-
url: string;
|
|
210
|
-
options: import("./lib/utils/fetch.js").FetchOptions;
|
|
211
|
-
method(value: string): /*elided*/ any;
|
|
212
|
-
body(value: any): /*elided*/ any;
|
|
213
|
-
params(value: Record<string, any>): /*elided*/ any;
|
|
214
|
-
headers(value: Record<string, string>): /*elided*/ any;
|
|
215
|
-
header(key: string, value: string): /*elided*/ any;
|
|
216
|
-
timeout(value: number): /*elided*/ any;
|
|
217
|
-
credentials(value: RequestCredentials): /*elided*/ any;
|
|
218
|
-
log(value: import("./lib/utils/fetch.js").LogLevel): /*elided*/ any;
|
|
219
|
-
parseResponse(value: boolean): /*elided*/ any;
|
|
220
|
-
onUnauthorized(callback: () => void): /*elided*/ any;
|
|
221
|
-
onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
|
|
222
|
-
send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
223
|
-
fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
224
|
-
then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
225
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
|
|
226
|
-
finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
|
|
227
|
-
};
|
|
228
|
-
config: typeof import("./lib/utils/fetch.js").configureFetch;
|
|
229
|
-
setupConfig: typeof import("./lib/utils/fetch.js").setupConfig;
|
|
230
|
-
getServiceUrl: typeof import("./lib/utils/fetch.js").getServiceUrl;
|
|
231
|
-
serviceClient: typeof import("./lib/utils/fetch.js").serviceClient;
|
|
232
|
-
};
|
|
233
|
-
renderIcon: typeof renderIcon;
|
|
234
|
-
renderEmoji: typeof renderEmoji;
|
|
235
|
-
getOrCreateContainer: typeof getOrCreateContainer;
|
|
236
|
-
watcher: typeof watcher;
|
|
237
|
-
};
|
|
238
|
-
export { VStack, HStack, ZStack, vstack, hstack, zstack };
|
|
239
|
-
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from './base/BaseComponent.js';
|
|
2
|
-
export interface AlertOptions {
|
|
3
|
-
content?: string;
|
|
4
|
-
type?: 'info' | 'success' | 'warning' | 'error';
|
|
5
|
-
dismissible?: boolean;
|
|
6
|
-
icon?: string;
|
|
7
|
-
style?: string;
|
|
8
|
-
class?: string;
|
|
9
|
-
}
|
|
10
|
-
type AlertState = {
|
|
11
|
-
content: string;
|
|
12
|
-
type: string;
|
|
13
|
-
dismissible: boolean;
|
|
14
|
-
icon: string;
|
|
15
|
-
visible: boolean;
|
|
16
|
-
style: string;
|
|
17
|
-
class: string;
|
|
18
|
-
};
|
|
19
|
-
export declare class Alert extends BaseComponent<AlertState> {
|
|
20
|
-
private _alert;
|
|
21
|
-
constructor(id: string, options?: AlertOptions);
|
|
22
|
-
protected getTriggerEvents(): readonly string[];
|
|
23
|
-
protected getCallbackEvents(): readonly string[];
|
|
24
|
-
content(value: string): this;
|
|
25
|
-
type(value: 'info' | 'success' | 'warning' | 'error'): this;
|
|
26
|
-
dismissible(value: boolean): this;
|
|
27
|
-
icon(value: string): this;
|
|
28
|
-
/**
|
|
29
|
-
* Reactive update hook
|
|
30
|
-
*/
|
|
31
|
-
update(prop: string, value: any): void;
|
|
32
|
-
render(targetId?: string | HTMLElement | BaseComponent<any>): this;
|
|
33
|
-
}
|
|
34
|
-
export declare function alert(id: string, options?: AlertOptions): Alert;
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOxD,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,UAAU,GAAG;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,KAAM,SAAQ,aAAa,CAAC,UAAU,CAAC;IAChD,OAAO,CAAC,MAAM,CAA4B;gBAE9B,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB;IAYlD,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAiBhD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK5B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI;IAK3D,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAKjC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKzB;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAoBtC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;CA6GrE;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,KAAK,CAEnE"}
|
package/lib/components/alert.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from './base/BaseComponent.js';
|
|
2
|
-
import { renderIcon } from './icons.js';
|
|
3
|
-
// Event definitions
|
|
4
|
-
const TRIGGER_EVENTS = [];
|
|
5
|
-
const CALLBACK_EVENTS = ['dismiss'];
|
|
6
|
-
export class Alert extends BaseComponent {
|
|
7
|
-
constructor(id, options = {}) {
|
|
8
|
-
super(id, {
|
|
9
|
-
content: options.content ?? '',
|
|
10
|
-
type: options.type ?? 'info',
|
|
11
|
-
dismissible: options.dismissible ?? true,
|
|
12
|
-
icon: options.icon ?? '',
|
|
13
|
-
visible: true,
|
|
14
|
-
style: options.style ?? '',
|
|
15
|
-
class: options.class ?? ''
|
|
16
|
-
});
|
|
17
|
-
this._alert = null;
|
|
18
|
-
}
|
|
19
|
-
getTriggerEvents() {
|
|
20
|
-
return TRIGGER_EVENTS;
|
|
21
|
-
}
|
|
22
|
-
getCallbackEvents() {
|
|
23
|
-
return CALLBACK_EVENTS;
|
|
24
|
-
}
|
|
25
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
26
|
-
* FLUENT API
|
|
27
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
28
|
-
// ✅ Inherited from BaseComponent:
|
|
29
|
-
// - style(), class()
|
|
30
|
-
// - bind(), sync(), renderTo()
|
|
31
|
-
// - addClass(), removeClass(), toggleClass()
|
|
32
|
-
// - visible(), show(), hide(), toggleVisibility()
|
|
33
|
-
// - attr(), attrs(), removeAttr()
|
|
34
|
-
// - disabled(), enable(), disable()
|
|
35
|
-
// - loading(), focus(), blur(), remove()
|
|
36
|
-
content(value) {
|
|
37
|
-
this.state.content = value;
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
type(value) {
|
|
41
|
-
this.state.type = value;
|
|
42
|
-
return this;
|
|
43
|
-
}
|
|
44
|
-
dismissible(value) {
|
|
45
|
-
this.state.dismissible = value;
|
|
46
|
-
return this;
|
|
47
|
-
}
|
|
48
|
-
icon(value) {
|
|
49
|
-
this.state.icon = value;
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Reactive update hook
|
|
54
|
-
*/
|
|
55
|
-
update(prop, value) {
|
|
56
|
-
const el = document.getElementById(this._id);
|
|
57
|
-
if (!el)
|
|
58
|
-
return;
|
|
59
|
-
if (prop === 'content') {
|
|
60
|
-
const contentEl = el.querySelector('.jux-alert-content');
|
|
61
|
-
if (contentEl)
|
|
62
|
-
contentEl.textContent = value;
|
|
63
|
-
}
|
|
64
|
-
else if (prop === 'type') {
|
|
65
|
-
// Update alert type class
|
|
66
|
-
el.className = `jux-alert jux-alert-${value}`;
|
|
67
|
-
if (this.state.class)
|
|
68
|
-
el.className += ` ${this.state.class}`;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
72
|
-
* RENDER
|
|
73
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
74
|
-
render(targetId) {
|
|
75
|
-
const container = this._setupContainer(targetId);
|
|
76
|
-
const { content, type, dismissible, icon, style, class: className } = this.state;
|
|
77
|
-
const hasVisibleSync = this._syncBindings.some(b => b.property === 'visible');
|
|
78
|
-
// Build alert element
|
|
79
|
-
const alert = document.createElement('div');
|
|
80
|
-
alert.className = `jux-alert jux-alert-${type}`;
|
|
81
|
-
alert.id = this._id;
|
|
82
|
-
if (className)
|
|
83
|
-
alert.className += ` ${className}`;
|
|
84
|
-
if (style)
|
|
85
|
-
alert.setAttribute('style', style);
|
|
86
|
-
if (icon) {
|
|
87
|
-
const iconEl = document.createElement('span');
|
|
88
|
-
iconEl.className = 'jux-alert-icon';
|
|
89
|
-
iconEl.appendChild(renderIcon(icon));
|
|
90
|
-
alert.appendChild(iconEl);
|
|
91
|
-
}
|
|
92
|
-
const contentEl = document.createElement('div');
|
|
93
|
-
contentEl.className = 'jux-alert-content';
|
|
94
|
-
contentEl.textContent = content;
|
|
95
|
-
alert.appendChild(contentEl);
|
|
96
|
-
if (dismissible) {
|
|
97
|
-
const closeBtn = document.createElement('button');
|
|
98
|
-
closeBtn.className = 'jux-alert-close';
|
|
99
|
-
closeBtn.innerHTML = '×';
|
|
100
|
-
alert.appendChild(closeBtn);
|
|
101
|
-
}
|
|
102
|
-
// Default dismiss behavior (only if NOT using sync)
|
|
103
|
-
if (!hasVisibleSync && dismissible) {
|
|
104
|
-
const closeBtn = alert.querySelector('.jux-alert-close');
|
|
105
|
-
closeBtn?.addEventListener('click', () => {
|
|
106
|
-
// 🎯 Fire the dismiss callback event
|
|
107
|
-
this._triggerCallback('dismiss');
|
|
108
|
-
alert.remove();
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
// Wire events using inherited method
|
|
112
|
-
this._wireStandardEvents(alert);
|
|
113
|
-
// Wire sync bindings
|
|
114
|
-
this._syncBindings.forEach(({ property, stateObj, toState, toComponent }) => {
|
|
115
|
-
if (property === 'content') {
|
|
116
|
-
const transform = toComponent || ((v) => String(v));
|
|
117
|
-
stateObj.subscribe((val) => {
|
|
118
|
-
const transformed = transform(val);
|
|
119
|
-
contentEl.textContent = transformed;
|
|
120
|
-
this.state.content = transformed;
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
else if (property === 'type') {
|
|
124
|
-
const transform = toComponent || ((v) => String(v));
|
|
125
|
-
stateObj.subscribe((val) => {
|
|
126
|
-
const transformed = transform(val);
|
|
127
|
-
alert.className = `jux-alert jux-alert-${transformed}`;
|
|
128
|
-
if (className)
|
|
129
|
-
alert.className += ` ${className}`;
|
|
130
|
-
this.state.type = transformed;
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
else if (property === 'visible') {
|
|
134
|
-
const transformToState = toState || ((v) => Boolean(v));
|
|
135
|
-
const transform = toComponent || ((v) => Boolean(v));
|
|
136
|
-
let isUpdating = false;
|
|
137
|
-
// State → Component
|
|
138
|
-
stateObj.subscribe((val) => {
|
|
139
|
-
if (isUpdating)
|
|
140
|
-
return;
|
|
141
|
-
const transformed = transform(val);
|
|
142
|
-
alert.style.display = transformed ? 'flex' : 'none';
|
|
143
|
-
});
|
|
144
|
-
// Component → State (close button)
|
|
145
|
-
if (dismissible) {
|
|
146
|
-
const closeBtn = alert.querySelector('.jux-alert-close');
|
|
147
|
-
closeBtn?.addEventListener('click', () => {
|
|
148
|
-
if (isUpdating)
|
|
149
|
-
return;
|
|
150
|
-
isUpdating = true;
|
|
151
|
-
alert.style.display = 'none';
|
|
152
|
-
stateObj.set(transformToState(false));
|
|
153
|
-
// 🎯 Fire the dismiss callback event
|
|
154
|
-
this._triggerCallback('dismiss');
|
|
155
|
-
setTimeout(() => { isUpdating = false; }, 0);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
container.appendChild(alert);
|
|
161
|
-
this._alert = alert;
|
|
162
|
-
requestAnimationFrame(() => {
|
|
163
|
-
if (window.lucide) {
|
|
164
|
-
window.lucide.createIcons();
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
return this;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
export function alert(id, options = {}) {
|
|
171
|
-
return new Alert(id, options);
|
|
172
|
-
}
|