snice 5.2.2 → 6.0.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/README.md +5 -8
- package/adapters/react/SniceProvider.js +1 -1
- package/adapters/react/SniceRouter.js +1 -1
- package/adapters/react/audio-recorder.d.ts +0 -4
- package/adapters/react/audio-recorder.d.ts.map +1 -1
- package/adapters/react/audio-recorder.js +1 -1
- package/adapters/react/audio-recorder.js.map +1 -1
- package/adapters/react/audio-recorder.tsx +1 -5
- package/adapters/react/avatar.d.ts +0 -1
- package/adapters/react/avatar.d.ts.map +1 -1
- package/adapters/react/avatar.js +1 -1
- package/adapters/react/avatar.js.map +1 -1
- package/adapters/react/avatar.tsx +1 -2
- package/adapters/react/breadcrumbs.d.ts +0 -1
- package/adapters/react/breadcrumbs.d.ts.map +1 -1
- package/adapters/react/breadcrumbs.js +1 -1
- package/adapters/react/breadcrumbs.js.map +1 -1
- package/adapters/react/breadcrumbs.tsx +1 -2
- package/adapters/react/camera-annotate.d.ts +0 -5
- package/adapters/react/camera-annotate.d.ts.map +1 -1
- package/adapters/react/camera-annotate.js +1 -1
- package/adapters/react/camera-annotate.js.map +1 -1
- package/adapters/react/camera-annotate.tsx +1 -6
- package/adapters/react/card.d.ts +0 -2
- package/adapters/react/card.d.ts.map +1 -1
- package/adapters/react/card.js +1 -1
- package/adapters/react/card.js.map +1 -1
- package/adapters/react/card.tsx +1 -3
- package/adapters/react/carousel.d.ts +0 -1
- package/adapters/react/carousel.d.ts.map +1 -1
- package/adapters/react/carousel.js +1 -1
- package/adapters/react/carousel.js.map +1 -1
- package/adapters/react/carousel.tsx +1 -2
- package/adapters/react/cart.d.ts +0 -1
- package/adapters/react/cart.d.ts.map +1 -1
- package/adapters/react/cart.js +1 -1
- package/adapters/react/cart.js.map +1 -1
- package/adapters/react/cart.tsx +1 -2
- package/adapters/react/chart.d.ts +0 -5
- package/adapters/react/chart.d.ts.map +1 -1
- package/adapters/react/chart.js +1 -1
- package/adapters/react/chart.js.map +1 -1
- package/adapters/react/chart.tsx +1 -6
- package/adapters/react/chat.d.ts +4 -1
- package/adapters/react/chat.d.ts.map +1 -1
- package/adapters/react/chat.js +2 -2
- package/adapters/react/chat.js.map +1 -1
- package/adapters/react/chat.tsx +6 -3
- package/adapters/react/chip.d.ts +0 -1
- package/adapters/react/chip.d.ts.map +1 -1
- package/adapters/react/chip.js +1 -1
- package/adapters/react/chip.js.map +1 -1
- package/adapters/react/chip.tsx +1 -2
- package/adapters/react/command-palette.d.ts +0 -4
- package/adapters/react/command-palette.d.ts.map +1 -1
- package/adapters/react/command-palette.js +1 -1
- package/adapters/react/command-palette.js.map +1 -1
- package/adapters/react/command-palette.tsx +1 -5
- package/adapters/react/comments.d.ts +0 -1
- package/adapters/react/comments.d.ts.map +1 -1
- package/adapters/react/comments.js +1 -1
- package/adapters/react/comments.js.map +1 -1
- package/adapters/react/comments.tsx +1 -2
- package/adapters/react/countdown.d.ts +0 -4
- package/adapters/react/countdown.d.ts.map +1 -1
- package/adapters/react/countdown.js +1 -1
- package/adapters/react/countdown.js.map +1 -1
- package/adapters/react/countdown.tsx +1 -5
- package/adapters/react/date-time-picker.d.ts +0 -1
- package/adapters/react/date-time-picker.d.ts.map +1 -1
- package/adapters/react/date-time-picker.js +1 -1
- package/adapters/react/date-time-picker.js.map +1 -1
- package/adapters/react/date-time-picker.tsx +1 -2
- package/adapters/react/file-upload.d.ts +0 -2
- package/adapters/react/file-upload.d.ts.map +1 -1
- package/adapters/react/file-upload.js +1 -1
- package/adapters/react/file-upload.js.map +1 -1
- package/adapters/react/file-upload.tsx +1 -3
- package/adapters/react/heatmap.d.ts +0 -4
- package/adapters/react/heatmap.d.ts.map +1 -1
- package/adapters/react/heatmap.js +1 -1
- package/adapters/react/heatmap.js.map +1 -1
- package/adapters/react/heatmap.tsx +1 -5
- package/adapters/react/image.d.ts +0 -2
- package/adapters/react/image.d.ts.map +1 -1
- package/adapters/react/image.js +1 -1
- package/adapters/react/image.js.map +1 -1
- package/adapters/react/image.tsx +1 -3
- package/adapters/react/kanban.d.ts +0 -4
- package/adapters/react/kanban.d.ts.map +1 -1
- package/adapters/react/kanban.js +1 -1
- package/adapters/react/kanban.js.map +1 -1
- package/adapters/react/kanban.tsx +1 -5
- package/adapters/react/key-value.d.ts +0 -2
- package/adapters/react/key-value.d.ts.map +1 -1
- package/adapters/react/key-value.js +1 -1
- package/adapters/react/key-value.js.map +1 -1
- package/adapters/react/key-value.tsx +1 -3
- package/adapters/react/leaderboard.d.ts +0 -1
- package/adapters/react/leaderboard.d.ts.map +1 -1
- package/adapters/react/leaderboard.js +1 -1
- package/adapters/react/leaderboard.js.map +1 -1
- package/adapters/react/leaderboard.tsx +1 -2
- package/adapters/react/map.d.ts +0 -3
- package/adapters/react/map.d.ts.map +1 -1
- package/adapters/react/map.js +1 -1
- package/adapters/react/map.js.map +1 -1
- package/adapters/react/map.tsx +1 -4
- package/adapters/react/markdown.d.ts +1 -1
- package/adapters/react/markdown.d.ts.map +1 -1
- package/adapters/react/markdown.js +1 -1
- package/adapters/react/markdown.js.map +1 -1
- package/adapters/react/markdown.tsx +2 -2
- package/adapters/react/matchRoute.d.ts +1 -1
- package/adapters/react/matchRoute.js +38 -4
- package/adapters/react/matchRoute.js.map +1 -1
- package/adapters/react/message-strip.d.ts +1 -1
- package/adapters/react/message-strip.js +1 -1
- package/adapters/react/message-strip.tsx +2 -2
- package/adapters/react/music-player.d.ts +0 -1
- package/adapters/react/music-player.d.ts.map +1 -1
- package/adapters/react/music-player.js +1 -1
- package/adapters/react/music-player.js.map +1 -1
- package/adapters/react/music-player.tsx +1 -2
- package/adapters/react/org-chart.d.ts +0 -1
- package/adapters/react/org-chart.d.ts.map +1 -1
- package/adapters/react/org-chart.js +1 -1
- package/adapters/react/org-chart.js.map +1 -1
- package/adapters/react/org-chart.tsx +1 -2
- package/adapters/react/paint.d.ts +0 -1
- package/adapters/react/paint.d.ts.map +1 -1
- package/adapters/react/paint.js +1 -1
- package/adapters/react/paint.js.map +1 -1
- package/adapters/react/paint.tsx +1 -2
- package/adapters/react/podcast-player.d.ts +0 -2
- package/adapters/react/podcast-player.d.ts.map +1 -1
- package/adapters/react/podcast-player.js +1 -1
- package/adapters/react/podcast-player.js.map +1 -1
- package/adapters/react/podcast-player.tsx +1 -3
- package/adapters/react/product-card.d.ts +0 -3
- package/adapters/react/product-card.d.ts.map +1 -1
- package/adapters/react/product-card.js +1 -1
- package/adapters/react/product-card.js.map +1 -1
- package/adapters/react/product-card.tsx +1 -4
- package/adapters/react/qr-reader.d.ts +0 -4
- package/adapters/react/qr-reader.d.ts.map +1 -1
- package/adapters/react/qr-reader.js +1 -1
- package/adapters/react/qr-reader.js.map +1 -1
- package/adapters/react/qr-reader.tsx +1 -5
- package/adapters/react/recipe.d.ts +0 -5
- package/adapters/react/recipe.d.ts.map +1 -1
- package/adapters/react/recipe.js +1 -1
- package/adapters/react/recipe.js.map +1 -1
- package/adapters/react/recipe.tsx +1 -6
- package/adapters/react/route-specificity.d.ts +1 -0
- package/adapters/react/spotlight.d.ts +0 -2
- package/adapters/react/spotlight.d.ts.map +1 -1
- package/adapters/react/spotlight.js +1 -1
- package/adapters/react/spotlight.js.map +1 -1
- package/adapters/react/spotlight.tsx +1 -3
- package/adapters/react/tag-input.d.ts +0 -4
- package/adapters/react/tag-input.d.ts.map +1 -1
- package/adapters/react/tag-input.js +1 -1
- package/adapters/react/tag-input.js.map +1 -1
- package/adapters/react/tag-input.tsx +1 -5
- package/adapters/react/terminal.d.ts +0 -1
- package/adapters/react/terminal.d.ts.map +1 -1
- package/adapters/react/terminal.js +1 -1
- package/adapters/react/terminal.js.map +1 -1
- package/adapters/react/terminal.tsx +1 -2
- package/adapters/react/time-picker.d.ts +0 -1
- package/adapters/react/time-picker.d.ts.map +1 -1
- package/adapters/react/time-picker.js +1 -1
- package/adapters/react/time-picker.js.map +1 -1
- package/adapters/react/time-picker.tsx +1 -2
- package/adapters/react/timer.d.ts +0 -1
- package/adapters/react/timer.d.ts.map +1 -1
- package/adapters/react/timer.js +1 -1
- package/adapters/react/timer.js.map +1 -1
- package/adapters/react/timer.tsx +1 -2
- package/adapters/react/useRequestHandler.js +1 -1
- package/adapters/react/video-player.d.ts +0 -6
- package/adapters/react/video-player.d.ts.map +1 -1
- package/adapters/react/video-player.js +1 -1
- package/adapters/react/video-player.js.map +1 -1
- package/adapters/react/video-player.tsx +1 -7
- package/adapters/react/virtual-scroller.d.ts +0 -1
- package/adapters/react/virtual-scroller.d.ts.map +1 -1
- package/adapters/react/virtual-scroller.js +1 -1
- package/adapters/react/virtual-scroller.js.map +1 -1
- package/adapters/react/virtual-scroller.tsx +1 -2
- package/bin/templates/default/tests/services/jwt.test.ts +8 -1
- package/bin/templates/react/tests/services/jwt.test.ts +10 -3
- package/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/accordion/snice-accordion.min.js +1 -1
- package/dist/cdn/action-bar/README.md +2 -2
- package/dist/cdn/action-bar/snice-action-bar.js +2 -2
- package/dist/cdn/action-bar/snice-action-bar.js.map +1 -1
- package/dist/cdn/action-bar/snice-action-bar.min.js +2 -2
- package/dist/cdn/action-bar/snice-action-bar.min.js.map +1 -1
- package/dist/cdn/activity-feed/snice-activity-feed.js +1 -1
- package/dist/cdn/activity-feed/snice-activity-feed.min.js +1 -1
- package/dist/cdn/alert/snice-alert.js +1 -1
- package/dist/cdn/alert/snice-alert.js.map +1 -1
- package/dist/cdn/alert/snice-alert.min.js +1 -1
- package/dist/cdn/alert/snice-alert.min.js.map +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.min.js +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.js +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.js.map +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.min.js +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.min.js.map +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
- package/dist/cdn/availability/snice-availability.js +1 -1
- package/dist/cdn/availability/snice-availability.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/avatar-group/snice-avatar-group.js +1 -1
- package/dist/cdn/avatar-group/snice-avatar-group.min.js +1 -1
- package/dist/cdn/badge/snice-badge.js +1 -1
- package/dist/cdn/badge/snice-badge.js.map +1 -1
- package/dist/cdn/badge/snice-badge.min.js +1 -1
- package/dist/cdn/badge/snice-badge.min.js.map +1 -1
- package/dist/cdn/banner/README.md +1 -1
- package/dist/cdn/banner/snice-banner.js +2 -2
- package/dist/cdn/banner/snice-banner.js.map +1 -1
- package/dist/cdn/banner/snice-banner.min.js +2 -2
- package/dist/cdn/banner/snice-banner.min.js.map +1 -1
- package/dist/cdn/binpack/snice-binpack.js +1 -1
- package/dist/cdn/binpack/snice-binpack.min.js +1 -1
- package/dist/cdn/book/snice-book.js +1 -1
- package/dist/cdn/book/snice-book.min.js +1 -1
- package/dist/cdn/booking/snice-booking.js +1 -1
- package/dist/cdn/booking/snice-booking.min.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js.map +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js.map +1 -1
- package/dist/cdn/button/snice-button.js +1 -1
- package/dist/cdn/button/snice-button.js.map +1 -1
- package/dist/cdn/button/snice-button.min.js +1 -1
- package/dist/cdn/button/snice-button.min.js.map +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/cart/snice-cart.js +1 -1
- package/dist/cdn/cart/snice-cart.min.js +1 -1
- package/dist/cdn/chart/snice-chart.js +1 -1
- package/dist/cdn/chart/snice-chart.js.map +1 -1
- package/dist/cdn/chart/snice-chart.min.js +1 -1
- package/dist/cdn/chart/snice-chart.min.js.map +1 -1
- package/dist/cdn/chat/README.md +2 -2
- package/dist/cdn/chat/snice-chat.js +785 -89
- package/dist/cdn/chat/snice-chat.js.map +1 -1
- package/dist/cdn/chat/snice-chat.min.js +71 -75
- package/dist/cdn/chat/snice-chat.min.js.map +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.js.map +1 -1
- package/dist/cdn/chip/snice-chip.min.js +1 -1
- package/dist/cdn/chip/snice-chip.min.js.map +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/README.md +1 -1
- package/dist/cdn/command-palette/snice-command-palette.js +2 -2
- package/dist/cdn/command-palette/snice-command-palette.js.map +1 -1
- package/dist/cdn/command-palette/snice-command-palette.min.js +2 -2
- package/dist/cdn/command-palette/snice-command-palette.min.js.map +1 -1
- package/dist/cdn/comments/snice-comments.js +1 -1
- package/dist/cdn/comments/snice-comments.min.js +1 -1
- package/dist/cdn/countdown/snice-countdown.js +1 -1
- package/dist/cdn/countdown/snice-countdown.min.js +1 -1
- package/dist/cdn/cropper/snice-cropper.js +1 -1
- package/dist/cdn/cropper/snice-cropper.min.js +1 -1
- package/dist/cdn/data-card/snice-data-card.js +1 -1
- package/dist/cdn/data-card/snice-data-card.js.map +1 -1
- package/dist/cdn/data-card/snice-data-card.min.js +1 -1
- package/dist/cdn/data-card/snice-data-card.min.js.map +1 -1
- 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/date-range-picker/snice-date-range-picker.js +1 -1
- package/dist/cdn/date-range-picker/snice-date-range-picker.min.js +1 -1
- package/dist/cdn/date-time-picker/snice-date-time-picker.js +1 -1
- package/dist/cdn/date-time-picker/snice-date-time-picker.min.js +1 -1
- package/dist/cdn/diff/snice-diff.js +1 -1
- package/dist/cdn/diff/snice-diff.min.js +1 -1
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/divider/snice-divider.min.js +1 -1
- package/dist/cdn/doc/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.js.map +1 -1
- package/dist/cdn/drawer/snice-drawer.min.js +1 -1
- package/dist/cdn/drawer/snice-drawer.min.js.map +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js.map +1 -1
- package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.min.js.map +1 -1
- package/dist/cdn/estimate/snice-estimate.js +1 -1
- package/dist/cdn/estimate/snice-estimate.min.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
- package/dist/cdn/flip-card/snice-flip-card.js +1 -1
- package/dist/cdn/flip-card/snice-flip-card.min.js +1 -1
- package/dist/cdn/flow/snice-flow.js +1 -1
- package/dist/cdn/flow/snice-flow.min.js +1 -1
- package/dist/cdn/form-layout/snice-form-layout.js +1 -1
- package/dist/cdn/form-layout/snice-form-layout.min.js +1 -1
- package/dist/cdn/funnel/snice-funnel.js +1 -1
- package/dist/cdn/funnel/snice-funnel.js.map +1 -1
- package/dist/cdn/funnel/snice-funnel.min.js +1 -1
- package/dist/cdn/funnel/snice-funnel.min.js.map +1 -1
- package/dist/cdn/gantt/snice-gantt.js +1 -1
- package/dist/cdn/gantt/snice-gantt.min.js +1 -1
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/gauge/snice-gauge.min.js +1 -1
- package/dist/cdn/grid/snice-grid.js +1 -1
- package/dist/cdn/grid/snice-grid.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.js.map +1 -1
- package/dist/cdn/image/snice-image.min.js +1 -1
- package/dist/cdn/image/snice-image.min.js.map +1 -1
- package/dist/cdn/input/snice-input.js +1 -1
- package/dist/cdn/input/snice-input.js.map +1 -1
- package/dist/cdn/input/snice-input.min.js +1 -1
- package/dist/cdn/input/snice-input.min.js.map +1 -1
- package/dist/cdn/invoice/README.md +1 -1
- package/dist/cdn/invoice/snice-invoice.js +2 -2
- package/dist/cdn/invoice/snice-invoice.js.map +1 -1
- package/dist/cdn/invoice/snice-invoice.min.js +2 -2
- package/dist/cdn/invoice/snice-invoice.min.js.map +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/kanban/snice-kanban.min.js +1 -1
- package/dist/cdn/key-value/snice-key-value.js +1 -1
- package/dist/cdn/key-value/snice-key-value.min.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js.map +1 -1
- package/dist/cdn/kpi/snice-kpi.min.js +1 -1
- package/dist/cdn/kpi/snice-kpi.min.js.map +1 -1
- package/dist/cdn/layout/snice-layout.js +1 -1
- package/dist/cdn/layout/snice-layout.min.js +1 -1
- package/dist/cdn/leaderboard/snice-leaderboard.js +1 -1
- package/dist/cdn/leaderboard/snice-leaderboard.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.js.map +1 -1
- package/dist/cdn/list/snice-list.min.js +1 -1
- package/dist/cdn/list/snice-list.min.js.map +1 -1
- package/dist/cdn/location/snice-location.js +1 -1
- package/dist/cdn/location/snice-location.js.map +1 -1
- package/dist/cdn/location/snice-location.min.js +1 -1
- package/dist/cdn/location/snice-location.min.js.map +1 -1
- package/dist/cdn/login/snice-login.js +3 -1
- package/dist/cdn/login/snice-login.js.map +1 -1
- package/dist/cdn/login/snice-login.min.js +1 -1
- package/dist/cdn/login/snice-login.min.js.map +1 -1
- package/dist/cdn/map/snice-map.js +1 -1
- package/dist/cdn/map/snice-map.min.js +1 -1
- package/dist/cdn/markdown/README.md +2 -2
- package/dist/cdn/markdown/snice-markdown.js +16 -3
- package/dist/cdn/markdown/snice-markdown.js.map +1 -1
- package/dist/cdn/markdown/snice-markdown.min.js +3 -3
- package/dist/cdn/markdown/snice-markdown.min.js.map +1 -1
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/masonry/snice-masonry.min.js +1 -1
- package/dist/cdn/menu/snice-menu.js +2 -2
- package/dist/cdn/menu/snice-menu.js.map +1 -1
- package/dist/cdn/menu/snice-menu.min.js +2 -2
- package/dist/cdn/menu/snice-menu.min.js.map +1 -1
- package/dist/cdn/message-strip/snice-message-strip.js +9 -9
- package/dist/cdn/message-strip/snice-message-strip.js.map +1 -1
- package/dist/cdn/message-strip/snice-message-strip.min.js +3 -3
- package/dist/cdn/message-strip/snice-message-strip.min.js.map +1 -1
- package/dist/cdn/metric-table/snice-metric-table.js +1 -1
- package/dist/cdn/metric-table/snice-metric-table.min.js +1 -1
- package/dist/cdn/modal/snice-modal.js +1 -1
- package/dist/cdn/modal/snice-modal.js.map +1 -1
- package/dist/cdn/modal/snice-modal.min.js +1 -1
- package/dist/cdn/modal/snice-modal.min.js.map +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.js.map +1 -1
- package/dist/cdn/network-graph/snice-network-graph.min.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.min.js.map +1 -1
- package/dist/cdn/notification-center/snice-notification-center.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.js.map +1 -1
- package/dist/cdn/notification-center/snice-notification-center.min.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.min.js.map +1 -1
- package/dist/cdn/order-tracker/snice-order-tracker.js +1 -1
- package/dist/cdn/order-tracker/snice-order-tracker.min.js +1 -1
- package/dist/cdn/org-chart/snice-org-chart.js +1 -1
- package/dist/cdn/org-chart/snice-org-chart.min.js +1 -1
- package/dist/cdn/pagination/snice-pagination.js +1 -1
- package/dist/cdn/pagination/snice-pagination.min.js +1 -1
- package/dist/cdn/paint/snice-paint.js +1 -1
- package/dist/cdn/paint/snice-paint.min.js +1 -1
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +1 -1
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +1 -1
- package/dist/cdn/permission-matrix/snice-permission-matrix.js +1 -1
- package/dist/cdn/permission-matrix/snice-permission-matrix.min.js +1 -1
- package/dist/cdn/podcast-player/snice-podcast-player.js +1 -1
- package/dist/cdn/podcast-player/snice-podcast-player.min.js +1 -1
- package/dist/cdn/popover/snice-popover.js +1 -1
- package/dist/cdn/popover/snice-popover.min.js +1 -1
- package/dist/cdn/pricing-table/snice-pricing-table.js +1 -1
- package/dist/cdn/pricing-table/snice-pricing-table.min.js +1 -1
- package/dist/cdn/product-card/snice-product-card.js +3 -3
- package/dist/cdn/product-card/snice-product-card.js.map +1 -1
- package/dist/cdn/product-card/snice-product-card.min.js +3 -3
- package/dist/cdn/product-card/snice-product-card.min.js.map +1 -1
- package/dist/cdn/progress/README.md +1 -1
- package/dist/cdn/progress/snice-progress.js +2 -2
- package/dist/cdn/progress/snice-progress.js.map +1 -1
- package/dist/cdn/progress/snice-progress.min.js +2 -2
- package/dist/cdn/progress/snice-progress.min.js.map +1 -1
- package/dist/cdn/progress-ring/snice-progress-ring.js +2 -2
- package/dist/cdn/progress-ring/snice-progress-ring.js.map +1 -1
- package/dist/cdn/progress-ring/snice-progress-ring.min.js +2 -2
- package/dist/cdn/progress-ring/snice-progress-ring.min.js.map +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/range-slider/snice-range-slider.js +1 -1
- package/dist/cdn/range-slider/snice-range-slider.min.js +1 -1
- package/dist/cdn/rating/snice-rating.js +1 -1
- package/dist/cdn/rating/snice-rating.min.js +1 -1
- package/dist/cdn/receipt/snice-receipt.js +1 -1
- package/dist/cdn/receipt/snice-receipt.min.js +1 -1
- package/dist/cdn/recipe/snice-recipe.js +1 -1
- package/dist/cdn/recipe/snice-recipe.min.js +1 -1
- package/dist/cdn/runtime/README.md +2 -2
- package/dist/cdn/runtime/snice-runtime.esm.js +644 -172
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +8 -8
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +644 -172
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +8 -8
- 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.js.map +1 -1
- package/dist/cdn/sankey/snice-sankey.min.js +1 -1
- package/dist/cdn/sankey/snice-sankey.min.js.map +1 -1
- package/dist/cdn/segmented-control/snice-segmented-control.js +1 -1
- package/dist/cdn/segmented-control/snice-segmented-control.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/snice-sortable.js +1 -1
- package/dist/cdn/sortable/snice-sortable.min.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
- package/dist/cdn/spinner/snice-spinner.js +1 -1
- package/dist/cdn/spinner/snice-spinner.min.js +1 -1
- package/dist/cdn/split-button/snice-split-button.js +1 -1
- package/dist/cdn/split-button/snice-split-button.js.map +1 -1
- package/dist/cdn/split-button/snice-split-button.min.js +1 -1
- package/dist/cdn/split-button/snice-split-button.min.js.map +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.min.js +1 -1
- package/dist/cdn/stat-group/snice-stat-group.js +1 -1
- package/dist/cdn/stat-group/snice-stat-group.min.js +1 -1
- package/dist/cdn/step-input/snice-step-input.js +1 -1
- package/dist/cdn/step-input/snice-step-input.min.js +1 -1
- package/dist/cdn/stepper/snice-stepper.js +1 -1
- package/dist/cdn/stepper/snice-stepper.min.js +1 -1
- package/dist/cdn/switch/snice-switch.js +1 -1
- package/dist/cdn/switch/snice-switch.min.js +1 -1
- package/dist/cdn/table/README.md +1 -1
- package/dist/cdn/table/snice-table.js +14 -4
- package/dist/cdn/table/snice-table.js.map +1 -1
- package/dist/cdn/table/snice-table.min.js +14 -4
- package/dist/cdn/table/snice-table.min.js.map +1 -1
- package/dist/cdn/tabs/snice-tabs.js +1 -1
- package/dist/cdn/tabs/snice-tabs.min.js +1 -1
- package/dist/cdn/tag/snice-tag.js +1 -1
- package/dist/cdn/tag/snice-tag.min.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.js +2 -2
- package/dist/cdn/tag-input/snice-tag-input.js.map +1 -1
- package/dist/cdn/tag-input/snice-tag-input.min.js +2 -2
- package/dist/cdn/tag-input/snice-tag-input.min.js.map +1 -1
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.min.js +1 -1
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/textarea/snice-textarea.min.js +1 -1
- package/dist/cdn/time-picker/README.md +1 -1
- package/dist/cdn/time-picker/snice-time-picker.js +18 -13
- package/dist/cdn/time-picker/snice-time-picker.js.map +1 -1
- package/dist/cdn/time-picker/snice-time-picker.min.js +3 -3
- package/dist/cdn/time-picker/snice-time-picker.min.js.map +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.js.map +1 -1
- package/dist/cdn/timeline/snice-timeline.min.js +1 -1
- package/dist/cdn/timeline/snice-timeline.min.js.map +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.js.map +1 -1
- package/dist/cdn/toast/snice-toast.min.js +1 -1
- package/dist/cdn/toast/snice-toast.min.js.map +1 -1
- package/dist/cdn/tooltip/snice-tooltip.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
- package/dist/cdn/tree/snice-tree.js +1 -1
- package/dist/cdn/tree/snice-tree.min.js +1 -1
- package/dist/cdn/treemap/snice-treemap.js +1 -1
- package/dist/cdn/treemap/snice-treemap.js.map +1 -1
- package/dist/cdn/treemap/snice-treemap.min.js +1 -1
- package/dist/cdn/treemap/snice-treemap.min.js.map +1 -1
- package/dist/cdn/user-card/snice-user-card.js +1 -1
- package/dist/cdn/user-card/snice-user-card.min.js +1 -1
- package/dist/cdn/video-player/snice-video-player.js +1 -1
- package/dist/cdn/video-player/snice-video-player.min.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +1 -1
- package/dist/cdn/waterfall/snice-waterfall.js +1 -1
- package/dist/cdn/waterfall/snice-waterfall.min.js +1 -1
- package/dist/cdn/weather/snice-weather.js +1 -1
- package/dist/cdn/weather/snice-weather.min.js +1 -1
- package/dist/cdn/work-order/snice-work-order.js +1 -1
- package/dist/cdn/work-order/snice-work-order.min.js +1 -1
- package/dist/components/action-bar/snice-action-bar.js +1 -1
- package/dist/components/action-bar/snice-action-bar.js.map +1 -1
- package/dist/components/banner/snice-banner.js +1 -1
- package/dist/components/banner/snice-banner.js.map +1 -1
- package/dist/components/chat/snice-chat-message.d.ts +32 -0
- package/dist/components/chat/snice-chat-message.js +127 -0
- package/dist/components/chat/snice-chat-message.js.map +1 -0
- package/dist/components/chat/snice-chat-message.types.d.ts +30 -0
- package/dist/components/chat/snice-chat.d.ts +31 -4
- package/dist/components/chat/snice-chat.js +363 -90
- package/dist/components/chat/snice-chat.js.map +1 -1
- package/dist/components/chat/snice-chat.types.d.ts +34 -3
- package/dist/components/command-palette/snice-command-palette.js +1 -1
- package/dist/components/command-palette/snice-command-palette.js.map +1 -1
- package/dist/components/icons/index.d.ts +4 -0
- package/dist/components/icons/index.js +5 -1
- package/dist/components/icons/index.js.map +1 -1
- package/dist/components/invoice/snice-invoice.js +1 -1
- package/dist/components/invoice/snice-invoice.js.map +1 -1
- package/dist/components/login/snice-login.d.ts +2 -2
- package/dist/components/login/snice-login.js +2 -0
- package/dist/components/login/snice-login.js.map +1 -1
- package/dist/components/login/snice-login.types.d.ts +4 -0
- package/dist/components/markdown/snice-markdown.d.ts +1 -0
- package/dist/components/markdown/snice-markdown.js +15 -2
- package/dist/components/markdown/snice-markdown.js.map +1 -1
- package/dist/components/menu/snice-menu.js +1 -1
- package/dist/components/menu/snice-menu.js.map +1 -1
- package/dist/components/message-strip/snice-message-strip.d.ts +1 -1
- package/dist/components/message-strip/snice-message-strip.js +8 -8
- package/dist/components/message-strip/snice-message-strip.types.d.ts +1 -1
- package/dist/components/product-card/snice-product-card.js +2 -2
- package/dist/components/product-card/snice-product-card.js.map +1 -1
- package/dist/components/progress/snice-progress.js +1 -1
- package/dist/components/progress/snice-progress.js.map +1 -1
- package/dist/components/progress-ring/snice-progress-ring.js +1 -1
- package/dist/components/progress-ring/snice-progress-ring.js.map +1 -1
- package/dist/components/table/snice-table.js +13 -3
- package/dist/components/table/snice-table.js.map +1 -1
- package/dist/components/tag-input/snice-tag-input.js +1 -1
- package/dist/components/tag-input/snice-tag-input.js.map +1 -1
- package/dist/components/time-picker/snice-time-picker.js +17 -12
- package/dist/components/time-picker/snice-time-picker.js.map +1 -1
- package/dist/components/utils.d.ts +6 -0
- package/dist/components/utils.js +1 -1
- package/dist/components/utils.js.map +1 -1
- package/dist/element.d.ts +2 -1
- package/dist/events.d.ts +6 -0
- package/dist/index.cjs +641 -169
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +641 -169
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +641 -169
- package/dist/index.iife.js.map +1 -1
- package/dist/parts.d.ts +1 -8
- package/dist/react/SniceProvider.js +1 -1
- package/dist/react/SniceRouter.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/matchRoute.d.ts +1 -1
- package/dist/react/matchRoute.js +38 -4
- package/dist/react/matchRoute.js.map +1 -1
- package/dist/react/route-specificity.d.ts +1 -0
- package/dist/react/useRequestHandler.js +1 -1
- package/dist/render.d.ts +7 -0
- package/dist/route-specificity.d.ts +1 -0
- package/dist/symbols.cjs +14 -1
- package/dist/symbols.cjs.map +1 -1
- package/dist/symbols.d.ts +3 -0
- package/dist/symbols.esm.js +12 -2
- package/dist/symbols.esm.js.map +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/dist/types/context.d.ts +5 -2
- package/dist/types/dispatch-options.d.ts +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/on-options.d.ts +14 -0
- package/dist/types/watch-options.d.ts +9 -0
- package/dist/utils.d.ts +26 -0
- package/docs/ai/DEVELOPMENT.md +1 -1
- package/docs/ai/README.md +11 -0
- package/docs/ai/api.md +24 -5
- package/docs/ai/cdn.md +31 -0
- package/docs/ai/components/chat.md +57 -1
- package/docs/ai/components/message-strip.md +3 -3
- package/docs/ai/decorators.md +44 -5
- package/docs/cdn.md +56 -0
- package/docs/components/chat.md +108 -2
- package/docs/components/message-strip.md +8 -8
- package/docs/elements.md +21 -0
- package/docs/events.md +88 -0
- package/docs/superpowers/specs/2026-05-26-chat-styling-design.md +155 -0
- package/docs/superpowers/specs/2026-05-27-chat-theming-REMAINING.md +83 -0
- package/docs/superpowers/specs/2026-06-09-chat-custom-content-design.md +233 -0
- package/package.json +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# snice-chat — Remaining Work / Handoff
|
|
2
|
+
|
|
3
|
+
Branch: `feat/chat-theming`. Theming work committed in `8c1748ce`; custom-content design spec committed in `994b3078`. Status as of 2026-07-02.
|
|
4
|
+
|
|
5
|
+
## DONE (working, tested before the popover rework)
|
|
6
|
+
- `<snice-chat-message>` config-carrier sub-element + dual-API ingestion (array OR slotted children; slot wins).
|
|
7
|
+
- Per-user name colors: `color-authors` (auto hash→accent), `authorColors` map, per-message `authorColor`. Injected via inline `--snice-chat-author-color`.
|
|
8
|
+
- Markdown: `markdown` attr + per-message `format`; fixed the `white-space: pre-wrap` gap (`snice-markdown.message-text { white-space: normal }`).
|
|
9
|
+
- `layout="bubbles"`.
|
|
10
|
+
- Full `::part` surface (avatar, author, timestamp, edited, message-text, message/-own/-other, system-message, reactions, reaction, reaction-active, actions, typing-indicator, …).
|
|
11
|
+
- Exported enums `MessageFormat` / `ChatLayout`.
|
|
12
|
+
- Docs (human + AI), React adapter regen, public showcase (5 demos + avatars), full-showcase.html, Storybook stories.
|
|
13
|
+
- Full `npm test` was green per-stage BEFORE the popover rework below.
|
|
14
|
+
|
|
15
|
+
## DONE in this session (items 1–6 below)
|
|
16
|
+
- **1.** Delete confirm finished — `renderDeleteConfirm(message)` added, branched in `renderMessage`, actions hidden while confirming.
|
|
17
|
+
- **2.** Icons swapped — `PENCIL`/`TRASH` from `components/icons` via `unsafeHTML`; react button is a 🙂 emoji glyph (per request: a face, not `+`).
|
|
18
|
+
- **3.** CSS added — `.message-edit`, `.edit-field`, `.edit-actions`, `.edit-button`, `.edit-save`, `.message-confirm`, `.confirm-*`, `.action-emoji`; danger token `--snice-color-danger, rgb(220 38 38)`.
|
|
19
|
+
- **4.** Dropped the unused `isCurrentUser` param from `renderReactions`.
|
|
20
|
+
- **5.** Showcase double-apply fixed — `wire()` keeps only `message-send`.
|
|
21
|
+
- **6.** `message-thread` KEPT (decision reversed): threads are now a planned feature — see "Threads" below.
|
|
22
|
+
- Tests: 11 new cases (react-on-others, react toggle-off, edit show/Save/Enter/Escape, delete confirm/confirm-yes/cancel). Full `npm test` green (all 5 stages, 152 files / 1219 tests). Component rebuilt (`rebuild-single-component.mjs chat`, exit 0). Showcases rebuilt. Docs (human + AI) updated: action behavior + new parts.
|
|
23
|
+
|
|
24
|
+
### DONE 2026-07-02 (visual QA session)
|
|
25
|
+
- Visual check dark+light — done via showcase (:52891) + Storybook (:6006). All 5 showcase demos, hover actions, react/edit/delete/send flows exercised in both themes.
|
|
26
|
+
- Fixes from that pass (uncommitted):
|
|
27
|
+
- Composer "Attach file" button had a check-circle glyph — replaced with new shared `PAPER_CLIP` icon; send button moved to new shared `PAPER_AIRPLANE_SOLID` (both added to `components/icons`).
|
|
28
|
+
- Inline editor and delete-confirm clipped below `.messages-area` on the last message — both now `scrollIntoView({block:'nearest'})` post-render (rAF; `@watch` runs before render flush, so a bare microtask races — this also fixed the latent no-op edit-field focus).
|
|
29
|
+
- Tests added: composer icon assertions + scroll-into-view for edit/confirm. Full `npm test` green (458 files / 6783 tests).
|
|
30
|
+
- KNOWN ISSUE (pre-existing, not fixed): `scripts/generate-react-adapters.js` leaks `private` `@property` state into React adapter props (chat's `editingId`/`confirmingDeleteId`, kanban's `searchQuery`, cart's `couponInput`, etc.). Generator regex skips the `private` keyword instead of excluding the property. Fix = generator change + regen all adapters; needs approval.
|
|
31
|
+
|
|
32
|
+
### STILL TODO
|
|
33
|
+
- Cleanup: `.superpowers/brainstorm/**`, `.playwright-mcp/**` (not yet removed — awaiting commit-scope decision).
|
|
34
|
+
- Commit (not done — never commit without asking).
|
|
35
|
+
|
|
36
|
+
### Threads (Slack-style) — QUEUED
|
|
37
|
+
- Keep `message-thread` event + `ChatMessage.thread?: ChatMessage[]`.
|
|
38
|
+
- Brainstorm needed: reply affordance on a message → opens a thread panel/drawer; thread reply composer; unread/typing within a thread; how thread renders (side panel vs inline expand). Design-first before code.
|
|
39
|
+
|
|
40
|
+
## (HISTORICAL) IN PROGRESS / BROKEN — must finish before this compiles & works
|
|
41
|
+
|
|
42
|
+
### 1. Message-action rework is half-applied (`components/chat/snice-chat.ts`)
|
|
43
|
+
- ✅ `handleReaction` now toggles + emits (react works on ANY message).
|
|
44
|
+
- ✅ Inline edit added: `startEdit`/`commitEdit`/`cancelEdit`/`handleEditKeydown`, `editingId` state, `renderEditor`, `@query('.edit-field')`, focus on edit.
|
|
45
|
+
- ✅ `renderActions(messageId, isCurrentUser)`: react on all, edit/delete owner-only.
|
|
46
|
+
- ❌ **Delete confirm is incomplete.** `handleDelete` sets `confirmingDeleteId`, and `confirmDelete`/`cancelDelete` exist, BUT:
|
|
47
|
+
- there is **no `renderDeleteConfirm` method**, and
|
|
48
|
+
- `renderMessage` does NOT render anything when `confirmingDeleteId === message.id`.
|
|
49
|
+
- → clicking Delete currently does nothing visible. Add a `renderDeleteConfirm(message)` (inline "Delete this message? [Delete][Cancel]"), and branch to it in `renderMessage` (and hide the actions popover while confirming, like edit).
|
|
50
|
+
|
|
51
|
+
### 2. Icons — STILL raw inline SVG (the repeated ask)
|
|
52
|
+
- `renderActions` and `renderEditor` use hand-rolled `<svg><path>`.
|
|
53
|
+
- Use the shared icon constants in **`components/icons/index.ts`** (e.g. `PENCIL` for edit, `TRASH` for delete). There is also `renderIcon()` in `components/utils.ts` for ligatures/urls.
|
|
54
|
+
- No react/emoji constant exists in `components/icons/index.ts` — pick/add an appropriate one for the react button (e.g. a face/`+` reaction icon) rather than the inline circle SVG.
|
|
55
|
+
|
|
56
|
+
### 3. CSS missing for the new inline UI (`components/chat/snice-chat.css`)
|
|
57
|
+
- No styles exist yet for: `.message-edit`, `.edit-field`, `.edit-actions`, `.edit-button`, `.edit-save`, and the delete-confirm classes (`.message-confirm` / `.confirm-*` — naming TBD with #1).
|
|
58
|
+
- Use theme tokens with exact `theme.css` fallbacks (delete = `--snice-color-danger, rgb(220 38 38)`).
|
|
59
|
+
- Add parts already referenced: `edit-input`, `edit-save`, `edit-cancel` (+ delete-confirm parts).
|
|
60
|
+
|
|
61
|
+
### 4. `renderReactions` signature
|
|
62
|
+
- Call site is now `renderReactions(message.id, message.reactions)` but the method still declares a 3rd `isCurrentUser` param (now unused). Drop the unused param.
|
|
63
|
+
|
|
64
|
+
### 5. Showcase double-apply (`public/showcases/chat.html`)
|
|
65
|
+
- `wire()` adds `message-react` / `message-edit` / `message-delete` listeners that ALSO mutate. The component now self-applies these → **double application** (react toggles twice = no-op; edit/delete double-fire).
|
|
66
|
+
- Remove the react/edit/delete listeners from `wire()`. Keep only `message-send` (component does not self-add sent messages).
|
|
67
|
+
|
|
68
|
+
### 6. Dead code
|
|
69
|
+
- `handleThread` was removed; `emitMessageThread` + the `message-thread` `@dispatch` + its event-map entry are now unused. Either remove them (and from docs/types/adapter) or leave as declared public event. Decide.
|
|
70
|
+
|
|
71
|
+
## AFTER finishing the above
|
|
72
|
+
- Rebuild: `node scripts/rebuild-single-component.mjs chat` (must exit 0).
|
|
73
|
+
- Tests: add coverage for react-on-others, inline edit (commit on Enter, cancel on Esc), inline delete confirm/cancel; then run full `npm test` (all 5 stages) — green, no excuses.
|
|
74
|
+
- Docs (human + AI): update the action behavior (react on any message; inline edit; inline delete confirm) and the new parts (`edit-input`, `edit-save`, `edit-cancel`, delete-confirm parts).
|
|
75
|
+
- Visual check in dark AND light via `npm run website:dev` (:52891) — screenshots to /tmp only, never in the repo.
|
|
76
|
+
|
|
77
|
+
## Cleanup (not feature)
|
|
78
|
+
- Untracked session cruft to remove: `.superpowers/brainstorm/**`, `.playwright-mcp/**` session files.
|
|
79
|
+
- Decide whether the rebuilt artifacts (`dist/`, `public/components/snice-chat.min.js`, `adapters/react/*.js`) get committed or left to the deploy pipeline.
|
|
80
|
+
|
|
81
|
+
## Not started (queued, design-first)
|
|
82
|
+
- **#10** Bubble side-placement config (`bubble-align` own-left/own-right) layered on `layout="bubbles"`.
|
|
83
|
+
- **#11** Custom message content — pluggable element interface so a custom element (poll, choice, gif viewer) renders as a pseudo-message. NEEDS A BRAINSTORM before any code.
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# snice-chat — Custom Content & Author Identity (Design Spec)
|
|
2
|
+
|
|
3
|
+
Status: approved design, ready for an implementation plan.
|
|
4
|
+
Date: 2026-06-09.
|
|
5
|
+
Owner: snice-chat.
|
|
6
|
+
|
|
7
|
+
## 1. Purpose
|
|
8
|
+
|
|
9
|
+
Today `snice-chat` renders four message types (`text`, `file`, `image`, `system`) and the body of every message is static rendered content. We want consumers to put **interactive, stateful custom elements** in the message stream — polls, prompts, choices, gif viewers, anything they build as a snice component — and have them behave as first-class messages: they round-trip through reload/replay, their live state persists, and they freeze when their lifecycle ends.
|
|
10
|
+
|
|
11
|
+
The same design pass also pins how author identity is modeled, because the data model is being revised and the existing `author: string` collapses identity and display name in a way that breaks once `author` is a database ID.
|
|
12
|
+
|
|
13
|
+
## 2. Scope
|
|
14
|
+
|
|
15
|
+
In scope:
|
|
16
|
+
|
|
17
|
+
- A new message kind `type: 'custom'` carrying a tag + attributes + opaque state blob.
|
|
18
|
+
- A small public interface, `SniceChatContent`, that custom elements implement so the chat can hydrate them, persist their changes, and reconstruct them on replay.
|
|
19
|
+
- Both authoring paths (imperative descriptor in the `messages` array, and declarative slotting of the real element inside `<snice-chat-message>`), mirroring the existing dual API.
|
|
20
|
+
- Element-driven freeze: the element decides interactive vs frozen via a `locked` flag inside its own state.
|
|
21
|
+
- A fallback render when a custom message references a tag that is not a registered custom element.
|
|
22
|
+
- Author identity: an additive, backwards-compatible `authorId` on the message and `currentUserId` on the chat.
|
|
23
|
+
|
|
24
|
+
Out of scope (queued separately):
|
|
25
|
+
|
|
26
|
+
- Pluggable content authored as a *different* element name nested inside a `<snice-chat-message>` more than one level (only the direct custom-element child is recognised).
|
|
27
|
+
- A library of built-in custom contents (poll, choice, gif). Those land as separate components later and just implement the contract spec'd here.
|
|
28
|
+
- Threading/replies (see the threads task in `2026-05-27-chat-theming-REMAINING.md`).
|
|
29
|
+
|
|
30
|
+
## 3. Data Model
|
|
31
|
+
|
|
32
|
+
### 3.1 `ChatMessage` additions
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
type MessageType = 'text' | 'file' | 'image' | 'system' | 'custom';
|
|
36
|
+
|
|
37
|
+
interface ChatMessage {
|
|
38
|
+
// ...existing fields unchanged...
|
|
39
|
+
type: MessageType;
|
|
40
|
+
|
|
41
|
+
// present iff type === 'custom':
|
|
42
|
+
tag?: string; // e.g. 'snice-poll'
|
|
43
|
+
attributes?: Record<string, string>; // serialized to HTML attributes verbatim
|
|
44
|
+
state?: unknown; // opaque JSON blob; chat never inspects
|
|
45
|
+
|
|
46
|
+
// identity (additive, backwards compatible):
|
|
47
|
+
authorId?: string; // stable id; falls back to `author` when absent
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`content` is unused when `type === 'custom'` (the body comes from the rendered element). The field is relaxed from `string` to `string | undefined` in `ChatMessage` — a backwards-compatible widening for callers that previously always set it.
|
|
52
|
+
|
|
53
|
+
### 3.2 `SniceChat` additions
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
currentUserId?: string; // stable id of the local user
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
When `currentUserId` is set, own/other detection compares it to `message.authorId`. Otherwise it falls back to the existing `currentUser === message.author` comparison. Color-hashing uses the same precedence: hash on `authorId` when present, else `author`. No existing call site changes behavior unless the consumer opts in by setting IDs.
|
|
60
|
+
|
|
61
|
+
## 4. The Contract — `SniceChatContent`
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
export interface SniceChatContent extends HTMLElement {
|
|
65
|
+
/** Saved state blob the chat hydrates on render. Element renders from it. */
|
|
66
|
+
value: unknown;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface SniceChatContentEventMap {
|
|
70
|
+
/** Emitted whenever the element's state changes, including becoming locked.
|
|
71
|
+
* Detail is the FULL serializable state, not a delta. */
|
|
72
|
+
'content-change': CustomEvent<{ state: unknown }>;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Conventions custom elements follow but the chat does not enforce in code:
|
|
77
|
+
|
|
78
|
+
- The element renders interactive vs frozen based on a `locked` field it owns inside its own `state`. The chat never looks at `locked`; it just stores whatever state comes back.
|
|
79
|
+
- `content-change` carries the complete new state, so the chat can persist by replacing.
|
|
80
|
+
- The element may also accept a chat-level `readonly` attribute as an override (e.g. for a globally disabled chat); it's optional and not required by the contract.
|
|
81
|
+
- No `getState()` method. The `content-change` event is the only state channel out.
|
|
82
|
+
|
|
83
|
+
## 5. Round-Trip & Freeze
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
[author] <snice-poll question="Lunch?"> in light DOM
|
|
87
|
+
│
|
|
88
|
+
▼ ingest (declarative path) OR addMessage (imperative path)
|
|
89
|
+
ChatMessage { type:'custom', tag, attributes, state, ... }
|
|
90
|
+
│
|
|
91
|
+
▼ stored in messages[] / persisted by consumer to backend
|
|
92
|
+
│
|
|
93
|
+
▼ render: chat reconstructs <snice-poll> in shadow DOM,
|
|
94
|
+
sets attributes, sets .value = state
|
|
95
|
+
│
|
|
96
|
+
▼ element renders from state — interactive iff state.locked === false
|
|
97
|
+
│
|
|
98
|
+
▼ user interacts → element emits content-change { state: {...new} }
|
|
99
|
+
│
|
|
100
|
+
▼ chat updates messages[i].state AND re-emits message-content-change
|
|
101
|
+
│
|
|
102
|
+
▼ next render replays the new state (no special path)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Reload from history is just "render with the stored state." There is no `historical` vs `live` mode in the chat. A still-open poll loaded from history stays interactive because its stored `state.locked === false`. A closed one stays frozen because `state.locked === true`. The chat's behavior is identical in both cases.
|
|
106
|
+
|
|
107
|
+
## 6. Authoring API
|
|
108
|
+
|
|
109
|
+
Both paths mirror the existing dual API.
|
|
110
|
+
|
|
111
|
+
### 6.1 Imperative
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
chat.addMessage({
|
|
115
|
+
type: 'custom',
|
|
116
|
+
tag: 'snice-poll',
|
|
117
|
+
attributes: { question: 'Lunch?' },
|
|
118
|
+
state: { options: ['🍕', '🌮'], votes: {}, locked: false },
|
|
119
|
+
author: 'Alice',
|
|
120
|
+
authorId: 'u_1',
|
|
121
|
+
timestamp: new Date(),
|
|
122
|
+
});
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`messages` array entries with `type:'custom'` follow the same shape.
|
|
126
|
+
|
|
127
|
+
### 6.2 Declarative
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<snice-chat current-user="Me" current-user-id="u_42">
|
|
131
|
+
<snice-chat-message author="Alice" author-id="u_1" timestamp="...">
|
|
132
|
+
<snice-poll question="Lunch?"></snice-poll>
|
|
133
|
+
</snice-chat-message>
|
|
134
|
+
</snice-chat>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`<snice-chat-message>`'s existing `getMessageDefinition()` is extended to detect a custom-element child — the **first** light-DOM child whose tag name contains a hyphen and isn't `snice-chat-message`. Subsequent custom-element siblings are ignored (a message has one body). When present:
|
|
138
|
+
|
|
139
|
+
- `type` becomes `'custom'`.
|
|
140
|
+
- `tag` = the child's tag name.
|
|
141
|
+
- `attributes` = the child's HTML attributes serialized into a `Record<string,string>` (excluding internal snice/render attributes).
|
|
142
|
+
- `state` = the child's current `.value` if defined, else `undefined`.
|
|
143
|
+
|
|
144
|
+
Slot ingestion (existing `onSlottedMessagesChanged` observer) covers added/removed messages. The custom child itself is then re-rendered by the chat into shadow DOM; the original light-DOM element is not displayed (the chat has no projecting slot).
|
|
145
|
+
|
|
146
|
+
## 7. Rendering & Reconstruction
|
|
147
|
+
|
|
148
|
+
A custom message uses the same message frame as any other message: avatar, author, timestamp, edited marker, reactions, and the hover-actions menu are unchanged. The custom element replaces the **body** only.
|
|
149
|
+
|
|
150
|
+
Reconstruction cannot go through the snice `html` template because the tag name is dynamic. The render pass instead writes a placeholder:
|
|
151
|
+
|
|
152
|
+
```html
|
|
153
|
+
<div part="custom-host" class="custom-host" data-message-id="${m.id}"></div>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
After render, a post-render pass walks each `[data-message-id]` whose message is `type:'custom'` and:
|
|
157
|
+
|
|
158
|
+
1. Looks up the current child in the host. If it's already the correct tag, leaves it.
|
|
159
|
+
2. Otherwise clears the host and `document.createElement(tag)`, applies attributes, sets `value = state`, appends.
|
|
160
|
+
3. Subscribes once to `content-change` on the host element (delegated, so re-mounted children don't need to re-bind).
|
|
161
|
+
|
|
162
|
+
The post-render pass keys on `tag` + message id so reuse is stable across re-renders. Diffing is intentionally trivial: same tag → reuse and re-`value`; different tag → rebuild.
|
|
163
|
+
|
|
164
|
+
### 7.1 Hover actions on custom messages
|
|
165
|
+
|
|
166
|
+
Reactions and delete behave as for any message. Inline text-edit (the textarea editor) is suppressed for `type:'custom'` because there is no prose to edit; "editing" a poll means interacting with it.
|
|
167
|
+
|
|
168
|
+
### 7.2 Unknown tag fallback
|
|
169
|
+
|
|
170
|
+
If `customElements.get(tag)` is undefined at render time, the host renders a small placeholder:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
<div part="custom-fallback" class="custom-fallback">
|
|
174
|
+
Unsupported content (<code>${tag}</code>)
|
|
175
|
+
</div>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The message's `state` is left intact in the model so nothing is lost if the consumer later registers the element and re-renders.
|
|
179
|
+
|
|
180
|
+
## 8. Chat-Level Events
|
|
181
|
+
|
|
182
|
+
A new event mirrors the self-apply-then-emit pattern already used for react / edit / delete:
|
|
183
|
+
|
|
184
|
+
```typescript
|
|
185
|
+
'message-content-change': CustomEvent<{ messageId: string; state: unknown }>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
When the chat receives `content-change` from a custom child, it updates `messages[i].state` in place AND re-emits `message-content-change` with the messageId so the consumer can persist to a backend. Consumers must not also call `updateMessage` in their handler — the chat already applied it (the same double-apply trap as the other actions).
|
|
189
|
+
|
|
190
|
+
## 9. Author Identity (Folded Section)
|
|
191
|
+
|
|
192
|
+
This is a small additive change folded into the same spec because it touches the same `ChatMessage` type and the same color/own-detection paths.
|
|
193
|
+
|
|
194
|
+
- Add `authorId?: string` to `ChatMessage`.
|
|
195
|
+
- Add `currentUserId?: string` to `SniceChat` (attribute `current-user-id`).
|
|
196
|
+
- `<snice-chat-message>` gains an `author-id` attribute that flows into `getMessageDefinition()`.
|
|
197
|
+
- `isCurrentUser` becomes:
|
|
198
|
+
```typescript
|
|
199
|
+
const isCurrentUser = this.currentUserId
|
|
200
|
+
? message.authorId === this.currentUserId
|
|
201
|
+
: message.author === this.currentUser;
|
|
202
|
+
```
|
|
203
|
+
- Color hashing in `autoAuthorColor` and `resolveAuthorColor` keys off `authorId` when present, else `author`. The display in the message header is always `author` (the name), unchanged.
|
|
204
|
+
|
|
205
|
+
Backwards compatibility: consumers who never set IDs see no behavior change. Consumers who set IDs get stable color and ownership even when display names change or collide.
|
|
206
|
+
|
|
207
|
+
## 10. Testing
|
|
208
|
+
|
|
209
|
+
- `type:'custom'` ingest from a slotted `<snice-chat-message>` carrying a child custom element: produces a `ChatMessage` with `tag`, `attributes`, `state` derived from the child's `.value`.
|
|
210
|
+
- `addMessage({type:'custom', ...})` renders a host containing the correct tag with attributes applied and `.value` set to the stored state.
|
|
211
|
+
- A `content-change` from the custom child updates the message's `state` in the array AND fires `message-content-change` with that state.
|
|
212
|
+
- Re-render after a `state` change reuses the existing child element (no flicker / no re-create) when `tag` is unchanged.
|
|
213
|
+
- Changing the `tag` rebuilds the child.
|
|
214
|
+
- Unknown tag renders the fallback placeholder and preserves `state`.
|
|
215
|
+
- Inline text-edit is suppressed on a `type:'custom'` message; reactions and delete still work.
|
|
216
|
+
- Author identity: `authorId === currentUserId` gives the `message-own` part regardless of display name; color hash is stable across display-name changes when `authorId` is set; without IDs, behavior is identical to today.
|
|
217
|
+
|
|
218
|
+
All tests live alongside existing chat tests (`tests/components/chat.test.ts`, `tests/components/chat-message.test.ts`).
|
|
219
|
+
|
|
220
|
+
## 11. Implementation Notes
|
|
221
|
+
|
|
222
|
+
- Dynamic tag names cannot appear in the snice `html` template. The chat renders a host placeholder per custom message and mounts/updates the child imperatively in a post-render pass (the table's programmatic mount pattern is the prior art).
|
|
223
|
+
- `attributes` is `Record<string,string>` because HTML attributes are strings; complex values must live in `state`, not `attributes`. The contract is clear about this.
|
|
224
|
+
- `state` is treated as opaque JSON — the chat does not clone or freeze it. Consumers persisting to a backend should treat it the same.
|
|
225
|
+
- Delegated `content-change` listener on the messages area, so re-mounts don't leak handlers.
|
|
226
|
+
|
|
227
|
+
## 12. Migration
|
|
228
|
+
|
|
229
|
+
- No required migration: every existing call site keeps working. `type:'custom'`, `tag`, `attributes`, `state`, `authorId`, `currentUserId`, and `message-content-change` are all additive.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
Ready for `writing-plans`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snice",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A decorator-driven web component library with differential rendering, routing, controllers, and 130+ ready-made UI components. Use as much or as little as you want. Zero dependencies, works anywhere.",
|
|
6
6
|
"main": "dist/index.cjs",
|