snice 4.9.0 → 4.10.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/app-tiles.d.ts +28 -0
- package/adapters/react/app-tiles.d.ts.map +1 -0
- package/adapters/react/app-tiles.js +24 -0
- package/adapters/react/app-tiles.js.map +1 -0
- package/adapters/react/app-tiles.tsx +36 -0
- package/adapters/react/book.d.ts +28 -0
- package/adapters/react/book.d.ts.map +1 -0
- package/adapters/react/book.js +24 -0
- package/adapters/react/book.js.map +1 -0
- package/adapters/react/book.tsx +36 -0
- package/adapters/react/comments.d.ts +29 -0
- package/adapters/react/comments.d.ts.map +1 -0
- package/adapters/react/comments.js +24 -0
- package/adapters/react/comments.js.map +1 -0
- package/adapters/react/comments.tsx +37 -0
- package/adapters/react/components.d.ts +52 -0
- package/adapters/react/components.d.ts.map +1 -1
- package/adapters/react/components.js +26 -0
- package/adapters/react/components.js.map +1 -1
- package/adapters/react/components.ts +52 -0
- package/adapters/react/countdown.d.ts +31 -0
- package/adapters/react/countdown.d.ts.map +1 -0
- package/adapters/react/countdown.js +24 -0
- package/adapters/react/countdown.js.map +1 -0
- package/adapters/react/countdown.tsx +39 -0
- package/adapters/react/cropper.d.ts +29 -0
- package/adapters/react/cropper.d.ts.map +1 -0
- package/adapters/react/cropper.js +24 -0
- package/adapters/react/cropper.js.map +1 -0
- package/adapters/react/cropper.tsx +37 -0
- package/adapters/react/diff.d.ts +31 -0
- package/adapters/react/diff.d.ts.map +1 -0
- package/adapters/react/diff.js +24 -0
- package/adapters/react/diff.js.map +1 -0
- package/adapters/react/diff.tsx +39 -0
- package/adapters/react/flip-card.d.ts +28 -0
- package/adapters/react/flip-card.d.ts.map +1 -0
- package/adapters/react/flip-card.js +24 -0
- package/adapters/react/flip-card.js.map +1 -0
- package/adapters/react/flip-card.tsx +36 -0
- package/adapters/react/flow.d.ts +32 -0
- package/adapters/react/flow.d.ts.map +1 -0
- package/adapters/react/flow.js +24 -0
- package/adapters/react/flow.js.map +1 -0
- package/adapters/react/flow.tsx +40 -0
- package/adapters/react/gantt.d.ts +27 -0
- package/adapters/react/gantt.d.ts.map +1 -0
- package/adapters/react/gantt.js +24 -0
- package/adapters/react/gantt.js.map +1 -0
- package/adapters/react/gantt.tsx +35 -0
- package/adapters/react/map.d.ts +30 -0
- package/adapters/react/map.d.ts.map +1 -0
- package/adapters/react/map.js +24 -0
- package/adapters/react/map.js.map +1 -0
- package/adapters/react/map.tsx +38 -0
- package/adapters/react/markdown.d.ts +26 -0
- package/adapters/react/markdown.d.ts.map +1 -0
- package/adapters/react/markdown.js +24 -0
- package/adapters/react/markdown.js.map +1 -0
- package/adapters/react/markdown.tsx +34 -0
- package/adapters/react/notification-center.d.ts +26 -0
- package/adapters/react/notification-center.d.ts.map +1 -0
- package/adapters/react/notification-center.js +24 -0
- package/adapters/react/notification-center.js.map +1 -0
- package/adapters/react/notification-center.tsx +34 -0
- package/adapters/react/org-chart.d.ts +28 -0
- package/adapters/react/org-chart.d.ts.map +1 -0
- package/adapters/react/org-chart.js +24 -0
- package/adapters/react/org-chart.js.map +1 -0
- package/adapters/react/org-chart.tsx +36 -0
- package/adapters/react/pdf-viewer.d.ts +28 -0
- package/adapters/react/pdf-viewer.d.ts.map +1 -0
- package/adapters/react/pdf-viewer.js +24 -0
- package/adapters/react/pdf-viewer.js.map +1 -0
- package/adapters/react/pdf-viewer.tsx +36 -0
- package/adapters/react/podcast-player.d.ts +40 -0
- package/adapters/react/podcast-player.d.ts.map +1 -0
- package/adapters/react/podcast-player.js +24 -0
- package/adapters/react/podcast-player.js.map +1 -0
- package/adapters/react/podcast-player.tsx +48 -0
- package/adapters/react/pricing-table.d.ts +27 -0
- package/adapters/react/pricing-table.d.ts.map +1 -0
- package/adapters/react/pricing-table.js +24 -0
- package/adapters/react/pricing-table.js.map +1 -0
- package/adapters/react/pricing-table.tsx +35 -0
- package/adapters/react/rating.d.ts +30 -0
- package/adapters/react/rating.d.ts.map +1 -0
- package/adapters/react/rating.js +24 -0
- package/adapters/react/rating.js.map +1 -0
- package/adapters/react/rating.tsx +38 -0
- package/adapters/react/recipe.d.ts +43 -0
- package/adapters/react/recipe.d.ts.map +1 -0
- package/adapters/react/recipe.js +24 -0
- package/adapters/react/recipe.js.map +1 -0
- package/adapters/react/recipe.tsx +51 -0
- package/adapters/react/sortable.d.ts +28 -0
- package/adapters/react/sortable.d.ts.map +1 -0
- package/adapters/react/sortable.js +24 -0
- package/adapters/react/sortable.js.map +1 -0
- package/adapters/react/sortable.tsx +36 -0
- package/adapters/react/spotlight.d.ts +27 -0
- package/adapters/react/spotlight.d.ts.map +1 -0
- package/adapters/react/spotlight.js +24 -0
- package/adapters/react/spotlight.js.map +1 -0
- package/adapters/react/spotlight.tsx +35 -0
- package/adapters/react/spreadsheet.d.ts +27 -0
- package/adapters/react/spreadsheet.d.ts.map +1 -0
- package/adapters/react/spreadsheet.js +24 -0
- package/adapters/react/spreadsheet.js.map +1 -0
- package/adapters/react/spreadsheet.tsx +35 -0
- package/adapters/react/tag-input.d.ts +33 -0
- package/adapters/react/tag-input.d.ts.map +1 -0
- package/adapters/react/tag-input.js +24 -0
- package/adapters/react/tag-input.js.map +1 -0
- package/adapters/react/tag-input.tsx +41 -0
- package/adapters/react/testimonial.d.ts +31 -0
- package/adapters/react/testimonial.d.ts.map +1 -0
- package/adapters/react/testimonial.js +24 -0
- package/adapters/react/testimonial.js.map +1 -0
- package/adapters/react/testimonial.tsx +39 -0
- package/adapters/react/video-player.d.ts +34 -0
- package/adapters/react/video-player.d.ts.map +1 -0
- package/adapters/react/video-player.js +24 -0
- package/adapters/react/video-player.js.map +1 -0
- package/adapters/react/video-player.tsx +42 -0
- package/adapters/react/waterfall.d.ts +29 -0
- package/adapters/react/waterfall.d.ts.map +1 -0
- package/adapters/react/waterfall.js +24 -0
- package/adapters/react/waterfall.js.map +1 -0
- package/adapters/react/waterfall.tsx +37 -0
- package/adapters/react/weather.d.ts +27 -0
- package/adapters/react/weather.d.ts.map +1 -0
- package/adapters/react/weather.js +24 -0
- package/adapters/react/weather.js.map +1 -0
- package/adapters/react/weather.tsx +35 -0
- 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/README.md +27 -0
- package/dist/cdn/app-tiles/snice-app-tiles.js +333 -0
- package/dist/cdn/app-tiles/snice-app-tiles.js.map +1 -0
- package/dist/cdn/app-tiles/snice-app-tiles.min.js +11 -0
- package/dist/cdn/app-tiles/snice-app-tiles.min.js.map +1 -0
- 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 +27 -0
- package/dist/cdn/book/snice-book.js +353 -0
- package/dist/cdn/book/snice-book.js.map +1 -0
- package/dist/cdn/book/snice-book.min.js +13 -0
- package/dist/cdn/book/snice-book.min.js.map +1 -0
- 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 +1 -1
- package/dist/cdn/code-block/snice-code-block.min.js +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/README.md +27 -0
- package/dist/cdn/comments/snice-comments.js +544 -0
- package/dist/cdn/comments/snice-comments.js.map +1 -0
- package/dist/cdn/comments/snice-comments.min.js +100 -0
- package/dist/cdn/comments/snice-comments.min.js.map +1 -0
- package/dist/cdn/countdown/README.md +27 -0
- package/dist/cdn/countdown/snice-countdown.js +235 -0
- package/dist/cdn/countdown/snice-countdown.js.map +1 -0
- package/dist/cdn/countdown/snice-countdown.min.js +14 -0
- package/dist/cdn/countdown/snice-countdown.min.js.map +1 -0
- package/dist/cdn/cropper/README.md +27 -0
- package/dist/cdn/cropper/snice-cropper.js +352 -0
- package/dist/cdn/cropper/snice-cropper.js.map +1 -0
- package/dist/cdn/cropper/snice-cropper.min.js +25 -0
- package/dist/cdn/cropper/snice-cropper.min.js.map +1 -0
- package/dist/cdn/date-picker/snice-date-picker.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.min.js +1 -1
- package/dist/cdn/diff/README.md +27 -0
- package/dist/cdn/diff/snice-diff.js +441 -0
- package/dist/cdn/diff/snice-diff.js.map +1 -0
- package/dist/cdn/diff/snice-diff.min.js +54 -0
- package/dist/cdn/diff/snice-diff.min.js.map +1 -0
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/divider/snice-divider.min.js +1 -1
- package/dist/cdn/doc/snice-doc.js +1 -1
- package/dist/cdn/doc/snice-doc.min.js +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/README.md +27 -0
- package/dist/cdn/flip-card/snice-flip-card.js +183 -0
- package/dist/cdn/flip-card/snice-flip-card.js.map +1 -0
- package/dist/cdn/flip-card/snice-flip-card.min.js +22 -0
- package/dist/cdn/flip-card/snice-flip-card.min.js.map +1 -0
- package/dist/cdn/flow/README.md +27 -0
- package/dist/cdn/flow/snice-flow.js +822 -0
- package/dist/cdn/flow/snice-flow.js.map +1 -0
- package/dist/cdn/flow/snice-flow.min.js +17 -0
- package/dist/cdn/flow/snice-flow.min.js.map +1 -0
- package/dist/cdn/funnel/snice-funnel.js +1 -1
- package/dist/cdn/funnel/snice-funnel.min.js +1 -1
- package/dist/cdn/gantt/README.md +27 -0
- package/dist/cdn/gantt/snice-gantt.js +436 -0
- package/dist/cdn/gantt/snice-gantt.js.map +1 -0
- package/dist/cdn/gantt/snice-gantt.min.js +60 -0
- package/dist/cdn/gantt/snice-gantt.min.js.map +1 -0
- 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/snice-input.js +1 -1
- package/dist/cdn/input/snice-input.min.js +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 +1 -1
- package/dist/cdn/link-preview/snice-link-preview.min.js +1 -1
- package/dist/cdn/list/snice-list.js +1 -1
- package/dist/cdn/list/snice-list.min.js +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/README.md +27 -0
- package/dist/cdn/map/snice-map.js +415 -0
- package/dist/cdn/map/snice-map.js.map +1 -0
- package/dist/cdn/map/snice-map.min.js +52 -0
- package/dist/cdn/map/snice-map.min.js.map +1 -0
- package/dist/cdn/markdown/README.md +27 -0
- package/dist/cdn/markdown/snice-markdown.js +317 -0
- package/dist/cdn/markdown/snice-markdown.js.map +1 -0
- package/dist/cdn/markdown/snice-markdown.min.js +11 -0
- package/dist/cdn/markdown/snice-markdown.min.js.map +1 -0
- 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 +1 -1
- package/dist/cdn/menu/snice-menu.min.js +1 -1
- package/dist/cdn/modal/snice-modal.js +1 -1
- package/dist/cdn/modal/snice-modal.min.js +1 -1
- package/dist/cdn/music-player/snice-music-player.js +1 -1
- package/dist/cdn/music-player/snice-music-player.min.js +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/README.md +27 -0
- package/dist/cdn/notification-center/snice-notification-center.js +204 -0
- package/dist/cdn/notification-center/snice-notification-center.js.map +1 -0
- package/dist/cdn/notification-center/snice-notification-center.min.js +33 -0
- package/dist/cdn/notification-center/snice-notification-center.min.js.map +1 -0
- package/dist/cdn/org-chart/README.md +27 -0
- package/dist/cdn/org-chart/snice-org-chart.js +294 -0
- package/dist/cdn/org-chart/snice-org-chart.js.map +1 -0
- package/dist/cdn/org-chart/snice-org-chart.min.js +32 -0
- package/dist/cdn/org-chart/snice-org-chart.min.js.map +1 -0
- 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/README.md +27 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +594 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js.map +1 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +88 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js.map +1 -0
- package/dist/cdn/podcast-player/README.md +27 -0
- package/dist/cdn/podcast-player/snice-podcast-player.js +835 -0
- package/dist/cdn/podcast-player/snice-podcast-player.js.map +1 -0
- package/dist/cdn/podcast-player/snice-podcast-player.min.js +209 -0
- package/dist/cdn/podcast-player/snice-podcast-player.min.js.map +1 -0
- package/dist/cdn/pricing-table/README.md +27 -0
- package/dist/cdn/pricing-table/snice-pricing-table.js +491 -0
- package/dist/cdn/pricing-table/snice-pricing-table.js.map +1 -0
- package/dist/cdn/pricing-table/snice-pricing-table.min.js +141 -0
- package/dist/cdn/pricing-table/snice-pricing-table.min.js.map +1 -0
- 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/snice-radio.js +1 -1
- package/dist/cdn/radio/snice-radio.min.js +1 -1
- package/dist/cdn/rating/README.md +27 -0
- package/dist/cdn/rating/snice-rating.js +210 -0
- package/dist/cdn/rating/snice-rating.js.map +1 -0
- package/dist/cdn/rating/snice-rating.min.js +25 -0
- package/dist/cdn/rating/snice-rating.min.js.map +1 -0
- package/dist/cdn/recipe/README.md +27 -0
- package/dist/cdn/recipe/snice-recipe.js +619 -0
- package/dist/cdn/recipe/snice-recipe.js.map +1 -0
- package/dist/cdn/recipe/snice-recipe.min.js +185 -0
- package/dist/cdn/recipe/snice-recipe.min.js.map +1 -0
- package/dist/cdn/runtime/snice-runtime.esm.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +3 -3
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +3 -3
- 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/snice-select.js +1 -1
- package/dist/cdn/select/snice-select.min.js +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/README.md +27 -0
- package/dist/cdn/sortable/snice-sortable.js +254 -0
- package/dist/cdn/sortable/snice-sortable.js.map +1 -0
- package/dist/cdn/sortable/snice-sortable.min.js +12 -0
- package/dist/cdn/sortable/snice-sortable.min.js.map +1 -0
- 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/README.md +27 -0
- package/dist/cdn/spotlight/snice-spotlight.js +397 -0
- package/dist/cdn/spotlight/snice-spotlight.js.map +1 -0
- package/dist/cdn/spotlight/snice-spotlight.min.js +8 -0
- package/dist/cdn/spotlight/snice-spotlight.min.js.map +1 -0
- package/dist/cdn/spreadsheet/README.md +27 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.js +1171 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.js.map +1 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +30 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js.map +1 -0
- package/dist/cdn/stepper/snice-stepper.js +1 -1
- package/dist/cdn/stepper/snice-stepper.min.js +1 -1
- package/dist/cdn/switch/snice-switch.js +1 -1
- package/dist/cdn/switch/snice-switch.min.js +1 -1
- package/dist/cdn/table/snice-table.js +1 -1
- package/dist/cdn/table/snice-table.min.js +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/README.md +27 -0
- package/dist/cdn/tag-input/snice-tag-input.js +387 -0
- package/dist/cdn/tag-input/snice-tag-input.js.map +1 -0
- package/dist/cdn/tag-input/snice-tag-input.min.js +65 -0
- package/dist/cdn/tag-input/snice-tag-input.min.js.map +1 -0
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/testimonial/README.md +27 -0
- package/dist/cdn/testimonial/snice-testimonial.js +187 -0
- package/dist/cdn/testimonial/snice-testimonial.js.map +1 -0
- package/dist/cdn/testimonial/snice-testimonial.min.js +21 -0
- package/dist/cdn/testimonial/snice-testimonial.min.js.map +1 -0
- 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/snice-toast.js +1 -1
- package/dist/cdn/toast/snice-toast.min.js +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/README.md +27 -0
- package/dist/cdn/video-player/snice-video-player.js +721 -0
- package/dist/cdn/video-player/snice-video-player.js.map +1 -0
- package/dist/cdn/video-player/snice-video-player.min.js +153 -0
- package/dist/cdn/video-player/snice-video-player.min.js.map +1 -0
- 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/README.md +27 -0
- package/dist/cdn/waterfall/snice-waterfall.js +292 -0
- package/dist/cdn/waterfall/snice-waterfall.js.map +1 -0
- package/dist/cdn/waterfall/snice-waterfall.min.js +12 -0
- package/dist/cdn/waterfall/snice-waterfall.min.js.map +1 -0
- package/dist/cdn/weather/README.md +27 -0
- package/dist/cdn/weather/snice-weather.js +194 -0
- package/dist/cdn/weather/snice-weather.js.map +1 -0
- package/dist/cdn/weather/snice-weather.min.js +42 -0
- package/dist/cdn/weather/snice-weather.min.js.map +1 -0
- package/dist/components/app-tiles/snice-app-tiles.d.ts +36 -0
- package/dist/components/app-tiles/snice-app-tiles.js +265 -0
- package/dist/components/app-tiles/snice-app-tiles.js.map +1 -0
- package/dist/components/app-tiles/snice-app-tiles.types.d.ts +22 -0
- package/dist/components/book/snice-book.d.ts +46 -0
- package/dist/components/book/snice-book.js +285 -0
- package/dist/components/book/snice-book.js.map +1 -0
- package/dist/components/book/snice-book.types.d.ts +21 -0
- package/dist/components/comments/snice-comments.d.ts +62 -0
- package/dist/components/comments/snice-comments.js +476 -0
- package/dist/components/comments/snice-comments.js.map +1 -0
- package/dist/components/comments/snice-comments.types.d.ts +64 -0
- package/dist/components/countdown/snice-countdown.d.ts +21 -0
- package/dist/components/countdown/snice-countdown.js +168 -0
- package/dist/components/countdown/snice-countdown.js.map +1 -0
- package/dist/components/countdown/snice-countdown.types.d.ts +18 -0
- package/dist/components/cropper/snice-cropper.d.ts +32 -0
- package/dist/components/cropper/snice-cropper.js +285 -0
- package/dist/components/cropper/snice-cropper.js.map +1 -0
- package/dist/components/cropper/snice-cropper.types.d.ts +26 -0
- package/dist/components/diff/snice-diff.d.ts +32 -0
- package/dist/components/diff/snice-diff.js +374 -0
- package/dist/components/diff/snice-diff.js.map +1 -0
- package/dist/components/diff/snice-diff.types.d.ts +26 -0
- package/dist/components/flip-card/snice-flip-card.d.ts +15 -0
- package/dist/components/flip-card/snice-flip-card.js +116 -0
- package/dist/components/flip-card/snice-flip-card.js.map +1 -0
- package/dist/components/flip-card/snice-flip-card.types.d.ts +16 -0
- package/dist/components/flow/snice-flow.d.ts +91 -0
- package/dist/components/flow/snice-flow.js +755 -0
- package/dist/components/flow/snice-flow.js.map +1 -0
- package/dist/components/flow/snice-flow.types.d.ts +64 -0
- package/dist/components/gantt/snice-gantt.d.ts +34 -0
- package/dist/components/gantt/snice-gantt.js +369 -0
- package/dist/components/gantt/snice-gantt.js.map +1 -0
- package/dist/components/gantt/snice-gantt.types.d.ts +37 -0
- package/dist/components/map/snice-map.d.ts +44 -0
- package/dist/components/map/snice-map.js +348 -0
- package/dist/components/map/snice-map.js.map +1 -0
- package/dist/components/map/snice-map.types.d.ts +41 -0
- package/dist/components/markdown/snice-markdown.d.ts +24 -0
- package/dist/components/markdown/snice-markdown.js +250 -0
- package/dist/components/markdown/snice-markdown.js.map +1 -0
- package/dist/components/markdown/snice-markdown.types.d.ts +16 -0
- package/dist/components/notification-center/snice-notification-center.d.ts +18 -0
- package/dist/components/notification-center/snice-notification-center.js +137 -0
- package/dist/components/notification-center/snice-notification-center.js.map +1 -0
- package/dist/components/notification-center/snice-notification-center.types.d.ts +24 -0
- package/dist/components/org-chart/snice-org-chart.d.ts +28 -0
- package/dist/components/org-chart/snice-org-chart.js +227 -0
- package/dist/components/org-chart/snice-org-chart.js.map +1 -0
- package/dist/components/org-chart/snice-org-chart.types.d.ts +28 -0
- package/dist/components/pdf-viewer/pdf.min.mjs +21 -0
- package/dist/components/pdf-viewer/pdf.worker.min.mjs +21 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.d.ts +59 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.js +527 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.js.map +1 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.types.d.ts +25 -0
- package/dist/components/podcast-player/snice-podcast-player.d.ts +72 -0
- package/dist/components/podcast-player/snice-podcast-player.js +768 -0
- package/dist/components/podcast-player/snice-podcast-player.js.map +1 -0
- package/dist/components/podcast-player/snice-podcast-player.types.d.ts +79 -0
- package/dist/components/pricing-table/snice-pricing-table.d.ts +51 -0
- package/dist/components/pricing-table/snice-pricing-table.js +422 -0
- package/dist/components/pricing-table/snice-pricing-table.js.map +1 -0
- package/dist/components/pricing-table/snice-pricing-table.types.d.ts +49 -0
- package/dist/components/rating/snice-rating.d.ts +15 -0
- package/dist/components/rating/snice-rating.js +143 -0
- package/dist/components/rating/snice-rating.js.map +1 -0
- package/dist/components/rating/snice-rating.types.d.ts +15 -0
- package/dist/components/recipe/snice-recipe.d.ts +53 -0
- package/dist/components/recipe/snice-recipe.js +552 -0
- package/dist/components/recipe/snice-recipe.js.map +1 -0
- package/dist/components/recipe/snice-recipe.types.d.ts +56 -0
- package/dist/components/sortable/snice-sortable.d.ts +24 -0
- package/dist/components/sortable/snice-sortable.js +187 -0
- package/dist/components/sortable/snice-sortable.js.map +1 -0
- package/dist/components/sortable/snice-sortable.types.d.ts +20 -0
- package/dist/components/spotlight/snice-spotlight.d.ts +42 -0
- package/dist/components/spotlight/snice-spotlight.js +330 -0
- package/dist/components/spotlight/snice-spotlight.js.map +1 -0
- package/dist/components/spotlight/snice-spotlight.types.d.ts +26 -0
- package/dist/components/spreadsheet/snice-spreadsheet.d.ts +102 -0
- package/dist/components/spreadsheet/snice-spreadsheet.js +1104 -0
- package/dist/components/spreadsheet/snice-spreadsheet.js.map +1 -0
- package/dist/components/spreadsheet/snice-spreadsheet.types.d.ts +54 -0
- package/dist/components/tag-input/snice-tag-input.d.ts +40 -0
- package/dist/components/tag-input/snice-tag-input.js +320 -0
- package/dist/components/tag-input/snice-tag-input.js.map +1 -0
- package/dist/components/tag-input/snice-tag-input.types.d.ts +29 -0
- package/dist/components/testimonial/snice-testimonial.d.ts +15 -0
- package/dist/components/testimonial/snice-testimonial.js +120 -0
- package/dist/components/testimonial/snice-testimonial.js.map +1 -0
- package/dist/components/testimonial/snice-testimonial.types.d.ts +10 -0
- package/dist/components/video-player/snice-video-player.d.ts +78 -0
- package/dist/components/video-player/snice-video-player.js +654 -0
- package/dist/components/video-player/snice-video-player.js.map +1 -0
- package/dist/components/video-player/snice-video-player.types.d.ts +47 -0
- package/dist/components/waterfall/snice-waterfall.d.ts +30 -0
- package/dist/components/waterfall/snice-waterfall.js +225 -0
- package/dist/components/waterfall/snice-waterfall.js.map +1 -0
- package/dist/components/waterfall/snice-waterfall.types.d.ts +23 -0
- package/dist/components/weather/snice-weather.d.ts +10 -0
- package/dist/components/weather/snice-weather.js +127 -0
- package/dist/components/weather/snice-weather.js.map +1 -0
- package/dist/components/weather/snice-weather.types.d.ts +22 -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/DEVELOPMENT.md +1 -1
- package/docs/ai/api.md +6 -3
- package/docs/ai/components/accordion.md +0 -34
- package/docs/ai/components/app-tiles.md +77 -0
- package/docs/ai/components/audio-recorder.md +2 -0
- package/docs/ai/components/badge.md +7 -0
- package/docs/ai/components/book.md +78 -0
- package/docs/ai/components/button.md +5 -0
- package/docs/ai/components/chart.md +0 -24
- package/docs/ai/components/chat.md +7 -95
- package/docs/ai/components/code-block.md +3 -82
- package/docs/ai/components/color-display.md +3 -3
- package/docs/ai/components/color-picker.md +4 -4
- package/docs/ai/components/comments.md +75 -0
- package/docs/ai/components/countdown.md +54 -0
- package/docs/ai/components/cropper.md +57 -0
- package/docs/ai/components/date-picker.md +15 -9
- package/docs/ai/components/diff.md +66 -0
- package/docs/ai/components/divider.md +1 -1
- package/docs/ai/components/draw.md +5 -5
- package/docs/ai/components/drawer.md +5 -5
- package/docs/ai/components/empty-state.md +2 -2
- package/docs/ai/components/file-gallery.md +16 -87
- package/docs/ai/components/file-upload.md +6 -6
- package/docs/ai/components/flip-card.md +52 -0
- package/docs/ai/components/flow.md +104 -0
- package/docs/ai/components/funnel.md +3 -3
- package/docs/ai/components/gantt.md +63 -0
- package/docs/ai/components/gauge.md +1 -1
- package/docs/ai/components/heatmap.md +5 -5
- package/docs/ai/components/input.md +20 -18
- package/docs/ai/components/kanban.md +2 -2
- package/docs/ai/components/kpi.md +4 -53
- package/docs/ai/components/layout.md +10 -235
- package/docs/ai/components/link-preview.md +20 -29
- package/docs/ai/components/link.md +27 -47
- package/docs/ai/components/list.md +51 -31
- package/docs/ai/components/location.md +15 -27
- package/docs/ai/components/login.md +43 -94
- package/docs/ai/components/map.md +72 -0
- package/docs/ai/components/markdown.md +63 -0
- package/docs/ai/components/masonry.md +10 -6
- package/docs/ai/components/menu.md +40 -72
- package/docs/ai/components/modal.md +25 -42
- package/docs/ai/components/music-player.md +37 -89
- package/docs/ai/components/nav.md +25 -39
- package/docs/ai/components/network-graph.md +39 -43
- package/docs/ai/components/notification-center.md +79 -0
- package/docs/ai/components/org-chart.md +62 -0
- package/docs/ai/components/pagination.md +16 -18
- package/docs/ai/components/pdf-viewer.md +57 -0
- package/docs/ai/components/podcast-player.md +94 -0
- package/docs/ai/components/pricing-table.md +87 -0
- package/docs/ai/components/progress.md +23 -39
- package/docs/ai/components/qr-code.md +37 -84
- package/docs/ai/components/qr-reader.md +51 -61
- package/docs/ai/components/radio.md +27 -39
- package/docs/ai/components/rating.md +56 -0
- package/docs/ai/components/recipe.md +90 -0
- package/docs/ai/components/skeleton.md +0 -8
- package/docs/ai/components/slider.md +10 -50
- package/docs/ai/components/sortable.md +57 -0
- package/docs/ai/components/sparkline.md +26 -152
- package/docs/ai/components/spinner.md +0 -21
- package/docs/ai/components/split-pane.md +16 -38
- package/docs/ai/components/spotlight.md +61 -0
- package/docs/ai/components/spreadsheet.md +138 -0
- package/docs/ai/components/stepper.md +37 -183
- package/docs/ai/components/switch.md +28 -35
- package/docs/ai/components/table.md +43 -172
- package/docs/ai/components/tabs.md +31 -52
- package/docs/ai/components/tag-input.md +70 -0
- package/docs/ai/components/terminal.md +34 -116
- package/docs/ai/components/testimonial.md +56 -0
- package/docs/ai/components/textarea.md +11 -43
- package/docs/ai/components/theme.md +120 -0
- package/docs/ai/components/time-range-picker.md +17 -49
- package/docs/ai/components/timeline.md +7 -46
- package/docs/ai/components/timer.md +41 -37
- package/docs/ai/components/toast.md +19 -90
- package/docs/ai/components/tooltip.md +17 -104
- package/docs/ai/components/tree.md +38 -162
- package/docs/ai/components/treemap.md +23 -44
- package/docs/ai/components/video-player.md +91 -0
- package/docs/ai/components/virtual-scroller.md +23 -46
- package/docs/ai/components/waterfall.md +56 -0
- package/docs/ai/components/weather.md +78 -0
- package/docs/ai/decorators.md +25 -3
- package/docs/ai/patterns.md +17 -1
- package/docs/components/accordion.md +8 -6
- package/docs/components/alert.md +2 -0
- package/docs/components/app-tiles.md +162 -0
- package/docs/components/audio-recorder.md +6 -0
- package/docs/components/avatar.md +225 -0
- package/docs/components/badge.md +2 -0
- package/docs/components/banner.md +2 -0
- package/docs/components/book.md +184 -0
- package/docs/components/breadcrumbs.md +2 -0
- package/docs/components/button.md +15 -0
- package/docs/components/calendar.md +2 -0
- package/docs/components/camera-annotate.md +2 -0
- package/docs/components/camera.md +2 -0
- package/docs/components/candlestick.md +2 -0
- package/docs/components/card.md +2 -0
- package/docs/components/carousel.md +205 -36
- package/docs/components/chart.md +2 -0
- package/docs/components/chat.md +2 -0
- package/docs/components/checkbox.md +2 -0
- package/docs/components/chip.md +2 -0
- package/docs/components/code-block.md +2 -0
- package/docs/components/color-display.md +2 -0
- package/docs/components/color-picker.md +6 -4
- package/docs/components/command-palette.md +2 -0
- package/docs/components/comments.md +235 -0
- package/docs/components/countdown.md +121 -0
- package/docs/components/cropper.md +152 -0
- package/docs/components/date-picker.md +201 -0
- package/docs/components/diff.md +177 -0
- package/docs/components/divider.md +132 -0
- package/docs/components/doc.md +2 -0
- package/docs/components/draw.md +2 -0
- package/docs/components/drawer.md +2 -0
- package/docs/components/empty-state.md +2 -0
- package/docs/components/file-gallery.md +2 -0
- package/docs/components/file-upload.md +2 -0
- package/docs/components/flip-card.md +169 -0
- package/docs/components/flow.md +208 -0
- package/docs/components/funnel.md +2 -0
- package/docs/components/gantt.md +187 -0
- package/docs/components/gauge.md +2 -0
- package/docs/components/heatmap.md +2 -0
- package/docs/components/image.md +2 -0
- package/docs/components/input.md +242 -0
- package/docs/components/kanban.md +2 -0
- package/docs/components/kpi.md +2 -0
- package/docs/components/layout.md +84 -0
- package/docs/components/link-preview.md +66 -92
- package/docs/components/link.md +73 -157
- package/docs/components/list.md +140 -44
- package/docs/components/location.md +96 -283
- package/docs/components/login.md +131 -498
- package/docs/components/map.md +203 -0
- package/docs/components/markdown.md +220 -0
- package/docs/components/masonry.md +57 -102
- package/docs/components/menu.md +87 -494
- package/docs/components/modal.md +83 -436
- package/docs/components/music-player.md +116 -221
- package/docs/components/nav.md +107 -170
- package/docs/components/network-graph.md +83 -111
- package/docs/components/notification-center.md +256 -0
- package/docs/components/org-chart.md +275 -0
- package/docs/components/pagination.md +75 -218
- package/docs/components/paint.md +108 -73
- package/docs/components/pdf-viewer.md +204 -0
- package/docs/components/podcast-player.md +277 -0
- package/docs/components/pricing-table.md +249 -0
- package/docs/components/progress.md +169 -0
- package/docs/components/qr-code.md +95 -378
- package/docs/components/qr-reader.md +83 -258
- package/docs/components/radio.md +151 -0
- package/docs/components/rating.md +154 -0
- package/docs/components/recipe.md +323 -0
- package/docs/components/sankey.md +84 -107
- package/docs/components/select.md +114 -485
- package/docs/components/skeleton.md +96 -0
- package/docs/components/slider.md +92 -235
- package/docs/components/sortable.md +267 -0
- package/docs/components/sparkline.md +76 -222
- package/docs/components/spinner.md +37 -18
- package/docs/components/split-pane.md +62 -226
- package/docs/components/spotlight.md +240 -0
- package/docs/components/spreadsheet.md +405 -0
- package/docs/components/stepper.md +72 -306
- package/docs/components/switch.md +69 -293
- package/docs/components/table.md +250 -0
- package/docs/components/tabs.md +92 -471
- package/docs/components/tag-input.md +257 -0
- package/docs/components/terminal.md +87 -391
- package/docs/components/testimonial.md +185 -0
- package/docs/components/textarea.md +96 -181
- package/docs/components/theme.md +216 -0
- package/docs/components/time-range-picker.md +99 -151
- package/docs/components/timeline.md +67 -115
- package/docs/components/timer.md +44 -86
- package/docs/components/toast.md +93 -432
- package/docs/components/tooltip.md +75 -419
- package/docs/components/tree.md +110 -436
- package/docs/components/treemap.md +86 -129
- package/docs/components/video-player.md +336 -0
- package/docs/components/virtual-scroller.md +86 -226
- package/docs/components/waterfall.md +217 -0
- package/docs/components/weather.md +239 -0
- package/package.json +1 -1
- package/docs/ai/components/popover.md +0 -70
- package/docs/components/popover.md +0 -333
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# snice-comments
|
|
2
|
+
|
|
3
|
+
Threaded comment system with replies, likes, avatars, and real-time relative timestamps.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
comments: Comment[] = [] // Array of comment objects (set via JS)
|
|
9
|
+
currentUser: string = '' // attr: current-user — name of logged-in user (enables delete on own comments)
|
|
10
|
+
allowReplies: boolean = true // attr: allow-replies — enable nested replies
|
|
11
|
+
allowLikes: boolean = true // attr: allow-likes — enable like/unlike
|
|
12
|
+
maxDepth: number = 3 // attr: max-depth — max nesting depth for replies
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Types
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
interface Comment {
|
|
19
|
+
id: string;
|
|
20
|
+
author: string;
|
|
21
|
+
avatar?: string; // URL for avatar image
|
|
22
|
+
text: string;
|
|
23
|
+
timestamp: string; // ISO date string
|
|
24
|
+
replies?: Comment[];
|
|
25
|
+
likes?: number;
|
|
26
|
+
liked?: boolean;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Events
|
|
31
|
+
|
|
32
|
+
- `comment-add` -> `{ id: string, text: string, author: string }`
|
|
33
|
+
- `comment-reply` -> `{ id: string, text: string, author: string, parentId: string }`
|
|
34
|
+
- `comment-delete` -> `{ id: string }`
|
|
35
|
+
- `comment-like` -> `{ id: string, likes: number, liked: boolean }`
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
- `addComment(text: string, parentId?: string): void` — Add top-level or reply comment
|
|
40
|
+
- `deleteComment(id: string): void` — Remove a comment by ID
|
|
41
|
+
- `likeComment(id: string): void` — Toggle like on a comment
|
|
42
|
+
|
|
43
|
+
## CSS Custom Properties
|
|
44
|
+
|
|
45
|
+
```css
|
|
46
|
+
--comments-bg /* Background color */
|
|
47
|
+
--comments-border /* Border color */
|
|
48
|
+
--comments-text /* Primary text */
|
|
49
|
+
--comments-text-secondary /* Author name, secondary text */
|
|
50
|
+
--comments-text-tertiary /* Timestamps, placeholders */
|
|
51
|
+
--comments-primary /* Submit button, active like color */
|
|
52
|
+
--comments-danger /* Delete action hover color */
|
|
53
|
+
--comments-bg-element /* Avatar background, hover states */
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## CSS Parts
|
|
57
|
+
|
|
58
|
+
- `base` — Root container
|
|
59
|
+
- `input-area` — New comment input area
|
|
60
|
+
- `list` — Comments list container
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<snice-comments current-user="Alice" allow-replies max-depth="3"></snice-comments>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
const comments = document.querySelector('snice-comments');
|
|
70
|
+
comments.comments = [
|
|
71
|
+
{ id: '1', author: 'Bob', text: 'Great post!', timestamp: '2026-02-20T10:00:00Z', likes: 3 },
|
|
72
|
+
{ id: '2', author: 'Alice', text: 'Thanks!', timestamp: '2026-02-20T11:00:00Z', likes: 0 }
|
|
73
|
+
];
|
|
74
|
+
comments.addEventListener('comment-add', e => console.log(e.detail));
|
|
75
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# snice-countdown
|
|
2
|
+
|
|
3
|
+
Countdown timer to a target date with multiple display formats and visual variants.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
target: string = '' // attr: target — ISO date string to count down to
|
|
9
|
+
format: CountdownFormat = 'dhms' // attr: format — 'dhms' | 'hms' | 'ms'
|
|
10
|
+
variant: CountdownVariant = 'simple' // attr: variant — 'simple' | 'flip' | 'circular'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Events
|
|
14
|
+
|
|
15
|
+
- `countdown-complete` -> `void` — Fires when countdown reaches zero
|
|
16
|
+
- `countdown-tick` -> `{ days: number, hours: number, minutes: number, seconds: number, total: number }` — Fires every second
|
|
17
|
+
|
|
18
|
+
## CSS Custom Properties
|
|
19
|
+
|
|
20
|
+
Uses standard snice design tokens:
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
--snice-font-family
|
|
24
|
+
--snice-font-size-2xl /* Digit size */
|
|
25
|
+
--snice-font-size-xs /* Label size */
|
|
26
|
+
--snice-color-text /* Digit color */
|
|
27
|
+
--snice-color-text-secondary /* Label color */
|
|
28
|
+
--snice-color-text-tertiary /* Separator color */
|
|
29
|
+
--snice-color-background-element /* Flip variant card bg */
|
|
30
|
+
--snice-color-border /* Flip variant border */
|
|
31
|
+
--snice-color-primary /* Circular variant ring color */
|
|
32
|
+
--snice-color-success /* Complete state color */
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Behavior
|
|
36
|
+
|
|
37
|
+
- Ticks every second, auto-stops on completion
|
|
38
|
+
- Adds `.complete` class to host when finished
|
|
39
|
+
- `format` controls which segments display:
|
|
40
|
+
- `dhms`: Days, Hours, Min, Sec
|
|
41
|
+
- `hms`: Hours, Min, Sec
|
|
42
|
+
- `ms`: Min, Sec
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<snice-countdown target="2026-12-31T00:00:00Z" format="dhms" variant="flip"></snice-countdown>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
const cd = document.querySelector('snice-countdown');
|
|
52
|
+
cd.addEventListener('countdown-complete', () => alert('Done!'));
|
|
53
|
+
cd.addEventListener('countdown-tick', e => console.log(e.detail.total));
|
|
54
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# snice-cropper
|
|
2
|
+
|
|
3
|
+
Image cropping component with draggable/resizable crop area, rotation, zoom, aspect ratio lock, and rule-of-thirds grid.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
src: string = '' // attr: src — Image URL to crop
|
|
9
|
+
aspectRatio: number = 0 // attr: aspect-ratio — Lock ratio (0 = free, e.g. 1.777 for 16:9)
|
|
10
|
+
minWidth: number = 20 // attr: min-width — Min crop width in px
|
|
11
|
+
minHeight: number = 20 // attr: min-height — Min crop height in px
|
|
12
|
+
outputType: CropperOutputType = 'png' // attr: output-type — 'png' | 'jpeg' | 'webp'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Events
|
|
16
|
+
|
|
17
|
+
- `crop-change` -> `{ rect: { x: number, y: number, width: number, height: number } }` — Fires on crop area move/resize
|
|
18
|
+
- `crop-complete` -> `{ blob: Blob | null }` — Fires after `crop()` produces output
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
- `crop(): Promise<Blob | null>` — Produce cropped image blob
|
|
23
|
+
- `rotate(degrees: number): void` — Rotate image by degrees (cumulative)
|
|
24
|
+
- `zoom(level: number): void` — Set zoom level (0.1 to 10)
|
|
25
|
+
- `reset(): void` — Reset rotation, zoom, and crop area to defaults
|
|
26
|
+
|
|
27
|
+
## CSS Custom Properties
|
|
28
|
+
|
|
29
|
+
```css
|
|
30
|
+
--snice-color-background-element /* Container background */
|
|
31
|
+
--snice-color-border /* Container border */
|
|
32
|
+
--snice-border-radius-lg /* Container radius */
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Behavior
|
|
36
|
+
|
|
37
|
+
- Crop area is draggable (move) and resizable via 8 corner/edge handles
|
|
38
|
+
- Rule-of-thirds grid overlay on crop area
|
|
39
|
+
- Dark mask outside crop area
|
|
40
|
+
- Aspect ratio enforced on resize when `aspectRatio > 0`
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<snice-cropper src="/photo.jpg" aspect-ratio="1" output-type="jpeg"></snice-cropper>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
const cropper = document.querySelector('snice-cropper');
|
|
50
|
+
const blob = await cropper.crop();
|
|
51
|
+
|
|
52
|
+
// Rotate 90 degrees clockwise
|
|
53
|
+
cropper.rotate(90);
|
|
54
|
+
|
|
55
|
+
// Zoom in
|
|
56
|
+
cropper.zoom(1.5);
|
|
57
|
+
```
|
|
@@ -20,9 +20,10 @@ max: string = ''; // Max date (ISO format)
|
|
|
20
20
|
size: 'small'|'medium'|'large' = 'medium';
|
|
21
21
|
name: string = '';
|
|
22
22
|
label: string = '';
|
|
23
|
-
helperText: string = '';
|
|
24
|
-
errorText: string = '';
|
|
25
|
-
|
|
23
|
+
helperText: string = ''; // attribute: helper-text
|
|
24
|
+
errorText: string = ''; // attribute: error-text
|
|
25
|
+
showCalendar: boolean = false; // attribute: show-calendar
|
|
26
|
+
firstDayOfWeek: number = 0; // attribute: first-day-of-week, 0=Sun, 1=Mon, etc.
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
## Methods
|
|
@@ -35,15 +36,20 @@ firstDayOfWeek: number = 0; // 0=Sun, 1=Mon, etc.
|
|
|
35
36
|
- `selectDate(date: Date)` - Programmatically select a date
|
|
36
37
|
- `goToMonth(year, month)` - Navigate to specific month
|
|
37
38
|
- `goToToday()` - Navigate to and select today
|
|
39
|
+
- `checkValidity()` - Check input validity
|
|
40
|
+
- `reportValidity()` - Report input validity
|
|
41
|
+
- `setCustomValidity(message)` - Set custom validation message
|
|
38
42
|
|
|
39
43
|
## Events
|
|
40
44
|
|
|
41
|
-
- `datepicker-
|
|
42
|
-
- `datepicker-
|
|
43
|
-
- `datepicker-
|
|
44
|
-
- `datepicker-
|
|
45
|
-
- `datepicker-
|
|
46
|
-
- `datepicker-
|
|
45
|
+
- `datepicker-input` → {value, datePicker}
|
|
46
|
+
- `datepicker-change` → {value, date, formatted, iso, datePicker}
|
|
47
|
+
- `datepicker-focus` → {datePicker}
|
|
48
|
+
- `datepicker-blur` → {datePicker}
|
|
49
|
+
- `datepicker-open` → {datePicker}
|
|
50
|
+
- `datepicker-close` → {datePicker}
|
|
51
|
+
- `datepicker-clear` → {datePicker}
|
|
52
|
+
- `datepicker-select` → {date, formatted, iso, datePicker}
|
|
47
53
|
|
|
48
54
|
## Usage
|
|
49
55
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# snice-diff
|
|
2
|
+
|
|
3
|
+
Text diff viewer with unified and split (side-by-side) modes, line numbers, collapsible unchanged sections, and addition/deletion stats.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
oldText: string = '' // attr: old-text — Original text
|
|
9
|
+
newText: string = '' // attr: new-text — Modified text
|
|
10
|
+
language: string = '' // attr: language — Language hint (for future syntax highlighting)
|
|
11
|
+
mode: DiffMode = 'unified' // attr: mode — 'unified' | 'split'
|
|
12
|
+
lineNumbers: boolean = true // attr: line-numbers — Show line number gutters
|
|
13
|
+
contextLines: number = 3 // attr: context-lines — Unchanged lines shown around changes
|
|
14
|
+
markers: boolean = true // attr: markers — Show +/- markers column
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Events
|
|
18
|
+
|
|
19
|
+
- `diff-computed` -> `{ hunks: DiffHunk[], additions: number, deletions: number }` — Fires after diff is calculated
|
|
20
|
+
|
|
21
|
+
## Types
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
interface DiffLine {
|
|
25
|
+
type: 'added' | 'removed' | 'unchanged';
|
|
26
|
+
oldLine: number | null;
|
|
27
|
+
newLine: number | null;
|
|
28
|
+
content: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface DiffHunk {
|
|
32
|
+
lines: DiffLine[];
|
|
33
|
+
collapsed: boolean;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## CSS Custom Properties
|
|
38
|
+
|
|
39
|
+
```css
|
|
40
|
+
--snice-diff-added-bg /* Added line background */
|
|
41
|
+
--snice-diff-removed-bg /* Removed line background */
|
|
42
|
+
--snice-diff-added-word-bg /* Word-level added highlight */
|
|
43
|
+
--snice-diff-removed-word-bg /* Word-level removed highlight */
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Behavior
|
|
47
|
+
|
|
48
|
+
- LCS-based diff algorithm computes on `oldText`/`newText`/`contextLines` change
|
|
49
|
+
- Unchanged sections beyond context are collapsed; click to expand
|
|
50
|
+
- Header shows +N/-N stats and unified/split toggle buttons
|
|
51
|
+
- Dark mode support via `[data-theme="dark"]` or `prefers-color-scheme: dark`
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<snice-diff old-text="hello world" new-text="hello there" mode="unified" context-lines="3"></snice-diff>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
const diff = document.querySelector('snice-diff');
|
|
61
|
+
diff.oldText = originalCode;
|
|
62
|
+
diff.newText = modifiedCode;
|
|
63
|
+
diff.addEventListener('diff-computed', e => {
|
|
64
|
+
console.log(`+${e.detail.additions} -${e.detail.deletions}`);
|
|
65
|
+
});
|
|
66
|
+
```
|
|
@@ -10,7 +10,7 @@ variant: 'solid'|'dashed'|'dotted' = 'solid';
|
|
|
10
10
|
spacing: 'none'|'small'|'medium'|'large' = 'medium';
|
|
11
11
|
align: 'start'|'center'|'end' = 'center';
|
|
12
12
|
text: string = '';
|
|
13
|
-
textBackground: string = '';
|
|
13
|
+
textBackground: string = ''; // attribute: text-background
|
|
14
14
|
color: string = '';
|
|
15
15
|
capped: boolean = false;
|
|
16
16
|
```
|
|
@@ -9,14 +9,14 @@ width: number = 800;
|
|
|
9
9
|
height: number = 600;
|
|
10
10
|
tool: 'pen'|'eraser'|'line'|'rectangle'|'circle'|'text' = 'pen';
|
|
11
11
|
color: string = '#000000';
|
|
12
|
-
strokeWidth: number = 2;
|
|
13
|
-
backgroundColor: string = '#ffffff';
|
|
12
|
+
strokeWidth: number = 2; // attribute: stroke-width
|
|
13
|
+
backgroundColor: string = '#ffffff'; // attribute: background-color
|
|
14
14
|
lazy: boolean = false;
|
|
15
|
-
lazyRadius: number = 60;
|
|
15
|
+
lazyRadius: number = 60; // attribute: lazy-radius
|
|
16
16
|
friction: number = 0.1;
|
|
17
17
|
smoothing: number = 0.5;
|
|
18
|
-
autoPolygon: boolean = false;
|
|
19
|
-
polygonCurvePoints: number = 10;
|
|
18
|
+
autoPolygon: boolean = false; // attribute: auto-polygon
|
|
19
|
+
polygonCurvePoints: number = 10; // attribute: polygon-curve-points
|
|
20
20
|
disabled: boolean = false;
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -8,12 +8,12 @@ Slide-out panel from any viewport side with focus trap and dismissal options.
|
|
|
8
8
|
open: boolean = false; // Visibility state
|
|
9
9
|
position: 'left'|'right'|'top'|'bottom' = 'left';
|
|
10
10
|
size: 'small'|'medium'|'large'|'xl'|'xxl'|'xxxl'|'full' = 'medium';
|
|
11
|
-
noBackdrop: boolean = false; //
|
|
12
|
-
noBackdropDismiss: boolean = false; //
|
|
13
|
-
noEscapeDismiss: boolean = false; //
|
|
14
|
-
noFocusTrap: boolean = false; //
|
|
11
|
+
noBackdrop: boolean = false; // attribute: no-backdrop
|
|
12
|
+
noBackdropDismiss: boolean = false; // attribute: no-backdrop-dismiss
|
|
13
|
+
noEscapeDismiss: boolean = false; // attribute: no-escape-dismiss
|
|
14
|
+
noFocusTrap: boolean = false; // attribute: no-focus-trap
|
|
15
15
|
persistent: boolean = false; // Hide close button, prevent all dismiss
|
|
16
|
-
pushContent: boolean = false; //
|
|
16
|
+
pushContent: boolean = false; // attribute: push-content
|
|
17
17
|
contained: boolean = false; // Position relative to parent
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -9,8 +9,8 @@ size: 'small'|'medium'|'large' = 'medium';
|
|
|
9
9
|
icon: string = '📭';
|
|
10
10
|
title: string = 'No data';
|
|
11
11
|
description: string = '';
|
|
12
|
-
actionText: string = '';
|
|
13
|
-
actionHref: string = '';
|
|
12
|
+
actionText: string = ''; // attribute: action-text
|
|
13
|
+
actionHref: string = ''; // attribute: action-href
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Slots
|
|
@@ -8,16 +8,16 @@ File upload gallery with drag-and-drop, preview, pausable/resumable uploads.
|
|
|
8
8
|
accept: string = '';
|
|
9
9
|
multiple: boolean = true;
|
|
10
10
|
disabled: boolean = false;
|
|
11
|
-
maxSize: number = -1;
|
|
12
|
-
maxFiles: number = -1;
|
|
11
|
+
maxSize: number = -1; // attribute: max-size, bytes, -1 = no limit
|
|
12
|
+
maxFiles: number = -1; // attribute: max-files, -1 = no limit
|
|
13
13
|
view: 'grid'|'list' = 'grid';
|
|
14
|
-
showProgress: boolean = true;
|
|
15
|
-
allowPause: boolean = true;
|
|
16
|
-
allowDelete: boolean = true;
|
|
17
|
-
autoUpload: boolean = true;
|
|
18
|
-
showDropzone: boolean = true;
|
|
19
|
-
showAddButton: boolean = false; // show
|
|
20
|
-
showHeader: boolean = true;
|
|
14
|
+
showProgress: boolean = true; // attribute: show-progress
|
|
15
|
+
allowPause: boolean = true; // attribute: allow-pause
|
|
16
|
+
allowDelete: boolean = true; // attribute: allow-delete
|
|
17
|
+
autoUpload: boolean = true; // attribute: auto-upload
|
|
18
|
+
showDropzone: boolean = true; // attribute: show-dropzone
|
|
19
|
+
showAddButton: boolean = false; // attribute: show-add-button
|
|
20
|
+
showHeader: boolean = true; // attribute: show-header
|
|
21
21
|
files: GalleryFile[]; // read-only
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -108,31 +108,7 @@ interface UploadResponse {
|
|
|
108
108
|
|
|
109
109
|
## Upload Handler
|
|
110
110
|
|
|
111
|
-
Uses `@request/@respond` pattern. Handler
|
|
112
|
-
|
|
113
|
-
```typescript
|
|
114
|
-
import { respond } from 'snice';
|
|
115
|
-
|
|
116
|
-
class UploadController {
|
|
117
|
-
@respond('file-gallery-upload')
|
|
118
|
-
async handleUpload(request: UploadRequest): Promise<UploadResponse> {
|
|
119
|
-
const { file, fileId, onProgress, signal } = request;
|
|
120
|
-
|
|
121
|
-
// Implement upload logic
|
|
122
|
-
// Use onProgress(0-1) for progress tracking
|
|
123
|
-
// Check signal.aborted for cancellation
|
|
124
|
-
|
|
125
|
-
return {
|
|
126
|
-
success: true,
|
|
127
|
-
fileId,
|
|
128
|
-
url: 'https://example.com/file.jpg'
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const controller = new UploadController();
|
|
134
|
-
controller.attach?.(document.body);
|
|
135
|
-
```
|
|
111
|
+
Uses `@request/@respond` pattern (`file-gallery-upload`). Handler receives `UploadRequest`, returns `UploadResponse`.
|
|
136
112
|
|
|
137
113
|
## Usage
|
|
138
114
|
|
|
@@ -152,59 +128,12 @@ controller.attach?.(document.body);
|
|
|
152
128
|
<!-- List view -->
|
|
153
129
|
<snice-file-gallery view="list"></snice-file-gallery>
|
|
154
130
|
|
|
155
|
-
<!--
|
|
156
|
-
<snice-file-gallery
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
></snice-file-gallery>
|
|
160
|
-
|
|
161
|
-
<!-- Add button mode (hide drop zone, show add tile) -->
|
|
162
|
-
<snice-file-gallery
|
|
163
|
-
show-dropzone="false"
|
|
164
|
-
show-add-button="true"
|
|
165
|
-
max-files="6"
|
|
166
|
-
></snice-file-gallery>
|
|
167
|
-
|
|
168
|
-
<!-- Custom actions -->
|
|
169
|
-
<snice-file-gallery id="gallery"></snice-file-gallery>
|
|
131
|
+
<!-- Add button mode -->
|
|
132
|
+
<snice-file-gallery show-dropzone="false" show-add-button="true" max-files="6"></snice-file-gallery>
|
|
133
|
+
|
|
134
|
+
<!-- Events -->
|
|
170
135
|
<script>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// Add custom action
|
|
174
|
-
const icon = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor">...</svg>';
|
|
175
|
-
const actionId = gallery.addCustomAction(icon, 'Camera');
|
|
176
|
-
|
|
177
|
-
// Handle custom action
|
|
178
|
-
gallery.addEventListener('custom-action-click', (e) => {
|
|
179
|
-
if (e.detail.actionId === actionId) {
|
|
180
|
-
// Handle camera action
|
|
181
|
-
const file = capturePhoto(); // your implementation
|
|
182
|
-
gallery.addFileWithPreview(file, previewUrl);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
// Other events
|
|
187
|
-
gallery.addEventListener('files-change', (e) => {
|
|
188
|
-
console.log('Files:', e.detail.files);
|
|
189
|
-
});
|
|
190
|
-
gallery.addEventListener('upload-complete', (e) => {
|
|
191
|
-
console.log('Complete:', e.detail.url);
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
// Add custom badge (e.g., user avatar)
|
|
195
|
-
const avatarHTML = `<div style="width:40px;height:40px;border-radius:50%;background:#3b82f6;color:white;display:flex;align-items:center;justify-content:center;font-weight:bold;border:2px solid white;box-shadow:0 2px 4px rgba(0,0,0,0.2)">JD</div>`;
|
|
196
|
-
gallery.setFileBadge(fileId, avatarHTML, 'top-right');
|
|
136
|
+
gallery.addEventListener('files-change', (e) => console.log(e.detail.files));
|
|
137
|
+
gallery.addEventListener('upload-complete', (e) => console.log(e.detail.url));
|
|
197
138
|
</script>
|
|
198
139
|
```
|
|
199
|
-
|
|
200
|
-
## Features
|
|
201
|
-
|
|
202
|
-
- Drag-and-drop with visual feedback
|
|
203
|
-
- Image preview thumbnails
|
|
204
|
-
- Pausable/resumable uploads via AbortController
|
|
205
|
-
- Real-time progress tracking
|
|
206
|
-
- Grid/list view toggle
|
|
207
|
-
- File validation (size, type)
|
|
208
|
-
- Auto or manual upload modes
|
|
209
|
-
- @request/@respond upload pattern
|
|
210
|
-
- Accessible
|
|
@@ -13,13 +13,13 @@ disabled: boolean = false;
|
|
|
13
13
|
required: boolean = false;
|
|
14
14
|
invalid: boolean = false;
|
|
15
15
|
label: string = '';
|
|
16
|
-
helperText: string = '';
|
|
17
|
-
errorText: string = '';
|
|
18
|
-
maxSize: number = -1;
|
|
19
|
-
maxFiles: number = -1;
|
|
16
|
+
helperText: string = ''; // attribute: helper-text
|
|
17
|
+
errorText: string = ''; // attribute: error-text
|
|
18
|
+
maxSize: number = -1; // attribute: max-size, bytes
|
|
19
|
+
maxFiles: number = -1; // attribute: max-files
|
|
20
20
|
name: string = '';
|
|
21
|
-
dragDrop: boolean = true;
|
|
22
|
-
showPreview: boolean = true;
|
|
21
|
+
dragDrop: boolean = true; // attribute: drag-drop
|
|
22
|
+
showPreview: boolean = true; // attribute: show-preview
|
|
23
23
|
files: FileList | null;
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# snice-flip-card
|
|
2
|
+
|
|
3
|
+
3D card flip component with front/back faces, horizontal/vertical flip direction, and click or programmatic control.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
flipped: boolean = false // attr: flipped — Whether back face is showing
|
|
9
|
+
clickToFlip: boolean = true // attr: click-to-flip — Enable click/keyboard to toggle
|
|
10
|
+
direction: FlipDirection = 'horizontal' // attr: direction — 'horizontal' | 'vertical'
|
|
11
|
+
duration: number = 600 // attr: duration — Flip animation duration in ms
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Slots
|
|
15
|
+
|
|
16
|
+
- `front` — Content for the front face
|
|
17
|
+
- `back` — Content for the back face
|
|
18
|
+
|
|
19
|
+
## Events
|
|
20
|
+
|
|
21
|
+
- `flip-change` -> `{ flipped: boolean, side: 'front' | 'back' }` — Fires on flip state change
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
- `flip(): void` — Toggle between front and back
|
|
26
|
+
- `flipTo(side: 'front' | 'back'): void` — Flip to a specific side
|
|
27
|
+
|
|
28
|
+
## CSS Custom Properties
|
|
29
|
+
|
|
30
|
+
```css
|
|
31
|
+
--flip-duration /* Animation duration, set automatically from duration property */
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Keyboard
|
|
35
|
+
|
|
36
|
+
When `click-to-flip` is enabled:
|
|
37
|
+
- Enter / Space — Toggle flip
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<snice-flip-card direction="horizontal" style="width: 300px; height: 200px;">
|
|
43
|
+
<div slot="front">Front content</div>
|
|
44
|
+
<div slot="back">Back content</div>
|
|
45
|
+
</snice-flip-card>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
const card = document.querySelector('snice-flip-card');
|
|
50
|
+
card.flipTo('back');
|
|
51
|
+
card.addEventListener('flip-change', e => console.log(e.detail.side));
|
|
52
|
+
```
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# snice-flow
|
|
2
|
+
|
|
3
|
+
Node-based flow/diagram editor with draggable nodes, input/output ports, bezier curve edges, zoom/pan canvas, snap-to-grid, and minimap.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
nodes: FlowNode[] = []; // attribute: false (set via JS)
|
|
9
|
+
edges: FlowEdge[] = []; // attribute: false (set via JS)
|
|
10
|
+
snapToGrid: boolean = true; // attr: snap-to-grid
|
|
11
|
+
gridSize: number = 20; // attr: grid-size
|
|
12
|
+
zoomEnabled: boolean = true; // attr: zoom-enabled
|
|
13
|
+
panEnabled: boolean = true; // attr: pan-enabled
|
|
14
|
+
minimap: boolean = true;
|
|
15
|
+
editable: boolean = true;
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Types
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
interface FlowNode {
|
|
22
|
+
id: string;
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
type?: string;
|
|
26
|
+
data?: Record<string, unknown>;
|
|
27
|
+
label?: string;
|
|
28
|
+
width?: number; // default: 160
|
|
29
|
+
height?: number; // default: 80
|
|
30
|
+
inputs?: FlowPort[];
|
|
31
|
+
outputs?: FlowPort[];
|
|
32
|
+
color?: string; // header background color
|
|
33
|
+
selected?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface FlowPort {
|
|
37
|
+
id: string;
|
|
38
|
+
label?: string;
|
|
39
|
+
type?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface FlowEdge {
|
|
43
|
+
id: string;
|
|
44
|
+
source: string; // node id
|
|
45
|
+
target: string; // node id
|
|
46
|
+
sourcePort?: string; // port id
|
|
47
|
+
targetPort?: string; // port id
|
|
48
|
+
label?: string;
|
|
49
|
+
color?: string;
|
|
50
|
+
animated?: boolean; // dashed animated stroke
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Methods
|
|
55
|
+
|
|
56
|
+
- `addNode(node: FlowNode): void`
|
|
57
|
+
- `removeNode(id: string): void` - also removes connected edges
|
|
58
|
+
- `addEdge(edge: FlowEdge): void`
|
|
59
|
+
- `removeEdge(id: string): void`
|
|
60
|
+
- `fitView(): void` - auto-zoom to fit all nodes
|
|
61
|
+
|
|
62
|
+
## Events
|
|
63
|
+
|
|
64
|
+
- `node-drag` -> `{ node: FlowNode, x: number, y: number }`
|
|
65
|
+
- `node-select` -> `{ node: FlowNode | null }`
|
|
66
|
+
- `edge-connect` -> `{ edge: FlowEdge }`
|
|
67
|
+
- `edge-disconnect` -> `{ edge: FlowEdge }`
|
|
68
|
+
- `canvas-click` -> `{ x: number, y: number }`
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<snice-flow id="flow" snap-to-grid minimap style="height:450px"></snice-flow>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
const flow = document.getElementById('flow');
|
|
78
|
+
flow.nodes = [
|
|
79
|
+
{ id: 'a', x: 50, y: 50, label: 'Start',
|
|
80
|
+
outputs: [{ id: 'out', label: 'Out' }] },
|
|
81
|
+
{ id: 'b', x: 300, y: 50, label: 'Process',
|
|
82
|
+
inputs: [{ id: 'in', label: 'In' }],
|
|
83
|
+
outputs: [{ id: 'out', label: 'Out' }] },
|
|
84
|
+
];
|
|
85
|
+
flow.edges = [
|
|
86
|
+
{ id: 'e1', source: 'a', target: 'b',
|
|
87
|
+
sourcePort: 'out', targetPort: 'in' },
|
|
88
|
+
];
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Features
|
|
92
|
+
|
|
93
|
+
- Draggable nodes with snap-to-grid
|
|
94
|
+
- Input/output ports on nodes
|
|
95
|
+
- Bezier curve edges with arrow markers
|
|
96
|
+
- Draw edges by dragging from port to port
|
|
97
|
+
- Zoom (mouse wheel) and pan (drag background)
|
|
98
|
+
- Node selection with visual highlight
|
|
99
|
+
- Edge selection
|
|
100
|
+
- Minimap showing viewport indicator
|
|
101
|
+
- Dot grid background
|
|
102
|
+
- Animated edge support (dashed flowing)
|
|
103
|
+
- Custom node header colors
|
|
104
|
+
- Responsive via ResizeObserver
|
|
@@ -8,9 +8,9 @@ SVG-based funnel chart for conversion tracking and pipeline visualization.
|
|
|
8
8
|
data: FunnelStage[] = []; // Array of { label, value, color? }
|
|
9
9
|
variant: 'default'|'gradient' = 'default';
|
|
10
10
|
orientation: 'vertical'|'horizontal' = 'vertical';
|
|
11
|
-
showLabels: boolean = true;
|
|
12
|
-
showValues: boolean = true;
|
|
13
|
-
showPercentages: boolean = true;
|
|
11
|
+
showLabels: boolean = true; // attribute: show-labels
|
|
12
|
+
showValues: boolean = true; // attribute: show-values
|
|
13
|
+
showPercentages: boolean = true; // attribute: show-percentages
|
|
14
14
|
animation: boolean = false;
|
|
15
15
|
```
|
|
16
16
|
|