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/docs/code-block.md
CHANGED
|
@@ -189,12 +189,12 @@ codeBlock.setGrammar(grammar);
|
|
|
189
189
|
|
|
190
190
|
## Events
|
|
191
191
|
|
|
192
|
-
###
|
|
192
|
+
### `code-copy`
|
|
193
193
|
|
|
194
194
|
Dispatched when code is copied to the clipboard.
|
|
195
195
|
|
|
196
196
|
```typescript
|
|
197
|
-
codeBlock.addEventListener('
|
|
197
|
+
codeBlock.addEventListener('code-copy', (e) => {
|
|
198
198
|
console.log('Copied:', e.detail.code);
|
|
199
199
|
console.log('From:', e.detail.codeBlock);
|
|
200
200
|
});
|
|
@@ -202,13 +202,13 @@ codeBlock.addEventListener('@snice/code-copy', (e) => {
|
|
|
202
202
|
|
|
203
203
|
**Detail:** `{ code: string, codeBlock: SniceCodeBlockElement }`
|
|
204
204
|
|
|
205
|
-
###
|
|
205
|
+
### `code-before-highlight`
|
|
206
206
|
|
|
207
207
|
Dispatched before syntax highlighting runs. Can be used to modify code or language before highlighting.
|
|
208
208
|
|
|
209
209
|
**Detail:** `{ code: string, language: string, codeBlock: SniceCodeBlockElement }`
|
|
210
210
|
|
|
211
|
-
###
|
|
211
|
+
### `code-after-highlight`
|
|
212
212
|
|
|
213
213
|
Dispatched after syntax highlighting completes.
|
|
214
214
|
|
|
@@ -125,7 +125,7 @@ Use the `badge` attribute to display a notification badge on a tile.
|
|
|
125
125
|
| `tiles` | `AppTile[]` | `[]` | Array of tile data objects (programmatic mode) |
|
|
126
126
|
| `columns` | `number` | `4` | Number of grid columns |
|
|
127
127
|
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Tile size |
|
|
128
|
-
| `variant` | `'grid' \| 'list'` | `'grid'` | Layout variant |
|
|
128
|
+
| `variant` | `'grid' \| 'list' \| 'compact'` | `'grid'` | Layout variant |
|
|
129
129
|
|
|
130
130
|
### AppTile Interface
|
|
131
131
|
|
package/docs/components/book.md
CHANGED
|
@@ -34,7 +34,6 @@ import 'snice/components/book/snice-book';
|
|
|
34
34
|
| Property | Type | Default | Description |
|
|
35
35
|
|----------|------|---------|-------------|
|
|
36
36
|
| `currentPage` (attr: `current-page`) | `number` | `0` | Current page number (0-indexed) |
|
|
37
|
-
| `mode` | `'single' \| 'spread'` | `'spread'` | Display mode: single page or two-page spread |
|
|
38
37
|
| `coverImage` (attr: `cover-image`) | `string` | `''` | URL for the cover page image |
|
|
39
38
|
| `title` | `string` | `''` | Book title displayed on the cover |
|
|
40
39
|
| `author` | `string` | `''` | Author name displayed on the cover |
|
|
@@ -50,9 +49,9 @@ import 'snice/components/book/snice-book';
|
|
|
50
49
|
|
|
51
50
|
| Method | Arguments | Description |
|
|
52
51
|
|--------|-----------|-------------|
|
|
53
|
-
| `goToPage()` | `page: number` | Navigate to a specific page
|
|
54
|
-
| `nextPage()` | -- | Advance forward by 1 page
|
|
55
|
-
| `prevPage()` | -- | Go back by 1 page
|
|
52
|
+
| `goToPage()` | `page: number` | Navigate to a specific page |
|
|
53
|
+
| `nextPage()` | -- | Advance forward by 1 page |
|
|
54
|
+
| `prevPage()` | -- | Go back by 1 page |
|
|
56
55
|
| `firstPage()` | -- | Jump to the first page (page 0) |
|
|
57
56
|
| `lastPage()` | -- | Jump to the last page |
|
|
58
57
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Button Component
|
|
4
4
|
|
|
5
|
-
The button component provides an interactive element for user actions. It supports multiple variants, sizes, states (loading, disabled), styles (outline, pill, circle), icons,
|
|
5
|
+
The button component provides an interactive element for user actions. It supports multiple variants, sizes, states (loading, disabled), styles (outline, pill, circle), and icons. When `href` is set, clicking navigates via `window.location` (not rendered as an anchor).
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
- [Basic Usage](#basic-usage)
|
|
@@ -33,7 +33,7 @@ import 'snice/components/button/snice-button';
|
|
|
33
33
|
| `outline` | `boolean` | `false` | Use outline style |
|
|
34
34
|
| `pill` | `boolean` | `false` | Use pill (fully rounded) shape |
|
|
35
35
|
| `circle` | `boolean` | `false` | Use circle shape (icon only) |
|
|
36
|
-
| `href` | `string` | `''` | URL to navigate to (
|
|
36
|
+
| `href` | `string` | `''` | URL to navigate to (uses window.location, not an anchor tag) |
|
|
37
37
|
| `target` | `string` | `''` | Link target attribute |
|
|
38
38
|
| `download` | `string` | `''` | Download attribute for file downloads |
|
|
39
39
|
| `icon` | `string` | `''` | Icon (URL, image file, emoji, or font ligature) |
|
|
@@ -46,9 +46,9 @@ import 'snice/components/camera-annotate/snice-camera-annotate';
|
|
|
46
46
|
|
|
47
47
|
| Event | Detail | Description |
|
|
48
48
|
|-------|--------|-------------|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
49
|
+
| `capture` | `{ dataURL, width, height }` | Fired when an image is captured from the camera |
|
|
50
|
+
| `annotate` | `{ annotation }` | Fired when a new annotation (shape) is drawn |
|
|
51
|
+
| `annotation-change` | `{ annotations }` | Fired when annotations are modified (add, remove, visibility, label) |
|
|
52
52
|
|
|
53
53
|
## Examples
|
|
54
54
|
|
|
@@ -78,15 +78,15 @@ import 'snice/components/camera-annotate/snice-camera-annotate';
|
|
|
78
78
|
<script type="module">
|
|
79
79
|
const annotator = document.getElementById('annotator');
|
|
80
80
|
|
|
81
|
-
annotator.addEventListener('
|
|
81
|
+
annotator.addEventListener('capture', (e) => {
|
|
82
82
|
console.log('Captured:', e.detail.width, 'x', e.detail.height);
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
annotator.addEventListener('
|
|
85
|
+
annotator.addEventListener('annotate', (e) => {
|
|
86
86
|
console.log('New annotation:', e.detail.annotation.id);
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
annotator.addEventListener('
|
|
89
|
+
annotator.addEventListener('annotation-change', (e) => {
|
|
90
90
|
console.log('Total annotations:', e.detail.annotations.length);
|
|
91
91
|
});
|
|
92
92
|
</script>
|
|
@@ -69,9 +69,9 @@ interface CandleData {
|
|
|
69
69
|
|
|
70
70
|
| Event | Detail | Description |
|
|
71
71
|
|-------|--------|-------------|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
72
|
+
| `candle-click` | `{ candle: CandleData, index: number }` | A candle was clicked |
|
|
73
|
+
| `candle-hover` | `{ candle: CandleData, index: number }` | Mouse entered a candle |
|
|
74
|
+
| `crosshair-move` | `{ price: number, date: string, x: number, y: number }` | Crosshair position changed |
|
|
75
75
|
|
|
76
76
|
## Examples
|
|
77
77
|
|
|
@@ -120,12 +120,12 @@ interface CandleData {
|
|
|
120
120
|
<snice-candlestick id="chart"></snice-candlestick>
|
|
121
121
|
|
|
122
122
|
<script>
|
|
123
|
-
chart.addEventListener('
|
|
123
|
+
chart.addEventListener('candle-click', (e) => {
|
|
124
124
|
console.log('Clicked candle:', e.detail.candle);
|
|
125
125
|
console.log('Index:', e.detail.index);
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
chart.addEventListener('
|
|
128
|
+
chart.addEventListener('crosshair-move', (e) => {
|
|
129
129
|
console.log('Price at cursor:', e.detail.price);
|
|
130
130
|
console.log('Date at cursor:', e.detail.date);
|
|
131
131
|
});
|
|
@@ -193,6 +193,6 @@ snice-candlestick {
|
|
|
193
193
|
3. **Use appropriate time formats**: Match `time-format` to your data granularity (intraday = `'time'`, daily = `'date'`, monthly = `'month'`)
|
|
194
194
|
4. **Give the chart height**: The component needs an explicit height (set via CSS or a container)
|
|
195
195
|
5. **Limit visible candles**: For large datasets, the chart auto-limits visible candles; use `zoomTo()` for specific ranges
|
|
196
|
-
6. **Handle events**: Use
|
|
196
|
+
6. **Handle events**: Use `candle-click` for drill-down, `crosshair-move` for real-time price readout
|
|
197
197
|
7. **Custom colors**: Use `bullish-color` / `bearish-color` or CSS custom properties for theme integration
|
|
198
198
|
8. **Responsive**: The chart uses `ResizeObserver` and redraws on container resize
|
package/docs/components/chart.md
CHANGED
|
@@ -119,8 +119,8 @@ Toggle dataset visibility.
|
|
|
119
119
|
chart.toggleDataset(0);
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
### `exportImage(format?: '
|
|
123
|
-
Export chart as
|
|
122
|
+
### `exportImage(format?: 'svg'): string`
|
|
123
|
+
Export chart as SVG string.
|
|
124
124
|
|
|
125
125
|
```javascript
|
|
126
126
|
const svg = chart.exportImage('svg');
|
|
@@ -509,10 +509,8 @@ chart.labels = ['Q1', 'Q2', 'Q3', 'Q4', 'Q5'];
|
|
|
509
509
|
|
|
510
510
|
## Accessibility
|
|
511
511
|
|
|
512
|
-
-
|
|
513
|
-
-
|
|
514
|
-
- Screen reader friendly data tables
|
|
515
|
-
- High contrast color support
|
|
512
|
+
- Legend items are clickable to toggle dataset visibility
|
|
513
|
+
- Tooltip shows data values on hover
|
|
516
514
|
|
|
517
515
|
## Browser Support
|
|
518
516
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Checkbox Component
|
|
4
4
|
|
|
5
|
-
The checkbox component provides a
|
|
5
|
+
The checkbox component provides a checkbox input with support for checked, indeterminate, and invalid states, multiple sizes, and full keyboard accessibility.
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
- [Basic Usage](#basic-usage)
|
|
@@ -60,7 +60,7 @@ checkbox.click();
|
|
|
60
60
|
|
|
61
61
|
## Events
|
|
62
62
|
|
|
63
|
-
#### `change`
|
|
63
|
+
#### `checkbox-change`
|
|
64
64
|
Fired when the checkbox state changes.
|
|
65
65
|
|
|
66
66
|
**Event Detail:**
|
|
@@ -706,7 +706,7 @@ checkbox.addEventListener('change', (e) => {
|
|
|
706
706
|
|
|
707
707
|
## Form Integration
|
|
708
708
|
|
|
709
|
-
The checkbox component is
|
|
709
|
+
The checkbox component is not form-associated (no `ElementInternals`). Use a hidden input or listen for `checkbox-change` events to integrate with forms:
|
|
710
710
|
|
|
711
711
|
```html
|
|
712
712
|
<form>
|
package/docs/components/chip.md
CHANGED
|
@@ -57,22 +57,22 @@ Use the `icon` slot for external CSS-based icon fonts:
|
|
|
57
57
|
|
|
58
58
|
## Events
|
|
59
59
|
|
|
60
|
-
#### `click`
|
|
60
|
+
#### `chip-click`
|
|
61
61
|
Fired when the chip is clicked (not the remove button).
|
|
62
62
|
|
|
63
63
|
**Usage:**
|
|
64
64
|
```typescript
|
|
65
|
-
chip.addEventListener('click', () => {
|
|
65
|
+
chip.addEventListener('chip-click', () => {
|
|
66
66
|
console.log('Chip clicked');
|
|
67
67
|
});
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
#### `remove`
|
|
70
|
+
#### `chip-remove`
|
|
71
71
|
Fired when the remove button is clicked.
|
|
72
72
|
|
|
73
73
|
**Usage:**
|
|
74
74
|
```typescript
|
|
75
|
-
chip.addEventListener('remove', () => {
|
|
75
|
+
chip.addEventListener('chip-remove', () => {
|
|
76
76
|
chip.remove(); // Remove from DOM
|
|
77
77
|
});
|
|
78
78
|
```
|
|
@@ -38,9 +38,10 @@ function hello() {
|
|
|
38
38
|
|
|
39
39
|
## Events
|
|
40
40
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
41
|
+
- `code-copy` - Code copied (detail: `{ code, codeBlock }`)
|
|
42
|
+
- `code-before-highlight` - Before highlighting (detail: `{ code, language, codeBlock }`)
|
|
43
|
+
- `code-after-highlight` - After highlighting (detail: `{ code, language, codeBlock }`)
|
|
44
|
+
- `grammar-request` - Grammar fetch requested (detail: `{ url, language, codeBlock }`). Only dispatched when `fetch-mode="event"`.
|
|
44
45
|
|
|
45
46
|
## Grammar Files
|
|
46
47
|
|
package/docs/components/doc.md
CHANGED
|
@@ -9,10 +9,12 @@ A simple WYSIWYG document editor component with formatting toolbar and content i
|
|
|
9
9
|
- **WYSIWYG editing** - Direct HTML content editing
|
|
10
10
|
- **Formatting toolbar** - Bold, italic, underline, strikethrough, headings, lists
|
|
11
11
|
- **Content insertion** - Links, images, tables, dividers
|
|
12
|
-
- **
|
|
12
|
+
- **Download/Export** - Save as HTML, Markdown, or Plain Text
|
|
13
|
+
- **Icon sets** - Default text labels, Material Icons, or Font Awesome
|
|
13
14
|
- **Paste image support** - Paste images directly from clipboard
|
|
14
15
|
- **Keyboard shortcuts** - Ctrl/Cmd+B for bold, Ctrl/Cmd+I for italic, Ctrl/Cmd+U for underline
|
|
15
16
|
- **Readonly mode** - Display documents without editing capabilities
|
|
17
|
+
- **Dark mode** - Automatic dark mode via prefers-color-scheme
|
|
16
18
|
- **Customizable styling** - CSS custom properties for theming
|
|
17
19
|
|
|
18
20
|
## Basic Usage
|
|
@@ -36,10 +38,11 @@ A simple WYSIWYG document editor component with formatting toolbar and content i
|
|
|
36
38
|
|
|
37
39
|
## Properties
|
|
38
40
|
|
|
39
|
-
| Property
|
|
40
|
-
|
|
|
41
|
-
| `placeholder`
|
|
42
|
-
| `readonly`
|
|
41
|
+
| Property | Attribute | Type | Default | Description |
|
|
42
|
+
| ----------------- | ------------------ | --------- | -------------------- | ------------------------------------------------ |
|
|
43
|
+
| `placeholder` | `placeholder` | `string` | `"Start typing..."` | Placeholder text when empty |
|
|
44
|
+
| `readonly` | `readonly` | `boolean` | `false` | Whether the editor is readonly |
|
|
45
|
+
| `icons` | `icons` | `string` | `"default"` | Icon set: `"default"`, `"material"`, `"fontawesome"` |
|
|
43
46
|
|
|
44
47
|
## Methods
|
|
45
48
|
|
|
@@ -49,7 +52,6 @@ Get the current HTML content of the editor.
|
|
|
49
52
|
|
|
50
53
|
```javascript
|
|
51
54
|
const html = editor.getHTML();
|
|
52
|
-
console.log(html);
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
### `setHTML(html: string): void`
|
|
@@ -63,6 +65,32 @@ editor.setHTML(`
|
|
|
63
65
|
`);
|
|
64
66
|
```
|
|
65
67
|
|
|
68
|
+
### `getText(): string`
|
|
69
|
+
|
|
70
|
+
Get the document content as plain text.
|
|
71
|
+
|
|
72
|
+
```javascript
|
|
73
|
+
const text = editor.getText();
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `getMarkdown(): string`
|
|
77
|
+
|
|
78
|
+
Get the document content converted to Markdown. Supports headings, bold, italic, strikethrough, links, images, lists, tables, horizontal rules, and inline code.
|
|
79
|
+
|
|
80
|
+
```javascript
|
|
81
|
+
const md = editor.getMarkdown();
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### `downloadAs(format: 'html' | 'markdown' | 'text', filename?: string): void`
|
|
85
|
+
|
|
86
|
+
Download the document in the specified format. If no filename is provided, defaults to `document.html`, `document.md`, or `document.txt`.
|
|
87
|
+
|
|
88
|
+
```javascript
|
|
89
|
+
editor.downloadAs('markdown', 'my-document.md');
|
|
90
|
+
editor.downloadAs('html');
|
|
91
|
+
editor.downloadAs('text', 'notes.txt');
|
|
92
|
+
```
|
|
93
|
+
|
|
66
94
|
### `clear(): void`
|
|
67
95
|
|
|
68
96
|
Clear all content and reset to an empty paragraph.
|
|
@@ -83,14 +111,43 @@ The toolbar includes:
|
|
|
83
111
|
- **• / 1.** - Bulleted and numbered lists
|
|
84
112
|
- **🔗** - Insert link
|
|
85
113
|
- **🖼** - Insert image
|
|
114
|
+
- **📊** - Insert table
|
|
115
|
+
- **―** - Insert divider
|
|
116
|
+
- **⬇** - Download menu (HTML, Markdown, Plain Text)
|
|
117
|
+
|
|
118
|
+
## Icon Sets
|
|
86
119
|
|
|
87
|
-
|
|
120
|
+
The `icons` property controls which icon set the toolbar uses:
|
|
88
121
|
|
|
89
|
-
|
|
122
|
+
### Default (text/emoji)
|
|
123
|
+
|
|
124
|
+
```html
|
|
125
|
+
<snice-doc></snice-doc>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Uses text labels (B, I, U, H1, etc.) and emoji for action buttons.
|
|
129
|
+
|
|
130
|
+
### Material Symbols
|
|
131
|
+
|
|
132
|
+
```html
|
|
133
|
+
<!-- Load the font in your document -->
|
|
134
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined">
|
|
135
|
+
|
|
136
|
+
<snice-doc icons="material"></snice-doc>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Uses [Material Symbols Outlined](https://fonts.google.com/icons). You must load the font stylesheet in your document — the font cascades from light DOM into the shadow DOM automatically.
|
|
140
|
+
|
|
141
|
+
### Font Awesome
|
|
142
|
+
|
|
143
|
+
```html
|
|
144
|
+
<!-- Load the font in your document -->
|
|
145
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
|
|
146
|
+
|
|
147
|
+
<snice-doc icons="fontawesome"></snice-doc>
|
|
148
|
+
```
|
|
90
149
|
|
|
91
|
-
|
|
92
|
-
- **Table** - Insert table with custom rows/columns
|
|
93
|
-
- **Divider** - Insert horizontal rule
|
|
150
|
+
Uses [Font Awesome 6](https://fontawesome.com/icons) solid icons. You must load the Font Awesome stylesheet in your document.
|
|
94
151
|
|
|
95
152
|
## Keyboard Shortcuts
|
|
96
153
|
|
|
@@ -128,44 +185,50 @@ snice-doc {
|
|
|
128
185
|
}
|
|
129
186
|
```
|
|
130
187
|
|
|
188
|
+
Dark mode is supported automatically via `prefers-color-scheme: dark`.
|
|
189
|
+
|
|
131
190
|
## Examples
|
|
132
191
|
|
|
133
|
-
###
|
|
192
|
+
### Export and Download
|
|
134
193
|
|
|
135
194
|
```html
|
|
136
|
-
<snice-doc
|
|
195
|
+
<snice-doc id="editor"></snice-doc>
|
|
196
|
+
<button id="save-md">Save as Markdown</button>
|
|
197
|
+
<button id="save-html">Save as HTML</button>
|
|
137
198
|
|
|
138
199
|
<script type="module">
|
|
139
200
|
import 'snice';
|
|
140
201
|
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
202
|
+
const editor = document.getElementById('editor');
|
|
203
|
+
|
|
204
|
+
document.getElementById('save-md').addEventListener('click', () => {
|
|
205
|
+
editor.downloadAs('markdown', 'my-doc.md');
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
document.getElementById('save-html').addEventListener('click', () => {
|
|
209
|
+
editor.downloadAs('html', 'my-doc.html');
|
|
210
|
+
});
|
|
146
211
|
</script>
|
|
147
212
|
```
|
|
148
213
|
|
|
149
|
-
###
|
|
214
|
+
### Material Icons
|
|
150
215
|
|
|
151
216
|
```html
|
|
152
|
-
<snice-doc
|
|
217
|
+
<snice-doc icons="material"></snice-doc>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Readonly Document Viewer
|
|
221
|
+
|
|
222
|
+
```html
|
|
223
|
+
<snice-doc readonly></snice-doc>
|
|
153
224
|
|
|
154
225
|
<script type="module">
|
|
155
226
|
import 'snice';
|
|
156
227
|
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
<h1>
|
|
160
|
-
<p>This
|
|
161
|
-
<ul>
|
|
162
|
-
<li><b>Bold</b>, <i>italic</i>, <u>underline</u> formatting</li>
|
|
163
|
-
<li>Headings (H1, H2, H3)</li>
|
|
164
|
-
<li>Bullet and numbered lists</li>
|
|
165
|
-
<li>Images and links</li>
|
|
166
|
-
<li>Tables</li>
|
|
167
|
-
</ul>
|
|
168
|
-
<p>Try typing with <b>bold</b> and hitting Enter - the formatting continues naturally!</p>
|
|
228
|
+
const viewer = document.querySelector('snice-doc');
|
|
229
|
+
viewer.setHTML(`
|
|
230
|
+
<h1>Read Only Document</h1>
|
|
231
|
+
<p>This document cannot be edited.</p>
|
|
169
232
|
`);
|
|
170
233
|
</script>
|
|
171
234
|
```
|
|
@@ -183,40 +246,16 @@ snice-doc {
|
|
|
183
246
|
const editor = document.getElementById('editor');
|
|
184
247
|
|
|
185
248
|
document.getElementById('save').addEventListener('click', () => {
|
|
186
|
-
|
|
187
|
-
localStorage.setItem('document', html);
|
|
188
|
-
console.log('Saved!');
|
|
249
|
+
localStorage.setItem('document', editor.getHTML());
|
|
189
250
|
});
|
|
190
251
|
|
|
191
252
|
document.getElementById('load').addEventListener('click', () => {
|
|
192
253
|
const html = localStorage.getItem('document');
|
|
193
|
-
if (html)
|
|
194
|
-
editor.setHTML(html);
|
|
195
|
-
console.log('Loaded!');
|
|
196
|
-
}
|
|
254
|
+
if (html) editor.setHTML(html);
|
|
197
255
|
});
|
|
198
256
|
</script>
|
|
199
257
|
```
|
|
200
258
|
|
|
201
|
-
### Custom Styling
|
|
202
|
-
|
|
203
|
-
```html
|
|
204
|
-
<style>
|
|
205
|
-
snice-doc.dark {
|
|
206
|
-
--snice-doc-text-color: #e6edf3;
|
|
207
|
-
--snice-doc-background: #0d1117;
|
|
208
|
-
--snice-doc-muted-color: #7d8590;
|
|
209
|
-
--snice-doc-placeholder-color: #484f58;
|
|
210
|
-
--snice-doc-toolbar-background: #161b22;
|
|
211
|
-
--snice-doc-toolbar-border: #30363d;
|
|
212
|
-
--snice-doc-sidebar-background: #161b22;
|
|
213
|
-
--snice-doc-sidebar-border: #30363d;
|
|
214
|
-
}
|
|
215
|
-
</style>
|
|
216
|
-
|
|
217
|
-
<snice-doc class="dark"></snice-doc>
|
|
218
|
-
```
|
|
219
|
-
|
|
220
259
|
## Accessibility
|
|
221
260
|
|
|
222
261
|
- Supports keyboard navigation
|
|
@@ -240,4 +279,6 @@ import type { SniceDoc } from 'snice/doc';
|
|
|
240
279
|
|
|
241
280
|
const editor = document.querySelector<SniceDoc>('snice-doc');
|
|
242
281
|
const html = editor?.getHTML();
|
|
282
|
+
const markdown = editor?.getMarkdown();
|
|
283
|
+
editor?.downloadAs('markdown', 'export.md');
|
|
243
284
|
```
|
|
@@ -320,18 +320,40 @@ gallery.addEventListener('upload-progress', (e) => {
|
|
|
320
320
|
### `upload-complete`
|
|
321
321
|
Fired when an upload completes successfully.
|
|
322
322
|
|
|
323
|
-
**Detail**: `{ file: GalleryFile,
|
|
323
|
+
**Detail**: `{ file: GalleryFile, response: UploadResponse, component: SniceFileGalleryElement }`
|
|
324
324
|
|
|
325
325
|
```typescript
|
|
326
326
|
gallery.addEventListener('upload-complete', (e) => {
|
|
327
|
-
console.log('Upload complete:', e.detail.
|
|
327
|
+
console.log('Upload complete:', e.detail.response);
|
|
328
|
+
});
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### `upload-pause`
|
|
332
|
+
Fired when an upload is paused.
|
|
333
|
+
|
|
334
|
+
**Detail**: `{ file: GalleryFile, component: SniceFileGalleryElement }`
|
|
335
|
+
|
|
336
|
+
```typescript
|
|
337
|
+
gallery.addEventListener('upload-pause', (e) => {
|
|
338
|
+
console.log('Upload paused:', e.detail.file.file.name);
|
|
339
|
+
});
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### `file-remove`
|
|
343
|
+
Fired when a file is removed from the gallery.
|
|
344
|
+
|
|
345
|
+
**Detail**: `{ file: GalleryFile, component: SniceFileGalleryElement }`
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
gallery.addEventListener('file-remove', (e) => {
|
|
349
|
+
console.log('File removed:', e.detail.file.file.name);
|
|
328
350
|
});
|
|
329
351
|
```
|
|
330
352
|
|
|
331
353
|
### `upload-error`
|
|
332
354
|
Fired when an upload fails.
|
|
333
355
|
|
|
334
|
-
**Detail**: `{ file: GalleryFile, error: string }`
|
|
356
|
+
**Detail**: `{ file: GalleryFile, error: string, component: SniceFileGalleryElement }`
|
|
335
357
|
|
|
336
358
|
```typescript
|
|
337
359
|
gallery.addEventListener('upload-error', (e) => {
|
package/docs/components/input.md
CHANGED
|
@@ -156,6 +156,24 @@ Use `name` and `required` for native form participation.
|
|
|
156
156
|
</form>
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
+
### Vertical Alignment
|
|
160
|
+
|
|
161
|
+
When the input has an explicit height, use `align` to control vertical positioning of the inner input field.
|
|
162
|
+
|
|
163
|
+
```html
|
|
164
|
+
<snice-input style="height: 200px" align="top" label="Top"></snice-input>
|
|
165
|
+
<snice-input style="height: 200px" align="center" label="Center"></snice-input>
|
|
166
|
+
<snice-input style="height: 200px" align="bottom" label="Bottom"></snice-input>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Stretch
|
|
170
|
+
|
|
171
|
+
Use the `stretch` attribute to make the inner input fill the full height of the host.
|
|
172
|
+
|
|
173
|
+
```html
|
|
174
|
+
<snice-input style="height: 200px" stretch label="Stretched"></snice-input>
|
|
175
|
+
```
|
|
176
|
+
|
|
159
177
|
### Event Handling
|
|
160
178
|
|
|
161
179
|
Listen for input events using `input-input` and `input-change`.
|
|
@@ -205,6 +223,8 @@ inp.addEventListener('input-change', (e) => console.log('Change:', e.detail.valu
|
|
|
205
223
|
| `name` | `name` | `string` | `''` | Form field name |
|
|
206
224
|
| `prefixIcon` | `prefix-icon` | `string` | `''` | Prefix icon (emoji, URL, or ligature) |
|
|
207
225
|
| `suffixIcon` | `suffix-icon` | `string` | `''` | Suffix icon (emoji, URL, or ligature) |
|
|
226
|
+
| `align` | `align` | `'top' \| 'center' \| 'bottom' \| ''` | `''` | Vertical alignment when host has explicit height (default centers) |
|
|
227
|
+
| `stretch` | `stretch` | `boolean` | `false` | Input fills the full host height |
|
|
208
228
|
|
|
209
229
|
## Events
|
|
210
230
|
|
package/docs/components/kpi.md
CHANGED
|
@@ -267,10 +267,9 @@ The component uses these CSS custom properties:
|
|
|
267
267
|
|
|
268
268
|
## Accessibility
|
|
269
269
|
|
|
270
|
-
- Labels provide context for
|
|
271
|
-
- Sentiment indicators have clear visual differentiation
|
|
270
|
+
- Labels provide context for displayed values
|
|
271
|
+
- Sentiment indicators have clear visual differentiation (color + icon)
|
|
272
272
|
- Sufficient color contrast for all text elements
|
|
273
|
-
- Keyboard navigation supported through standard focus
|
|
274
273
|
|
|
275
274
|
## Performance
|
|
276
275
|
|
|
@@ -109,7 +109,7 @@ When no image is provided, a placeholder link icon is shown.
|
|
|
109
109
|
</snice-link-preview>
|
|
110
110
|
|
|
111
111
|
<script type="module">
|
|
112
|
-
document.getElementById('preview').addEventListener('
|
|
112
|
+
document.getElementById('preview').addEventListener('link-click', (e) => {
|
|
113
113
|
console.log('Link clicked:', e.detail.url);
|
|
114
114
|
});
|
|
115
115
|
</script>
|
|
@@ -132,4 +132,4 @@ When no image is provided, a placeholder link icon is shown.
|
|
|
132
132
|
|
|
133
133
|
| Event | Detail | Description |
|
|
134
134
|
|-------|--------|-------------|
|
|
135
|
-
|
|
|
135
|
+
| `link-click` | `{ url: string }` | Fired when the card is clicked |
|
package/docs/components/list.md
CHANGED
|
@@ -65,7 +65,7 @@ Use the `before` and `after` slots on list items for icons and metadata.
|
|
|
65
65
|
|
|
66
66
|
### Searchable List
|
|
67
67
|
|
|
68
|
-
Set the `searchable` attribute to show a search input. Handle queries with the
|
|
68
|
+
Set the `searchable` attribute to show a search input. Handle queries with the `list/search` request.
|
|
69
69
|
|
|
70
70
|
```html
|
|
71
71
|
<snice-list searchable dividers>
|
|
@@ -157,5 +157,5 @@ Set the `no-results` attribute to show an empty state message.
|
|
|
157
157
|
|
|
158
158
|
| Request | Params | Description |
|
|
159
159
|
|---------|--------|-------------|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
160
|
+
| `list/search` | `{ query: string, list }` | Handle search queries |
|
|
161
|
+
| `list/load-more` | `{ page: number, list }` | Load next page for infinite scroll |
|