@kanzo-tech/ui 0.0.1-alpha
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 +60 -0
- package/dist/analytics.d.ts +36 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +155 -0
- package/dist/analytics.js.map +1 -0
- package/dist/charts/arrow.d.ts +37 -0
- package/dist/charts/arrow.d.ts.map +1 -0
- package/dist/charts/arrow.js +29 -0
- package/dist/charts/arrow.js.map +1 -0
- package/dist/charts/chart-axes.d.ts +59 -0
- package/dist/charts/chart-axes.d.ts.map +1 -0
- package/dist/charts/chart-axes.js +39 -0
- package/dist/charts/chart-axes.js.map +1 -0
- package/dist/charts/chart-config.d.ts +52 -0
- package/dist/charts/chart-config.d.ts.map +1 -0
- package/dist/charts/chart-config.js +43 -0
- package/dist/charts/chart-config.js.map +1 -0
- package/dist/charts/chart-inputs.d.ts +174 -0
- package/dist/charts/chart-inputs.d.ts.map +1 -0
- package/dist/charts/chart-inputs.js +382 -0
- package/dist/charts/chart-inputs.js.map +1 -0
- package/dist/charts/chart-interactors.d.ts +75 -0
- package/dist/charts/chart-interactors.d.ts.map +1 -0
- package/dist/charts/chart-interactors.js +35 -0
- package/dist/charts/chart-interactors.js.map +1 -0
- package/dist/charts/chart-legend.d.ts +38 -0
- package/dist/charts/chart-legend.d.ts.map +1 -0
- package/dist/charts/chart-legend.js +49 -0
- package/dist/charts/chart-legend.js.map +1 -0
- package/dist/charts/chart-marks.d.ts +124 -0
- package/dist/charts/chart-marks.d.ts.map +1 -0
- package/dist/charts/chart-marks.js +109 -0
- package/dist/charts/chart-marks.js.map +1 -0
- package/dist/charts/chart-root.d.ts +90 -0
- package/dist/charts/chart-root.d.ts.map +1 -0
- package/dist/charts/chart-root.js +162 -0
- package/dist/charts/chart-root.js.map +1 -0
- package/dist/charts/chart-spec.d.ts +126 -0
- package/dist/charts/chart-spec.d.ts.map +1 -0
- package/dist/charts/chart-spec.js +133 -0
- package/dist/charts/chart-spec.js.map +1 -0
- package/dist/charts/chart-stat.d.ts +23 -0
- package/dist/charts/chart-stat.d.ts.map +1 -0
- package/dist/charts/chart-stat.js +24 -0
- package/dist/charts/chart-stat.js.map +1 -0
- package/dist/charts/id-set-client.d.ts +42 -0
- package/dist/charts/id-set-client.d.ts.map +1 -0
- package/dist/charts/id-set-client.js +43 -0
- package/dist/charts/id-set-client.js.map +1 -0
- package/dist/charts/mosaic-provider.d.ts +70 -0
- package/dist/charts/mosaic-provider.d.ts.map +1 -0
- package/dist/charts/mosaic-provider.js +53 -0
- package/dist/charts/mosaic-provider.js.map +1 -0
- package/dist/charts/query-client.d.ts +22 -0
- package/dist/charts/query-client.d.ts.map +1 -0
- package/dist/charts/query-client.js +26 -0
- package/dist/charts/query-client.js.map +1 -0
- package/dist/charts/tokenized-plot.d.ts +26 -0
- package/dist/charts/tokenized-plot.d.ts.map +1 -0
- package/dist/charts/tokenized-plot.js +41 -0
- package/dist/charts/tokenized-plot.js.map +1 -0
- package/dist/charts/use-chart-query.d.ts +30 -0
- package/dist/charts/use-chart-query.d.ts.map +1 -0
- package/dist/charts/use-chart-query.js +19 -0
- package/dist/charts/use-chart-query.js.map +1 -0
- package/dist/composites/CodeEditor.d.ts +64 -0
- package/dist/composites/CodeEditor.d.ts.map +1 -0
- package/dist/composites/CodeEditor.js +521 -0
- package/dist/composites/CodeEditor.js.map +1 -0
- package/dist/composites/MadeWith.d.ts +39 -0
- package/dist/composites/MadeWith.d.ts.map +1 -0
- package/dist/composites/MadeWith.js +30 -0
- package/dist/composites/MadeWith.js.map +1 -0
- package/dist/composites/Preferences.d.ts +155 -0
- package/dist/composites/Preferences.d.ts.map +1 -0
- package/dist/composites/Preferences.js +501 -0
- package/dist/composites/Preferences.js.map +1 -0
- package/dist/composites/Questionnaire.d.ts +215 -0
- package/dist/composites/Questionnaire.d.ts.map +1 -0
- package/dist/composites/Questionnaire.js +422 -0
- package/dist/composites/Questionnaire.js.map +1 -0
- package/dist/composites/SidebarIdentity.d.ts +63 -0
- package/dist/composites/SidebarIdentity.d.ts.map +1 -0
- package/dist/composites/SidebarIdentity.js +103 -0
- package/dist/composites/SidebarIdentity.js.map +1 -0
- package/dist/composites/code-editor-search.d.ts +40 -0
- package/dist/composites/code-editor-search.d.ts.map +1 -0
- package/dist/composites/code-editor-search.js +212 -0
- package/dist/composites/code-editor-search.js.map +1 -0
- package/dist/composites/sidebar.d.ts +129 -0
- package/dist/composites/sidebar.d.ts.map +1 -0
- package/dist/composites/sidebar.js +671 -0
- package/dist/composites/sidebar.js.map +1 -0
- package/dist/composites/theme-notice.d.ts +54 -0
- package/dist/composites/theme-notice.d.ts.map +1 -0
- package/dist/composites/theme-notice.js +19 -0
- package/dist/composites/theme-notice.js.map +1 -0
- package/dist/editor.d.ts +3 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +6 -0
- package/dist/editor.js.map +1 -0
- package/dist/guard-corpus.d.ts +63 -0
- package/dist/guard-corpus.d.ts.map +1 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +696 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts/section.d.ts +166 -0
- package/dist/layouts/section.d.ts.map +1 -0
- package/dist/layouts/section.js +153 -0
- package/dist/layouts/section.js.map +1 -0
- package/dist/layouts/shell.d.ts +128 -0
- package/dist/layouts/shell.d.ts.map +1 -0
- package/dist/layouts/shell.js +107 -0
- package/dist/layouts/shell.js.map +1 -0
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/is-active-path.d.ts +13 -0
- package/dist/lib/is-active-path.d.ts.map +1 -0
- package/dist/lib/is-active-path.js +7 -0
- package/dist/lib/is-active-path.js.map +1 -0
- package/dist/lib/theme-tick.d.ts +37 -0
- package/dist/lib/theme-tick.d.ts.map +1 -0
- package/dist/lib/theme-tick.js +30 -0
- package/dist/lib/theme-tick.js.map +1 -0
- package/dist/lib/token-color.d.ts +74 -0
- package/dist/lib/token-color.d.ts.map +1 -0
- package/dist/lib/token-color.js +35 -0
- package/dist/lib/token-color.js.map +1 -0
- package/dist/lib/use-is-mobile.d.ts +2 -0
- package/dist/lib/use-is-mobile.d.ts.map +1 -0
- package/dist/lib/use-is-mobile.js +17 -0
- package/dist/lib/use-is-mobile.js.map +1 -0
- package/dist/shark-parity.divergences.d.ts +104 -0
- package/dist/shark-parity.divergences.d.ts.map +1 -0
- package/dist/simples/FacetFilter.d.ts +57 -0
- package/dist/simples/FacetFilter.d.ts.map +1 -0
- package/dist/simples/FacetFilter.js +167 -0
- package/dist/simples/FacetFilter.js.map +1 -0
- package/dist/simples/FieldArray.d.ts +42 -0
- package/dist/simples/FieldArray.d.ts.map +1 -0
- package/dist/simples/FieldArray.js +76 -0
- package/dist/simples/FieldArray.js.map +1 -0
- package/dist/simples/Link.d.ts +38 -0
- package/dist/simples/Link.d.ts.map +1 -0
- package/dist/simples/Link.js +24 -0
- package/dist/simples/Link.js.map +1 -0
- package/dist/simples/accordion.d.ts +8 -0
- package/dist/simples/accordion.d.ts.map +1 -0
- package/dist/simples/accordion.js +78 -0
- package/dist/simples/accordion.js.map +1 -0
- package/dist/simples/action-bar.d.ts +101 -0
- package/dist/simples/action-bar.d.ts.map +1 -0
- package/dist/simples/action-bar.js +195 -0
- package/dist/simples/action-bar.js.map +1 -0
- package/dist/simples/alert-dialog.d.ts +24 -0
- package/dist/simples/alert-dialog.d.ts.map +1 -0
- package/dist/simples/alert-dialog.js +43 -0
- package/dist/simples/alert-dialog.js.map +1 -0
- package/dist/simples/alert.d.ts +36 -0
- package/dist/simples/alert.d.ts.map +1 -0
- package/dist/simples/alert.js +123 -0
- package/dist/simples/alert.js.map +1 -0
- package/dist/simples/avatar.d.ts +37 -0
- package/dist/simples/avatar.d.ts.map +1 -0
- package/dist/simples/avatar.js +133 -0
- package/dist/simples/avatar.js.map +1 -0
- package/dist/simples/badge.d.ts +66 -0
- package/dist/simples/badge.d.ts.map +1 -0
- package/dist/simples/badge.js +138 -0
- package/dist/simples/badge.js.map +1 -0
- package/dist/simples/breadcrumb.d.ts +19 -0
- package/dist/simples/breadcrumb.d.ts.map +1 -0
- package/dist/simples/breadcrumb.js +107 -0
- package/dist/simples/breadcrumb.js.map +1 -0
- package/dist/simples/button-group.d.ts +19 -0
- package/dist/simples/button-group.d.ts.map +1 -0
- package/dist/simples/button-group.js +69 -0
- package/dist/simples/button-group.js.map +1 -0
- package/dist/simples/button.d.ts +148 -0
- package/dist/simples/button.d.ts.map +1 -0
- package/dist/simples/button.js +157 -0
- package/dist/simples/button.js.map +1 -0
- package/dist/simples/calendar.d.ts +45 -0
- package/dist/simples/calendar.d.ts.map +1 -0
- package/dist/simples/calendar.js +342 -0
- package/dist/simples/calendar.js.map +1 -0
- package/dist/simples/card.d.ts +43 -0
- package/dist/simples/card.d.ts.map +1 -0
- package/dist/simples/card.js +151 -0
- package/dist/simples/card.js.map +1 -0
- package/dist/simples/checkbox.d.ts +25 -0
- package/dist/simples/checkbox.d.ts.map +1 -0
- package/dist/simples/checkbox.js +103 -0
- package/dist/simples/checkbox.js.map +1 -0
- package/dist/simples/client-only.d.ts +3 -0
- package/dist/simples/client-only.d.ts.map +1 -0
- package/dist/simples/client-only.js +7 -0
- package/dist/simples/client-only.js.map +1 -0
- package/dist/simples/clipboard.d.ts +11 -0
- package/dist/simples/clipboard.d.ts.map +1 -0
- package/dist/simples/clipboard.js +99 -0
- package/dist/simples/clipboard.js.map +1 -0
- package/dist/simples/collapsible.d.ts +8 -0
- package/dist/simples/collapsible.d.ts.map +1 -0
- package/dist/simples/collapsible.js +79 -0
- package/dist/simples/collapsible.js.map +1 -0
- package/dist/simples/color-picker.d.ts +62 -0
- package/dist/simples/color-picker.d.ts.map +1 -0
- package/dist/simples/color-picker.js +391 -0
- package/dist/simples/color-picker.js.map +1 -0
- package/dist/simples/combobox.d.ts +66 -0
- package/dist/simples/combobox.d.ts.map +1 -0
- package/dist/simples/combobox.js +230 -0
- package/dist/simples/combobox.js.map +1 -0
- package/dist/simples/command.d.ts +45 -0
- package/dist/simples/command.d.ts.map +1 -0
- package/dist/simples/command.js +180 -0
- package/dist/simples/command.js.map +1 -0
- package/dist/simples/data-list.d.ts +25 -0
- package/dist/simples/data-list.d.ts.map +1 -0
- package/dist/simples/data-list.js +62 -0
- package/dist/simples/data-list.js.map +1 -0
- package/dist/simples/date-picker.d.ts +16 -0
- package/dist/simples/date-picker.d.ts.map +1 -0
- package/dist/simples/date-picker.js +117 -0
- package/dist/simples/date-picker.js.map +1 -0
- package/dist/simples/diagnostic.d.ts +138 -0
- package/dist/simples/diagnostic.d.ts.map +1 -0
- package/dist/simples/diagnostic.js +288 -0
- package/dist/simples/diagnostic.js.map +1 -0
- package/dist/simples/dialog.d.ts +100 -0
- package/dist/simples/dialog.d.ts.map +1 -0
- package/dist/simples/dialog.js +267 -0
- package/dist/simples/dialog.js.map +1 -0
- package/dist/simples/download-trigger.d.ts +3 -0
- package/dist/simples/download-trigger.d.ts.map +1 -0
- package/dist/simples/download-trigger.js +7 -0
- package/dist/simples/download-trigger.js.map +1 -0
- package/dist/simples/editable.d.ts +23 -0
- package/dist/simples/editable.d.ts.map +1 -0
- package/dist/simples/editable.js +70 -0
- package/dist/simples/editable.js.map +1 -0
- package/dist/simples/field.d.ts +58 -0
- package/dist/simples/field.d.ts.map +1 -0
- package/dist/simples/field.js +285 -0
- package/dist/simples/field.js.map +1 -0
- package/dist/simples/file-upload.d.ts +19 -0
- package/dist/simples/file-upload.d.ts.map +1 -0
- package/dist/simples/file-upload.js +192 -0
- package/dist/simples/file-upload.js.map +1 -0
- package/dist/simples/float.d.ts +45 -0
- package/dist/simples/float.d.ts.map +1 -0
- package/dist/simples/float.js +40 -0
- package/dist/simples/float.js.map +1 -0
- package/dist/simples/floating-panel.d.ts +25 -0
- package/dist/simples/floating-panel.d.ts.map +1 -0
- package/dist/simples/floating-panel.js +95 -0
- package/dist/simples/floating-panel.js.map +1 -0
- package/dist/simples/highlight.d.ts +6 -0
- package/dist/simples/highlight.d.ts.map +1 -0
- package/dist/simples/highlight.js +24 -0
- package/dist/simples/highlight.js.map +1 -0
- package/dist/simples/hover-card.d.ts +11 -0
- package/dist/simples/hover-card.d.ts.map +1 -0
- package/dist/simples/hover-card.js +83 -0
- package/dist/simples/hover-card.js.map +1 -0
- package/dist/simples/image-cropper.d.ts +17 -0
- package/dist/simples/image-cropper.d.ts.map +1 -0
- package/dist/simples/image-cropper.js +139 -0
- package/dist/simples/image-cropper.js.map +1 -0
- package/dist/simples/input-group.d.ts +116 -0
- package/dist/simples/input-group.d.ts.map +1 -0
- package/dist/simples/input-group.js +245 -0
- package/dist/simples/input-group.js.map +1 -0
- package/dist/simples/input.d.ts +26 -0
- package/dist/simples/input.d.ts.map +1 -0
- package/dist/simples/input.js +60 -0
- package/dist/simples/input.js.map +1 -0
- package/dist/simples/item.d.ts +72 -0
- package/dist/simples/item.d.ts.map +1 -0
- package/dist/simples/item.js +180 -0
- package/dist/simples/item.js.map +1 -0
- package/dist/simples/json-tree-view.d.ts +7 -0
- package/dist/simples/json-tree-view.d.ts.map +1 -0
- package/dist/simples/json-tree-view.js +71 -0
- package/dist/simples/json-tree-view.js.map +1 -0
- package/dist/simples/kbd.d.ts +25 -0
- package/dist/simples/kbd.d.ts.map +1 -0
- package/dist/simples/kbd.js +50 -0
- package/dist/simples/kbd.js.map +1 -0
- package/dist/simples/listbox.d.ts +46 -0
- package/dist/simples/listbox.d.ts.map +1 -0
- package/dist/simples/listbox.js +218 -0
- package/dist/simples/listbox.js.map +1 -0
- package/dist/simples/menu.d.ts +60 -0
- package/dist/simples/menu.d.ts.map +1 -0
- package/dist/simples/menu.js +294 -0
- package/dist/simples/menu.js.map +1 -0
- package/dist/simples/native-select.d.ts +36 -0
- package/dist/simples/native-select.d.ts.map +1 -0
- package/dist/simples/native-select.js +77 -0
- package/dist/simples/native-select.js.map +1 -0
- package/dist/simples/number-input.d.ts +35 -0
- package/dist/simples/number-input.d.ts.map +1 -0
- package/dist/simples/number-input.js +142 -0
- package/dist/simples/number-input.js.map +1 -0
- package/dist/simples/pagination.d.ts +11 -0
- package/dist/simples/pagination.d.ts.map +1 -0
- package/dist/simples/pagination.js +78 -0
- package/dist/simples/pagination.js.map +1 -0
- package/dist/simples/password-input.d.ts +23 -0
- package/dist/simples/password-input.d.ts.map +1 -0
- package/dist/simples/password-input.js +90 -0
- package/dist/simples/password-input.js.map +1 -0
- package/dist/simples/pin-input.d.ts +30 -0
- package/dist/simples/pin-input.d.ts.map +1 -0
- package/dist/simples/pin-input.js +71 -0
- package/dist/simples/pin-input.js.map +1 -0
- package/dist/simples/popover.d.ts +42 -0
- package/dist/simples/popover.d.ts.map +1 -0
- package/dist/simples/popover.js +188 -0
- package/dist/simples/popover.js.map +1 -0
- package/dist/simples/progress.d.ts +23 -0
- package/dist/simples/progress.d.ts.map +1 -0
- package/dist/simples/progress.js +82 -0
- package/dist/simples/progress.js.map +1 -0
- package/dist/simples/prose.d.ts +17 -0
- package/dist/simples/prose.d.ts.map +1 -0
- package/dist/simples/prose.js +18 -0
- package/dist/simples/prose.js.map +1 -0
- package/dist/simples/radio-group.d.ts +23 -0
- package/dist/simples/radio-group.d.ts.map +1 -0
- package/dist/simples/radio-group.js +149 -0
- package/dist/simples/radio-group.js.map +1 -0
- package/dist/simples/rating.d.ts +10 -0
- package/dist/simples/rating.d.ts.map +1 -0
- package/dist/simples/rating.js +81 -0
- package/dist/simples/rating.js.map +1 -0
- package/dist/simples/resizable.d.ts +16 -0
- package/dist/simples/resizable.d.ts.map +1 -0
- package/dist/simples/resizable.js +57 -0
- package/dist/simples/resizable.js.map +1 -0
- package/dist/simples/scroll-area.d.ts +23 -0
- package/dist/simples/scroll-area.d.ts.map +1 -0
- package/dist/simples/scroll-area.js +88 -0
- package/dist/simples/scroll-area.js.map +1 -0
- package/dist/simples/segment-group.d.ts +27 -0
- package/dist/simples/segment-group.d.ts.map +1 -0
- package/dist/simples/segment-group.js +129 -0
- package/dist/simples/segment-group.js.map +1 -0
- package/dist/simples/select.d.ts +34 -0
- package/dist/simples/select.d.ts.map +1 -0
- package/dist/simples/select.js +258 -0
- package/dist/simples/select.js.map +1 -0
- package/dist/simples/separator.d.ts +12 -0
- package/dist/simples/separator.d.ts.map +1 -0
- package/dist/simples/separator.js +27 -0
- package/dist/simples/separator.js.map +1 -0
- package/dist/simples/sheet.d.ts +94 -0
- package/dist/simples/sheet.d.ts.map +1 -0
- package/dist/simples/sheet.js +172 -0
- package/dist/simples/sheet.js.map +1 -0
- package/dist/simples/show.d.ts +10 -0
- package/dist/simples/show.d.ts.map +1 -0
- package/dist/simples/show.js +9 -0
- package/dist/simples/show.js.map +1 -0
- package/dist/simples/skeleton.d.ts +3 -0
- package/dist/simples/skeleton.d.ts.map +1 -0
- package/dist/simples/skeleton.js +23 -0
- package/dist/simples/skeleton.js.map +1 -0
- package/dist/simples/skip-nav.d.ts +54 -0
- package/dist/simples/skip-nav.d.ts.map +1 -0
- package/dist/simples/skip-nav.js +42 -0
- package/dist/simples/skip-nav.js.map +1 -0
- package/dist/simples/slider.d.ts +29 -0
- package/dist/simples/slider.d.ts.map +1 -0
- package/dist/simples/slider.js +189 -0
- package/dist/simples/slider.js.map +1 -0
- package/dist/simples/spinner.d.ts +2 -0
- package/dist/simples/spinner.d.ts.map +1 -0
- package/dist/simples/spinner.js +20 -0
- package/dist/simples/spinner.js.map +1 -0
- package/dist/simples/stat-tile.d.ts +31 -0
- package/dist/simples/stat-tile.d.ts.map +1 -0
- package/dist/simples/stat-tile.js +64 -0
- package/dist/simples/stat-tile.js.map +1 -0
- package/dist/simples/status.d.ts +48 -0
- package/dist/simples/status.d.ts.map +1 -0
- package/dist/simples/status.js +57 -0
- package/dist/simples/status.js.map +1 -0
- package/dist/simples/steps.d.ts +20 -0
- package/dist/simples/steps.d.ts.map +1 -0
- package/dist/simples/steps.js +171 -0
- package/dist/simples/steps.js.map +1 -0
- package/dist/simples/suggestions.d.ts +43 -0
- package/dist/simples/suggestions.d.ts.map +1 -0
- package/dist/simples/suggestions.js +38 -0
- package/dist/simples/suggestions.js.map +1 -0
- package/dist/simples/swatch.d.ts +73 -0
- package/dist/simples/swatch.d.ts.map +1 -0
- package/dist/simples/swatch.js +35 -0
- package/dist/simples/swatch.js.map +1 -0
- package/dist/simples/switch.d.ts +5 -0
- package/dist/simples/switch.d.ts.map +1 -0
- package/dist/simples/switch.js +71 -0
- package/dist/simples/switch.js.map +1 -0
- package/dist/simples/table.d.ts +55 -0
- package/dist/simples/table.d.ts.map +1 -0
- package/dist/simples/table.js +166 -0
- package/dist/simples/table.js.map +1 -0
- package/dist/simples/tabs.d.ts +55 -0
- package/dist/simples/tabs.d.ts.map +1 -0
- package/dist/simples/tabs.js +133 -0
- package/dist/simples/tabs.js.map +1 -0
- package/dist/simples/tags-input.d.ts +64 -0
- package/dist/simples/tags-input.d.ts.map +1 -0
- package/dist/simples/tags-input.js +228 -0
- package/dist/simples/tags-input.js.map +1 -0
- package/dist/simples/textarea.d.ts +6 -0
- package/dist/simples/textarea.d.ts.map +1 -0
- package/dist/simples/textarea.js +34 -0
- package/dist/simples/textarea.js.map +1 -0
- package/dist/simples/toast.d.ts +20 -0
- package/dist/simples/toast.d.ts.map +1 -0
- package/dist/simples/toast.js +127 -0
- package/dist/simples/toast.js.map +1 -0
- package/dist/simples/toggle-group.d.ts +20 -0
- package/dist/simples/toggle-group.d.ts.map +1 -0
- package/dist/simples/toggle-group.js +82 -0
- package/dist/simples/toggle-group.js.map +1 -0
- package/dist/simples/toggle.d.ts +35 -0
- package/dist/simples/toggle.d.ts.map +1 -0
- package/dist/simples/toggle.js +57 -0
- package/dist/simples/toggle.js.map +1 -0
- package/dist/simples/tooltip.d.ts +8 -0
- package/dist/simples/tooltip.d.ts.map +1 -0
- package/dist/simples/tooltip.js +80 -0
- package/dist/simples/tooltip.js.map +1 -0
- package/dist/simples/tour.d.ts +81 -0
- package/dist/simples/tour.d.ts.map +1 -0
- package/dist/simples/tour.js +253 -0
- package/dist/simples/tour.js.map +1 -0
- package/dist/simples/tree-view.d.ts +64 -0
- package/dist/simples/tree-view.d.ts.map +1 -0
- package/dist/simples/tree-view.js +300 -0
- package/dist/simples/tree-view.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/table/data-table-content.d.ts +18 -0
- package/dist/table/data-table-content.d.ts.map +1 -0
- package/dist/table/data-table-content.js +53 -0
- package/dist/table/data-table-content.js.map +1 -0
- package/dist/table/data-table-pagination.d.ts +8 -0
- package/dist/table/data-table-pagination.d.ts.map +1 -0
- package/dist/table/data-table-pagination.js +65 -0
- package/dist/table/data-table-pagination.js.map +1 -0
- package/dist/table/data-table-root.d.ts +10 -0
- package/dist/table/data-table-root.d.ts.map +1 -0
- package/dist/table/data-table-root.js +21 -0
- package/dist/table/data-table-root.js.map +1 -0
- package/dist/table/data-table-toolbar.d.ts +44 -0
- package/dist/table/data-table-toolbar.d.ts.map +1 -0
- package/dist/table/data-table-toolbar.js +87 -0
- package/dist/table/data-table-toolbar.js.map +1 -0
- package/dist/table/select-column.d.ts +16 -0
- package/dist/table/select-column.d.ts.map +1 -0
- package/dist/table/select-column.js +39 -0
- package/dist/table/select-column.js.map +1 -0
- package/dist/table/sortableHeader.d.ts +25 -0
- package/dist/table/sortableHeader.d.ts.map +1 -0
- package/dist/table/sortableHeader.js +43 -0
- package/dist/table/sortableHeader.js.map +1 -0
- package/dist/table/use-data-table.d.ts +40 -0
- package/dist/table/use-data-table.d.ts.map +1 -0
- package/dist/table/use-data-table.js +65 -0
- package/dist/table/use-data-table.js.map +1 -0
- package/dist/table.d.ts +15 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +22 -0
- package/dist/table.js.map +1 -0
- package/dist/theme/KanzoTheme.d.ts +74 -0
- package/dist/theme/KanzoTheme.d.ts.map +1 -0
- package/dist/theme/KanzoTheme.js +61 -0
- package/dist/theme/KanzoTheme.js.map +1 -0
- package/dist/theme/KanzoThemeProvider.d.ts +144 -0
- package/dist/theme/KanzoThemeProvider.d.ts.map +1 -0
- package/dist/theme/KanzoThemeProvider.js +271 -0
- package/dist/theme/KanzoThemeProvider.js.map +1 -0
- package/dist/theme/theme-context.d.ts +146 -0
- package/dist/theme/theme-context.d.ts.map +1 -0
- package/dist/theme/theme-context.js +18 -0
- package/dist/theme/theme-context.js.map +1 -0
- package/dist/theme/theme-script.d.ts +17 -0
- package/dist/theme/theme-script.d.ts.map +1 -0
- package/dist/theme/theme-script.js +16 -0
- package/dist/theme/theme-script.js.map +1 -0
- package/package.json +201 -0
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @kanzo-tech/ui
|
|
2
|
+
|
|
3
|
+
Kanzo's shared UI surface — **Ark UI** behaviour, **tailwind-variants** appearance, design tokens
|
|
4
|
+
between them. The component set is adopted from [Shark UI](https://shark.vini.one) and re-branded to
|
|
5
|
+
the Kanzo tokens.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import "@kanzo-tech/ui/styles.css";
|
|
9
|
+
import { Button, KanzoThemeProvider } from "@kanzo-tech/ui";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## What is in it
|
|
13
|
+
|
|
14
|
+
- **`simples/`** — one component, one job: the adopted primitive set (inputs, overlays, menus,
|
|
15
|
+
navigation, data display) with a flat compound API — `DialogTrigger` and `DialogContent`, not
|
|
16
|
+
`Dialog.Trigger`.
|
|
17
|
+
- **`composites/`** — assemblies of those that stay domain-free: the sidebar, the code editor, the
|
|
18
|
+
`Preferences` theme panel.
|
|
19
|
+
- **`layouts/`** — the Shell and Section regions. Structure only, no appearance.
|
|
20
|
+
|
|
21
|
+
Everything is exported flat from the root, so a component moving between layers is never a breaking
|
|
22
|
+
change. The docs site lists the surface with a live example per component, and its Philosophy page
|
|
23
|
+
says how the three layers divide and what has to be true before a component is added.
|
|
24
|
+
|
|
25
|
+
## Subpaths
|
|
26
|
+
|
|
27
|
+
The root barrel never statically imports an optional peer, because that would break
|
|
28
|
+
`import { Button }` for everyone who did not install it. Anything that needs one lives on its own
|
|
29
|
+
entry:
|
|
30
|
+
|
|
31
|
+
| Entry | Peer |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `@kanzo-tech/ui` | none beyond React and `lucide-react` |
|
|
34
|
+
| `@kanzo-tech/ui/editor` | `@codemirror/*` |
|
|
35
|
+
| `@kanzo-tech/ui/table` | `@tanstack/react-table` |
|
|
36
|
+
| `@kanzo-tech/ui/analytics` | `@uwdata/vgplot`, `@uwdata/mosaic-*`, `@duckdb/duckdb-wasm` |
|
|
37
|
+
|
|
38
|
+
## Theming
|
|
39
|
+
|
|
40
|
+
`KanzoThemeProvider` writes the theme axes as `data-*` attributes on `<html>` — required, because
|
|
41
|
+
Ark's overlays portal to `document.body`. `useKanzoTheme()` drives them, `themeScript()` prevents an
|
|
42
|
+
SSR flash. Tokens and axes come from `@kanzo-tech/theme`.
|
|
43
|
+
|
|
44
|
+
### Preference menus
|
|
45
|
+
|
|
46
|
+
The editor is a **kit**, not one screen. `PreferencesColor`, `PreferencesDensity`,
|
|
47
|
+
`PreferencesRadius` and the two font axes are one preference each, wired straight to
|
|
48
|
+
`useKanzoTheme()`; `PreferencesField` / `PreferencesFieldSet` title a section of your own the same
|
|
49
|
+
way; `PreferencesSections` draws whatever the packages a host installed contribute. None of them
|
|
50
|
+
knows what it is mounted on — `PreferencesColor` lays its two cards out under a container query,
|
|
51
|
+
never a window width.
|
|
52
|
+
|
|
53
|
+
`Preferences` (and its `PreferencesRoot` / `Trigger` / `Panel` parts) is one **surface** over that
|
|
54
|
+
kit: a non-modal drawer with a hotkey. A product with a real settings area drops the same sections
|
|
55
|
+
into its own page instead, beside its own menu — no drawer, nothing to opt out of, no component to
|
|
56
|
+
import for it. **Both are first-class**, and a section that ever needed to know which one it was on
|
|
57
|
+
would be the design failing. The docs site shows the two side by side: `showcases/metadata-form` for
|
|
58
|
+
the drawer, `showcases/settings` for the page.
|
|
59
|
+
|
|
60
|
+
Admission rule: nothing domain-specific — no RDF, SHACL, fossil, graph or auth knowledge.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { MosaicProvider, useMosaic, useCrossfilter, useSelected } from './charts/mosaic-provider.js';
|
|
2
|
+
export type { MosaicProviderProps, MosaicContextValue } from './charts/mosaic-provider.js';
|
|
3
|
+
export { ChartRoot, useChartContext, useChartContextOptional } from './charts/chart-root.js';
|
|
4
|
+
export type { ChartRootProps, ChartContextValue } from './charts/chart-root.js';
|
|
5
|
+
export type { ChartConfig, ChartSeriesConfig, ChartSeriesEntry } from './charts/chart-config.js';
|
|
6
|
+
export { chartSeriesColor } from './charts/chart-config.js';
|
|
7
|
+
export { ChartBarY, ChartBarX, ChartWaffleY, ChartWaffleX, ChartLine, ChartLineY, ChartLineX, ChartArea, ChartAreaY, ChartAreaX, ChartDot, ChartDotX, ChartDotY, ChartCircle, ChartHexagon, ChartImage, ChartRect, ChartRectY, ChartRectX, ChartCell, ChartCellX, ChartCellY, ChartRuleY, ChartRuleX, ChartTickX, ChartTickY, ChartText, ChartTextX, ChartTextY, ChartVector, ChartVectorX, ChartVectorY, ChartSpike, ChartArrow, ChartLink, ChartHeatmap, ChartRaster, ChartRasterTile, ChartContour, ChartDenseLine, ChartDensity, ChartDensityY, ChartDensityX, ChartHexbin, ChartRegressionY, ChartErrorbarY, ChartErrorbarX, ChartVoronoi, ChartVoronoiMesh, ChartDelaunayLink, ChartDelaunayMesh, ChartHull, ChartGeo, ChartSphere, ChartGraticule, ChartFrame, ChartGridX, ChartGridY, ChartHexgrid, ChartRaw, } from './charts/chart-marks.js';
|
|
8
|
+
export type { ChartMarkProps, ChartRawProps } from './charts/chart-marks.js';
|
|
9
|
+
export { ChartIntervalX, ChartIntervalY, ChartIntervalXY, ChartToggleX, ChartToggleY, ChartToggleColor, ChartPickX, ChartPickY, ChartPickColor, ChartBrushX, ChartBrushY, ChartBrushXY, ChartNearestX, ChartNearestY, ChartRegion, ChartHighlight, ChartPanZoom, } from './charts/chart-interactors.js';
|
|
10
|
+
export type { ChartInteractorProps, ChartHighlightProps, ChartPanZoomProps, } from './charts/chart-interactors.js';
|
|
11
|
+
export { ChartAxisX, ChartAxisY, ChartFacetX, ChartFacetY } from './charts/chart-axes.js';
|
|
12
|
+
export type { ChartAxisXProps, ChartAxisYProps, ChartFacetXProps, ChartFacetYProps, } from './charts/chart-axes.js';
|
|
13
|
+
export { ChartFilter, ChartSearch, ChartSlider } from './charts/chart-inputs.js';
|
|
14
|
+
export type { ChartFilterProps, ChartFilterOption, ChartSearchProps, ChartSliderProps, } from './charts/chart-inputs.js';
|
|
15
|
+
export { useMosaicInput } from './charts/chart-inputs.js';
|
|
16
|
+
export type { MosaicInputOptions, MosaicInputState } from './charts/chart-inputs.js';
|
|
17
|
+
export { ChartLegend, ChartColorLegend } from './charts/chart-legend.js';
|
|
18
|
+
export type { ChartLegendProps, ChartColorLegendProps } from './charts/chart-legend.js';
|
|
19
|
+
export { ChartStat } from './charts/chart-stat.js';
|
|
20
|
+
export type { ChartStatProps } from './charts/chart-stat.js';
|
|
21
|
+
export { useChartQuery, Query } from './charts/use-chart-query.js';
|
|
22
|
+
export type { ChartQueryOptions, ChartQueryResult, ChartQueryRow } from './charts/use-chart-query.js';
|
|
23
|
+
export { chartDescriptor } from './charts/chart-spec.js';
|
|
24
|
+
export type { ChartDescriptor, ChartCompile, ChartDirective, ChartMarkDirective, ChartInteractorDirective, ChartAttributeDirective, ChartRawDirective, ChartSpecContext, ChartSpecOptions, ChartMargin, ChartFacetOptions, ChartMarkSource, } from './charts/chart-spec.js';
|
|
25
|
+
export { Coordinator, Selection, wasmConnector } from '@uwdata/mosaic-core';
|
|
26
|
+
export { loadCSV, loadJSON, loadObjects, loadParquet, loadSpatial, loadExtension, } from '@uwdata/mosaic-sql';
|
|
27
|
+
export { count, sum, avg, min, max, median, quantile, stddev, mode, bin, sql } from '@uwdata/vgplot';
|
|
28
|
+
export type { ExprValue } from '@uwdata/mosaic-sql';
|
|
29
|
+
export { axisX, axisY, axisFx, axisFy, gridFx, gridFy } from '@uwdata/vgplot';
|
|
30
|
+
export { MosaicClient, makeClient, clausePoint, clausePoints, clauseInterval, clauseIntervals, clauseMatch, } from '@uwdata/mosaic-core';
|
|
31
|
+
export type { SelectionClause } from '@uwdata/mosaic-core';
|
|
32
|
+
export type { FilterExpr } from '@uwdata/mosaic-sql';
|
|
33
|
+
export { column, fillColumn, numbers, type NumericArray } from './charts/arrow.js';
|
|
34
|
+
export { IdSetClient } from './charts/id-set-client.js';
|
|
35
|
+
export type { IdSetClientOptions } from './charts/id-set-client.js';
|
|
36
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { MosaicProvider as a, useCrossfilter as e, useMosaic as C, useSelected as h } from "./charts/mosaic-provider.js";
|
|
2
|
+
import { ChartRoot as i, useChartContext as l, useChartContextOptional as n } from "./charts/chart-root.js";
|
|
3
|
+
import { chartSeriesColor as c } from "./charts/chart-config.js";
|
|
4
|
+
import { ChartArea as u, ChartAreaX as m, ChartAreaY as Y, ChartArrow as X, ChartBarX as p, ChartBarY as d, ChartCell as f, ChartCellX as g, ChartCellY as S, ChartCircle as R, ChartContour as D, ChartDelaunayLink as k, ChartDelaunayMesh as y, ChartDenseLine as T, ChartDensity as v, ChartDensityX as F, ChartDensityY as I, ChartDot as L, ChartDotX as P, ChartDotY as M, ChartErrorbarX as b, ChartErrorbarY as A, ChartFrame as H, ChartGeo as V, ChartGraticule as B, ChartGridX as G, ChartGridY as q, ChartHeatmap as w, ChartHexagon as E, ChartHexbin as N, ChartHexgrid as O, ChartHull as Q, ChartImage as W, ChartLine as j, ChartLineX as J, ChartLineY as Z, ChartLink as z, ChartRaster as K, ChartRasterTile as U, ChartRaw as _, ChartRect as $, ChartRectX as rr, ChartRectY as tr, ChartRegressionY as ar, ChartRuleX as er, ChartRuleY as Cr, ChartSphere as hr, ChartSpike as or, ChartText as ir, ChartTextX as lr, ChartTextY as nr, ChartTickX as sr, ChartTickY as cr, ChartVector as xr, ChartVectorX as ur, ChartVectorY as mr, ChartVoronoi as Yr, ChartVoronoiMesh as Xr, ChartWaffleX as pr, ChartWaffleY as dr } from "./charts/chart-marks.js";
|
|
5
|
+
import { ChartBrushX as gr, ChartBrushXY as Sr, ChartBrushY as Rr, ChartHighlight as Dr, ChartIntervalX as kr, ChartIntervalXY as yr, ChartIntervalY as Tr, ChartNearestX as vr, ChartNearestY as Fr, ChartPanZoom as Ir, ChartPickColor as Lr, ChartPickX as Pr, ChartPickY as Mr, ChartRegion as br, ChartToggleColor as Ar, ChartToggleX as Hr, ChartToggleY as Vr } from "./charts/chart-interactors.js";
|
|
6
|
+
import { ChartAxisX as Gr, ChartAxisY as qr, ChartFacetX as wr, ChartFacetY as Er } from "./charts/chart-axes.js";
|
|
7
|
+
import { ChartFilter as Or, ChartSearch as Qr, ChartSlider as Wr, useMosaicInput as jr } from "./charts/chart-inputs.js";
|
|
8
|
+
import { ChartColorLegend as Zr, ChartLegend as zr } from "./charts/chart-legend.js";
|
|
9
|
+
import { ChartStat as Ur } from "./charts/chart-stat.js";
|
|
10
|
+
import { useChartQuery as $r } from "./charts/use-chart-query.js";
|
|
11
|
+
import { chartDescriptor as tt } from "./charts/chart-spec.js";
|
|
12
|
+
import { Coordinator as et, MosaicClient as Ct, Selection as ht, clauseInterval as ot, clauseIntervals as it, clauseMatch as lt, clausePoint as nt, clausePoints as st, makeClient as ct, wasmConnector as xt } from "@uwdata/mosaic-core";
|
|
13
|
+
import { Query as mt, loadCSV as Yt, loadExtension as Xt, loadJSON as pt, loadObjects as dt, loadParquet as ft, loadSpatial as gt } from "@uwdata/mosaic-sql";
|
|
14
|
+
import { avg as Rt, axisFx as Dt, axisFy as kt, axisX as yt, axisY as Tt, bin as vt, count as Ft, gridFx as It, gridFy as Lt, max as Pt, median as Mt, min as bt, mode as At, quantile as Ht, sql as Vt, stddev as Bt, sum as Gt } from "@uwdata/vgplot";
|
|
15
|
+
import { column as wt, fillColumn as Et, numbers as Nt } from "./charts/arrow.js";
|
|
16
|
+
import { IdSetClient as Qt } from "./charts/id-set-client.js";
|
|
17
|
+
export {
|
|
18
|
+
u as ChartArea,
|
|
19
|
+
m as ChartAreaX,
|
|
20
|
+
Y as ChartAreaY,
|
|
21
|
+
X as ChartArrow,
|
|
22
|
+
Gr as ChartAxisX,
|
|
23
|
+
qr as ChartAxisY,
|
|
24
|
+
p as ChartBarX,
|
|
25
|
+
d as ChartBarY,
|
|
26
|
+
gr as ChartBrushX,
|
|
27
|
+
Sr as ChartBrushXY,
|
|
28
|
+
Rr as ChartBrushY,
|
|
29
|
+
f as ChartCell,
|
|
30
|
+
g as ChartCellX,
|
|
31
|
+
S as ChartCellY,
|
|
32
|
+
R as ChartCircle,
|
|
33
|
+
Zr as ChartColorLegend,
|
|
34
|
+
D as ChartContour,
|
|
35
|
+
k as ChartDelaunayLink,
|
|
36
|
+
y as ChartDelaunayMesh,
|
|
37
|
+
T as ChartDenseLine,
|
|
38
|
+
v as ChartDensity,
|
|
39
|
+
F as ChartDensityX,
|
|
40
|
+
I as ChartDensityY,
|
|
41
|
+
L as ChartDot,
|
|
42
|
+
P as ChartDotX,
|
|
43
|
+
M as ChartDotY,
|
|
44
|
+
b as ChartErrorbarX,
|
|
45
|
+
A as ChartErrorbarY,
|
|
46
|
+
wr as ChartFacetX,
|
|
47
|
+
Er as ChartFacetY,
|
|
48
|
+
Or as ChartFilter,
|
|
49
|
+
H as ChartFrame,
|
|
50
|
+
V as ChartGeo,
|
|
51
|
+
B as ChartGraticule,
|
|
52
|
+
G as ChartGridX,
|
|
53
|
+
q as ChartGridY,
|
|
54
|
+
w as ChartHeatmap,
|
|
55
|
+
E as ChartHexagon,
|
|
56
|
+
N as ChartHexbin,
|
|
57
|
+
O as ChartHexgrid,
|
|
58
|
+
Dr as ChartHighlight,
|
|
59
|
+
Q as ChartHull,
|
|
60
|
+
W as ChartImage,
|
|
61
|
+
kr as ChartIntervalX,
|
|
62
|
+
yr as ChartIntervalXY,
|
|
63
|
+
Tr as ChartIntervalY,
|
|
64
|
+
zr as ChartLegend,
|
|
65
|
+
j as ChartLine,
|
|
66
|
+
J as ChartLineX,
|
|
67
|
+
Z as ChartLineY,
|
|
68
|
+
z as ChartLink,
|
|
69
|
+
vr as ChartNearestX,
|
|
70
|
+
Fr as ChartNearestY,
|
|
71
|
+
Ir as ChartPanZoom,
|
|
72
|
+
Lr as ChartPickColor,
|
|
73
|
+
Pr as ChartPickX,
|
|
74
|
+
Mr as ChartPickY,
|
|
75
|
+
K as ChartRaster,
|
|
76
|
+
U as ChartRasterTile,
|
|
77
|
+
_ as ChartRaw,
|
|
78
|
+
$ as ChartRect,
|
|
79
|
+
rr as ChartRectX,
|
|
80
|
+
tr as ChartRectY,
|
|
81
|
+
br as ChartRegion,
|
|
82
|
+
ar as ChartRegressionY,
|
|
83
|
+
i as ChartRoot,
|
|
84
|
+
er as ChartRuleX,
|
|
85
|
+
Cr as ChartRuleY,
|
|
86
|
+
Qr as ChartSearch,
|
|
87
|
+
Wr as ChartSlider,
|
|
88
|
+
hr as ChartSphere,
|
|
89
|
+
or as ChartSpike,
|
|
90
|
+
Ur as ChartStat,
|
|
91
|
+
ir as ChartText,
|
|
92
|
+
lr as ChartTextX,
|
|
93
|
+
nr as ChartTextY,
|
|
94
|
+
sr as ChartTickX,
|
|
95
|
+
cr as ChartTickY,
|
|
96
|
+
Ar as ChartToggleColor,
|
|
97
|
+
Hr as ChartToggleX,
|
|
98
|
+
Vr as ChartToggleY,
|
|
99
|
+
xr as ChartVector,
|
|
100
|
+
ur as ChartVectorX,
|
|
101
|
+
mr as ChartVectorY,
|
|
102
|
+
Yr as ChartVoronoi,
|
|
103
|
+
Xr as ChartVoronoiMesh,
|
|
104
|
+
pr as ChartWaffleX,
|
|
105
|
+
dr as ChartWaffleY,
|
|
106
|
+
et as Coordinator,
|
|
107
|
+
Qt as IdSetClient,
|
|
108
|
+
Ct as MosaicClient,
|
|
109
|
+
a as MosaicProvider,
|
|
110
|
+
mt as Query,
|
|
111
|
+
ht as Selection,
|
|
112
|
+
Rt as avg,
|
|
113
|
+
Dt as axisFx,
|
|
114
|
+
kt as axisFy,
|
|
115
|
+
yt as axisX,
|
|
116
|
+
Tt as axisY,
|
|
117
|
+
vt as bin,
|
|
118
|
+
tt as chartDescriptor,
|
|
119
|
+
c as chartSeriesColor,
|
|
120
|
+
ot as clauseInterval,
|
|
121
|
+
it as clauseIntervals,
|
|
122
|
+
lt as clauseMatch,
|
|
123
|
+
nt as clausePoint,
|
|
124
|
+
st as clausePoints,
|
|
125
|
+
wt as column,
|
|
126
|
+
Ft as count,
|
|
127
|
+
Et as fillColumn,
|
|
128
|
+
It as gridFx,
|
|
129
|
+
Lt as gridFy,
|
|
130
|
+
Yt as loadCSV,
|
|
131
|
+
Xt as loadExtension,
|
|
132
|
+
pt as loadJSON,
|
|
133
|
+
dt as loadObjects,
|
|
134
|
+
ft as loadParquet,
|
|
135
|
+
gt as loadSpatial,
|
|
136
|
+
ct as makeClient,
|
|
137
|
+
Pt as max,
|
|
138
|
+
Mt as median,
|
|
139
|
+
bt as min,
|
|
140
|
+
At as mode,
|
|
141
|
+
Nt as numbers,
|
|
142
|
+
Ht as quantile,
|
|
143
|
+
Vt as sql,
|
|
144
|
+
Bt as stddev,
|
|
145
|
+
Gt as sum,
|
|
146
|
+
l as useChartContext,
|
|
147
|
+
n as useChartContextOptional,
|
|
148
|
+
$r as useChartQuery,
|
|
149
|
+
e as useCrossfilter,
|
|
150
|
+
C as useMosaic,
|
|
151
|
+
jr as useMosaicInput,
|
|
152
|
+
h as useSelected,
|
|
153
|
+
xt as wasmConnector
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading one column out of whatever a Mosaic query handed back.
|
|
3
|
+
*
|
|
4
|
+
* The coordinator answers with an Arrow table, and Arrow only offers a typed column when the type
|
|
5
|
+
* allows one: `getChild` gives an array for an integer column and nothing usable for a
|
|
6
|
+
* dictionary-encoded string. Both shapes come back from ordinary queries — an `id` is the first, a
|
|
7
|
+
* `label` is the second — so a `queryResult` that assumes the typed path is a crash waiting for the
|
|
8
|
+
* first query that selects a string.
|
|
9
|
+
*
|
|
10
|
+
* This is the half of the client protocol the protocol itself does not give you. Declaring a query
|
|
11
|
+
* and publishing a clause is documented and small; turning the answer into values is where every
|
|
12
|
+
* call site independently writes `as { getChild(name: string): … }`, which is a cast asserting the
|
|
13
|
+
* shape rather than checking it.
|
|
14
|
+
*/
|
|
15
|
+
/** Every value in `field`, in row order. */
|
|
16
|
+
export declare function column(data: unknown, field: string): unknown[];
|
|
17
|
+
/** The same, coerced — Arrow hands back `BigInt` for some integer widths. */
|
|
18
|
+
export declare function numbers(data: unknown, field: string): number[];
|
|
19
|
+
/** A pre-sized destination `fillColumn` can write into. */
|
|
20
|
+
export type NumericArray = Float32Array | Float64Array | Uint32Array | Uint16Array | Int32Array;
|
|
21
|
+
/**
|
|
22
|
+
* One numeric column, written straight into a typed array the caller already owns.
|
|
23
|
+
*
|
|
24
|
+
* `numbers()` is the wrong tool once a result is large: `toArray()` already hands back a typed
|
|
25
|
+
* buffer, and `Array.from(...).map(Number)` turns it into two full-length boxed `number[]` on the
|
|
26
|
+
* way to a third array that was the actual destination. Three allocations to move nothing. This is
|
|
27
|
+
* the same pass with none of them — which is what lets a caller size once against its own limit and
|
|
28
|
+
* fill from the Arrow batches as they arrive.
|
|
29
|
+
*
|
|
30
|
+
* `stride` and `offset` are how interleaving is expressed: `x` at `(0, 2)` and `y` at `(1, 2)` fill
|
|
31
|
+
* one `[x0, y0, x1, y1, …]` buffer with no seam between them.
|
|
32
|
+
*
|
|
33
|
+
* Returns how many rows were written, which is `min(rows, capacity)` — a caller that sized against
|
|
34
|
+
* a `LIMIT` uses it to `subarray` down to what actually came back.
|
|
35
|
+
*/
|
|
36
|
+
export declare function fillColumn(data: unknown, field: string, into: NumericArray, offset?: number, stride?: number): number;
|
|
37
|
+
//# sourceMappingURL=arrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../src/charts/arrow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,4CAA4C;AAC5C,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAI9D;AAED,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE9D;AAED,2DAA2D;AAC3D,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC;AAEhG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,YAAY,EAClB,MAAM,SAAI,EACV,MAAM,SAAI,GACT,MAAM,CAiBR"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function b(r, n) {
|
|
2
|
+
var u;
|
|
3
|
+
const o = (u = r.getChild) == null ? void 0 : u.call(r, n);
|
|
4
|
+
return o ? Array.from(o.toArray()) : Array.from(r, (c) => c[n]);
|
|
5
|
+
}
|
|
6
|
+
function y(r, n) {
|
|
7
|
+
return b(r, n).map(Number);
|
|
8
|
+
}
|
|
9
|
+
function g(r, n, o, u = 0, c = 1) {
|
|
10
|
+
var h, f;
|
|
11
|
+
const i = Math.max(0, Math.ceil((o.length - u) / c)), t = (f = (h = r.getChild) == null ? void 0 : h.call(r, n)) == null ? void 0 : f.toArray();
|
|
12
|
+
if (t) {
|
|
13
|
+
const l = Math.min(t.length, i);
|
|
14
|
+
for (let m = 0; m < l; m++) o[u + m * c] = Number(t[m]);
|
|
15
|
+
return l;
|
|
16
|
+
}
|
|
17
|
+
let e = 0;
|
|
18
|
+
for (const l of r) {
|
|
19
|
+
if (e >= i) break;
|
|
20
|
+
o[u + e * c] = Number(l[n]), e++;
|
|
21
|
+
}
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
b as column,
|
|
26
|
+
g as fillColumn,
|
|
27
|
+
y as numbers
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=arrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow.js","sources":["../../src/charts/arrow.ts"],"sourcesContent":["/**\n * Reading one column out of whatever a Mosaic query handed back.\n *\n * The coordinator answers with an Arrow table, and Arrow only offers a typed column when the type\n * allows one: `getChild` gives an array for an integer column and nothing usable for a\n * dictionary-encoded string. Both shapes come back from ordinary queries — an `id` is the first, a\n * `label` is the second — so a `queryResult` that assumes the typed path is a crash waiting for the\n * first query that selects a string.\n *\n * This is the half of the client protocol the protocol itself does not give you. Declaring a query\n * and publishing a clause is documented and small; turning the answer into values is where every\n * call site independently writes `as { getChild(name: string): … }`, which is a cast asserting the\n * shape rather than checking it.\n */\n\ninterface ArrowLike {\n getChild?: (name: string) => { toArray(): ArrayLike<unknown> } | null;\n}\n\n/** Every value in `field`, in row order. */\nexport function column(data: unknown, field: string): unknown[] {\n const child = (data as ArrowLike).getChild?.(field);\n if (child) return Array.from(child.toArray());\n return Array.from(data as Iterable<Record<string, unknown>>, (row) => row[field]);\n}\n\n/** The same, coerced — Arrow hands back `BigInt` for some integer widths. */\nexport function numbers(data: unknown, field: string): number[] {\n return column(data, field).map(Number);\n}\n\n/** A pre-sized destination `fillColumn` can write into. */\nexport type NumericArray = Float32Array | Float64Array | Uint32Array | Uint16Array | Int32Array;\n\n/**\n * One numeric column, written straight into a typed array the caller already owns.\n *\n * `numbers()` is the wrong tool once a result is large: `toArray()` already hands back a typed\n * buffer, and `Array.from(...).map(Number)` turns it into two full-length boxed `number[]` on the\n * way to a third array that was the actual destination. Three allocations to move nothing. This is\n * the same pass with none of them — which is what lets a caller size once against its own limit and\n * fill from the Arrow batches as they arrive.\n *\n * `stride` and `offset` are how interleaving is expressed: `x` at `(0, 2)` and `y` at `(1, 2)` fill\n * one `[x0, y0, x1, y1, …]` buffer with no seam between them.\n *\n * Returns how many rows were written, which is `min(rows, capacity)` — a caller that sized against\n * a `LIMIT` uses it to `subarray` down to what actually came back.\n */\nexport function fillColumn(\n data: unknown,\n field: string,\n into: NumericArray,\n offset = 0,\n stride = 1,\n): number {\n const capacity = Math.max(0, Math.ceil((into.length - offset) / stride));\n const values = (data as ArrowLike).getChild?.(field)?.toArray();\n if (values) {\n const n = Math.min(values.length, capacity);\n // `Number` is identity on the numeric widths and the conversion on the BigInt ones; either way\n // it reads an element rather than allocating one.\n for (let i = 0; i < n; i++) into[offset + i * stride] = Number(values[i]);\n return n;\n }\n let i = 0;\n for (const row of data as Iterable<Record<string, unknown>>) {\n if (i >= capacity) break;\n into[offset + i * stride] = Number(row[field]);\n i++;\n }\n return i;\n}\n"],"names":["column","data","field","_a","child","row","numbers","fillColumn","into","offset","stride","_b","capacity","values","n","i"],"mappings":"AAoBO,SAASA,EAAOC,GAAeC,GAA0B;AAAzD,MAAAC;AACL,QAAMC,KAASD,IAAAF,EAAmB,aAAnB,gBAAAE,EAAA,KAAAF,GAA8BC;AAC7C,SAAIE,IAAc,MAAM,KAAKA,EAAM,SAAS,IACrC,MAAM,KAAKH,GAA2C,CAACI,MAAQA,EAAIH,CAAK,CAAC;AAClF;AAGO,SAASI,EAAQL,GAAeC,GAAyB;AAC9D,SAAOF,EAAOC,GAAMC,CAAK,EAAE,IAAI,MAAM;AACvC;AAoBO,SAASK,EACdN,GACAC,GACAM,GACAC,IAAS,GACTC,IAAS,GACD;AAnCH,MAAAP,GAAAQ;AAoCL,QAAMC,IAAW,KAAK,IAAI,GAAG,KAAK,MAAMJ,EAAK,SAASC,KAAUC,CAAM,CAAC,GACjEG,KAAUF,KAAAR,IAAAF,EAAmB,aAAnB,gBAAAE,EAAA,KAAAF,GAA8BC,OAA9B,gBAAAS,EAAsC;AACtD,MAAIE,GAAQ;AACV,UAAMC,IAAI,KAAK,IAAID,EAAO,QAAQD,CAAQ;AAG1C,aAASG,IAAI,GAAGA,IAAID,GAAGC,IAAK,CAAAP,EAAKC,IAASM,IAAIL,CAAM,IAAI,OAAOG,EAAOE,CAAC,CAAC;AACxE,WAAOD;AAAA,EACT;AACA,MAAIC,IAAI;AACR,aAAWV,KAAOJ,GAA2C;AAC3D,QAAIc,KAAKH,EAAU;AACnB,IAAAJ,EAAKC,IAASM,IAAIL,CAAM,IAAI,OAAOL,EAAIH,CAAK,CAAC,GAC7Ca;AAAA,EACF;AACA,SAAOA;AACT;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ChartDescriptor } from './chart-spec.js';
|
|
2
|
+
/**
|
|
3
|
+
* Scale descriptors: the position scales (`x`/`y`) and the facet scales (`fx`/`fy`).
|
|
4
|
+
*
|
|
5
|
+
* They compile to plot **attributes** (`xTickRotate`, `fyGrid`…), not to vgplot's `axisX`/`axisFy`
|
|
6
|
+
* decorator marks — an attribute cannot become the mark a following interactor binds itself to.
|
|
7
|
+
* The subset here is what charts actually use; the rest goes through `ChartRoot`'s `attributes`.
|
|
8
|
+
*/
|
|
9
|
+
/** What every scale has, position or facet. */
|
|
10
|
+
interface ChartScalePropsBase {
|
|
11
|
+
/** Axis label. `null` removes it. */
|
|
12
|
+
label?: string | null;
|
|
13
|
+
/** A tick count, an interval name, or explicit tick values. */
|
|
14
|
+
ticks?: unknown;
|
|
15
|
+
tickFormat?: unknown;
|
|
16
|
+
tickSize?: number;
|
|
17
|
+
tickRotate?: number;
|
|
18
|
+
grid?: boolean;
|
|
19
|
+
line?: boolean;
|
|
20
|
+
domain?: readonly unknown[];
|
|
21
|
+
reverse?: boolean;
|
|
22
|
+
inset?: number;
|
|
23
|
+
padding?: number;
|
|
24
|
+
}
|
|
25
|
+
interface ChartAxisPropsBase extends ChartScalePropsBase {
|
|
26
|
+
/** `"linear"`, `"log"`, `"band"`, `"utc"`… `null` disables the scale. */
|
|
27
|
+
scale?: string | null;
|
|
28
|
+
nice?: boolean | number;
|
|
29
|
+
zero?: boolean;
|
|
30
|
+
percent?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface ChartAxisXProps extends ChartAxisPropsBase {
|
|
33
|
+
/** Which side the axis is drawn on; `null` hides it while keeping the scale. */
|
|
34
|
+
anchor?: "top" | "bottom" | null;
|
|
35
|
+
}
|
|
36
|
+
export interface ChartAxisYProps extends ChartAxisPropsBase {
|
|
37
|
+
/** Which side the axis is drawn on; `null` hides it while keeping the scale. */
|
|
38
|
+
anchor?: "left" | "right" | null;
|
|
39
|
+
}
|
|
40
|
+
export interface ChartFacetXProps extends ChartScalePropsBase {
|
|
41
|
+
/** Which side the facet axis is drawn on; `null` hides it while keeping the panels. */
|
|
42
|
+
anchor?: "top" | "bottom" | null;
|
|
43
|
+
}
|
|
44
|
+
export interface ChartFacetYProps extends ChartScalePropsBase {
|
|
45
|
+
/** Which side the facet axis is drawn on; `null` hides it while keeping the panels. */
|
|
46
|
+
anchor?: "left" | "right" | null;
|
|
47
|
+
}
|
|
48
|
+
export declare const ChartAxisX: ChartDescriptor<ChartAxisXProps>;
|
|
49
|
+
export declare const ChartAxisY: ChartDescriptor<ChartAxisYProps>;
|
|
50
|
+
/**
|
|
51
|
+
* Small multiples. Plot facets by the `fx` / `fy` channels of a mark — `<ChartBarY fx="region" />`
|
|
52
|
+
* splits the plot into one panel per region — and these two configure the resulting facet scale,
|
|
53
|
+
* exactly as `ChartAxisX` / `ChartAxisY` configure the position scales. Panel spacing, cross-panel
|
|
54
|
+
* grid and the shared facet label are plot-wide, so they live on `ChartRoot` instead.
|
|
55
|
+
*/
|
|
56
|
+
export declare const ChartFacetX: ChartDescriptor<ChartFacetXProps>;
|
|
57
|
+
export declare const ChartFacetY: ChartDescriptor<ChartFacetYProps>;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=chart-axes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-axes.d.ts","sourceRoot":"","sources":["../../src/charts/chart-axes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEtG;;;;;;GAMG;AAEH,+CAA+C;AAC/C,UAAU,mBAAmB;IAC3B,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,kBAAmB,SAAQ,mBAAmB;IACtD,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,gFAAgF;IAChF,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,uFAAuF;IACvF,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,uFAAuF;IACvF,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CAClC;AA0CD,eAAO,MAAM,UAAU,EAA4C,eAAe,CAAC,eAAe,CAAC,CAAC;AACpG,eAAO,MAAM,UAAU,EAA4C,eAAe,CAAC,eAAe,CAAC,CAAC;AAEpG;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAA+C,eAAe,CAAC,gBAAgB,CAAC,CAAC;AACzG,eAAO,MAAM,WAAW,EAA+C,eAAe,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { chartDescriptor as F } from "./chart-spec.js";
|
|
2
|
+
const e = {
|
|
3
|
+
anchor: "Axis",
|
|
4
|
+
label: "Label",
|
|
5
|
+
ticks: "Ticks",
|
|
6
|
+
tickFormat: "TickFormat",
|
|
7
|
+
tickSize: "TickSize",
|
|
8
|
+
tickRotate: "TickRotate",
|
|
9
|
+
grid: "Grid",
|
|
10
|
+
line: "Line",
|
|
11
|
+
domain: "Domain",
|
|
12
|
+
reverse: "Reverse",
|
|
13
|
+
inset: "Inset",
|
|
14
|
+
padding: "Padding"
|
|
15
|
+
}, a = {
|
|
16
|
+
...e,
|
|
17
|
+
scale: "Scale",
|
|
18
|
+
nice: "Nice",
|
|
19
|
+
zero: "Zero",
|
|
20
|
+
percent: "Percent"
|
|
21
|
+
};
|
|
22
|
+
function t(n, o, s) {
|
|
23
|
+
return F(n, (h) => {
|
|
24
|
+
const i = [];
|
|
25
|
+
for (const [d, c] of Object.entries(h)) {
|
|
26
|
+
const r = s[d];
|
|
27
|
+
r === void 0 || c === void 0 || i.push({ kind: "attribute", name: `${o}${r}`, value: c });
|
|
28
|
+
}
|
|
29
|
+
return i;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const k = t("ChartAxisX", "x", a), u = t("ChartAxisY", "y", a), x = t("ChartFacetX", "fx", e), C = t("ChartFacetY", "fy", e);
|
|
33
|
+
export {
|
|
34
|
+
k as ChartAxisX,
|
|
35
|
+
u as ChartAxisY,
|
|
36
|
+
x as ChartFacetX,
|
|
37
|
+
C as ChartFacetY
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=chart-axes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-axes.js","sources":["../../src/charts/chart-axes.tsx"],"sourcesContent":["import { chartDescriptor, type ChartAttributeDirective, type ChartDescriptor } from \"./chart-spec.js\";\n\n/**\n * Scale descriptors: the position scales (`x`/`y`) and the facet scales (`fx`/`fy`).\n *\n * They compile to plot **attributes** (`xTickRotate`, `fyGrid`…), not to vgplot's `axisX`/`axisFy`\n * decorator marks — an attribute cannot become the mark a following interactor binds itself to.\n * The subset here is what charts actually use; the rest goes through `ChartRoot`'s `attributes`.\n */\n\n/** What every scale has, position or facet. */\ninterface ChartScalePropsBase {\n /** Axis label. `null` removes it. */\n label?: string | null;\n /** A tick count, an interval name, or explicit tick values. */\n ticks?: unknown;\n tickFormat?: unknown;\n tickSize?: number;\n tickRotate?: number;\n grid?: boolean;\n line?: boolean;\n domain?: readonly unknown[];\n reverse?: boolean;\n inset?: number;\n padding?: number;\n}\n\ninterface ChartAxisPropsBase extends ChartScalePropsBase {\n /** `\"linear\"`, `\"log\"`, `\"band\"`, `\"utc\"`… `null` disables the scale. */\n scale?: string | null;\n nice?: boolean | number;\n zero?: boolean;\n percent?: boolean;\n}\n\nexport interface ChartAxisXProps extends ChartAxisPropsBase {\n /** Which side the axis is drawn on; `null` hides it while keeping the scale. */\n anchor?: \"top\" | \"bottom\" | null;\n}\n\nexport interface ChartAxisYProps extends ChartAxisPropsBase {\n /** Which side the axis is drawn on; `null` hides it while keeping the scale. */\n anchor?: \"left\" | \"right\" | null;\n}\n\nexport interface ChartFacetXProps extends ChartScalePropsBase {\n /** Which side the facet axis is drawn on; `null` hides it while keeping the panels. */\n anchor?: \"top\" | \"bottom\" | null;\n}\n\nexport interface ChartFacetYProps extends ChartScalePropsBase {\n /** Which side the facet axis is drawn on; `null` hides it while keeping the panels. */\n anchor?: \"left\" | \"right\" | null;\n}\n\n/** prop → attribute suffix; `anchor` is the odd one out, it is the axis attribute itself. */\nconst SCALE_SUFFIX: Record<string, string> = {\n anchor: \"Axis\",\n label: \"Label\",\n ticks: \"Ticks\",\n tickFormat: \"TickFormat\",\n tickSize: \"TickSize\",\n tickRotate: \"TickRotate\",\n grid: \"Grid\",\n line: \"Line\",\n domain: \"Domain\",\n reverse: \"Reverse\",\n inset: \"Inset\",\n padding: \"Padding\",\n};\n\n/** The position scales carry four attributes the facet scales have no equivalent for. */\nconst AXIS_SUFFIX: Record<string, string> = {\n ...SCALE_SUFFIX,\n scale: \"Scale\",\n nice: \"Nice\",\n zero: \"Zero\",\n percent: \"Percent\",\n};\n\ntype ScaleProps = ChartScalePropsBase & { anchor?: string | null };\n\nfunction scale(displayName: string, prefix: string, suffixes: Record<string, string>): ChartDescriptor<ScaleProps> {\n return chartDescriptor(displayName, (props) => {\n const out: ChartAttributeDirective[] = [];\n for (const [prop, value] of Object.entries(props)) {\n const suffix = suffixes[prop];\n // `undefined` means \"unspecified\"; `null` is a real value (hide the axis, drop the label).\n if (suffix === undefined || value === undefined) continue;\n out.push({ kind: \"attribute\", name: `${prefix}${suffix}`, value });\n }\n return out;\n });\n}\n\nexport const ChartAxisX = scale(\"ChartAxisX\", \"x\", AXIS_SUFFIX) as ChartDescriptor<ChartAxisXProps>;\nexport const ChartAxisY = scale(\"ChartAxisY\", \"y\", AXIS_SUFFIX) as ChartDescriptor<ChartAxisYProps>;\n\n/**\n * Small multiples. Plot facets by the `fx` / `fy` channels of a mark — `<ChartBarY fx=\"region\" />`\n * splits the plot into one panel per region — and these two configure the resulting facet scale,\n * exactly as `ChartAxisX` / `ChartAxisY` configure the position scales. Panel spacing, cross-panel\n * grid and the shared facet label are plot-wide, so they live on `ChartRoot` instead.\n */\nexport const ChartFacetX = scale(\"ChartFacetX\", \"fx\", SCALE_SUFFIX) as ChartDescriptor<ChartFacetXProps>;\nexport const ChartFacetY = scale(\"ChartFacetY\", \"fy\", SCALE_SUFFIX) as ChartDescriptor<ChartFacetYProps>;\n"],"names":["SCALE_SUFFIX","AXIS_SUFFIX","scale","displayName","prefix","suffixes","chartDescriptor","props","out","prop","value","suffix","ChartAxisX","ChartAxisY","ChartFacetX","ChartFacetY"],"mappings":";AAwDA,MAAMA,IAAuC;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX,GAGMC,IAAsC;AAAA,EAC1C,GAAGD;AAAA,EACH,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX;AAIA,SAASE,EAAMC,GAAqBC,GAAgBC,GAA+D;AACjH,SAAOC,EAAgBH,GAAa,CAACI,MAAU;AAC7C,UAAMC,IAAiC,CAAA;AACvC,eAAW,CAACC,GAAMC,CAAK,KAAK,OAAO,QAAQH,CAAK,GAAG;AACjD,YAAMI,IAASN,EAASI,CAAI;AAE5B,MAAIE,MAAW,UAAaD,MAAU,UACtCF,EAAI,KAAK,EAAE,MAAM,aAAa,MAAM,GAAGJ,CAAM,GAAGO,CAAM,IAAI,OAAAD,EAAA,CAAO;AAAA,IACnE;AACA,WAAOF;AAAA,EACT,CAAC;AACH;AAEO,MAAMI,IAAaV,EAAM,cAAc,KAAKD,CAAW,GACjDY,IAAaX,EAAM,cAAc,KAAKD,CAAW,GAQjDa,IAAcZ,EAAM,eAAe,MAAMF,CAAY,GACrDe,IAAcb,EAAM,eAAe,MAAMF,CAAY;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
export interface ChartSeriesConfig {
|
|
3
|
+
/** Rendered by `ChartLegend` and used as the tooltip/legend name. Defaults to the key. */
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
/** `var(--chart-1)`, `--primary`, a hex or an `rgb()`. Tokens are resolved for the plot. */
|
|
6
|
+
color?: string;
|
|
7
|
+
/** An optional glyph for the legend row — the non-colour channel a swatch cannot carry alone. */
|
|
8
|
+
icon?: ComponentType<{
|
|
9
|
+
className?: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
/** Series key → presentation. Feeds the plot's colour scale, `ChartLegend` and the tooltip. */
|
|
13
|
+
export type ChartConfig = Record<string, ChartSeriesConfig>;
|
|
14
|
+
export interface ChartSeriesEntry {
|
|
15
|
+
key: string;
|
|
16
|
+
label: ReactNode;
|
|
17
|
+
color: string;
|
|
18
|
+
icon?: ComponentType<{
|
|
19
|
+
className?: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
/** A CSS custom property reference — the one colour form Observable Plot cannot parse. */
|
|
23
|
+
export declare function isColorToken(value: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Is this channel value a **colour**, or the name of a **column**?
|
|
26
|
+
*
|
|
27
|
+
* A different question from {@link isColorToken}, which asks only whether we have to resolve the
|
|
28
|
+
* value ourselves — and answering the second with the first was a bug: `fill="currentColor"` on a
|
|
29
|
+
* stacking mark was read as a series column, so the query grouped by a colour keyword and died with
|
|
30
|
+
* a binder error, silently, leaving the plot on its previous render.
|
|
31
|
+
*
|
|
32
|
+
* A column named exactly `red` would be read as a colour. That trade is deliberate: passing a
|
|
33
|
+
* colour is common, naming a column after one is not, and both mistakes are silent — so the tie
|
|
34
|
+
* goes to the frequent case.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isColorValue(value: string): boolean;
|
|
37
|
+
/** `var(--chart-1, red)` → `--chart-1`. */
|
|
38
|
+
export declare function colorTokenName(value: string): string;
|
|
39
|
+
/** The config in slot order; a series without a colour falls back to its scheme slot token. */
|
|
40
|
+
export declare function chartSeriesEntries(config: ChartConfig): ChartSeriesEntry[];
|
|
41
|
+
/** The colour a series wears — its own, or its scheme slot token. `undefined` if unknown. */
|
|
42
|
+
export declare function chartSeriesColor(config: ChartConfig, key: string): string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The plot's colour scale. Pinning the domain to the config keys is what keeps a hue bound to an
|
|
45
|
+
* entity: without it vgplot orders the domain by the data, so filtering out a series repaints the
|
|
46
|
+
* survivors. `null` when the config is empty — no scale attributes are emitted.
|
|
47
|
+
*/
|
|
48
|
+
export declare function chartColorScale(config: ChartConfig): {
|
|
49
|
+
domain: string[];
|
|
50
|
+
range: string[];
|
|
51
|
+
} | null;
|
|
52
|
+
//# sourceMappingURL=chart-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-config.d.ts","sourceRoot":"","sources":["../../src/charts/chart-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4FAA4F;IAC5F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iGAAiG;IACjG,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9C;AAED,+FAA+F;AAC/F,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9C;AAED,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEnD;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAMnD;AAED,2CAA2C;AAC3C,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,EAAE,CAO1E;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAIjG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { categoricalColor as o } from "../lib/token-color.js";
|
|
2
|
+
function t(r) {
|
|
3
|
+
return r.startsWith("var(--") || r.startsWith("--");
|
|
4
|
+
}
|
|
5
|
+
const n = /^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\(/, i = /^#[0-9a-f]{3,8}$/, s = new Set(
|
|
6
|
+
"aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen".split(" ")
|
|
7
|
+
);
|
|
8
|
+
function g(r) {
|
|
9
|
+
const e = r.toLowerCase().trim();
|
|
10
|
+
return e === "none" || e === "currentcolor" || e === "transparent" || t(e) || e.startsWith("url(") || i.test(e) || n.test(e) ? !0 : s.has(e);
|
|
11
|
+
}
|
|
12
|
+
function c(r) {
|
|
13
|
+
if (!r.startsWith("var(")) return r.trim();
|
|
14
|
+
const e = r.slice(4, r.lastIndexOf(")")), l = e.indexOf(",");
|
|
15
|
+
return (l === -1 ? e : e.slice(0, l)).trim();
|
|
16
|
+
}
|
|
17
|
+
function d(r) {
|
|
18
|
+
return Object.entries(r).map(([e, l], a) => ({
|
|
19
|
+
key: e,
|
|
20
|
+
label: l.label ?? e,
|
|
21
|
+
color: l.color ?? o(a),
|
|
22
|
+
icon: l.icon
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
function h(r, e) {
|
|
26
|
+
var a;
|
|
27
|
+
const l = Object.keys(r).indexOf(e);
|
|
28
|
+
if (l !== -1)
|
|
29
|
+
return ((a = r[e]) == null ? void 0 : a.color) ?? o(l);
|
|
30
|
+
}
|
|
31
|
+
function m(r) {
|
|
32
|
+
const e = d(r);
|
|
33
|
+
return e.length === 0 ? null : { domain: e.map((l) => l.key), range: e.map((l) => l.color) };
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
m as chartColorScale,
|
|
37
|
+
h as chartSeriesColor,
|
|
38
|
+
d as chartSeriesEntries,
|
|
39
|
+
c as colorTokenName,
|
|
40
|
+
t as isColorToken,
|
|
41
|
+
g as isColorValue
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=chart-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-config.js","sources":["../../src/charts/chart-config.ts"],"sourcesContent":["import type { ComponentType, ReactNode } from \"react\";\nimport { categoricalColor } from \"../lib/token-color.js\";\n\nexport interface ChartSeriesConfig {\n /** Rendered by `ChartLegend` and used as the tooltip/legend name. Defaults to the key. */\n label?: ReactNode;\n /** `var(--chart-1)`, `--primary`, a hex or an `rgb()`. Tokens are resolved for the plot. */\n color?: string;\n /** An optional glyph for the legend row — the non-colour channel a swatch cannot carry alone. */\n icon?: ComponentType<{ className?: string }>;\n}\n\n/** Series key → presentation. Feeds the plot's colour scale, `ChartLegend` and the tooltip. */\nexport type ChartConfig = Record<string, ChartSeriesConfig>;\n\nexport interface ChartSeriesEntry {\n key: string;\n label: ReactNode;\n color: string;\n icon?: ComponentType<{ className?: string }>;\n}\n\n/** A CSS custom property reference — the one colour form Observable Plot cannot parse. */\nexport function isColorToken(value: string): boolean {\n return value.startsWith(\"var(--\") || value.startsWith(\"--\");\n}\n\nconst COLOR_FUNCTION = /^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\\(/;\nconst HEX = /^#[0-9a-f]{3,8}$/;\n\n/**\n * The CSS named colours, so the answer below does not depend on a DOM. Asking `CSS.supports` would\n * be shorter and is what Plot does, but jsdom ships `CSS` without `supports` — the test suite would\n * then disagree with the browser about `fill=\"red\"`, which is worse than carrying the list.\n */\nconst NAMED_COLORS = new Set(\n (\"aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen\").split(\" \"),\n);\n\n/**\n * Is this channel value a **colour**, or the name of a **column**?\n *\n * A different question from {@link isColorToken}, which asks only whether we have to resolve the\n * value ourselves — and answering the second with the first was a bug: `fill=\"currentColor\"` on a\n * stacking mark was read as a series column, so the query grouped by a colour keyword and died with\n * a binder error, silently, leaving the plot on its previous render.\n *\n * A column named exactly `red` would be read as a colour. That trade is deliberate: passing a\n * colour is common, naming a column after one is not, and both mistakes are silent — so the tie\n * goes to the frequent case.\n */\nexport function isColorValue(value: string): boolean {\n const v = value.toLowerCase().trim();\n if (v === \"none\" || v === \"currentcolor\" || v === \"transparent\") return true;\n if (isColorToken(v) || v.startsWith(\"url(\")) return true;\n if (HEX.test(v) || COLOR_FUNCTION.test(v)) return true;\n return NAMED_COLORS.has(v);\n}\n\n/** `var(--chart-1, red)` → `--chart-1`. */\nexport function colorTokenName(value: string): string {\n if (!value.startsWith(\"var(\")) return value.trim();\n const inner = value.slice(4, value.lastIndexOf(\")\"));\n const comma = inner.indexOf(\",\");\n return (comma === -1 ? inner : inner.slice(0, comma)).trim();\n}\n\n/** The config in slot order; a series without a colour falls back to its scheme slot token. */\nexport function chartSeriesEntries(config: ChartConfig): ChartSeriesEntry[] {\n return Object.entries(config).map(([key, series], i) => ({\n key,\n label: series.label ?? key,\n color: series.color ?? categoricalColor(i),\n icon: series.icon,\n }));\n}\n\n/** The colour a series wears — its own, or its scheme slot token. `undefined` if unknown. */\nexport function chartSeriesColor(config: ChartConfig, key: string): string | undefined {\n const index = Object.keys(config).indexOf(key);\n if (index === -1) return undefined;\n return config[key]?.color ?? categoricalColor(index);\n}\n\n/**\n * The plot's colour scale. Pinning the domain to the config keys is what keeps a hue bound to an\n * entity: without it vgplot orders the domain by the data, so filtering out a series repaints the\n * survivors. `null` when the config is empty — no scale attributes are emitted.\n */\nexport function chartColorScale(config: ChartConfig): { domain: string[]; range: string[] } | null {\n const entries = chartSeriesEntries(config);\n if (entries.length === 0) return null;\n return { domain: entries.map((e) => e.key), range: entries.map((e) => e.color) };\n}\n"],"names":["isColorToken","value","COLOR_FUNCTION","HEX","NAMED_COLORS","isColorValue","v","colorTokenName","inner","comma","chartSeriesEntries","config","key","series","i","categoricalColor","chartSeriesColor","index","_a","chartColorScale","entries","e"],"mappings":";AAuBO,SAASA,EAAaC,GAAwB;AACnD,SAAOA,EAAM,WAAW,QAAQ,KAAKA,EAAM,WAAW,IAAI;AAC5D;AAEA,MAAMC,IAAiB,yEACjBC,IAAM,oBAONC,IAAe,IAAI;AAAA,EACtB,g8CAAi8C,MAAM,GAAG;AAC78C;AAcO,SAASC,EAAaJ,GAAwB;AACnD,QAAMK,IAAIL,EAAM,YAAA,EAAc,KAAA;AAG9B,SAFIK,MAAM,UAAUA,MAAM,kBAAkBA,MAAM,iBAC9CN,EAAaM,CAAC,KAAKA,EAAE,WAAW,MAAM,KACtCH,EAAI,KAAKG,CAAC,KAAKJ,EAAe,KAAKI,CAAC,IAAU,KAC3CF,EAAa,IAAIE,CAAC;AAC3B;AAGO,SAASC,EAAeN,GAAuB;AACpD,MAAI,CAACA,EAAM,WAAW,MAAM,EAAG,QAAOA,EAAM,KAAA;AAC5C,QAAMO,IAAQP,EAAM,MAAM,GAAGA,EAAM,YAAY,GAAG,CAAC,GAC7CQ,IAAQD,EAAM,QAAQ,GAAG;AAC/B,UAAQC,MAAU,KAAKD,IAAQA,EAAM,MAAM,GAAGC,CAAK,GAAG,KAAA;AACxD;AAGO,SAASC,EAAmBC,GAAyC;AAC1E,SAAO,OAAO,QAAQA,CAAM,EAAE,IAAI,CAAC,CAACC,GAAKC,CAAM,GAAGC,OAAO;AAAA,IACvD,KAAAF;AAAA,IACA,OAAOC,EAAO,SAASD;AAAA,IACvB,OAAOC,EAAO,SAASE,EAAiBD,CAAC;AAAA,IACzC,MAAMD,EAAO;AAAA,EAAA,EACb;AACJ;AAGO,SAASG,EAAiBL,GAAqBC,GAAiC;;AACrF,QAAMK,IAAQ,OAAO,KAAKN,CAAM,EAAE,QAAQC,CAAG;AAC7C,MAAIK,MAAU;AACd,aAAOC,IAAAP,EAAOC,CAAG,MAAV,gBAAAM,EAAa,UAASH,EAAiBE,CAAK;AACrD;AAOO,SAASE,EAAgBR,GAAmE;AACjG,QAAMS,IAAUV,EAAmBC,CAAM;AACzC,SAAIS,EAAQ,WAAW,IAAU,OAC1B,EAAE,QAAQA,EAAQ,IAAI,CAACC,MAAMA,EAAE,GAAG,GAAG,OAAOD,EAAQ,IAAI,CAACC,MAAMA,EAAE,KAAK,EAAA;AAC/E;"}
|