snice 3.2.0 → 3.3.1
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/bin/templates/base/src/components/counter-button.ts +2 -2
- package/bin/templates/base/src/pages/about-page.ts +8 -5
- package/bin/templates/base/src/pages/home-page.ts +9 -6
- package/bin/templates/base/src/pages/not-found-page.ts +7 -4
- package/dist/components/accordion/snice-accordion-item.d.ts +2 -2
- package/dist/components/accordion/snice-accordion-item.js +9 -9
- package/dist/components/accordion/snice-accordion-item.js.map +1 -1
- package/dist/components/accordion/snice-accordion.d.ts +2 -2
- package/dist/components/accordion/snice-accordion.js +9 -9
- package/dist/components/accordion/snice-accordion.js.map +1 -1
- package/dist/components/actions/snice-actions.d.ts +28 -0
- package/dist/components/actions/snice-actions.js +220 -0
- package/dist/components/actions/snice-actions.js.map +1 -0
- package/dist/components/actions/snice-actions.types.d.ts +27 -0
- package/dist/components/alert/snice-alert.d.ts +2 -2
- package/dist/components/alert/snice-alert.js +8 -8
- package/dist/components/alert/snice-alert.js.map +1 -1
- package/dist/components/audio-recorder/snice-audio-recorder.d.ts +58 -0
- package/dist/components/audio-recorder/snice-audio-recorder.js +413 -0
- package/dist/components/audio-recorder/snice-audio-recorder.js.map +1 -0
- package/dist/components/audio-recorder/snice-audio-recorder.types.d.ts +28 -0
- package/dist/components/avatar/snice-avatar.d.ts +2 -2
- package/dist/components/avatar/snice-avatar.js +9 -9
- package/dist/components/avatar/snice-avatar.js.map +1 -1
- package/dist/components/badge/snice-badge.d.ts +2 -2
- package/dist/components/badge/snice-badge.js +10 -10
- package/dist/components/badge/snice-badge.js.map +1 -1
- package/dist/components/banner/snice-banner.d.ts +2 -2
- package/dist/components/banner/snice-banner.js +8 -8
- package/dist/components/banner/snice-banner.js.map +1 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +2 -2
- package/dist/components/breadcrumbs/snice-breadcrumbs.js +11 -11
- package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +1 -1
- package/dist/components/button/snice-button.d.ts +2 -2
- package/dist/components/button/snice-button.js +8 -8
- package/dist/components/button/snice-button.js.map +1 -1
- package/dist/components/calendar/snice-calendar.d.ts +46 -0
- package/dist/components/calendar/snice-calendar.js +294 -0
- package/dist/components/calendar/snice-calendar.js.map +1 -0
- package/dist/components/calendar/snice-calendar.types.d.ts +34 -0
- package/dist/components/camera/snice-camera.d.ts +39 -0
- package/dist/components/camera/snice-camera.js +286 -0
- package/dist/components/camera/snice-camera.js.map +1 -0
- package/dist/components/camera/snice-camera.types.d.ts +28 -0
- package/dist/components/card/snice-card.d.ts +2 -2
- package/dist/components/card/snice-card.js +9 -9
- package/dist/components/card/snice-card.js.map +1 -1
- package/dist/components/carousel/snice-carousel.d.ts +32 -0
- package/dist/components/carousel/snice-carousel.js +279 -0
- package/dist/components/carousel/snice-carousel.js.map +1 -0
- package/dist/components/carousel/snice-carousel.types.d.ts +22 -0
- package/dist/components/chart/snice-chart.d.ts +73 -0
- package/dist/components/chart/snice-chart.js +946 -0
- package/dist/components/chart/snice-chart.js.map +1 -0
- package/dist/components/chart/snice-chart.types.d.ts +71 -0
- package/dist/components/chat/snice-chat.d.ts +98 -0
- package/dist/components/chat/snice-chat.js +589 -0
- package/dist/components/chat/snice-chat.js.map +1 -0
- package/dist/components/chat/snice-chat.types.d.ts +141 -0
- package/dist/components/checkbox/snice-checkbox.d.ts +2 -2
- package/dist/components/checkbox/snice-checkbox.js +8 -8
- package/dist/components/checkbox/snice-checkbox.js.map +1 -1
- package/dist/components/chip/snice-chip.d.ts +2 -2
- package/dist/components/chip/snice-chip.js +8 -8
- package/dist/components/chip/snice-chip.js.map +1 -1
- package/dist/components/code-block/snice-code-block.d.ts +15 -0
- package/dist/components/code-block/snice-code-block.js +141 -0
- package/dist/components/code-block/snice-code-block.js.map +1 -0
- package/dist/components/code-block/snice-code-block.types.d.ts +15 -0
- package/dist/components/color-display/snice-color-display.d.ts +2 -2
- package/dist/components/color-display/snice-color-display.js +10 -10
- package/dist/components/color-display/snice-color-display.js.map +1 -1
- package/dist/components/color-picker/snice-color-picker.d.ts +2 -2
- package/dist/components/color-picker/snice-color-picker.js +8 -8
- package/dist/components/color-picker/snice-color-picker.js.map +1 -1
- package/dist/components/command-palette/snice-command-palette.d.ts +47 -0
- package/dist/components/command-palette/snice-command-palette.js +428 -0
- package/dist/components/command-palette/snice-command-palette.js.map +1 -0
- package/dist/components/command-palette/snice-command-palette.types.d.ts +49 -0
- package/dist/components/date-picker/snice-date-picker.d.ts +2 -2
- package/dist/components/date-picker/snice-date-picker.js +9 -9
- package/dist/components/date-picker/snice-date-picker.js.map +1 -1
- package/dist/components/divider/snice-divider.d.ts +2 -2
- package/dist/components/divider/snice-divider.js +10 -10
- package/dist/components/divider/snice-divider.js.map +1 -1
- package/dist/components/doc/snice-doc.d.ts +93 -0
- package/dist/components/doc/snice-doc.js +626 -0
- package/dist/components/doc/snice-doc.js.map +1 -0
- package/dist/components/doc/snice-doc.types.d.ts +118 -0
- package/dist/components/draw/snice-draw.d.ts +71 -0
- package/dist/components/draw/snice-draw.js +709 -0
- package/dist/components/draw/snice-draw.js.map +1 -0
- package/dist/components/draw/snice-draw.types.d.ts +41 -0
- package/dist/components/drawer/snice-drawer.d.ts +2 -2
- package/dist/components/drawer/snice-drawer.js +9 -9
- package/dist/components/drawer/snice-drawer.js.map +1 -1
- package/dist/components/empty-state/snice-empty-state.d.ts +2 -2
- package/dist/components/empty-state/snice-empty-state.js +8 -8
- package/dist/components/empty-state/snice-empty-state.js.map +1 -1
- package/dist/components/file-upload/snice-file-upload.d.ts +2 -3
- package/dist/components/file-upload/snice-file-upload.js +8 -15
- package/dist/components/file-upload/snice-file-upload.js.map +1 -1
- package/dist/components/gantt/snice-gantt.d.ts +29 -0
- package/dist/components/gantt/snice-gantt.js +268 -0
- package/dist/components/gantt/snice-gantt.js.map +1 -0
- package/dist/components/gantt/snice-gantt.types.d.ts +23 -0
- package/dist/components/image/snice-image.d.ts +2 -2
- package/dist/components/image/snice-image.js +11 -11
- package/dist/components/image/snice-image.js.map +1 -1
- package/dist/components/input/snice-input.d.ts +2 -2
- package/dist/components/input/snice-input.js +8 -8
- package/dist/components/input/snice-input.js.map +1 -1
- package/dist/components/kanban/snice-kanban.d.ts +31 -0
- package/dist/components/kanban/snice-kanban.js +243 -0
- package/dist/components/kanban/snice-kanban.js.map +1 -0
- package/dist/components/kanban/snice-kanban.types.d.ts +29 -0
- package/dist/components/kpi/snice-kpi.d.ts +2 -2
- package/dist/components/kpi/snice-kpi.js +11 -11
- package/dist/components/kpi/snice-kpi.js.map +1 -1
- package/dist/components/layout/snice-layout-blog.d.ts +2 -2
- package/dist/components/layout/snice-layout-blog.js +8 -8
- package/dist/components/layout/snice-layout-blog.js.map +1 -1
- package/dist/components/layout/snice-layout-card.d.ts +2 -2
- package/dist/components/layout/snice-layout-card.js +8 -8
- package/dist/components/layout/snice-layout-card.js.map +1 -1
- package/dist/components/layout/snice-layout-centered.d.ts +2 -2
- package/dist/components/layout/snice-layout-centered.js +8 -8
- package/dist/components/layout/snice-layout-centered.js.map +1 -1
- package/dist/components/layout/snice-layout-dashboard.d.ts +2 -2
- package/dist/components/layout/snice-layout-dashboard.js +8 -8
- package/dist/components/layout/snice-layout-dashboard.js.map +1 -1
- package/dist/components/layout/snice-layout-fullscreen.d.ts +2 -2
- package/dist/components/layout/snice-layout-fullscreen.js +8 -8
- package/dist/components/layout/snice-layout-fullscreen.js.map +1 -1
- package/dist/components/layout/snice-layout-landing.d.ts +2 -2
- package/dist/components/layout/snice-layout-landing.js +8 -8
- package/dist/components/layout/snice-layout-landing.js.map +1 -1
- package/dist/components/layout/snice-layout-minimal.d.ts +2 -2
- package/dist/components/layout/snice-layout-minimal.js +8 -8
- package/dist/components/layout/snice-layout-minimal.js.map +1 -1
- package/dist/components/layout/snice-layout-sidebar.d.ts +2 -2
- package/dist/components/layout/snice-layout-sidebar.js +8 -8
- package/dist/components/layout/snice-layout-sidebar.js.map +1 -1
- package/dist/components/layout/snice-layout-split.d.ts +2 -2
- package/dist/components/layout/snice-layout-split.js +8 -8
- package/dist/components/layout/snice-layout-split.js.map +1 -1
- package/dist/components/layout/snice-layout.d.ts +2 -2
- package/dist/components/layout/snice-layout.js +8 -8
- package/dist/components/layout/snice-layout.js.map +1 -1
- package/dist/components/link/snice-link.d.ts +2 -2
- package/dist/components/link/snice-link.js +10 -10
- package/dist/components/link/snice-link.js.map +1 -1
- package/dist/components/list/snice-list-item.d.ts +6 -0
- package/dist/components/list/snice-list-item.js +68 -0
- package/dist/components/list/snice-list-item.js.map +1 -0
- package/dist/components/list/snice-list.d.ts +23 -0
- package/dist/components/list/snice-list.js +276 -0
- package/dist/components/list/snice-list.js.map +1 -0
- package/dist/components/list/snice-list.types.d.ts +10 -0
- package/dist/components/location/snice-location.d.ts +35 -0
- package/dist/components/location/snice-location.js +238 -0
- package/dist/components/location/snice-location.js.map +1 -0
- package/dist/components/location/snice-location.types.d.ts +35 -0
- package/dist/components/login/snice-login.d.ts +2 -2
- package/dist/components/login/snice-login.js +8 -8
- package/dist/components/login/snice-login.js.map +1 -1
- package/dist/components/menu/snice-menu-divider.d.ts +4 -0
- package/dist/components/menu/snice-menu-divider.js +53 -0
- package/dist/components/menu/snice-menu-divider.js.map +1 -0
- package/dist/components/menu/snice-menu-item.d.ts +10 -0
- package/dist/components/menu/snice-menu-item.js +99 -0
- package/dist/components/menu/snice-menu-item.js.map +1 -0
- package/dist/components/menu/snice-menu-item.types.d.ts +9 -0
- package/dist/components/menu/snice-menu.d.ts +27 -0
- package/dist/components/menu/snice-menu.js +199 -0
- package/dist/components/menu/snice-menu.js.map +1 -0
- package/dist/components/menu/snice-menu.types.d.ts +18 -0
- package/dist/components/modal/snice-modal.d.ts +2 -2
- package/dist/components/modal/snice-modal.js +8 -8
- package/dist/components/modal/snice-modal.js.map +1 -1
- package/dist/components/nav/snice-nav.js.map +1 -1
- package/dist/components/pagination/snice-pagination.d.ts +2 -2
- package/dist/components/pagination/snice-pagination.js +8 -8
- package/dist/components/pagination/snice-pagination.js.map +1 -1
- package/dist/components/progress/snice-progress.d.ts +2 -2
- package/dist/components/progress/snice-progress.js +10 -10
- package/dist/components/progress/snice-progress.js.map +1 -1
- package/dist/components/qr-code/qrcode.d.ts +28 -0
- package/dist/components/qr-code/qrcode.js +916 -0
- package/dist/components/qr-code/qrcode.js.map +1 -0
- package/dist/components/qr-code/snice-qr-code.d.ts +35 -0
- package/dist/components/qr-code/snice-qr-code.js +263 -0
- package/dist/components/qr-code/snice-qr-code.js.map +1 -0
- package/dist/components/qr-code/snice-qr-code.types.d.ts +33 -0
- package/dist/components/radio/snice-radio.d.ts +2 -2
- package/dist/components/radio/snice-radio.js +8 -8
- package/dist/components/radio/snice-radio.js.map +1 -1
- package/dist/components/select/snice-option.d.ts +2 -2
- package/dist/components/select/snice-option.js +8 -8
- package/dist/components/select/snice-option.js.map +1 -1
- package/dist/components/select/snice-select.d.ts +2 -2
- package/dist/components/select/snice-select.js +9 -9
- package/dist/components/select/snice-select.js.map +1 -1
- package/dist/components/skeleton/snice-skeleton.d.ts +2 -2
- package/dist/components/skeleton/snice-skeleton.js +9 -9
- package/dist/components/skeleton/snice-skeleton.js.map +1 -1
- package/dist/components/slider/snice-slider.d.ts +2 -2
- package/dist/components/slider/snice-slider.js +8 -8
- package/dist/components/slider/snice-slider.js.map +1 -1
- package/dist/components/sparkline/snice-sparkline.d.ts +2 -2
- package/dist/components/sparkline/snice-sparkline.js +10 -10
- package/dist/components/sparkline/snice-sparkline.js.map +1 -1
- package/dist/components/spinner/snice-spinner.d.ts +2 -2
- package/dist/components/spinner/snice-spinner.js +10 -10
- package/dist/components/spinner/snice-spinner.js.map +1 -1
- package/dist/components/split-pane/snice-split-pane.d.ts +32 -0
- package/dist/components/split-pane/snice-split-pane.js +191 -0
- package/dist/components/split-pane/snice-split-pane.js.map +1 -0
- package/dist/components/split-pane/snice-split-pane.types.d.ts +19 -0
- package/dist/components/stat/snice-stat.d.ts +14 -0
- package/dist/components/stat/snice-stat.js +140 -0
- package/dist/components/stat/snice-stat.js.map +1 -0
- package/dist/components/stat/snice-stat.types.d.ts +12 -0
- package/dist/components/stepper/snice-stepper-panel.d.ts +2 -2
- package/dist/components/stepper/snice-stepper-panel.js +10 -10
- package/dist/components/stepper/snice-stepper-panel.js.map +1 -1
- package/dist/components/stepper/snice-stepper.d.ts +2 -2
- package/dist/components/stepper/snice-stepper.js +11 -11
- package/dist/components/stepper/snice-stepper.js.map +1 -1
- package/dist/components/switch/snice-switch.d.ts +2 -2
- package/dist/components/switch/snice-switch.js +8 -8
- package/dist/components/switch/snice-switch.js.map +1 -1
- package/dist/components/table/snice-cell-actions.d.ts +2 -2
- package/dist/components/table/snice-cell-actions.js +8 -8
- package/dist/components/table/snice-cell-actions.js.map +1 -1
- package/dist/components/table/snice-cell-boolean.d.ts +2 -2
- package/dist/components/table/snice-cell-boolean.js +8 -8
- package/dist/components/table/snice-cell-boolean.js.map +1 -1
- package/dist/components/table/snice-cell-color.d.ts +2 -2
- package/dist/components/table/snice-cell-color.js +8 -8
- package/dist/components/table/snice-cell-color.js.map +1 -1
- package/dist/components/table/snice-cell-currency.d.ts +2 -2
- package/dist/components/table/snice-cell-currency.js +8 -8
- package/dist/components/table/snice-cell-currency.js.map +1 -1
- package/dist/components/table/snice-cell-date.d.ts +2 -2
- package/dist/components/table/snice-cell-date.js +8 -8
- package/dist/components/table/snice-cell-date.js.map +1 -1
- package/dist/components/table/snice-cell-duration.d.ts +2 -2
- package/dist/components/table/snice-cell-duration.js +8 -8
- package/dist/components/table/snice-cell-duration.js.map +1 -1
- package/dist/components/table/snice-cell-email.d.ts +2 -2
- package/dist/components/table/snice-cell-email.js +8 -8
- package/dist/components/table/snice-cell-email.js.map +1 -1
- package/dist/components/table/snice-cell-filesize.d.ts +2 -2
- package/dist/components/table/snice-cell-filesize.js +8 -8
- package/dist/components/table/snice-cell-filesize.js.map +1 -1
- package/dist/components/table/snice-cell-image.d.ts +2 -2
- package/dist/components/table/snice-cell-image.js +8 -8
- package/dist/components/table/snice-cell-image.js.map +1 -1
- package/dist/components/table/snice-cell-json.d.ts +2 -2
- package/dist/components/table/snice-cell-json.js +8 -8
- package/dist/components/table/snice-cell-json.js.map +1 -1
- package/dist/components/table/snice-cell-link.d.ts +2 -2
- package/dist/components/table/snice-cell-link.js +8 -8
- package/dist/components/table/snice-cell-link.js.map +1 -1
- package/dist/components/table/snice-cell-location.d.ts +2 -2
- package/dist/components/table/snice-cell-location.js +8 -8
- package/dist/components/table/snice-cell-location.js.map +1 -1
- package/dist/components/table/snice-cell-number.d.ts +2 -2
- package/dist/components/table/snice-cell-number.js +8 -8
- package/dist/components/table/snice-cell-number.js.map +1 -1
- package/dist/components/table/snice-cell-percentage.d.ts +2 -2
- package/dist/components/table/snice-cell-percentage.js +8 -8
- package/dist/components/table/snice-cell-percentage.js.map +1 -1
- package/dist/components/table/snice-cell-phone.d.ts +2 -2
- package/dist/components/table/snice-cell-phone.js +8 -8
- package/dist/components/table/snice-cell-phone.js.map +1 -1
- package/dist/components/table/snice-cell-progress.d.ts +2 -2
- package/dist/components/table/snice-cell-progress.js +8 -8
- package/dist/components/table/snice-cell-progress.js.map +1 -1
- package/dist/components/table/snice-cell-rating.d.ts +2 -2
- package/dist/components/table/snice-cell-rating.js +8 -8
- package/dist/components/table/snice-cell-rating.js.map +1 -1
- package/dist/components/table/snice-cell-sparkline.d.ts +2 -2
- package/dist/components/table/snice-cell-sparkline.js +8 -8
- package/dist/components/table/snice-cell-sparkline.js.map +1 -1
- package/dist/components/table/snice-cell-status.d.ts +2 -2
- package/dist/components/table/snice-cell-status.js +8 -8
- package/dist/components/table/snice-cell-status.js.map +1 -1
- package/dist/components/table/snice-cell-tag.d.ts +2 -2
- package/dist/components/table/snice-cell-tag.js +8 -8
- package/dist/components/table/snice-cell-tag.js.map +1 -1
- package/dist/components/table/snice-cell-text.d.ts +2 -2
- package/dist/components/table/snice-cell-text.js +8 -8
- package/dist/components/table/snice-cell-text.js.map +1 -1
- package/dist/components/table/snice-cell.d.ts +2 -2
- package/dist/components/table/snice-cell.js +8 -8
- package/dist/components/table/snice-cell.js.map +1 -1
- package/dist/components/table/snice-column.d.ts +1 -1
- package/dist/components/table/snice-column.js +4 -4
- package/dist/components/table/snice-column.js.map +1 -1
- package/dist/components/table/snice-header.d.ts +2 -2
- package/dist/components/table/snice-header.js +8 -8
- package/dist/components/table/snice-header.js.map +1 -1
- package/dist/components/table/snice-progress.d.ts +2 -2
- package/dist/components/table/snice-progress.js +8 -8
- package/dist/components/table/snice-progress.js.map +1 -1
- package/dist/components/table/snice-rating.d.ts +2 -2
- package/dist/components/table/snice-rating.js +8 -8
- package/dist/components/table/snice-rating.js.map +1 -1
- package/dist/components/table/snice-row.d.ts +2 -2
- package/dist/components/table/snice-row.js +8 -8
- package/dist/components/table/snice-row.js.map +1 -1
- package/dist/components/table/snice-table.d.ts +2 -3
- package/dist/components/table/snice-table.js +8 -13
- package/dist/components/table/snice-table.js.map +1 -1
- package/dist/components/tabs/snice-tab-panel.d.ts +2 -2
- package/dist/components/tabs/snice-tab-panel.js +8 -8
- package/dist/components/tabs/snice-tab-panel.js.map +1 -1
- package/dist/components/tabs/snice-tab.d.ts +2 -2
- package/dist/components/tabs/snice-tab.js +8 -8
- package/dist/components/tabs/snice-tab.js.map +1 -1
- package/dist/components/tabs/snice-tabs.d.ts +2 -2
- package/dist/components/tabs/snice-tabs.js +8 -8
- package/dist/components/tabs/snice-tabs.js.map +1 -1
- package/dist/components/terminal/snice-terminal.types.d.ts +133 -0
- package/dist/components/textarea/snice-textarea.d.ts +2 -2
- package/dist/components/textarea/snice-textarea.js +8 -8
- package/dist/components/textarea/snice-textarea.js.map +1 -1
- package/dist/components/timeline/snice-timeline.d.ts +1 -1
- package/dist/components/timeline/snice-timeline.js +7 -7
- package/dist/components/timeline/snice-timeline.js.map +1 -1
- package/dist/components/toast/snice-toast-container.d.ts +2 -2
- package/dist/components/toast/snice-toast-container.js +8 -8
- package/dist/components/toast/snice-toast-container.js.map +1 -1
- package/dist/components/toast/snice-toast.d.ts +2 -2
- package/dist/components/toast/snice-toast.js +8 -8
- package/dist/components/toast/snice-toast.js.map +1 -1
- package/dist/components/tooltip/snice-tooltip.d.ts +2 -2
- package/dist/components/tooltip/snice-tooltip.js +8 -8
- package/dist/components/tooltip/snice-tooltip.js.map +1 -1
- package/dist/components/tree/snice-tree-item.d.ts +35 -0
- package/dist/components/tree/snice-tree-item.js +301 -0
- package/dist/components/tree/snice-tree-item.js.map +1 -0
- package/dist/components/tree/snice-tree-item.types.d.ts +30 -0
- package/dist/components/tree/snice-tree.d.ts +45 -0
- package/dist/components/tree/snice-tree.js +390 -0
- package/dist/components/tree/snice-tree.js.map +1 -0
- package/dist/components/tree/snice-tree.types.d.ts +65 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.d.ts +31 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.js +160 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.js.map +1 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.types.d.ts +19 -0
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/components/actions.md +81 -0
- package/docs/ai/components/audio-recorder.md +97 -0
- package/docs/ai/components/calendar.md +95 -0
- package/docs/ai/components/camera.md +130 -0
- package/docs/ai/components/carousel.md +49 -0
- package/docs/ai/components/chart.md +160 -0
- package/docs/ai/components/chat.md +189 -0
- package/docs/ai/components/code-block.md +32 -0
- package/docs/ai/components/command-palette.md +117 -0
- package/docs/ai/components/doc.md +154 -0
- package/docs/ai/components/draw.md +140 -0
- package/docs/ai/components/gantt.md +95 -0
- package/docs/ai/components/kanban.md +102 -0
- package/docs/ai/components/layout.md +261 -0
- package/docs/ai/components/list.md +50 -0
- package/docs/ai/components/location.md +75 -0
- package/docs/ai/components/menu.md +114 -0
- package/docs/ai/components/popover.md +70 -0
- package/docs/ai/components/qr-code.md +106 -0
- package/docs/ai/components/split-pane.md +71 -0
- package/docs/ai/components/stat.md +29 -0
- package/docs/ai/components/tree.md +191 -0
- package/docs/ai/components/virtual-scroller.md +71 -0
- package/docs/components/actions.md +317 -0
- package/docs/components/alert.md +540 -0
- package/docs/components/audio-recorder.md +152 -0
- package/docs/components/badge.md +593 -0
- package/docs/components/breadcrumbs.md +568 -0
- package/docs/components/button.md +648 -0
- package/docs/components/calendar.md +397 -0
- package/docs/components/camera.md +383 -0
- package/docs/components/card.md +778 -0
- package/docs/components/carousel.md +63 -0
- package/docs/components/chart.md +526 -0
- package/docs/components/chat.md +482 -0
- package/docs/components/checkbox.md +714 -0
- package/docs/components/chip.md +670 -0
- package/docs/components/code-block.md +49 -0
- package/docs/components/command-palette.md +159 -0
- package/docs/components/doc.md +357 -0
- package/docs/components/draw.md +307 -0
- package/docs/components/gantt.md +347 -0
- package/docs/components/kanban.md +410 -0
- package/docs/components/list.md +65 -0
- package/docs/components/location.md +369 -0
- package/docs/components/menu.md +633 -0
- package/docs/components/popover.md +333 -0
- package/docs/components/qr-code.md +464 -0
- package/docs/components/split-pane.md +315 -0
- package/docs/components/stat.md +45 -0
- package/docs/components/tree.md +536 -0
- package/docs/components/virtual-scroller.md +298 -0
- package/package.json +1 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Command Palette Component
|
|
2
|
+
|
|
3
|
+
A searchable command palette overlay (⌘K) for quick access to application commands and actions.
|
|
4
|
+
|
|
5
|
+
## Basic Usage
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<snice-command-palette id="palette"></snice-command-palette>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
const palette = document.getElementById('palette');
|
|
12
|
+
palette.commands = [
|
|
13
|
+
{
|
|
14
|
+
id: 'new-file',
|
|
15
|
+
label: 'New File',
|
|
16
|
+
description: 'Create a new file',
|
|
17
|
+
icon: '📄',
|
|
18
|
+
shortcut: '⌘N',
|
|
19
|
+
category: 'File',
|
|
20
|
+
action: () => console.log('New file created')
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'save',
|
|
24
|
+
label: 'Save',
|
|
25
|
+
description: 'Save the current file',
|
|
26
|
+
icon: '💾',
|
|
27
|
+
shortcut: '⌘S',
|
|
28
|
+
category: 'File',
|
|
29
|
+
action: () => console.log('File saved')
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
// Opens automatically with ⌘K or Ctrl+K
|
|
34
|
+
</script>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Properties
|
|
38
|
+
|
|
39
|
+
| Property | Type | Default | Description |
|
|
40
|
+
|----------|------|---------|-------------|
|
|
41
|
+
| `open` | `boolean` | `false` | Palette visibility |
|
|
42
|
+
| `commands` | `CommandItem[]` | `[]` | Array of commands |
|
|
43
|
+
| `placeholder` | `string` | `'Type a command or search...'` | Search input placeholder |
|
|
44
|
+
| `noResultsText` | `string` | `'No results found'` | Empty state text |
|
|
45
|
+
| `maxResults` | `number` | `50` | Maximum results to display |
|
|
46
|
+
| `showRecentCommands` | `boolean` | `true` | Show recent commands when search is empty |
|
|
47
|
+
| `recentCommandsLimit` | `number` | `5` | Number of recent commands to track |
|
|
48
|
+
| `caseSensitive` | `boolean` | `false` | Case-sensitive search |
|
|
49
|
+
|
|
50
|
+
## CommandItem Interface
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
interface CommandItem {
|
|
54
|
+
id: string; // Unique identifier
|
|
55
|
+
label: string; // Command name
|
|
56
|
+
description?: string; // Command description
|
|
57
|
+
icon?: string; // Text/emoji icon
|
|
58
|
+
iconImage?: string; // Icon image URL
|
|
59
|
+
shortcut?: string; // Keyboard shortcut display
|
|
60
|
+
category?: string; // Command category for grouping
|
|
61
|
+
disabled?: boolean; // Disable command
|
|
62
|
+
action?: () => void | Promise<void>; // Command action
|
|
63
|
+
data?: any; // Custom data
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Methods
|
|
68
|
+
|
|
69
|
+
- `show()` - Open the palette
|
|
70
|
+
- `close()` - Close the palette
|
|
71
|
+
- `toggle()` - Toggle palette visibility
|
|
72
|
+
- `addCommand(command: CommandItem)` - Add a command
|
|
73
|
+
- `removeCommand(id: string)` - Remove a command
|
|
74
|
+
- `executeCommand(id: string)` - Execute command by ID
|
|
75
|
+
- `clearSearch()` - Clear search input
|
|
76
|
+
- `focus()` - Focus search input
|
|
77
|
+
|
|
78
|
+
## Events
|
|
79
|
+
|
|
80
|
+
- `@snice/command-palette-open` - Fired when palette opens
|
|
81
|
+
- `@snice/command-palette-close` - Fired when palette closes
|
|
82
|
+
- `@snice/command-select` - Fired when command is selected (detail: { command, palette })
|
|
83
|
+
- `@snice/command-execute` - Fired when command is executed (detail: { command, palette })
|
|
84
|
+
- `@snice/command-search` - Fired when search changes (detail: { query, results, palette })
|
|
85
|
+
|
|
86
|
+
## Keyboard Shortcuts
|
|
87
|
+
|
|
88
|
+
- `⌘K` or `Ctrl+K` - Toggle palette
|
|
89
|
+
- `Escape` - Close palette
|
|
90
|
+
- `↑` / `↓` - Navigate commands
|
|
91
|
+
- `Enter` - Execute active command
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
### Basic Commands
|
|
96
|
+
|
|
97
|
+
```html
|
|
98
|
+
<snice-command-palette id="palette"></snice-command-palette>
|
|
99
|
+
|
|
100
|
+
<script>
|
|
101
|
+
document.getElementById('palette').commands = [
|
|
102
|
+
{ id: '1', label: 'New File', icon: '📄', category: 'File' },
|
|
103
|
+
{ id: '2', label: 'Open File', icon: '📂', category: 'File' },
|
|
104
|
+
{ id: '3', label: 'Cut', icon: '✂️', category: 'Edit' },
|
|
105
|
+
{ id: '4', label: 'Copy', icon: '📋', category: 'Edit' }
|
|
106
|
+
];
|
|
107
|
+
</script>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### With Actions
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
palette.commands = [
|
|
114
|
+
{
|
|
115
|
+
id: 'theme-toggle',
|
|
116
|
+
label: 'Toggle Theme',
|
|
117
|
+
icon: '🌓',
|
|
118
|
+
action: () => {
|
|
119
|
+
document.body.classList.toggle('dark-mode');
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 'logout',
|
|
124
|
+
label: 'Logout',
|
|
125
|
+
icon: '🚪',
|
|
126
|
+
action: async () => {
|
|
127
|
+
await fetch('/api/logout', { method: 'POST' });
|
|
128
|
+
window.location.href = '/login';
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Custom Trigger
|
|
135
|
+
|
|
136
|
+
```html
|
|
137
|
+
<button onclick="palette.show()">Open Commands</button>
|
|
138
|
+
<snice-command-palette id="palette"></snice-command-palette>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Event Handling
|
|
142
|
+
|
|
143
|
+
```javascript
|
|
144
|
+
palette.addEventListener('@snice/command-execute', (e) => {
|
|
145
|
+
console.log('Executed:', e.detail.command.label);
|
|
146
|
+
analytics.track('command_executed', { command: e.detail.command.id });
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Accessibility
|
|
151
|
+
|
|
152
|
+
- Full keyboard navigation
|
|
153
|
+
- ARIA labels and roles
|
|
154
|
+
- Focus trap when open
|
|
155
|
+
- Screen reader announcements
|
|
156
|
+
|
|
157
|
+
## Browser Support
|
|
158
|
+
|
|
159
|
+
Modern browsers with Custom Elements v1 support
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# snice-doc
|
|
2
|
+
|
|
3
|
+
A Notion-like document editor component with block-based editing, multiple content types, and rich export capabilities.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Block-based editing** - Create and organize content using blocks
|
|
8
|
+
- **Multiple block types** - Headings, paragraphs, lists, code, quotes, dividers, and to-dos
|
|
9
|
+
- **Block menu** - Type `/` to open a searchable block type menu
|
|
10
|
+
- **Keyboard shortcuts** - Ctrl/Cmd+B for bold, Ctrl/Cmd+I for italic, Ctrl/Cmd+U for underline
|
|
11
|
+
- **Drag and drop** - Reorder blocks by dragging the handle
|
|
12
|
+
- **Export formats** - JSON, Markdown, and HTML export
|
|
13
|
+
- **Readonly mode** - Display documents without editing capabilities
|
|
14
|
+
- **Customizable styling** - CSS custom properties for theming
|
|
15
|
+
|
|
16
|
+
## Basic Usage
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<snice-doc id="editor"></snice-doc>
|
|
20
|
+
|
|
21
|
+
<script type="module">
|
|
22
|
+
import 'snice';
|
|
23
|
+
|
|
24
|
+
const editor = document.getElementById('editor');
|
|
25
|
+
|
|
26
|
+
// Listen for changes
|
|
27
|
+
editor.addEventListener('doc-change', (e) => {
|
|
28
|
+
console.log('Document changed:', e.detail.blocks);
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Block Types
|
|
34
|
+
|
|
35
|
+
The editor supports the following block types:
|
|
36
|
+
|
|
37
|
+
- `paragraph` - Regular text paragraph
|
|
38
|
+
- `heading-1` - Top-level heading
|
|
39
|
+
- `heading-2` - Second-level heading
|
|
40
|
+
- `heading-3` - Third-level heading
|
|
41
|
+
- `bulleted-list` - Bulleted list item
|
|
42
|
+
- `numbered-list` - Numbered list item
|
|
43
|
+
- `todo` - To-do list item with checkbox
|
|
44
|
+
- `code` - Code block with monospace font
|
|
45
|
+
- `quote` - Blockquote for citations
|
|
46
|
+
- `divider` - Horizontal divider line
|
|
47
|
+
|
|
48
|
+
## Properties
|
|
49
|
+
|
|
50
|
+
| Property | Attribute | Type | Default | Description |
|
|
51
|
+
| ------------- | ------------- | ----------- | ----------------------------- | ---------------------------------- |
|
|
52
|
+
| `blocks` | - | `DocBlock[]` | `[{...}]` | Document blocks (property only) |
|
|
53
|
+
| `placeholder` | `placeholder` | `string` | `"Type '/' for commands..."` | Placeholder text when empty |
|
|
54
|
+
| `readonly` | `readonly` | `boolean` | `false` | Whether the editor is readonly |
|
|
55
|
+
|
|
56
|
+
## Methods
|
|
57
|
+
|
|
58
|
+
### `getBlocks(): DocBlock[]`
|
|
59
|
+
|
|
60
|
+
Get a copy of all blocks in the document.
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
const blocks = editor.getBlocks();
|
|
64
|
+
console.log(blocks);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `setBlocks(blocks: DocBlock[]): void`
|
|
68
|
+
|
|
69
|
+
Set the document blocks.
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
editor.setBlocks([
|
|
73
|
+
{ id: '1', type: 'heading-1', content: 'Title', formats: [] },
|
|
74
|
+
{ id: '2', type: 'paragraph', content: 'Content', formats: [] },
|
|
75
|
+
]);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### `toJSON(): string`
|
|
79
|
+
|
|
80
|
+
Export the document as formatted JSON.
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
const json = editor.toJSON();
|
|
84
|
+
console.log(json);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### `fromJSON(json: string): void`
|
|
88
|
+
|
|
89
|
+
Import a document from JSON.
|
|
90
|
+
|
|
91
|
+
```javascript
|
|
92
|
+
const json = '[ {"id": "1", "type": "paragraph", "content": "Hello", "formats": []} ]';
|
|
93
|
+
editor.fromJSON(json);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### `toMarkdown(): string`
|
|
97
|
+
|
|
98
|
+
Export the document as Markdown.
|
|
99
|
+
|
|
100
|
+
```javascript
|
|
101
|
+
const markdown = editor.toMarkdown();
|
|
102
|
+
console.log(markdown);
|
|
103
|
+
// # Title
|
|
104
|
+
//
|
|
105
|
+
// Content
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `toHTML(): string`
|
|
109
|
+
|
|
110
|
+
Export the document as HTML.
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
const html = editor.toHTML();
|
|
114
|
+
console.log(html);
|
|
115
|
+
// <h1>Title</h1>
|
|
116
|
+
// <p>Content</p>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### `focus(): void`
|
|
120
|
+
|
|
121
|
+
Focus the editor (focuses the first block).
|
|
122
|
+
|
|
123
|
+
```javascript
|
|
124
|
+
editor.focus();
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### `clear(): void`
|
|
128
|
+
|
|
129
|
+
Clear all content and reset to a single empty paragraph.
|
|
130
|
+
|
|
131
|
+
```javascript
|
|
132
|
+
editor.clear();
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Events
|
|
136
|
+
|
|
137
|
+
### `doc-change`
|
|
138
|
+
|
|
139
|
+
Emitted when the document content changes.
|
|
140
|
+
|
|
141
|
+
```javascript
|
|
142
|
+
editor.addEventListener('doc-change', (e) => {
|
|
143
|
+
console.log('Changed blocks:', e.detail.blocks);
|
|
144
|
+
});
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Detail:**
|
|
148
|
+
- `blocks: DocBlock[]` - The updated blocks array
|
|
149
|
+
|
|
150
|
+
### `doc-focus`
|
|
151
|
+
|
|
152
|
+
Emitted when a block receives focus.
|
|
153
|
+
|
|
154
|
+
```javascript
|
|
155
|
+
editor.addEventListener('doc-focus', (e) => {
|
|
156
|
+
console.log('Focused block:', e.detail.blockId);
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Detail:**
|
|
161
|
+
- `blockId: string` - The ID of the focused block
|
|
162
|
+
|
|
163
|
+
### `doc-blur`
|
|
164
|
+
|
|
165
|
+
Emitted when a block loses focus.
|
|
166
|
+
|
|
167
|
+
```javascript
|
|
168
|
+
editor.addEventListener('doc-blur', (e) => {
|
|
169
|
+
console.log('Blurred block:', e.detail.blockId);
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Detail:**
|
|
174
|
+
- `blockId: string` - The ID of the blurred block
|
|
175
|
+
|
|
176
|
+
## Keyboard Shortcuts
|
|
177
|
+
|
|
178
|
+
### Editor Shortcuts
|
|
179
|
+
|
|
180
|
+
- **Enter** - Create new paragraph block
|
|
181
|
+
- **Backspace** (on empty block) - Delete block
|
|
182
|
+
- **Ctrl/Cmd+B** - Toggle bold (planned)
|
|
183
|
+
- **Ctrl/Cmd+I** - Toggle italic (planned)
|
|
184
|
+
- **Ctrl/Cmd+U** - Toggle underline (planned)
|
|
185
|
+
|
|
186
|
+
### Block Menu Shortcuts
|
|
187
|
+
|
|
188
|
+
- **/** - Open block menu
|
|
189
|
+
- **ArrowDown** - Navigate down in menu
|
|
190
|
+
- **ArrowUp** - Navigate up in menu
|
|
191
|
+
- **Enter** - Select highlighted block type
|
|
192
|
+
- **Escape** - Close block menu
|
|
193
|
+
|
|
194
|
+
## Styling
|
|
195
|
+
|
|
196
|
+
The component can be styled using CSS custom properties:
|
|
197
|
+
|
|
198
|
+
```css
|
|
199
|
+
snice-doc {
|
|
200
|
+
/* Colors */
|
|
201
|
+
--snice-doc-text-color: #333;
|
|
202
|
+
--snice-doc-background: #fff;
|
|
203
|
+
--snice-doc-muted-color: #999;
|
|
204
|
+
--snice-doc-placeholder-color: #999;
|
|
205
|
+
--snice-doc-primary-color: #0969da;
|
|
206
|
+
--snice-doc-link-color: #0969da;
|
|
207
|
+
|
|
208
|
+
/* Code blocks */
|
|
209
|
+
--snice-doc-code-background: #f6f8fa;
|
|
210
|
+
--snice-doc-code-border: #e1e4e8;
|
|
211
|
+
--snice-doc-inline-code-background: rgba(175, 184, 193, 0.2);
|
|
212
|
+
|
|
213
|
+
/* Quotes */
|
|
214
|
+
--snice-doc-quote-border: #e1e4e8;
|
|
215
|
+
|
|
216
|
+
/* Divider */
|
|
217
|
+
--snice-doc-divider-color: #e1e4e8;
|
|
218
|
+
|
|
219
|
+
/* Block menu */
|
|
220
|
+
--snice-doc-menu-background: #fff;
|
|
221
|
+
--snice-doc-menu-border: #e1e4e8;
|
|
222
|
+
--snice-doc-menu-hover: #f6f8fa;
|
|
223
|
+
|
|
224
|
+
/* Format toolbar */
|
|
225
|
+
--snice-doc-toolbar-background: #1f2328;
|
|
226
|
+
--snice-doc-toolbar-text: #fff;
|
|
227
|
+
--snice-doc-toolbar-hover: rgba(255, 255, 255, 0.1);
|
|
228
|
+
--snice-doc-toolbar-active: rgba(88, 166, 255, 0.3);
|
|
229
|
+
|
|
230
|
+
/* Spacing */
|
|
231
|
+
--snice-doc-padding: 40px 20px;
|
|
232
|
+
--snice-doc-min-height: 400px;
|
|
233
|
+
--snice-doc-max-width: 900px;
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Examples
|
|
238
|
+
|
|
239
|
+
### Readonly Document Viewer
|
|
240
|
+
|
|
241
|
+
```html
|
|
242
|
+
<snice-doc readonly></snice-doc>
|
|
243
|
+
|
|
244
|
+
<script type="module">
|
|
245
|
+
import 'snice';
|
|
246
|
+
|
|
247
|
+
const viewer = document.querySelector('snice-doc');
|
|
248
|
+
viewer.setBlocks([
|
|
249
|
+
{ id: '1', type: 'heading-1', content: 'Read Only Document', formats: [] },
|
|
250
|
+
{ id: '2', type: 'paragraph', content: 'This document cannot be edited.', formats: [] },
|
|
251
|
+
]);
|
|
252
|
+
</script>
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Document with To-do List
|
|
256
|
+
|
|
257
|
+
```html
|
|
258
|
+
<snice-doc id="todos"></snice-doc>
|
|
259
|
+
|
|
260
|
+
<script type="module">
|
|
261
|
+
import 'snice';
|
|
262
|
+
|
|
263
|
+
const todos = document.getElementById('todos');
|
|
264
|
+
todos.setBlocks([
|
|
265
|
+
{ id: '1', type: 'heading-2', content: 'My Tasks', formats: [] },
|
|
266
|
+
{ id: '2', type: 'todo', content: 'Write documentation', formats: [], checked: true },
|
|
267
|
+
{ id: '3', type: 'todo', content: 'Review PRs', formats: [], checked: false },
|
|
268
|
+
{ id: '4', type: 'todo', content: 'Deploy to production', formats: [], checked: false },
|
|
269
|
+
]);
|
|
270
|
+
</script>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Export to Multiple Formats
|
|
274
|
+
|
|
275
|
+
```html
|
|
276
|
+
<snice-doc id="editor"></snice-doc>
|
|
277
|
+
<button id="export-json">Export JSON</button>
|
|
278
|
+
<button id="export-md">Export Markdown</button>
|
|
279
|
+
<button id="export-html">Export HTML</button>
|
|
280
|
+
|
|
281
|
+
<script type="module">
|
|
282
|
+
import 'snice';
|
|
283
|
+
|
|
284
|
+
const editor = document.getElementById('editor');
|
|
285
|
+
|
|
286
|
+
document.getElementById('export-json').addEventListener('click', () => {
|
|
287
|
+
const json = editor.toJSON();
|
|
288
|
+
console.log(json);
|
|
289
|
+
// Download or copy to clipboard
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
document.getElementById('export-md').addEventListener('click', () => {
|
|
293
|
+
const markdown = editor.toMarkdown();
|
|
294
|
+
console.log(markdown);
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
document.getElementById('export-html').addEventListener('click', () => {
|
|
298
|
+
const html = editor.toHTML();
|
|
299
|
+
console.log(html);
|
|
300
|
+
});
|
|
301
|
+
</script>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Custom Styling
|
|
305
|
+
|
|
306
|
+
```html
|
|
307
|
+
<style>
|
|
308
|
+
snice-doc.dark {
|
|
309
|
+
--snice-doc-text-color: #e6edf3;
|
|
310
|
+
--snice-doc-background: #0d1117;
|
|
311
|
+
--snice-doc-muted-color: #7d8590;
|
|
312
|
+
--snice-doc-placeholder-color: #484f58;
|
|
313
|
+
--snice-doc-code-background: #161b22;
|
|
314
|
+
--snice-doc-code-border: #30363d;
|
|
315
|
+
--snice-doc-quote-border: #30363d;
|
|
316
|
+
--snice-doc-divider-color: #21262d;
|
|
317
|
+
}
|
|
318
|
+
</style>
|
|
319
|
+
|
|
320
|
+
<snice-doc class="dark"></snice-doc>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Block Data Structure
|
|
324
|
+
|
|
325
|
+
Each block in the document has the following structure:
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
interface DocBlock {
|
|
329
|
+
id: string; // Unique identifier
|
|
330
|
+
type: BlockType; // Block type (see Block Types section)
|
|
331
|
+
content: string; // Text content
|
|
332
|
+
formats: TextRange[]; // Inline formatting (future)
|
|
333
|
+
checked?: boolean; // For todo blocks
|
|
334
|
+
indent?: number; // For nested lists (future)
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
## Accessibility
|
|
339
|
+
|
|
340
|
+
- Supports keyboard navigation
|
|
341
|
+
- Uses semantic HTML in exports
|
|
342
|
+
- ARIA attributes for better screen reader support (future improvement)
|
|
343
|
+
|
|
344
|
+
## Browser Support
|
|
345
|
+
|
|
346
|
+
Works in all modern browsers that support:
|
|
347
|
+
- Custom Elements v1
|
|
348
|
+
- Shadow DOM
|
|
349
|
+
- ES2020+
|
|
350
|
+
|
|
351
|
+
## TypeScript
|
|
352
|
+
|
|
353
|
+
Full TypeScript support with exported types:
|
|
354
|
+
|
|
355
|
+
```typescript
|
|
356
|
+
import type { DocBlock, BlockType, SniceDocElement } from 'snice/doc';
|
|
357
|
+
```
|