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/lib/components/icons.ts
DELETED
|
@@ -1,464 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Icon utilities for components
|
|
3
|
-
* All icons are rendered through Iconify with configurable collections (lucide, heroicons, streamline, etc.)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// Lucide emoji mappings
|
|
7
|
-
const EMOJI_TO_LUCIDE: Record<string, string> = {
|
|
8
|
-
"✔️": "check-circle",
|
|
9
|
-
"✓": "check",
|
|
10
|
-
"❌": "x-circle",
|
|
11
|
-
"✗": "x",
|
|
12
|
-
"🔥": "flame",
|
|
13
|
-
"🚀": "rocket",
|
|
14
|
-
"⚙️": "settings",
|
|
15
|
-
"🏠": "home",
|
|
16
|
-
"👤": "user",
|
|
17
|
-
"💡": "lightbulb",
|
|
18
|
-
"🌈": "rainbow",
|
|
19
|
-
"🧪": "flask-conical",
|
|
20
|
-
"✉️": "mail",
|
|
21
|
-
"📞": "phone",
|
|
22
|
-
"🔍": "search",
|
|
23
|
-
"❤️": "heart",
|
|
24
|
-
"⭐": "star",
|
|
25
|
-
"⚠️": "alert-triangle",
|
|
26
|
-
"ℹ️": "info",
|
|
27
|
-
"❓": "help-circle",
|
|
28
|
-
"👁️": "eye",
|
|
29
|
-
"👁️🗨️": "eye-off",
|
|
30
|
-
"☰": "menu",
|
|
31
|
-
"🕐": "clock",
|
|
32
|
-
"📅": "calendar",
|
|
33
|
-
"⬇️": "chevron-down",
|
|
34
|
-
"⬆️": "chevron-up",
|
|
35
|
-
"⬅️": "chevron-left",
|
|
36
|
-
"➡️": "chevron-right",
|
|
37
|
-
"📈": "chart-column-increasing",
|
|
38
|
-
"📉": "chart-column-decreasing",
|
|
39
|
-
"⬇": "download",
|
|
40
|
-
"📤": "upload",
|
|
41
|
-
"📄": "file-text",
|
|
42
|
-
"🗑️": "trash-2",
|
|
43
|
-
"✏️": "edit",
|
|
44
|
-
"📋": "clipboard",
|
|
45
|
-
"🔗": "link",
|
|
46
|
-
"↗️": "external-link",
|
|
47
|
-
"☀️": "sun",
|
|
48
|
-
"🌙": "moon",
|
|
49
|
-
"📊": "bar-chart-3",
|
|
50
|
-
"🖥️": "layout-dashboard",
|
|
51
|
-
"📁": "folder",
|
|
52
|
-
"💰": "coins",
|
|
53
|
-
"📧": "mail",
|
|
54
|
-
"✅": "square-check",
|
|
55
|
-
"🗓️": "calendar-days",
|
|
56
|
-
"💬": "message-circle",
|
|
57
|
-
"🌐": "globe",
|
|
58
|
-
"🔬": "microscope",
|
|
59
|
-
"💊": "pill",
|
|
60
|
-
"🔒": "lock",
|
|
61
|
-
"⚖️": "scale",
|
|
62
|
-
"🔌": "plug",
|
|
63
|
-
"🔐": "lock-keyhole",
|
|
64
|
-
"🏥": "cross",
|
|
65
|
-
"👥": "users",
|
|
66
|
-
"💚": "heart",
|
|
67
|
-
"💸": "banknote",
|
|
68
|
-
"🧾": "receipt",
|
|
69
|
-
"➕": "plus",
|
|
70
|
-
"➖": "minus",
|
|
71
|
-
"💾": "save",
|
|
72
|
-
"🩺": "stethoscope",
|
|
73
|
-
"📦": "package",
|
|
74
|
-
"👋": "log-out",
|
|
75
|
-
"📎": "paperclip",
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// Heroicons emoji mappings
|
|
79
|
-
const EMOJI_TO_HEROICONS: Record<string, string> = {
|
|
80
|
-
"✔️": "check-circle",
|
|
81
|
-
"✓": "check",
|
|
82
|
-
"❌": "x-circle",
|
|
83
|
-
"✗": "x-mark",
|
|
84
|
-
"🔥": "fire",
|
|
85
|
-
"🚀": "rocket-launch",
|
|
86
|
-
"⚙️": "cog-6-tooth",
|
|
87
|
-
"🏠": "home",
|
|
88
|
-
"👤": "user",
|
|
89
|
-
"💡": "light-bulb",
|
|
90
|
-
"🌈": "sparkles",
|
|
91
|
-
"🧪": "beaker",
|
|
92
|
-
"✉️": "envelope",
|
|
93
|
-
"📞": "phone",
|
|
94
|
-
"🔍": "magnifying-glass",
|
|
95
|
-
"❤️": "heart",
|
|
96
|
-
"⭐": "star",
|
|
97
|
-
"⚠️": "exclamation-triangle",
|
|
98
|
-
"ℹ️": "information-circle",
|
|
99
|
-
"❓": "question-mark-circle",
|
|
100
|
-
"👁️": "eye",
|
|
101
|
-
"👁️🗨️": "eye-slash",
|
|
102
|
-
"☰": "bars-3",
|
|
103
|
-
"🕐": "clock",
|
|
104
|
-
"📅": "calendar",
|
|
105
|
-
"⬇️": "chevron-down",
|
|
106
|
-
"⬆️": "chevron-up",
|
|
107
|
-
"⬅️": "chevron-left",
|
|
108
|
-
"➡️": "chevron-right",
|
|
109
|
-
"📈": "chart-bar",
|
|
110
|
-
"📉": "chart-bar",
|
|
111
|
-
"⬇": "arrow-down-tray",
|
|
112
|
-
"📤": "arrow-up-tray",
|
|
113
|
-
"📄": "document-text",
|
|
114
|
-
"🗑️": "trash",
|
|
115
|
-
"✏️": "pencil",
|
|
116
|
-
"📋": "clipboard",
|
|
117
|
-
"🔗": "link",
|
|
118
|
-
"↗️": "arrow-top-right-on-square",
|
|
119
|
-
"☀️": "sun",
|
|
120
|
-
"🌙": "moon",
|
|
121
|
-
"📊": "chart-bar",
|
|
122
|
-
"🖥️": "computer-desktop",
|
|
123
|
-
"📁": "folder",
|
|
124
|
-
"💰": "currency-dollar",
|
|
125
|
-
"📧": "envelope",
|
|
126
|
-
"✅": "check-badge",
|
|
127
|
-
"🗓️": "calendar-days",
|
|
128
|
-
"💬": "chat-bubble-left",
|
|
129
|
-
"🌐": "globe-alt",
|
|
130
|
-
"🔬": "beaker",
|
|
131
|
-
"💊": "beaker",
|
|
132
|
-
"🔒": "lock-closed",
|
|
133
|
-
"⚖️": "scale",
|
|
134
|
-
"🔌": "bolt",
|
|
135
|
-
"🔐": "lock-closed",
|
|
136
|
-
"🏥": "plus",
|
|
137
|
-
"👥": "user-group",
|
|
138
|
-
"💚": "heart",
|
|
139
|
-
"💸": "banknote",
|
|
140
|
-
"🧾": "document-text",
|
|
141
|
-
"➕": "plus",
|
|
142
|
-
"➖": "minus",
|
|
143
|
-
"💾": "archive-box",
|
|
144
|
-
"🩺": "heart",
|
|
145
|
-
"📦": "archive-box",
|
|
146
|
-
"👋": "arrow-right-on-rectangle",
|
|
147
|
-
"📎": "paper-clip",
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// Material Symbols emoji mappings
|
|
151
|
-
const EMOJI_TO_MATERIAL_SYMBOLS: Record<string, string> = {
|
|
152
|
-
"✔️": "check-circle",
|
|
153
|
-
"✓": "check",
|
|
154
|
-
"❌": "cancel",
|
|
155
|
-
"✗": "close",
|
|
156
|
-
"🔥": "local-fire-department",
|
|
157
|
-
"🚀": "rocket-launch",
|
|
158
|
-
"⚙️": "settings",
|
|
159
|
-
"🏠": "home",
|
|
160
|
-
"👤": "person",
|
|
161
|
-
"💡": "lightbulb",
|
|
162
|
-
"🌈": "looks",
|
|
163
|
-
"🧪": "science",
|
|
164
|
-
"✉️": "mail",
|
|
165
|
-
"📞": "call",
|
|
166
|
-
"🔍": "search",
|
|
167
|
-
"❤️": "favorite",
|
|
168
|
-
"⭐": "star",
|
|
169
|
-
"⚠️": "warning",
|
|
170
|
-
"ℹ️": "info",
|
|
171
|
-
"❓": "help",
|
|
172
|
-
"👁️": "visibility",
|
|
173
|
-
"👁️🗨️": "visibility-off",
|
|
174
|
-
"☰": "menu",
|
|
175
|
-
"🕐": "schedule",
|
|
176
|
-
"📅": "calendar-today",
|
|
177
|
-
"⬇️": "arrow-downward",
|
|
178
|
-
"⬆️": "arrow-upward",
|
|
179
|
-
"⬅️": "arrow-back",
|
|
180
|
-
"➡️": "arrow-forward",
|
|
181
|
-
"📈": "trending-up",
|
|
182
|
-
"📉": "trending-down",
|
|
183
|
-
"⬇": "download",
|
|
184
|
-
"📤": "upload",
|
|
185
|
-
"📄": "description",
|
|
186
|
-
"🗑️": "delete",
|
|
187
|
-
"✏️": "edit",
|
|
188
|
-
"📋": "content-paste",
|
|
189
|
-
"🔗": "link",
|
|
190
|
-
"↗️": "open-in-new",
|
|
191
|
-
"☀️": "sunny",
|
|
192
|
-
"🌙": "dark-mode",
|
|
193
|
-
"📊": "bar-chart",
|
|
194
|
-
"🖥️": "dashboard",
|
|
195
|
-
"📁": "folder",
|
|
196
|
-
"💰": "savings",
|
|
197
|
-
"📧": "mail",
|
|
198
|
-
"✅": "check-box",
|
|
199
|
-
"🗓️": "calendar-month",
|
|
200
|
-
"💬": "chat",
|
|
201
|
-
"🌐": "public",
|
|
202
|
-
"🔬": "biotech",
|
|
203
|
-
"💊": "pill",
|
|
204
|
-
"🔒": "lock",
|
|
205
|
-
"⚖️": "balance",
|
|
206
|
-
"🔌": "power",
|
|
207
|
-
"🔐": "lock-open",
|
|
208
|
-
"🏥": "medical-services",
|
|
209
|
-
"👥": "group",
|
|
210
|
-
"💚": "favorite",
|
|
211
|
-
"💸": "payments",
|
|
212
|
-
"🧾": "receipt",
|
|
213
|
-
"➕": "add",
|
|
214
|
-
"➖": "remove",
|
|
215
|
-
"💾": "save",
|
|
216
|
-
"🩺": "medical-information",
|
|
217
|
-
"📦": "package",
|
|
218
|
-
"👋": "logout",
|
|
219
|
-
"📎": "attach-file",
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// IconPark (icon-park)
|
|
223
|
-
const EMOJI_TO_ICONPARK: Record<string, string> = {
|
|
224
|
-
"✔️": "check-one",
|
|
225
|
-
"✓": "check",
|
|
226
|
-
"❌": "close-one",
|
|
227
|
-
"✗": "close",
|
|
228
|
-
"🔥": "fire",
|
|
229
|
-
"🚀": "rocket-one",
|
|
230
|
-
"⚙️": "setting-config",
|
|
231
|
-
"🏠": "home",
|
|
232
|
-
"👤": "user",
|
|
233
|
-
"💡": "stack-light",
|
|
234
|
-
"🌈": "color-filter",
|
|
235
|
-
"🧪": "test-tube",
|
|
236
|
-
"✉️": "mail",
|
|
237
|
-
"📞": "phone-call",
|
|
238
|
-
"🔍": "search",
|
|
239
|
-
"❤️": "heart-ballon",
|
|
240
|
-
"⭐": "star",
|
|
241
|
-
"⚠️": "caution",
|
|
242
|
-
"ℹ️": "info",
|
|
243
|
-
"❓": "help",
|
|
244
|
-
"👁️": "eyes",
|
|
245
|
-
"👁️🗨️": "visibility-off",
|
|
246
|
-
"☰": "application-menu",
|
|
247
|
-
"🕐": "schedule",
|
|
248
|
-
"📅": "calendar",
|
|
249
|
-
"⬇️": "arrow-circle-down",
|
|
250
|
-
"⬆️": "arrow-circle-up",
|
|
251
|
-
"⬅️": "arrow-circle-left",
|
|
252
|
-
"➡️": "arrow-circle-right",
|
|
253
|
-
"📈": "trending-up",
|
|
254
|
-
"📉": "trending-down",
|
|
255
|
-
"⬇": "download-one",
|
|
256
|
-
"📤": "upload-one",
|
|
257
|
-
"📄": "doc-detail",
|
|
258
|
-
"🗑️": "delete-five",
|
|
259
|
-
"✏️": "edit-two",
|
|
260
|
-
"📋": "clipboard",
|
|
261
|
-
"🔗": "link-one",
|
|
262
|
-
"↗️": "circle-right-up",
|
|
263
|
-
"☀️": "sunrise",
|
|
264
|
-
"🌙": "death-star",
|
|
265
|
-
"📊": "chart-line-area",
|
|
266
|
-
"🖥️": "carousel",
|
|
267
|
-
"📁": "folder-open",
|
|
268
|
-
"💰": "dollar",
|
|
269
|
-
"📧": "mail",
|
|
270
|
-
"✅": "check-correct",
|
|
271
|
-
"🗓️": "calendar-dot",
|
|
272
|
-
"💬": "message",
|
|
273
|
-
"🌐": "world",
|
|
274
|
-
"🔬": "microscope",
|
|
275
|
-
"💊": "pills",
|
|
276
|
-
"🔒": "lock",
|
|
277
|
-
"⚖️": "balance-two",
|
|
278
|
-
"🔌": "power",
|
|
279
|
-
"🔐": "unlock",
|
|
280
|
-
"🏥": "hospital",
|
|
281
|
-
"👥": "every-user",
|
|
282
|
-
"💚": "favorite",
|
|
283
|
-
"💸": "payments",
|
|
284
|
-
"🧾": "receipt",
|
|
285
|
-
"➕": "add-one",
|
|
286
|
-
"➖": "reduce-one",
|
|
287
|
-
"💾": "save-one",
|
|
288
|
-
"🩺": "stethoscope",
|
|
289
|
-
"📦": "box",
|
|
290
|
-
"👋": "logout",
|
|
291
|
-
"📎": "link",
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
const ICONIFY_CDN_URL = "https://code.iconify.design/3/3.1.1/iconify.min.js";
|
|
295
|
-
const DEFAULT_ICON_COLLECTION = 'lucide';
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Render an icon from emoji, icon name, or image path
|
|
299
|
-
* @param value - Emoji (🚀), icon name (rocket), or image path (/icon.png)
|
|
300
|
-
* @param collection - Optional icon collection override (lucide, mdi, tabler, etc.)
|
|
301
|
-
* @returns HTMLElement containing the icon
|
|
302
|
-
*
|
|
303
|
-
* Usage:
|
|
304
|
-
* const icon = renderIcon('🚀'); // Default collection icon
|
|
305
|
-
* const icon = renderIcon('📎', 'mdi'); // MDI collection
|
|
306
|
-
* const icon = renderIcon('lucide:rocket'); // Explicit lucide collection
|
|
307
|
-
* const icon = renderIcon('mdi:home'); // Explicit mdi collection
|
|
308
|
-
* const icon = renderIcon('/icon.png'); // Image element
|
|
309
|
-
*/
|
|
310
|
-
export function renderIcon(value: string, collection?: string): HTMLElement {
|
|
311
|
-
// Check if it's an image path (contains / or . or starts with http)
|
|
312
|
-
if (value.includes('/') || value.includes('.') || value.startsWith('http')) {
|
|
313
|
-
return createImageIcon(value);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// Check for explicit collection prefix (e.g., lucide:rocket, mdi:home)
|
|
317
|
-
if (value.includes(':')) {
|
|
318
|
-
const [prefix, ...rest] = value.split(':');
|
|
319
|
-
const iconName = rest.join(':');
|
|
320
|
-
|
|
321
|
-
// Use the prefix as the collection
|
|
322
|
-
const element = createIconifyIcon(`${prefix}:${iconName}`);
|
|
323
|
-
ensureIconifyLoaded();
|
|
324
|
-
return element;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
const resolvedCollection = normalizeCollection(collection);
|
|
328
|
-
|
|
329
|
-
// Check if it's an emoji that maps to an icon key
|
|
330
|
-
const iconKey = getIconKeyForEmoji(value, resolvedCollection);
|
|
331
|
-
if (iconKey) {
|
|
332
|
-
const element = createIconifyIcon(`${resolvedCollection}:${iconKey}`);
|
|
333
|
-
ensureIconifyLoaded();
|
|
334
|
-
return element;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Check if it's a direct icon name (lowercase with hyphens)
|
|
338
|
-
if (/^[a-z][a-z0-9-]*$/.test(value)) {
|
|
339
|
-
const element = createIconifyIcon(`${resolvedCollection}:${value}`);
|
|
340
|
-
ensureIconifyLoaded();
|
|
341
|
-
return element;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
// Fallback: render as emoji
|
|
345
|
-
return createEmojiFallback(value);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Render raw emoji without conversion
|
|
350
|
-
* @param emoji - The emoji character
|
|
351
|
-
* @returns HTMLElement containing just the emoji
|
|
352
|
-
*/
|
|
353
|
-
export function renderEmoji(emoji: string): HTMLElement {
|
|
354
|
-
return createEmojiFallback(emoji);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Render a library-backed icon by name
|
|
359
|
-
*/
|
|
360
|
-
function renderLibraryIcon(iconName: string, collection: string): HTMLElement {
|
|
361
|
-
const element = createIconifyIcon(`${collection}:${iconName}`);
|
|
362
|
-
ensureIconifyLoaded();
|
|
363
|
-
return element;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Resolve global/default icon collection
|
|
368
|
-
*/
|
|
369
|
-
function normalizeCollection(collection?: string): string {
|
|
370
|
-
if (collection && typeof collection === 'string' && collection.trim()) {
|
|
371
|
-
return collection.trim().toLowerCase();
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
const globalCollection = (globalThis as any).JUX_ICON_LIBRARY;
|
|
375
|
-
if (typeof globalCollection === 'string' && globalCollection.trim()) {
|
|
376
|
-
return globalCollection.trim().toLowerCase();
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return DEFAULT_ICON_COLLECTION;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Get the icon key for an emoji based on the collection
|
|
384
|
-
*/
|
|
385
|
-
function getIconKeyForEmoji(emoji: string, collection: string): string | null {
|
|
386
|
-
// Normalize collection name for the switch statement
|
|
387
|
-
const baseCollection = collection.toLowerCase();
|
|
388
|
-
|
|
389
|
-
// Look up in the appropriate mapping
|
|
390
|
-
switch (baseCollection) {
|
|
391
|
-
case 'lucide':
|
|
392
|
-
return EMOJI_TO_LUCIDE[emoji] || null;
|
|
393
|
-
case 'heroicons':
|
|
394
|
-
return EMOJI_TO_HEROICONS[emoji] || null;
|
|
395
|
-
case 'material':
|
|
396
|
-
case 'material-symbols':
|
|
397
|
-
return EMOJI_TO_MATERIAL_SYMBOLS[emoji] || null;
|
|
398
|
-
case 'icon-park':
|
|
399
|
-
return EMOJI_TO_ICONPARK[emoji] || null;
|
|
400
|
-
default:
|
|
401
|
-
// Default to lucide for unknown collections
|
|
402
|
-
return EMOJI_TO_LUCIDE[emoji] || null;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Ensures Iconify is loaded and icons are rendered
|
|
408
|
-
*/
|
|
409
|
-
function ensureIconifyLoaded(): void {
|
|
410
|
-
if ((window as any).Iconify) {
|
|
411
|
-
// Already loaded, render immediately
|
|
412
|
-
(window as any).Iconify.scan();
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
if (!document.querySelector(`script[src="${ICONIFY_CDN_URL}"]`)) {
|
|
417
|
-
const script = document.createElement('script');
|
|
418
|
-
script.src = ICONIFY_CDN_URL;
|
|
419
|
-
script.onload = () => {
|
|
420
|
-
if ((window as any).Iconify) {
|
|
421
|
-
(window as any).Iconify.scan();
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
document.head.appendChild(script);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Create image icon element
|
|
430
|
-
*/
|
|
431
|
-
function createImageIcon(src: string): HTMLImageElement {
|
|
432
|
-
const img = document.createElement('img');
|
|
433
|
-
img.src = src;
|
|
434
|
-
img.style.width = '24px';
|
|
435
|
-
img.style.height = '24px';
|
|
436
|
-
img.style.display = 'inline-block';
|
|
437
|
-
img.style.objectFit = 'contain';
|
|
438
|
-
return img;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Create Iconify icon element
|
|
443
|
-
*/
|
|
444
|
-
function createIconifyIcon(icon: string): HTMLElement {
|
|
445
|
-
const iconEl = document.createElement('span');
|
|
446
|
-
iconEl.className = 'iconify';
|
|
447
|
-
iconEl.setAttribute('data-icon', icon);
|
|
448
|
-
iconEl.setAttribute('data-mode', 'svg');
|
|
449
|
-
iconEl.setAttribute('data-inline', 'false');
|
|
450
|
-
iconEl.style.width = '24px';
|
|
451
|
-
iconEl.style.height = '24px';
|
|
452
|
-
iconEl.style.display = 'inline-block';
|
|
453
|
-
return iconEl;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* Render native emoji or text
|
|
458
|
-
*/
|
|
459
|
-
function createEmojiFallback(emoji: string): HTMLSpanElement {
|
|
460
|
-
const span = document.createElement('span');
|
|
461
|
-
span.textContent = emoji;
|
|
462
|
-
span.style.display = 'inline-block';
|
|
463
|
-
return span;
|
|
464
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { BaseComponent, BaseState } from './base/BaseComponent.js';
|
|
2
|
-
export interface ImageOptions {
|
|
3
|
-
src?: string;
|
|
4
|
-
alt?: string;
|
|
5
|
-
width?: string;
|
|
6
|
-
height?: string;
|
|
7
|
-
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
8
|
-
loading?: 'lazy' | 'eager';
|
|
9
|
-
crossOrigin?: 'anonymous' | 'use-credentials';
|
|
10
|
-
style?: string;
|
|
11
|
-
class?: string;
|
|
12
|
-
}
|
|
13
|
-
interface ImageState extends BaseState {
|
|
14
|
-
src: string;
|
|
15
|
-
alt: string;
|
|
16
|
-
objectFit: string;
|
|
17
|
-
loadingType: string;
|
|
18
|
-
crossOrigin?: string;
|
|
19
|
-
isLoaded: boolean;
|
|
20
|
-
hasError: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare class Image extends BaseComponent<ImageState> {
|
|
23
|
-
constructor(id: string, options?: ImageOptions);
|
|
24
|
-
protected getTriggerEvents(): readonly string[];
|
|
25
|
-
protected getCallbackEvents(): readonly string[];
|
|
26
|
-
src(value: string): this;
|
|
27
|
-
alt(value: string): this;
|
|
28
|
-
objectFit(value: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'): this;
|
|
29
|
-
lazy(): this;
|
|
30
|
-
eager(): this;
|
|
31
|
-
crossOrigin(value: 'anonymous' | 'use-credentials'): this;
|
|
32
|
-
isLoaded(): boolean;
|
|
33
|
-
hasError(): boolean;
|
|
34
|
-
render(targetId?: string | HTMLElement | BaseComponent<any>): this;
|
|
35
|
-
update(prop: string, value: any): void;
|
|
36
|
-
}
|
|
37
|
-
export declare function image(id: string, options?: ImageOptions): Image;
|
|
38
|
-
export declare function avatar(id: string, src: string, alt?: string): Image;
|
|
39
|
-
export declare function logo(id: string, src: string, alt?: string): Image;
|
|
40
|
-
export declare function thumbnail(id: string, src: string, alt?: string): Image;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAOnE,MAAM,WAAW,YAAY;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;IACjE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,UAAW,SAAQ,SAAS;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,KAAM,SAAQ,aAAa,CAAC,UAAU,CAAC;gBACpC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB;IA0BlD,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAQhD,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAaxB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASxB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI;IAS5E,IAAI,IAAI,IAAI;IAKZ,KAAK,IAAI,IAAI;IAKb,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,GAAG,IAAI;IASzD,QAAQ,IAAI,OAAO;IAInB,QAAQ,IAAI,OAAO;IAQnB,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;IA4DlE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;CAoCzC;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,KAAK,CAEnE;AAGD,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAOnE;AAGD,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAMjE;AAGD,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAOtE"}
|