@neo4j-ndl/react 4.25.7 → 5.0.0-alpha.0.3d763f7

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 (1185) hide show
  1. package/lib/LICENSES.txt +3453 -9363
  2. package/lib/NOTICE.txt +1385 -1963
  3. package/lib/cjs/_generated/style-rules/index.js +5 -11
  4. package/lib/cjs/_generated/style-rules/index.js.map +1 -1
  5. package/lib/cjs/_generated/style-rules/literal-guards.js +50 -0
  6. package/lib/cjs/_generated/style-rules/literal-guards.js.map +1 -0
  7. package/lib/cjs/_generated/style-rules/literal-schemas.js +6 -21
  8. package/lib/cjs/_generated/style-rules/literal-schemas.js.map +1 -1
  9. package/lib/cjs/{text-overflow/index.js → _generated/style-rules/literal-types.js} +9 -6
  10. package/lib/cjs/_generated/style-rules/literal-types.js.map +1 -0
  11. package/lib/cjs/_generated/style-rules/numeric-utils.js.map +1 -1
  12. package/lib/cjs/_generated/style-rules/range-utils.js.map +1 -1
  13. package/lib/cjs/ai/presence/stories/ai-presence-default.story.js +1 -1
  14. package/lib/cjs/ai/presence/stories/ai-presence-default.story.js.map +1 -1
  15. package/lib/cjs/ai/presence/stories/ai-presence-thinking.story.js +1 -1
  16. package/lib/cjs/ai/presence/stories/ai-presence-thinking.story.js.map +1 -1
  17. package/lib/cjs/ai/reasoning/Reasoning.js +1 -1
  18. package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -1
  19. package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js +1 -1
  20. package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js.map +1 -1
  21. package/lib/cjs/ai/response/Response.js +56 -2
  22. package/lib/cjs/ai/response/Response.js.map +1 -1
  23. package/lib/cjs/ai/response/stories/response-fixtures.js +86 -0
  24. package/lib/cjs/ai/response/stories/response-fixtures.js.map +1 -0
  25. package/lib/cjs/ai/response/stories/response-full-example.story.js +3 -3
  26. package/lib/cjs/ai/response/stories/response-full-example.story.js.map +1 -1
  27. package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js +1 -1
  28. package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -1
  29. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
  30. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
  31. package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
  32. package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
  33. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
  34. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
  35. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
  36. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
  37. package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
  38. package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
  39. package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
  40. package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
  41. package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
  42. package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
  43. package/lib/cjs/avatar/stories/avatar-custom-icon.story.js +1 -1
  44. package/lib/cjs/avatar/stories/avatar-custom-icon.story.js.map +1 -1
  45. package/lib/cjs/avatar/stories/avatar-shapes.story.js +1 -1
  46. package/lib/cjs/avatar/stories/avatar-shapes.story.js.map +1 -1
  47. package/lib/cjs/avatar/stories/avatar-sizes.story.js +1 -1
  48. package/lib/cjs/avatar/stories/avatar-sizes.story.js.map +1 -1
  49. package/lib/cjs/avatar/stories/avatar-statuses.story.js +1 -1
  50. package/lib/cjs/avatar/stories/avatar-statuses.story.js.map +1 -1
  51. package/lib/cjs/avatar/stories/avatar-types.story.js +1 -1
  52. package/lib/cjs/avatar/stories/avatar-types.story.js.map +1 -1
  53. package/lib/cjs/banner/stories/banner-variants.story.js +1 -1
  54. package/lib/cjs/banner/stories/banner-variants.story.js.map +1 -1
  55. package/lib/cjs/banner/stories/banner-with-icons.story.js +1 -1
  56. package/lib/cjs/banner/stories/banner-with-icons.story.js.map +1 -1
  57. package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js +1 -1
  58. package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
  59. package/lib/cjs/button/ButtonBase.js +1 -3
  60. package/lib/cjs/button/ButtonBase.js.map +1 -1
  61. package/lib/cjs/button/stories/button-sizes.story.js +1 -1
  62. package/lib/cjs/button/stories/button-sizes.story.js.map +1 -1
  63. package/lib/cjs/button/stories/button-variants.story.js +1 -1
  64. package/lib/cjs/button/stories/button-variants.story.js.map +1 -1
  65. package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
  66. package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
  67. package/lib/cjs/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js +1 -1
  68. package/lib/cjs/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js.map +1 -1
  69. package/lib/cjs/clean-icon-button/stories/clean-icon-button-sizes.story.js +1 -1
  70. package/lib/cjs/clean-icon-button/stories/clean-icon-button-sizes.story.js.map +1 -1
  71. package/lib/cjs/clean-icon-button/stories/clean-icon-button-tone.story.js +1 -1
  72. package/lib/cjs/clean-icon-button/stories/clean-icon-button-tone.story.js.map +1 -1
  73. package/lib/cjs/clipboard-button/stories/clipboard-button-sizes.story.js +1 -1
  74. package/lib/cjs/clipboard-button/stories/clipboard-button-sizes.story.js.map +1 -1
  75. package/lib/cjs/code-block/CodeBlock.js +3 -7
  76. package/lib/cjs/code-block/CodeBlock.js.map +1 -1
  77. package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
  78. package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
  79. package/lib/cjs/code-block/stories/code-full.story.js +2 -2
  80. package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
  81. package/lib/cjs/code-block/stories/code-languages.story.js +1 -1
  82. package/lib/cjs/code-block/stories/code-languages.story.js.map +1 -1
  83. package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
  84. package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
  85. package/lib/cjs/color-picker/ColorPicker.js +0 -3
  86. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  87. package/lib/cjs/color-picker/stories/color-picker-dialog.story.js +1 -1
  88. package/lib/cjs/color-picker/stories/color-picker-dialog.story.js.map +1 -1
  89. package/lib/cjs/color-picker/stories/color-picker-popover.story.js +1 -1
  90. package/lib/cjs/color-picker/stories/color-picker-popover.story.js.map +1 -1
  91. package/lib/cjs/combobox/stories/combobox-action-on-select.story.js +1 -1
  92. package/lib/cjs/combobox/stories/combobox-action-on-select.story.js.map +1 -1
  93. package/lib/cjs/combobox/stories/combobox-actions.story.js +1 -1
  94. package/lib/cjs/combobox/stories/combobox-actions.story.js.map +1 -1
  95. package/lib/cjs/combobox/stories/combobox-async.story.js +2 -2
  96. package/lib/cjs/combobox/stories/combobox-async.story.js.map +1 -1
  97. package/lib/cjs/combobox/stories/combobox-disabled.story.js +1 -1
  98. package/lib/cjs/combobox/stories/combobox-disabled.story.js.map +1 -1
  99. package/lib/cjs/combobox/stories/combobox-fluid.story.js +1 -1
  100. package/lib/cjs/combobox/stories/combobox-fluid.story.js.map +1 -1
  101. package/lib/cjs/combobox/stories/combobox-hidden-label.story.js +1 -1
  102. package/lib/cjs/combobox/stories/combobox-hidden-label.story.js.map +1 -1
  103. package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js +1 -1
  104. package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -1
  105. package/lib/cjs/combobox/stories/combobox-in-popover.story.js +1 -1
  106. package/lib/cjs/combobox/stories/combobox-in-popover.story.js.map +1 -1
  107. package/lib/cjs/combobox/stories/combobox-native-form.story.js +1 -1
  108. package/lib/cjs/combobox/stories/combobox-native-form.story.js.map +1 -1
  109. package/lib/cjs/combobox/stories/combobox-sizes.story.js +1 -1
  110. package/lib/cjs/combobox/stories/combobox-sizes.story.js.map +1 -1
  111. package/lib/cjs/combobox/stories/combobox-validation.story.js +1 -1
  112. package/lib/cjs/combobox/stories/combobox-validation.story.js.map +1 -1
  113. package/lib/cjs/conditional-wrap/stories/conditional-wrap-default.story.js +1 -1
  114. package/lib/cjs/conditional-wrap/stories/conditional-wrap-default.story.js.map +1 -1
  115. package/lib/cjs/data-grid/stories/datagrid-compact-mode.story.js +1 -1
  116. package/lib/cjs/data-grid/stories/datagrid-compact-mode.story.js.map +1 -1
  117. package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js +2 -2
  118. package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
  119. package/lib/cjs/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js +1 -1
  120. package/lib/cjs/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js.map +1 -1
  121. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js +2 -2
  122. package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  123. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js +1 -1
  124. package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  125. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  126. package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  127. package/lib/cjs/data-grid/stories/datagrid-percentage-width-columns.story.js +1 -1
  128. package/lib/cjs/data-grid/stories/datagrid-percentage-width-columns.story.js.map +1 -1
  129. package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js +3 -3
  130. package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
  131. package/lib/cjs/data-grid/stories/datagrid-placeholder-states.story.js +1 -1
  132. package/lib/cjs/data-grid/stories/datagrid-placeholder-states.story.js.map +1 -1
  133. package/lib/cjs/data-grid/stories/datagrid-resizable-column.story.js +1 -1
  134. package/lib/cjs/data-grid/stories/datagrid-resizable-column.story.js.map +1 -1
  135. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +1 -1
  136. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
  137. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js +1 -1
  138. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -1
  139. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +5 -5
  140. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  141. package/lib/cjs/data-grid/stories/datagrid-simple.story.js +1 -1
  142. package/lib/cjs/data-grid/stories/datagrid-simple.story.js.map +1 -1
  143. package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js +1 -1
  144. package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
  145. package/lib/cjs/data-grid/stories/datagrid-skeleton-loading.story.js +1 -1
  146. package/lib/cjs/data-grid/stories/datagrid-skeleton-loading.story.js.map +1 -1
  147. package/lib/cjs/data-grid/stories/datagrid-sortable.story.js +1 -1
  148. package/lib/cjs/data-grid/stories/datagrid-sortable.story.js.map +1 -1
  149. package/lib/cjs/data-grid/stories/datagrid-using-editable-cells.story.js +2 -2
  150. package/lib/cjs/data-grid/stories/datagrid-using-editable-cells.story.js.map +1 -1
  151. package/lib/cjs/data-grid/stories/datagrid-virtualization.story.js +3 -3
  152. package/lib/cjs/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
  153. package/lib/cjs/data-grid/style-rules/guard.js +47 -0
  154. package/lib/cjs/data-grid/style-rules/guard.js.map +1 -0
  155. package/lib/cjs/data-grid/style-rules/index.js +3 -19
  156. package/lib/cjs/data-grid/style-rules/index.js.map +1 -1
  157. package/lib/cjs/data-grid/style-rules/internal/schemas.js +213 -0
  158. package/lib/cjs/data-grid/style-rules/internal/schemas.js.map +1 -0
  159. package/lib/cjs/data-grid/style-rules/types.js +0 -205
  160. package/lib/cjs/data-grid/style-rules/types.js.map +1 -1
  161. package/lib/cjs/date-picker/DatePicker.js +8 -6
  162. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  163. package/lib/cjs/date-picker/stories/date-picker-in-dialog.story.js +1 -1
  164. package/lib/cjs/date-picker/stories/date-picker-in-dialog.story.js.map +1 -1
  165. package/lib/cjs/date-picker/stories/date-picker-in-popover-dialog.story.js +1 -1
  166. package/lib/cjs/date-picker/stories/date-picker-in-popover-dialog.story.js.map +1 -1
  167. package/lib/cjs/dialog/Dialog.js +1 -2
  168. package/lib/cjs/dialog/Dialog.js.map +1 -1
  169. package/lib/cjs/dialog/stories/dialog-danger.story.js +1 -1
  170. package/lib/cjs/dialog/stories/dialog-danger.story.js.map +1 -1
  171. package/lib/cjs/dialog/stories/dialog-default.story.js +1 -1
  172. package/lib/cjs/dialog/stories/dialog-default.story.js.map +1 -1
  173. package/lib/cjs/dialog/stories/dialog-image.story.js +1 -1
  174. package/lib/cjs/dialog/stories/dialog-image.story.js.map +1 -1
  175. package/lib/cjs/dialog/stories/dialog-info.story.js +1 -1
  176. package/lib/cjs/dialog/stories/dialog-info.story.js.map +1 -1
  177. package/lib/cjs/dialog/stories/dialog-top-aligned.story.js +2 -2
  178. package/lib/cjs/dialog/stories/dialog-top-aligned.story.js.map +1 -1
  179. package/lib/cjs/dialog/stories/dialog-variants.story.js +1 -1
  180. package/lib/cjs/dialog/stories/dialog-variants.story.js.map +1 -1
  181. package/lib/cjs/dialog/stories/dialog-warning.story.js +1 -1
  182. package/lib/cjs/dialog/stories/dialog-warning.story.js.map +1 -1
  183. package/lib/cjs/dismissible-tag/stories/dismissible-tag-colors.story.js +1 -1
  184. package/lib/cjs/dismissible-tag/stories/dismissible-tag-colors.story.js.map +1 -1
  185. package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
  186. package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
  187. package/lib/cjs/drawer/Drawer.js +7 -6
  188. package/lib/cjs/drawer/Drawer.js.map +1 -1
  189. package/lib/cjs/drawer/stories/drawer-full.story.js +2 -2
  190. package/lib/cjs/drawer/stories/drawer-full.story.js.map +1 -1
  191. package/lib/cjs/drawer/stories/drawer-not-closeable.story.js +2 -2
  192. package/lib/cjs/drawer/stories/drawer-not-closeable.story.js.map +1 -1
  193. package/lib/cjs/drawer/stories/drawer-overlay.story.js +1 -1
  194. package/lib/cjs/drawer/stories/drawer-overlay.story.js.map +1 -1
  195. package/lib/cjs/drawer/stories/drawer-portaled.story.js +2 -2
  196. package/lib/cjs/drawer/stories/drawer-portaled.story.js.map +1 -1
  197. package/lib/cjs/drawer/stories/drawer-push.story.js +2 -2
  198. package/lib/cjs/drawer/stories/drawer-push.story.js.map +1 -1
  199. package/lib/cjs/drawer/stories/drawer-resizable.story.js +2 -2
  200. package/lib/cjs/drawer/stories/drawer-resizable.story.js.map +1 -1
  201. package/lib/cjs/drawer/stories/drawer-right-side.story.js +2 -2
  202. package/lib/cjs/drawer/stories/drawer-right-side.story.js.map +1 -1
  203. package/lib/cjs/drawer/stories/drawer-scrollable.story.js +2 -2
  204. package/lib/cjs/drawer/stories/drawer-scrollable.story.js.map +1 -1
  205. package/lib/cjs/dropzone/stories/dropzone-full.story.js +3 -3
  206. package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
  207. package/lib/cjs/flex/stories/flex-default.story.js +1 -1
  208. package/lib/cjs/flex/stories/flex-default.story.js.map +1 -1
  209. package/lib/cjs/graph-label/stories/graph-label-color.story.js +1 -1
  210. package/lib/cjs/graph-label/stories/graph-label-color.story.js.map +1 -1
  211. package/lib/cjs/graph-label/stories/graph-label-sizes.story.js +1 -1
  212. package/lib/cjs/graph-label/stories/graph-label-sizes.story.js.map +1 -1
  213. package/lib/cjs/graph-label/stories/graph-label-types.story.js +1 -1
  214. package/lib/cjs/graph-label/stories/graph-label-types.story.js.map +1 -1
  215. package/lib/cjs/hooks/use-debounce-callback/index.js +6 -6
  216. package/lib/cjs/hooks/use-debounce-callback/index.js.map +1 -1
  217. package/lib/cjs/icon-button/stories/icon-button-sizes.story.js +1 -1
  218. package/lib/cjs/icon-button/stories/icon-button-sizes.story.js.map +1 -1
  219. package/lib/cjs/icon-button/stories/icon-button-tone.story.js +1 -1
  220. package/lib/cjs/icon-button/stories/icon-button-tone.story.js.map +1 -1
  221. package/lib/cjs/icon-button-array/stories/icon-button-array-sizes.story.js +1 -1
  222. package/lib/cjs/icon-button-array/stories/icon-button-array-sizes.story.js.map +1 -1
  223. package/lib/cjs/icon-button-base/IconButtonBase.js +1 -3
  224. package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
  225. package/lib/cjs/icons/generated/custom/index.js +3 -17
  226. package/lib/cjs/icons/generated/custom/index.js.map +1 -1
  227. package/lib/cjs/inline-edit/InlineEdit.js +3 -2
  228. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  229. package/lib/cjs/kbd/Kbd.js +0 -1
  230. package/lib/cjs/kbd/Kbd.js.map +1 -1
  231. package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js +1 -1
  232. package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -1
  233. package/lib/cjs/logo/stories/logo-black.story.js +1 -1
  234. package/lib/cjs/logo/stories/logo-black.story.js.map +1 -1
  235. package/lib/cjs/logo/stories/logo-default.story.js +1 -1
  236. package/lib/cjs/logo/stories/logo-default.story.js.map +1 -1
  237. package/lib/cjs/logo/stories/logo-icon.story.js +1 -1
  238. package/lib/cjs/logo/stories/logo-icon.story.js.map +1 -1
  239. package/lib/cjs/menu/Menu.js +2 -2
  240. package/lib/cjs/menu/Menu.js.map +1 -1
  241. package/lib/cjs/menu/menu-types.js.map +1 -1
  242. package/lib/cjs/menu/stories/menu-custom-items.story.js +1 -1
  243. package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
  244. package/lib/cjs/menu/stories/menu-in-dialog.story.js +2 -2
  245. package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
  246. package/lib/cjs/menu/stories/menu-nested.story.js +1 -1
  247. package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
  248. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js +1 -1
  249. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js.map +1 -1
  250. package/lib/cjs/menu/stories/menu-radio-items.story.js +1 -1
  251. package/lib/cjs/menu/stories/menu-radio-items.story.js.map +1 -1
  252. package/lib/cjs/menu/stories/menu-with-icon.story.js +1 -1
  253. package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
  254. package/lib/cjs/next/tree-view/TreeView.js +3 -3
  255. package/lib/cjs/next/tree-view/TreeView.js.map +1 -1
  256. package/lib/cjs/next/tree-view/stories/tree-view-large.story.js +1 -1
  257. package/lib/cjs/next/tree-view/stories/tree-view-large.story.js.map +1 -1
  258. package/lib/cjs/next/tree-view/stories/tree-view-multiple-replace.story.js +1 -1
  259. package/lib/cjs/next/tree-view/stories/tree-view-multiple-replace.story.js.map +1 -1
  260. package/lib/cjs/next/tree-view/stories/tree-view-root-selection.story.js +1 -1
  261. package/lib/cjs/next/tree-view/stories/tree-view-root-selection.story.js.map +1 -1
  262. package/lib/cjs/next/tree-view/stories/tree-view-tooltip.story.js +1 -1
  263. package/lib/cjs/next/tree-view/stories/tree-view-tooltip.story.js.map +1 -1
  264. package/lib/cjs/next/tree-view/stories/tree-view-trailing.story.js +1 -1
  265. package/lib/cjs/next/tree-view/stories/tree-view-trailing.story.js.map +1 -1
  266. package/lib/cjs/next/tree-view/stories/tree-view-uncontrolled.story.js +1 -1
  267. package/lib/cjs/next/tree-view/stories/tree-view-uncontrolled.story.js.map +1 -1
  268. package/lib/cjs/popover/Popover.js +6 -6
  269. package/lib/cjs/popover/Popover.js.map +1 -1
  270. package/lib/cjs/popover/stories/popover-controlled.story.js +1 -1
  271. package/lib/cjs/popover/stories/popover-controlled.story.js.map +1 -1
  272. package/lib/cjs/popover/stories/popover-custom-offset.story.js +1 -1
  273. package/lib/cjs/popover/stories/popover-custom-offset.story.js.map +1 -1
  274. package/lib/cjs/popover/stories/popover-default.story.js +1 -1
  275. package/lib/cjs/popover/stories/popover-default.story.js.map +1 -1
  276. package/lib/cjs/popover/stories/popover-in-dialog.story.js +1 -1
  277. package/lib/cjs/popover/stories/popover-in-dialog.story.js.map +1 -1
  278. package/lib/cjs/popover/stories/popover-no-button-wrapper.story.js +1 -1
  279. package/lib/cjs/popover/stories/popover-no-button-wrapper.story.js.map +1 -1
  280. package/lib/cjs/popover/stories/popover-separate-anchor.story.js +1 -1
  281. package/lib/cjs/popover/stories/popover-separate-anchor.story.js.map +1 -1
  282. package/lib/cjs/popover/use-popover.js +7 -9
  283. package/lib/cjs/popover/use-popover.js.map +1 -1
  284. package/lib/cjs/progress-bar/stories/progress-bar-sizes.story.js +1 -1
  285. package/lib/cjs/progress-bar/stories/progress-bar-sizes.story.js.map +1 -1
  286. package/lib/cjs/radio/stories/radio-disabled.story.js +1 -1
  287. package/lib/cjs/radio/stories/radio-disabled.story.js.map +1 -1
  288. package/lib/cjs/radio/stories/radio-truncated-label.story.js +1 -1
  289. package/lib/cjs/radio/stories/radio-truncated-label.story.js.map +1 -1
  290. package/lib/cjs/read-only-tag/stories/read-only-tag-colors.story.js +1 -1
  291. package/lib/cjs/read-only-tag/stories/read-only-tag-colors.story.js.map +1 -1
  292. package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
  293. package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
  294. package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js +1 -1
  295. package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js.map +1 -1
  296. package/lib/cjs/select/stories/select-controlled.story.js +1 -1
  297. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  298. package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
  299. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  300. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
  301. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  302. package/lib/cjs/select/stories/select-menu-positionings.story.js +1 -1
  303. package/lib/cjs/select/stories/select-menu-positionings.story.js.map +1 -1
  304. package/lib/cjs/select/stories/select-required.story.js +1 -1
  305. package/lib/cjs/select/stories/select-required.story.js.map +1 -1
  306. package/lib/cjs/select/stories/select-sizes.story.js +1 -1
  307. package/lib/cjs/select/stories/select-sizes.story.js.map +1 -1
  308. package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js +1 -1
  309. package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -1
  310. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js +1 -1
  311. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
  312. package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js +1 -1
  313. package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -1
  314. package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js +1 -1
  315. package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -1
  316. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  317. package/lib/cjs/side-navigation/stories/side-nav-badges.story.js +2 -2
  318. package/lib/cjs/side-navigation/stories/side-nav-badges.story.js.map +1 -1
  319. package/lib/cjs/side-navigation/stories/side-nav-compact.story.js +1 -1
  320. package/lib/cjs/side-navigation/stories/side-nav-compact.story.js.map +1 -1
  321. package/lib/cjs/side-navigation/stories/side-nav-default.story.js +1 -1
  322. package/lib/cjs/side-navigation/stories/side-nav-default.story.js.map +1 -1
  323. package/lib/cjs/side-navigation/stories/side-nav-secondary.story.js +1 -1
  324. package/lib/cjs/side-navigation/stories/side-nav-secondary.story.js.map +1 -1
  325. package/lib/cjs/skeleton/stories/skeleton-circular.story.js +1 -1
  326. package/lib/cjs/skeleton/stories/skeleton-circular.story.js.map +1 -1
  327. package/lib/cjs/skeleton/stories/skeleton-default.story.js +1 -1
  328. package/lib/cjs/skeleton/stories/skeleton-default.story.js.map +1 -1
  329. package/lib/cjs/skeleton/stories/skeleton-full-example.story.js +1 -1
  330. package/lib/cjs/skeleton/stories/skeleton-full-example.story.js.map +1 -1
  331. package/lib/cjs/skeleton/stories/skeleton-inherit-height.story.js +1 -1
  332. package/lib/cjs/skeleton/stories/skeleton-inherit-height.story.js.map +1 -1
  333. package/lib/cjs/skeleton/stories/skeleton-inherit-width.story.js +1 -1
  334. package/lib/cjs/skeleton/stories/skeleton-inherit-width.story.js.map +1 -1
  335. package/lib/cjs/slider/Slider.js +3 -3
  336. package/lib/cjs/slider/Slider.js.map +1 -1
  337. package/lib/cjs/slider/stories/slider-custom-step-length.story.js +1 -1
  338. package/lib/cjs/slider/stories/slider-custom-step-length.story.js.map +1 -1
  339. package/lib/cjs/slider/stories/slider-range.story.js +1 -1
  340. package/lib/cjs/slider/stories/slider-range.story.js.map +1 -1
  341. package/lib/cjs/slider/stories/slider-show-steps.story.js +1 -1
  342. package/lib/cjs/slider/stories/slider-show-steps.story.js.map +1 -1
  343. package/lib/cjs/slider/stories/slider-show-values.story.js +1 -1
  344. package/lib/cjs/slider/stories/slider-show-values.story.js.map +1 -1
  345. package/lib/cjs/slider/stories/slider-single-controlled.story.js +2 -2
  346. package/lib/cjs/slider/stories/slider-single-controlled.story.js.map +1 -1
  347. package/lib/cjs/slider/stories/slider-single.story.js +1 -1
  348. package/lib/cjs/slider/stories/slider-single.story.js.map +1 -1
  349. package/lib/cjs/spotlight/Spotlight.js +3 -3
  350. package/lib/cjs/spotlight/Spotlight.js.map +1 -1
  351. package/lib/cjs/spotlight/SpotlightTarget.js +3 -3
  352. package/lib/cjs/spotlight/SpotlightTarget.js.map +1 -1
  353. package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js +1 -1
  354. package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
  355. package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js +1 -1
  356. package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
  357. package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js +1 -1
  358. package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
  359. package/lib/cjs/spotlight/stories/spotlight-on-tabs.story.js +1 -1
  360. package/lib/cjs/spotlight/stories/spotlight-on-tabs.story.js.map +1 -1
  361. package/lib/cjs/spotlight/stories/spotlight-tour.story.js +1 -1
  362. package/lib/cjs/spotlight/stories/spotlight-tour.story.js.map +1 -1
  363. package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js +1 -1
  364. package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
  365. package/lib/cjs/spotlight/stories/spotlight-with-image.story.js +1 -1
  366. package/lib/cjs/spotlight/stories/spotlight-with-image.story.js.map +1 -1
  367. package/lib/cjs/spotlight/stories/spotlight-with-label.story.js +1 -1
  368. package/lib/cjs/spotlight/stories/spotlight-with-label.story.js.map +1 -1
  369. package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js +1 -1
  370. package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
  371. package/lib/cjs/spotlight/use-spotlight.js +5 -5
  372. package/lib/cjs/spotlight/use-spotlight.js.map +1 -1
  373. package/lib/cjs/status-indicator/stories/status-indicator-variants.story.js +1 -1
  374. package/lib/cjs/status-indicator/stories/status-indicator-variants.story.js.map +1 -1
  375. package/lib/cjs/status-label/stories/status-label-colors.story.js +1 -1
  376. package/lib/cjs/status-label/stories/status-label-colors.story.js.map +1 -1
  377. package/lib/cjs/status-label/stories/status-label-fills.story.js +1 -1
  378. package/lib/cjs/status-label/stories/status-label-fills.story.js.map +1 -1
  379. package/lib/cjs/status-label/stories/status-label-with-icons.story.js +1 -1
  380. package/lib/cjs/status-label/stories/status-label-with-icons.story.js.map +1 -1
  381. package/lib/cjs/tabs/Tabs.js +2 -2
  382. package/lib/cjs/tabs/Tabs.js.map +1 -1
  383. package/lib/cjs/tabs/stories/tabs-badge.story.js +1 -1
  384. package/lib/cjs/tabs/stories/tabs-badge.story.js.map +1 -1
  385. package/lib/cjs/tabs/stories/tabs-default.story.js +1 -1
  386. package/lib/cjs/tabs/stories/tabs-default.story.js.map +1 -1
  387. package/lib/cjs/tabs/stories/tabs-disabled.story.js +1 -1
  388. package/lib/cjs/tabs/stories/tabs-disabled.story.js.map +1 -1
  389. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js +1 -1
  390. package/lib/cjs/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  391. package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
  392. package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
  393. package/lib/cjs/tabs/stories/tabs-sizes.story.js +1 -1
  394. package/lib/cjs/tabs/stories/tabs-sizes.story.js.map +1 -1
  395. package/lib/cjs/tabs/stories/tabs-with-icons.story.js +1 -1
  396. package/lib/cjs/tabs/stories/tabs-with-icons.story.js.map +1 -1
  397. package/lib/cjs/tag/stories/tag-sizes.story.js +1 -1
  398. package/lib/cjs/tag/stories/tag-sizes.story.js.map +1 -1
  399. package/lib/cjs/tag/stories/tag-types.story.js +1 -1
  400. package/lib/cjs/tag/stories/tag-types.story.js.map +1 -1
  401. package/lib/cjs/tag-base/stories/tag-variants.story.js +1 -1
  402. package/lib/cjs/tag-base/stories/tag-variants.story.js.map +1 -1
  403. package/lib/cjs/text-area/stories/text-area-sizes.story.js +1 -1
  404. package/lib/cjs/text-area/stories/text-area-sizes.story.js.map +1 -1
  405. package/lib/cjs/text-input/TextInput.js.map +1 -1
  406. package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js +1 -1
  407. package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
  408. package/lib/cjs/text-input/stories/text-input-optional.story.js +1 -1
  409. package/lib/cjs/text-input/stories/text-input-optional.story.js.map +1 -1
  410. package/lib/cjs/text-input/stories/text-input-sizes.story.js +1 -1
  411. package/lib/cjs/text-input/stories/text-input-sizes.story.js.map +1 -1
  412. package/lib/cjs/text-link/TextLink.js +2 -6
  413. package/lib/cjs/text-link/TextLink.js.map +1 -1
  414. package/lib/cjs/text-link/stories/index.js +5 -17
  415. package/lib/cjs/text-link/stories/index.js.map +1 -1
  416. package/lib/cjs/text-link/stories/text-link-external.story.js +1 -1
  417. package/lib/cjs/text-link/stories/text-link-external.story.js.map +1 -1
  418. package/lib/cjs/text-link/stories/{text-link-internal-underline.story.js → text-link-internal.story.js} +2 -2
  419. package/lib/cjs/text-link/stories/text-link-internal.story.js.map +1 -0
  420. package/lib/cjs/time-picker/stories/time-picker-in-popover-dialog.story.js +1 -1
  421. package/lib/cjs/time-picker/stories/time-picker-in-popover-dialog.story.js.map +1 -1
  422. package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
  423. package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
  424. package/lib/cjs/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js +1 -1
  425. package/lib/cjs/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js.map +1 -1
  426. package/lib/cjs/toast/stories/toast-action-story.js +1 -1
  427. package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
  428. package/lib/cjs/toast/stories/toast-closeable-story.js +1 -1
  429. package/lib/cjs/toast/stories/toast-closeable-story.js.map +1 -1
  430. package/lib/cjs/toast/stories/toast-controlled-story.js +1 -1
  431. package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
  432. package/lib/cjs/toast/stories/toast-custom-story.js +1 -1
  433. package/lib/cjs/toast/stories/toast-custom-story.js.map +1 -1
  434. package/lib/cjs/toast/stories/toast-danger-story.js +1 -1
  435. package/lib/cjs/toast/stories/toast-danger-story.js.map +1 -1
  436. package/lib/cjs/toast/stories/toast-neutral-story.js +1 -1
  437. package/lib/cjs/toast/stories/toast-neutral-story.js.map +1 -1
  438. package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
  439. package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
  440. package/lib/cjs/toast/stories/toast-success-story.js +1 -1
  441. package/lib/cjs/toast/stories/toast-success-story.js.map +1 -1
  442. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  443. package/lib/cjs/tooltip/stories/tooltip-in-dialog.story.js +1 -1
  444. package/lib/cjs/tooltip/stories/tooltip-in-dialog.story.js.map +1 -1
  445. package/lib/cjs/tooltip/stories/tooltip-placements.story.js +1 -1
  446. package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
  447. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  448. package/lib/cjs/tree-view/TreeView.js +3 -0
  449. package/lib/cjs/tree-view/TreeView.js.map +1 -1
  450. package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
  451. package/lib/cjs/tree-view/stories/treeview-custom.story.js +2 -2
  452. package/lib/cjs/tree-view/stories/treeview-custom.story.js.map +1 -1
  453. package/lib/cjs/tree-view/tree-view-utils.js.map +1 -1
  454. package/lib/cjs/typography/Typography.js +7 -1
  455. package/lib/cjs/typography/Typography.js.map +1 -1
  456. package/lib/esm/_generated/style-rules/index.js +1 -1
  457. package/lib/esm/_generated/style-rules/index.js.map +1 -1
  458. package/lib/esm/_generated/style-rules/literal-guards.js +45 -0
  459. package/lib/esm/_generated/style-rules/literal-guards.js.map +1 -0
  460. package/lib/esm/_generated/style-rules/literal-schemas.js +6 -18
  461. package/lib/esm/_generated/style-rules/literal-schemas.js.map +1 -1
  462. package/lib/esm/{text-overflow/index.js → _generated/style-rules/literal-types.js} +8 -2
  463. package/lib/esm/_generated/style-rules/literal-types.js.map +1 -0
  464. package/lib/esm/_generated/style-rules/numeric-utils.js.map +1 -1
  465. package/lib/esm/_generated/style-rules/range-utils.js.map +1 -1
  466. package/lib/esm/ai/presence/stories/ai-presence-default.story.js +1 -1
  467. package/lib/esm/ai/presence/stories/ai-presence-default.story.js.map +1 -1
  468. package/lib/esm/ai/presence/stories/ai-presence-thinking.story.js +1 -1
  469. package/lib/esm/ai/presence/stories/ai-presence-thinking.story.js.map +1 -1
  470. package/lib/esm/ai/reasoning/Reasoning.js +1 -1
  471. package/lib/esm/ai/reasoning/Reasoning.js.map +1 -1
  472. package/lib/esm/ai/reasoning/stories/reasoning-full.story.js +1 -1
  473. package/lib/esm/ai/reasoning/stories/reasoning-full.story.js.map +1 -1
  474. package/lib/esm/ai/response/Response.js +57 -3
  475. package/lib/esm/ai/response/Response.js.map +1 -1
  476. package/lib/esm/ai/response/stories/response-fixtures.js +83 -0
  477. package/lib/esm/ai/response/stories/response-fixtures.js.map +1 -0
  478. package/lib/esm/ai/response/stories/response-full-example.story.js +3 -3
  479. package/lib/esm/ai/response/stories/response-full-example.story.js.map +1 -1
  480. package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js +1 -1
  481. package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -1
  482. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
  483. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
  484. package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
  485. package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
  486. package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
  487. package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
  488. package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
  489. package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
  490. package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
  491. package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
  492. package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
  493. package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
  494. package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
  495. package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
  496. package/lib/esm/avatar/stories/avatar-custom-icon.story.js +1 -1
  497. package/lib/esm/avatar/stories/avatar-custom-icon.story.js.map +1 -1
  498. package/lib/esm/avatar/stories/avatar-shapes.story.js +1 -1
  499. package/lib/esm/avatar/stories/avatar-shapes.story.js.map +1 -1
  500. package/lib/esm/avatar/stories/avatar-sizes.story.js +1 -1
  501. package/lib/esm/avatar/stories/avatar-sizes.story.js.map +1 -1
  502. package/lib/esm/avatar/stories/avatar-statuses.story.js +1 -1
  503. package/lib/esm/avatar/stories/avatar-statuses.story.js.map +1 -1
  504. package/lib/esm/avatar/stories/avatar-types.story.js +1 -1
  505. package/lib/esm/avatar/stories/avatar-types.story.js.map +1 -1
  506. package/lib/esm/banner/stories/banner-variants.story.js +1 -1
  507. package/lib/esm/banner/stories/banner-variants.story.js.map +1 -1
  508. package/lib/esm/banner/stories/banner-with-icons.story.js +1 -1
  509. package/lib/esm/banner/stories/banner-with-icons.story.js.map +1 -1
  510. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js +1 -1
  511. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
  512. package/lib/esm/button/ButtonBase.js +1 -3
  513. package/lib/esm/button/ButtonBase.js.map +1 -1
  514. package/lib/esm/button/stories/button-sizes.story.js +1 -1
  515. package/lib/esm/button/stories/button-sizes.story.js.map +1 -1
  516. package/lib/esm/button/stories/button-variants.story.js +1 -1
  517. package/lib/esm/button/stories/button-variants.story.js.map +1 -1
  518. package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
  519. package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
  520. package/lib/esm/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js +1 -1
  521. package/lib/esm/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js.map +1 -1
  522. package/lib/esm/clean-icon-button/stories/clean-icon-button-sizes.story.js +1 -1
  523. package/lib/esm/clean-icon-button/stories/clean-icon-button-sizes.story.js.map +1 -1
  524. package/lib/esm/clean-icon-button/stories/clean-icon-button-tone.story.js +1 -1
  525. package/lib/esm/clean-icon-button/stories/clean-icon-button-tone.story.js.map +1 -1
  526. package/lib/esm/clipboard-button/stories/clipboard-button-sizes.story.js +1 -1
  527. package/lib/esm/clipboard-button/stories/clipboard-button-sizes.story.js.map +1 -1
  528. package/lib/esm/code-block/CodeBlock.js +3 -7
  529. package/lib/esm/code-block/CodeBlock.js.map +1 -1
  530. package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
  531. package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
  532. package/lib/esm/code-block/stories/code-full.story.js +2 -2
  533. package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
  534. package/lib/esm/code-block/stories/code-languages.story.js +1 -1
  535. package/lib/esm/code-block/stories/code-languages.story.js.map +1 -1
  536. package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
  537. package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
  538. package/lib/esm/color-picker/ColorPicker.js +0 -3
  539. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  540. package/lib/esm/color-picker/stories/color-picker-dialog.story.js +1 -1
  541. package/lib/esm/color-picker/stories/color-picker-dialog.story.js.map +1 -1
  542. package/lib/esm/color-picker/stories/color-picker-popover.story.js +1 -1
  543. package/lib/esm/color-picker/stories/color-picker-popover.story.js.map +1 -1
  544. package/lib/esm/combobox/stories/combobox-action-on-select.story.js +1 -1
  545. package/lib/esm/combobox/stories/combobox-action-on-select.story.js.map +1 -1
  546. package/lib/esm/combobox/stories/combobox-actions.story.js +1 -1
  547. package/lib/esm/combobox/stories/combobox-actions.story.js.map +1 -1
  548. package/lib/esm/combobox/stories/combobox-async.story.js +2 -2
  549. package/lib/esm/combobox/stories/combobox-async.story.js.map +1 -1
  550. package/lib/esm/combobox/stories/combobox-disabled.story.js +1 -1
  551. package/lib/esm/combobox/stories/combobox-disabled.story.js.map +1 -1
  552. package/lib/esm/combobox/stories/combobox-fluid.story.js +1 -1
  553. package/lib/esm/combobox/stories/combobox-fluid.story.js.map +1 -1
  554. package/lib/esm/combobox/stories/combobox-hidden-label.story.js +1 -1
  555. package/lib/esm/combobox/stories/combobox-hidden-label.story.js.map +1 -1
  556. package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js +1 -1
  557. package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -1
  558. package/lib/esm/combobox/stories/combobox-in-popover.story.js +1 -1
  559. package/lib/esm/combobox/stories/combobox-in-popover.story.js.map +1 -1
  560. package/lib/esm/combobox/stories/combobox-native-form.story.js +1 -1
  561. package/lib/esm/combobox/stories/combobox-native-form.story.js.map +1 -1
  562. package/lib/esm/combobox/stories/combobox-sizes.story.js +1 -1
  563. package/lib/esm/combobox/stories/combobox-sizes.story.js.map +1 -1
  564. package/lib/esm/combobox/stories/combobox-validation.story.js +1 -1
  565. package/lib/esm/combobox/stories/combobox-validation.story.js.map +1 -1
  566. package/lib/esm/conditional-wrap/stories/conditional-wrap-default.story.js +1 -1
  567. package/lib/esm/conditional-wrap/stories/conditional-wrap-default.story.js.map +1 -1
  568. package/lib/esm/data-grid/stories/datagrid-compact-mode.story.js +1 -1
  569. package/lib/esm/data-grid/stories/datagrid-compact-mode.story.js.map +1 -1
  570. package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js +2 -2
  571. package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
  572. package/lib/esm/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js +1 -1
  573. package/lib/esm/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js.map +1 -1
  574. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js +2 -2
  575. package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
  576. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js +1 -1
  577. package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
  578. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
  579. package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
  580. package/lib/esm/data-grid/stories/datagrid-percentage-width-columns.story.js +1 -1
  581. package/lib/esm/data-grid/stories/datagrid-percentage-width-columns.story.js.map +1 -1
  582. package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js +3 -3
  583. package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
  584. package/lib/esm/data-grid/stories/datagrid-placeholder-states.story.js +1 -1
  585. package/lib/esm/data-grid/stories/datagrid-placeholder-states.story.js.map +1 -1
  586. package/lib/esm/data-grid/stories/datagrid-resizable-column.story.js +1 -1
  587. package/lib/esm/data-grid/stories/datagrid-resizable-column.story.js.map +1 -1
  588. package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +1 -1
  589. package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
  590. package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js +1 -1
  591. package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -1
  592. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +5 -5
  593. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  594. package/lib/esm/data-grid/stories/datagrid-simple.story.js +1 -1
  595. package/lib/esm/data-grid/stories/datagrid-simple.story.js.map +1 -1
  596. package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js +1 -1
  597. package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
  598. package/lib/esm/data-grid/stories/datagrid-skeleton-loading.story.js +1 -1
  599. package/lib/esm/data-grid/stories/datagrid-skeleton-loading.story.js.map +1 -1
  600. package/lib/esm/data-grid/stories/datagrid-sortable.story.js +1 -1
  601. package/lib/esm/data-grid/stories/datagrid-sortable.story.js.map +1 -1
  602. package/lib/esm/data-grid/stories/datagrid-using-editable-cells.story.js +2 -2
  603. package/lib/esm/data-grid/stories/datagrid-using-editable-cells.story.js.map +1 -1
  604. package/lib/esm/data-grid/stories/datagrid-virtualization.story.js +3 -3
  605. package/lib/esm/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
  606. package/lib/esm/data-grid/style-rules/guard.js +43 -0
  607. package/lib/esm/data-grid/style-rules/guard.js.map +1 -0
  608. package/lib/esm/data-grid/style-rules/index.js +1 -3
  609. package/lib/esm/data-grid/style-rules/index.js.map +1 -1
  610. package/lib/esm/data-grid/style-rules/internal/schemas.js +210 -0
  611. package/lib/esm/data-grid/style-rules/internal/schemas.js.map +1 -0
  612. package/lib/esm/data-grid/style-rules/types.js +1 -203
  613. package/lib/esm/data-grid/style-rules/types.js.map +1 -1
  614. package/lib/esm/date-picker/DatePicker.js +8 -6
  615. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  616. package/lib/esm/date-picker/stories/date-picker-in-dialog.story.js +1 -1
  617. package/lib/esm/date-picker/stories/date-picker-in-dialog.story.js.map +1 -1
  618. package/lib/esm/date-picker/stories/date-picker-in-popover-dialog.story.js +1 -1
  619. package/lib/esm/date-picker/stories/date-picker-in-popover-dialog.story.js.map +1 -1
  620. package/lib/esm/dialog/Dialog.js +1 -2
  621. package/lib/esm/dialog/Dialog.js.map +1 -1
  622. package/lib/esm/dialog/stories/dialog-danger.story.js +1 -1
  623. package/lib/esm/dialog/stories/dialog-danger.story.js.map +1 -1
  624. package/lib/esm/dialog/stories/dialog-default.story.js +1 -1
  625. package/lib/esm/dialog/stories/dialog-default.story.js.map +1 -1
  626. package/lib/esm/dialog/stories/dialog-image.story.js +1 -1
  627. package/lib/esm/dialog/stories/dialog-image.story.js.map +1 -1
  628. package/lib/esm/dialog/stories/dialog-info.story.js +1 -1
  629. package/lib/esm/dialog/stories/dialog-info.story.js.map +1 -1
  630. package/lib/esm/dialog/stories/dialog-top-aligned.story.js +2 -2
  631. package/lib/esm/dialog/stories/dialog-top-aligned.story.js.map +1 -1
  632. package/lib/esm/dialog/stories/dialog-variants.story.js +1 -1
  633. package/lib/esm/dialog/stories/dialog-variants.story.js.map +1 -1
  634. package/lib/esm/dialog/stories/dialog-warning.story.js +1 -1
  635. package/lib/esm/dialog/stories/dialog-warning.story.js.map +1 -1
  636. package/lib/esm/dismissible-tag/stories/dismissible-tag-colors.story.js +1 -1
  637. package/lib/esm/dismissible-tag/stories/dismissible-tag-colors.story.js.map +1 -1
  638. package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
  639. package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
  640. package/lib/esm/drawer/Drawer.js +7 -6
  641. package/lib/esm/drawer/Drawer.js.map +1 -1
  642. package/lib/esm/drawer/stories/drawer-full.story.js +2 -2
  643. package/lib/esm/drawer/stories/drawer-full.story.js.map +1 -1
  644. package/lib/esm/drawer/stories/drawer-not-closeable.story.js +2 -2
  645. package/lib/esm/drawer/stories/drawer-not-closeable.story.js.map +1 -1
  646. package/lib/esm/drawer/stories/drawer-overlay.story.js +1 -1
  647. package/lib/esm/drawer/stories/drawer-overlay.story.js.map +1 -1
  648. package/lib/esm/drawer/stories/drawer-portaled.story.js +2 -2
  649. package/lib/esm/drawer/stories/drawer-portaled.story.js.map +1 -1
  650. package/lib/esm/drawer/stories/drawer-push.story.js +2 -2
  651. package/lib/esm/drawer/stories/drawer-push.story.js.map +1 -1
  652. package/lib/esm/drawer/stories/drawer-resizable.story.js +2 -2
  653. package/lib/esm/drawer/stories/drawer-resizable.story.js.map +1 -1
  654. package/lib/esm/drawer/stories/drawer-right-side.story.js +2 -2
  655. package/lib/esm/drawer/stories/drawer-right-side.story.js.map +1 -1
  656. package/lib/esm/drawer/stories/drawer-scrollable.story.js +2 -2
  657. package/lib/esm/drawer/stories/drawer-scrollable.story.js.map +1 -1
  658. package/lib/esm/dropzone/stories/dropzone-full.story.js +3 -3
  659. package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
  660. package/lib/esm/flex/stories/flex-default.story.js +1 -1
  661. package/lib/esm/flex/stories/flex-default.story.js.map +1 -1
  662. package/lib/esm/graph-label/stories/graph-label-color.story.js +1 -1
  663. package/lib/esm/graph-label/stories/graph-label-color.story.js.map +1 -1
  664. package/lib/esm/graph-label/stories/graph-label-sizes.story.js +1 -1
  665. package/lib/esm/graph-label/stories/graph-label-sizes.story.js.map +1 -1
  666. package/lib/esm/graph-label/stories/graph-label-types.story.js +1 -1
  667. package/lib/esm/graph-label/stories/graph-label-types.story.js.map +1 -1
  668. package/lib/esm/hooks/use-debounce-callback/index.js +6 -6
  669. package/lib/esm/hooks/use-debounce-callback/index.js.map +1 -1
  670. package/lib/esm/icon-button/stories/icon-button-sizes.story.js +1 -1
  671. package/lib/esm/icon-button/stories/icon-button-sizes.story.js.map +1 -1
  672. package/lib/esm/icon-button/stories/icon-button-tone.story.js +1 -1
  673. package/lib/esm/icon-button/stories/icon-button-tone.story.js.map +1 -1
  674. package/lib/esm/icon-button-array/stories/icon-button-array-sizes.story.js +1 -1
  675. package/lib/esm/icon-button-array/stories/icon-button-array-sizes.story.js.map +1 -1
  676. package/lib/esm/icon-button-base/IconButtonBase.js +1 -3
  677. package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
  678. package/lib/esm/icons/generated/custom/index.js +0 -7
  679. package/lib/esm/icons/generated/custom/index.js.map +1 -1
  680. package/lib/esm/inline-edit/InlineEdit.js +3 -2
  681. package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
  682. package/lib/esm/kbd/Kbd.js +0 -1
  683. package/lib/esm/kbd/Kbd.js.map +1 -1
  684. package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js +1 -1
  685. package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -1
  686. package/lib/esm/logo/stories/logo-black.story.js +1 -1
  687. package/lib/esm/logo/stories/logo-black.story.js.map +1 -1
  688. package/lib/esm/logo/stories/logo-default.story.js +1 -1
  689. package/lib/esm/logo/stories/logo-default.story.js.map +1 -1
  690. package/lib/esm/logo/stories/logo-icon.story.js +1 -1
  691. package/lib/esm/logo/stories/logo-icon.story.js.map +1 -1
  692. package/lib/esm/menu/Menu.js +2 -2
  693. package/lib/esm/menu/Menu.js.map +1 -1
  694. package/lib/esm/menu/menu-types.js.map +1 -1
  695. package/lib/esm/menu/stories/menu-custom-items.story.js +1 -1
  696. package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
  697. package/lib/esm/menu/stories/menu-in-dialog.story.js +2 -2
  698. package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
  699. package/lib/esm/menu/stories/menu-nested.story.js +1 -1
  700. package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
  701. package/lib/esm/menu/stories/menu-radio-and-normal.story.js +1 -1
  702. package/lib/esm/menu/stories/menu-radio-and-normal.story.js.map +1 -1
  703. package/lib/esm/menu/stories/menu-radio-items.story.js +1 -1
  704. package/lib/esm/menu/stories/menu-radio-items.story.js.map +1 -1
  705. package/lib/esm/menu/stories/menu-with-icon.story.js +1 -1
  706. package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
  707. package/lib/esm/next/tree-view/TreeView.js +3 -3
  708. package/lib/esm/next/tree-view/TreeView.js.map +1 -1
  709. package/lib/esm/next/tree-view/stories/tree-view-large.story.js +1 -1
  710. package/lib/esm/next/tree-view/stories/tree-view-large.story.js.map +1 -1
  711. package/lib/esm/next/tree-view/stories/tree-view-multiple-replace.story.js +1 -1
  712. package/lib/esm/next/tree-view/stories/tree-view-multiple-replace.story.js.map +1 -1
  713. package/lib/esm/next/tree-view/stories/tree-view-root-selection.story.js +1 -1
  714. package/lib/esm/next/tree-view/stories/tree-view-root-selection.story.js.map +1 -1
  715. package/lib/esm/next/tree-view/stories/tree-view-tooltip.story.js +1 -1
  716. package/lib/esm/next/tree-view/stories/tree-view-tooltip.story.js.map +1 -1
  717. package/lib/esm/next/tree-view/stories/tree-view-trailing.story.js +1 -1
  718. package/lib/esm/next/tree-view/stories/tree-view-trailing.story.js.map +1 -1
  719. package/lib/esm/next/tree-view/stories/tree-view-uncontrolled.story.js +1 -1
  720. package/lib/esm/next/tree-view/stories/tree-view-uncontrolled.story.js.map +1 -1
  721. package/lib/esm/popover/Popover.js +6 -6
  722. package/lib/esm/popover/Popover.js.map +1 -1
  723. package/lib/esm/popover/stories/popover-controlled.story.js +1 -1
  724. package/lib/esm/popover/stories/popover-controlled.story.js.map +1 -1
  725. package/lib/esm/popover/stories/popover-custom-offset.story.js +1 -1
  726. package/lib/esm/popover/stories/popover-custom-offset.story.js.map +1 -1
  727. package/lib/esm/popover/stories/popover-default.story.js +1 -1
  728. package/lib/esm/popover/stories/popover-default.story.js.map +1 -1
  729. package/lib/esm/popover/stories/popover-in-dialog.story.js +1 -1
  730. package/lib/esm/popover/stories/popover-in-dialog.story.js.map +1 -1
  731. package/lib/esm/popover/stories/popover-no-button-wrapper.story.js +1 -1
  732. package/lib/esm/popover/stories/popover-no-button-wrapper.story.js.map +1 -1
  733. package/lib/esm/popover/stories/popover-separate-anchor.story.js +1 -1
  734. package/lib/esm/popover/stories/popover-separate-anchor.story.js.map +1 -1
  735. package/lib/esm/popover/use-popover.js +7 -9
  736. package/lib/esm/popover/use-popover.js.map +1 -1
  737. package/lib/esm/progress-bar/stories/progress-bar-sizes.story.js +1 -1
  738. package/lib/esm/progress-bar/stories/progress-bar-sizes.story.js.map +1 -1
  739. package/lib/esm/radio/stories/radio-disabled.story.js +1 -1
  740. package/lib/esm/radio/stories/radio-disabled.story.js.map +1 -1
  741. package/lib/esm/radio/stories/radio-truncated-label.story.js +1 -1
  742. package/lib/esm/radio/stories/radio-truncated-label.story.js.map +1 -1
  743. package/lib/esm/read-only-tag/stories/read-only-tag-colors.story.js +1 -1
  744. package/lib/esm/read-only-tag/stories/read-only-tag-colors.story.js.map +1 -1
  745. package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
  746. package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
  747. package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js +1 -1
  748. package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js.map +1 -1
  749. package/lib/esm/select/stories/select-controlled.story.js +1 -1
  750. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  751. package/lib/esm/select/stories/select-custom-label.story.js +1 -1
  752. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  753. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
  754. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  755. package/lib/esm/select/stories/select-menu-positionings.story.js +1 -1
  756. package/lib/esm/select/stories/select-menu-positionings.story.js.map +1 -1
  757. package/lib/esm/select/stories/select-required.story.js +1 -1
  758. package/lib/esm/select/stories/select-required.story.js.map +1 -1
  759. package/lib/esm/select/stories/select-sizes.story.js +1 -1
  760. package/lib/esm/select/stories/select-sizes.story.js.map +1 -1
  761. package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js +1 -1
  762. package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -1
  763. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js +1 -1
  764. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
  765. package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js +1 -1
  766. package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -1
  767. package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js +1 -1
  768. package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -1
  769. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  770. package/lib/esm/side-navigation/stories/side-nav-badges.story.js +2 -2
  771. package/lib/esm/side-navigation/stories/side-nav-badges.story.js.map +1 -1
  772. package/lib/esm/side-navigation/stories/side-nav-compact.story.js +1 -1
  773. package/lib/esm/side-navigation/stories/side-nav-compact.story.js.map +1 -1
  774. package/lib/esm/side-navigation/stories/side-nav-default.story.js +1 -1
  775. package/lib/esm/side-navigation/stories/side-nav-default.story.js.map +1 -1
  776. package/lib/esm/side-navigation/stories/side-nav-secondary.story.js +1 -1
  777. package/lib/esm/side-navigation/stories/side-nav-secondary.story.js.map +1 -1
  778. package/lib/esm/skeleton/stories/skeleton-circular.story.js +1 -1
  779. package/lib/esm/skeleton/stories/skeleton-circular.story.js.map +1 -1
  780. package/lib/esm/skeleton/stories/skeleton-default.story.js +1 -1
  781. package/lib/esm/skeleton/stories/skeleton-default.story.js.map +1 -1
  782. package/lib/esm/skeleton/stories/skeleton-full-example.story.js +1 -1
  783. package/lib/esm/skeleton/stories/skeleton-full-example.story.js.map +1 -1
  784. package/lib/esm/skeleton/stories/skeleton-inherit-height.story.js +1 -1
  785. package/lib/esm/skeleton/stories/skeleton-inherit-height.story.js.map +1 -1
  786. package/lib/esm/skeleton/stories/skeleton-inherit-width.story.js +1 -1
  787. package/lib/esm/skeleton/stories/skeleton-inherit-width.story.js.map +1 -1
  788. package/lib/esm/slider/Slider.js +3 -3
  789. package/lib/esm/slider/Slider.js.map +1 -1
  790. package/lib/esm/slider/stories/slider-custom-step-length.story.js +1 -1
  791. package/lib/esm/slider/stories/slider-custom-step-length.story.js.map +1 -1
  792. package/lib/esm/slider/stories/slider-range.story.js +1 -1
  793. package/lib/esm/slider/stories/slider-range.story.js.map +1 -1
  794. package/lib/esm/slider/stories/slider-show-steps.story.js +1 -1
  795. package/lib/esm/slider/stories/slider-show-steps.story.js.map +1 -1
  796. package/lib/esm/slider/stories/slider-show-values.story.js +1 -1
  797. package/lib/esm/slider/stories/slider-show-values.story.js.map +1 -1
  798. package/lib/esm/slider/stories/slider-single-controlled.story.js +2 -2
  799. package/lib/esm/slider/stories/slider-single-controlled.story.js.map +1 -1
  800. package/lib/esm/slider/stories/slider-single.story.js +1 -1
  801. package/lib/esm/slider/stories/slider-single.story.js.map +1 -1
  802. package/lib/esm/spotlight/Spotlight.js +3 -3
  803. package/lib/esm/spotlight/Spotlight.js.map +1 -1
  804. package/lib/esm/spotlight/SpotlightTarget.js +3 -3
  805. package/lib/esm/spotlight/SpotlightTarget.js.map +1 -1
  806. package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js +1 -1
  807. package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
  808. package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js +1 -1
  809. package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
  810. package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js +1 -1
  811. package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
  812. package/lib/esm/spotlight/stories/spotlight-on-tabs.story.js +1 -1
  813. package/lib/esm/spotlight/stories/spotlight-on-tabs.story.js.map +1 -1
  814. package/lib/esm/spotlight/stories/spotlight-tour.story.js +1 -1
  815. package/lib/esm/spotlight/stories/spotlight-tour.story.js.map +1 -1
  816. package/lib/esm/spotlight/stories/spotlight-with-icon.story.js +1 -1
  817. package/lib/esm/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
  818. package/lib/esm/spotlight/stories/spotlight-with-image.story.js +1 -1
  819. package/lib/esm/spotlight/stories/spotlight-with-image.story.js.map +1 -1
  820. package/lib/esm/spotlight/stories/spotlight-with-label.story.js +1 -1
  821. package/lib/esm/spotlight/stories/spotlight-with-label.story.js.map +1 -1
  822. package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js +1 -1
  823. package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
  824. package/lib/esm/spotlight/use-spotlight.js +5 -5
  825. package/lib/esm/spotlight/use-spotlight.js.map +1 -1
  826. package/lib/esm/status-indicator/stories/status-indicator-variants.story.js +1 -1
  827. package/lib/esm/status-indicator/stories/status-indicator-variants.story.js.map +1 -1
  828. package/lib/esm/status-label/stories/status-label-colors.story.js +1 -1
  829. package/lib/esm/status-label/stories/status-label-colors.story.js.map +1 -1
  830. package/lib/esm/status-label/stories/status-label-fills.story.js +1 -1
  831. package/lib/esm/status-label/stories/status-label-fills.story.js.map +1 -1
  832. package/lib/esm/status-label/stories/status-label-with-icons.story.js +1 -1
  833. package/lib/esm/status-label/stories/status-label-with-icons.story.js.map +1 -1
  834. package/lib/esm/tabs/Tabs.js +2 -2
  835. package/lib/esm/tabs/Tabs.js.map +1 -1
  836. package/lib/esm/tabs/stories/tabs-badge.story.js +1 -1
  837. package/lib/esm/tabs/stories/tabs-badge.story.js.map +1 -1
  838. package/lib/esm/tabs/stories/tabs-default.story.js +1 -1
  839. package/lib/esm/tabs/stories/tabs-default.story.js.map +1 -1
  840. package/lib/esm/tabs/stories/tabs-disabled.story.js +1 -1
  841. package/lib/esm/tabs/stories/tabs-disabled.story.js.map +1 -1
  842. package/lib/esm/tabs/stories/tabs-fill-variants.story.js +1 -1
  843. package/lib/esm/tabs/stories/tabs-fill-variants.story.js.map +1 -1
  844. package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
  845. package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
  846. package/lib/esm/tabs/stories/tabs-sizes.story.js +1 -1
  847. package/lib/esm/tabs/stories/tabs-sizes.story.js.map +1 -1
  848. package/lib/esm/tabs/stories/tabs-with-icons.story.js +1 -1
  849. package/lib/esm/tabs/stories/tabs-with-icons.story.js.map +1 -1
  850. package/lib/esm/tag/stories/tag-sizes.story.js +1 -1
  851. package/lib/esm/tag/stories/tag-sizes.story.js.map +1 -1
  852. package/lib/esm/tag/stories/tag-types.story.js +1 -1
  853. package/lib/esm/tag/stories/tag-types.story.js.map +1 -1
  854. package/lib/esm/tag-base/stories/tag-variants.story.js +1 -1
  855. package/lib/esm/tag-base/stories/tag-variants.story.js.map +1 -1
  856. package/lib/esm/text-area/stories/text-area-sizes.story.js +1 -1
  857. package/lib/esm/text-area/stories/text-area-sizes.story.js.map +1 -1
  858. package/lib/esm/text-input/TextInput.js.map +1 -1
  859. package/lib/esm/text-input/stories/text-input-loading-spinner.story.js +1 -1
  860. package/lib/esm/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
  861. package/lib/esm/text-input/stories/text-input-optional.story.js +1 -1
  862. package/lib/esm/text-input/stories/text-input-optional.story.js.map +1 -1
  863. package/lib/esm/text-input/stories/text-input-sizes.story.js +1 -1
  864. package/lib/esm/text-input/stories/text-input-sizes.story.js.map +1 -1
  865. package/lib/esm/text-link/TextLink.js +2 -6
  866. package/lib/esm/text-link/TextLink.js.map +1 -1
  867. package/lib/esm/text-link/stories/index.js +3 -12
  868. package/lib/esm/text-link/stories/index.js.map +1 -1
  869. package/lib/esm/text-link/stories/text-link-external.story.js +3 -3
  870. package/lib/esm/text-link/stories/text-link-external.story.js.map +1 -1
  871. package/lib/esm/text-link/stories/{text-link-internal-underline.story.js → text-link-internal.story.js} +2 -2
  872. package/lib/esm/text-link/stories/text-link-internal.story.js.map +1 -0
  873. package/lib/esm/time-picker/stories/time-picker-in-popover-dialog.story.js +1 -1
  874. package/lib/esm/time-picker/stories/time-picker-in-popover-dialog.story.js.map +1 -1
  875. package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
  876. package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
  877. package/lib/esm/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js +1 -1
  878. package/lib/esm/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js.map +1 -1
  879. package/lib/esm/toast/stories/toast-action-story.js +1 -1
  880. package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
  881. package/lib/esm/toast/stories/toast-closeable-story.js +1 -1
  882. package/lib/esm/toast/stories/toast-closeable-story.js.map +1 -1
  883. package/lib/esm/toast/stories/toast-controlled-story.js +1 -1
  884. package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
  885. package/lib/esm/toast/stories/toast-custom-story.js +1 -1
  886. package/lib/esm/toast/stories/toast-custom-story.js.map +1 -1
  887. package/lib/esm/toast/stories/toast-danger-story.js +1 -1
  888. package/lib/esm/toast/stories/toast-danger-story.js.map +1 -1
  889. package/lib/esm/toast/stories/toast-neutral-story.js +1 -1
  890. package/lib/esm/toast/stories/toast-neutral-story.js.map +1 -1
  891. package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
  892. package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
  893. package/lib/esm/toast/stories/toast-success-story.js +1 -1
  894. package/lib/esm/toast/stories/toast-success-story.js.map +1 -1
  895. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  896. package/lib/esm/tooltip/stories/tooltip-in-dialog.story.js +1 -1
  897. package/lib/esm/tooltip/stories/tooltip-in-dialog.story.js.map +1 -1
  898. package/lib/esm/tooltip/stories/tooltip-placements.story.js +1 -1
  899. package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
  900. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  901. package/lib/esm/tree-view/TreeView.js +3 -0
  902. package/lib/esm/tree-view/TreeView.js.map +1 -1
  903. package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
  904. package/lib/esm/tree-view/stories/treeview-custom.story.js +2 -2
  905. package/lib/esm/tree-view/stories/treeview-custom.story.js.map +1 -1
  906. package/lib/esm/tree-view/tree-view-utils.js.map +1 -1
  907. package/lib/esm/typography/Typography.js +7 -1
  908. package/lib/esm/typography/Typography.js.map +1 -1
  909. package/lib/types/_generated/style-rules/index.d.ts +2 -2
  910. package/lib/types/_generated/style-rules/index.d.ts.map +1 -1
  911. package/lib/{cjs/text-link/stories/text-link-default.story.js → types/_generated/style-rules/literal-guards.d.ts} +8 -10
  912. package/lib/types/_generated/style-rules/literal-guards.d.ts.map +1 -0
  913. package/lib/types/_generated/style-rules/literal-schemas.d.ts +0 -12
  914. package/lib/types/_generated/style-rules/literal-schemas.d.ts.map +1 -1
  915. package/lib/types/_generated/style-rules/literal-types.d.ts +80 -0
  916. package/lib/types/_generated/style-rules/literal-types.d.ts.map +1 -0
  917. package/lib/types/_generated/style-rules/numeric-utils.d.ts +1 -1
  918. package/lib/types/_generated/style-rules/numeric-utils.d.ts.map +1 -1
  919. package/lib/types/_generated/style-rules/range-utils.d.ts +1 -1
  920. package/lib/types/_generated/style-rules/range-utils.d.ts.map +1 -1
  921. package/lib/types/ai/reasoning/Reasoning.d.ts +1 -10
  922. package/lib/types/ai/reasoning/Reasoning.d.ts.map +1 -1
  923. package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts.map +1 -1
  924. package/lib/types/ai/response/Response.d.ts.map +1 -1
  925. package/lib/types/ai/response/stories/response-fixtures.d.ts +37 -0
  926. package/lib/types/ai/response/stories/response-fixtures.d.ts.map +1 -0
  927. package/lib/types/button/ButtonBase.d.ts.map +1 -1
  928. package/lib/types/code-block/CodeBlock.d.ts +2 -2
  929. package/lib/types/code-block/CodeBlock.d.ts.map +1 -1
  930. package/lib/types/color-picker/ColorPicker.d.ts.map +1 -1
  931. package/lib/types/data-grid/style-rules/guard.d.ts +43 -0
  932. package/lib/types/data-grid/style-rules/guard.d.ts.map +1 -0
  933. package/lib/types/data-grid/style-rules/index.d.ts +1 -2
  934. package/lib/types/data-grid/style-rules/index.d.ts.map +1 -1
  935. package/lib/types/data-grid/style-rules/internal/schemas.d.ts +321 -0
  936. package/lib/types/data-grid/style-rules/internal/schemas.d.ts.map +1 -0
  937. package/lib/types/data-grid/style-rules/types.d.ts +60 -284
  938. package/lib/types/data-grid/style-rules/types.d.ts.map +1 -1
  939. package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
  940. package/lib/types/dialog/Dialog.d.ts.map +1 -1
  941. package/lib/types/drawer/Drawer.d.ts +7 -13
  942. package/lib/types/drawer/Drawer.d.ts.map +1 -1
  943. package/lib/types/drawer/stories/drawer-overlay.story.d.ts.map +1 -1
  944. package/lib/types/dropzone/stories/dropzone-full.story.d.ts.map +1 -1
  945. package/lib/types/hooks/use-debounce-callback/index.d.ts +2 -2
  946. package/lib/types/hooks/use-debounce-callback/index.d.ts.map +1 -1
  947. package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
  948. package/lib/types/icons/generated/custom/index.d.ts +0 -7
  949. package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
  950. package/lib/types/inline-edit/InlineEdit.d.ts +6 -1
  951. package/lib/types/inline-edit/InlineEdit.d.ts.map +1 -1
  952. package/lib/types/kbd/Kbd.d.ts +1 -1
  953. package/lib/types/kbd/Kbd.d.ts.map +1 -1
  954. package/lib/types/menu/Menu.d.ts +1 -1
  955. package/lib/types/menu/Menu.d.ts.map +1 -1
  956. package/lib/types/menu/menu-types.d.ts +2 -2
  957. package/lib/types/menu/menu-types.d.ts.map +1 -1
  958. package/lib/types/next/tree-view/TreeView.d.ts +2 -2
  959. package/lib/types/next/tree-view/TreeView.d.ts.map +1 -1
  960. package/lib/types/popover/Popover.d.ts +15 -12
  961. package/lib/types/popover/Popover.d.ts.map +1 -1
  962. package/lib/types/popover/stories/popover-controlled.story.d.ts.map +1 -1
  963. package/lib/types/popover/stories/popover-default.story.d.ts.map +1 -1
  964. package/lib/types/popover/stories/popover-no-button-wrapper.story.d.ts.map +1 -1
  965. package/lib/types/popover/use-popover.d.ts +14 -9
  966. package/lib/types/popover/use-popover.d.ts.map +1 -1
  967. package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
  968. package/lib/types/slider/Slider.d.ts +3 -3
  969. package/lib/types/slider/Slider.d.ts.map +1 -1
  970. package/lib/types/spotlight/Spotlight.d.ts +2 -2
  971. package/lib/types/spotlight/Spotlight.d.ts.map +1 -1
  972. package/lib/types/spotlight/SpotlightTarget.d.ts +3 -3
  973. package/lib/types/spotlight/SpotlightTarget.d.ts.map +1 -1
  974. package/lib/types/spotlight/stories/spotlight-tour.story.d.ts.map +1 -1
  975. package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts.map +1 -1
  976. package/lib/types/spotlight/use-spotlight.d.ts +4 -4
  977. package/lib/types/spotlight/use-spotlight.d.ts.map +1 -1
  978. package/lib/types/tabs/Tabs.d.ts +3 -1
  979. package/lib/types/tabs/Tabs.d.ts.map +1 -1
  980. package/lib/types/text-link/TextLink.d.ts +2 -13
  981. package/lib/types/text-link/TextLink.d.ts.map +1 -1
  982. package/lib/types/text-link/stories/index.d.ts +2 -8
  983. package/lib/types/text-link/stories/index.d.ts.map +1 -1
  984. package/lib/types/text-link/stories/text-link-external.story.d.ts.map +1 -1
  985. package/lib/types/{text-overflow/stories/character-limit.story.d.ts → text-link/stories/text-link-internal.story.d.ts} +1 -1
  986. package/lib/types/text-link/stories/text-link-internal.story.d.ts.map +1 -0
  987. package/lib/types/tooltip/Tooltip.d.ts +0 -1
  988. package/lib/types/tooltip/Tooltip.d.ts.map +1 -1
  989. package/lib/types/tooltip/use-tooltip.d.ts.map +1 -1
  990. package/lib/types/tree-view/TreeView.d.ts +3 -0
  991. package/lib/types/tree-view/TreeView.d.ts.map +1 -1
  992. package/lib/types/tree-view/TreeViewItem.d.ts.map +1 -1
  993. package/lib/types/tree-view/tree-view-utils.d.ts.map +1 -1
  994. package/lib/types/typography/Typography.d.ts +6 -0
  995. package/lib/types/typography/Typography.d.ts.map +1 -1
  996. package/package.json +5 -4
  997. package/skills/ndl-react/SKILL.md +21 -19
  998. package/skills/ndl-react/components/ai/presence.md +3 -3
  999. package/skills/ndl-react/components/ai/reasoning.md +2 -6
  1000. package/skills/ndl-react/components/ai/response.md +17 -17
  1001. package/skills/ndl-react/components/ai/suggestion.md +1 -1
  1002. package/skills/ndl-react/components/ai/user-bubble.md +2 -2
  1003. package/skills/ndl-react/components/announcement-banner.md +10 -10
  1004. package/skills/ndl-react/components/avatar.md +5 -5
  1005. package/skills/ndl-react/components/banner.md +2 -2
  1006. package/skills/ndl-react/components/breadcrumbs.md +3 -3
  1007. package/skills/ndl-react/components/checkbox.md +4 -4
  1008. package/skills/ndl-react/components/clean-icon-button.md +17 -17
  1009. package/skills/ndl-react/components/clipboard-button.md +1 -1
  1010. package/skills/ndl-react/components/code-block.md +8 -9
  1011. package/skills/ndl-react/components/color-picker.md +3 -3
  1012. package/skills/ndl-react/components/combobox.md +20 -20
  1013. package/skills/ndl-react/components/conditional-wrap.md +1 -1
  1014. package/skills/ndl-react/components/data-grid.md +28 -28
  1015. package/skills/ndl-react/components/date-picker.md +3 -3
  1016. package/skills/ndl-react/components/dialog.md +9 -9
  1017. package/skills/ndl-react/components/dismissible-tag.md +2 -2
  1018. package/skills/ndl-react/components/drawer.md +39 -37
  1019. package/skills/ndl-react/components/dropzone.md +10 -13
  1020. package/skills/ndl-react/components/flex.md +1 -1
  1021. package/skills/ndl-react/components/graph-label.md +3 -3
  1022. package/skills/ndl-react/components/icon-button-array.md +1 -1
  1023. package/skills/ndl-react/components/icon-button.md +7 -7
  1024. package/skills/ndl-react/components/inline-edit.md +4 -1
  1025. package/skills/ndl-react/components/loading-spinner.md +1 -1
  1026. package/skills/ndl-react/components/logo.md +3 -3
  1027. package/skills/ndl-react/components/menu.md +14 -14
  1028. package/skills/ndl-react/components/next/tree-view.md +18 -18
  1029. package/skills/ndl-react/components/popover.md +15 -21
  1030. package/skills/ndl-react/components/progress-bar.md +1 -1
  1031. package/skills/ndl-react/components/radio.md +2 -2
  1032. package/skills/ndl-react/components/read-only-tag.md +2 -2
  1033. package/skills/ndl-react/components/segmented-control.md +1 -1
  1034. package/skills/ndl-react/components/select-icon-button.md +8 -8
  1035. package/skills/ndl-react/components/select.md +8 -8
  1036. package/skills/ndl-react/components/selectable-tag.md +2 -2
  1037. package/skills/ndl-react/components/side-navigation.md +19 -19
  1038. package/skills/ndl-react/components/skeleton.md +13 -13
  1039. package/skills/ndl-react/components/slider.md +13 -13
  1040. package/skills/ndl-react/components/spotlight.md +43 -27
  1041. package/skills/ndl-react/components/status-indicator.md +6 -6
  1042. package/skills/ndl-react/components/status-label.md +3 -3
  1043. package/skills/ndl-react/components/tabs.md +21 -20
  1044. package/skills/ndl-react/components/tag.md +2 -2
  1045. package/skills/ndl-react/components/text-area.md +1 -1
  1046. package/skills/ndl-react/components/text-input.md +3 -3
  1047. package/skills/ndl-react/components/text-link.md +12 -63
  1048. package/skills/ndl-react/components/time-picker.md +2 -2
  1049. package/skills/ndl-react/components/timezone-picker.md +4 -4
  1050. package/skills/ndl-react/components/tooltip.md +3 -3
  1051. package/skills/ndl-react/components/tree-view.md +6 -4
  1052. package/skills/ndl-react/components/typography.md +4 -0
  1053. package/skills/ndl-react/references/styling.md +56 -48
  1054. package/lib/cjs/icons/generated/custom/AddNode.js +0 -31
  1055. package/lib/cjs/icons/generated/custom/AddNode.js.map +0 -1
  1056. package/lib/cjs/icons/generated/custom/PanelBottom.js +0 -31
  1057. package/lib/cjs/icons/generated/custom/PanelBottom.js.map +0 -1
  1058. package/lib/cjs/icons/generated/custom/PanelLeft.js +0 -31
  1059. package/lib/cjs/icons/generated/custom/PanelLeft.js.map +0 -1
  1060. package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js +0 -31
  1061. package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js.map +0 -1
  1062. package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js +0 -31
  1063. package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js.map +0 -1
  1064. package/lib/cjs/icons/generated/custom/PanelRight.js +0 -31
  1065. package/lib/cjs/icons/generated/custom/PanelRight.js.map +0 -1
  1066. package/lib/cjs/icons/generated/custom/ThreePanel.js +0 -31
  1067. package/lib/cjs/icons/generated/custom/ThreePanel.js.map +0 -1
  1068. package/lib/cjs/text-link/stories/text-link-default.story.js.map +0 -1
  1069. package/lib/cjs/text-link/stories/text-link-external-underline.story.js +0 -30
  1070. package/lib/cjs/text-link/stories/text-link-external-underline.story.js.map +0 -1
  1071. package/lib/cjs/text-link/stories/text-link-internal-icon.story.js +0 -30
  1072. package/lib/cjs/text-link/stories/text-link-internal-icon.story.js.map +0 -1
  1073. package/lib/cjs/text-link/stories/text-link-internal-underline.story.js.map +0 -1
  1074. package/lib/cjs/text-overflow/TextOverflow.js +0 -146
  1075. package/lib/cjs/text-overflow/TextOverflow.js.map +0 -1
  1076. package/lib/cjs/text-overflow/constants.js +0 -44
  1077. package/lib/cjs/text-overflow/constants.js.map +0 -1
  1078. package/lib/cjs/text-overflow/index.js.map +0 -1
  1079. package/lib/cjs/text-overflow/stories/character-limit.story.js +0 -32
  1080. package/lib/cjs/text-overflow/stories/character-limit.story.js.map +0 -1
  1081. package/lib/cjs/text-overflow/stories/expand-collapse-buttons.story.js +0 -32
  1082. package/lib/cjs/text-overflow/stories/expand-collapse-buttons.story.js.map +0 -1
  1083. package/lib/cjs/text-overflow/stories/index.js +0 -48
  1084. package/lib/cjs/text-overflow/stories/index.js.map +0 -1
  1085. package/lib/cjs/text-overflow/stories/line-clamp.story.js +0 -32
  1086. package/lib/cjs/text-overflow/stories/line-clamp.story.js.map +0 -1
  1087. package/lib/cjs/text-overflow/stories/mixed-content.story.js +0 -31
  1088. package/lib/cjs/text-overflow/stories/mixed-content.story.js.map +0 -1
  1089. package/lib/cjs/text-overflow/stories/width-based-truncation.story.js +0 -32
  1090. package/lib/cjs/text-overflow/stories/width-based-truncation.story.js.map +0 -1
  1091. package/lib/cjs/text-overflow/text-overflow-utils.js +0 -167
  1092. package/lib/cjs/text-overflow/text-overflow-utils.js.map +0 -1
  1093. package/lib/cjs/text-overflow/use-ellipsis-observer.js +0 -66
  1094. package/lib/cjs/text-overflow/use-ellipsis-observer.js.map +0 -1
  1095. package/lib/cjs/text-overflow/use-truncate-with-button.js +0 -205
  1096. package/lib/cjs/text-overflow/use-truncate-with-button.js.map +0 -1
  1097. package/lib/esm/icons/generated/custom/AddNode.js +0 -29
  1098. package/lib/esm/icons/generated/custom/AddNode.js.map +0 -1
  1099. package/lib/esm/icons/generated/custom/PanelBottom.js +0 -29
  1100. package/lib/esm/icons/generated/custom/PanelBottom.js.map +0 -1
  1101. package/lib/esm/icons/generated/custom/PanelLeft.js +0 -29
  1102. package/lib/esm/icons/generated/custom/PanelLeft.js.map +0 -1
  1103. package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js +0 -29
  1104. package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js.map +0 -1
  1105. package/lib/esm/icons/generated/custom/PanelLeftExpanded.js +0 -29
  1106. package/lib/esm/icons/generated/custom/PanelLeftExpanded.js.map +0 -1
  1107. package/lib/esm/icons/generated/custom/PanelRight.js +0 -29
  1108. package/lib/esm/icons/generated/custom/PanelRight.js.map +0 -1
  1109. package/lib/esm/icons/generated/custom/ThreePanel.js +0 -29
  1110. package/lib/esm/icons/generated/custom/ThreePanel.js.map +0 -1
  1111. package/lib/esm/text-link/stories/text-link-default.story.js +0 -28
  1112. package/lib/esm/text-link/stories/text-link-default.story.js.map +0 -1
  1113. package/lib/esm/text-link/stories/text-link-external-underline.story.js +0 -28
  1114. package/lib/esm/text-link/stories/text-link-external-underline.story.js.map +0 -1
  1115. package/lib/esm/text-link/stories/text-link-internal-icon.story.js +0 -28
  1116. package/lib/esm/text-link/stories/text-link-internal-icon.story.js.map +0 -1
  1117. package/lib/esm/text-link/stories/text-link-internal-underline.story.js.map +0 -1
  1118. package/lib/esm/text-overflow/TextOverflow.js +0 -139
  1119. package/lib/esm/text-overflow/TextOverflow.js.map +0 -1
  1120. package/lib/esm/text-overflow/constants.js +0 -41
  1121. package/lib/esm/text-overflow/constants.js.map +0 -1
  1122. package/lib/esm/text-overflow/index.js.map +0 -1
  1123. package/lib/esm/text-overflow/stories/character-limit.story.js +0 -30
  1124. package/lib/esm/text-overflow/stories/character-limit.story.js.map +0 -1
  1125. package/lib/esm/text-overflow/stories/expand-collapse-buttons.story.js +0 -30
  1126. package/lib/esm/text-overflow/stories/expand-collapse-buttons.story.js.map +0 -1
  1127. package/lib/esm/text-overflow/stories/index.js +0 -37
  1128. package/lib/esm/text-overflow/stories/index.js.map +0 -1
  1129. package/lib/esm/text-overflow/stories/line-clamp.story.js +0 -30
  1130. package/lib/esm/text-overflow/stories/line-clamp.story.js.map +0 -1
  1131. package/lib/esm/text-overflow/stories/mixed-content.story.js +0 -29
  1132. package/lib/esm/text-overflow/stories/mixed-content.story.js.map +0 -1
  1133. package/lib/esm/text-overflow/stories/width-based-truncation.story.js +0 -30
  1134. package/lib/esm/text-overflow/stories/width-based-truncation.story.js.map +0 -1
  1135. package/lib/esm/text-overflow/text-overflow-utils.js +0 -159
  1136. package/lib/esm/text-overflow/text-overflow-utils.js.map +0 -1
  1137. package/lib/esm/text-overflow/use-ellipsis-observer.js +0 -63
  1138. package/lib/esm/text-overflow/use-ellipsis-observer.js.map +0 -1
  1139. package/lib/esm/text-overflow/use-truncate-with-button.js +0 -202
  1140. package/lib/esm/text-overflow/use-truncate-with-button.js.map +0 -1
  1141. package/lib/types/icons/generated/custom/AddNode.d.ts +0 -30
  1142. package/lib/types/icons/generated/custom/AddNode.d.ts.map +0 -1
  1143. package/lib/types/icons/generated/custom/PanelBottom.d.ts +0 -30
  1144. package/lib/types/icons/generated/custom/PanelBottom.d.ts.map +0 -1
  1145. package/lib/types/icons/generated/custom/PanelLeft.d.ts +0 -30
  1146. package/lib/types/icons/generated/custom/PanelLeft.d.ts.map +0 -1
  1147. package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts +0 -30
  1148. package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts.map +0 -1
  1149. package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts +0 -30
  1150. package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts.map +0 -1
  1151. package/lib/types/icons/generated/custom/PanelRight.d.ts +0 -30
  1152. package/lib/types/icons/generated/custom/PanelRight.d.ts.map +0 -1
  1153. package/lib/types/icons/generated/custom/ThreePanel.d.ts +0 -30
  1154. package/lib/types/icons/generated/custom/ThreePanel.d.ts.map +0 -1
  1155. package/lib/types/text-link/stories/text-link-default.story.d.ts +0 -24
  1156. package/lib/types/text-link/stories/text-link-default.story.d.ts.map +0 -1
  1157. package/lib/types/text-link/stories/text-link-external-underline.story.d.ts +0 -24
  1158. package/lib/types/text-link/stories/text-link-external-underline.story.d.ts.map +0 -1
  1159. package/lib/types/text-link/stories/text-link-internal-icon.story.d.ts +0 -24
  1160. package/lib/types/text-link/stories/text-link-internal-icon.story.d.ts.map +0 -1
  1161. package/lib/types/text-link/stories/text-link-internal-underline.story.d.ts +0 -24
  1162. package/lib/types/text-link/stories/text-link-internal-underline.story.d.ts.map +0 -1
  1163. package/lib/types/text-overflow/TextOverflow.d.ts +0 -63
  1164. package/lib/types/text-overflow/TextOverflow.d.ts.map +0 -1
  1165. package/lib/types/text-overflow/constants.d.ts +0 -41
  1166. package/lib/types/text-overflow/constants.d.ts.map +0 -1
  1167. package/lib/types/text-overflow/index.d.ts +0 -22
  1168. package/lib/types/text-overflow/index.d.ts.map +0 -1
  1169. package/lib/types/text-overflow/stories/character-limit.story.d.ts.map +0 -1
  1170. package/lib/types/text-overflow/stories/expand-collapse-buttons.story.d.ts +0 -24
  1171. package/lib/types/text-overflow/stories/expand-collapse-buttons.story.d.ts.map +0 -1
  1172. package/lib/types/text-overflow/stories/index.d.ts +0 -31
  1173. package/lib/types/text-overflow/stories/index.d.ts.map +0 -1
  1174. package/lib/types/text-overflow/stories/line-clamp.story.d.ts +0 -24
  1175. package/lib/types/text-overflow/stories/line-clamp.story.d.ts.map +0 -1
  1176. package/lib/types/text-overflow/stories/mixed-content.story.d.ts +0 -24
  1177. package/lib/types/text-overflow/stories/mixed-content.story.d.ts.map +0 -1
  1178. package/lib/types/text-overflow/stories/width-based-truncation.story.d.ts +0 -24
  1179. package/lib/types/text-overflow/stories/width-based-truncation.story.d.ts.map +0 -1
  1180. package/lib/types/text-overflow/text-overflow-utils.d.ts +0 -35
  1181. package/lib/types/text-overflow/text-overflow-utils.d.ts.map +0 -1
  1182. package/lib/types/text-overflow/use-ellipsis-observer.d.ts +0 -28
  1183. package/lib/types/text-overflow/use-ellipsis-observer.d.ts.map +0 -1
  1184. package/lib/types/text-overflow/use-truncate-with-button.d.ts +0 -45
  1185. package/lib/types/text-overflow/use-truncate-with-button.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tree-view-utils.js","sourceRoot":"","sources":["../../../src/tree-view/tree-view-utils.ts"],"names":[],"mappings":";;;AAuEA,4CAcC;AAOD,8BAqCC;AAqCD,sCAiDC;AAlMD,gDAA8C;AAU9C;;;;;;;GAOG;AACI,MAAM,WAAW,GAAG,CACzB,IAAmB,EACnB,KAAK,GAAG,CAAC,EACT,WAAoC,IAAI,EAChB,EAAE;IAC1B,MAAM,SAAS,GAA2B,EAAE,CAAC;IAE7C,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;;QACpB,SAAS,CAAC,IAAI,iCACT,IAAI,KACP,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ;YAClB,uCAAuC;YACvC,iBAAiB,EAAE,MAAA,IAAI,CAAC,iBAAiB,mCAAI,KAAK,IAClD,CAAC;QAEH,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,IAAA,mBAAW,EAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CACjE,SAAS,CAAC,IAAI,mBAAM,OAAO,EAAG,CAC/B,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAxBW,QAAA,WAAW,eAwBtB;AAEF;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC9B,KAA6B,EAC7B,GAAuB;IAEvB,MAAM,gBAAgB,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;IAClC,OAAO,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AT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC;IAC3B,CAAC;AACH,CAAC;AACD;;;;GAIG;AAEI,MAAM,iBAAiB,GAAG,CAAC,SASjC,EAAE,EAAE;IACH,OAAO,UAAU,SAAS,CAAC,MAAM,YAAY,SAAS,CAAC,MAAM,iBAAiB,SAAS,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,QAAQ,CAAC;AACtH,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type UniqueIdentifier } from '@dnd-kit/core';\nimport { arrayMove } from '@dnd-kit/sortable';\nimport { type RefObject } from 'react';\n\nimport { type FlattenedTreeItem, type TreeItem } from './tree-view-types';\n\nexport type SensorContext<T> = RefObject<{\n items: FlattenedTreeItem<T>[];\n offset: number;\n}>;\n\n/**\n * Takes a tree and flattens it into a list of item\n * where each item has a depth and a parentId.\n * @param tree - The tree to flatten\n * @param depth - The depth of the root of the tree (default 0)\n * @param parentId - The id of the parent of the root of the tree (default null)\n * @returns a list of items with depth and parentId\n */\nexport const flattenTree = <T>(\n tree: TreeItem<T>[],\n depth = 0,\n parentId: UniqueIdentifier | null = null,\n): FlattenedTreeItem<T>[] => {\n const flattened: FlattenedTreeItem<T>[] = [];\n\n tree.forEach((item) => {\n flattened.push({\n ...item,\n depth: depth,\n parentId: parentId,\n // Default values can go here for items\n isSkeletonLoading: item.isSkeletonLoading ?? false,\n });\n\n if (item.canHaveSubItems) {\n flattenTree(item.subItems, depth + 1, item.id).forEach((subItem) =>\n flattened.push({ ...subItem }),\n );\n }\n });\n\n return flattened;\n};\n\n/**\n * Removes the children of the items with the given ids\n * @param items - The flattened tree items to remove the children from\n * @param ids - The ids of the items to remove the children from\n * @returns a new list of items with the children of the items with the given ids removed\n */\nexport function removeChildrenOf<T>(\n items: FlattenedTreeItem<T>[],\n ids: UniqueIdentifier[],\n) {\n const excludeParentIds = [...ids];\n return items.filter((item) => {\n if (item.parentId !== null && excludeParentIds.includes(item.parentId)) {\n if (item.canHaveSubItems && item.subItems.length > 0) {\n excludeParentIds.push(item.id);\n }\n return false;\n }\n return true;\n });\n}\n\n/**\n * Builds a tree from a list of flattened tree items\n * @param items - The flattened tree items\n * @returns the items as a tree data structure\n */\nexport function buildTree<T>(items: FlattenedTreeItem<T>[]): TreeItem<T>[] {\n const tree: TreeItem<T>[] = [];\n\n // Map array to object\n const itemMap: { [id: string]: TreeItem<T> } = items.reduce(\n (newItemMap, item) => {\n const { id } = item;\n // Add sub items array if it's allowed to have sub items.\n const newItem = {\n // Keep all item properties\n ...item,\n ...(item.canHaveSubItems && {\n subItems: [],\n }),\n };\n return {\n ...newItemMap,\n [id]: newItem,\n };\n },\n {},\n );\n\n // Build the tree structure by assigning children to their parent items\n items.forEach((item) => {\n const { id, parentId } = item;\n if (parentId !== null) {\n const parentItem = itemMap[parentId];\n if (parentItem && parentItem.canHaveSubItems) {\n parentItem.subItems.push(itemMap[id]);\n }\n } else {\n tree.push(itemMap[id]);\n }\n });\n\n return tree;\n}\n\nfunction getDragDepth(offset: number, indentationWidth: number) {\n return Math.round(offset / indentationWidth);\n}\n\nfunction getMaxDepth<T>({\n previousItem,\n}: {\n previousItem: FlattenedTreeItem<T>;\n}) {\n if (previousItem && previousItem.canHaveSubItems === true) {\n return previousItem.depth + 1;\n }\n\n return previousItem?.depth ?? 0;\n}\n\nfunction getMinDepth<T>({ nextItem }: { nextItem: FlattenedTreeItem<T> }) {\n if (nextItem) {\n return nextItem.depth;\n }\n\n return 0;\n}\n\n/**\n * Calculates the new depth, max depth, min depth and parent id of the item being dragged\n * Used to project the position of the dragged item. For example, to convert the item being dragged into a placeholder.\n * such as the line that appears when dragging an item in a tree view.\n * @param items - The flattened tree items\n * @param activeId - The id of the item being dragged\n * @param overId - The id of the item that the dragged item is being dragged over\n * @param dragOffset - The offset of the drag in pixels\n * @param indentationWidth - The width of the indentation in pixels\n * @returns the depth, max depth, min depth and parent id of the item being dragged\n */\nexport function getProjection<T>(\n items: FlattenedTreeItem<T>[],\n activeId: UniqueIdentifier,\n overId: UniqueIdentifier,\n dragOffset: number,\n indentationWidth: number,\n) {\n const overItemIndex = items.findIndex(({ id }) => id === overId);\n const activeItemIndex = items.findIndex(({ id }) => id === activeId);\n const activeItem = items[activeItemIndex];\n const newItems = arrayMove(items, activeItemIndex, overItemIndex);\n const previousItem = newItems[overItemIndex - 1];\n const nextItem = newItems[overItemIndex + 1];\n const dragDepth = getDragDepth(dragOffset, indentationWidth);\n const projectedDepth = activeItem.depth + dragDepth;\n const maxDepth = getMaxDepth({\n previousItem,\n });\n const minDepth = getMinDepth({ nextItem });\n let depth = projectedDepth;\n\n if (projectedDepth >= maxDepth) {\n depth = maxDepth;\n } else if (projectedDepth < minDepth) {\n depth = minDepth;\n }\n\n return { depth, maxDepth, minDepth, parentId: getParentId() };\n\n function getParentId() {\n if (depth === 0 || !previousItem) {\n return null;\n }\n\n if (depth === previousItem.depth) {\n return previousItem.parentId;\n }\n\n if (depth > previousItem.depth) {\n return previousItem.id;\n }\n\n const newParent = newItems\n .slice(0, overItemIndex)\n .reverse()\n .find((item) => item.depth === depth)?.parentId;\n\n return newParent ?? null;\n }\n}\n/**\n *\n * @param transform - A transform object\n * @returns a css transform string\n */\n\nexport const transformToString = (transform: {\n scaleX: number;\n scaleY: number;\n // TODO v5: fix id-length\n // oxlint-disable-next-line id-length\n x: number;\n // TODO v5: fix id-length\n // oxlint-disable-next-line id-length\n y: number;\n}) => {\n return `scaleX(${transform.scaleX}) scaleY(${transform.scaleY}) translate3d(${transform.x}px, ${transform.y}px, 0)`;\n};\n"]}
1
+ {"version":3,"file":"tree-view-utils.js","sourceRoot":"","sources":["../../../src/tree-view/tree-view-utils.ts"],"names":[],"mappings":";;;AAuEA,4CAcC;AAOD,8BAqCC;AAqCD,sCAiDC;AAlMD,gDAA8C;AAU9C;;;;;;;GAOG;AACI,MAAM,WAAW,GAAG,CACzB,IAAmB,EACnB,KAAK,GAAG,CAAC,EACT,WAAoC,IAAI,EAChB,EAAE;IAC1B,MAAM,SAAS,GAA2B,EAAE,CAAC;IAE7C,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;;QACpB,SAAS,CAAC,IAAI,iCACT,IAAI,KACP,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ;YAClB,uCAAuC;YACvC,iBAAiB,EAAE,MAAA,IAAI,CAAC,iBAAiB,mCAAI,KAAK,IAClD,CAAC;QAEH,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,IAAA,mBAAW,EAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CACjE,SAAS,CAAC,IAAI,mBAAM,OAAO,EAAG,CAC/B,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAxBW,QAAA,WAAW,eAwBtB;AAEF;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC9B,KAA6B,EAC7B,GAAuB;IAEvB,MAAM,gBAAgB,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,gBAAgB,CA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,SAOjC,EAAE,EAAE;IACH,OAAO,UAAU,SAAS,CAAC,MAAM,YAAY,SAAS,CAAC,MAAM,iBAAiB,SAAS,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,QAAQ,CAAC;AACtH,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type UniqueIdentifier } from '@dnd-kit/core';\nimport { arrayMove } from '@dnd-kit/sortable';\nimport { type RefObject } from 'react';\n\nimport { type FlattenedTreeItem, type TreeItem } from './tree-view-types';\n\nexport type SensorContext<T> = RefObject<{\n items: FlattenedTreeItem<T>[];\n offset: number;\n}>;\n\n/**\n * Takes a tree and flattens it into a list of item\n * where each item has a depth and a parentId.\n * @param tree - The tree to flatten\n * @param depth - The depth of the root of the tree (default 0)\n * @param parentId - The id of the parent of the root of the tree (default null)\n * @returns a list of items with depth and parentId\n */\nexport const flattenTree = <T>(\n tree: TreeItem<T>[],\n depth = 0,\n parentId: UniqueIdentifier | null = null,\n): FlattenedTreeItem<T>[] => {\n const flattened: FlattenedTreeItem<T>[] = [];\n\n tree.forEach((item) => {\n flattened.push({\n ...item,\n depth: depth,\n parentId: parentId,\n // Default values can go here for items\n isSkeletonLoading: item.isSkeletonLoading ?? false,\n });\n\n if (item.canHaveSubItems) {\n flattenTree(item.subItems, depth + 1, item.id).forEach((subItem) =>\n flattened.push({ ...subItem }),\n );\n }\n });\n\n return flattened;\n};\n\n/**\n * Removes the children of the items with the given ids\n * @param items - The flattened tree items to remove the children from\n * @param ids - The ids of the items to remove the children from\n * @returns a new list of items with the children of the items with the given ids removed\n */\nexport function removeChildrenOf<T>(\n items: FlattenedTreeItem<T>[],\n ids: UniqueIdentifier[],\n) {\n const excludeParentIds = [...ids];\n return items.filter((item) => {\n if (item.parentId !== null && excludeParentIds.includes(item.parentId)) {\n if (item.canHaveSubItems && item.subItems.length > 0) {\n excludeParentIds.push(item.id);\n }\n return false;\n }\n return true;\n });\n}\n\n/**\n * Builds a tree from a list of flattened tree items\n * @param items - The flattened tree items\n * @returns the items as a tree data structure\n */\nexport function buildTree<T>(items: FlattenedTreeItem<T>[]): TreeItem<T>[] {\n const tree: TreeItem<T>[] = [];\n\n // Map array to object\n const itemMap: { [id: string]: TreeItem<T> } = items.reduce(\n (newItemMap, item) => {\n const { id } = item;\n // Add sub items array if it's allowed to have sub items.\n const newItem = {\n // Keep all item properties\n ...item,\n ...(item.canHaveSubItems && {\n subItems: [],\n }),\n };\n return {\n ...newItemMap,\n [id]: newItem,\n };\n },\n {},\n );\n\n // Build the tree structure by assigning children to their parent items\n items.forEach((item) => {\n const { id, parentId } = item;\n if (parentId !== null) {\n const parentItem = itemMap[parentId];\n if (parentItem && parentItem.canHaveSubItems) {\n parentItem.subItems.push(itemMap[id]);\n }\n } else {\n tree.push(itemMap[id]);\n }\n });\n\n return tree;\n}\n\nfunction getDragDepth(offset: number, indentationWidth: number) {\n return Math.round(offset / indentationWidth);\n}\n\nfunction getMaxDepth<T>({\n previousItem,\n}: {\n previousItem: FlattenedTreeItem<T>;\n}) {\n if (previousItem && previousItem.canHaveSubItems === true) {\n return previousItem.depth + 1;\n }\n\n return previousItem?.depth ?? 0;\n}\n\nfunction getMinDepth<T>({ nextItem }: { nextItem: FlattenedTreeItem<T> }) {\n if (nextItem) {\n return nextItem.depth;\n }\n\n return 0;\n}\n\n/**\n * Calculates the new depth, max depth, min depth and parent id of the item being dragged\n * Used to project the position of the dragged item. For example, to convert the item being dragged into a placeholder.\n * such as the line that appears when dragging an item in a tree view.\n * @param items - The flattened tree items\n * @param activeId - The id of the item being dragged\n * @param overId - The id of the item that the dragged item is being dragged over\n * @param dragOffset - The offset of the drag in pixels\n * @param indentationWidth - The width of the indentation in pixels\n * @returns the depth, max depth, min depth and parent id of the item being dragged\n */\nexport function getProjection<T>(\n items: FlattenedTreeItem<T>[],\n activeId: UniqueIdentifier,\n overId: UniqueIdentifier,\n dragOffset: number,\n indentationWidth: number,\n) {\n const overItemIndex = items.findIndex(({ id }) => id === overId);\n const activeItemIndex = items.findIndex(({ id }) => id === activeId);\n const activeItem = items[activeItemIndex];\n const newItems = arrayMove(items, activeItemIndex, overItemIndex);\n const previousItem = newItems[overItemIndex - 1];\n const nextItem = newItems[overItemIndex + 1];\n const dragDepth = getDragDepth(dragOffset, indentationWidth);\n const projectedDepth = activeItem.depth + dragDepth;\n const maxDepth = getMaxDepth({\n previousItem,\n });\n const minDepth = getMinDepth({ nextItem });\n let depth = projectedDepth;\n\n if (projectedDepth >= maxDepth) {\n depth = maxDepth;\n } else if (projectedDepth < minDepth) {\n depth = minDepth;\n }\n\n return { depth, maxDepth, minDepth, parentId: getParentId() };\n\n function getParentId() {\n if (depth === 0 || !previousItem) {\n return null;\n }\n\n if (depth === previousItem.depth) {\n return previousItem.parentId;\n }\n\n if (depth > previousItem.depth) {\n return previousItem.id;\n }\n\n const newParent = newItems\n .slice(0, overItemIndex)\n .reverse()\n .find((item) => item.depth === depth)?.parentId;\n\n return newParent ?? null;\n }\n}\n/**\n *\n * @param transform - A transform object\n * @returns a css transform string\n */\n\nexport const transformToString = (transform: {\n scaleX: number;\n scaleY: number;\n // oxlint-disable-next-line id-length\n x: number;\n // oxlint-disable-next-line id-length\n y: number;\n}) => {\n return `scaleX(${transform.scaleX}) scaleY(${transform.scaleY}) translate3d(${transform.x}px, ${transform.y}px, 0)`;\n};\n"]}
@@ -38,9 +38,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.Typography = void 0;
39
39
  const jsx_runtime_1 = require("react/jsx-runtime");
40
40
  const classnames_1 = __importDefault(require("classnames"));
41
+ /**
42
+ * @remarks
43
+ * Renders the public `ndl-typography-<variant>` class from `@neo4j-ndl/base`
44
+ * (for example `ndl-typography-body-medium`). The same classes can be applied
45
+ * to any element directly when the component cannot be used.
46
+ */
41
47
  const Typography = (props) => {
42
48
  const { as, className = '', children, variant, htmlAttributes, ref } = props, restProps = __rest(props, ["as", "className", "children", "variant", "htmlAttributes", "ref"]);
43
- const classes = (0, classnames_1.default)(`n-${variant}`, className);
49
+ const classes = (0, classnames_1.default)(`ndl-typography-${variant}`, className);
44
50
  const Component = as !== null && as !== void 0 ? as : 'span';
45
51
  return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, ref: ref }, restProps, htmlAttributes, { children: children })));
46
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../src/typography/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,4DAAoC;AAa7B,MAAM,UAAU,GAAG,CACxB,KAAiD,EACtB,EAAE;IAC7B,MAAM,EACJ,EAAE,EACF,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,OAAO,EACP,cAAc,EACd,GAAG,KAED,KAAK,EADJ,SAAS,UACV,KAAK,EARH,mEAQL,CAAQ,CAAC;IAEV,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,KAAK,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,MAAM,CAAC;IAE/B,OAAO,CACL,uBAAC,SAAS,kBAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,IAAM,SAAS,EAAM,cAAc,cACvE,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,UAAU,cAqBrB","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\nexport type TypographyVariants = keyof typeof tokens.typography;\n\ntype TypographyProps = {\n /** The typography variant to use for the text. */\n variant: TypographyVariants;\n /** Content displayed inside the component */\n children?: React.ReactNode;\n};\n\nexport const Typography = <T extends React.ElementType = 'span'>(\n props: PolymorphicCommonProps<T, TypographyProps>,\n): React.ReactElement | null => {\n const {\n as,\n className = '',\n children,\n variant,\n htmlAttributes,\n ref,\n ...restProps\n } = props;\n\n const classes = classNames(`n-${variant}`, className);\n const Component = as ?? 'span';\n\n return (\n <Component className={classes} ref={ref} {...restProps} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../src/typography/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,4DAAoC;AAapC;;;;;GAKG;AACI,MAAM,UAAU,GAAG,CACxB,KAAiD,EACtB,EAAE;IAC7B,MAAM,EACJ,EAAE,EACF,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,OAAO,EACP,cAAc,EACd,GAAG,KAED,KAAK,EADJ,SAAS,UACV,KAAK,EARH,mEAQL,CAAQ,CAAC;IAEV,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kBAAkB,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,MAAM,CAAC;IAE/B,OAAO,CACL,uBAAC,SAAS,kBAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,IAAM,SAAS,EAAM,cAAc,cACvE,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,UAAU,cAqBrB","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\nexport type TypographyVariants = keyof typeof tokens.typography;\n\ntype TypographyProps = {\n /** The typography variant to use for the text. */\n variant: TypographyVariants;\n /** Content displayed inside the component */\n children?: React.ReactNode;\n};\n\n/**\n * @remarks\n * Renders the public `ndl-typography-<variant>` class from `@neo4j-ndl/base`\n * (for example `ndl-typography-body-medium`). The same classes can be applied\n * to any element directly when the component cannot be used.\n */\nexport const Typography = <T extends React.ElementType = 'span'>(\n props: PolymorphicCommonProps<T, TypographyProps>,\n): React.ReactElement | null => {\n const {\n as,\n className = '',\n children,\n variant,\n htmlAttributes,\n ref,\n ...restProps\n } = props;\n\n const classes = classNames(`ndl-typography-${variant}`, className);\n const Component = as ?? 'span';\n\n return (\n <Component className={classes} ref={ref} {...restProps} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n"]}
@@ -25,7 +25,7 @@
25
25
  */
26
26
  export { getWeight, lerpColor } from './color-utils';
27
27
  export { parseDateString, parseLocalDateString, parseTimeString, } from './date-utils';
28
- export { BigintLiteralSchema, DatetimeLiteralSchema, isDatetimeLiteral, isLocalDatetimeLiteral, isTimeLiteral, LocalDatetimeLiteralSchema, NumericLiteralSchema, RangeLiteralSchema, TimeLiteralSchema, } from './literal-schemas';
28
+ export { isDatetimeLiteral, isLocalDatetimeLiteral, isTimeLiteral, } from './literal-guards';
29
29
  export { clampNumericValue, compareNumericValues, getNumericWeight, isBigintLiteral, numericValuesEqual, resolveNumericLiteral, } from './numeric-utils';
30
30
  export { resolveRangeLiteral } from './range-utils';
31
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nexport { getWeight, lerpColor } from './color-utils';\nexport {\n parseDateString,\n parseLocalDateString,\n parseTimeString,\n} from './date-utils';\nexport {\n BigintLiteralSchema,\n DatetimeLiteralSchema,\n isDatetimeLiteral,\n isLocalDatetimeLiteral,\n isTimeLiteral,\n LocalDatetimeLiteralSchema,\n NumericLiteralSchema,\n RangeLiteralSchema,\n TimeLiteralSchema,\n} from './literal-schemas';\nexport type {\n BigintLiteral,\n DatetimeLiteral,\n LocalDatetimeLiteral,\n NumericLiteral,\n RangeLiteral,\n TimeLiteral,\n} from './literal-schemas';\nexport {\n clampNumericValue,\n compareNumericValues,\n getNumericWeight,\n isBigintLiteral,\n numericValuesEqual,\n resolveNumericLiteral,\n} from './numeric-utils';\nexport type { NumericValue } from './numeric-utils';\nexport { resolveRangeLiteral } from './range-utils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAS1B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nexport { getWeight, lerpColor } from './color-utils';\nexport {\n parseDateString,\n parseLocalDateString,\n parseTimeString,\n} from './date-utils';\nexport {\n isDatetimeLiteral,\n isLocalDatetimeLiteral,\n isTimeLiteral,\n} from './literal-guards';\nexport type {\n BigintLiteral,\n DatetimeLiteral,\n LocalDatetimeLiteral,\n NumericLiteral,\n RangeLiteral,\n TimeLiteral,\n} from './literal-types';\nexport {\n clampNumericValue,\n compareNumericValues,\n getNumericWeight,\n isBigintLiteral,\n numericValuesEqual,\n resolveNumericLiteral,\n} from './numeric-utils';\nexport type { NumericValue } from './numeric-utils';\nexport { resolveRangeLiteral } from './range-utils';\n"]}
@@ -0,0 +1,45 @@
1
+ /*!
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+
22
+ /*
23
+ * AUTO-GENERATED FILE — DO NOT EDIT.
24
+ * Source of truth: packages/style-rules/src/
25
+ * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).
26
+ */
27
+ function isObjectWithStringKey(value, key) {
28
+ return (typeof value === 'object' &&
29
+ value !== null &&
30
+ key in value &&
31
+ typeof value[key] === 'string');
32
+ }
33
+ /** Returns whether a value is a `{ datetime: string }` wrapper. Does not validate the string. */
34
+ export function isDatetimeLiteral(value) {
35
+ return isObjectWithStringKey(value, 'datetime');
36
+ }
37
+ /** Returns whether a value is a `{ localdatetime: string }` wrapper. Does not validate the string. */
38
+ export function isLocalDatetimeLiteral(value) {
39
+ return isObjectWithStringKey(value, 'localdatetime');
40
+ }
41
+ /** Returns whether a value is a `{ time: string }` wrapper. Does not validate the string. */
42
+ export function isTimeLiteral(value) {
43
+ return isObjectWithStringKey(value, 'time');
44
+ }
45
+ //# sourceMappingURL=literal-guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literal-guards.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/literal-guards.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA6BH,SAAS,qBAAqB,CAC5B,KAAc,EACd,GAAM;IAEN,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,GAAG,IAAI,KAAK;QACZ,OAAQ,KAAiC,CAAC,GAAG,CAAC,KAAK,QAAQ,CAC5D,CAAC;AACJ,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClD,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,sBAAsB,CACpC,KAAc;IAEd,OAAO,qBAAqB,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;AACvD,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type {\n DatetimeLiteral,\n LocalDatetimeLiteral,\n TimeLiteral,\n} from './literal-types';\n\nfunction isObjectWithStringKey<K extends string>(\n value: unknown,\n key: K,\n): value is Record<K, string> {\n return (\n typeof value === 'object' &&\n value !== null &&\n key in value &&\n typeof (value as Record<string, unknown>)[key] === 'string'\n );\n}\n\n/** Returns whether a value is a `{ datetime: string }` wrapper. Does not validate the string. */\nexport function isDatetimeLiteral(value: unknown): value is DatetimeLiteral {\n return isObjectWithStringKey(value, 'datetime');\n}\n\n/** Returns whether a value is a `{ localdatetime: string }` wrapper. Does not validate the string. */\nexport function isLocalDatetimeLiteral(\n value: unknown,\n): value is LocalDatetimeLiteral {\n return isObjectWithStringKey(value, 'localdatetime');\n}\n\n/** Returns whether a value is a `{ time: string }` wrapper. Does not validate the string. */\nexport function isTimeLiteral(value: unknown): value is TimeLiteral {\n return isObjectWithStringKey(value, 'time');\n}\n"]}
@@ -25,6 +25,12 @@
25
25
  */
26
26
  import { z } from 'zod';
27
27
  import { parseDateString, parseLocalDateString, parseTimeString, } from './date-utils';
28
+ /*
29
+ * Internal only. These schemas are the runtime backing for the style-rule type
30
+ * guards; the public contract is the hand-written types in `literal-types.ts`.
31
+ * Do NOT re-export these schemas from this package or from any consumer's
32
+ * public entry point.
33
+ */
28
34
  /**
29
35
  * A JSON-safe bigint literal. Native bigint values cannot be serialized as
30
36
  * JSON, so persisted style rules can use a signed decimal string instead.
@@ -93,24 +99,6 @@ export const TimeLiteralSchema = z.object({
93
99
  message: 'time must be a valid ISO 8601 time string (e.g. "14:30:00" or "14:30:00+02:00")',
94
100
  }),
95
101
  });
96
- function isObjectWithStringKey(value, key) {
97
- return (typeof value === 'object' &&
98
- value !== null &&
99
- key in value &&
100
- typeof value[key] === 'string');
101
- }
102
- /** Returns whether a value is a `{ datetime: string }` wrapper. Does not validate the string. */
103
- export function isDatetimeLiteral(value) {
104
- return isObjectWithStringKey(value, 'datetime');
105
- }
106
- /** Returns whether a value is a `{ localdatetime: string }` wrapper. Does not validate the string. */
107
- export function isLocalDatetimeLiteral(value) {
108
- return isObjectWithStringKey(value, 'localdatetime');
109
- }
110
- /** Returns whether a value is a `{ time: string }` wrapper. Does not validate the string. */
111
- export function isTimeLiteral(value) {
112
- return isObjectWithStringKey(value, 'time');
113
- }
114
102
  /**
115
103
  * A continuous, orderable literal that can be used as a range boundary.
116
104
  * Temporal literals resolve to numbers before range interpolation.
@@ -1 +1 @@
1
- {"version":3,"file":"literal-schemas.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/literal-schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO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CAAC;CACH,CAAC,CAAC;AAGH,SAAS,qBAAqB,CAC5B,KAAc,EACd,GAAM;IAEN,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,GAAG,IAAI,KAAK;QACZ,OAAQ,KAAiC,CAAC,GAAG,CAAC,KAAK,QAAQ,CAC5D,CAAC;AACJ,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClD,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,sBAAsB,CACpC,KAAc;IAEd,OAAO,qBAAqB,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;AACvD,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC;IACxC,oBAAoB;IACpB,qBAAqB;IACrB,0BAA0B;IAC1B,iBAAiB;CAClB,CAAC,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { z } from 'zod';\n\nimport {\n parseDateString,\n parseLocalDateString,\n parseTimeString,\n} from './date-utils';\n\n/**\n * A JSON-safe bigint literal. Native bigint values cannot be serialized as\n * JSON, so persisted style rules can use a signed decimal string instead.\n */\nexport const BigintLiteralSchema = z.object({\n bigint: z.string().regex(/^[+-]?\\d+$/, {\n message: 'bigint must be a signed decimal integer string',\n }),\n});\nexport type BigintLiteral = z.infer<typeof BigintLiteralSchema>;\n\n/** A numeric style-rule literal, including native and JSON-safe bigints. */\nexport const NumericLiteralSchema = z.union([\n z.number(),\n z.bigint(),\n BigintLiteralSchema,\n]);\nexport type NumericLiteral = z.infer<typeof NumericLiteralSchema>;\n\n/**\n * An ISO 8601 or RFC 9557 datetime literal that resolves to a Unix millisecond\n * timestamp at evaluation time. Supported formats:\n * - RFC 9557 with IANA timezone: `\"2024-06-15T14:00:00[Europe/Stockholm]\"` (offset\n * inferred from the named zone, DST-aware) or `\"2024-06-15T14:00:00+02:00[Europe/Stockholm]\"`\n * (offset explicit)\n * - UTC or offset datetime: `\"2024-01-01T00:00:00Z\"`, `\"2024-01-01T00:00:00+02:00\"`\n * - Plain datetime (treated as UTC): `\"2024-01-01T14:30:00\"`, `\"2024-01-01T14:30:00.500\"`\n * - Date-only (treated as UTC midnight): `\"2024-01-01\"`\n */\nexport const DatetimeLiteralSchema = z.object({\n datetime: z.string().refine((input) => parseDateString(input) !== null, {\n message:\n 'datetime must be a valid ISO 8601 / RFC 9557 date or datetime string',\n }),\n});\nexport type DatetimeLiteral = z.infer<typeof DatetimeLiteralSchema>;\n\n/**\n * A plain (unzoned) ISO 8601 date or datetime literal that resolves to a Unix\n * millisecond timestamp at evaluation time, interpreting the wall-clock time\n * in the browser's local timezone.\n *\n * Only plain date/datetime strings without timezone qualifiers are accepted:\n * - Plain datetime: `\"2024-01-01T14:30:00\"`, `\"2024-01-01T14:30:00.500\"`\n * - Date-only (treated as local midnight): `\"2024-01-01\"`\n *\n * Strings with `Z`, a UTC offset (`+02:00`), or an IANA bracket\n * (`[Europe/Stockholm]`) are **rejected** — use `{ datetime }` for\n * timezone-aware instants. This matches the semantics of Neo4j `LocalDateTime`.\n */\nexport const LocalDatetimeLiteralSchema = z.object({\n localdatetime: z\n .string()\n .refine((input) => parseLocalDateString(input) !== null, {\n message:\n 'localdatetime must be a valid ISO 8601 plain date or datetime string (no Z, offset, or timezone)',\n }),\n});\nexport type LocalDatetimeLiteral = z.infer<typeof LocalDatetimeLiteralSchema>;\n\n/**\n * An ISO 8601 time literal that resolves to milliseconds since UTC midnight\n * at evaluation time. Supported formats:\n * - Local time (treated as UTC): `\"14:30:00\"`, `\"14:30:00.500\"`\n * - UTC time: `\"14:30:00Z\"` — identical to local form\n * - Offset time (UTC-normalised): `\"14:30:00+02:00\"` → 45,000,000 ms (12:30 UTC)\n *\n * IANA timezone brackets (e.g. `[Europe/Stockholm]`) are **not** accepted — a\n * time-of-day value has no calendar date so DST cannot be resolved. Use\n * `{ datetime }` literals for timezone-aware instants.\n *\n * Full datetime strings (containing `T`) are rejected.\n */\nexport const TimeLiteralSchema = z.object({\n time: z.string().refine((input) => parseTimeString(input) !== null, {\n message:\n 'time must be a valid ISO 8601 time string (e.g. \"14:30:00\" or \"14:30:00+02:00\")',\n }),\n});\nexport type TimeLiteral = z.infer<typeof TimeLiteralSchema>;\n\nfunction isObjectWithStringKey<K extends string>(\n value: unknown,\n key: K,\n): value is Record<K, string> {\n return (\n typeof value === 'object' &&\n value !== null &&\n key in value &&\n typeof (value as Record<string, unknown>)[key] === 'string'\n );\n}\n\n/** Returns whether a value is a `{ datetime: string }` wrapper. Does not validate the string. */\nexport function isDatetimeLiteral(value: unknown): value is DatetimeLiteral {\n return isObjectWithStringKey(value, 'datetime');\n}\n\n/** Returns whether a value is a `{ localdatetime: string }` wrapper. Does not validate the string. */\nexport function isLocalDatetimeLiteral(\n value: unknown,\n): value is LocalDatetimeLiteral {\n return isObjectWithStringKey(value, 'localdatetime');\n}\n\n/** Returns whether a value is a `{ time: string }` wrapper. Does not validate the string. */\nexport function isTimeLiteral(value: unknown): value is TimeLiteral {\n return isObjectWithStringKey(value, 'time');\n}\n\n/**\n * A continuous, orderable literal that can be used as a range boundary.\n * Temporal literals resolve to numbers before range interpolation.\n */\nexport const RangeLiteralSchema = z.union([\n NumericLiteralSchema,\n DatetimeLiteralSchema,\n LocalDatetimeLiteralSchema,\n TimeLiteralSchema,\n]);\nexport type RangeLiteral = z.infer<typeof RangeLiteralSchema>;\n"]}
1
+ {"version":3,"file":"literal-schemas.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/literal-schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AAUtB;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE;QACrC,OAAO,EAAE,gDAAgD;KAC1D,CAAC;CACH,CAAoC,CAAC;AAEtC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,MAAM,EAAE;IACV,mBAAmB;CACpB,CAAqC,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QACtE,OAAO,EACL,sEAAsE;KACzE,CAAC;CACH,CAAsC,CAAC;AAExC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QACvD,OAAO,EACL,kGAAkG;KACrG,CAAC;CACL,CAA2C,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAClE,OAAO,EACL,iFAAiF;KACpF,CAAC;CACH,CAAkC,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC;IACxC,oBAAoB;IACpB,qBAAqB;IACrB,0BAA0B;IAC1B,iBAAiB;CAClB,CAAmC,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { z } from 'zod';\n\nimport {\n parseDateString,\n parseLocalDateString,\n parseTimeString,\n} from './date-utils';\nimport type {\n BigintLiteral,\n DatetimeLiteral,\n LocalDatetimeLiteral,\n NumericLiteral,\n RangeLiteral,\n TimeLiteral,\n} from './literal-types';\n\n/*\n * Internal only. These schemas are the runtime backing for the style-rule type\n * guards; the public contract is the hand-written types in `literal-types.ts`.\n * Do NOT re-export these schemas from this package or from any consumer's\n * public entry point.\n */\n\n/**\n * A JSON-safe bigint literal. Native bigint values cannot be serialized as\n * JSON, so persisted style rules can use a signed decimal string instead.\n */\nexport const BigintLiteralSchema = z.object({\n bigint: z.string().regex(/^[+-]?\\d+$/, {\n message: 'bigint must be a signed decimal integer string',\n }),\n}) satisfies z.ZodType<BigintLiteral>;\n\n/** A numeric style-rule literal, including native and JSON-safe bigints. */\nexport const NumericLiteralSchema = z.union([\n z.number(),\n z.bigint(),\n BigintLiteralSchema,\n]) satisfies z.ZodType<NumericLiteral>;\n\n/**\n * An ISO 8601 or RFC 9557 datetime literal that resolves to a Unix millisecond\n * timestamp at evaluation time. Supported formats:\n * - RFC 9557 with IANA timezone: `\"2024-06-15T14:00:00[Europe/Stockholm]\"` (offset\n * inferred from the named zone, DST-aware) or `\"2024-06-15T14:00:00+02:00[Europe/Stockholm]\"`\n * (offset explicit)\n * - UTC or offset datetime: `\"2024-01-01T00:00:00Z\"`, `\"2024-01-01T00:00:00+02:00\"`\n * - Plain datetime (treated as UTC): `\"2024-01-01T14:30:00\"`, `\"2024-01-01T14:30:00.500\"`\n * - Date-only (treated as UTC midnight): `\"2024-01-01\"`\n */\nexport const DatetimeLiteralSchema = z.object({\n datetime: z.string().refine((input) => parseDateString(input) !== null, {\n message:\n 'datetime must be a valid ISO 8601 / RFC 9557 date or datetime string',\n }),\n}) satisfies z.ZodType<DatetimeLiteral>;\n\n/**\n * A plain (unzoned) ISO 8601 date or datetime literal that resolves to a Unix\n * millisecond timestamp at evaluation time, interpreting the wall-clock time\n * in the browser's local timezone.\n *\n * Only plain date/datetime strings without timezone qualifiers are accepted:\n * - Plain datetime: `\"2024-01-01T14:30:00\"`, `\"2024-01-01T14:30:00.500\"`\n * - Date-only (treated as local midnight): `\"2024-01-01\"`\n *\n * Strings with `Z`, a UTC offset (`+02:00`), or an IANA bracket\n * (`[Europe/Stockholm]`) are **rejected** — use `{ datetime }` for\n * timezone-aware instants. This matches the semantics of Neo4j `LocalDateTime`.\n */\nexport const LocalDatetimeLiteralSchema = z.object({\n localdatetime: z\n .string()\n .refine((input) => parseLocalDateString(input) !== null, {\n message:\n 'localdatetime must be a valid ISO 8601 plain date or datetime string (no Z, offset, or timezone)',\n }),\n}) satisfies z.ZodType<LocalDatetimeLiteral>;\n\n/**\n * An ISO 8601 time literal that resolves to milliseconds since UTC midnight\n * at evaluation time. Supported formats:\n * - Local time (treated as UTC): `\"14:30:00\"`, `\"14:30:00.500\"`\n * - UTC time: `\"14:30:00Z\"` — identical to local form\n * - Offset time (UTC-normalised): `\"14:30:00+02:00\"` → 45,000,000 ms (12:30 UTC)\n *\n * IANA timezone brackets (e.g. `[Europe/Stockholm]`) are **not** accepted — a\n * time-of-day value has no calendar date so DST cannot be resolved. Use\n * `{ datetime }` literals for timezone-aware instants.\n *\n * Full datetime strings (containing `T`) are rejected.\n */\nexport const TimeLiteralSchema = z.object({\n time: z.string().refine((input) => parseTimeString(input) !== null, {\n message:\n 'time must be a valid ISO 8601 time string (e.g. \"14:30:00\" or \"14:30:00+02:00\")',\n }),\n}) satisfies z.ZodType<TimeLiteral>;\n\n/**\n * A continuous, orderable literal that can be used as a range boundary.\n * Temporal literals resolve to numbers before range interpolation.\n */\nexport const RangeLiteralSchema = z.union([\n NumericLiteralSchema,\n DatetimeLiteralSchema,\n LocalDatetimeLiteralSchema,\n TimeLiteralSchema,\n]) satisfies z.ZodType<RangeLiteral>;\n"]}
@@ -18,5 +18,11 @@
18
18
  * You should have received a copy of the GNU General Public License
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
- export { TextOverflow } from './TextOverflow';
22
- //# sourceMappingURL=index.js.map
21
+
22
+ /*
23
+ * AUTO-GENERATED FILE — DO NOT EDIT.
24
+ * Source of truth: packages/style-rules/src/
25
+ * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).
26
+ */
27
+ export {};
28
+ //# sourceMappingURL=literal-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literal-types.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/literal-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * A JSON-safe bigint literal. Native bigint values cannot be serialized as\n * JSON, so persisted style rules can use a signed decimal string instead.\n */\nexport type BigintLiteral = { bigint: string };\n\n/** A numeric style-rule literal, including native and JSON-safe bigints. */\nexport type NumericLiteral = number | bigint | BigintLiteral;\n\n/**\n * An ISO 8601 or RFC 9557 datetime literal that resolves to a Unix millisecond\n * timestamp at evaluation time. Supported formats:\n * - RFC 9557 with IANA timezone: `\"2024-06-15T14:00:00[Europe/Stockholm]\"` (offset\n * inferred from the named zone, DST-aware) or `\"2024-06-15T14:00:00+02:00[Europe/Stockholm]\"`\n * (offset explicit)\n * - UTC or offset datetime: `\"2024-01-01T00:00:00Z\"`, `\"2024-01-01T00:00:00+02:00\"`\n * - Plain datetime (treated as UTC): `\"2024-01-01T14:30:00\"`, `\"2024-01-01T14:30:00.500\"`\n * - Date-only (treated as UTC midnight): `\"2024-01-01\"`\n */\nexport type DatetimeLiteral = { datetime: string };\n\n/**\n * A plain (unzoned) ISO 8601 date or datetime literal that resolves to a Unix\n * millisecond timestamp at evaluation time, interpreting the wall-clock time\n * in the browser's local timezone.\n *\n * Only plain date/datetime strings without timezone qualifiers are accepted:\n * - Plain datetime: `\"2024-01-01T14:30:00\"`, `\"2024-01-01T14:30:00.500\"`\n * - Date-only (treated as local midnight): `\"2024-01-01\"`\n *\n * Strings with `Z`, a UTC offset (`+02:00`), or an IANA bracket\n * (`[Europe/Stockholm]`) are **rejected** — use `{ datetime }` for\n * timezone-aware instants. This matches the semantics of Neo4j `LocalDateTime`.\n */\nexport type LocalDatetimeLiteral = { localdatetime: string };\n\n/**\n * An ISO 8601 time literal that resolves to milliseconds since UTC midnight\n * at evaluation time. Supported formats:\n * - Local time (treated as UTC): `\"14:30:00\"`, `\"14:30:00.500\"`\n * - UTC time: `\"14:30:00Z\"` — identical to local form\n * - Offset time (UTC-normalised): `\"14:30:00+02:00\"` → 45,000,000 ms (12:30 UTC)\n *\n * IANA timezone brackets (e.g. `[Europe/Stockholm]`) are **not** accepted — a\n * time-of-day value has no calendar date so DST cannot be resolved. Use\n * `{ datetime }` literals for timezone-aware instants.\n *\n * Full datetime strings (containing `T`) are rejected.\n */\nexport type TimeLiteral = { time: string };\n\n/**\n * A continuous, orderable literal that can be used as a range boundary.\n * Temporal literals resolve to numbers before range interpolation.\n */\nexport type RangeLiteral =\n | NumericLiteral\n | DatetimeLiteral\n | LocalDatetimeLiteral\n | TimeLiteral;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"numeric-utils.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/numeric-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgCH,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,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CAAC;IACxC,MAAM,UAAU,GACd,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC;IAExE,OAAO,aAAa,CAClB,UAAU,GAAG,GAAG,CAAC,WAAW,EAC5B,OAAO,CAAC,WAAW,GAAG,UAAU,CACjC,CAAC;AACJ,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { BigintLiteral, NumericLiteral } from './literal-schemas';\n\nexport type NumericValue = number | bigint;\n\ntype Rational = {\n denominator: bigint;\n numerator: bigint;\n};\n\nconst BIGINT_ZERO = BigInt(0);\nconst BIGINT_ONE = BigInt(1);\nconst BIGINT_TWO = BigInt(2);\nconst BIGINT_RATIO_SCALE = BigInt('1000000000000000000');\n\nfunction bigintPowerOfTen(exponent: number): bigint {\n return BigInt(`1${'0'.repeat(exponent)}`);\n}\n\n/** Resolves a native or JSON-safe numeric literal without reducing bigints. */\nexport function resolveNumericLiteral(value: NumericLiteral): NumericValue {\n return typeof value === 'object' ? BigInt(value.bigint) : value;\n}\n\n/** Returns whether a value is the JSON-safe bigint literal shape. */\nexport function isBigintLiteral(value: unknown): value is BigintLiteral {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'bigint' in value &&\n typeof value.bigint === 'string' &&\n /^[+-]?\\d+$/.test(value.bigint)\n );\n}\n\n/**\n * Compares numeric values without coercing bigint operands to number.\n * Returns null for NaN, otherwise -1, 0, or 1.\n */\nexport function compareNumericValues(\n left: NumericValue,\n right: NumericValue,\n): -1 | 0 | 1 | null {\n if (\n (typeof left === 'number' && Number.isNaN(left)) ||\n (typeof right === 'number' && Number.isNaN(right))\n ) {\n return null;\n }\n if (left < right) {\n return -1;\n }\n if (left > right) {\n return 1;\n }\n return 0;\n}\n\n/** Numeric equality that treats equivalent number and bigint values as equal. */\nexport function numericValuesEqual(\n left: NumericValue,\n right: NumericValue,\n): boolean {\n return compareNumericValues(left, right) === 0;\n}\n\n/**\n * Clamps a numeric value between two endpoints. Inverted endpoints are\n * supported, and the original number/bigint representation is retained.\n */\nexport function clampNumericValue(\n value: NumericValue,\n firstBound: NumericValue,\n secondBound: NumericValue,\n): NumericValue | null {\n const boundsOrder = compareNumericValues(firstBound, secondBound);\n if (boundsOrder === null) {\n return null;\n }\n const min = boundsOrder <= 0 ? firstBound : secondBound;\n const max = boundsOrder <= 0 ? secondBound : firstBound;\n const minOrder = compareNumericValues(value, min);\n const maxOrder = compareNumericValues(value, max);\n if (minOrder === null || maxOrder === null) {\n return null;\n }\n if (minOrder < 0) {\n return min;\n }\n if (maxOrder > 0) {\n return max;\n }\n return value;\n}\n\nfunction numberToRational(value: number): Rational | null {\n if (!Number.isFinite(value)) {\n return null;\n }\n\n const match = /^([+-]?)(\\d+)(?:\\.(\\d+))?(?:e([+-]?\\d+))?$/i.exec(\n value.toString(),\n );\n if (!match) {\n return null;\n }\n\n const [, sign, integer, fraction = '', exponentText = '0'] = match;\n const exponent = Number(exponentText) - fraction.length;\n const digits = BigInt(`${sign}${integer}${fraction}`);\n if (exponent >= 0) {\n return {\n denominator: BIGINT_ONE,\n numerator: digits * bigintPowerOfTen(exponent),\n };\n }\n return {\n denominator: bigintPowerOfTen(-exponent),\n numerator: digits,\n };\n}\n\nfunction toRational(value: NumericValue): Rational | null {\n return typeof value === 'bigint'\n ? { denominator: BIGINT_ONE, numerator: value }\n : numberToRational(value);\n}\n\nfunction divideBigints(numerator: bigint, denominator: bigint): number | null {\n if (denominator === BIGINT_ZERO) {\n return null;\n }\n\n const isNegative = numerator < BIGINT_ZERO !== denominator < BIGINT_ZERO;\n const absoluteNumerator = numerator < BIGINT_ZERO ? -numerator : numerator;\n const absoluteDenominator =\n denominator < BIGINT_ZERO ? -denominator : denominator;\n const integer = absoluteNumerator / absoluteDenominator;\n const remainder = absoluteNumerator % absoluteDenominator;\n const fraction =\n (remainder * BIGINT_RATIO_SCALE + absoluteDenominator / BIGINT_TWO) /\n absoluteDenominator;\n const result =\n Number(integer) + Number(fraction) / Number(BIGINT_RATIO_SCALE);\n\n return isNegative ? -result : result;\n}\n\n/**\n * Computes `(value - startValue) / (endValue - startValue)` while retaining\n * bigint precision. Only the final dimensionless interpolation weight is\n * converted to number.\n */\nexport function getNumericWeight(\n startValue: NumericValue,\n endValue: NumericValue,\n value: NumericValue,\n): number | null {\n if (\n typeof startValue === 'number' &&\n typeof endValue === 'number' &&\n typeof value === 'number'\n ) {\n const weight = (value - startValue) / (endValue - startValue);\n return Number.isNaN(weight) ? null : weight;\n }\n\n const start = toRational(startValue);\n const end = toRational(endValue);\n const current = toRational(value);\n if (start === null || end === null || current === null) {\n return null;\n }\n\n const valueDelta =\n current.numerator * start.denominator -\n start.numerator * current.denominator;\n const rangeDelta =\n end.numerator * start.denominator - start.numerator * end.denominator;\n\n return divideBigints(\n valueDelta * end.denominator,\n current.denominator * rangeDelta,\n );\n}\n"]}
1
+ {"version":3,"file":"numeric-utils.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/numeric-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgCH,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC9B,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;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AW,GAAG,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC;IAExE,OAAO,aAAa,CAClB,UAAU,GAAG,GAAG,CAAC,WAAW,EAC5B,OAAO,CAAC,WAAW,GAAG,UAAU,CACjC,CAAC;AACJ,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { BigintLiteral, NumericLiteral } from './literal-types';\n\nexport type NumericValue = number | bigint;\n\ntype Rational = {\n denominator: bigint;\n numerator: bigint;\n};\n\nconst BIGINT_ZERO = BigInt(0);\nconst BIGINT_ONE = BigInt(1);\nconst BIGINT_TWO = BigInt(2);\nconst BIGINT_RATIO_SCALE = BigInt('1000000000000000000');\n\nfunction bigintPowerOfTen(exponent: number): bigint {\n return BigInt(`1${'0'.repeat(exponent)}`);\n}\n\n/** Resolves a native or JSON-safe numeric literal without reducing bigints. */\nexport function resolveNumericLiteral(value: NumericLiteral): NumericValue {\n return typeof value === 'object' ? BigInt(value.bigint) : value;\n}\n\n/** Returns whether a value is the JSON-safe bigint literal shape. */\nexport function isBigintLiteral(value: unknown): value is BigintLiteral {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'bigint' in value &&\n typeof value.bigint === 'string' &&\n /^[+-]?\\d+$/.test(value.bigint)\n );\n}\n\n/**\n * Compares numeric values without coercing bigint operands to number.\n * Returns null for NaN, otherwise -1, 0, or 1.\n */\nexport function compareNumericValues(\n left: NumericValue,\n right: NumericValue,\n): -1 | 0 | 1 | null {\n if (\n (typeof left === 'number' && Number.isNaN(left)) ||\n (typeof right === 'number' && Number.isNaN(right))\n ) {\n return null;\n }\n if (left < right) {\n return -1;\n }\n if (left > right) {\n return 1;\n }\n return 0;\n}\n\n/** Numeric equality that treats equivalent number and bigint values as equal. */\nexport function numericValuesEqual(\n left: NumericValue,\n right: NumericValue,\n): boolean {\n return compareNumericValues(left, right) === 0;\n}\n\n/**\n * Clamps a numeric value between two endpoints. Inverted endpoints are\n * supported, and the original number/bigint representation is retained.\n */\nexport function clampNumericValue(\n value: NumericValue,\n firstBound: NumericValue,\n secondBound: NumericValue,\n): NumericValue | null {\n const boundsOrder = compareNumericValues(firstBound, secondBound);\n if (boundsOrder === null) {\n return null;\n }\n const min = boundsOrder <= 0 ? firstBound : secondBound;\n const max = boundsOrder <= 0 ? secondBound : firstBound;\n const minOrder = compareNumericValues(value, min);\n const maxOrder = compareNumericValues(value, max);\n if (minOrder === null || maxOrder === null) {\n return null;\n }\n if (minOrder < 0) {\n return min;\n }\n if (maxOrder > 0) {\n return max;\n }\n return value;\n}\n\nfunction numberToRational(value: number): Rational | null {\n if (!Number.isFinite(value)) {\n return null;\n }\n\n const match = /^([+-]?)(\\d+)(?:\\.(\\d+))?(?:e([+-]?\\d+))?$/i.exec(\n value.toString(),\n );\n if (!match) {\n return null;\n }\n\n const [, sign, integer, fraction = '', exponentText = '0'] = match;\n const exponent = Number(exponentText) - fraction.length;\n const digits = BigInt(`${sign}${integer}${fraction}`);\n if (exponent >= 0) {\n return {\n denominator: BIGINT_ONE,\n numerator: digits * bigintPowerOfTen(exponent),\n };\n }\n return {\n denominator: bigintPowerOfTen(-exponent),\n numerator: digits,\n };\n}\n\nfunction toRational(value: NumericValue): Rational | null {\n return typeof value === 'bigint'\n ? { denominator: BIGINT_ONE, numerator: value }\n : numberToRational(value);\n}\n\nfunction divideBigints(numerator: bigint, denominator: bigint): number | null {\n if (denominator === BIGINT_ZERO) {\n return null;\n }\n\n const isNegative = numerator < BIGINT_ZERO !== denominator < BIGINT_ZERO;\n const absoluteNumerator = numerator < BIGINT_ZERO ? -numerator : numerator;\n const absoluteDenominator =\n denominator < BIGINT_ZERO ? -denominator : denominator;\n const integer = absoluteNumerator / absoluteDenominator;\n const remainder = absoluteNumerator % absoluteDenominator;\n const fraction =\n (remainder * BIGINT_RATIO_SCALE + absoluteDenominator / BIGINT_TWO) /\n absoluteDenominator;\n const result =\n Number(integer) + Number(fraction) / Number(BIGINT_RATIO_SCALE);\n\n return isNegative ? -result : result;\n}\n\n/**\n * Computes `(value - startValue) / (endValue - startValue)` while retaining\n * bigint precision. Only the final dimensionless interpolation weight is\n * converted to number.\n */\nexport function getNumericWeight(\n startValue: NumericValue,\n endValue: NumericValue,\n value: NumericValue,\n): number | null {\n if (\n typeof startValue === 'number' &&\n typeof endValue === 'number' &&\n typeof value === 'number'\n ) {\n const weight = (value - startValue) / (endValue - startValue);\n return Number.isNaN(weight) ? null : weight;\n }\n\n const start = toRational(startValue);\n const end = toRational(endValue);\n const current = toRational(value);\n if (start === null || end === null || current === null) {\n return null;\n }\n\n const valueDelta =\n current.numerator * start.denominator -\n start.numerator * current.denominator;\n const rangeDelta =\n end.numerator * start.denominator - start.numerator * end.denominator;\n\n return divideBigints(\n valueDelta * end.denominator,\n current.denominator * rangeDelta,\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"range-utils.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/range-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAqB,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,qFAAqF;AACrF,MAAM,UAAU,mBAAmB,CAAC,KAAmB;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACxB,OAAO,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,eAAe,IAAI,KAAK,EAAE,CAAC;YAC7B,OAAO,oBAAoB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;YACpB,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IACD,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n parseDateString,\n parseLocalDateString,\n parseTimeString,\n} from './date-utils';\nimport type { RangeLiteral } from './literal-schemas';\nimport { type NumericValue, resolveNumericLiteral } from './numeric-utils';\n\n/** Resolves a range literal to the numeric representation used for interpolation. */\nexport function resolveRangeLiteral(value: RangeLiteral): NumericValue | null {\n if (typeof value === 'object' && value !== null) {\n if ('datetime' in value) {\n return parseDateString(value.datetime);\n }\n if ('localdatetime' in value) {\n return parseLocalDateString(value.localdatetime);\n }\n if ('time' in value) {\n return parseTimeString(value.time);\n }\n }\n return resolveNumericLiteral(value);\n}\n"]}
1
+ {"version":3,"file":"range-utils.js","sourceRoot":"","sources":["../../../../src/_generated/style-rules/range-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAqB,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,qFAAqF;AACrF,MAAM,UAAU,mBAAmB,CAAC,KAAmB;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACxB,OAAO,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,eAAe,IAAI,KAAK,EAAE,CAAC;YAC7B,OAAO,oBAAoB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;YACpB,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IACD,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC","sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n parseDateString,\n parseLocalDateString,\n parseTimeString,\n} from './date-utils';\nimport type { RangeLiteral } from './literal-types';\nimport { type NumericValue, resolveNumericLiteral } from './numeric-utils';\n\n/** Resolves a range literal to the numeric representation used for interpolation. */\nexport function resolveRangeLiteral(value: RangeLiteral): NumericValue | null {\n if (typeof value === 'object' && value !== null) {\n if ('datetime' in value) {\n return parseDateString(value.datetime);\n }\n if ('localdatetime' in value) {\n return parseLocalDateString(value.localdatetime);\n }\n if ('time' in value) {\n return parseTimeString(value.time);\n }\n }\n return resolveNumericLiteral(value);\n}\n"]}
@@ -25,7 +25,7 @@ import { Presence } from '@neo4j-ndl/react/ai';
25
25
  import { useState } from 'react';
26
26
  const Component = () => {
27
27
  const [isThinking, setIsThinking] = useState(false);
28
- return (_jsxs("div", { className: "n-flex n-gap-token-8", children: [_jsx(Presence, { className: "n-size-token-32", isThinking: isThinking }), _jsx(FilledButton, { onClick: () => setIsThinking(!isThinking), children: "Toggle Thinking" })] }));
28
+ return (_jsxs("div", { className: "flex gap-token-8", children: [_jsx(Presence, { className: "size-token-32", isThinking: isThinking }), _jsx(FilledButton, { onClick: () => setIsThinking(!isThinking), children: "Toggle Thinking" })] }));
29
29
  };
30
30
  export default Component;
31
31
  //# sourceMappingURL=ai-presence-default.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-presence-default.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,eAAK,SAAS,EAAC,sBAAsB,aACnC,KAAC,QAAQ,IAAC,SAAS,EAAC,iBAAiB,EAAC,UAAU,EAAE,UAAU,GAAI,EAChE,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,gCAExC,IACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { Presence } from '@neo4j-ndl/react/ai';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isThinking, setIsThinking] = useState(false);\n\n return (\n <div className=\"n-flex n-gap-token-8\">\n <Presence className=\"n-size-token-32\" isThinking={isThinking} />\n <FilledButton onClick={() => setIsThinking(!isThinking)}>\n Toggle Thinking\n </FilledButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"ai-presence-default.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,eAAK,SAAS,EAAC,kBAAkB,aAC/B,KAAC,QAAQ,IAAC,SAAS,EAAC,eAAe,EAAC,UAAU,EAAE,UAAU,GAAI,EAC9D,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,gCAExC,IACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { Presence } from '@neo4j-ndl/react/ai';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isThinking, setIsThinking] = useState(false);\n\n return (\n <div className=\"flex gap-token-8\">\n <Presence className=\"size-token-32\" isThinking={isThinking} />\n <FilledButton onClick={() => setIsThinking(!isThinking)}>\n Toggle Thinking\n </FilledButton>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -23,7 +23,7 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { Presence } from '@neo4j-ndl/react/ai';
24
24
  // TODO: consider this story when happo is ready
25
25
  const Component = () => {
26
- return _jsx(Presence, { isThinking: true, className: "n-size-token-32" });
26
+ return _jsx(Presence, { isThinking: true, className: "size-token-32" });
27
27
  };
28
28
  export default Component;
29
29
  //# sourceMappingURL=ai-presence-thinking.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-presence-thinking.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,gDAAgD;AAChD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,IAAC,UAAU,QAAC,SAAS,EAAC,iBAAiB,GAAG,CAAC;AAC7D,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Presence } from '@neo4j-ndl/react/ai';\n\n// TODO: consider this story when happo is ready\nconst Component = () => {\n return <Presence isThinking className=\"n-size-token-32\" />;\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"ai-presence-thinking.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,gDAAgD;AAChD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,IAAC,UAAU,QAAC,SAAS,EAAC,eAAe,GAAG,CAAC;AAC3D,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Presence } from '@neo4j-ndl/react/ai';\n\n// TODO: consider this story when happo is ready\nconst Component = () => {\n return <Presence isThinking className=\"size-token-32\" />;\n};\n\nexport default Component;\n"]}
@@ -70,7 +70,7 @@ const ReasoningComponent = (_a) => {
70
70
  }), inert: !shouldShowChildren, "aria-hidden": !shouldShowChildren, "aria-labelledby": buttonId, role: "region", id: panelId, children: _jsx("div", { className: "ndl-ai-reasoning-content-inner", children: _jsx("div", { className: "ndl-ai-reasoning-content-inner-2", children: children }) }) })] })));
71
71
  };
72
72
  const Section = (_a) => {
73
- var { heading, leadingVisual, children, className, style, htmlAttributes, ref, isExpanded: _isExpanded, isDefaultExpanded: _isDefaultExpanded, onExpandChange: _onExpandChange } = _a, restProps = __rest(_a, ["heading", "leadingVisual", "children", "className", "style", "htmlAttributes", "ref", "isExpanded", "isDefaultExpanded", "onExpandChange"]);
73
+ var { heading, leadingVisual, children, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["heading", "leadingVisual", "children", "className", "style", "htmlAttributes", "ref"]);
74
74
  const classes = classNames('ndl-ai-reasoning-section', className);
75
75
  return (_jsxs("div", Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [_jsxs("div", { className: "ndl-ai-reasoning-section-header", children: [_jsx("div", { className: "ndl-ai-reasoning-section-leading", children: leadingVisual }), _jsx(Typography, { variant: "subheading-small", children: heading })] }), _jsxs("div", { className: "ndl-ai-reasoning-section-content", children: [_jsx("div", { className: "ndl-ai-reasoning-section-content-line-container", children: _jsx("div", { className: "ndl-ai-reasoning-section-content-line" }) }), _jsx("div", { className: "ndl-ai-reasoning-section-content-children", children: children })] })] })));
76
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Reasoning.js","sourceRoot":"","sources":["../../../../src/ai/reasoning/Reasoning.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAajF;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,EAUS,EAAE,EAAE;QAVb,EAC1B,UAAU,GAAG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CAAkC,aAC/C,cAAK,SAAS,EAAC,iDAAiD,YAC9D,cAAK,SAAS,EAAC,uCAAuC,GAAG,GACrD,EACN,cAAK,SAAS,EAAC,2CAA2C,YACvD,QAAQ,GACL,IACF,KACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,EAOoC,EAAE,EAAE;QAPxC,EACd,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE+C,EAD/C,SAAS,cANE,2DAOf,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;IACjE,OAAO,CACL,KAAC,UAAU,kBACT,EAAE,EAAC,KAAK,EACR,OAAO,EAAC,YAAY,EACpB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAEjB,QAAQ,IACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;IAClD,MAAM;IACN,OAAO;CACR,CAAC,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Typography } from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport { useId, useState } from 'react';\n\nimport { type CommonProps } from '../../_common/types';\nimport { ChevronDownIconOutline } from '../../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { Presence } from '../presence';\nimport { formatThinkingDuration } from '../thinking/thinking-duration-formatter';\n\ntype ReasoningProps = {\n /** What should be displayed inside the reasoning component. */\n children?: React.ReactNode;\n /** Whether the AI is thinking */\n isThinking?: boolean;\n /** The duration of the thinking in milliseconds */\n thinkingMs?: number;\n /** The current action the AI is performing */\n currentAction?: string;\n};\n\n/**\n * The component is used to display the reasoning state of an LLM.\n * It has an accordion like behavior to show the reasoning steps.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst ReasoningComponent = ({\n isThinking = true,\n thinkingMs = 1000,\n currentAction = 'Thinking',\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', ReasoningProps>) => {\n const classes = classNames('ndl-ai-reasoning', className);\n const [isExpanded, setIsExpanded] = useState(false);\n const shouldShowChildren = isExpanded && isThinking === false;\n const buttonId = useId();\n const panelId = useId();\n\n const { value: thinkingDuration, unit } = formatThinkingDuration(thinkingMs);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <Typography\n variant=\"label\"\n className={classNames('ndl-ai-reasoning-header', {\n 'ndl-expanded': isExpanded,\n })}\n {...(!isThinking\n ? {\n as: 'button',\n htmlAttributes: {\n 'aria-controls': panelId,\n 'aria-expanded': isExpanded,\n id: buttonId,\n onClick: () => setIsExpanded(!isExpanded),\n type: 'button',\n },\n }\n : { as: 'div', htmlAttributes: { id: buttonId } })}\n >\n {isThinking === true ? (\n <>\n <Presence\n isThinking={isThinking}\n className=\"ndl-ai-reasoning-presence\"\n />\n <span className=\"ndl-ai-reasoning-header-text\">\n {currentAction}...\n </span>\n </>\n ) : (\n <>\n <span>\n Thought for {thinkingDuration} {unit}\n </span>\n <ChevronDownIconOutline\n className={classNames('ndl-ai-reasoning-chevron', {\n 'ndl-expanded': isExpanded,\n })}\n />\n </>\n )}\n </Typography>\n <div\n className={classNames('ndl-ai-reasoning-content', {\n 'ndl-expanded': shouldShowChildren,\n })}\n inert={!shouldShowChildren}\n aria-hidden={!shouldShowChildren}\n aria-labelledby={buttonId}\n role=\"region\"\n id={panelId}\n >\n <div className=\"ndl-ai-reasoning-content-inner\">\n <div className=\"ndl-ai-reasoning-content-inner-2\">{children}</div>\n </div>\n </div>\n </div>\n );\n};\n\ntype SectionProps = {\n /** The heading of the section */\n heading?: React.ReactNode;\n /** The children of the section */\n children?: React.ReactNode;\n /** The visual leading the section */\n leadingVisual?: React.ReactNode;\n // TODO v5: remove this prop\n /** Whether the section is expanded.\n * @deprecated - Does nothing, will be removed in v5 */\n isExpanded?: boolean;\n // TODO v5: remove this prop\n /** The default value of the section is expanded.\n * @deprecated - Does nothing, will be removed in v5 */\n isDefaultExpanded?: boolean;\n // TODO v5: remove this prop\n /** Callback function triggered when the section is expanded.\n * @deprecated - Does nothing, will be removed in v5 */\n onExpandChange?: (isExpanded: boolean) => void;\n};\n\nconst Section = ({\n heading,\n leadingVisual,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n isExpanded: _isExpanded,\n isDefaultExpanded: _isDefaultExpanded,\n onExpandChange: _onExpandChange,\n ...restProps\n}: CommonProps<'div', SectionProps>) => {\n const classes = classNames('ndl-ai-reasoning-section', className);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-ai-reasoning-section-header\">\n <div className=\"ndl-ai-reasoning-section-leading\">{leadingVisual}</div>\n <Typography variant=\"subheading-small\">{heading}</Typography>\n </div>\n <div className=\"ndl-ai-reasoning-section-content\">\n <div className=\"ndl-ai-reasoning-section-content-line-container\">\n <div className=\"ndl-ai-reasoning-section-content-line\" />\n </div>\n <div className=\"ndl-ai-reasoning-section-content-children\">\n {children}\n </div>\n </div>\n </div>\n );\n};\n\nconst Footer = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-ai-reasoning-footer', className);\n return (\n <Typography\n as=\"div\"\n variant=\"body-small\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Typography>\n );\n};\n\nconst Reasoning = Object.assign(ReasoningComponent, {\n Footer,\n Section,\n});\n\nexport { Reasoning };\n"]}
1
+ {"version":3,"file":"Reasoning.js","sourceRoot":"","sources":["../../../../src/ai/reasoning/Reasoning.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAajF;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,EAUS,EAAE,EAAE;QAVb,EAC1B,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,UAAU,EAC1B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEgC,EADhC,SAAS,cATc,wGAU3B,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAC1D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,kBAAkB,GAAG,UAAU,IAAI,UAAU,KAAK,KAAK,CAAC;IAC9D,MAAM,QAAQ,GAAG,KAAK,EAAE,CAAC;IACzB,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IAExB,MAAM,EAAE,KAAK,EAAE,gBAA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AEjB,QAAQ,IACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;IAClD,MAAM;IACN,OAAO;CACR,CAAC,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Typography } from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport { useId, useState } from 'react';\n\nimport { type CommonProps } from '../../_common/types';\nimport { ChevronDownIconOutline } from '../../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { Presence } from '../presence';\nimport { formatThinkingDuration } from '../thinking/thinking-duration-formatter';\n\ntype ReasoningProps = {\n /** What should be displayed inside the reasoning component. */\n children?: React.ReactNode;\n /** Whether the AI is thinking */\n isThinking?: boolean;\n /** The duration of the thinking in milliseconds */\n thinkingMs?: number;\n /** The current action the AI is performing */\n currentAction?: string;\n};\n\n/**\n * The component is used to display the reasoning state of an LLM.\n * It has an accordion like behavior to show the reasoning steps.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst ReasoningComponent = ({\n isThinking = true,\n thinkingMs = 1000,\n currentAction = 'Thinking',\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', ReasoningProps>) => {\n const classes = classNames('ndl-ai-reasoning', className);\n const [isExpanded, setIsExpanded] = useState(false);\n const shouldShowChildren = isExpanded && isThinking === false;\n const buttonId = useId();\n const panelId = useId();\n\n const { value: thinkingDuration, unit } = formatThinkingDuration(thinkingMs);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <Typography\n variant=\"label\"\n className={classNames('ndl-ai-reasoning-header', {\n 'ndl-expanded': isExpanded,\n })}\n {...(!isThinking\n ? {\n as: 'button',\n htmlAttributes: {\n 'aria-controls': panelId,\n 'aria-expanded': isExpanded,\n id: buttonId,\n onClick: () => setIsExpanded(!isExpanded),\n type: 'button',\n },\n }\n : { as: 'div', htmlAttributes: { id: buttonId } })}\n >\n {isThinking === true ? (\n <>\n <Presence\n isThinking={isThinking}\n className=\"ndl-ai-reasoning-presence\"\n />\n <span className=\"ndl-ai-reasoning-header-text\">\n {currentAction}...\n </span>\n </>\n ) : (\n <>\n <span>\n Thought for {thinkingDuration} {unit}\n </span>\n <ChevronDownIconOutline\n className={classNames('ndl-ai-reasoning-chevron', {\n 'ndl-expanded': isExpanded,\n })}\n />\n </>\n )}\n </Typography>\n <div\n className={classNames('ndl-ai-reasoning-content', {\n 'ndl-expanded': shouldShowChildren,\n })}\n inert={!shouldShowChildren}\n aria-hidden={!shouldShowChildren}\n aria-labelledby={buttonId}\n role=\"region\"\n id={panelId}\n >\n <div className=\"ndl-ai-reasoning-content-inner\">\n <div className=\"ndl-ai-reasoning-content-inner-2\">{children}</div>\n </div>\n </div>\n </div>\n );\n};\n\ntype SectionProps = {\n /** The heading of the section */\n heading?: React.ReactNode;\n /** The children of the section */\n children?: React.ReactNode;\n /** The visual leading the section */\n leadingVisual?: React.ReactNode;\n};\n\nconst Section = ({\n heading,\n leadingVisual,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', SectionProps>) => {\n const classes = classNames('ndl-ai-reasoning-section', className);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-ai-reasoning-section-header\">\n <div className=\"ndl-ai-reasoning-section-leading\">{leadingVisual}</div>\n <Typography variant=\"subheading-small\">{heading}</Typography>\n </div>\n <div className=\"ndl-ai-reasoning-section-content\">\n <div className=\"ndl-ai-reasoning-section-content-line-container\">\n <div className=\"ndl-ai-reasoning-section-content-line\" />\n </div>\n <div className=\"ndl-ai-reasoning-section-content-children\">\n {children}\n </div>\n </div>\n </div>\n );\n};\n\nconst Footer = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-ai-reasoning-footer', className);\n return (\n <Typography\n as=\"div\"\n variant=\"body-small\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Typography>\n );\n};\n\nconst Reasoning = Object.assign(ReasoningComponent, {\n Footer,\n Section,\n});\n\nexport { Reasoning };\n"]}
@@ -26,7 +26,7 @@ import { InformationCircleIconOutline, PencilSquareIconOutline, WrenchIconOutlin
26
26
  import { useState } from 'react';
27
27
  const Component = () => {
28
28
  const [isThinking, setThinking] = useState(true);
29
- return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-12", children: [_jsx(FilledButton, { onClick: () => setThinking(!isThinking), children: isThinking ? 'Stop Thinking' : 'Start Thinking' }), _jsxs(Reasoning, { isThinking: isThinking, thinkingMs: 1400, currentAction: "Creating an action plan", children: [_jsx(Reasoning.Section, { leadingVisual: _jsx(PencilSquareIconOutline, {}), heading: "Creating an action plan", isDefaultExpanded: true, children: "Step 1 content" }), _jsx(Reasoning.Section, { leadingVisual: _jsx(WrenchIconOutline, {}), heading: "Applying agent tools", children: "Step 2 content" }), _jsxs(Reasoning.Footer, { children: ["Footer information", _jsxs(Tooltip, { type: "simple", children: [_jsx(Tooltip.Trigger, { htmlAttributes: { 'aria-label': 'Info about things like tokens' }, children: _jsx(InformationCircleIconOutline, { className: "n-size-token-16" }) }), _jsx(Tooltip.Content, { children: "Info about things like tokens" })] })] })] })] }));
29
+ return (_jsxs("div", { className: "flex flex-col gap-token-12", children: [_jsx(FilledButton, { onClick: () => setThinking(!isThinking), children: isThinking ? 'Stop Thinking' : 'Start Thinking' }), _jsxs(Reasoning, { isThinking: isThinking, thinkingMs: 1400, currentAction: "Creating an action plan", children: [_jsx(Reasoning.Section, { leadingVisual: _jsx(PencilSquareIconOutline, {}), heading: "Creating an action plan", children: "Step 1 content" }), _jsx(Reasoning.Section, { leadingVisual: _jsx(WrenchIconOutline, {}), heading: "Applying agent tools", children: "Step 2 content" }), _jsxs(Reasoning.Footer, { children: ["Footer information", _jsxs(Tooltip, { type: "simple", children: [_jsx(Tooltip.Trigger, { htmlAttributes: { 'aria-label': 'Info about things like tokens' }, children: _jsx(InformationCircleIconOutline, { className: "size-token-16" }) }), _jsx(Tooltip.Content, { children: "Info about things like tokens" })] })] })] })] }));
30
30
  };
31
31
  export default Component;
32
32
  //# sourceMappingURL=reasoning-full.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reasoning-full.story.js","sourceRoot":"","sources":["../../../../../src/ai/reasoning/stories/reasoning-full.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,YAClD,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,GACnC,EACf,MAAC,SAAS,IACR,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,IAAI,EAChB,aAAa,EAAC,yBAAyB,aAEvC,KAAC,SAAS,CAAC,OAAO,IAChB,aAAa,EAAE,KAAC,uBAAuB,KAAG,EAC1C,OAAO,EAAC,yBAAyB,EACjC,iBAAiB,EAAE,IAAI,+BAGL,EACpB,KAAC,SAAS,CAAC,OAAO,IAChB,aAAa,EAAE,KAAC,iBAAiB,KAAG,EACpC,OAAO,EAAC,sBAAsB,+BAGZ,EACpB,MAAC,SAAS,CAAC,MAAM,qCAEf,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,KAAC,OAAO,CAAC,OAAO,IACd,cAAc,EAAE,EAAE,YAAY,EAAE,+BAA+B,EAAE,YAEjE,KAAC,4BAA4B,IAAC,SAAS,EAAC,iBAAiB,GAAG,GAC5C,EAClB,KAAC,OAAO,CAAC,OAAO,gDAAgD,IACxD,IACO,IACT,IACR,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Tooltip } from '@neo4j-ndl/react';\nimport { Reasoning } from '@neo4j-ndl/react/ai';\nimport {\n InformationCircleIconOutline,\n PencilSquareIconOutline,\n WrenchIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isThinking, setThinking] = useState(true);\n\n return (\n <div className=\"n-flex n-flex-col n-gap-token-12\">\n <FilledButton onClick={() => setThinking(!isThinking)}>\n {isThinking ? 'Stop Thinking' : 'Start Thinking'}\n </FilledButton>\n <Reasoning\n isThinking={isThinking}\n thinkingMs={1400}\n currentAction=\"Creating an action plan\"\n >\n <Reasoning.Section\n leadingVisual={<PencilSquareIconOutline />}\n heading=\"Creating an action plan\"\n isDefaultExpanded={true}\n >\n Step 1 content\n </Reasoning.Section>\n <Reasoning.Section\n leadingVisual={<WrenchIconOutline />}\n heading=\"Applying agent tools\"\n >\n Step 2 content\n </Reasoning.Section>\n <Reasoning.Footer>\n Footer information\n <Tooltip type=\"simple\">\n <Tooltip.Trigger\n htmlAttributes={{ 'aria-label': 'Info about things like tokens' }}\n >\n <InformationCircleIconOutline className=\"n-size-token-16\" />\n </Tooltip.Trigger>\n <Tooltip.Content>Info about things like tokens</Tooltip.Content>\n </Tooltip>\n </Reasoning.Footer>\n </Reasoning>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"reasoning-full.story.js","sourceRoot":"","sources":["../../../../../src/ai/reasoning/stories/reasoning-full.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,YAClD,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,GACnC,EACf,MAAC,SAAS,IACR,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,IAAI,EAChB,aAAa,EAAC,yBAAyB,aAEvC,KAAC,SAAS,CAAC,OAAO,IAChB,aAAa,EAAE,KAAC,uBAAuB,KAAG,EAC1C,OAAO,EAAC,yBAAyB,+BAGf,EACpB,KAAC,SAAS,CAAC,OAAO,IAChB,aAAa,EAAE,KAAC,iBAAiB,KAAG,EACpC,OAAO,EAAC,sBAAsB,+BAGZ,EACpB,MAAC,SAAS,CAAC,MAAM,qCAEf,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,KAAC,OAAO,CAAC,OAAO,IACd,cAAc,EAAE,EAAE,YAAY,EAAE,+BAA+B,EAAE,YAEjE,KAAC,4BAA4B,IAAC,SAAS,EAAC,eAAe,GAAG,GAC1C,EAClB,KAAC,OAAO,CAAC,OAAO,gDAAgD,IACxD,IACO,IACT,IACR,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Tooltip } from '@neo4j-ndl/react';\nimport { Reasoning } from '@neo4j-ndl/react/ai';\nimport {\n InformationCircleIconOutline,\n PencilSquareIconOutline,\n WrenchIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isThinking, setThinking] = useState(true);\n\n return (\n <div className=\"flex flex-col gap-token-12\">\n <FilledButton onClick={() => setThinking(!isThinking)}>\n {isThinking ? 'Stop Thinking' : 'Start Thinking'}\n </FilledButton>\n <Reasoning\n isThinking={isThinking}\n thinkingMs={1400}\n currentAction=\"Creating an action plan\"\n >\n <Reasoning.Section\n leadingVisual={<PencilSquareIconOutline />}\n heading=\"Creating an action plan\"\n >\n Step 1 content\n </Reasoning.Section>\n <Reasoning.Section\n leadingVisual={<WrenchIconOutline />}\n heading=\"Applying agent tools\"\n >\n Step 2 content\n </Reasoning.Section>\n <Reasoning.Footer>\n Footer information\n <Tooltip type=\"simple\">\n <Tooltip.Trigger\n htmlAttributes={{ 'aria-label': 'Info about things like tokens' }}\n >\n <InformationCircleIconOutline className=\"size-token-16\" />\n </Tooltip.Trigger>\n <Tooltip.Content>Info about things like tokens</Tooltip.Content>\n </Tooltip>\n </Reasoning.Footer>\n </Reasoning>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -34,9 +34,45 @@ import { jsx as _jsx } from "react/jsx-runtime";
34
34
  import { Code, TextLink, Typography } from '@neo4j-ndl/react';
35
35
  import classNames from 'classnames';
36
36
  import { memo, useMemo, useRef } from 'react';
37
- import { Streamdown } from 'streamdown';
37
+ import { defaultRehypePlugins, Streamdown } from 'streamdown';
38
38
  import { Languages } from '../../code-block/code-languages';
39
39
  import { CodePreview } from '../code-preview';
40
+ const STREAMDOWN_PLACEHOLDER_PROTOCOL = 'streamdown:';
41
+ const CLOBBER_PREFIX = 'user-content-';
42
+ const CLOBBERABLE_PROPERTIES = [
43
+ 'id',
44
+ 'name',
45
+ 'ariaDescribedBy',
46
+ 'ariaLabelledBy',
47
+ ];
48
+ const prefixClobberValue = (value) => typeof value === 'string' && !value.startsWith(CLOBBER_PREFIX)
49
+ ? `${CLOBBER_PREFIX}${value}`
50
+ : value;
51
+ const prefixClobberableProperties = (node) => {
52
+ var _a;
53
+ if (node.type === 'element' && node.properties !== undefined) {
54
+ for (const key of CLOBBERABLE_PROPERTIES) {
55
+ const value = node.properties[key];
56
+ if (value === undefined || value === null) {
57
+ continue;
58
+ }
59
+ node.properties[key] = Array.isArray(value)
60
+ ? value.map(prefixClobberValue)
61
+ : prefixClobberValue(value);
62
+ }
63
+ }
64
+ (_a = node.children) === null || _a === void 0 ? void 0 : _a.forEach(prefixClobberableProperties);
65
+ };
66
+ /**
67
+ * Streamdown 2 sanitizes with an empty `clobberPrefix`, which lets ids and
68
+ * names from model output collide with the host document (DOM clobbering).
69
+ * Prefixing after sanitization keeps already prefixed footnote ids intact.
70
+ */
71
+ const rehypePrefixClobberableProperties = () => prefixClobberableProperties;
72
+ const rehypePlugins = [
73
+ ...Object.values(defaultRehypePlugins),
74
+ rehypePrefixClobberableProperties,
75
+ ];
40
76
  /**
41
77
  * The component is used to display the response from an LLM.
42
78
  * It handles markdown rendering and streaming.
@@ -83,7 +119,11 @@ const Response = memo((_a) => {
83
119
  // oxlint-disable-next-line no-unused-vars, id-length
84
120
  a: (_a) => {
85
121
  var { node: _node, children, className, href } = _a, props = __rest(_a, ["node", "children", "className", "href"]);
86
- return (_jsx(TextLink, { type: "internal-underline", className: className, href: href, htmlAttributes: props, children: children }));
122
+ // Streamdown marks links whose URL is still streaming with a placeholder href
123
+ if ((href === null || href === void 0 ? void 0 : href.startsWith(STREAMDOWN_PLACEHOLDER_PROTOCOL)) === true) {
124
+ return _jsx("span", { className: className, children: children });
125
+ }
126
+ return (_jsx(TextLink, { type: "internal", className: className, href: href, htmlAttributes: props, children: children }));
87
127
  },
88
128
  // oxlint-disable-next-line no-unused-vars
89
129
  h1: (_a) => {
@@ -146,6 +186,16 @@ const Response = memo((_a) => {
146
186
  return (_jsx("td", Object.assign({ className: className }, props, { children: children })));
147
187
  },
148
188
  // oxlint-disable-next-line no-unused-vars
189
+ sup: (_a) => {
190
+ var { node, children, className, ref: _ref } = _a, props = __rest(_a, ["node", "children", "className", "ref"]);
191
+ return (_jsx("sup", Object.assign({ className: className }, props, { children: children })));
192
+ },
193
+ // oxlint-disable-next-line no-unused-vars
194
+ sub: (_a) => {
195
+ var { node, children, className, ref: _ref } = _a, props = __rest(_a, ["node", "children", "className", "ref"]);
196
+ return (_jsx("sub", Object.assign({ className: className }, props, { children: children })));
197
+ },
198
+ // oxlint-disable-next-line no-unused-vars
149
199
  blockquote: (_a) => {
150
200
  var { node, children, className, ref: _ref } = _a, props = __rest(_a, ["node", "children", "className", "ref"]);
151
201
  return (_jsx("blockquote", Object.assign({ className: classNames(className) }, props, { children: children })));
@@ -201,10 +251,14 @@ const Response = memo((_a) => {
201
251
  // oxlint-disable-next-line no-unused-vars
202
252
  img: (_a) => {
203
253
  var { node, className, src, alt, ref: _ref } = _a, props = __rest(_a, ["node", "className", "src", "alt", "ref"]);
254
+ if (typeof src === 'string' &&
255
+ src.startsWith(STREAMDOWN_PLACEHOLDER_PROTOCOL)) {
256
+ return null;
257
+ }
204
258
  return (_jsx("img", Object.assign({ className: classNames(className), src: src, alt: alt }, props)));
205
259
  },
206
260
  }), []);
207
- return (_jsx("div", Object.assign({ ref: ref, style: style, className: classNames('ndl-ai-response', className) }, restProps, htmlAttributes, { children: _jsx(Streamdown, { isAnimating: isAnimating, parseIncompleteMarkdown: isAnimating, components: components, children: children }) })));
261
+ return (_jsx("div", Object.assign({ ref: ref, style: style, className: classNames('ndl-ai-response', className) }, restProps, htmlAttributes, { children: _jsx(Streamdown, { isAnimating: isAnimating, parseIncompleteMarkdown: isAnimating, components: components, rehypePlugins: rehypePlugins, children: children }) })));
208
262
  }, (prevProps, nextProps) => prevProps.children === nextProps.children);
209
263
  Response.displayName = 'Response';
210
264
  export { Response };