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.
Files changed (305) hide show
  1. package/adapters/react/SniceProvider.js +1 -1
  2. package/adapters/react/SniceRouter.js +1 -1
  3. package/adapters/react/matchRoute.js +1 -1
  4. package/adapters/react/useRequestHandler.js +1 -1
  5. package/dist/cdn/accordion/snice-accordion.js +1 -1
  6. package/dist/cdn/accordion/snice-accordion.min.js +1 -1
  7. package/dist/cdn/action-bar/README.md +1 -1
  8. package/dist/cdn/action-bar/snice-action-bar.js +1 -1
  9. package/dist/cdn/action-bar/snice-action-bar.min.js +1 -1
  10. package/dist/cdn/activity-feed/snice-activity-feed.js +1 -1
  11. package/dist/cdn/activity-feed/snice-activity-feed.min.js +1 -1
  12. package/dist/cdn/alert/snice-alert.js +1 -1
  13. package/dist/cdn/alert/snice-alert.min.js +1 -1
  14. package/dist/cdn/app-tiles/snice-app-tiles.js +1 -1
  15. package/dist/cdn/app-tiles/snice-app-tiles.min.js +1 -1
  16. package/dist/cdn/approval-flow/snice-approval-flow.js +1 -1
  17. package/dist/cdn/approval-flow/snice-approval-flow.min.js +1 -1
  18. package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
  19. package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
  20. package/dist/cdn/availability/snice-availability.js +1 -1
  21. package/dist/cdn/availability/snice-availability.min.js +1 -1
  22. package/dist/cdn/avatar/snice-avatar.js +1 -1
  23. package/dist/cdn/avatar/snice-avatar.min.js +1 -1
  24. package/dist/cdn/avatar-group/snice-avatar-group.js +1 -1
  25. package/dist/cdn/avatar-group/snice-avatar-group.min.js +1 -1
  26. package/dist/cdn/badge/snice-badge.js +1 -1
  27. package/dist/cdn/badge/snice-badge.min.js +1 -1
  28. package/dist/cdn/banner/snice-banner.js +1 -1
  29. package/dist/cdn/banner/snice-banner.min.js +1 -1
  30. package/dist/cdn/binpack/snice-binpack.js +1 -1
  31. package/dist/cdn/binpack/snice-binpack.min.js +1 -1
  32. package/dist/cdn/book/snice-book.js +1 -1
  33. package/dist/cdn/book/snice-book.min.js +1 -1
  34. package/dist/cdn/booking/snice-booking.js +1 -1
  35. package/dist/cdn/booking/snice-booking.min.js +1 -1
  36. package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
  37. package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +1 -1
  38. package/dist/cdn/button/snice-button.js +1 -1
  39. package/dist/cdn/button/snice-button.min.js +1 -1
  40. package/dist/cdn/calendar/snice-calendar.js +1 -1
  41. package/dist/cdn/calendar/snice-calendar.min.js +1 -1
  42. package/dist/cdn/camera/snice-camera.js +1 -1
  43. package/dist/cdn/camera/snice-camera.min.js +1 -1
  44. package/dist/cdn/camera-annotate/snice-camera-annotate.js +1 -1
  45. package/dist/cdn/camera-annotate/snice-camera-annotate.min.js +1 -1
  46. package/dist/cdn/candlestick/snice-candlestick.js +1 -1
  47. package/dist/cdn/candlestick/snice-candlestick.min.js +1 -1
  48. package/dist/cdn/card/snice-card.js +1 -1
  49. package/dist/cdn/card/snice-card.min.js +1 -1
  50. package/dist/cdn/carousel/snice-carousel.js +1 -1
  51. package/dist/cdn/carousel/snice-carousel.min.js +1 -1
  52. package/dist/cdn/cart/snice-cart.js +1 -1
  53. package/dist/cdn/cart/snice-cart.min.js +1 -1
  54. package/dist/cdn/chart/snice-chart.js +1 -1
  55. package/dist/cdn/chart/snice-chart.min.js +1 -1
  56. package/dist/cdn/chat/snice-chat.js +1 -1
  57. package/dist/cdn/chat/snice-chat.min.js +1 -1
  58. package/dist/cdn/checkbox/snice-checkbox.js +1 -1
  59. package/dist/cdn/checkbox/snice-checkbox.min.js +1 -1
  60. package/dist/cdn/chip/snice-chip.js +1 -1
  61. package/dist/cdn/chip/snice-chip.min.js +1 -1
  62. package/dist/cdn/code-block/snice-code-block.js +1 -1
  63. package/dist/cdn/code-block/snice-code-block.min.js +1 -1
  64. package/dist/cdn/color-display/snice-color-display.js +1 -1
  65. package/dist/cdn/color-display/snice-color-display.min.js +1 -1
  66. package/dist/cdn/color-picker/snice-color-picker.js +1 -1
  67. package/dist/cdn/color-picker/snice-color-picker.min.js +1 -1
  68. package/dist/cdn/command-palette/snice-command-palette.js +1 -1
  69. package/dist/cdn/command-palette/snice-command-palette.min.js +1 -1
  70. package/dist/cdn/comments/snice-comments.js +1 -1
  71. package/dist/cdn/comments/snice-comments.min.js +1 -1
  72. package/dist/cdn/countdown/snice-countdown.js +1 -1
  73. package/dist/cdn/countdown/snice-countdown.min.js +1 -1
  74. package/dist/cdn/cropper/snice-cropper.js +1 -1
  75. package/dist/cdn/cropper/snice-cropper.min.js +1 -1
  76. package/dist/cdn/data-card/snice-data-card.js +1 -1
  77. package/dist/cdn/data-card/snice-data-card.min.js +1 -1
  78. package/dist/cdn/date-picker/snice-date-picker.js +1 -1
  79. package/dist/cdn/date-picker/snice-date-picker.min.js +1 -1
  80. package/dist/cdn/date-range-picker/snice-date-range-picker.js +1 -1
  81. package/dist/cdn/date-range-picker/snice-date-range-picker.min.js +1 -1
  82. package/dist/cdn/date-time-picker/snice-date-time-picker.js +1 -1
  83. package/dist/cdn/date-time-picker/snice-date-time-picker.min.js +1 -1
  84. package/dist/cdn/diff/snice-diff.js +1 -1
  85. package/dist/cdn/diff/snice-diff.min.js +1 -1
  86. package/dist/cdn/divider/snice-divider.js +1 -1
  87. package/dist/cdn/divider/snice-divider.min.js +1 -1
  88. package/dist/cdn/doc/snice-doc.js +1 -1
  89. package/dist/cdn/doc/snice-doc.min.js +1 -1
  90. package/dist/cdn/draw/snice-draw.js +1 -1
  91. package/dist/cdn/draw/snice-draw.min.js +1 -1
  92. package/dist/cdn/drawer/snice-drawer.js +1 -1
  93. package/dist/cdn/drawer/snice-drawer.min.js +1 -1
  94. package/dist/cdn/empty-state/snice-empty-state.js +1 -1
  95. package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
  96. package/dist/cdn/estimate/snice-estimate.js +1 -1
  97. package/dist/cdn/estimate/snice-estimate.min.js +1 -1
  98. package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
  99. package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
  100. package/dist/cdn/file-upload/snice-file-upload.js +1 -1
  101. package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
  102. package/dist/cdn/flip-card/snice-flip-card.js +1 -1
  103. package/dist/cdn/flip-card/snice-flip-card.min.js +1 -1
  104. package/dist/cdn/flow/snice-flow.js +1 -1
  105. package/dist/cdn/flow/snice-flow.min.js +1 -1
  106. package/dist/cdn/form-layout/snice-form-layout.js +1 -1
  107. package/dist/cdn/form-layout/snice-form-layout.min.js +1 -1
  108. package/dist/cdn/funnel/snice-funnel.js +1 -1
  109. package/dist/cdn/funnel/snice-funnel.min.js +1 -1
  110. package/dist/cdn/gantt/snice-gantt.js +1 -1
  111. package/dist/cdn/gantt/snice-gantt.min.js +1 -1
  112. package/dist/cdn/gauge/snice-gauge.js +1 -1
  113. package/dist/cdn/gauge/snice-gauge.min.js +1 -1
  114. package/dist/cdn/grid/snice-grid.js +1 -1
  115. package/dist/cdn/grid/snice-grid.min.js +1 -1
  116. package/dist/cdn/heatmap/snice-heatmap.js +1 -1
  117. package/dist/cdn/heatmap/snice-heatmap.min.js +1 -1
  118. package/dist/cdn/image/snice-image.js +1 -1
  119. package/dist/cdn/image/snice-image.min.js +1 -1
  120. package/dist/cdn/input/snice-input.js +1 -1
  121. package/dist/cdn/input/snice-input.min.js +1 -1
  122. package/dist/cdn/invoice/snice-invoice.js +1 -1
  123. package/dist/cdn/invoice/snice-invoice.min.js +1 -1
  124. package/dist/cdn/kanban/snice-kanban.js +1 -1
  125. package/dist/cdn/kanban/snice-kanban.min.js +1 -1
  126. package/dist/cdn/key-value/snice-key-value.js +1 -1
  127. package/dist/cdn/key-value/snice-key-value.min.js +1 -1
  128. package/dist/cdn/kpi/snice-kpi.js +1 -1
  129. package/dist/cdn/kpi/snice-kpi.min.js +1 -1
  130. package/dist/cdn/layout/snice-layout.js +1 -1
  131. package/dist/cdn/layout/snice-layout.min.js +1 -1
  132. package/dist/cdn/leaderboard/snice-leaderboard.js +1 -1
  133. package/dist/cdn/leaderboard/snice-leaderboard.min.js +1 -1
  134. package/dist/cdn/link/snice-link.js +1 -1
  135. package/dist/cdn/link/snice-link.min.js +1 -1
  136. package/dist/cdn/link-preview/snice-link-preview.js +1 -1
  137. package/dist/cdn/link-preview/snice-link-preview.min.js +1 -1
  138. package/dist/cdn/list/snice-list.js +1 -1
  139. package/dist/cdn/list/snice-list.min.js +1 -1
  140. package/dist/cdn/location/snice-location.js +1 -1
  141. package/dist/cdn/location/snice-location.min.js +1 -1
  142. package/dist/cdn/login/snice-login.js +1 -1
  143. package/dist/cdn/login/snice-login.min.js +1 -1
  144. package/dist/cdn/map/snice-map.js +1 -1
  145. package/dist/cdn/map/snice-map.min.js +1 -1
  146. package/dist/cdn/markdown/snice-markdown.js +1 -1
  147. package/dist/cdn/markdown/snice-markdown.min.js +1 -1
  148. package/dist/cdn/masonry/snice-masonry.js +1 -1
  149. package/dist/cdn/masonry/snice-masonry.min.js +1 -1
  150. package/dist/cdn/menu/snice-menu.js +1 -1
  151. package/dist/cdn/menu/snice-menu.min.js +1 -1
  152. package/dist/cdn/message-strip/snice-message-strip.js +1 -1
  153. package/dist/cdn/message-strip/snice-message-strip.min.js +1 -1
  154. package/dist/cdn/metric-table/snice-metric-table.js +1 -1
  155. package/dist/cdn/metric-table/snice-metric-table.min.js +1 -1
  156. package/dist/cdn/modal/snice-modal.js +1 -1
  157. package/dist/cdn/modal/snice-modal.min.js +1 -1
  158. package/dist/cdn/music-player/snice-music-player.js +1 -1
  159. package/dist/cdn/music-player/snice-music-player.min.js +1 -1
  160. package/dist/cdn/nav/snice-nav.js +1 -1
  161. package/dist/cdn/nav/snice-nav.min.js +1 -1
  162. package/dist/cdn/network-graph/snice-network-graph.js +1 -1
  163. package/dist/cdn/network-graph/snice-network-graph.min.js +1 -1
  164. package/dist/cdn/notification-center/snice-notification-center.js +1 -1
  165. package/dist/cdn/notification-center/snice-notification-center.min.js +1 -1
  166. package/dist/cdn/order-tracker/snice-order-tracker.js +1 -1
  167. package/dist/cdn/order-tracker/snice-order-tracker.min.js +1 -1
  168. package/dist/cdn/org-chart/snice-org-chart.js +1 -1
  169. package/dist/cdn/org-chart/snice-org-chart.min.js +1 -1
  170. package/dist/cdn/pagination/snice-pagination.js +1 -1
  171. package/dist/cdn/pagination/snice-pagination.min.js +1 -1
  172. package/dist/cdn/paint/snice-paint.js +1 -1
  173. package/dist/cdn/paint/snice-paint.min.js +1 -1
  174. package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +1 -1
  175. package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +1 -1
  176. package/dist/cdn/permission-matrix/snice-permission-matrix.js +1 -1
  177. package/dist/cdn/permission-matrix/snice-permission-matrix.min.js +1 -1
  178. package/dist/cdn/podcast-player/snice-podcast-player.js +1 -1
  179. package/dist/cdn/podcast-player/snice-podcast-player.min.js +1 -1
  180. package/dist/cdn/pricing-table/snice-pricing-table.js +1 -1
  181. package/dist/cdn/pricing-table/snice-pricing-table.min.js +1 -1
  182. package/dist/cdn/product-card/snice-product-card.js +1 -1
  183. package/dist/cdn/product-card/snice-product-card.min.js +1 -1
  184. package/dist/cdn/progress/snice-progress.js +1 -1
  185. package/dist/cdn/progress/snice-progress.min.js +1 -1
  186. package/dist/cdn/progress-ring/snice-progress-ring.js +1 -1
  187. package/dist/cdn/progress-ring/snice-progress-ring.min.js +1 -1
  188. package/dist/cdn/qr-code/snice-qr-code.js +1 -1
  189. package/dist/cdn/qr-code/snice-qr-code.min.js +1 -1
  190. package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
  191. package/dist/cdn/qr-reader/snice-qr-reader.min.js +1 -1
  192. package/dist/cdn/radio/snice-radio.js +1 -1
  193. package/dist/cdn/radio/snice-radio.min.js +1 -1
  194. package/dist/cdn/range-slider/snice-range-slider.js +1 -1
  195. package/dist/cdn/range-slider/snice-range-slider.min.js +1 -1
  196. package/dist/cdn/rating/snice-rating.js +1 -1
  197. package/dist/cdn/rating/snice-rating.min.js +1 -1
  198. package/dist/cdn/receipt/snice-receipt.js +1 -1
  199. package/dist/cdn/receipt/snice-receipt.min.js +1 -1
  200. package/dist/cdn/recipe/snice-recipe.js +1 -1
  201. package/dist/cdn/recipe/snice-recipe.min.js +1 -1
  202. package/dist/cdn/runtime/README.md +2 -2
  203. package/dist/cdn/runtime/snice-runtime.esm.js +103 -33
  204. package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
  205. package/dist/cdn/runtime/snice-runtime.esm.min.js +8 -8
  206. package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
  207. package/dist/cdn/runtime/snice-runtime.js +103 -33
  208. package/dist/cdn/runtime/snice-runtime.js.map +1 -1
  209. package/dist/cdn/runtime/snice-runtime.min.js +8 -8
  210. package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
  211. package/dist/cdn/sankey/snice-sankey.js +1 -1
  212. package/dist/cdn/sankey/snice-sankey.min.js +1 -1
  213. package/dist/cdn/segmented-control/snice-segmented-control.js +1 -1
  214. package/dist/cdn/segmented-control/snice-segmented-control.min.js +1 -1
  215. package/dist/cdn/select/snice-select.js +1 -1
  216. package/dist/cdn/select/snice-select.min.js +1 -1
  217. package/dist/cdn/skeleton/snice-skeleton.js +1 -1
  218. package/dist/cdn/skeleton/snice-skeleton.min.js +1 -1
  219. package/dist/cdn/slider/snice-slider.js +1 -1
  220. package/dist/cdn/slider/snice-slider.min.js +1 -1
  221. package/dist/cdn/sortable/snice-sortable.js +1 -1
  222. package/dist/cdn/sortable/snice-sortable.min.js +1 -1
  223. package/dist/cdn/sparkline/snice-sparkline.js +1 -1
  224. package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
  225. package/dist/cdn/spinner/snice-spinner.js +1 -1
  226. package/dist/cdn/spinner/snice-spinner.min.js +1 -1
  227. package/dist/cdn/split-button/snice-split-button.js +1 -1
  228. package/dist/cdn/split-button/snice-split-button.min.js +1 -1
  229. package/dist/cdn/split-pane/snice-split-pane.js +1 -1
  230. package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
  231. package/dist/cdn/spotlight/snice-spotlight.js +1 -1
  232. package/dist/cdn/spotlight/snice-spotlight.min.js +1 -1
  233. package/dist/cdn/spreadsheet/snice-spreadsheet.js +1 -1
  234. package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +1 -1
  235. package/dist/cdn/stat-group/snice-stat-group.js +1 -1
  236. package/dist/cdn/stat-group/snice-stat-group.min.js +1 -1
  237. package/dist/cdn/step-input/snice-step-input.js +1 -1
  238. package/dist/cdn/step-input/snice-step-input.min.js +1 -1
  239. package/dist/cdn/stepper/snice-stepper.js +1 -1
  240. package/dist/cdn/stepper/snice-stepper.min.js +1 -1
  241. package/dist/cdn/switch/snice-switch.js +1 -1
  242. package/dist/cdn/switch/snice-switch.min.js +1 -1
  243. package/dist/cdn/table/snice-table.js +1 -1
  244. package/dist/cdn/table/snice-table.min.js +1 -1
  245. package/dist/cdn/tabs/snice-tabs.js +1 -1
  246. package/dist/cdn/tabs/snice-tabs.min.js +1 -1
  247. package/dist/cdn/tag/snice-tag.js +1 -1
  248. package/dist/cdn/tag/snice-tag.min.js +1 -1
  249. package/dist/cdn/tag-input/snice-tag-input.js +1 -1
  250. package/dist/cdn/tag-input/snice-tag-input.min.js +1 -1
  251. package/dist/cdn/terminal/snice-terminal.js +1 -1
  252. package/dist/cdn/terminal/snice-terminal.min.js +1 -1
  253. package/dist/cdn/testimonial/snice-testimonial.js +1 -1
  254. package/dist/cdn/testimonial/snice-testimonial.min.js +1 -1
  255. package/dist/cdn/textarea/snice-textarea.js +1 -1
  256. package/dist/cdn/textarea/snice-textarea.min.js +1 -1
  257. package/dist/cdn/time-picker/snice-time-picker.js +1 -1
  258. package/dist/cdn/time-picker/snice-time-picker.min.js +1 -1
  259. package/dist/cdn/time-range-picker/snice-time-range-picker.js +1 -1
  260. package/dist/cdn/time-range-picker/snice-time-range-picker.min.js +1 -1
  261. package/dist/cdn/timeline/snice-timeline.js +1 -1
  262. package/dist/cdn/timeline/snice-timeline.min.js +1 -1
  263. package/dist/cdn/timer/snice-timer.js +1 -1
  264. package/dist/cdn/timer/snice-timer.min.js +1 -1
  265. package/dist/cdn/toast/snice-toast.js +1 -1
  266. package/dist/cdn/toast/snice-toast.min.js +1 -1
  267. package/dist/cdn/tooltip/snice-tooltip.js +1 -1
  268. package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
  269. package/dist/cdn/tree/snice-tree.js +1 -1
  270. package/dist/cdn/tree/snice-tree.min.js +1 -1
  271. package/dist/cdn/treemap/snice-treemap.js +1 -1
  272. package/dist/cdn/treemap/snice-treemap.min.js +1 -1
  273. package/dist/cdn/user-card/snice-user-card.js +1 -1
  274. package/dist/cdn/user-card/snice-user-card.min.js +1 -1
  275. package/dist/cdn/video-player/snice-video-player.js +1 -1
  276. package/dist/cdn/video-player/snice-video-player.min.js +1 -1
  277. package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
  278. package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +1 -1
  279. package/dist/cdn/waterfall/snice-waterfall.js +1 -1
  280. package/dist/cdn/waterfall/snice-waterfall.min.js +1 -1
  281. package/dist/cdn/weather/snice-weather.js +1 -1
  282. package/dist/cdn/weather/snice-weather.min.js +1 -1
  283. package/dist/cdn/work-order/snice-work-order.js +1 -1
  284. package/dist/cdn/work-order/snice-work-order.min.js +1 -1
  285. package/dist/index.cjs +100 -30
  286. package/dist/index.cjs.map +1 -1
  287. package/dist/index.esm.js +100 -30
  288. package/dist/index.esm.js.map +1 -1
  289. package/dist/index.iife.js +100 -30
  290. package/dist/index.iife.js.map +1 -1
  291. package/dist/react/SniceProvider.js +1 -1
  292. package/dist/react/SniceRouter.js +1 -1
  293. package/dist/react/index.js +1 -1
  294. package/dist/react/matchRoute.js +1 -1
  295. package/dist/react/useRequestHandler.js +1 -1
  296. package/dist/symbols.cjs +3 -1
  297. package/dist/symbols.cjs.map +1 -1
  298. package/dist/symbols.d.ts +1 -0
  299. package/dist/symbols.esm.js +3 -2
  300. package/dist/symbols.esm.js.map +1 -1
  301. package/dist/transitions.cjs +1 -1
  302. package/dist/transitions.esm.js +1 -1
  303. package/docs/ai/patterns.md +28 -0
  304. package/docs/elements.md +79 -0
  305. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * snice v4.35.1
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.
6
6
  */
7
7
  /*!
8
- * snice v4.35.0
8
+ * snice v4.36.0
9
9
  * 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.
10
10
  * (c) 2024
11
11
  * Released under the MIT License.
@@ -80,6 +80,7 @@ const RENDER_TIMERS = getSymbol('render-timers');
80
80
  const RENDER_CALLBACKS = getSymbol('render-callbacks');
81
81
  const STYLES_METHOD = getSymbol('styles-method');
82
82
  const STYLES_APPLIED = getSymbol('styles-applied');
83
+ const PARENT_STYLES_METHODS = getSymbol('parent-styles-methods');
83
84
  // Navigation context symbols
84
85
  const CONTEXT_HANDLER = getSymbol('context-handler');
85
86
  const NAVIGATION_CONTEXT_INSTANCE = getSymbol('navigation-context-instance');
@@ -490,12 +491,13 @@ function observe(observeTarget, selectorOrOptions, options) {
490
491
  }
491
492
  return function (target, context) {
492
493
  const propertyKey = context.name;
493
- const initKey = `__observe_init_${propertyKey}`;
494
494
  context.addInitializer(function () {
495
495
  const constructor = this.constructor;
496
- if (constructor[initKey])
496
+ if (!constructor.__observeMethods)
497
+ constructor.__observeMethods = new Set();
498
+ if (constructor.__observeMethods.has(target))
497
499
  return;
498
- constructor[initKey] = true;
500
+ constructor.__observeMethods.add(target);
499
501
  if (!constructor[OBSERVERS]) {
500
502
  constructor[OBSERVERS] = [];
501
503
  }
@@ -906,12 +908,13 @@ function request(requestName, options) {
906
908
  function respond(requestName, options) {
907
909
  return function (target, context) {
908
910
  const propertyKey = context.name;
909
- const initKey = `__respond_init_${requestName}_${propertyKey}`;
910
911
  context.addInitializer(function () {
911
912
  const constructor = this.constructor;
912
- if (constructor[initKey])
913
+ if (!constructor.__respondMethods)
914
+ constructor.__respondMethods = new Set();
915
+ if (constructor.__respondMethods.has(target))
913
916
  return;
914
- constructor[initKey] = true;
917
+ constructor.__respondMethods.add(target);
915
918
  if (!constructor[CHANNEL_HANDLERS]) {
916
919
  constructor[CHANNEL_HANDLERS] = [];
917
920
  }
@@ -2254,14 +2257,14 @@ function on(eventName, selectorOrOptions, options) {
2254
2257
  }
2255
2258
  return function (originalMethod, context) {
2256
2259
  const methodName = context.name;
2257
- const initKey = `__on_init_${methodName}_${selector || ''}_${JSON.stringify(eventName)}`;
2258
2260
  context.addInitializer(function () {
2259
2261
  const constructor = this.constructor;
2260
- // Only initialize once per class, not per instance
2261
- if (constructor[initKey]) {
2262
+ // Dedup by method reference allows child to register same-named methods
2263
+ if (!constructor.__onMethods)
2264
+ constructor.__onMethods = new Set();
2265
+ if (constructor.__onMethods.has(originalMethod))
2262
2266
  return;
2263
- }
2264
- constructor[initKey] = true;
2267
+ constructor.__onMethods.add(originalMethod);
2265
2268
  if (!constructor[ON_HANDLERS]) {
2266
2269
  constructor[ON_HANDLERS] = [];
2267
2270
  }
@@ -2755,12 +2758,13 @@ const CONTEXT_HANDLERS = getSymbol('context-handlers');
2755
2758
  function context$1(options = {}) {
2756
2759
  return function (originalMethod, context) {
2757
2760
  const methodName = context.name;
2758
- const initKey = `__context_init_${methodName}`;
2759
2761
  context.addInitializer(function () {
2760
2762
  const constructor = this.constructor;
2761
- if (constructor[initKey])
2763
+ if (!constructor.__contextMethods)
2764
+ constructor.__contextMethods = new Set();
2765
+ if (constructor.__contextMethods.has(originalMethod))
2762
2766
  return;
2763
- constructor[initKey] = true;
2767
+ constructor.__contextMethods.add(originalMethod);
2764
2768
  if (!constructor[CONTEXT_HANDLERS]) {
2765
2769
  constructor[CONTEXT_HANDLERS] = [];
2766
2770
  }
@@ -3084,7 +3088,13 @@ function render(options = {}) {
3084
3088
  function styles() {
3085
3089
  return function (originalMethod, context) {
3086
3090
  context.addInitializer(function () {
3087
- // Store the styles method
3091
+ // Collect parent styles methods before overwriting with child's
3092
+ if (this[STYLES_METHOD] && !this[PARENT_STYLES_METHODS]) {
3093
+ this[PARENT_STYLES_METHODS] = [this[STYLES_METHOD]];
3094
+ }
3095
+ else if (this[STYLES_METHOD] && this[PARENT_STYLES_METHODS]) {
3096
+ this[PARENT_STYLES_METHODS].push(this[STYLES_METHOD]);
3097
+ }
3088
3098
  this[STYLES_METHOD] = originalMethod;
3089
3099
  });
3090
3100
  return originalMethod;
@@ -3103,11 +3113,22 @@ function applyStyles(element) {
3103
3113
  return;
3104
3114
  element[STYLES_APPLIED] = true;
3105
3115
  try {
3116
+ // Collect all CSS results: parent styles first, then child styles
3117
+ const allResults = [];
3118
+ const parentMethods = element[PARENT_STYLES_METHODS];
3119
+ if (parentMethods) {
3120
+ for (const method of parentMethods) {
3121
+ const r = method.call(element);
3122
+ if (isCSSResult(r))
3123
+ allResults.push(r);
3124
+ }
3125
+ }
3106
3126
  const result = stylesMethod.call(element);
3107
3127
  if (!isCSSResult(result)) {
3108
3128
  console.warn('Styles method must return css`` template result');
3109
3129
  return;
3110
3130
  }
3131
+ allResults.push(result);
3111
3132
  // Ensure shadow root exists
3112
3133
  if (!element.shadowRoot) {
3113
3134
  element.attachShadow({ mode: 'open' });
@@ -3115,14 +3136,16 @@ function applyStyles(element) {
3115
3136
  if (!element.shadowRoot)
3116
3137
  return;
3117
3138
  // Prefer constructable stylesheets
3118
- if (result.styleSheet && 'adoptedStyleSheets' in element.shadowRoot) {
3119
- element.shadowRoot.adoptedStyleSheets = [result.styleSheet];
3139
+ if (allResults.every(r => !!r.styleSheet) && 'adoptedStyleSheets' in element.shadowRoot) {
3140
+ element.shadowRoot.adoptedStyleSheets = allResults.map(r => r.styleSheet);
3120
3141
  return;
3121
3142
  }
3122
- // Fallback to <style> tag
3123
- const style = document.createElement('style');
3124
- style.textContent = result.cssText;
3125
- element.shadowRoot.appendChild(style);
3143
+ // Fallback one <style> tag per stylesheet, preserving cascade order
3144
+ for (const r of allResults) {
3145
+ const style = document.createElement('style');
3146
+ style.textContent = r.cssText;
3147
+ element.shadowRoot.appendChild(style);
3148
+ }
3126
3149
  }
3127
3150
  catch (error) {
3128
3151
  console.error('Error applying styles:', error);
@@ -3395,7 +3418,45 @@ function applyElementFunctionality(constructor) {
3395
3418
  }
3396
3419
  };
3397
3420
  }
3421
+ /**
3422
+ * Walk the prototype chain and merge parent element metadata into the child.
3423
+ * Called once at class definition time — zero per-instance cost.
3424
+ * Skips plain HTMLElement (no metadata to merge).
3425
+ *
3426
+ * Only merges PROPERTIES (stored via context.metadata at decoration time)
3427
+ * and formAssociated. Other handler registrations (@watch, @on, @ready, etc.)
3428
+ * inherit automatically via TC39 addInitializer — parent initializers run
3429
+ * during child instance construction.
3430
+ */
3431
+ function mergeParentMetadata(constructor) {
3432
+ let parent = Object.getPrototypeOf(constructor);
3433
+ // Collect ancestors bottom-up, then merge top-down so the deepest parent goes first
3434
+ const ancestors = [];
3435
+ while (parent && parent !== HTMLElement && parent !== Function.prototype) {
3436
+ ancestors.push(parent);
3437
+ parent = Object.getPrototypeOf(parent);
3438
+ }
3439
+ ancestors.reverse();
3440
+ for (const ancestor of ancestors) {
3441
+ // Properties (Map) — parent first, child overrides
3442
+ if (ancestor[PROPERTIES]) {
3443
+ if (!constructor[PROPERTIES])
3444
+ constructor[PROPERTIES] = new Map();
3445
+ for (const [key, value] of ancestor[PROPERTIES]) {
3446
+ if (!constructor[PROPERTIES].has(key)) {
3447
+ constructor[PROPERTIES].set(key, value);
3448
+ }
3449
+ }
3450
+ }
3451
+ // formAssociated — inherit if parent is form-associated
3452
+ if (ancestor.formAssociated && !constructor.formAssociated) {
3453
+ constructor.formAssociated = true;
3454
+ }
3455
+ }
3456
+ }
3398
3457
  function defineElement(tagName, constructor, context, options) {
3458
+ // Merge metadata from parent @element classes (inheritance support)
3459
+ mergeParentMetadata(constructor);
3399
3460
  if (context.metadata && context.metadata[PROPERTIES]) {
3400
3461
  if (!constructor[PROPERTIES])
3401
3462
  constructor[PROPERTIES] = new Map();
@@ -3449,8 +3510,12 @@ function property(options) {
3449
3510
  }
3450
3511
  // Always store property options on constructor for runtime access
3451
3512
  constructor[PROPERTIES].set(propertyKey, finalOptions);
3452
- // Set up the property descriptor on first access
3453
- if (!Object.hasOwn(this.constructor.prototype, propertyKey)) {
3513
+ // Set up the property descriptor re-define if a subclass overrides
3514
+ // the property with different options (different closure captures)
3515
+ const definerKey = `__propDef_${propertyKey}`;
3516
+ const existingDefiner = this.constructor.prototype[definerKey];
3517
+ if (!existingDefiner || existingDefiner !== options) {
3518
+ this.constructor.prototype[definerKey] = options;
3454
3519
  const descriptor = {
3455
3520
  get() {
3456
3521
  // attribute: false — use internal storage only, no DOM sync
@@ -3586,12 +3651,15 @@ function queryAll(selector, options = {}) {
3586
3651
  function watch(...propertyNames) {
3587
3652
  return function (target, context) {
3588
3653
  const methodName = context.name;
3589
- const initKey = `__watch_init_${methodName}`;
3590
3654
  context.addInitializer(function () {
3591
3655
  const constructor = this.constructor;
3592
- if (constructor[initKey])
3656
+ // Dedup by method reference — allows child classes to register
3657
+ // their own method with the same name as a parent's
3658
+ if (!constructor.__watchMethods)
3659
+ constructor.__watchMethods = new Set();
3660
+ if (constructor.__watchMethods.has(target))
3593
3661
  return;
3594
- constructor[initKey] = true;
3662
+ constructor.__watchMethods.add(target);
3595
3663
  if (!constructor[PROPERTY_WATCHERS]) {
3596
3664
  constructor[PROPERTY_WATCHERS] = new Map();
3597
3665
  }
@@ -3662,12 +3730,14 @@ function context() {
3662
3730
  }
3663
3731
  function registerHandler(symbol, prefix, target, context, extra) {
3664
3732
  const methodName = context.name;
3665
- const initKey = `__${prefix}_init_${methodName}`;
3666
3733
  context.addInitializer(function () {
3667
3734
  const constructor = this.constructor;
3668
- if (constructor[initKey])
3735
+ const setKey = `__${prefix}Methods`;
3736
+ if (!constructor[setKey])
3737
+ constructor[setKey] = new Set();
3738
+ if (constructor[setKey].has(target))
3669
3739
  return;
3670
- constructor[initKey] = true;
3740
+ constructor[setKey].add(target);
3671
3741
  if (!constructor[symbol])
3672
3742
  constructor[symbol] = [];
3673
3743
  constructor[symbol].push({ methodName, method: target, ...extra });
@@ -5535,7 +5605,7 @@ if (typeof document !== 'undefined') {
5535
5605
  }
5536
5606
 
5537
5607
  /*!
5538
- * snice v4.35.0
5608
+ * snice v4.36.0
5539
5609
  * 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.
5540
5610
  * (c) 2024
5541
5611
  * Released under the MIT License.
@@ -5552,7 +5622,7 @@ if (!globalThis.snice) {
5552
5622
  }
5553
5623
 
5554
5624
  /*!
5555
- * snice v4.35.0
5625
+ * snice v4.36.0
5556
5626
  * 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.
5557
5627
  * (c) 2024
5558
5628
  * Released under the MIT License.