snice 4.35.1 → 4.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adapters/react/SniceProvider.js +1 -1
- package/adapters/react/SniceRouter.js +1 -1
- package/adapters/react/matchRoute.js +1 -1
- package/adapters/react/useRequestHandler.js +1 -1
- 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 +1 -1
- package/dist/cdn/action-bar/snice-action-bar.js +1 -1
- package/dist/cdn/action-bar/snice-action-bar.min.js +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.min.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.min.js +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.js +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.min.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
- package/dist/cdn/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.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/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.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/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.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/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.min.js +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.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/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.min.js +1 -1
- package/dist/cdn/gantt/snice-gantt.js +1 -1
- package/dist/cdn/gantt/snice-gantt.min.js +1 -1
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/gauge/snice-gauge.min.js +1 -1
- package/dist/cdn/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.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/invoice/snice-invoice.js +1 -1
- package/dist/cdn/invoice/snice-invoice.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/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.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/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.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/snice-map.js +1 -1
- package/dist/cdn/map/snice-map.min.js +1 -1
- package/dist/cdn/markdown/snice-markdown.js +1 -1
- package/dist/cdn/markdown/snice-markdown.min.js +1 -1
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/masonry/snice-masonry.min.js +1 -1
- package/dist/cdn/menu/snice-menu.js +1 -1
- package/dist/cdn/menu/snice-menu.min.js +1 -1
- package/dist/cdn/message-strip/snice-message-strip.js +1 -1
- package/dist/cdn/message-strip/snice-message-strip.min.js +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.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/snice-notification-center.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.min.js +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/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 +1 -1
- package/dist/cdn/product-card/snice-product-card.min.js +1 -1
- package/dist/cdn/progress/snice-progress.js +1 -1
- package/dist/cdn/progress/snice-progress.min.js +1 -1
- package/dist/cdn/progress-ring/snice-progress-ring.js +1 -1
- package/dist/cdn/progress-ring/snice-progress-ring.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/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 +103 -33
- 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 +103 -33
- 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.min.js +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.min.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.min.js +1 -1
- package/dist/cdn/spreadsheet/snice-spreadsheet.js +1 -1
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +1 -1
- package/dist/cdn/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/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/snice-tag.js +1 -1
- package/dist/cdn/tag/snice-tag.min.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.min.js +1 -1
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.min.js +1 -1
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/textarea/snice-textarea.min.js +1 -1
- package/dist/cdn/time-picker/snice-time-picker.js +1 -1
- package/dist/cdn/time-picker/snice-time-picker.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/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/index.cjs +100 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +100 -30
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +100 -30
- package/dist/index.iife.js.map +1 -1
- 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.js +1 -1
- package/dist/react/useRequestHandler.js +1 -1
- package/dist/symbols.cjs +3 -1
- package/dist/symbols.cjs.map +1 -1
- package/dist/symbols.d.ts +1 -0
- package/dist/symbols.esm.js +3 -2
- package/dist/symbols.esm.js.map +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/patterns.md +28 -0
- package/docs/elements.md +79 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* snice v4.
|
|
2
|
+
* snice v4.36.1
|
|
3
3
|
* 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.
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -8,7 +8,7 @@ var Snice = (function (exports) {
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
/*!
|
|
11
|
-
* snice v4.
|
|
11
|
+
* snice v4.36.0
|
|
12
12
|
* 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.
|
|
13
13
|
* (c) 2024
|
|
14
14
|
* Released under the MIT License.
|
|
@@ -83,6 +83,7 @@ var Snice = (function (exports) {
|
|
|
83
83
|
const RENDER_CALLBACKS = getSymbol('render-callbacks');
|
|
84
84
|
const STYLES_METHOD = getSymbol('styles-method');
|
|
85
85
|
const STYLES_APPLIED = getSymbol('styles-applied');
|
|
86
|
+
const PARENT_STYLES_METHODS = getSymbol('parent-styles-methods');
|
|
86
87
|
// Navigation context symbols
|
|
87
88
|
const CONTEXT_HANDLER = getSymbol('context-handler');
|
|
88
89
|
const NAVIGATION_CONTEXT_INSTANCE = getSymbol('navigation-context-instance');
|
|
@@ -493,12 +494,13 @@ var Snice = (function (exports) {
|
|
|
493
494
|
}
|
|
494
495
|
return function (target, context) {
|
|
495
496
|
const propertyKey = context.name;
|
|
496
|
-
const initKey = `__observe_init_${propertyKey}`;
|
|
497
497
|
context.addInitializer(function () {
|
|
498
498
|
const constructor = this.constructor;
|
|
499
|
-
if (constructor
|
|
499
|
+
if (!constructor.__observeMethods)
|
|
500
|
+
constructor.__observeMethods = new Set();
|
|
501
|
+
if (constructor.__observeMethods.has(target))
|
|
500
502
|
return;
|
|
501
|
-
constructor
|
|
503
|
+
constructor.__observeMethods.add(target);
|
|
502
504
|
if (!constructor[OBSERVERS]) {
|
|
503
505
|
constructor[OBSERVERS] = [];
|
|
504
506
|
}
|
|
@@ -909,12 +911,13 @@ var Snice = (function (exports) {
|
|
|
909
911
|
function respond(requestName, options) {
|
|
910
912
|
return function (target, context) {
|
|
911
913
|
const propertyKey = context.name;
|
|
912
|
-
const initKey = `__respond_init_${requestName}_${propertyKey}`;
|
|
913
914
|
context.addInitializer(function () {
|
|
914
915
|
const constructor = this.constructor;
|
|
915
|
-
if (constructor
|
|
916
|
+
if (!constructor.__respondMethods)
|
|
917
|
+
constructor.__respondMethods = new Set();
|
|
918
|
+
if (constructor.__respondMethods.has(target))
|
|
916
919
|
return;
|
|
917
|
-
constructor
|
|
920
|
+
constructor.__respondMethods.add(target);
|
|
918
921
|
if (!constructor[CHANNEL_HANDLERS]) {
|
|
919
922
|
constructor[CHANNEL_HANDLERS] = [];
|
|
920
923
|
}
|
|
@@ -2257,14 +2260,14 @@ var Snice = (function (exports) {
|
|
|
2257
2260
|
}
|
|
2258
2261
|
return function (originalMethod, context) {
|
|
2259
2262
|
const methodName = context.name;
|
|
2260
|
-
const initKey = `__on_init_${methodName}_${selector || ''}_${JSON.stringify(eventName)}`;
|
|
2261
2263
|
context.addInitializer(function () {
|
|
2262
2264
|
const constructor = this.constructor;
|
|
2263
|
-
//
|
|
2264
|
-
if (constructor
|
|
2265
|
+
// Dedup by method reference — allows child to register same-named methods
|
|
2266
|
+
if (!constructor.__onMethods)
|
|
2267
|
+
constructor.__onMethods = new Set();
|
|
2268
|
+
if (constructor.__onMethods.has(originalMethod))
|
|
2265
2269
|
return;
|
|
2266
|
-
|
|
2267
|
-
constructor[initKey] = true;
|
|
2270
|
+
constructor.__onMethods.add(originalMethod);
|
|
2268
2271
|
if (!constructor[ON_HANDLERS]) {
|
|
2269
2272
|
constructor[ON_HANDLERS] = [];
|
|
2270
2273
|
}
|
|
@@ -2758,12 +2761,13 @@ var Snice = (function (exports) {
|
|
|
2758
2761
|
function context$1(options = {}) {
|
|
2759
2762
|
return function (originalMethod, context) {
|
|
2760
2763
|
const methodName = context.name;
|
|
2761
|
-
const initKey = `__context_init_${methodName}`;
|
|
2762
2764
|
context.addInitializer(function () {
|
|
2763
2765
|
const constructor = this.constructor;
|
|
2764
|
-
if (constructor
|
|
2766
|
+
if (!constructor.__contextMethods)
|
|
2767
|
+
constructor.__contextMethods = new Set();
|
|
2768
|
+
if (constructor.__contextMethods.has(originalMethod))
|
|
2765
2769
|
return;
|
|
2766
|
-
constructor
|
|
2770
|
+
constructor.__contextMethods.add(originalMethod);
|
|
2767
2771
|
if (!constructor[CONTEXT_HANDLERS]) {
|
|
2768
2772
|
constructor[CONTEXT_HANDLERS] = [];
|
|
2769
2773
|
}
|
|
@@ -3087,7 +3091,13 @@ var Snice = (function (exports) {
|
|
|
3087
3091
|
function styles() {
|
|
3088
3092
|
return function (originalMethod, context) {
|
|
3089
3093
|
context.addInitializer(function () {
|
|
3090
|
-
//
|
|
3094
|
+
// Collect parent styles methods before overwriting with child's
|
|
3095
|
+
if (this[STYLES_METHOD] && !this[PARENT_STYLES_METHODS]) {
|
|
3096
|
+
this[PARENT_STYLES_METHODS] = [this[STYLES_METHOD]];
|
|
3097
|
+
}
|
|
3098
|
+
else if (this[STYLES_METHOD] && this[PARENT_STYLES_METHODS]) {
|
|
3099
|
+
this[PARENT_STYLES_METHODS].push(this[STYLES_METHOD]);
|
|
3100
|
+
}
|
|
3091
3101
|
this[STYLES_METHOD] = originalMethod;
|
|
3092
3102
|
});
|
|
3093
3103
|
return originalMethod;
|
|
@@ -3106,11 +3116,22 @@ var Snice = (function (exports) {
|
|
|
3106
3116
|
return;
|
|
3107
3117
|
element[STYLES_APPLIED] = true;
|
|
3108
3118
|
try {
|
|
3119
|
+
// Collect all CSS results: parent styles first, then child styles
|
|
3120
|
+
const allResults = [];
|
|
3121
|
+
const parentMethods = element[PARENT_STYLES_METHODS];
|
|
3122
|
+
if (parentMethods) {
|
|
3123
|
+
for (const method of parentMethods) {
|
|
3124
|
+
const r = method.call(element);
|
|
3125
|
+
if (isCSSResult(r))
|
|
3126
|
+
allResults.push(r);
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3109
3129
|
const result = stylesMethod.call(element);
|
|
3110
3130
|
if (!isCSSResult(result)) {
|
|
3111
3131
|
console.warn('Styles method must return css`` template result');
|
|
3112
3132
|
return;
|
|
3113
3133
|
}
|
|
3134
|
+
allResults.push(result);
|
|
3114
3135
|
// Ensure shadow root exists
|
|
3115
3136
|
if (!element.shadowRoot) {
|
|
3116
3137
|
element.attachShadow({ mode: 'open' });
|
|
@@ -3118,14 +3139,16 @@ var Snice = (function (exports) {
|
|
|
3118
3139
|
if (!element.shadowRoot)
|
|
3119
3140
|
return;
|
|
3120
3141
|
// Prefer constructable stylesheets
|
|
3121
|
-
if (
|
|
3122
|
-
element.shadowRoot.adoptedStyleSheets =
|
|
3142
|
+
if (allResults.every(r => !!r.styleSheet) && 'adoptedStyleSheets' in element.shadowRoot) {
|
|
3143
|
+
element.shadowRoot.adoptedStyleSheets = allResults.map(r => r.styleSheet);
|
|
3123
3144
|
return;
|
|
3124
3145
|
}
|
|
3125
|
-
// Fallback
|
|
3126
|
-
const
|
|
3127
|
-
|
|
3128
|
-
|
|
3146
|
+
// Fallback — one <style> tag per stylesheet, preserving cascade order
|
|
3147
|
+
for (const r of allResults) {
|
|
3148
|
+
const style = document.createElement('style');
|
|
3149
|
+
style.textContent = r.cssText;
|
|
3150
|
+
element.shadowRoot.appendChild(style);
|
|
3151
|
+
}
|
|
3129
3152
|
}
|
|
3130
3153
|
catch (error) {
|
|
3131
3154
|
console.error('Error applying styles:', error);
|
|
@@ -3398,7 +3421,45 @@ var Snice = (function (exports) {
|
|
|
3398
3421
|
}
|
|
3399
3422
|
};
|
|
3400
3423
|
}
|
|
3424
|
+
/**
|
|
3425
|
+
* Walk the prototype chain and merge parent element metadata into the child.
|
|
3426
|
+
* Called once at class definition time — zero per-instance cost.
|
|
3427
|
+
* Skips plain HTMLElement (no metadata to merge).
|
|
3428
|
+
*
|
|
3429
|
+
* Only merges PROPERTIES (stored via context.metadata at decoration time)
|
|
3430
|
+
* and formAssociated. Other handler registrations (@watch, @on, @ready, etc.)
|
|
3431
|
+
* inherit automatically via TC39 addInitializer — parent initializers run
|
|
3432
|
+
* during child instance construction.
|
|
3433
|
+
*/
|
|
3434
|
+
function mergeParentMetadata(constructor) {
|
|
3435
|
+
let parent = Object.getPrototypeOf(constructor);
|
|
3436
|
+
// Collect ancestors bottom-up, then merge top-down so the deepest parent goes first
|
|
3437
|
+
const ancestors = [];
|
|
3438
|
+
while (parent && parent !== HTMLElement && parent !== Function.prototype) {
|
|
3439
|
+
ancestors.push(parent);
|
|
3440
|
+
parent = Object.getPrototypeOf(parent);
|
|
3441
|
+
}
|
|
3442
|
+
ancestors.reverse();
|
|
3443
|
+
for (const ancestor of ancestors) {
|
|
3444
|
+
// Properties (Map) — parent first, child overrides
|
|
3445
|
+
if (ancestor[PROPERTIES]) {
|
|
3446
|
+
if (!constructor[PROPERTIES])
|
|
3447
|
+
constructor[PROPERTIES] = new Map();
|
|
3448
|
+
for (const [key, value] of ancestor[PROPERTIES]) {
|
|
3449
|
+
if (!constructor[PROPERTIES].has(key)) {
|
|
3450
|
+
constructor[PROPERTIES].set(key, value);
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
// formAssociated — inherit if parent is form-associated
|
|
3455
|
+
if (ancestor.formAssociated && !constructor.formAssociated) {
|
|
3456
|
+
constructor.formAssociated = true;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3401
3460
|
function defineElement(tagName, constructor, context, options) {
|
|
3461
|
+
// Merge metadata from parent @element classes (inheritance support)
|
|
3462
|
+
mergeParentMetadata(constructor);
|
|
3402
3463
|
if (context.metadata && context.metadata[PROPERTIES]) {
|
|
3403
3464
|
if (!constructor[PROPERTIES])
|
|
3404
3465
|
constructor[PROPERTIES] = new Map();
|
|
@@ -3452,8 +3513,12 @@ var Snice = (function (exports) {
|
|
|
3452
3513
|
}
|
|
3453
3514
|
// Always store property options on constructor for runtime access
|
|
3454
3515
|
constructor[PROPERTIES].set(propertyKey, finalOptions);
|
|
3455
|
-
// Set up the property descriptor
|
|
3456
|
-
|
|
3516
|
+
// Set up the property descriptor — re-define if a subclass overrides
|
|
3517
|
+
// the property with different options (different closure captures)
|
|
3518
|
+
const definerKey = `__propDef_${propertyKey}`;
|
|
3519
|
+
const existingDefiner = this.constructor.prototype[definerKey];
|
|
3520
|
+
if (!existingDefiner || existingDefiner !== options) {
|
|
3521
|
+
this.constructor.prototype[definerKey] = options;
|
|
3457
3522
|
const descriptor = {
|
|
3458
3523
|
get() {
|
|
3459
3524
|
// attribute: false — use internal storage only, no DOM sync
|
|
@@ -3589,12 +3654,15 @@ var Snice = (function (exports) {
|
|
|
3589
3654
|
function watch(...propertyNames) {
|
|
3590
3655
|
return function (target, context) {
|
|
3591
3656
|
const methodName = context.name;
|
|
3592
|
-
const initKey = `__watch_init_${methodName}`;
|
|
3593
3657
|
context.addInitializer(function () {
|
|
3594
3658
|
const constructor = this.constructor;
|
|
3595
|
-
|
|
3659
|
+
// Dedup by method reference — allows child classes to register
|
|
3660
|
+
// their own method with the same name as a parent's
|
|
3661
|
+
if (!constructor.__watchMethods)
|
|
3662
|
+
constructor.__watchMethods = new Set();
|
|
3663
|
+
if (constructor.__watchMethods.has(target))
|
|
3596
3664
|
return;
|
|
3597
|
-
constructor
|
|
3665
|
+
constructor.__watchMethods.add(target);
|
|
3598
3666
|
if (!constructor[PROPERTY_WATCHERS]) {
|
|
3599
3667
|
constructor[PROPERTY_WATCHERS] = new Map();
|
|
3600
3668
|
}
|
|
@@ -3665,12 +3733,14 @@ var Snice = (function (exports) {
|
|
|
3665
3733
|
}
|
|
3666
3734
|
function registerHandler(symbol, prefix, target, context, extra) {
|
|
3667
3735
|
const methodName = context.name;
|
|
3668
|
-
const initKey = `__${prefix}_init_${methodName}`;
|
|
3669
3736
|
context.addInitializer(function () {
|
|
3670
3737
|
const constructor = this.constructor;
|
|
3671
|
-
|
|
3738
|
+
const setKey = `__${prefix}Methods`;
|
|
3739
|
+
if (!constructor[setKey])
|
|
3740
|
+
constructor[setKey] = new Set();
|
|
3741
|
+
if (constructor[setKey].has(target))
|
|
3672
3742
|
return;
|
|
3673
|
-
constructor[
|
|
3743
|
+
constructor[setKey].add(target);
|
|
3674
3744
|
if (!constructor[symbol])
|
|
3675
3745
|
constructor[symbol] = [];
|
|
3676
3746
|
constructor[symbol].push({ methodName, method: target, ...extra });
|
|
@@ -5538,7 +5608,7 @@ var Snice = (function (exports) {
|
|
|
5538
5608
|
}
|
|
5539
5609
|
|
|
5540
5610
|
/*!
|
|
5541
|
-
* snice v4.
|
|
5611
|
+
* snice v4.36.0
|
|
5542
5612
|
* 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.
|
|
5543
5613
|
* (c) 2024
|
|
5544
5614
|
* Released under the MIT License.
|
|
@@ -5555,7 +5625,7 @@ var Snice = (function (exports) {
|
|
|
5555
5625
|
}
|
|
5556
5626
|
|
|
5557
5627
|
/*!
|
|
5558
|
-
* snice v4.
|
|
5628
|
+
* snice v4.36.0
|
|
5559
5629
|
* 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.
|
|
5560
5630
|
* (c) 2024
|
|
5561
5631
|
* Released under the MIT License.
|