@adia-ai/web-components 0.4.6 → 0.4.8
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/README.md +39 -0
- package/USAGE.md +29 -9
- package/components/accordion/accordion.a2ui.json +3 -0
- package/components/accordion/accordion.d.ts +27 -0
- package/components/accordion/accordion.js +10 -117
- package/components/accordion/accordion.yaml +4 -0
- package/components/accordion/class.js +132 -0
- package/components/action-list/action-list.a2ui.json +3 -0
- package/components/action-list/action-list.d.ts +25 -0
- package/components/action-list/action-list.js +9 -140
- package/components/action-list/action-list.yaml +4 -0
- package/components/action-list/class.js +156 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +4 -0
- package/components/agent-artifact/agent-artifact.d.ts +35 -0
- package/components/agent-artifact/agent-artifact.js +8 -181
- package/components/agent-artifact/agent-artifact.yaml +5 -0
- package/components/agent-artifact/class.js +200 -0
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +3 -0
- package/components/agent-feedback-bar/agent-feedback-bar.d.ts +33 -0
- package/components/agent-feedback-bar/agent-feedback-bar.js +8 -143
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +4 -0
- package/components/agent-feedback-bar/class.js +162 -0
- package/components/agent-questions/agent-questions.a2ui.json +3 -0
- package/components/agent-questions/agent-questions.d.ts +33 -0
- package/components/agent-questions/agent-questions.js +8 -180
- package/components/agent-questions/agent-questions.yaml +4 -0
- package/components/agent-questions/class.js +199 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +4 -0
- package/components/agent-reasoning/agent-reasoning.d.ts +37 -0
- package/components/agent-reasoning/agent-reasoning.js +8 -494
- package/components/agent-reasoning/agent-reasoning.yaml +5 -0
- package/components/agent-reasoning/class.js +513 -0
- package/components/agent-suggestions/agent-suggestions.a2ui.json +3 -0
- package/components/agent-suggestions/agent-suggestions.d.ts +31 -0
- package/components/agent-suggestions/agent-suggestions.js +8 -78
- package/components/agent-suggestions/agent-suggestions.yaml +4 -0
- package/components/agent-suggestions/class.js +97 -0
- package/components/agent-trace/agent-trace.a2ui.json +1 -0
- package/components/agent-trace/agent-trace.d.ts +29 -0
- package/components/alert/alert.a2ui.json +1 -0
- package/components/alert/alert.d.ts +39 -0
- package/components/alert/alert.js +8 -175
- package/components/alert/class.js +194 -0
- package/components/aside/aside.a2ui.json +1 -0
- package/components/avatar/avatar.a2ui.json +3 -0
- package/components/avatar/avatar.d.ts +28 -0
- package/components/avatar/avatar.js +9 -159
- package/components/avatar/avatar.yaml +4 -0
- package/components/avatar/class.js +173 -0
- package/components/badge/badge.a2ui.json +3 -0
- package/components/badge/badge.d.ts +28 -0
- package/components/badge/badge.js +9 -75
- package/components/badge/badge.yaml +4 -0
- package/components/badge/class.js +93 -0
- package/components/block/block.a2ui.json +1 -0
- package/components/block/block.d.ts +20 -0
- package/components/block/block.js +9 -15
- package/components/block/class.js +33 -0
- package/components/breadcrumb/breadcrumb.a2ui.json +5 -0
- package/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/components/breadcrumb/breadcrumb.js +8 -113
- package/components/breadcrumb/breadcrumb.yaml +6 -0
- package/components/breadcrumb/class.js +132 -0
- package/components/button/button.a2ui.json +3 -0
- package/components/button/button.d.ts +44 -0
- package/components/button/button.js +15 -66
- package/components/button/button.yaml +5 -0
- package/components/button/class.js +80 -0
- package/components/calendar-picker/calendar-picker.a2ui.json +7 -1
- package/components/calendar-picker/calendar-picker.js +8 -332
- package/components/calendar-picker/calendar-picker.yaml +51 -177
- package/components/calendar-picker/class.js +351 -0
- package/components/canvas/canvas.a2ui.json +7 -1
- package/components/canvas/canvas.d.ts +33 -0
- package/components/canvas/canvas.yaml +29 -36
- package/components/card/card.a2ui.json +4 -0
- package/components/card/card.d.ts +37 -0
- package/components/card/card.js +9 -50
- package/components/card/card.yaml +171 -433
- package/components/card/class.js +68 -0
- package/components/chart/chart.a2ui.json +1 -0
- package/components/chart/chart.d.ts +55 -0
- package/components/chart/chart.js +8 -2131
- package/components/chart/class.js +2150 -0
- package/components/chart-legend/chart-legend.a2ui.json +4 -0
- package/components/chart-legend/chart-legend.d.ts +37 -0
- package/components/chart-legend/chart-legend.js +8 -197
- package/components/chart-legend/chart-legend.yaml +5 -0
- package/components/chart-legend/class.js +215 -0
- package/components/chat-thread/chat-thread.a2ui.json +1 -0
- package/components/chat-thread/chat-thread.d.ts +27 -0
- package/components/chat-thread/chat-thread.js +8 -157
- package/components/chat-thread/class.js +176 -0
- package/components/check/check.a2ui.json +1 -0
- package/components/check/check.js +11 -52
- package/components/check/class.js +68 -0
- package/components/code/class.js +501 -0
- package/components/code/code.a2ui.json +1 -0
- package/components/code/code.js +8 -482
- package/components/col/class.js +30 -0
- package/components/col/col.a2ui.json +1 -0
- package/components/col/col.d.ts +24 -0
- package/components/col/col.js +10 -13
- package/components/color-picker/class.js +550 -0
- package/components/color-picker/color-picker.a2ui.json +3 -0
- package/components/color-picker/color-picker.js +8 -531
- package/components/color-picker/color-picker.yaml +4 -0
- package/components/command/class.js +364 -0
- package/components/command/command.a2ui.json +4 -0
- package/components/command/command.d.ts +31 -0
- package/components/command/command.js +8 -345
- package/components/command/command.yaml +105 -124
- package/components/demo-toggle/class.js +153 -0
- package/components/demo-toggle/demo-toggle.a2ui.json +1 -0
- package/components/demo-toggle/demo-toggle.d.ts +33 -0
- package/components/demo-toggle/demo-toggle.js +8 -135
- package/components/description-list/class.js +86 -0
- package/components/description-list/description-list.a2ui.json +1 -0
- package/components/description-list/description-list.d.ts +22 -0
- package/components/description-list/description-list.js +8 -67
- package/components/divider/class.js +57 -0
- package/components/divider/divider.a2ui.json +1 -0
- package/components/divider/divider.d.ts +20 -0
- package/components/divider/divider.js +10 -40
- package/components/drawer/class.js +306 -0
- package/components/drawer/drawer.a2ui.json +1 -0
- package/components/drawer/drawer.d.ts +35 -0
- package/components/drawer/drawer.js +8 -287
- package/components/embed/class.js +73 -0
- package/components/embed/embed.a2ui.json +1 -0
- package/components/embed/embed.d.ts +24 -0
- package/components/embed/embed.js +9 -55
- package/components/empty-state/class.js +108 -0
- package/components/empty-state/empty-state.a2ui.json +3 -0
- package/components/empty-state/empty-state.d.ts +22 -0
- package/components/empty-state/empty-state.js +9 -90
- package/components/empty-state/empty-state.yaml +4 -0
- package/components/feed/class.js +381 -0
- package/components/feed/feed.a2ui.json +9 -1
- package/components/feed/feed.d.ts +29 -0
- package/components/feed/feed.js +9 -367
- package/components/feed/feed.yaml +8 -1
- package/components/field/class.js +266 -0
- package/components/field/field.a2ui.json +1 -0
- package/components/field/field.d.ts +24 -0
- package/components/field/field.js +8 -247
- package/components/fields/class.js +106 -0
- package/components/fields/fields.a2ui.json +1 -0
- package/components/fields/fields.d.ts +20 -0
- package/components/fields/fields.js +8 -87
- package/components/footer/footer.a2ui.json +1 -0
- package/components/grid/class.js +31 -0
- package/components/grid/grid.a2ui.json +1 -0
- package/components/grid/grid.d.ts +24 -0
- package/components/grid/grid.js +10 -14
- package/components/header/header.a2ui.json +1 -0
- package/components/heatmap/class.js +305 -0
- package/components/heatmap/heatmap.a2ui.json +1 -0
- package/components/heatmap/heatmap.d.ts +43 -0
- package/components/heatmap/heatmap.js +8 -286
- package/components/icon/class.js +54 -0
- package/components/icon/icon.a2ui.json +1 -0
- package/components/icon/icon.d.ts +24 -0
- package/components/icon/icon.js +13 -40
- package/components/image/class.js +112 -0
- package/components/image/image.a2ui.json +3 -0
- package/components/image/image.d.ts +34 -0
- package/components/image/image.js +9 -94
- package/components/image/image.yaml +4 -0
- package/components/index.js +8 -0
- package/components/input/class.js +773 -0
- package/components/input/input.a2ui.json +7 -0
- package/components/input/input.js +8 -755
- package/components/input/input.yaml +177 -442
- package/components/inspector/class.js +142 -0
- package/components/inspector/inspector.a2ui.json +13 -1
- package/components/inspector/inspector.d.ts +18 -0
- package/components/inspector/inspector.js +8 -124
- package/components/inspector/inspector.yaml +21 -30
- package/components/kbd/class.js +34 -0
- package/components/kbd/kbd.a2ui.json +4 -0
- package/components/kbd/kbd.d.ts +18 -0
- package/components/kbd/kbd.js +10 -17
- package/components/kbd/kbd.yaml +54 -185
- package/components/link/class.js +187 -0
- package/components/link/link.a2ui.json +1 -0
- package/components/link/link.d.ts +65 -0
- package/components/link/link.js +8 -168
- package/components/list/class.js +249 -0
- package/components/list/list.a2ui.json +3 -0
- package/components/list/list.d.ts +33 -0
- package/components/list/list.js +9 -231
- package/components/list/list.yaml +4 -0
- package/components/menu/class.js +332 -0
- package/components/menu/menu.a2ui.json +3 -0
- package/components/menu/menu.d.ts +31 -0
- package/components/menu/menu.js +11 -316
- package/components/menu/menu.yaml +4 -0
- package/components/modal/class.js +231 -0
- package/components/modal/modal.a2ui.json +6 -1
- package/components/modal/modal.d.ts +33 -0
- package/components/modal/modal.js +8 -212
- package/components/modal/modal.yaml +19 -39
- package/components/nav/class.js +150 -0
- package/components/nav/nav.a2ui.json +1 -0
- package/components/nav/nav.d.ts +41 -0
- package/components/nav/nav.js +8 -131
- package/components/nav-group/class.js +152 -0
- package/components/nav-group/nav-group.a2ui.json +1 -0
- package/components/nav-group/nav-group.d.ts +45 -0
- package/components/nav-group/nav-group.js +9 -134
- package/components/nav-item/class.js +86 -0
- package/components/nav-item/nav-item.a2ui.json +1 -0
- package/components/nav-item/nav-item.d.ts +47 -0
- package/components/nav-item/nav-item.js +10 -69
- package/components/noodles/class.js +510 -0
- package/components/noodles/noodles.a2ui.json +1 -0
- package/components/noodles/noodles.d.ts +47 -0
- package/components/noodles/noodles.js +9 -493
- package/components/option-card/class.js +167 -0
- package/components/option-card/option-card.a2ui.json +3 -0
- package/components/option-card/option-card.js +8 -149
- package/components/option-card/option-card.yaml +4 -0
- package/components/otp-input/class.js +180 -0
- package/components/otp-input/otp-input.a2ui.json +6 -1
- package/components/otp-input/otp-input.js +9 -162
- package/components/otp-input/otp-input.yaml +45 -174
- package/components/page/class.js +97 -0
- package/components/page/page.a2ui.json +1 -0
- package/components/page/page.d.ts +47 -0
- package/components/page/page.js +8 -79
- package/components/pagination/class.js +195 -0
- package/components/pagination/pagination.a2ui.json +1 -0
- package/components/pagination/pagination.d.ts +33 -0
- package/components/pagination/pagination.js +9 -177
- package/components/pane/class.js +186 -0
- package/components/pane/pane.a2ui.json +20 -2
- package/components/pane/pane.d.ts +41 -0
- package/components/pane/pane.js +8 -167
- package/components/pane/pane.yaml +64 -158
- package/components/pipeline-status/class.js +189 -0
- package/components/pipeline-status/pipeline-status.a2ui.json +8 -1
- package/components/pipeline-status/pipeline-status.d.ts +22 -0
- package/components/pipeline-status/pipeline-status.js +9 -172
- package/components/pipeline-status/pipeline-status.yaml +34 -72
- package/components/popover/class.js +194 -0
- package/components/popover/popover.a2ui.json +1 -0
- package/components/popover/popover.d.ts +24 -0
- package/components/popover/popover.js +9 -176
- package/components/progress/class.js +74 -0
- package/components/progress/progress.a2ui.json +4 -0
- package/components/progress/progress.d.ts +20 -0
- package/components/progress/progress.js +10 -57
- package/components/progress/progress.yaml +124 -287
- package/components/progress-row/class.js +110 -0
- package/components/progress-row/progress-row.a2ui.json +3 -0
- package/components/progress-row/progress-row.d.ts +24 -0
- package/components/progress-row/progress-row.js +8 -92
- package/components/progress-row/progress-row.yaml +4 -0
- package/components/radio/class.js +83 -0
- package/components/radio/radio.a2ui.json +1 -0
- package/components/radio/radio.js +11 -67
- package/components/range/class.js +194 -0
- package/components/range/range.a2ui.json +1 -0
- package/components/range/range.js +9 -176
- package/components/rating/class.js +148 -0
- package/components/rating/rating.a2ui.json +1 -0
- package/components/rating/rating.js +9 -130
- package/components/richtext/class.js +87 -0
- package/components/richtext/richtext.a2ui.json +8 -1
- package/components/richtext/richtext.d.ts +20 -0
- package/components/richtext/richtext.js +8 -68
- package/components/richtext/richtext.yaml +30 -65
- package/components/row/class.js +50 -0
- package/components/row/row.a2ui.json +1 -0
- package/components/row/row.d.ts +37 -0
- package/components/row/row.js +10 -33
- package/components/search/class.js +134 -0
- package/components/search/search.a2ui.json +1 -0
- package/components/search/search.js +10 -117
- package/components/section/section.a2ui.json +1 -0
- package/components/segment/class.js +62 -0
- package/components/segment/segment.a2ui.json +3 -0
- package/components/segment/segment.d.ts +26 -0
- package/components/segment/segment.js +10 -45
- package/components/segment/segment.yaml +4 -0
- package/components/segmented/class.js +165 -0
- package/components/segmented/segmented.a2ui.json +5 -0
- package/components/segmented/segmented.js +10 -148
- package/components/segmented/segmented.yaml +41 -59
- package/components/select/class.js +408 -0
- package/components/select/select.a2ui.json +3 -0
- package/components/select/select.js +15 -396
- package/components/select/select.yaml +4 -0
- package/components/skeleton/class.js +52 -0
- package/components/skeleton/skeleton.a2ui.json +1 -0
- package/components/skeleton/skeleton.d.ts +24 -0
- package/components/skeleton/skeleton.js +8 -34
- package/components/slider/class.js +184 -0
- package/components/slider/slider.a2ui.json +1 -0
- package/components/slider/slider.js +9 -166
- package/components/stack/class.js +28 -0
- package/components/stack/stack.a2ui.json +1 -0
- package/components/stack/stack.d.ts +18 -0
- package/components/stack/stack.js +10 -11
- package/components/stat/stat.a2ui.json +1 -0
- package/components/step-progress/class.js +98 -0
- package/components/step-progress/step-progress.a2ui.json +1 -0
- package/components/step-progress/step-progress.d.ts +28 -0
- package/components/step-progress/step-progress.js +8 -79
- package/components/stepper/class.js +126 -0
- package/components/stepper/stepper.a2ui.json +3 -0
- package/components/stepper/stepper.d.ts +20 -0
- package/components/stepper/stepper.js +9 -112
- package/components/stepper/stepper.yaml +4 -0
- package/components/stream/class.js +109 -0
- package/components/stream/stream.a2ui.json +1 -0
- package/components/stream/stream.d.ts +33 -0
- package/components/stream/stream.js +8 -90
- package/components/swatch/class.js +131 -0
- package/components/swatch/swatch.a2ui.json +1 -0
- package/components/swatch/swatch.d.ts +29 -0
- package/components/swatch/swatch.js +8 -112
- package/components/swiper/class.js +373 -0
- package/components/swiper/swiper.a2ui.json +7 -0
- package/components/swiper/swiper.d.ts +45 -0
- package/components/swiper/swiper.js +8 -354
- package/components/swiper/swiper.yaml +72 -212
- package/components/switch/class.js +63 -0
- package/components/switch/switch.a2ui.json +7 -1
- package/components/switch/switch.js +11 -47
- package/components/switch/switch.yaml +70 -265
- package/components/table/class.js +1453 -0
- package/components/table/table.a2ui.json +7 -0
- package/components/table/table.d.ts +55 -0
- package/components/table/table.js +8 -1435
- package/components/table/table.yaml +8 -0
- package/components/table-toolbar/class.js +680 -0
- package/components/table-toolbar/table-toolbar.a2ui.json +12 -0
- package/components/table-toolbar/table-toolbar.d.ts +49 -0
- package/components/table-toolbar/table-toolbar.js +8 -689
- package/components/table-toolbar/table-toolbar.yaml +13 -0
- package/components/tabs/class.js +242 -0
- package/components/tabs/tabs.a2ui.json +3 -0
- package/components/tabs/tabs.d.ts +31 -0
- package/components/tabs/tabs.js +8 -223
- package/components/tabs/tabs.yaml +4 -0
- package/components/tag/class.js +99 -0
- package/components/tag/tag.a2ui.json +1 -0
- package/components/tag/tag.d.ts +37 -0
- package/components/tag/tag.js +8 -80
- package/components/text/class.js +46 -0
- package/components/text/text.a2ui.json +1 -0
- package/components/text/text.d.ts +26 -0
- package/components/text/text.js +9 -28
- package/components/textarea/class.js +134 -0
- package/components/textarea/textarea.a2ui.json +1 -0
- package/components/textarea/textarea.js +11 -118
- package/components/timeline/class.js +176 -0
- package/components/timeline/timeline.a2ui.json +18 -1
- package/components/timeline/timeline.d.ts +36 -0
- package/components/timeline/timeline.js +9 -162
- package/components/timeline/timeline.yaml +14 -1
- package/components/toast/class.js +92 -0
- package/components/toast/toast.a2ui.json +1 -0
- package/components/toast/toast.d.ts +33 -0
- package/components/toast/toast.js +9 -76
- package/components/toggle-group/class.js +154 -0
- package/components/toggle-group/toggle-group.a2ui.json +1 -0
- package/components/toggle-group/toggle-group.d.ts +29 -0
- package/components/toggle-group/toggle-group.js +11 -140
- package/components/toggle-scheme/class.js +286 -0
- package/components/toggle-scheme/toggle-scheme.a2ui.json +3 -0
- package/components/toggle-scheme/toggle-scheme.d.ts +51 -0
- package/components/toggle-scheme/toggle-scheme.js +8 -268
- package/components/toggle-scheme/toggle-scheme.yaml +4 -0
- package/components/toolbar/class.js +388 -0
- package/components/toolbar/toolbar.a2ui.json +3 -0
- package/components/toolbar/toolbar.d.ts +24 -0
- package/components/toolbar/toolbar.js +10 -376
- package/components/toolbar/toolbar.yaml +4 -0
- package/components/tooltip/class.js +299 -0
- package/components/tooltip/tooltip.a2ui.json +1 -0
- package/components/tooltip/tooltip.d.ts +28 -0
- package/components/tooltip/tooltip.js +8 -280
- package/components/tree/class.js +245 -0
- package/components/tree/tree.a2ui.json +3 -0
- package/components/tree/tree.d.ts +25 -0
- package/components/tree/tree.js +9 -244
- package/components/tree/tree.yaml +4 -0
- package/components/upload/class.js +199 -0
- package/components/upload/upload.a2ui.json +1 -0
- package/components/upload/upload.js +11 -183
- package/core/icons-phosphor.js +93 -0
- package/core/icons.js +92 -90
- package/core/index.js +5 -0
- package/index.d.ts +160 -5
- package/index.js +7 -0
- package/package.json +7 -2
package/core/icons.js
CHANGED
|
@@ -1,11 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Icon Registry —
|
|
3
|
-
* All icons are loaded on-demand; each weight variant is cached separately.
|
|
2
|
+
* Icon Registry — pluggable icon lookup map.
|
|
4
3
|
*
|
|
5
4
|
* Usage:
|
|
6
5
|
* <icon-ui name="paper-plane-right"></icon-ui>
|
|
7
6
|
* <icon-ui name="star" weight="fill"></icon-ui>
|
|
8
7
|
* <icon-ui name="heart" weight="bold"></icon-ui>
|
|
8
|
+
*
|
|
9
|
+
* ## Why this module is small
|
|
10
|
+
*
|
|
11
|
+
* This file holds the registry surface only. The Phosphor auto-glob
|
|
12
|
+
* (`@phosphor-icons/core/assets/{weight}/*.svg` × 6 weights, ~9000 SVGs)
|
|
13
|
+
* lives in the sibling side-effect module `./icons-phosphor.js`. Splitting
|
|
14
|
+
* keeps `core/icons.js` cheap to import — primitives that consume the
|
|
15
|
+
* registry API (button, input, icon) pull in the API surface without
|
|
16
|
+
* triggering Vite's per-icon code-split chunks.
|
|
17
|
+
*
|
|
18
|
+
* ## Loading icons
|
|
19
|
+
*
|
|
20
|
+
* Three paths, pick whichever matches your bundle-size budget:
|
|
21
|
+
*
|
|
22
|
+
* 1. **Zero-config (recommended for prototypes + small apps).** Import
|
|
23
|
+
* the main barrel — it side-effect-imports `icons-phosphor.js` for
|
|
24
|
+
* you and every Phosphor name resolves on demand:
|
|
25
|
+
*
|
|
26
|
+
* import '@adia-ai/web-components';
|
|
27
|
+
*
|
|
28
|
+
* 2. **Opt-in full Phosphor with piecemeal component imports.** If you
|
|
29
|
+
* import components one at a time but want every Phosphor name to
|
|
30
|
+
* work, side-effect-import the phosphor module yourself:
|
|
31
|
+
*
|
|
32
|
+
* import '@adia-ai/web-components/components/button';
|
|
33
|
+
* import '@adia-ai/web-components/core/icons-phosphor';
|
|
34
|
+
*
|
|
35
|
+
* 3. **Scoped registration (recommended for production bundle-size
|
|
36
|
+
* SLOs).** Skip `icons-phosphor.js` entirely and register only the
|
|
37
|
+
* icons you actually use. `import.meta.glob` with a brace-list emits
|
|
38
|
+
* one chunk per matched file — for a 4-icon app, that's ~4 chunks
|
|
39
|
+
* instead of the ~9000 the full set would produce:
|
|
40
|
+
*
|
|
41
|
+
* import { installIconLoaders } from '@adia-ai/web-components/core/icons';
|
|
42
|
+
* installIconLoaders({
|
|
43
|
+
* regular: import.meta.glob(
|
|
44
|
+
* '/node_modules/@phosphor-icons/core/assets/regular/{caret-right,caret-up-down,moon,sun}.svg',
|
|
45
|
+
* { query: '?raw', import: 'default', eager: true }
|
|
46
|
+
* ),
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* Or register single SVGs directly:
|
|
50
|
+
*
|
|
51
|
+
* import { registerIcon } from '@adia-ai/web-components/core/icons';
|
|
52
|
+
* import caretRightSvg from './assets/caret-right.svg?raw';
|
|
53
|
+
* registerIcon('caret-right', caretRightSvg);
|
|
9
54
|
*/
|
|
10
55
|
|
|
11
56
|
export const ICON_WEIGHTS = ['regular', 'thin', 'light', 'bold', 'fill', 'duotone'];
|
|
@@ -49,94 +94,50 @@ export function listIcons() {
|
|
|
49
94
|
return [...registry.keys()];
|
|
50
95
|
}
|
|
51
96
|
|
|
52
|
-
// ──
|
|
53
|
-
|
|
54
|
-
// Vite dev: `import.meta.glob(...)` is a build-time macro — Vite's AST
|
|
55
|
-
// transform replaces each call with a literal `{ path: loader }` object
|
|
56
|
-
// before the module reaches the browser. `import.meta.glob` itself is NOT
|
|
57
|
-
// exposed as a runtime property, so `typeof import.meta.glob` is always
|
|
58
|
-
// `'undefined'` at run time — don't try to feature-detect with it.
|
|
97
|
+
// ── Loader-map plumbing ──
|
|
59
98
|
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
// EMPTY_WEIGHTS; the manifest branch below fills it in.
|
|
66
|
-
const EMPTY_WEIGHTS = { regular: {}, thin: {}, light: {}, bold: {}, fill: {}, duotone: {} };
|
|
99
|
+
// `weightModules` maps weight → ({ path → loader }). A loader is either an
|
|
100
|
+
// SVG string (eager) or a `() => Promise<string>` (lazy). The default empty
|
|
101
|
+
// map means lookups all miss; callers either register icons directly via
|
|
102
|
+
// `registerIcon`/`registerIcons` or install a loader map via
|
|
103
|
+
// `installIconLoaders` (called by `icons-phosphor.js` in the zero-config path).
|
|
67
104
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
// through this each call, so new icons become visible after manifest load.
|
|
71
|
-
let weightModules;
|
|
72
|
-
let hasViteGlob = false;
|
|
73
|
-
try {
|
|
74
|
-
weightModules = {
|
|
75
|
-
regular: import.meta.glob('/node_modules/@phosphor-icons/core/assets/regular/*.svg', { query: '?raw', import: 'default' }),
|
|
76
|
-
thin: import.meta.glob('/node_modules/@phosphor-icons/core/assets/thin/*.svg', { query: '?raw', import: 'default' }),
|
|
77
|
-
light: import.meta.glob('/node_modules/@phosphor-icons/core/assets/light/*.svg', { query: '?raw', import: 'default' }),
|
|
78
|
-
bold: import.meta.glob('/node_modules/@phosphor-icons/core/assets/bold/*.svg', { query: '?raw', import: 'default' }),
|
|
79
|
-
fill: import.meta.glob('/node_modules/@phosphor-icons/core/assets/fill/*.svg', { query: '?raw', import: 'default' }),
|
|
80
|
-
duotone: import.meta.glob('/node_modules/@phosphor-icons/core/assets/duotone/*.svg', { query: '?raw', import: 'default' }),
|
|
81
|
-
};
|
|
82
|
-
hasViteGlob = true;
|
|
83
|
-
} catch {
|
|
84
|
-
weightModules = EMPTY_WEIGHTS;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* Flag guarding the missing-icon warn below. In Vite dev, `weightModules`
|
|
88
|
-
is populated synchronously by the glob rewrite, so the registry is ready
|
|
89
|
-
before any icon-ui element connects. In non-Vite static deploys, the
|
|
90
|
-
manifest load is async and arrives some time after first paint — warning
|
|
91
|
-
during that window would false-positive for every icon on the page.
|
|
92
|
-
Flipped to `true` in the manifest `.then()` handler below. */
|
|
93
|
-
let registryReady = hasViteGlob;
|
|
105
|
+
const EMPTY_WEIGHTS = { regular: {}, thin: {}, light: {}, bold: {}, fill: {}, duotone: {} };
|
|
106
|
+
let weightModules = EMPTY_WEIGHTS;
|
|
94
107
|
|
|
95
108
|
/* `whenIconRegistryReady` lets a component defer icon-name decisions until
|
|
96
109
|
the registry is sync-checkable. <icon-ui> doesn't need it — it owns the
|
|
97
|
-
<name → svg> render and
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
110
|
+
<name → svg> render and re-stamps elements when the loader map arrives.
|
|
111
|
+
But components that branch on whether a string IS an icon (e.g.
|
|
112
|
+
<input-ui>'s prefix/suffix, which accept both icon names and text labels
|
|
113
|
+
like "@" or "$") need to re-evaluate once loaders arrive, otherwise a
|
|
114
|
+
kebab-case name baked into the DOM as text never recovers. */
|
|
115
|
+
let registryReady = false;
|
|
103
116
|
let resolveRegistryReady;
|
|
104
117
|
export const whenIconRegistryReady = new Promise((r) => { resolveRegistryReady = r; });
|
|
105
|
-
if (hasViteGlob) resolveRegistryReady();
|
|
106
118
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
// icon-ui elements that asked for an icon before the manifest loaded
|
|
127
|
-
// gave up silently (resolveLoader returned null on EMPTY_WEIGHTS).
|
|
128
|
-
// Re-request every <icon-ui name> now that a real loader map is in
|
|
129
|
-
// place. Idempotent — already-loaded icons short-circuit on
|
|
130
|
-
// registry.has() inside loadIcon.
|
|
131
|
-
if (typeof document !== 'undefined') {
|
|
132
|
-
for (const el of document.querySelectorAll('icon-ui[name]')) {
|
|
133
|
-
const name = el.getAttribute('name');
|
|
134
|
-
const weight = el.getAttribute('weight') || DEFAULT_WEIGHT;
|
|
135
|
-
if (name) loadIcon(name, weight);
|
|
136
|
-
}
|
|
119
|
+
/**
|
|
120
|
+
* Install a per-weight loader map and mark the registry ready. The map
|
|
121
|
+
* shape matches `import.meta.glob` output: `{ '/path/to/star.svg': loader }`.
|
|
122
|
+
*
|
|
123
|
+
* Either a lazy glob (Vite emits a chunk per icon) or `{ eager: true }`
|
|
124
|
+
* (Vite inlines the strings) works — the loader can be the SVG string
|
|
125
|
+
* directly or a thunk returning `Promise<string>`.
|
|
126
|
+
*
|
|
127
|
+
* Calling this re-stamps any `<icon-ui>` elements that asked for an icon
|
|
128
|
+
* before loaders arrived. Idempotent — calling it twice replaces the map.
|
|
129
|
+
*/
|
|
130
|
+
export function installIconLoaders(modules) {
|
|
131
|
+
weightModules = { ...EMPTY_WEIGHTS, ...modules };
|
|
132
|
+
registryReady = true;
|
|
133
|
+
if (typeof document !== 'undefined') {
|
|
134
|
+
for (const el of document.querySelectorAll('icon-ui[name]')) {
|
|
135
|
+
const name = el.getAttribute('name');
|
|
136
|
+
const weight = el.getAttribute('weight') || DEFAULT_WEIGHT;
|
|
137
|
+
if (name) loadIcon(name, weight);
|
|
137
138
|
}
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
}
|
|
140
|
+
resolveRegistryReady();
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
/* Track which (name, weight) pairs we've already warned about so the
|
|
@@ -184,9 +185,9 @@ function resolveLoader(name, weight = DEFAULT_WEIGHT) {
|
|
|
184
185
|
|
|
185
186
|
/**
|
|
186
187
|
* Sync check: is `name` a loadable icon at the given weight? True if the
|
|
187
|
-
* asset exists in the
|
|
188
|
-
* trigger loading. Used by components that accept either an icon name
|
|
189
|
-
* text label (e.g. input-ui's prefix/suffix) to disambiguate.
|
|
188
|
+
* asset exists in the installed loader map OR has an alias that does. Does
|
|
189
|
+
* NOT trigger loading. Used by components that accept either an icon name
|
|
190
|
+
* or a text label (e.g. input-ui's prefix/suffix) to disambiguate.
|
|
190
191
|
*/
|
|
191
192
|
export function isIconName(name, weight = DEFAULT_WEIGHT) {
|
|
192
193
|
if (!name || typeof name !== 'string') return false;
|
|
@@ -267,16 +268,17 @@ async function loadIcon(name, weight = DEFAULT_WEIGHT) {
|
|
|
267
268
|
if (!loader) {
|
|
268
269
|
pending.delete(key);
|
|
269
270
|
// Warn once per (name, weight) — but only if the registry is
|
|
270
|
-
// known-complete.
|
|
271
|
-
//
|
|
272
|
-
//
|
|
273
|
-
//
|
|
274
|
-
// that survive the re-query are the ones worth warning about.
|
|
271
|
+
// known-complete. Pre-loader-install the map is empty + every lookup
|
|
272
|
+
// fails legitimately; warning there would be noise. `installIconLoaders`
|
|
273
|
+
// re-stamps every <icon-ui> element after install, so misses that
|
|
274
|
+
// survive the re-query are the ones worth warning about.
|
|
275
275
|
if (registryReady) warnMissingIcon(name, weight);
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
|
|
279
|
+
// Loader may be a string (eager glob) or a thunk returning string /
|
|
280
|
+
// Promise<string> (lazy glob or fetch).
|
|
281
|
+
const svg = typeof loader === 'function' ? await loader() : loader;
|
|
280
282
|
registry.set(key, svg);
|
|
281
283
|
|
|
282
284
|
// Re-render any icon-ui elements showing this name+weight. Regular has
|
package/core/index.js
CHANGED
|
@@ -21,6 +21,11 @@ export * from './controller.js';
|
|
|
21
21
|
export * from './provider.js';
|
|
22
22
|
export * from './anchor.js';
|
|
23
23
|
export * from './icons.js';
|
|
24
|
+
// Side-effect-import phosphor so the core barrel preserves zero-config
|
|
25
|
+
// icon resolution. Apps that want a scoped icon set should import
|
|
26
|
+
// `core/icons` directly and call `installIconLoaders()` — see
|
|
27
|
+
// `core/icons.js` JSDoc.
|
|
28
|
+
import './icons-phosphor.js';
|
|
24
29
|
export * from './markdown.js';
|
|
25
30
|
export * from './transport.js';
|
|
26
31
|
export * from './polyfills.js';
|
package/index.d.ts
CHANGED
|
@@ -129,17 +129,98 @@ export type {
|
|
|
129
129
|
UploadChangeEventDetail,
|
|
130
130
|
} from './components/upload/upload.js';
|
|
131
131
|
|
|
132
|
+
// ── Non-form primitives (typed; §74 v0.4.7 + §80 v0.4.8) ────────────
|
|
133
|
+
// Property types + event types codegen'd from each component's
|
|
134
|
+
// `.a2ui.json` sidecar by `scripts/build/dts-codegen.mjs`. Event-bearing
|
|
135
|
+
// types use `export *` so consumers can import event type names
|
|
136
|
+
// (e.g. `ModalCloseEvent`, `TimelineToggleEventDetail`) directly.
|
|
137
|
+
export * from './components/accordion/accordion.js';
|
|
138
|
+
export * from './components/action-list/action-list.js';
|
|
139
|
+
export * from './components/agent-artifact/agent-artifact.js';
|
|
140
|
+
export * from './components/agent-feedback-bar/agent-feedback-bar.js';
|
|
141
|
+
export * from './components/agent-questions/agent-questions.js';
|
|
142
|
+
export * from './components/agent-reasoning/agent-reasoning.js';
|
|
143
|
+
export * from './components/agent-suggestions/agent-suggestions.js';
|
|
144
|
+
export * from './components/agent-trace/agent-trace.js';
|
|
145
|
+
export * from './components/alert/alert.js';
|
|
146
|
+
export * from './components/avatar/avatar.js';
|
|
147
|
+
export * from './components/badge/badge.js';
|
|
148
|
+
export * from './components/block/block.js';
|
|
149
|
+
export * from './components/breadcrumb/breadcrumb.js';
|
|
150
|
+
export * from './components/button/button.js';
|
|
151
|
+
export * from './components/canvas/canvas.js';
|
|
152
|
+
export * from './components/card/card.js';
|
|
153
|
+
export * from './components/chart/chart.js';
|
|
154
|
+
export * from './components/chart-legend/chart-legend.js';
|
|
155
|
+
export * from './components/chat-thread/chat-thread.js';
|
|
156
|
+
export * from './components/col/col.js';
|
|
157
|
+
export * from './components/command/command.js';
|
|
158
|
+
export * from './components/demo-toggle/demo-toggle.js';
|
|
159
|
+
export * from './components/description-list/description-list.js';
|
|
160
|
+
export * from './components/divider/divider.js';
|
|
161
|
+
export * from './components/drawer/drawer.js';
|
|
162
|
+
export * from './components/embed/embed.js';
|
|
163
|
+
export * from './components/empty-state/empty-state.js';
|
|
164
|
+
export * from './components/feed/feed.js';
|
|
165
|
+
export * from './components/field/field.js';
|
|
166
|
+
export * from './components/fields/fields.js';
|
|
167
|
+
export * from './components/grid/grid.js';
|
|
168
|
+
export * from './components/heatmap/heatmap.js';
|
|
169
|
+
export * from './components/icon/icon.js';
|
|
170
|
+
export * from './components/image/image.js';
|
|
171
|
+
export * from './components/inspector/inspector.js';
|
|
172
|
+
export * from './components/kbd/kbd.js';
|
|
173
|
+
export * from './components/link/link.js';
|
|
174
|
+
export * from './components/list/list.js';
|
|
175
|
+
export * from './components/menu/menu.js';
|
|
176
|
+
export * from './components/modal/modal.js';
|
|
177
|
+
export * from './components/nav/nav.js';
|
|
178
|
+
export * from './components/nav-group/nav-group.js';
|
|
179
|
+
export * from './components/nav-item/nav-item.js';
|
|
180
|
+
export * from './components/noodles/noodles.js';
|
|
181
|
+
export * from './components/page/page.js';
|
|
182
|
+
export * from './components/pagination/pagination.js';
|
|
183
|
+
export * from './components/pane/pane.js';
|
|
184
|
+
export * from './components/pipeline-status/pipeline-status.js';
|
|
185
|
+
export * from './components/popover/popover.js';
|
|
186
|
+
export * from './components/progress/progress.js';
|
|
187
|
+
export * from './components/progress-row/progress-row.js';
|
|
188
|
+
export * from './components/richtext/richtext.js';
|
|
189
|
+
export * from './components/row/row.js';
|
|
190
|
+
export * from './components/segment/segment.js';
|
|
191
|
+
export * from './components/skeleton/skeleton.js';
|
|
192
|
+
export * from './components/stack/stack.js';
|
|
193
|
+
export * from './components/step-progress/step-progress.js';
|
|
194
|
+
export * from './components/stepper/stepper.js';
|
|
195
|
+
export * from './components/stream/stream.js';
|
|
196
|
+
export * from './components/swatch/swatch.js';
|
|
197
|
+
export * from './components/swiper/swiper.js';
|
|
198
|
+
export * from './components/table/table.js';
|
|
199
|
+
export * from './components/table-toolbar/table-toolbar.js';
|
|
200
|
+
export * from './components/tabs/tabs.js';
|
|
201
|
+
export * from './components/tag/tag.js';
|
|
202
|
+
export * from './components/text/text.js';
|
|
203
|
+
export * from './components/timeline/timeline.js';
|
|
204
|
+
export * from './components/toast/toast.js';
|
|
205
|
+
export * from './components/toggle-group/toggle-group.js';
|
|
206
|
+
export * from './components/toggle-scheme/toggle-scheme.js';
|
|
207
|
+
export * from './components/toolbar/toolbar.js';
|
|
208
|
+
export * from './components/tooltip/tooltip.js';
|
|
209
|
+
export * from './components/tree/tree.js';
|
|
210
|
+
|
|
132
211
|
// ── Global HTMLElementTagNameMap augmentation ───────────────────────
|
|
133
212
|
//
|
|
134
213
|
// Tells TypeScript that `document.querySelector('slider-ui')` returns
|
|
135
|
-
// `UISlider`, that `createElement('input-ui')` returns `UIInput`,
|
|
214
|
+
// `UISlider`, that `createElement('input-ui')` returns `UIInput`,
|
|
215
|
+
// `document.querySelector('button-ui')` returns `UIButton`, etc.
|
|
136
216
|
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
//
|
|
217
|
+
// Post-§74 (v0.4.7): all 90 primitives that ship a JS class are
|
|
218
|
+
// covered. The 5 CSS-only "elements" (`header`, `footer`, `section`,
|
|
219
|
+
// etc. — styled by parent slot rules) don't have a class so they
|
|
220
|
+
// don't appear in this map.
|
|
141
221
|
declare global {
|
|
142
222
|
interface HTMLElementTagNameMap {
|
|
223
|
+
// Form-bearing (17, hand-authored with rich event types)
|
|
143
224
|
'input-ui': import('./components/input/input.js').UIInput;
|
|
144
225
|
'select-ui': import('./components/select/select.js').UISelect;
|
|
145
226
|
'slider-ui': import('./components/slider/slider.js').UISlider;
|
|
@@ -157,5 +238,79 @@ declare global {
|
|
|
157
238
|
'code-ui': import('./components/code/code.js').UICode;
|
|
158
239
|
'calendar-picker-ui': import('./components/calendar-picker/calendar-picker.js').UICalendarPicker;
|
|
159
240
|
'upload-ui': import('./components/upload/upload.js').UIUpload;
|
|
241
|
+
// Non-form (73, codegen'd by scripts/build/dts-codegen.mjs)
|
|
242
|
+
'accordion-ui': import('./components/accordion/accordion.js').UIAccordion;
|
|
243
|
+
'action-list-ui': import('./components/action-list/action-list.js').UIActionList;
|
|
244
|
+
'agent-artifact-ui': import('./components/agent-artifact/agent-artifact.js').UIAgentArtifact;
|
|
245
|
+
'agent-feedback-bar-ui': import('./components/agent-feedback-bar/agent-feedback-bar.js').UIAgentFeedbackBar;
|
|
246
|
+
'agent-questions-ui': import('./components/agent-questions/agent-questions.js').UIAgentQuestions;
|
|
247
|
+
'agent-reasoning-ui': import('./components/agent-reasoning/agent-reasoning.js').UIAgentReasoning;
|
|
248
|
+
'agent-suggestions-ui': import('./components/agent-suggestions/agent-suggestions.js').UIAgentSuggestions;
|
|
249
|
+
'agent-trace-ui': import('./components/agent-trace/agent-trace.js').UIAgentTrace;
|
|
250
|
+
'alert-ui': import('./components/alert/alert.js').UIAlert;
|
|
251
|
+
'avatar-ui': import('./components/avatar/avatar.js').UIAvatar;
|
|
252
|
+
'badge-ui': import('./components/badge/badge.js').UIBadge;
|
|
253
|
+
'block-ui': import('./components/block/block.js').UIBlock;
|
|
254
|
+
'breadcrumb-ui': import('./components/breadcrumb/breadcrumb.js').UIBreadcrumb;
|
|
255
|
+
'button-ui': import('./components/button/button.js').UIButton;
|
|
256
|
+
'canvas-ui': import('./components/canvas/canvas.js').UICanvas;
|
|
257
|
+
'card-ui': import('./components/card/card.js').UICard;
|
|
258
|
+
'chart-ui': import('./components/chart/chart.js').UIChart;
|
|
259
|
+
'chart-legend-ui': import('./components/chart-legend/chart-legend.js').UIChartLegend;
|
|
260
|
+
'chat-thread-ui': import('./components/chat-thread/chat-thread.js').UIChatThread;
|
|
261
|
+
'col-ui': import('./components/col/col.js').UIColumn;
|
|
262
|
+
'command-ui': import('./components/command/command.js').UICommand;
|
|
263
|
+
'demo-toggle-ui': import('./components/demo-toggle/demo-toggle.js').UIDemoToggle;
|
|
264
|
+
'description-list-ui': import('./components/description-list/description-list.js').UIDescriptionList;
|
|
265
|
+
'divider-ui': import('./components/divider/divider.js').UIDivider;
|
|
266
|
+
'drawer-ui': import('./components/drawer/drawer.js').UIDrawer;
|
|
267
|
+
'embed-ui': import('./components/embed/embed.js').UIEmbed;
|
|
268
|
+
'empty-state-ui': import('./components/empty-state/empty-state.js').UIEmptyState;
|
|
269
|
+
'feed-ui': import('./components/feed/feed.js').UIFeed;
|
|
270
|
+
'field-ui': import('./components/field/field.js').UIField;
|
|
271
|
+
'fields-ui': import('./components/fields/fields.js').UIFields;
|
|
272
|
+
'grid-ui': import('./components/grid/grid.js').UIGrid;
|
|
273
|
+
'heatmap-ui': import('./components/heatmap/heatmap.js').UIHeatmap;
|
|
274
|
+
'icon-ui': import('./components/icon/icon.js').UIIcon;
|
|
275
|
+
'image-ui': import('./components/image/image.js').UIImage;
|
|
276
|
+
'inspector-ui': import('./components/inspector/inspector.js').UIInspector;
|
|
277
|
+
'kbd-ui': import('./components/kbd/kbd.js').UIKbd;
|
|
278
|
+
'link-ui': import('./components/link/link.js').UILink;
|
|
279
|
+
'list-ui': import('./components/list/list.js').UIList;
|
|
280
|
+
'menu-ui': import('./components/menu/menu.js').UIMenu;
|
|
281
|
+
'modal-ui': import('./components/modal/modal.js').UIModal;
|
|
282
|
+
'nav-ui': import('./components/nav/nav.js').UINav;
|
|
283
|
+
'nav-group-ui': import('./components/nav-group/nav-group.js').UINavGroup;
|
|
284
|
+
'nav-item-ui': import('./components/nav-item/nav-item.js').UINavItem;
|
|
285
|
+
'noodles-ui': import('./components/noodles/noodles.js').UINoodles;
|
|
286
|
+
'page-ui': import('./components/page/page.js').UIPage;
|
|
287
|
+
'pagination-ui': import('./components/pagination/pagination.js').UIPagination;
|
|
288
|
+
'pane-ui': import('./components/pane/pane.js').UIPane;
|
|
289
|
+
'pipeline-status-ui': import('./components/pipeline-status/pipeline-status.js').UIPipelineStatus;
|
|
290
|
+
'popover-ui': import('./components/popover/popover.js').UIPopover;
|
|
291
|
+
'progress-ui': import('./components/progress/progress.js').UIProgress;
|
|
292
|
+
'progress-row-ui': import('./components/progress-row/progress-row.js').UIProgressRow;
|
|
293
|
+
'richtext-ui': import('./components/richtext/richtext.js').UIRichtext;
|
|
294
|
+
'row-ui': import('./components/row/row.js').UIRow;
|
|
295
|
+
'segment-ui': import('./components/segment/segment.js').UISegment;
|
|
296
|
+
'skeleton-ui': import('./components/skeleton/skeleton.js').UISkeleton;
|
|
297
|
+
'stack-ui': import('./components/stack/stack.js').UIStack;
|
|
298
|
+
'step-progress-ui': import('./components/step-progress/step-progress.js').UIStepProgress;
|
|
299
|
+
'stepper-ui': import('./components/stepper/stepper.js').UIStepper;
|
|
300
|
+
'stream-ui': import('./components/stream/stream.js').UIStream;
|
|
301
|
+
'swatch-ui': import('./components/swatch/swatch.js').UISwatch;
|
|
302
|
+
'swiper-ui': import('./components/swiper/swiper.js').UISwiper;
|
|
303
|
+
'table-ui': import('./components/table/table.js').UITable;
|
|
304
|
+
'table-toolbar-ui': import('./components/table-toolbar/table-toolbar.js').UITableToolbar;
|
|
305
|
+
'tabs-ui': import('./components/tabs/tabs.js').UITabs;
|
|
306
|
+
'tag-ui': import('./components/tag/tag.js').UITag;
|
|
307
|
+
'text-ui': import('./components/text/text.js').UIText;
|
|
308
|
+
'timeline-ui': import('./components/timeline/timeline.js').UITimeline;
|
|
309
|
+
'toast-ui': import('./components/toast/toast.js').UIToast;
|
|
310
|
+
'toggle-group-ui': import('./components/toggle-group/toggle-group.js').UIToggleGroup;
|
|
311
|
+
'toggle-scheme-ui': import('./components/toggle-scheme/toggle-scheme.js').UIToggleScheme;
|
|
312
|
+
'toolbar-ui': import('./components/toolbar/toolbar.js').UIToolbar;
|
|
313
|
+
'tooltip-ui': import('./components/tooltip/tooltip.js').UITooltip;
|
|
314
|
+
'tree-ui': import('./components/tree/tree.js').UITree;
|
|
160
315
|
}
|
|
161
316
|
}
|
package/index.js
CHANGED
|
@@ -23,6 +23,13 @@
|
|
|
23
23
|
* import '@adia-ai/web-modules/chat'; // chat-shell
|
|
24
24
|
* import '@adia-ai/web-modules/editor'; // editor-shell
|
|
25
25
|
* import '@adia-ai/web-modules/runtime'; // gen-root, a2ui-root
|
|
26
|
+
*
|
|
27
|
+
* Icon registry: the main barrel side-effect-imports
|
|
28
|
+
* `core/icons-phosphor.js` so every Phosphor name resolves without
|
|
29
|
+
* pre-registration. Apps with bundle-size SLOs should skip this barrel,
|
|
30
|
+
* import primitives piecemeal, and call `installIconLoaders()` with a
|
|
31
|
+
* scoped glob — see `core/icons.js` JSDoc.
|
|
26
32
|
*/
|
|
27
33
|
|
|
34
|
+
import './core/icons-phosphor.js';
|
|
28
35
|
export * from './components/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "AdiaUI web components — vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"types": "./components/*/*.d.ts",
|
|
24
24
|
"default": "./components/*/*.js"
|
|
25
25
|
},
|
|
26
|
+
"./components/*/class": {
|
|
27
|
+
"types": "./components/*/*.d.ts",
|
|
28
|
+
"default": "./components/*/class.js"
|
|
29
|
+
},
|
|
26
30
|
"./components/*.css": "./components/*/*.css",
|
|
27
31
|
"./styles/*": "./styles/*",
|
|
28
32
|
"./traits": "./traits/index.js",
|
|
@@ -50,7 +54,8 @@
|
|
|
50
54
|
"*.css",
|
|
51
55
|
"./index.js",
|
|
52
56
|
"./components/**/*.js",
|
|
53
|
-
"./core/provider.js"
|
|
57
|
+
"./core/provider.js",
|
|
58
|
+
"./core/icons-phosphor.js"
|
|
54
59
|
],
|
|
55
60
|
"dependencies": {
|
|
56
61
|
"@adia-ai/a2ui-runtime": "^0.4.0"
|