snice 4.14.0 → 4.16.0
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/adapters/react/doc.d.ts +1 -0
- package/adapters/react/doc.d.ts.map +1 -1
- package/adapters/react/doc.js +1 -1
- package/adapters/react/doc.js.map +1 -1
- package/adapters/react/doc.tsx +2 -1
- package/adapters/react/input.d.ts +3 -0
- package/adapters/react/input.d.ts.map +1 -1
- package/adapters/react/input.js +1 -1
- package/adapters/react/input.js.map +1 -1
- package/adapters/react/input.tsx +4 -1
- package/adapters/react/modal.d.ts +2 -0
- package/adapters/react/modal.d.ts.map +1 -1
- package/adapters/react/modal.js +1 -1
- package/adapters/react/modal.js.map +1 -1
- package/adapters/react/modal.tsx +3 -1
- package/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/accordion/snice-accordion.min.js +1 -1
- package/dist/cdn/alert/snice-alert.js +1 -1
- package/dist/cdn/alert/snice-alert.min.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.min.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
- package/dist/cdn/avatar/snice-avatar.js +1 -1
- package/dist/cdn/avatar/snice-avatar.min.js +1 -1
- package/dist/cdn/badge/snice-badge.js +1 -1
- package/dist/cdn/badge/snice-badge.min.js +1 -1
- package/dist/cdn/banner/snice-banner.js +1 -1
- package/dist/cdn/banner/snice-banner.min.js +1 -1
- package/dist/cdn/book/README.md +2 -2
- package/dist/cdn/book/snice-book.js +29 -8
- package/dist/cdn/book/snice-book.js.map +1 -1
- package/dist/cdn/book/snice-book.min.js +3 -3
- package/dist/cdn/book/snice-book.min.js.map +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +1 -1
- package/dist/cdn/button/snice-button.js +1 -1
- package/dist/cdn/button/snice-button.min.js +1 -1
- package/dist/cdn/calendar/snice-calendar.js +1 -1
- package/dist/cdn/calendar/snice-calendar.min.js +1 -1
- package/dist/cdn/camera/snice-camera.js +1 -1
- package/dist/cdn/camera/snice-camera.min.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.min.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.min.js +1 -1
- package/dist/cdn/card/snice-card.js +1 -1
- package/dist/cdn/card/snice-card.min.js +1 -1
- package/dist/cdn/carousel/snice-carousel.js +1 -1
- package/dist/cdn/carousel/snice-carousel.min.js +1 -1
- package/dist/cdn/chart/snice-chart.js +1 -1
- package/dist/cdn/chart/snice-chart.min.js +1 -1
- package/dist/cdn/chat/snice-chat.js +1 -1
- package/dist/cdn/chat/snice-chat.min.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.min.js +1 -1
- package/dist/cdn/chip/snice-chip.js +1 -1
- package/dist/cdn/chip/snice-chip.min.js +1 -1
- package/dist/cdn/code-block/snice-code-block.js +4 -4
- package/dist/cdn/code-block/snice-code-block.js.map +1 -1
- package/dist/cdn/code-block/snice-code-block.min.js +2 -2
- package/dist/cdn/code-block/snice-code-block.min.js.map +1 -1
- package/dist/cdn/color-display/snice-color-display.js +1 -1
- package/dist/cdn/color-display/snice-color-display.min.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.min.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.min.js +1 -1
- package/dist/cdn/comments/snice-comments.js +1 -1
- package/dist/cdn/comments/snice-comments.min.js +1 -1
- package/dist/cdn/countdown/snice-countdown.js +1 -1
- package/dist/cdn/countdown/snice-countdown.min.js +1 -1
- package/dist/cdn/cropper/snice-cropper.js +1 -1
- package/dist/cdn/cropper/snice-cropper.min.js +1 -1
- package/dist/cdn/date-picker/README.md +1 -1
- package/dist/cdn/date-picker/snice-date-picker.js +49 -39
- package/dist/cdn/date-picker/snice-date-picker.js.map +1 -1
- package/dist/cdn/date-picker/snice-date-picker.min.js +4 -4
- package/dist/cdn/date-picker/snice-date-picker.min.js.map +1 -1
- package/dist/cdn/diff/snice-diff.js +1 -1
- package/dist/cdn/diff/snice-diff.min.js +1 -1
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/divider/snice-divider.min.js +1 -1
- package/dist/cdn/doc/README.md +2 -2
- package/dist/cdn/doc/snice-doc.js +221 -35
- package/dist/cdn/doc/snice-doc.js.map +1 -1
- package/dist/cdn/doc/snice-doc.min.js +2 -2
- package/dist/cdn/doc/snice-doc.min.js.map +1 -1
- package/dist/cdn/draw/snice-draw.js +1 -1
- package/dist/cdn/draw/snice-draw.min.js +1 -1
- package/dist/cdn/drawer/snice-drawer.js +1 -1
- package/dist/cdn/drawer/snice-drawer.min.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
- package/dist/cdn/flip-card/snice-flip-card.js +1 -1
- package/dist/cdn/flip-card/snice-flip-card.min.js +1 -1
- package/dist/cdn/flow/snice-flow.js +1 -1
- package/dist/cdn/flow/snice-flow.min.js +1 -1
- package/dist/cdn/funnel/snice-funnel.js +1 -1
- package/dist/cdn/funnel/snice-funnel.min.js +1 -1
- package/dist/cdn/gantt/snice-gantt.js +1 -1
- package/dist/cdn/gantt/snice-gantt.min.js +1 -1
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/gauge/snice-gauge.min.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.min.js +1 -1
- package/dist/cdn/image/snice-image.js +1 -1
- package/dist/cdn/image/snice-image.min.js +1 -1
- package/dist/cdn/input/README.md +2 -2
- package/dist/cdn/input/snice-input.js +21 -3
- package/dist/cdn/input/snice-input.js.map +1 -1
- package/dist/cdn/input/snice-input.min.js +3 -3
- package/dist/cdn/input/snice-input.min.js.map +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/kanban/snice-kanban.min.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js +1 -1
- package/dist/cdn/kpi/snice-kpi.min.js +1 -1
- package/dist/cdn/layout/snice-layout.js +1 -1
- package/dist/cdn/layout/snice-layout.min.js +1 -1
- package/dist/cdn/link/snice-link.js +1 -1
- package/dist/cdn/link/snice-link.min.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.js +2 -2
- package/dist/cdn/link-preview/snice-link-preview.js.map +1 -1
- package/dist/cdn/link-preview/snice-link-preview.min.js +2 -2
- package/dist/cdn/link-preview/snice-link-preview.min.js.map +1 -1
- package/dist/cdn/list/snice-list.js +4 -4
- package/dist/cdn/list/snice-list.js.map +1 -1
- package/dist/cdn/list/snice-list.min.js +2 -2
- package/dist/cdn/list/snice-list.min.js.map +1 -1
- package/dist/cdn/location/snice-location.js +1 -1
- package/dist/cdn/location/snice-location.min.js +1 -1
- package/dist/cdn/login/snice-login.js +1 -1
- package/dist/cdn/login/snice-login.min.js +1 -1
- package/dist/cdn/map/snice-map.js +1 -1
- package/dist/cdn/map/snice-map.min.js +1 -1
- package/dist/cdn/markdown/snice-markdown.js +1 -1
- package/dist/cdn/markdown/snice-markdown.min.js +1 -1
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/masonry/snice-masonry.min.js +1 -1
- package/dist/cdn/menu/snice-menu.js +2 -2
- package/dist/cdn/menu/snice-menu.js.map +1 -1
- package/dist/cdn/menu/snice-menu.min.js +2 -2
- package/dist/cdn/menu/snice-menu.min.js.map +1 -1
- package/dist/cdn/modal/README.md +2 -2
- package/dist/cdn/modal/snice-modal.js +34 -18
- package/dist/cdn/modal/snice-modal.js.map +1 -1
- package/dist/cdn/modal/snice-modal.min.js +24 -20
- package/dist/cdn/modal/snice-modal.min.js.map +1 -1
- package/dist/cdn/music-player/README.md +2 -2
- package/dist/cdn/music-player/snice-music-player.js +8 -1
- package/dist/cdn/music-player/snice-music-player.js.map +1 -1
- package/dist/cdn/music-player/snice-music-player.min.js +3 -3
- package/dist/cdn/music-player/snice-music-player.min.js.map +1 -1
- package/dist/cdn/nav/snice-nav.js +1 -1
- package/dist/cdn/nav/snice-nav.min.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.min.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.min.js +1 -1
- package/dist/cdn/org-chart/snice-org-chart.js +1 -1
- package/dist/cdn/org-chart/snice-org-chart.min.js +1 -1
- package/dist/cdn/pagination/snice-pagination.js +1 -1
- package/dist/cdn/pagination/snice-pagination.min.js +1 -1
- package/dist/cdn/paint/snice-paint.js +1 -1
- package/dist/cdn/paint/snice-paint.min.js +1 -1
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +1 -1
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +1 -1
- package/dist/cdn/podcast-player/snice-podcast-player.js +1 -1
- package/dist/cdn/podcast-player/snice-podcast-player.min.js +1 -1
- package/dist/cdn/pricing-table/snice-pricing-table.js +1 -1
- package/dist/cdn/pricing-table/snice-pricing-table.min.js +1 -1
- package/dist/cdn/progress/snice-progress.js +1 -1
- package/dist/cdn/progress/snice-progress.min.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.min.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.min.js +1 -1
- package/dist/cdn/radio/README.md +2 -2
- package/dist/cdn/radio/snice-radio.js +23 -3
- package/dist/cdn/radio/snice-radio.js.map +1 -1
- package/dist/cdn/radio/snice-radio.min.js +3 -3
- package/dist/cdn/radio/snice-radio.min.js.map +1 -1
- package/dist/cdn/rating/snice-rating.js +1 -1
- package/dist/cdn/rating/snice-rating.min.js +1 -1
- package/dist/cdn/recipe/snice-recipe.js +1 -1
- package/dist/cdn/recipe/snice-recipe.min.js +1 -1
- package/dist/cdn/runtime/README.md +2 -2
- package/dist/cdn/runtime/snice-runtime.esm.js +513 -46
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +6 -6
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +6420 -5951
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +18 -18
- package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
- package/dist/cdn/sankey/snice-sankey.js +1 -1
- package/dist/cdn/sankey/snice-sankey.min.js +1 -1
- package/dist/cdn/select/README.md +2 -2
- package/dist/cdn/select/snice-select.js +46 -92
- package/dist/cdn/select/snice-select.js.map +1 -1
- package/dist/cdn/select/snice-select.min.js +5 -13
- package/dist/cdn/select/snice-select.min.js.map +1 -1
- package/dist/cdn/skeleton/snice-skeleton.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.min.js +1 -1
- package/dist/cdn/slider/snice-slider.js +1 -1
- package/dist/cdn/slider/snice-slider.min.js +1 -1
- package/dist/cdn/sortable/snice-sortable.js +1 -1
- package/dist/cdn/sortable/snice-sortable.min.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
- package/dist/cdn/spinner/snice-spinner.js +1 -1
- package/dist/cdn/spinner/snice-spinner.min.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.min.js +1 -1
- package/dist/cdn/spreadsheet/snice-spreadsheet.js +1 -1
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +1 -1
- package/dist/cdn/stepper/snice-stepper.js +1 -1
- package/dist/cdn/stepper/snice-stepper.min.js +1 -1
- package/dist/cdn/switch/README.md +1 -1
- package/dist/cdn/switch/snice-switch.js +33 -23
- package/dist/cdn/switch/snice-switch.js.map +1 -1
- package/dist/cdn/switch/snice-switch.min.js +3 -3
- package/dist/cdn/switch/snice-switch.min.js.map +1 -1
- package/dist/cdn/table/README.md +2 -2
- package/dist/cdn/table/snice-table.js +2876 -111
- package/dist/cdn/table/snice-table.js.map +1 -1
- package/dist/cdn/table/snice-table.min.js +187 -47
- package/dist/cdn/table/snice-table.min.js.map +1 -1
- package/dist/cdn/tabs/snice-tabs.js +1 -1
- package/dist/cdn/tabs/snice-tabs.min.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.min.js +1 -1
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.min.js +1 -1
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/textarea/snice-textarea.min.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.min.js +1 -1
- package/dist/cdn/timeline/snice-timeline.js +1 -1
- package/dist/cdn/timeline/snice-timeline.min.js +1 -1
- package/dist/cdn/timer/snice-timer.js +1 -1
- package/dist/cdn/timer/snice-timer.min.js +1 -1
- package/dist/cdn/toast/README.md +1 -1
- package/dist/cdn/toast/snice-toast.js +3 -3
- package/dist/cdn/toast/snice-toast.js.map +1 -1
- package/dist/cdn/toast/snice-toast.min.js +2 -2
- package/dist/cdn/toast/snice-toast.min.js.map +1 -1
- package/dist/cdn/tooltip/snice-tooltip.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
- package/dist/cdn/tree/snice-tree.js +1 -1
- package/dist/cdn/tree/snice-tree.min.js +1 -1
- package/dist/cdn/treemap/snice-treemap.js +1 -1
- package/dist/cdn/treemap/snice-treemap.min.js +1 -1
- package/dist/cdn/video-player/snice-video-player.js +1 -1
- package/dist/cdn/video-player/snice-video-player.min.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +1 -1
- package/dist/cdn/waterfall/snice-waterfall.js +1 -1
- package/dist/cdn/waterfall/snice-waterfall.min.js +1 -1
- package/dist/cdn/weather/snice-weather.js +1 -1
- package/dist/cdn/weather/snice-weather.min.js +1 -1
- package/dist/components/book/snice-book.d.ts +2 -0
- package/dist/components/book/snice-book.js +28 -7
- package/dist/components/book/snice-book.js.map +1 -1
- package/dist/components/book/snice-book.types.d.ts +7 -0
- package/dist/components/code-block/snice-code-block.js +3 -3
- package/dist/components/code-block/snice-code-block.js.map +1 -1
- package/dist/components/code-block/snice-code-block.types.d.ts +3 -3
- package/dist/components/date-picker/snice-date-picker.d.ts +2 -0
- package/dist/components/date-picker/snice-date-picker.js +49 -39
- package/dist/components/date-picker/snice-date-picker.js.map +1 -1
- package/dist/components/doc/snice-doc.d.ts +20 -0
- package/dist/components/doc/snice-doc.js +220 -34
- package/dist/components/doc/snice-doc.js.map +1 -1
- package/dist/components/input/snice-input.d.ts +3 -0
- package/dist/components/input/snice-input.js +20 -2
- package/dist/components/input/snice-input.js.map +1 -1
- package/dist/components/input/snice-input.types.d.ts +3 -0
- package/dist/components/link-preview/snice-link-preview.js +1 -1
- package/dist/components/link-preview/snice-link-preview.js.map +1 -1
- package/dist/components/list/snice-list.js +3 -3
- package/dist/components/list/snice-list.js.map +1 -1
- package/dist/components/menu/snice-menu.js +1 -1
- package/dist/components/menu/snice-menu.js.map +1 -1
- package/dist/components/modal/snice-modal.d.ts +2 -0
- package/dist/components/modal/snice-modal.js +33 -17
- package/dist/components/modal/snice-modal.js.map +1 -1
- package/dist/components/modal/snice-modal.types.d.ts +2 -0
- package/dist/components/music-player/snice-music-player.d.ts +1 -0
- package/dist/components/music-player/snice-music-player.js +7 -0
- package/dist/components/music-player/snice-music-player.js.map +1 -1
- package/dist/components/notification-center/snice-notification-center.d.ts +1 -1
- package/dist/components/notification-center/snice-notification-center.js.map +1 -1
- package/dist/components/notification-center/snice-notification-center.types.d.ts +1 -0
- package/dist/components/radio/snice-radio.d.ts +1 -0
- package/dist/components/radio/snice-radio.js +22 -2
- package/dist/components/radio/snice-radio.js.map +1 -1
- package/dist/components/select/snice-select.d.ts +2 -4
- package/dist/components/select/snice-select.js +46 -92
- package/dist/components/select/snice-select.js.map +1 -1
- package/dist/components/switch/snice-switch.d.ts +2 -0
- package/dist/components/switch/snice-switch.js +32 -22
- package/dist/components/switch/snice-switch.js.map +1 -1
- package/dist/components/table/snice-table.d.ts +2 -0
- package/dist/components/table/snice-table.js +17 -3
- package/dist/components/table/snice-table.js.map +1 -1
- package/dist/components/toast/snice-toast-container.js +2 -2
- package/dist/components/toast/snice-toast-container.js.map +1 -1
- package/dist/index.cjs +512 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +511 -44
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +512 -43
- package/dist/index.iife.js.map +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/tooltip-observer.d.ts +11 -0
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/DEVELOPMENT.md +1 -1
- package/docs/ai/api.md +14 -10
- package/docs/ai/architecture.md +18 -5
- package/docs/ai/components/app-tiles.md +1 -1
- package/docs/ai/components/book.md +5 -6
- package/docs/ai/components/camera-annotate.md +3 -3
- package/docs/ai/components/candlestick.md +3 -3
- package/docs/ai/components/chart.md +1 -1
- package/docs/ai/components/code-block.md +3 -3
- package/docs/ai/components/doc.md +26 -15
- package/docs/ai/components/file-gallery.md +1 -1
- package/docs/ai/components/input.md +10 -0
- package/docs/ai/components/link-preview.md +1 -1
- package/docs/ai/components/list.md +2 -2
- package/docs/ai/components/markdown.md +13 -6
- package/docs/ai/components/modal.md +2 -0
- package/docs/ai/components/music-player.md +3 -2
- package/docs/ai/components/network-graph.md +5 -5
- package/docs/ai/components/notification-center.md +1 -0
- package/docs/ai/components/pdf-viewer.md +1 -1
- package/docs/ai/components/radio.md +2 -2
- package/docs/ai/components/sankey.md +3 -3
- package/docs/ai/components/select.md +1 -1
- package/docs/ai/components/tooltip.md +54 -0
- package/docs/ai/decorators.md +4 -4
- package/docs/code-block.md +4 -4
- package/docs/components/app-tiles.md +1 -1
- package/docs/components/book.md +3 -4
- package/docs/components/button.md +2 -2
- package/docs/components/camera-annotate.md +6 -6
- package/docs/components/candlestick.md +6 -6
- package/docs/components/chart.md +4 -6
- package/docs/components/checkbox.md +3 -3
- package/docs/components/chip.md +4 -4
- package/docs/components/code-block.md +4 -3
- package/docs/components/doc.md +99 -58
- package/docs/components/file-gallery.md +25 -3
- package/docs/components/input.md +20 -0
- package/docs/components/kpi.md +2 -3
- package/docs/components/link-preview.md +2 -2
- package/docs/components/list.md +3 -3
- package/docs/components/markdown.md +14 -36
- package/docs/components/modal.md +2 -0
- package/docs/components/music-player.md +3 -2
- package/docs/components/network-graph.md +7 -7
- package/docs/components/notification-center.md +1 -0
- package/docs/components/pdf-viewer.md +1 -1
- package/docs/components/sankey.md +6 -6
- package/docs/components/switch.md +1 -1
- package/docs/components/table.md +2 -2
- package/docs/components/tooltip.md +133 -0
- package/docs/controllers.md +3 -14
- package/docs/elements.md +0 -1
- package/docs/events.md +3 -0
- package/docs/request-response.md +2 -0
- package/package.json +1 -1
package/dist/symbols.cjs
CHANGED
package/dist/symbols.esm.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initialize attribute-based tooltips.
|
|
3
|
+
* Any element with a `tooltip` attribute will show a tooltip on interaction.
|
|
4
|
+
* Configure via CSS custom properties (--tooltip-position, --tooltip-delay, etc.).
|
|
5
|
+
* Idempotent — safe to call multiple times.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useTooltips(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Disconnect the tooltip observer and remove all portals.
|
|
10
|
+
*/
|
|
11
|
+
export declare function cleanupTooltips(): void;
|
package/dist/transitions.cjs
CHANGED
package/dist/transitions.esm.js
CHANGED
package/docs/ai/DEVELOPMENT.md
CHANGED
|
@@ -89,7 +89,7 @@ All CDN builds use the shared runtime (external `snice` imports). Load `snice-ru
|
|
|
89
89
|
- IIFE: `.js` + `.min.js`
|
|
90
90
|
- Sourcemaps + README
|
|
91
91
|
|
|
92
|
-
**Size:** Runtime ~
|
|
92
|
+
**Size:** Runtime ~20KB gzip, components ~1-93KB each
|
|
93
93
|
|
|
94
94
|
**Features:**
|
|
95
95
|
- Shared runtime (external snice imports)
|
package/docs/ai/api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Class Decorators
|
|
4
4
|
|
|
5
5
|
```typescript
|
|
6
|
-
@element('tag-name') // Define custom element
|
|
6
|
+
@element('tag-name', options?: { formAssociated?: boolean }) // Define custom element
|
|
7
7
|
@page({ tag, routes, guards?, placard? }) // Define routable page
|
|
8
8
|
@controller('name') // Define behavior module
|
|
9
9
|
@layout('name') // Define page wrapper
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
@styles()
|
|
31
31
|
// Returns: CSSResult from css`...`
|
|
32
32
|
// Scoped to shadow DOM
|
|
33
|
+
// Called once during initialization — NOT reactive
|
|
34
|
+
// Only one per element (last wins if multiple declared)
|
|
35
|
+
// For dynamic styles, use CSS custom properties set in template
|
|
33
36
|
```
|
|
34
37
|
|
|
35
38
|
## Properties
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
## Lifecycle
|
|
47
50
|
|
|
48
51
|
```typescript
|
|
49
|
-
@ready() // After
|
|
52
|
+
@ready() // After styles + event handlers set up (render is async microtask, may not be complete)
|
|
50
53
|
@dispose() // On disconnectedCallback
|
|
51
54
|
@moved() // On adoptedCallback
|
|
52
55
|
@adopted() // On adoptedCallback
|
|
@@ -55,8 +58,9 @@
|
|
|
55
58
|
## DOM Queries
|
|
56
59
|
|
|
57
60
|
```typescript
|
|
58
|
-
@query(selector: string) // Single element
|
|
59
|
-
@queryAll(selector: string) // NodeListOf<Element>
|
|
61
|
+
@query(selector: string, options?: { light?: boolean }) // Single element
|
|
62
|
+
@queryAll(selector: string, options?: { light?: boolean }) // NodeListOf<Element>
|
|
63
|
+
// Default: queries shadow DOM. Use { light: true } in controllers on native elements
|
|
60
64
|
```
|
|
61
65
|
|
|
62
66
|
## Events
|
|
@@ -80,8 +84,10 @@ html`
|
|
|
80
84
|
// Keyboard: 'keydown:Enter', 'keydown.escape', 'keydown:ctrl+s', 'keydown:~Space'
|
|
81
85
|
// Supports both ':' and '.' notation
|
|
82
86
|
|
|
83
|
-
@dispatch(eventName: string)
|
|
87
|
+
@dispatch(eventName: string, options?: { debounce?, throttle?, dispatchOnUndefined? })
|
|
84
88
|
// Fires CustomEvent after method, detail = return value
|
|
89
|
+
// Supports async methods (dispatches after promise resolves)
|
|
90
|
+
// dispatchOnUndefined: false (default) — skips dispatch if method returns undefined
|
|
85
91
|
```
|
|
86
92
|
|
|
87
93
|
## Communication
|
|
@@ -252,7 +258,7 @@ attr="${val}" // Attribute
|
|
|
252
258
|
interface TemplateResult { readonly _$litType$: number; }
|
|
253
259
|
interface CSSResult { cssText: string; }
|
|
254
260
|
interface OnOptions { debounce?, throttle?, preventDefault?, stopPropagation?, once?, capture?, passive?, target? }
|
|
255
|
-
interface RenderOptions { debounce?, throttle?, once?, sync? }
|
|
261
|
+
interface RenderOptions { debounce?, throttle?, once?, sync?, differential? }
|
|
256
262
|
interface Layout { update(context, placards, route, params) }
|
|
257
263
|
interface Placard { name, title, icon?, description?, order?, show?, visibleOn?, parent?, group?, searchTerms?, hotkeys?, breadcrumbs?, tooltip? }
|
|
258
264
|
// Guards: synchronous only, receive context AND params
|
|
@@ -265,7 +271,7 @@ type Guard<T> = (context: T, params: RouteParams) => boolean
|
|
|
265
271
|
|
|
266
272
|
```typescript
|
|
267
273
|
import {
|
|
268
|
-
element,
|
|
274
|
+
element, controller, layout, // NOTE: `page` comes from Router(), not from 'snice'
|
|
269
275
|
property, watch, context,
|
|
270
276
|
render, styles, html, css,
|
|
271
277
|
query, queryAll,
|
|
@@ -275,8 +281,6 @@ import {
|
|
|
275
281
|
ready, dispose, moved, adopted,
|
|
276
282
|
Router,
|
|
277
283
|
debounce, throttle, once, memoize,
|
|
278
|
-
useNativeElementControllers
|
|
279
|
-
cleanupNativeElementControllers,
|
|
280
|
-
attachController, detachController, getController
|
|
284
|
+
useNativeElementControllers // Enable controller= on native HTML elements
|
|
281
285
|
} from 'snice';
|
|
282
286
|
```
|
package/docs/ai/architecture.md
CHANGED
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
**Separation of concerns:**
|
|
6
6
|
- **Cross-cutting:** Router + global context
|
|
7
7
|
- **Pages:** Orchestrate elements, handle URLs
|
|
8
|
-
- **Elements:**
|
|
9
|
-
- **Controllers:**
|
|
8
|
+
- **Elements:** Generic visual building blocks — no fetch(), no API calls, no business logic
|
|
9
|
+
- **Controllers:** Specific behavior (data, APIs, business rules) — swappable per element
|
|
10
|
+
|
|
11
|
+
**Generic vs Specific:** Elements say *what* they need, controllers decide *how*.
|
|
12
|
+
Swap controllers to change behavior without touching the component.
|
|
13
|
+
Mock controller for tests, real API controller in production — same element.
|
|
10
14
|
|
|
11
15
|
**Data flow:**
|
|
12
16
|
- Down: Properties
|
|
@@ -125,9 +129,18 @@ onChange() { return { value: this.value }; }
|
|
|
125
129
|
|
|
126
130
|
**Element ↔ Controller:** Request/Response
|
|
127
131
|
```typescript
|
|
128
|
-
// Element requests,
|
|
129
|
-
@request('
|
|
130
|
-
|
|
132
|
+
// Element requests (async generator: yield sends, await receives)
|
|
133
|
+
@request('fetch-data')
|
|
134
|
+
async *fetchData(): any {
|
|
135
|
+
return await (yield { id: this.dataId }); // single yield per call
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Controller responds (receives payload, returns result directly)
|
|
139
|
+
@respond('fetch-data')
|
|
140
|
+
async handleFetch(payload: { id: string }) {
|
|
141
|
+
return await fetch(`/api/${payload.id}`).then(r => r.json());
|
|
142
|
+
}
|
|
143
|
+
// Wiring: <my-element controller="my-controller"></my-element>
|
|
131
144
|
```
|
|
132
145
|
|
|
133
146
|
**Global State:** Context
|
|
@@ -9,7 +9,7 @@ App launcher grid like Google's app drawer or a phone home screen.
|
|
|
9
9
|
tiles: AppTile[] = []; // Programmatic tile data
|
|
10
10
|
columns: number = 4; // Grid columns
|
|
11
11
|
size: 'sm' | 'md' | 'lg' = 'md'; // Tile size
|
|
12
|
-
variant: 'grid' | 'list' = 'grid'; // Layout variant
|
|
12
|
+
variant: 'grid' | 'list' | 'compact' = 'grid'; // Layout variant
|
|
13
13
|
|
|
14
14
|
// AppTile interface
|
|
15
15
|
interface AppTile {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# snice-book
|
|
2
2
|
|
|
3
|
-
Page-flipping book component with
|
|
3
|
+
Page-flipping book component with cover page, keyboard navigation, and animated page turns.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
currentPage: number = 0 // attr: current-page
|
|
9
|
-
mode: BookMode = 'spread' // attr: mode — 'single' | 'spread'
|
|
10
9
|
coverImage: string = '' // attr: cover-image — URL for cover page image
|
|
11
10
|
title: string = '' // Book title shown on cover
|
|
12
11
|
author: string = '' // Author name shown on cover
|
|
@@ -25,9 +24,9 @@ readonly totalPages: number // Getter, count of slotted page elements
|
|
|
25
24
|
|
|
26
25
|
## Methods
|
|
27
26
|
|
|
28
|
-
- `goToPage(page: number): void` — Navigate to specific page
|
|
29
|
-
- `nextPage(): void` — Advance by 1
|
|
30
|
-
- `prevPage(): void` — Go back by 1
|
|
27
|
+
- `goToPage(page: number): void` — Navigate to specific page
|
|
28
|
+
- `nextPage(): void` — Advance by 1 page
|
|
29
|
+
- `prevPage(): void` — Go back by 1 page
|
|
31
30
|
- `firstPage(): void` — Jump to page 0
|
|
32
31
|
- `lastPage(): void` — Jump to last page
|
|
33
32
|
|
|
@@ -63,7 +62,7 @@ readonly totalPages: number // Getter, count of slotted page elements
|
|
|
63
62
|
## Usage
|
|
64
63
|
|
|
65
64
|
```html
|
|
66
|
-
<snice-book title="My Book" author="Jane Doe" cover-image="/cover.jpg"
|
|
65
|
+
<snice-book title="My Book" author="Jane Doe" cover-image="/cover.jpg">
|
|
67
66
|
<div>Page 1 content</div>
|
|
68
67
|
<div>Page 2 content</div>
|
|
69
68
|
<div>Page 3 content</div>
|
|
@@ -23,9 +23,9 @@ clearAnnotations(): void;
|
|
|
23
23
|
## Events
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
26
|
+
'capture' → { dataURL: string; width: number; height: number }
|
|
27
|
+
'annotate' → { annotation: Annotation }
|
|
28
|
+
'annotation-change' → { annotations: Annotation[] }
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Types
|
|
@@ -40,9 +40,9 @@ zoomTo(startIndex: number, endIndex: number): void; // Zoom to range
|
|
|
40
40
|
## Events
|
|
41
41
|
|
|
42
42
|
```typescript
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
43
|
+
'candle-click': { candle: CandleData; index: number }
|
|
44
|
+
'candle-hover': { candle: CandleData; index: number }
|
|
45
|
+
'crosshair-move': { price: number; date: string; x: number; y: number }
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
## Usage
|
|
@@ -65,7 +65,7 @@ update(datasets: ChartDataset[]): void
|
|
|
65
65
|
addDataset(dataset: ChartDataset): void
|
|
66
66
|
removeDataset(index: number): void
|
|
67
67
|
toggleDataset(index: number): void
|
|
68
|
-
exportImage(format?: '
|
|
68
|
+
exportImage(format?: 'svg'): string
|
|
69
69
|
getData(): { datasets: ChartDataset[]; labels: string[] }
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -90,9 +90,9 @@ interface GrammarRequestDetail {
|
|
|
90
90
|
|
|
91
91
|
## Events
|
|
92
92
|
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
93
|
+
- `code-copy` (detail: { code, codeBlock })
|
|
94
|
+
- `code-before-highlight` (detail: { code, language, codeBlock })
|
|
95
|
+
- `code-after-highlight` (detail: { code, language, codeBlock })
|
|
96
96
|
- `grammar-request` (detail: { url, language, codeBlock }) — only dispatched when `fetch-mode="event"`
|
|
97
97
|
|
|
98
98
|
## Grammar System
|
|
@@ -6,17 +6,23 @@ Simple WYSIWYG document editor with toolbar and sidebar.
|
|
|
6
6
|
|
|
7
7
|
```html
|
|
8
8
|
<snice-doc></snice-doc>
|
|
9
|
+
<snice-doc icons="material"></snice-doc>
|
|
10
|
+
<snice-doc icons="fontawesome"></snice-doc>
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
## Properties
|
|
12
14
|
|
|
13
15
|
- `placeholder: string` - Placeholder text (default: `"Start typing..."`)
|
|
14
16
|
- `readonly: boolean` - Readonly mode (default: `false`)
|
|
17
|
+
- `icons: 'default' | 'material' | 'fontawesome'` - Toolbar icon set (default: `"default"`)
|
|
15
18
|
|
|
16
19
|
## Methods
|
|
17
20
|
|
|
18
21
|
- `getHTML(): string` - Get HTML content
|
|
19
22
|
- `setHTML(html: string): void` - Set HTML content
|
|
23
|
+
- `getText(): string` - Get plain text content
|
|
24
|
+
- `getMarkdown(): string` - Get content as markdown
|
|
25
|
+
- `downloadAs(format: 'html' | 'markdown' | 'text', filename?: string): void` - Download document
|
|
20
26
|
- `clear(): void` - Clear all content
|
|
21
27
|
|
|
22
28
|
## Toolbar
|
|
@@ -26,12 +32,16 @@ Simple WYSIWYG document editor with toolbar and sidebar.
|
|
|
26
32
|
- **•, 1.** - Bulleted and numbered lists
|
|
27
33
|
- **🔗** - Insert link
|
|
28
34
|
- **🖼** - Insert image
|
|
35
|
+
- **📊** - Insert table
|
|
36
|
+
- **―** - Insert divider
|
|
37
|
+
- **⬇** - Download (HTML, Markdown, or Plain Text)
|
|
29
38
|
|
|
30
|
-
##
|
|
39
|
+
## Icon Sets
|
|
31
40
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
41
|
+
- `default` - Text labels and emoji icons
|
|
42
|
+
- `material` - Material Symbols Outlined (user must load the font in the document)
|
|
43
|
+
- `fontawesome` - Font Awesome 6 solid icons (user must load the font in the document)
|
|
44
|
+
- Fonts cascade from light DOM into shadow DOM — no auto-loading
|
|
35
45
|
|
|
36
46
|
## Keyboard Shortcuts
|
|
37
47
|
|
|
@@ -64,26 +74,27 @@ const doc = document.querySelector('snice-doc');
|
|
|
64
74
|
doc.setHTML(`
|
|
65
75
|
<h1>Title</h1>
|
|
66
76
|
<p>Content with <b>bold</b> and <i>italic</i>.</p>
|
|
67
|
-
<ul>
|
|
68
|
-
<li>Item 1</li>
|
|
69
|
-
<li>Item 2</li>
|
|
70
|
-
</ul>
|
|
71
77
|
`);
|
|
72
78
|
|
|
73
|
-
//
|
|
79
|
+
// Export formats
|
|
74
80
|
const html = doc.getHTML();
|
|
81
|
+
const markdown = doc.getMarkdown();
|
|
82
|
+
const text = doc.getText();
|
|
75
83
|
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
doc.
|
|
84
|
+
// Download
|
|
85
|
+
doc.downloadAs('markdown', 'my-doc.md');
|
|
86
|
+
doc.downloadAs('html');
|
|
87
|
+
doc.downloadAs('text');
|
|
79
88
|
```
|
|
80
89
|
|
|
81
90
|
## Features
|
|
82
91
|
|
|
83
92
|
- WYSIWYG contentEditable editing
|
|
84
|
-
- Formatting toolbar
|
|
85
|
-
- Insert images, tables, dividers
|
|
86
|
-
-
|
|
93
|
+
- Formatting toolbar with configurable icon sets
|
|
94
|
+
- Insert images, tables, dividers, links
|
|
95
|
+
- Download as HTML, Markdown, or Plain Text
|
|
87
96
|
- Paste images from clipboard
|
|
88
97
|
- Keyboard shortcuts
|
|
89
98
|
- Readonly mode
|
|
99
|
+
- Dark mode (prefers-color-scheme)
|
|
100
|
+
- Material Icons and Font Awesome support
|
|
@@ -134,6 +134,6 @@ Uses `@request/@respond` pattern (`file-gallery-upload`). Handler receives `Uplo
|
|
|
134
134
|
<!-- Events -->
|
|
135
135
|
<script>
|
|
136
136
|
gallery.addEventListener('files-change', (e) => console.log(e.detail.files));
|
|
137
|
-
gallery.addEventListener('upload-complete', (e) => console.log(e.detail.
|
|
137
|
+
gallery.addEventListener('upload-complete', (e) => console.log(e.detail.response));
|
|
138
138
|
</script>
|
|
139
139
|
```
|
|
@@ -30,6 +30,8 @@ maxlength: number = -1;
|
|
|
30
30
|
pattern: string = '';
|
|
31
31
|
autocomplete: string = '';
|
|
32
32
|
name: string = '';
|
|
33
|
+
align: 'top'|'center'|'bottom'|'' = ''; // vertical alignment when host has explicit height
|
|
34
|
+
stretch: boolean = false; // input fills full host height
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
## Slots
|
|
@@ -119,6 +121,14 @@ inp.addEventListener('input-change', (e) => console.log('Change:', e.detail.valu
|
|
|
119
121
|
<span slot="prefix-icon" class="material-symbols-outlined">search</span>
|
|
120
122
|
<span slot="suffix-icon" class="material-symbols-outlined">person</span>
|
|
121
123
|
</snice-input>
|
|
124
|
+
|
|
125
|
+
<!-- Vertical alignment (when host has explicit height) -->
|
|
126
|
+
<snice-input style="height:200px" align="top"></snice-input>
|
|
127
|
+
<snice-input style="height:200px" align="center"></snice-input>
|
|
128
|
+
<snice-input style="height:200px" align="bottom"></snice-input>
|
|
129
|
+
|
|
130
|
+
<!-- Stretch input to fill height -->
|
|
131
|
+
<snice-input style="height:200px" stretch></snice-input>
|
|
122
132
|
```
|
|
123
133
|
|
|
124
134
|
## Features
|
|
@@ -38,8 +38,8 @@ disabled: boolean = false;
|
|
|
38
38
|
|
|
39
39
|
## Requests
|
|
40
40
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
41
|
+
- `list/search` → `{ query, list }` - Handle search
|
|
42
|
+
- `list/load-more` → `{ page, list }` - Infinite scroll
|
|
43
43
|
|
|
44
44
|
## Usage
|
|
45
45
|
|
|
@@ -5,11 +5,18 @@ Lightweight GFM-compatible markdown renderer with built-in sanitization.
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
|
-
content: string // Markdown source text
|
|
9
8
|
sanitize: boolean // Sanitize HTML output (default: true)
|
|
10
9
|
theme: 'default' | 'github' // Visual theme
|
|
11
10
|
```
|
|
12
11
|
|
|
12
|
+
## Methods
|
|
13
|
+
|
|
14
|
+
- `setContent(markdown: string)` — Set markdown source programmatically
|
|
15
|
+
|
|
16
|
+
## Input
|
|
17
|
+
|
|
18
|
+
Content via slotted text or `setContent()`. No `content` attribute/property.
|
|
19
|
+
|
|
13
20
|
## Events
|
|
14
21
|
|
|
15
22
|
- `markdown-render` -> `{ html: string }` -- Fired after markdown is rendered
|
|
@@ -47,15 +54,15 @@ theme: 'default' | 'github' // Visual theme
|
|
|
47
54
|
## Usage
|
|
48
55
|
|
|
49
56
|
```html
|
|
50
|
-
<snice-markdown
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
<snice-markdown># Hello
|
|
58
|
+
|
|
59
|
+
This is **bold** and *italic*.
|
|
60
|
+
</snice-markdown>
|
|
54
61
|
```
|
|
55
62
|
|
|
56
63
|
```js
|
|
57
64
|
const md = document.querySelector('snice-markdown');
|
|
58
|
-
md.
|
|
65
|
+
md.setContent('## Dynamic Content\n\n- Item 1\n- Item 2');
|
|
59
66
|
|
|
60
67
|
md.addEventListener('link-click', (e) => {
|
|
61
68
|
console.log('Navigating to:', e.detail.href);
|
|
@@ -11,6 +11,8 @@ noBackdropDismiss: boolean = false; // attr: no-backdrop-dismiss
|
|
|
11
11
|
noEscapeDismiss: boolean = false; // attr: no-escape-dismiss
|
|
12
12
|
noFocusTrap: boolean = false; // attr: no-focus-trap
|
|
13
13
|
noCloseButton: boolean = false; // attr: no-close-button
|
|
14
|
+
noHeader: boolean = false; // attr: no-header — hides header entirely
|
|
15
|
+
noFooter: boolean = false; // attr: no-footer — hides footer entirely
|
|
14
16
|
label: string = ''; // Accessible label
|
|
15
17
|
```
|
|
16
18
|
|
|
@@ -56,13 +56,14 @@ interface Track {
|
|
|
56
56
|
|
|
57
57
|
- `player-play` → `{ track }`
|
|
58
58
|
- `player-pause` → `{ track }`
|
|
59
|
-
- `player-stop` → `{
|
|
59
|
+
- `player-stop` → `{ player }`
|
|
60
60
|
- `player-track-change` → `{ track }`
|
|
61
61
|
- `player-track-ended` → `{ track }`
|
|
62
62
|
- `player-shuffle-change` → `{ shuffle }`
|
|
63
63
|
- `player-repeat-change` → `{ repeat }`
|
|
64
64
|
- `player-volume-change` → `{ volume }`
|
|
65
|
-
-
|
|
65
|
+
- `player-seek` → `{ time }`
|
|
66
|
+
- `player-time-update` → `{ currentTime, duration }`
|
|
66
67
|
- `player-error` → `{ error }`
|
|
67
68
|
|
|
68
69
|
## Usage
|
|
@@ -44,10 +44,10 @@ interface NetworkEdge {
|
|
|
44
44
|
|
|
45
45
|
## Events
|
|
46
46
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
47
|
+
- `node-click` → `{ node: NetworkNode }`
|
|
48
|
+
- `edge-click` → `{ edge: NetworkEdge }`
|
|
49
|
+
- `node-drag` → `{ node: NetworkNode, x: number, y: number }`
|
|
50
|
+
- `graph-zoom` → `{ scale: number, x: number, y: number }`
|
|
51
51
|
|
|
52
52
|
## Usage
|
|
53
53
|
|
|
@@ -66,7 +66,7 @@ graph.data = {
|
|
|
66
66
|
],
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
graph.addEventListener('
|
|
69
|
+
graph.addEventListener('node-click', (e) => console.log(e.detail.node));
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# snice-pdf-viewer
|
|
2
2
|
|
|
3
|
-
PDF document viewer with toolbar (page navigation, zoom, fit modes, download, print). Uses PDF.js
|
|
3
|
+
PDF document viewer with toolbar (page navigation, zoom, fit modes, download, print). Uses a vendored PDF.js bundle.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
@@ -65,5 +65,5 @@ radio.addEventListener('radio-change', (e) => {
|
|
|
65
65
|
- Automatic radio group management by name
|
|
66
66
|
- 3 sizes
|
|
67
67
|
- Loading state with spinner
|
|
68
|
-
- Keyboard accessible (arrow keys navigate group)
|
|
69
|
-
-
|
|
68
|
+
- Keyboard accessible (arrow keys navigate group, wraps around)
|
|
69
|
+
- Contains native `<input type="radio">` for form participation
|
|
@@ -27,9 +27,9 @@ interface SankeyLink { source: string; target: string; value: number; color?: st
|
|
|
27
27
|
|
|
28
28
|
## Events
|
|
29
29
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
30
|
+
- `sankey-node-click` - `{ node: SankeyNode }` - Node clicked
|
|
31
|
+
- `sankey-link-click` - `{ link: SankeyLink }` - Link clicked
|
|
32
|
+
- `sankey-hover` - `{ type: 'node'|'link', item: SankeyNode|SankeyLink } | null` - Hover change
|
|
33
33
|
|
|
34
34
|
## Usage
|
|
35
35
|
|
|
@@ -86,7 +86,7 @@ select.selectOption('1');
|
|
|
86
86
|
|
|
87
87
|
## Notes
|
|
88
88
|
|
|
89
|
-
- Options
|
|
89
|
+
- Options can be nested (uses querySelectorAll, not just direct children)
|
|
90
90
|
- Multiple selection values are comma-separated
|
|
91
91
|
- Hidden native select for form submission
|
|
92
92
|
- Dropdown closes outside click
|
|
@@ -57,3 +57,57 @@ strictPositioning: boolean = false; // attr: strict-positioning
|
|
|
57
57
|
<button>Wait</button>
|
|
58
58
|
</snice-tooltip>
|
|
59
59
|
```
|
|
60
|
+
|
|
61
|
+
## Attribute-Based Tooltips (`useTooltips`)
|
|
62
|
+
|
|
63
|
+
Opt-in observer for `tooltip` attribute on any element. No wrapper element — safe inside strict-children components (tabs, accordion, etc.).
|
|
64
|
+
|
|
65
|
+
### Setup
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { useTooltips } from 'snice';
|
|
69
|
+
useTooltips(); // idempotent
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Usage
|
|
73
|
+
|
|
74
|
+
```html
|
|
75
|
+
<button tooltip="Save changes">Save</button>
|
|
76
|
+
<button tooltip="Below" style="--tooltip-position: bottom">Bottom</button>
|
|
77
|
+
|
|
78
|
+
<!-- Inside strict-children components -->
|
|
79
|
+
<snice-tabs>
|
|
80
|
+
<snice-tab slot="nav" tooltip="User settings">Settings</snice-tab>
|
|
81
|
+
</snice-tabs>
|
|
82
|
+
|
|
83
|
+
<!-- Scoped config via CSS -->
|
|
84
|
+
<style>
|
|
85
|
+
.toolbar [tooltip] { --tooltip-position: bottom; --tooltip-delay: 200; }
|
|
86
|
+
</style>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### CSS Variable API
|
|
90
|
+
|
|
91
|
+
| Variable | Default | Description |
|
|
92
|
+
|---|---|---|
|
|
93
|
+
| `--tooltip-position` | `top` | top/bottom/left/right + -start/-end |
|
|
94
|
+
| `--tooltip-trigger` | `hover` | hover, click, focus |
|
|
95
|
+
| `--tooltip-delay` | `0` | Show delay (ms) |
|
|
96
|
+
| `--tooltip-hide-delay` | `0` | Hide delay (ms) |
|
|
97
|
+
| `--tooltip-offset` | `12` | Distance from trigger (px) |
|
|
98
|
+
| `--tooltip-arrow` | (shown) | `none` to hide |
|
|
99
|
+
| `--tooltip-max-width` | `250` | Max width (px) |
|
|
100
|
+
| `--tooltip-z-index` | `10000` | Z-index |
|
|
101
|
+
| `--tooltip-strict-positioning` | (false) | `true` to disable auto-flip |
|
|
102
|
+
| `--tooltip-bg` | `hsl(0 0% 20%)` | Background color |
|
|
103
|
+
| `--tooltip-color` | `white` | Text color |
|
|
104
|
+
| `--tooltip-padding` | `8px 12px` | Content padding |
|
|
105
|
+
| `--tooltip-radius` | `6px` | Border radius |
|
|
106
|
+
| `--tooltip-font-size` | `14px` | Font size |
|
|
107
|
+
|
|
108
|
+
### Cleanup
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import { cleanupTooltips } from 'snice';
|
|
112
|
+
cleanupTooltips(); // disconnect observer, remove portals
|
|
113
|
+
```
|
package/docs/ai/decorators.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Decorators
|
|
2
2
|
|
|
3
3
|
## Class
|
|
4
|
-
- `@element('tag-name')` - Custom element
|
|
4
|
+
- `@element('tag-name', options?)` - Custom element. Options: `{ formAssociated?: boolean }`
|
|
5
5
|
- `@page({ tag, routes, guards?, placard? })` - Routable page
|
|
6
6
|
- `@controller('name')` - Swappable behavior
|
|
7
7
|
- `@layout('tag-name')` - Page wrapper for routing system
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
- `@adopted(options?: { throttle?, debounce? })` - On adoptedCallback (alias for moved)
|
|
23
23
|
|
|
24
24
|
## DOM
|
|
25
|
-
- `@query('selector')` - Single element
|
|
26
|
-
- `@queryAll('selector')` - NodeList
|
|
25
|
+
- `@query('selector', { light? })` - Single element. `{ light: true }` for controllers on native elements
|
|
26
|
+
- `@queryAll('selector', { light? })` - NodeList
|
|
27
27
|
|
|
28
28
|
## Events
|
|
29
29
|
- `@on('event', 'selector?')` - Delegation, auto-bound
|
|
30
|
-
- `@dispatch('event-name')` - Emit CustomEvent, detail = return value
|
|
30
|
+
- `@dispatch('event-name', options?)` - Emit CustomEvent, detail = return value. Supports async. Options: `{ debounce?, throttle?, dispatchOnUndefined? }`
|
|
31
31
|
|
|
32
32
|
## Communication
|
|
33
33
|
- `@request(channel, options?)` - Async generator request pattern
|