@k2b/ui 0.65.0 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (916) hide show
  1. package/README.md +47 -0
  2. package/dist/base.css +6 -1
  3. package/dist/browser/actions/Dropdown.js +2 -1
  4. package/dist/browser/actions/Dropdown.js.map +1 -1
  5. package/dist/browser/actions/FilterChip.js +3 -2
  6. package/dist/browser/actions/FilterChip.js.map +1 -1
  7. package/dist/browser/actions/SegmentedControl.js +20 -14
  8. package/dist/browser/actions/SegmentedControl.js.map +1 -1
  9. package/dist/browser/charts/core/line-details.js +52 -12
  10. package/dist/browser/charts/core/line-details.js.map +1 -1
  11. package/dist/browser/charts/core/line-extras.js +122 -0
  12. package/dist/browser/charts/core/line-extras.js.map +1 -0
  13. package/dist/browser/charts/core/line-options.js +1 -1
  14. package/dist/browser/charts/core/line-options.js.map +1 -1
  15. package/dist/browser/charts/core/snapshot.js +3 -2
  16. package/dist/browser/charts/core/snapshot.js.map +1 -1
  17. package/dist/browser/charts/core/svg-barGauge.js +2 -2
  18. package/dist/browser/charts/core/svg-barGauge.js.map +1 -1
  19. package/dist/browser/charts/core/svg-common.js +22 -1
  20. package/dist/browser/charts/core/svg-common.js.map +1 -1
  21. package/dist/browser/charts/core/svg-renderers.js +2 -2
  22. package/dist/browser/charts/core/svg-renderers.js.map +1 -1
  23. package/dist/browser/chat/ChatDecision.js +5 -4
  24. package/dist/browser/chat/ChatDecision.js.map +1 -1
  25. package/dist/browser/chat/ChatPrimitives.js +7 -5
  26. package/dist/browser/chat/ChatPrimitives.js.map +1 -1
  27. package/dist/browser/content/Calendar.js +1103 -922
  28. package/dist/browser/content/Calendar.js.map +1 -1
  29. package/dist/browser/content/CalendarDayView.js +336 -259
  30. package/dist/browser/content/CalendarDayView.js.map +1 -1
  31. package/dist/browser/content/CalendarWeekView.js +332 -236
  32. package/dist/browser/content/CalendarWeekView.js.map +1 -1
  33. package/dist/browser/content/ChartRoot.js +233 -100
  34. package/dist/browser/content/ChartRoot.js.map +1 -1
  35. package/dist/browser/content/MarkdownView.js +3 -1
  36. package/dist/browser/content/MarkdownView.js.map +1 -1
  37. package/dist/browser/content/ReferenceChip.js +2 -1
  38. package/dist/browser/content/ReferenceChip.js.map +1 -1
  39. package/dist/browser/content/calendar-days.js +114 -26
  40. package/dist/browser/content/calendar-days.js.map +1 -1
  41. package/dist/browser/content/calendar-event-detail.js +133 -98
  42. package/dist/browser/content/calendar-event-detail.js.map +1 -1
  43. package/dist/browser/content/calendar-events.js +107 -0
  44. package/dist/browser/content/calendar-events.js.map +1 -0
  45. package/dist/browser/content/calendar-messages.js +28 -2
  46. package/dist/browser/content/calendar-messages.js.map +1 -1
  47. package/dist/browser/content/calendar-month-layout.js +89 -5
  48. package/dist/browser/content/calendar-month-layout.js.map +1 -1
  49. package/dist/browser/content/calendar-month-scroll.js +2 -1
  50. package/dist/browser/content/calendar-month-scroll.js.map +1 -1
  51. package/dist/browser/content/calendar-overflow.browser-suite.js +534 -0
  52. package/dist/browser/content/calendar-overflow.browser-suite.js.map +1 -0
  53. package/dist/browser/content/calendar-overflow.js +366 -0
  54. package/dist/browser/content/calendar-overflow.js.map +1 -0
  55. package/dist/browser/content/calendar-shared.js +119 -104
  56. package/dist/browser/content/calendar-shared.js.map +1 -1
  57. package/dist/browser/content/calendar-snapshot.js +71 -0
  58. package/dist/browser/content/calendar-snapshot.js.map +1 -0
  59. package/dist/browser/content/calendar-time-view.js +519 -305
  60. package/dist/browser/content/calendar-time-view.js.map +1 -1
  61. package/dist/browser/content/chart-bar.js +3 -3
  62. package/dist/browser/content/chart-bar.js.map +1 -1
  63. package/dist/browser/content/chart-calendar.js +2 -1
  64. package/dist/browser/content/chart-calendar.js.map +1 -1
  65. package/dist/browser/content/chart-inspection-mount.js +1 -1
  66. package/dist/browser/content/chart-inspection-mount.js.map +1 -1
  67. package/dist/browser/content/chart-line-gaps.js +1 -1
  68. package/dist/browser/content/chart-line-gaps.js.map +1 -1
  69. package/dist/browser/content/chart-message-catalog.js +6 -0
  70. package/dist/browser/content/chart-message-catalog.js.map +1 -1
  71. package/dist/browser/content/chart-state-timeline.js +45 -12
  72. package/dist/browser/content/chart-state-timeline.js.map +1 -1
  73. package/dist/browser/content/chart-svg.js +5 -1
  74. package/dist/browser/content/chart-svg.js.map +1 -1
  75. package/dist/browser/content/chart-tick-room.js +23 -0
  76. package/dist/browser/content/chart-tick-room.js.map +1 -1
  77. package/dist/browser/content/index.js +3 -0
  78. package/dist/browser/content/index.js.map +1 -1
  79. package/dist/browser/content/markdown-info-blocks.js +1 -1
  80. package/dist/browser/content/markdown-info-blocks.js.map +1 -1
  81. package/dist/browser/content/markdown-links.js +36 -2
  82. package/dist/browser/content/markdown-links.js.map +1 -1
  83. package/dist/browser/feedback/prompt-form-loader.js +3 -2
  84. package/dist/browser/feedback/prompt-form-loader.js.map +1 -1
  85. package/dist/browser/feedback/toast.js +21 -1
  86. package/dist/browser/feedback/toast.js.map +1 -1
  87. package/dist/browser/inputs/AutocompleteSelect.js +2 -1
  88. package/dist/browser/inputs/AutocompleteSelect.js.map +1 -1
  89. package/dist/browser/inputs/ChoiceInputs.js +3 -2
  90. package/dist/browser/inputs/ChoiceInputs.js.map +1 -1
  91. package/dist/browser/inputs/ColorChoices.js +2 -1
  92. package/dist/browser/inputs/ColorChoices.js.map +1 -1
  93. package/dist/browser/inputs/RichSelect.js +2 -1
  94. package/dist/browser/inputs/RichSelect.js.map +1 -1
  95. package/dist/browser/inputs/Select.js +3 -2
  96. package/dist/browser/inputs/Select.js.map +1 -1
  97. package/dist/browser/inputs/date-picker.js +9 -0
  98. package/dist/browser/inputs/date-picker.js.map +1 -1
  99. package/dist/browser/inputs/markdown/Toolbar.js +18 -14
  100. package/dist/browser/inputs/markdown/Toolbar.js.map +1 -1
  101. package/dist/browser/internal/color.js +25 -0
  102. package/dist/browser/internal/color.js.map +1 -1
  103. package/dist/browser/internal/pending-loads.js +17 -0
  104. package/dist/browser/internal/pending-loads.js.map +1 -0
  105. package/dist/browser/intl/messages.js +16 -0
  106. package/dist/browser/intl/messages.js.map +1 -1
  107. package/dist/browser/layout/AppWorkspace.js +6 -0
  108. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  109. package/dist/browser/layout/DetailSections.js +110 -98
  110. package/dist/browser/layout/DetailSections.js.map +1 -1
  111. package/dist/browser/layout/FloatingWindow.js +2 -1
  112. package/dist/browser/layout/FloatingWindow.js.map +1 -1
  113. package/dist/browser/layout/Navigation.js +172 -123
  114. package/dist/browser/layout/Navigation.js.map +1 -1
  115. package/dist/browser/layout/Panes.js +188 -237
  116. package/dist/browser/layout/Panes.js.map +1 -1
  117. package/dist/browser/layout/SidebarSwitcher.js +7 -3
  118. package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
  119. package/dist/browser/layout/navigation-model.js.map +1 -1
  120. package/dist/browser/layout/panes-messages.js +0 -4
  121. package/dist/browser/layout/panes-messages.js.map +1 -1
  122. package/dist/browser/surfaces/Avatar.js +5 -2
  123. package/dist/browser/surfaces/Avatar.js.map +1 -1
  124. package/dist/browser/surfaces/NoticeCard.js +78 -36
  125. package/dist/browser/surfaces/NoticeCard.js.map +1 -1
  126. package/dist/browser/surfaces/NoticeRow.js +10 -3
  127. package/dist/browser/surfaces/NoticeRow.js.map +1 -1
  128. package/dist/browser/surfaces/index.js +1 -1
  129. package/dist/browser/surfaces/index.js.map +1 -1
  130. package/dist/browser/surfaces/notice-card-classes.js +16 -0
  131. package/dist/browser/surfaces/notice-card-classes.js.map +1 -0
  132. package/dist/browser/surfaces/person-color.js +34 -4
  133. package/dist/browser/surfaces/person-color.js.map +1 -1
  134. package/dist/browser/v2/accent.js +114 -0
  135. package/dist/browser/v2/accent.js.map +1 -0
  136. package/dist/browser/v2/action-bar.js +125 -0
  137. package/dist/browser/v2/action-bar.js.map +1 -0
  138. package/dist/browser/v2/addresses.js +135 -0
  139. package/dist/browser/v2/addresses.js.map +1 -0
  140. package/dist/browser/v2/announce.js +94 -0
  141. package/dist/browser/v2/announce.js.map +1 -0
  142. package/dist/browser/v2/attach-live.js +280 -0
  143. package/dist/browser/v2/attach-live.js.map +1 -0
  144. package/dist/browser/v2/attach.js +432 -0
  145. package/dist/browser/v2/attach.js.map +1 -0
  146. package/dist/browser/v2/bar-fold.js +405 -0
  147. package/dist/browser/v2/bar-fold.js.map +1 -0
  148. package/dist/browser/v2/behavior/adapter.js +378 -0
  149. package/dist/browser/v2/behavior/adapter.js.map +1 -0
  150. package/dist/browser/v2/behavior/bind.js +43 -0
  151. package/dist/browser/v2/behavior/bind.js.map +1 -0
  152. package/dist/browser/v2/behavior/board.js +184 -0
  153. package/dist/browser/v2/behavior/board.js.map +1 -0
  154. package/dist/browser/v2/behavior/calendar.js +39 -0
  155. package/dist/browser/v2/behavior/calendar.js.map +1 -0
  156. package/dist/browser/v2/behavior/code.js +25 -0
  157. package/dist/browser/v2/behavior/code.js.map +1 -0
  158. package/dist/browser/v2/behavior/controls.js +58 -0
  159. package/dist/browser/v2/behavior/controls.js.map +1 -0
  160. package/dist/browser/v2/behavior/dates.js +8 -0
  161. package/dist/browser/v2/behavior/dates.js.map +1 -0
  162. package/dist/browser/v2/behavior/dnd.js +545 -0
  163. package/dist/browser/v2/behavior/dnd.js.map +1 -0
  164. package/dist/browser/v2/behavior/files.js +43 -0
  165. package/dist/browser/v2/behavior/files.js.map +1 -0
  166. package/dist/browser/v2/behavior/layer.js +3 -0
  167. package/dist/browser/v2/behavior/layer.js.map +1 -0
  168. package/dist/browser/v2/behavior/lists.js +102 -0
  169. package/dist/browser/v2/behavior/lists.js.map +1 -0
  170. package/dist/browser/v2/behavior/menu.js +97 -0
  171. package/dist/browser/v2/behavior/menu.js.map +1 -0
  172. package/dist/browser/v2/behavior/messages.js +200 -0
  173. package/dist/browser/v2/behavior/messages.js.map +1 -0
  174. package/dist/browser/v2/behavior/overlays.js +304 -0
  175. package/dist/browser/v2/behavior/overlays.js.map +1 -0
  176. package/dist/browser/v2/behavior/pickers.js +86 -0
  177. package/dist/browser/v2/behavior/pickers.js.map +1 -0
  178. package/dist/browser/v2/behavior/resize.js +147 -0
  179. package/dist/browser/v2/behavior/resize.js.map +1 -0
  180. package/dist/browser/v2/behavior/segmented.js +17 -0
  181. package/dist/browser/v2/behavior/segmented.js.map +1 -0
  182. package/dist/browser/v2/behavior/select.js +134 -0
  183. package/dist/browser/v2/behavior/select.js.map +1 -0
  184. package/dist/browser/v2/behavior/time-input.js +95 -0
  185. package/dist/browser/v2/behavior/time-input.js.map +1 -0
  186. package/dist/browser/v2/behavior/time-text.js +83 -0
  187. package/dist/browser/v2/behavior/time-text.js.map +1 -0
  188. package/dist/browser/v2/behavior/tip.js +31 -0
  189. package/dist/browser/v2/behavior/tip.js.map +1 -0
  190. package/dist/browser/v2/behavior/toast.js +152 -0
  191. package/dist/browser/v2/behavior/toast.js.map +1 -0
  192. package/dist/browser/v2/behavior/treegrid.js +75 -0
  193. package/dist/browser/v2/behavior/treegrid.js.map +1 -0
  194. package/dist/browser/v2/board-messages.js +70 -0
  195. package/dist/browser/v2/board-messages.js.map +1 -0
  196. package/dist/browser/v2/board.js +471 -0
  197. package/dist/browser/v2/board.js.map +1 -0
  198. package/dist/browser/v2/button-failure.js +90 -0
  199. package/dist/browser/v2/button-failure.js.map +1 -0
  200. package/dist/browser/v2/button.js +309 -0
  201. package/dist/browser/v2/button.js.map +1 -0
  202. package/dist/browser/v2/colors.js +135 -0
  203. package/dist/browser/v2/colors.js.map +1 -0
  204. package/dist/browser/v2/columns-context.js +48 -0
  205. package/dist/browser/v2/columns-context.js.map +1 -0
  206. package/dist/browser/v2/components.js +2096 -0
  207. package/dist/browser/v2/components.js.map +1 -0
  208. package/dist/browser/v2/content.js +2195 -0
  209. package/dist/browser/v2/content.js.map +1 -0
  210. package/dist/browser/v2/control-messages.js +115 -0
  211. package/dist/browser/v2/control-messages.js.map +1 -0
  212. package/dist/browser/v2/controls.js +2623 -0
  213. package/dist/browser/v2/controls.js.map +1 -0
  214. package/dist/browser/v2/danger-zone.js +47 -0
  215. package/dist/browser/v2/danger-zone.js.map +1 -0
  216. package/dist/browser/v2/date-messages.js +61 -0
  217. package/dist/browser/v2/date-messages.js.map +1 -0
  218. package/dist/browser/v2/date-picker.js +405 -0
  219. package/dist/browser/v2/date-picker.js.map +1 -0
  220. package/dist/browser/v2/date-week-window.js +264 -0
  221. package/dist/browser/v2/date-week-window.js.map +1 -0
  222. package/dist/browser/v2/date-weeks.js +30 -0
  223. package/dist/browser/v2/date-weeks.js.map +1 -0
  224. package/dist/browser/v2/day-bar.js +87 -0
  225. package/dist/browser/v2/day-bar.js.map +1 -0
  226. package/dist/browser/v2/describe.js +582 -0
  227. package/dist/browser/v2/describe.js.map +1 -0
  228. package/dist/browser/v2/draft.js +55 -0
  229. package/dist/browser/v2/draft.js.map +1 -0
  230. package/dist/browser/v2/emoji-picker.js +240 -0
  231. package/dist/browser/v2/emoji-picker.js.map +1 -0
  232. package/dist/browser/v2/ends.js +37 -0
  233. package/dist/browser/v2/ends.js.map +1 -0
  234. package/dist/browser/v2/error-screen.js +118 -0
  235. package/dist/browser/v2/error-screen.js.map +1 -0
  236. package/dist/browser/v2/failed.js +90 -0
  237. package/dist/browser/v2/failed.js.map +1 -0
  238. package/dist/browser/v2/figures.js +179 -0
  239. package/dist/browser/v2/figures.js.map +1 -0
  240. package/dist/browser/v2/filter-bar.js +3009 -0
  241. package/dist/browser/v2/filter-bar.js.map +1 -0
  242. package/dist/browser/v2/filter-messages.js +244 -0
  243. package/dist/browser/v2/filter-messages.js.map +1 -0
  244. package/dist/browser/v2/head-search.js +159 -0
  245. package/dist/browser/v2/head-search.js.map +1 -0
  246. package/dist/browser/v2/heat-days.js +91 -0
  247. package/dist/browser/v2/heat-days.js.map +1 -0
  248. package/dist/browser/v2/heat.js +260 -0
  249. package/dist/browser/v2/heat.js.map +1 -0
  250. package/dist/browser/v2/icon.js +48 -0
  251. package/dist/browser/v2/icon.js.map +1 -0
  252. package/dist/browser/v2/index.js +84 -0
  253. package/dist/browser/v2/index.js.map +1 -0
  254. package/dist/browser/v2/layout.js +2118 -0
  255. package/dist/browser/v2/layout.js.map +1 -0
  256. package/dist/browser/v2/link.js +9 -0
  257. package/dist/browser/v2/link.js.map +1 -0
  258. package/dist/browser/v2/list-group.js +57 -0
  259. package/dist/browser/v2/list-group.js.map +1 -0
  260. package/dist/browser/v2/list-query.js +736 -0
  261. package/dist/browser/v2/list-query.js.map +1 -0
  262. package/dist/browser/v2/lookup.js +431 -0
  263. package/dist/browser/v2/lookup.js.map +1 -0
  264. package/dist/browser/v2/marks.js +733 -0
  265. package/dist/browser/v2/marks.js.map +1 -0
  266. package/dist/browser/v2/menu-panel.js +241 -0
  267. package/dist/browser/v2/menu-panel.js.map +1 -0
  268. package/dist/browser/v2/menu.js +797 -0
  269. package/dist/browser/v2/menu.js.map +1 -0
  270. package/dist/browser/v2/nav-drop.js +25 -0
  271. package/dist/browser/v2/nav-drop.js.map +1 -0
  272. package/dist/browser/v2/nav-face.js +16 -0
  273. package/dist/browser/v2/nav-face.js.map +1 -0
  274. package/dist/browser/v2/nav-tree.js +498 -0
  275. package/dist/browser/v2/nav-tree.js.map +1 -0
  276. package/dist/browser/v2/now-line.js +61 -0
  277. package/dist/browser/v2/now-line.js.map +1 -0
  278. package/dist/browser/v2/overlay-messages.js +41 -0
  279. package/dist/browser/v2/overlay-messages.js.map +1 -0
  280. package/dist/browser/v2/overlays.js +431 -0
  281. package/dist/browser/v2/overlays.js.map +1 -0
  282. package/dist/browser/v2/page-layer.js +42 -0
  283. package/dist/browser/v2/page-layer.js.map +1 -0
  284. package/dist/browser/v2/pane-name.js +55 -0
  285. package/dist/browser/v2/pane-name.js.map +1 -0
  286. package/dist/browser/v2/pane-print.js +32 -0
  287. package/dist/browser/v2/pane-print.js.map +1 -0
  288. package/dist/browser/v2/pane-sheet.js +147 -0
  289. package/dist/browser/v2/pane-sheet.js.map +1 -0
  290. package/dist/browser/v2/popover.js +152 -0
  291. package/dist/browser/v2/popover.js.map +1 -0
  292. package/dist/browser/v2/reaction-messages.js +31 -0
  293. package/dist/browser/v2/reaction-messages.js.map +1 -0
  294. package/dist/browser/v2/reactions.js +239 -0
  295. package/dist/browser/v2/reactions.js.map +1 -0
  296. package/dist/browser/v2/row-drag.js +19 -0
  297. package/dist/browser/v2/row-drag.js.map +1 -0
  298. package/dist/browser/v2/section-level.js +9 -0
  299. package/dist/browser/v2/section-level.js.map +1 -0
  300. package/dist/browser/v2/segmented.js +146 -0
  301. package/dist/browser/v2/segmented.js.map +1 -0
  302. package/dist/browser/v2/select-live.js +162 -0
  303. package/dist/browser/v2/select-live.js.map +1 -0
  304. package/dist/browser/v2/setting-messages.js +25 -0
  305. package/dist/browser/v2/setting-messages.js.map +1 -0
  306. package/dist/browser/v2/split-button.js +82 -0
  307. package/dist/browser/v2/split-button.js.map +1 -0
  308. package/dist/browser/v2/states.js +208 -0
  309. package/dist/browser/v2/states.js.map +1 -0
  310. package/dist/browser/v2/status-toolbar.js +23 -0
  311. package/dist/browser/v2/status-toolbar.js.map +1 -0
  312. package/dist/browser/v2/structure.js +503 -0
  313. package/dist/browser/v2/structure.js.map +1 -0
  314. package/dist/browser/v2/testing/index.js +26 -0
  315. package/dist/browser/v2/testing/index.js.map +1 -0
  316. package/dist/browser/v2/testing/measure-v2-layout.js +1024 -0
  317. package/dist/browser/v2/testing/measure-v2-layout.js.map +1 -0
  318. package/dist/browser/v2/testing/settled.js +58 -0
  319. package/dist/browser/v2/testing/settled.js.map +1 -0
  320. package/dist/browser/v2/testing/visible.js +14 -0
  321. package/dist/browser/v2/testing/visible.js.map +1 -0
  322. package/dist/browser/v2/toast-host.js +18 -0
  323. package/dist/browser/v2/toast-host.js.map +1 -0
  324. package/dist/browser/v2/toast.js +241 -0
  325. package/dist/browser/v2/toast.js.map +1 -0
  326. package/dist/browser/v2/tokens.js +97 -0
  327. package/dist/browser/v2/tokens.js.map +1 -0
  328. package/dist/browser/v2/tree-messages.js +32 -0
  329. package/dist/browser/v2/tree-messages.js.map +1 -0
  330. package/dist/browser/v2/types.js +71 -0
  331. package/dist/browser/v2/types.js.map +1 -0
  332. package/dist/browser/v2/unsaved-bar.js +225 -0
  333. package/dist/browser/v2/unsaved-bar.js.map +1 -0
  334. package/dist/browser/v2/unsaved-messages.js +65 -0
  335. package/dist/browser/v2/unsaved-messages.js.map +1 -0
  336. package/dist/browser/v2/width-cookie.js +45 -0
  337. package/dist/browser/v2/width-cookie.js.map +1 -0
  338. package/dist/browser/v2/workspace-messages.js +31 -0
  339. package/dist/browser/v2/workspace-messages.js.map +1 -0
  340. package/dist/browser/widgets/Dashboard.js +3 -2
  341. package/dist/browser/widgets/Dashboard.js.map +1 -1
  342. package/dist/ssr/actions/Dropdown.js +2 -1
  343. package/dist/ssr/actions/Dropdown.js.map +1 -1
  344. package/dist/ssr/actions/FilterChip.js +3 -2
  345. package/dist/ssr/actions/FilterChip.js.map +1 -1
  346. package/dist/ssr/actions/SegmentedControl.js +2 -2
  347. package/dist/ssr/actions/SegmentedControl.js.map +1 -1
  348. package/dist/ssr/charts/core/line-details.js +52 -12
  349. package/dist/ssr/charts/core/line-details.js.map +1 -1
  350. package/dist/ssr/charts/core/line-extras.js +122 -0
  351. package/dist/ssr/charts/core/line-extras.js.map +1 -0
  352. package/dist/ssr/charts/core/line-options.js +1 -1
  353. package/dist/ssr/charts/core/line-options.js.map +1 -1
  354. package/dist/ssr/charts/core/snapshot.js +3 -2
  355. package/dist/ssr/charts/core/snapshot.js.map +1 -1
  356. package/dist/ssr/charts/core/svg-barGauge.js +2 -2
  357. package/dist/ssr/charts/core/svg-barGauge.js.map +1 -1
  358. package/dist/ssr/charts/core/svg-common.js +22 -1
  359. package/dist/ssr/charts/core/svg-common.js.map +1 -1
  360. package/dist/ssr/charts/core/svg-renderers.js +2 -2
  361. package/dist/ssr/charts/core/svg-renderers.js.map +1 -1
  362. package/dist/ssr/chat/ChatDecision.js +5 -4
  363. package/dist/ssr/chat/ChatDecision.js.map +1 -1
  364. package/dist/ssr/chat/ChatPrimitives.js +7 -5
  365. package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
  366. package/dist/ssr/content/Calendar.js +410 -323
  367. package/dist/ssr/content/Calendar.js.map +1 -1
  368. package/dist/ssr/content/CalendarDayView.js +122 -49
  369. package/dist/ssr/content/CalendarDayView.js.map +1 -1
  370. package/dist/ssr/content/CalendarWeekView.js +152 -49
  371. package/dist/ssr/content/CalendarWeekView.js.map +1 -1
  372. package/dist/ssr/content/ChartRoot.js +82 -16
  373. package/dist/ssr/content/ChartRoot.js.map +1 -1
  374. package/dist/ssr/content/MarkdownView.js +3 -1
  375. package/dist/ssr/content/MarkdownView.js.map +1 -1
  376. package/dist/ssr/content/ReferenceChip.js +2 -1
  377. package/dist/ssr/content/ReferenceChip.js.map +1 -1
  378. package/dist/ssr/content/calendar-days.js +114 -26
  379. package/dist/ssr/content/calendar-days.js.map +1 -1
  380. package/dist/ssr/content/calendar-event-detail.js +46 -10
  381. package/dist/ssr/content/calendar-event-detail.js.map +1 -1
  382. package/dist/ssr/content/calendar-events.js +107 -0
  383. package/dist/ssr/content/calendar-events.js.map +1 -0
  384. package/dist/ssr/content/calendar-messages.js +28 -2
  385. package/dist/ssr/content/calendar-messages.js.map +1 -1
  386. package/dist/ssr/content/calendar-month-layout.js +89 -5
  387. package/dist/ssr/content/calendar-month-layout.js.map +1 -1
  388. package/dist/ssr/content/calendar-month-scroll.js +2 -1
  389. package/dist/ssr/content/calendar-month-scroll.js.map +1 -1
  390. package/dist/ssr/content/calendar-overflow.browser-suite.js +534 -0
  391. package/dist/ssr/content/calendar-overflow.browser-suite.js.map +1 -0
  392. package/dist/ssr/content/calendar-overflow.js +272 -0
  393. package/dist/ssr/content/calendar-overflow.js.map +1 -0
  394. package/dist/ssr/content/calendar-shared.js +47 -42
  395. package/dist/ssr/content/calendar-shared.js.map +1 -1
  396. package/dist/ssr/content/calendar-snapshot.js +71 -0
  397. package/dist/ssr/content/calendar-snapshot.js.map +1 -0
  398. package/dist/ssr/content/calendar-time-view.js +319 -136
  399. package/dist/ssr/content/calendar-time-view.js.map +1 -1
  400. package/dist/ssr/content/chart-bar.js +3 -3
  401. package/dist/ssr/content/chart-bar.js.map +1 -1
  402. package/dist/ssr/content/chart-calendar.js +2 -1
  403. package/dist/ssr/content/chart-calendar.js.map +1 -1
  404. package/dist/ssr/content/chart-inspection-mount.js +1 -1
  405. package/dist/ssr/content/chart-inspection-mount.js.map +1 -1
  406. package/dist/ssr/content/chart-line-gaps.js +1 -1
  407. package/dist/ssr/content/chart-line-gaps.js.map +1 -1
  408. package/dist/ssr/content/chart-message-catalog.js +6 -0
  409. package/dist/ssr/content/chart-message-catalog.js.map +1 -1
  410. package/dist/ssr/content/chart-state-timeline.js +45 -12
  411. package/dist/ssr/content/chart-state-timeline.js.map +1 -1
  412. package/dist/ssr/content/chart-svg.js +5 -1
  413. package/dist/ssr/content/chart-svg.js.map +1 -1
  414. package/dist/ssr/content/chart-tick-room.js +23 -0
  415. package/dist/ssr/content/chart-tick-room.js.map +1 -1
  416. package/dist/ssr/content/index.js +3 -0
  417. package/dist/ssr/content/index.js.map +1 -1
  418. package/dist/ssr/content/markdown-info-blocks.js +1 -1
  419. package/dist/ssr/content/markdown-info-blocks.js.map +1 -1
  420. package/dist/ssr/content/markdown-links.js +36 -2
  421. package/dist/ssr/content/markdown-links.js.map +1 -1
  422. package/dist/ssr/feedback/prompt-form-loader.js +3 -2
  423. package/dist/ssr/feedback/prompt-form-loader.js.map +1 -1
  424. package/dist/ssr/feedback/toast.js +21 -1
  425. package/dist/ssr/feedback/toast.js.map +1 -1
  426. package/dist/ssr/inputs/AutocompleteSelect.js +2 -1
  427. package/dist/ssr/inputs/AutocompleteSelect.js.map +1 -1
  428. package/dist/ssr/inputs/ChoiceInputs.js +3 -2
  429. package/dist/ssr/inputs/ChoiceInputs.js.map +1 -1
  430. package/dist/ssr/inputs/ColorChoices.js +2 -1
  431. package/dist/ssr/inputs/ColorChoices.js.map +1 -1
  432. package/dist/ssr/inputs/RichSelect.js +2 -1
  433. package/dist/ssr/inputs/RichSelect.js.map +1 -1
  434. package/dist/ssr/inputs/Select.js +3 -2
  435. package/dist/ssr/inputs/Select.js.map +1 -1
  436. package/dist/ssr/inputs/date-picker.js +9 -0
  437. package/dist/ssr/inputs/date-picker.js.map +1 -1
  438. package/dist/ssr/inputs/markdown/Toolbar.js +6 -1
  439. package/dist/ssr/inputs/markdown/Toolbar.js.map +1 -1
  440. package/dist/ssr/internal/color.js +25 -0
  441. package/dist/ssr/internal/color.js.map +1 -1
  442. package/dist/ssr/internal/pending-loads.js +17 -0
  443. package/dist/ssr/internal/pending-loads.js.map +1 -0
  444. package/dist/ssr/intl/messages.js +16 -0
  445. package/dist/ssr/intl/messages.js.map +1 -1
  446. package/dist/ssr/layout/AppWorkspace.js +6 -0
  447. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  448. package/dist/ssr/layout/DetailSections.js +19 -10
  449. package/dist/ssr/layout/DetailSections.js.map +1 -1
  450. package/dist/ssr/layout/FloatingWindow.js +2 -1
  451. package/dist/ssr/layout/FloatingWindow.js.map +1 -1
  452. package/dist/ssr/layout/Navigation.js +54 -26
  453. package/dist/ssr/layout/Navigation.js.map +1 -1
  454. package/dist/ssr/layout/Panes.js +32 -67
  455. package/dist/ssr/layout/Panes.js.map +1 -1
  456. package/dist/ssr/layout/SidebarSwitcher.js +7 -3
  457. package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
  458. package/dist/ssr/layout/navigation-model.js.map +1 -1
  459. package/dist/ssr/layout/panes-messages.js +0 -4
  460. package/dist/ssr/layout/panes-messages.js.map +1 -1
  461. package/dist/ssr/surfaces/Avatar.js +5 -2
  462. package/dist/ssr/surfaces/Avatar.js.map +1 -1
  463. package/dist/ssr/surfaces/NoticeCard.js +27 -20
  464. package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
  465. package/dist/ssr/surfaces/NoticeRow.js +10 -3
  466. package/dist/ssr/surfaces/NoticeRow.js.map +1 -1
  467. package/dist/ssr/surfaces/index.js +1 -1
  468. package/dist/ssr/surfaces/index.js.map +1 -1
  469. package/dist/ssr/surfaces/notice-card-classes.js +16 -0
  470. package/dist/ssr/surfaces/notice-card-classes.js.map +1 -0
  471. package/dist/ssr/surfaces/person-color.js +34 -4
  472. package/dist/ssr/surfaces/person-color.js.map +1 -1
  473. package/dist/ssr/v2/accent.js +114 -0
  474. package/dist/ssr/v2/accent.js.map +1 -0
  475. package/dist/ssr/v2/action-bar.js +88 -0
  476. package/dist/ssr/v2/action-bar.js.map +1 -0
  477. package/dist/ssr/v2/addresses.js +135 -0
  478. package/dist/ssr/v2/addresses.js.map +1 -0
  479. package/dist/ssr/v2/announce.js +93 -0
  480. package/dist/ssr/v2/announce.js.map +1 -0
  481. package/dist/ssr/v2/attach-live.js +279 -0
  482. package/dist/ssr/v2/attach-live.js.map +1 -0
  483. package/dist/ssr/v2/attach.js +432 -0
  484. package/dist/ssr/v2/attach.js.map +1 -0
  485. package/dist/ssr/v2/bar-fold.js +405 -0
  486. package/dist/ssr/v2/bar-fold.js.map +1 -0
  487. package/dist/ssr/v2/behavior/adapter.js +378 -0
  488. package/dist/ssr/v2/behavior/adapter.js.map +1 -0
  489. package/dist/ssr/v2/behavior/bind.js +43 -0
  490. package/dist/ssr/v2/behavior/bind.js.map +1 -0
  491. package/dist/ssr/v2/behavior/board.js +184 -0
  492. package/dist/ssr/v2/behavior/board.js.map +1 -0
  493. package/dist/ssr/v2/behavior/calendar.js +39 -0
  494. package/dist/ssr/v2/behavior/calendar.js.map +1 -0
  495. package/dist/ssr/v2/behavior/code.js +25 -0
  496. package/dist/ssr/v2/behavior/code.js.map +1 -0
  497. package/dist/ssr/v2/behavior/controls.js +58 -0
  498. package/dist/ssr/v2/behavior/controls.js.map +1 -0
  499. package/dist/ssr/v2/behavior/dates.js +8 -0
  500. package/dist/ssr/v2/behavior/dates.js.map +1 -0
  501. package/dist/ssr/v2/behavior/dnd.js +545 -0
  502. package/dist/ssr/v2/behavior/dnd.js.map +1 -0
  503. package/dist/ssr/v2/behavior/files.js +43 -0
  504. package/dist/ssr/v2/behavior/files.js.map +1 -0
  505. package/dist/ssr/v2/behavior/layer.js +3 -0
  506. package/dist/ssr/v2/behavior/layer.js.map +1 -0
  507. package/dist/ssr/v2/behavior/lists.js +102 -0
  508. package/dist/ssr/v2/behavior/lists.js.map +1 -0
  509. package/dist/ssr/v2/behavior/menu.js +91 -0
  510. package/dist/ssr/v2/behavior/menu.js.map +1 -0
  511. package/dist/ssr/v2/behavior/messages.js +200 -0
  512. package/dist/ssr/v2/behavior/messages.js.map +1 -0
  513. package/dist/ssr/v2/behavior/overlays.js +293 -0
  514. package/dist/ssr/v2/behavior/overlays.js.map +1 -0
  515. package/dist/ssr/v2/behavior/pickers.js +86 -0
  516. package/dist/ssr/v2/behavior/pickers.js.map +1 -0
  517. package/dist/ssr/v2/behavior/resize.js +147 -0
  518. package/dist/ssr/v2/behavior/resize.js.map +1 -0
  519. package/dist/ssr/v2/behavior/segmented.js +17 -0
  520. package/dist/ssr/v2/behavior/segmented.js.map +1 -0
  521. package/dist/ssr/v2/behavior/select.js +133 -0
  522. package/dist/ssr/v2/behavior/select.js.map +1 -0
  523. package/dist/ssr/v2/behavior/time-input.js +95 -0
  524. package/dist/ssr/v2/behavior/time-input.js.map +1 -0
  525. package/dist/ssr/v2/behavior/time-text.js +83 -0
  526. package/dist/ssr/v2/behavior/time-text.js.map +1 -0
  527. package/dist/ssr/v2/behavior/tip.js +31 -0
  528. package/dist/ssr/v2/behavior/tip.js.map +1 -0
  529. package/dist/ssr/v2/behavior/toast.js +152 -0
  530. package/dist/ssr/v2/behavior/toast.js.map +1 -0
  531. package/dist/ssr/v2/behavior/treegrid.js +75 -0
  532. package/dist/ssr/v2/behavior/treegrid.js.map +1 -0
  533. package/dist/ssr/v2/board-messages.js +70 -0
  534. package/dist/ssr/v2/board-messages.js.map +1 -0
  535. package/dist/ssr/v2/board.js +388 -0
  536. package/dist/ssr/v2/board.js.map +1 -0
  537. package/dist/ssr/v2/button-failure.js +90 -0
  538. package/dist/ssr/v2/button-failure.js.map +1 -0
  539. package/dist/ssr/v2/button.js +304 -0
  540. package/dist/ssr/v2/button.js.map +1 -0
  541. package/dist/ssr/v2/colors.js +135 -0
  542. package/dist/ssr/v2/colors.js.map +1 -0
  543. package/dist/ssr/v2/columns-context.js +48 -0
  544. package/dist/ssr/v2/columns-context.js.map +1 -0
  545. package/dist/ssr/v2/components.js +1484 -0
  546. package/dist/ssr/v2/components.js.map +1 -0
  547. package/dist/ssr/v2/content.js +1497 -0
  548. package/dist/ssr/v2/content.js.map +1 -0
  549. package/dist/ssr/v2/control-messages.js +115 -0
  550. package/dist/ssr/v2/control-messages.js.map +1 -0
  551. package/dist/ssr/v2/controls.js +1888 -0
  552. package/dist/ssr/v2/controls.js.map +1 -0
  553. package/dist/ssr/v2/danger-zone.js +28 -0
  554. package/dist/ssr/v2/danger-zone.js.map +1 -0
  555. package/dist/ssr/v2/date-messages.js +61 -0
  556. package/dist/ssr/v2/date-messages.js.map +1 -0
  557. package/dist/ssr/v2/date-picker.js +351 -0
  558. package/dist/ssr/v2/date-picker.js.map +1 -0
  559. package/dist/ssr/v2/date-week-window.js +149 -0
  560. package/dist/ssr/v2/date-week-window.js.map +1 -0
  561. package/dist/ssr/v2/date-weeks.js +30 -0
  562. package/dist/ssr/v2/date-weeks.js.map +1 -0
  563. package/dist/ssr/v2/day-bar.js +52 -0
  564. package/dist/ssr/v2/day-bar.js.map +1 -0
  565. package/dist/ssr/v2/describe.js +582 -0
  566. package/dist/ssr/v2/describe.js.map +1 -0
  567. package/dist/ssr/v2/draft.js +55 -0
  568. package/dist/ssr/v2/draft.js.map +1 -0
  569. package/dist/ssr/v2/emoji-picker.js +182 -0
  570. package/dist/ssr/v2/emoji-picker.js.map +1 -0
  571. package/dist/ssr/v2/ends.js +27 -0
  572. package/dist/ssr/v2/ends.js.map +1 -0
  573. package/dist/ssr/v2/error-screen.js +73 -0
  574. package/dist/ssr/v2/error-screen.js.map +1 -0
  575. package/dist/ssr/v2/failed.js +63 -0
  576. package/dist/ssr/v2/failed.js.map +1 -0
  577. package/dist/ssr/v2/figures.js +101 -0
  578. package/dist/ssr/v2/figures.js.map +1 -0
  579. package/dist/ssr/v2/filter-bar.js +2495 -0
  580. package/dist/ssr/v2/filter-bar.js.map +1 -0
  581. package/dist/ssr/v2/filter-messages.js +244 -0
  582. package/dist/ssr/v2/filter-messages.js.map +1 -0
  583. package/dist/ssr/v2/head-search.js +159 -0
  584. package/dist/ssr/v2/head-search.js.map +1 -0
  585. package/dist/ssr/v2/heat-days.js +91 -0
  586. package/dist/ssr/v2/heat-days.js.map +1 -0
  587. package/dist/ssr/v2/heat.js +145 -0
  588. package/dist/ssr/v2/heat.js.map +1 -0
  589. package/dist/ssr/v2/icon.js +18 -0
  590. package/dist/ssr/v2/icon.js.map +1 -0
  591. package/dist/ssr/v2/index.js +84 -0
  592. package/dist/ssr/v2/index.js.map +1 -0
  593. package/dist/ssr/v2/layout.js +1483 -0
  594. package/dist/ssr/v2/layout.js.map +1 -0
  595. package/dist/ssr/v2/link.js +9 -0
  596. package/dist/ssr/v2/link.js.map +1 -0
  597. package/dist/ssr/v2/list-group.js +37 -0
  598. package/dist/ssr/v2/list-group.js.map +1 -0
  599. package/dist/ssr/v2/list-query.js +736 -0
  600. package/dist/ssr/v2/list-query.js.map +1 -0
  601. package/dist/ssr/v2/lookup.js +333 -0
  602. package/dist/ssr/v2/lookup.js.map +1 -0
  603. package/dist/ssr/v2/marks.js +433 -0
  604. package/dist/ssr/v2/marks.js.map +1 -0
  605. package/dist/ssr/v2/menu-panel.js +217 -0
  606. package/dist/ssr/v2/menu-panel.js.map +1 -0
  607. package/dist/ssr/v2/menu.js +733 -0
  608. package/dist/ssr/v2/menu.js.map +1 -0
  609. package/dist/ssr/v2/nav-drop.js +25 -0
  610. package/dist/ssr/v2/nav-drop.js.map +1 -0
  611. package/dist/ssr/v2/nav-face.js +16 -0
  612. package/dist/ssr/v2/nav-face.js.map +1 -0
  613. package/dist/ssr/v2/nav-tree.js +436 -0
  614. package/dist/ssr/v2/nav-tree.js.map +1 -0
  615. package/dist/ssr/v2/now-line.js +44 -0
  616. package/dist/ssr/v2/now-line.js.map +1 -0
  617. package/dist/ssr/v2/overlay-messages.js +41 -0
  618. package/dist/ssr/v2/overlay-messages.js.map +1 -0
  619. package/dist/ssr/v2/overlays.js +365 -0
  620. package/dist/ssr/v2/overlays.js.map +1 -0
  621. package/dist/ssr/v2/page-layer.js +41 -0
  622. package/dist/ssr/v2/page-layer.js.map +1 -0
  623. package/dist/ssr/v2/pane-name.js +33 -0
  624. package/dist/ssr/v2/pane-name.js.map +1 -0
  625. package/dist/ssr/v2/pane-print.js +32 -0
  626. package/dist/ssr/v2/pane-print.js.map +1 -0
  627. package/dist/ssr/v2/pane-sheet.js +147 -0
  628. package/dist/ssr/v2/pane-sheet.js.map +1 -0
  629. package/dist/ssr/v2/popover.js +144 -0
  630. package/dist/ssr/v2/popover.js.map +1 -0
  631. package/dist/ssr/v2/reaction-messages.js +31 -0
  632. package/dist/ssr/v2/reaction-messages.js.map +1 -0
  633. package/dist/ssr/v2/reactions.js +200 -0
  634. package/dist/ssr/v2/reactions.js.map +1 -0
  635. package/dist/ssr/v2/row-drag.js +19 -0
  636. package/dist/ssr/v2/row-drag.js.map +1 -0
  637. package/dist/ssr/v2/section-level.js +9 -0
  638. package/dist/ssr/v2/section-level.js.map +1 -0
  639. package/dist/ssr/v2/segmented.js +104 -0
  640. package/dist/ssr/v2/segmented.js.map +1 -0
  641. package/dist/ssr/v2/select-live.js +142 -0
  642. package/dist/ssr/v2/select-live.js.map +1 -0
  643. package/dist/ssr/v2/setting-messages.js +25 -0
  644. package/dist/ssr/v2/setting-messages.js.map +1 -0
  645. package/dist/ssr/v2/split-button.js +66 -0
  646. package/dist/ssr/v2/split-button.js.map +1 -0
  647. package/dist/ssr/v2/states.js +140 -0
  648. package/dist/ssr/v2/states.js.map +1 -0
  649. package/dist/ssr/v2/status-toolbar.js +23 -0
  650. package/dist/ssr/v2/status-toolbar.js.map +1 -0
  651. package/dist/ssr/v2/structure.js +382 -0
  652. package/dist/ssr/v2/structure.js.map +1 -0
  653. package/dist/ssr/v2/testing/index.js +26 -0
  654. package/dist/ssr/v2/testing/index.js.map +1 -0
  655. package/dist/ssr/v2/testing/measure-v2-layout.js +1024 -0
  656. package/dist/ssr/v2/testing/measure-v2-layout.js.map +1 -0
  657. package/dist/ssr/v2/testing/settled.js +58 -0
  658. package/dist/ssr/v2/testing/settled.js.map +1 -0
  659. package/dist/ssr/v2/testing/visible.js +14 -0
  660. package/dist/ssr/v2/testing/visible.js.map +1 -0
  661. package/dist/ssr/v2/toast-host.js +18 -0
  662. package/dist/ssr/v2/toast-host.js.map +1 -0
  663. package/dist/ssr/v2/toast.js +222 -0
  664. package/dist/ssr/v2/toast.js.map +1 -0
  665. package/dist/ssr/v2/tokens.js +97 -0
  666. package/dist/ssr/v2/tokens.js.map +1 -0
  667. package/dist/ssr/v2/tree-messages.js +32 -0
  668. package/dist/ssr/v2/tree-messages.js.map +1 -0
  669. package/dist/ssr/v2/types.js +71 -0
  670. package/dist/ssr/v2/types.js.map +1 -0
  671. package/dist/ssr/v2/unsaved-bar.js +183 -0
  672. package/dist/ssr/v2/unsaved-bar.js.map +1 -0
  673. package/dist/ssr/v2/unsaved-messages.js +65 -0
  674. package/dist/ssr/v2/unsaved-messages.js.map +1 -0
  675. package/dist/ssr/v2/width-cookie.js +45 -0
  676. package/dist/ssr/v2/width-cookie.js.map +1 -0
  677. package/dist/ssr/v2/workspace-messages.js +31 -0
  678. package/dist/ssr/v2/workspace-messages.js.map +1 -0
  679. package/dist/ssr/widgets/Dashboard.js +3 -2
  680. package/dist/ssr/widgets/Dashboard.js.map +1 -1
  681. package/dist/styles.css +1 -1
  682. package/dist/tabler.css +1 -1
  683. package/dist/types/actions/SegmentedControl.d.ts +4 -0
  684. package/dist/types/charts/core/line-extras.d.ts +33 -0
  685. package/dist/types/charts/core/line-options.d.ts +3 -0
  686. package/dist/types/charts/core/svg-common.d.ts +49 -2
  687. package/dist/types/content/Calendar.d.ts +14 -2
  688. package/dist/types/content/MarkdownView.d.ts +2 -0
  689. package/dist/types/content/calendar-days.d.ts +52 -2
  690. package/dist/types/content/calendar-events.d.ts +35 -0
  691. package/dist/types/content/calendar-messages.d.ts +13 -0
  692. package/dist/types/content/calendar-month-layout.d.ts +44 -4
  693. package/dist/types/content/calendar-month-scroll.d.ts +2 -1
  694. package/dist/types/content/calendar-overflow.browser-suite.d.ts +37 -0
  695. package/dist/types/content/calendar-overflow.d.ts +30 -0
  696. package/dist/types/content/calendar-shared.d.ts +9 -11
  697. package/dist/types/content/calendar-snapshot.d.ts +28 -0
  698. package/dist/types/content/calendar-time-view.d.ts +37 -12
  699. package/dist/types/content/chart-bar.d.ts +1 -1
  700. package/dist/types/content/chart-inspection-mount.d.ts +1 -1
  701. package/dist/types/content/chart-line-gaps.d.ts +1 -1
  702. package/dist/types/content/chart-message-catalog.d.ts +6 -0
  703. package/dist/types/content/chart-state-timeline.d.ts +20 -0
  704. package/dist/types/content/chart-tick-room.d.ts +8 -0
  705. package/dist/types/content/index.d.ts +3 -0
  706. package/dist/types/content/markdown-links.d.ts +2 -1
  707. package/dist/types/inputs/date-picker.d.ts +2 -0
  708. package/dist/types/internal/color.d.ts +8 -0
  709. package/dist/types/internal/pending-loads.d.ts +8 -0
  710. package/dist/types/intl/messages.d.ts +8 -0
  711. package/dist/types/layout/AppWorkspace.d.ts +5 -0
  712. package/dist/types/layout/DetailSections.d.ts +11 -1
  713. package/dist/types/layout/Panes.d.ts +2 -2
  714. package/dist/types/layout/navigation-model.d.ts +5 -0
  715. package/dist/types/layout/panes-messages.d.ts +0 -2
  716. package/dist/types/surfaces/NoticeCard.d.ts +9 -13
  717. package/dist/types/surfaces/NoticeRow.d.ts +6 -1
  718. package/dist/types/surfaces/index.d.ts +1 -1
  719. package/dist/types/surfaces/notice-card-classes.d.ts +14 -0
  720. package/dist/types/surfaces/person-color.d.ts +27 -4
  721. package/dist/types/v2/accent.d.ts +24 -0
  722. package/dist/types/v2/action-bar.d.ts +37 -0
  723. package/dist/types/v2/addresses.d.ts +26 -0
  724. package/dist/types/v2/announce.d.ts +17 -0
  725. package/dist/types/v2/attach-live.d.ts +21 -0
  726. package/dist/types/v2/attach.d.ts +37 -0
  727. package/dist/types/v2/bar-fold.d.ts +40 -0
  728. package/dist/types/v2/behavior/adapter.d.ts +69 -0
  729. package/dist/types/v2/behavior/bind.d.ts +14 -0
  730. package/dist/types/v2/behavior/board.d.ts +45 -0
  731. package/dist/types/v2/behavior/calendar.d.ts +35 -0
  732. package/dist/types/v2/behavior/code.d.ts +27 -0
  733. package/dist/types/v2/behavior/controls.d.ts +51 -0
  734. package/dist/types/v2/behavior/dates.d.ts +7 -0
  735. package/dist/types/v2/behavior/dnd.d.ts +61 -0
  736. package/dist/types/v2/behavior/files.d.ts +44 -0
  737. package/dist/types/v2/behavior/layer.d.ts +1 -0
  738. package/dist/types/v2/behavior/lists.d.ts +91 -0
  739. package/dist/types/v2/behavior/menu.d.ts +56 -0
  740. package/dist/types/v2/behavior/messages.d.ts +72 -0
  741. package/dist/types/v2/behavior/overlays.d.ts +126 -0
  742. package/dist/types/v2/behavior/pickers.d.ts +62 -0
  743. package/dist/types/v2/behavior/resize.d.ts +57 -0
  744. package/dist/types/v2/behavior/segmented.d.ts +18 -0
  745. package/dist/types/v2/behavior/select.d.ts +73 -0
  746. package/dist/types/v2/behavior/time-input.d.ts +36 -0
  747. package/dist/types/v2/behavior/time-text.d.ts +14 -0
  748. package/dist/types/v2/behavior/tip.d.ts +17 -0
  749. package/dist/types/v2/behavior/toast.d.ts +90 -0
  750. package/dist/types/v2/behavior/treegrid.d.ts +40 -0
  751. package/dist/types/v2/board-messages.d.ts +22 -0
  752. package/dist/types/v2/board.d.ts +79 -0
  753. package/dist/types/v2/button-failure.d.ts +18 -0
  754. package/dist/types/v2/button.d.ts +126 -0
  755. package/dist/types/v2/colors.d.ts +42 -0
  756. package/dist/types/v2/columns-context.d.ts +50 -0
  757. package/dist/types/v2/components.d.ts +519 -0
  758. package/dist/types/v2/content.d.ts +478 -0
  759. package/dist/types/v2/control-messages.d.ts +55 -0
  760. package/dist/types/v2/controls.d.ts +551 -0
  761. package/dist/types/v2/danger-zone.d.ts +23 -0
  762. package/dist/types/v2/date-messages.d.ts +28 -0
  763. package/dist/types/v2/date-picker.d.ts +47 -0
  764. package/dist/types/v2/date-week-window.d.ts +22 -0
  765. package/dist/types/v2/date-weeks.d.ts +11 -0
  766. package/dist/types/v2/day-bar.d.ts +28 -0
  767. package/dist/types/v2/describe.d.ts +18 -0
  768. package/dist/types/v2/draft.d.ts +36 -0
  769. package/dist/types/v2/emoji-picker.d.ts +10 -0
  770. package/dist/types/v2/ends.d.ts +8 -0
  771. package/dist/types/v2/error-screen.d.ts +59 -0
  772. package/dist/types/v2/failed.d.ts +15 -0
  773. package/dist/types/v2/figures.d.ts +66 -0
  774. package/dist/types/v2/filter-bar.d.ts +111 -0
  775. package/dist/types/v2/filter-messages.d.ts +121 -0
  776. package/dist/types/v2/head-search.d.ts +13 -0
  777. package/dist/types/v2/heat-days.d.ts +44 -0
  778. package/dist/types/v2/heat.d.ts +40 -0
  779. package/dist/types/v2/icon.d.ts +16 -0
  780. package/dist/types/v2/index.d.ts +58 -0
  781. package/dist/types/v2/layout.d.ts +473 -0
  782. package/dist/types/v2/link.d.ts +7 -0
  783. package/dist/types/v2/list-group.d.ts +17 -0
  784. package/dist/types/v2/list-query.d.ts +432 -0
  785. package/dist/types/v2/lookup.d.ts +45 -0
  786. package/dist/types/v2/marks.d.ts +321 -0
  787. package/dist/types/v2/menu-panel.d.ts +7 -0
  788. package/dist/types/v2/menu.d.ts +192 -0
  789. package/dist/types/v2/nav-drop.d.ts +16 -0
  790. package/dist/types/v2/nav-face.d.ts +12 -0
  791. package/dist/types/v2/nav-tree.d.ts +66 -0
  792. package/dist/types/v2/now-line.d.ts +19 -0
  793. package/dist/types/v2/overlay-messages.d.ts +18 -0
  794. package/dist/types/v2/overlays.d.ts +105 -0
  795. package/dist/types/v2/page-layer.d.ts +12 -0
  796. package/dist/types/v2/pane-name.d.ts +14 -0
  797. package/dist/types/v2/pane-print.d.ts +8 -0
  798. package/dist/types/v2/pane-sheet.d.ts +9 -0
  799. package/dist/types/v2/popover.d.ts +21 -0
  800. package/dist/types/v2/reaction-messages.d.ts +9 -0
  801. package/dist/types/v2/reactions.d.ts +41 -0
  802. package/dist/types/v2/row-drag.d.ts +6 -0
  803. package/dist/types/v2/section-level.d.ts +6 -0
  804. package/dist/types/v2/segmented.d.ts +36 -0
  805. package/dist/types/v2/select-live.d.ts +7 -0
  806. package/dist/types/v2/setting-messages.d.ts +10 -0
  807. package/dist/types/v2/split-button.d.ts +24 -0
  808. package/dist/types/v2/states.d.ts +58 -0
  809. package/dist/types/v2/status-toolbar.d.ts +13 -0
  810. package/dist/types/v2/structure.d.ts +101 -0
  811. package/dist/types/v2/testing/index.d.ts +19 -0
  812. package/dist/types/v2/testing/measure-v2-layout.d.ts +120 -0
  813. package/dist/types/v2/testing/settled.d.ts +15 -0
  814. package/dist/types/v2/testing/visible.d.ts +9 -0
  815. package/dist/types/v2/toast-host.d.ts +8 -0
  816. package/dist/types/v2/toast.d.ts +47 -0
  817. package/dist/types/v2/tokens.d.ts +89 -0
  818. package/dist/types/v2/tree-messages.d.ts +15 -0
  819. package/dist/types/v2/types.d.ts +79 -0
  820. package/dist/types/v2/unsaved-bar.d.ts +47 -0
  821. package/dist/types/v2/unsaved-messages.d.ts +31 -0
  822. package/dist/types/v2/width-cookie.d.ts +19 -0
  823. package/dist/types/v2/workspace-messages.d.ts +15 -0
  824. package/dist/v2.css +13237 -0
  825. package/package.json +36 -8
  826. package/skills/k2b-ui/HANDOFF.md +77 -0
  827. package/skills/k2b-ui/SKILL.md +259 -0
  828. package/skills/k2b-ui/gold/code-policy-1440.png +0 -0
  829. package/skills/k2b-ui/gold/code-policy-390.png +0 -0
  830. package/skills/k2b-ui/gold/mail-mailbox-1440.png +0 -0
  831. package/skills/k2b-ui/gold/mail-mailbox-390.png +0 -0
  832. package/skills/k2b-ui/gold/notebooks-note-1440.png +0 -0
  833. package/skills/k2b-ui/gold/notebooks-note-390.png +0 -0
  834. package/skills/k2b-ui/gold/rhythm-after.png +0 -0
  835. package/skills/k2b-ui/gold/rhythm-before.png +0 -0
  836. package/skills/k2b-ui/gold/steps.png +0 -0
  837. package/skills/k2b-ui/images/actions-1440.png +0 -0
  838. package/skills/k2b-ui/images/actions-390.png +0 -0
  839. package/skills/k2b-ui/images/content-1440.png +0 -0
  840. package/skills/k2b-ui/images/content-390.png +0 -0
  841. package/skills/k2b-ui/images/conversations-1440.png +0 -0
  842. package/skills/k2b-ui/images/conversations-390.png +0 -0
  843. package/skills/k2b-ui/images/detail-sheet-1440.png +0 -0
  844. package/skills/k2b-ui/images/detail-sheet-390.png +0 -0
  845. package/skills/k2b-ui/images/dialogs-1440.png +0 -0
  846. package/skills/k2b-ui/images/dialogs-390.png +0 -0
  847. package/skills/k2b-ui/images/files-1440.png +0 -0
  848. package/skills/k2b-ui/images/files-390.png +0 -0
  849. package/skills/k2b-ui/images/filtered-table-1440.png +0 -0
  850. package/skills/k2b-ui/images/filtered-table-390.png +0 -0
  851. package/skills/k2b-ui/images/form-1440.png +0 -0
  852. package/skills/k2b-ui/images/form-390.png +0 -0
  853. package/skills/k2b-ui/images/form-detail-1440.png +0 -0
  854. package/skills/k2b-ui/images/form-detail-390.png +0 -0
  855. package/skills/k2b-ui/images/frame-1440.png +0 -0
  856. package/skills/k2b-ui/images/frame-390.png +0 -0
  857. package/skills/k2b-ui/images/home-1440.png +0 -0
  858. package/skills/k2b-ui/images/home-390.png +0 -0
  859. package/skills/k2b-ui/images/list-detail-1440.png +0 -0
  860. package/skills/k2b-ui/images/list-detail-390.png +0 -0
  861. package/skills/k2b-ui/images/mail-1440.png +0 -0
  862. package/skills/k2b-ui/images/mail-390.png +0 -0
  863. package/skills/k2b-ui/images/overview-1440.png +0 -0
  864. package/skills/k2b-ui/images/overview-390.png +0 -0
  865. package/skills/k2b-ui/images/public-page-1440.png +0 -0
  866. package/skills/k2b-ui/images/public-page-390.png +0 -0
  867. package/skills/k2b-ui/images/record-1440.png +0 -0
  868. package/skills/k2b-ui/images/record-390.png +0 -0
  869. package/skills/k2b-ui/images/record-groups-1440.png +0 -0
  870. package/skills/k2b-ui/images/record-groups-390.png +0 -0
  871. package/skills/k2b-ui/images/settings-1440.png +0 -0
  872. package/skills/k2b-ui/images/settings-390.png +0 -0
  873. package/skills/k2b-ui/images/settings-page-1440.png +0 -0
  874. package/skills/k2b-ui/images/settings-page-390.png +0 -0
  875. package/skills/k2b-ui/images/start-1440.png +0 -0
  876. package/skills/k2b-ui/images/start-390.png +0 -0
  877. package/skills/k2b-ui/images/states-1440.png +0 -0
  878. package/skills/k2b-ui/images/states-390.png +0 -0
  879. package/skills/k2b-ui/images/table-1440.png +0 -0
  880. package/skills/k2b-ui/images/table-390.png +0 -0
  881. package/skills/k2b-ui/images/tree-1440.png +0 -0
  882. package/skills/k2b-ui/images/tree-390.png +0 -0
  883. package/skills/k2b-ui/mockup/shoot.mjs +470 -0
  884. package/skills/k2b-ui/mockup/starter.html +607 -0
  885. package/skills/k2b-ui/port/check.mjs +48 -0
  886. package/skills/k2b-ui/recipes/actions.tsx +226 -0
  887. package/skills/k2b-ui/recipes/content.tsx +96 -0
  888. package/skills/k2b-ui/recipes/conversations.tsx +231 -0
  889. package/skills/k2b-ui/recipes/detail-sheet.tsx +87 -0
  890. package/skills/k2b-ui/recipes/dialogs.tsx +146 -0
  891. package/skills/k2b-ui/recipes/files.tsx +468 -0
  892. package/skills/k2b-ui/recipes/filtered-table.tsx +154 -0
  893. package/skills/k2b-ui/recipes/form-detail.tsx +143 -0
  894. package/skills/k2b-ui/recipes/form.tsx +95 -0
  895. package/skills/k2b-ui/recipes/frame.tsx +206 -0
  896. package/skills/k2b-ui/recipes/home.tsx +186 -0
  897. package/skills/k2b-ui/recipes/list-detail.tsx +140 -0
  898. package/skills/k2b-ui/recipes/mail.tsx +230 -0
  899. package/skills/k2b-ui/recipes/overview.tsx +303 -0
  900. package/skills/k2b-ui/recipes/public-page.tsx +315 -0
  901. package/skills/k2b-ui/recipes/record-groups.tsx +178 -0
  902. package/skills/k2b-ui/recipes/record.tsx +207 -0
  903. package/skills/k2b-ui/recipes/settings-page.tsx +269 -0
  904. package/skills/k2b-ui/recipes/settings.tsx +127 -0
  905. package/skills/k2b-ui/recipes/start.tsx +165 -0
  906. package/skills/k2b-ui/recipes/states.tsx +137 -0
  907. package/skills/k2b-ui/recipes/table.tsx +111 -0
  908. package/skills/k2b-ui/recipes/tree.tsx +109 -0
  909. package/skills/k2b-ui/references/gold.md +195 -0
  910. package/skills/k2b-ui/references/list-queries.md +74 -0
  911. package/skills/k2b-ui/references/look.md +468 -0
  912. package/skills/k2b-ui/references/mistakes.md +218 -0
  913. package/skills/k2b-ui/references/mockups.md +260 -0
  914. package/skills/k2b-ui/references/primitives.md +1438 -0
  915. package/skills/k2b-ui/references/recipes.md +515 -0
  916. package/skills/k2b-ui/references/seeing.md +78 -0
@@ -0,0 +1,1483 @@
1
+ import { ssrStyleProperty as _$ssrStyleProperty } from "solid-js/web";
2
+ import { memo as _$memo } from "solid-js/web";
3
+ import { ssrStyle as _$ssrStyle } from "solid-js/web";
4
+ import { ssr as _$ssr } from "solid-js/web";
5
+ import { createComponent as _$createComponent } from "solid-js/web";
6
+ import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
7
+ import { escape as _$escape } from "solid-js/web";
8
+ import { ssrElement as _$ssrElement } from "solid-js/web";
9
+ import { mergeProps as _$mergeProps } from "solid-js/web";
10
+ var _tmpl$ = ["<div class=\"k2-seam\"", ">", "</div>"],
11
+ _tmpl$2 = ["<div class=\"k2-seam-host\" data-k2-part=\"Seam\">", "</div>"],
12
+ _tmpl$3 = ["<aside id=\"", "\" class=\"k2-ws-side\" data-k2-column><div class=\"k2-ws-side-body\">", "</div></aside>"],
13
+ _tmpl$4 = ["<button type=\"button\" class=\"k2-btn k2-ws-toggle\" data-variant=\"ghost\" data-icon-only", ">", "</button>"],
14
+ _tmpl$5 = ["<button type=\"button\" class=\"k2-btn k2-ws-collapse\" data-variant=\"ghost\" data-icon-only aria-controls=\"", "\"", " aria-keyshortcuts=\"Control+Alt+S Meta+Alt+S\"", ">", "</button>"],
15
+ _tmpl$6 = ["<div class=\"k2-slot\" data-slot=\"head\"", ">", "", "</div>"],
16
+ _tmpl$7 = ["<div class=\"k2-slot\" data-slot=\"top\">", "</div>"],
17
+ _tmpl$8 = ["<style>", "</style>"],
18
+ _tmpl$9 = ["<div class=\"k2-ui\" data-k2-ws-failed style=\"", "\"><section class=\"k2-toasts\" data-k2-part=\"Toast\" role=\"alert\" popover=\"manual\"><ol><li class=\"k2-toast\" data-type=\"error\"><span class=\"k2-toast-text\">", "</span><button type=\"button\" class=\"k2-btn\" data-variant=\"text\"><span class=\"k2-btn-label\">", "</span></button></li></ol></section></div>"],
19
+ _tmpl$0 = ["<div class=\"k2-ws\" data-k2-workspace data-k2-part=\"Workspace\"", " style=\"", "\">", "<div class=\"k2-ws-main\" data-k2-column>", "", "", "</div>", "", "", "", "</div>"],
20
+ _tmpl$1 = ["<div class=\"k2-slot\" data-slot=\"head\"", ">", "</div>"],
21
+ _tmpl$10 = ["<div class=\"k2-slot\" data-slot=\"status\">", "</div>"],
22
+ _tmpl$11 = ["<section class=\"k2-pane\" data-k2-part=\"Pane\" data-k2-column", " style=\"", "\">", "", "", "<div class=\"k2-scroll\"", ">", "</div></section>"],
23
+ _tmpl$12 = ["<div class=\"k2-pane-back\"", ">", "", "</div>"],
24
+ _tmpl$13 = ["<span class=\"k2-pane-back-name\" role=\"heading\" aria-level=\"2\">", "</span>"],
25
+ _tmpl$14 = ["<div class=\"k2-split\" data-k2-part=\"Pane.Split\"", ">", "", "</div>"],
26
+ _tmpl$15 = ["<style data-k2-rule>", "</style>"],
27
+ _tmpl$16 = ["<div class=\"k2-detail-hero\">", "</div>"],
28
+ _tmpl$17 = ["<section class=\"k2-pane\" data-k2-part=\"Pane\" data-detail-empty", "><div class=\"k2-scroll\">", "", "</div></section>"],
29
+ _tmpl$18 = ["<div class=\"k2-bar-start\">", "</div>"],
30
+ _tmpl$19 = ["<span class=\"k2-bar-fold\">", "</span>"],
31
+ _tmpl$20 = ["<div class=\"k2-bar-end\">", "", "</div>"],
32
+ _tmpl$21 = ["<div class=\"k2-bar\" data-k2-part=\"Bar\">", "", "", "</div>"],
33
+ _tmpl$22 = ["<section class=\"k2-band\" data-k2-part=\"Band\"", ">", "</section>"],
34
+ _tmpl$23 = ["<div class=\"k2-cells\" data-k2-part=\"Cells\">", "</div>"],
35
+ _tmpl$24 = "<i class=\"ti ti-chevron-right k2-icon k2-cell-go\" aria-hidden=\"true\"></i>",
36
+ _tmpl$25 = ["<span class=\"k2-cell-meta\">", "</span>"],
37
+ _tmpl$26 = ["<div class=\"k2-cell\" data-k2-part=\"Cells.Cell\"", " style=\"", "\">", "<span class=\"k2-cell-label\">", "</span>", "<span class=\"k2-cell-value\">", "", "</span>", "</div>"],
38
+ _tmpl$27 = "<span></span>",
39
+ _tmpl$28 = ["<div class=\"k2-tile-preview\" aria-hidden=\"true\">", "</div>"],
40
+ _tmpl$29 = ["<table class=\"k2-tile-pv-table\"><thead><tr>", "</tr></thead><tbody>", "</tbody></table>"],
41
+ _tmpl$30 = ["<th", ">", "</th>"],
42
+ _tmpl$31 = ["<tr>", "</tr>"],
43
+ _tmpl$32 = ["<td", ">", "</td>"],
44
+ _tmpl$33 = ["<span class=\"k2-tile-pv-page\"><b>", "</b>", "</span>"],
45
+ _tmpl$34 = ["<span>", "</span>"],
46
+ _tmpl$35 = ["<span class=\"k2-tile-meta\">", "</span>"],
47
+ _tmpl$36 = ["<span class=\"k2-tile-name\"><span class=\"k2-tile-title\"", ">", "</span>", "</span>"],
48
+ _tmpl$37 = ["<span class=\"k2-tile-stats\">", "</span>"],
49
+ _tmpl$38 = ["<span class=\"k2-tile-foot-text\">", "</span>"],
50
+ _tmpl$39 = ["<span class=\"k2-tile-foot\">", "", "</span>"],
51
+ _tmpl$40 = ["<div class=\"k2-tile\" role=\"listitem\"", " style=\"", "\">", "<span class=\"k2-tile-top\">", "", "", "</span>", "", "</div>"],
52
+ _tmpl$41 = ["<span class=\"k2-tile-stat\"", ">", "", "</span>"],
53
+ _tmpl$42 = ["<span class=\"k2-tile-choices\">", "</span>"],
54
+ _tmpl$43 = ["<div class=\"k2-tile\" role=\"listitem\" data-create", "><span class=\"k2-tile-top\">", "<span class=\"k2-tile-name\"><span class=\"k2-tile-title\">", "</span>", "</span></span>", "</div>"],
55
+ _tmpl$44 = ["<span class=\"k2-tile-line\"><span class=\"k2-tile-meta\">", "</span></span>"],
56
+ _tmpl$45 = ["<div class=\"k2-tile\" role=\"listitem\" data-create", "><span class=\"k2-tile-media\"><span class=\"k2-tile-make\">", "</span></span><span class=\"k2-tile-title\"", ">", "</span>", "</div>"],
57
+ _tmpl$46 = ["<div class=\"k2-tile\" role=\"listitem\"", "><span class=\"k2-tile-media\">", "", "</span><span class=\"k2-tile-title\"", ">", "</span><span class=\"k2-tile-line\">", "", "", "</span></div>"],
58
+ _tmpl$47 = ["<span class=\"k2-tile-check\">", "</span>"],
59
+ _tmpl$48 = ["<div class=\"k2-tiles\" data-k2-part=\"Tiles\"", " style=\"", "\" role=\"list\"", ">", "", "", "</div>"],
60
+ _tmpl$49 = ["<span class=\"k2-tile-end\">", "", "</span>"],
61
+ _tmpl$50 = ["<div class=\"k2-tile\" role=\"listitem\"", ">", "", "", "</div>"],
62
+ _tmpl$51 = ["<div class=\"k2-canvas\" data-k2-part=\"Canvas\" data-k2-canvas role=\"group\"", " style=\"", "\">", "</div>"];
63
+ import { createContext, createEffect, createMemo, createRenderEffect, createSignal, createUniqueId, For, Match, on, onCleanup, onMount, children as resolveChildren, Show, Switch, splitProps, untrack, useContext } from "solid-js";
64
+ import { Dynamic } from "solid-js/web";
65
+ import { useUiMessages } from "../intl/messages";
66
+ import { Announcer } from "./announce";
67
+ import { InBarStart, watchFold } from "./bar-fold";
68
+ import { useGrip } from "./behavior/resize";
69
+ import { ActionButton, CopyButton } from "./button";
70
+ import { ColumnsContext, InnerContext, SidebarAwayContext } from "./columns-context";
71
+ import { RowOpen } from "./content";
72
+ import { MarkCheck } from "./controls";
73
+ import { linkOr } from "./link";
74
+ import { Avatar, Chip, custom, Icon, Mark, Spark } from "./marks";
75
+ import { BarFold, Menu } from "./menu";
76
+ import { useOverlayMessages } from "./overlay-messages";
77
+ import { Empty, PlaceholderValue } from "./states";
78
+ import { StatusToolbarContext } from "./status-toolbar";
79
+ import { columnPx, draggable } from "./types";
80
+ import { retainedWidth, widthCookieAttrs, writeWidthCookie } from "./width-cookie";
81
+ import { useWorkspaceMessages } from "./workspace-messages";
82
+
83
+ // ── Grip ─────────────────────────────────────────────────────────────────────────────────────────────────────────
84
+
85
+ /**
86
+ * What brings a frame to life (attach.tsx) comes as a chunk of its own once an island's Workspace or grip is mounted,
87
+ * so an island's first chunk does not carry it (7 KB). `use` runs once it is there, unless the owner went first, and
88
+ * what it returns ends with the owner; `failed` hears a chunk that did not load.
89
+ */
90
+ const withAttach = (use, failed) => {
91
+ let stop;
92
+ let gone = false;
93
+ import("./attach").then(attach => {
94
+ if (!gone) stop = use(attach);
95
+ }, () => failed?.());
96
+ onCleanup(() => {
97
+ gone = true;
98
+ stop?.();
99
+ });
100
+ };
101
+
102
+ /** A grip an island renders stays in the middle of its line in sight; the server's come from `attachWorkspace`. */
103
+ const centerGrip = grip => {
104
+ onMount(() => withAttach(({
105
+ trackGrip
106
+ }) => trackGrip(grip)));
107
+ };
108
+
109
+ /** A grip on a seam: its name and the one column it moves. */
110
+
111
+ /** The grip of a seam: a pointer drag or the keys move the width of its column (`useGrip`). */
112
+ const SeamGrip = props => {
113
+ const grip = useGrip({
114
+ label: () => props.grip.label,
115
+ value: () => props.grip.value(),
116
+ onChange: px => props.grip.onChange(px),
117
+ min: () => props.grip.width.min,
118
+ reset: () => props.grip.width.default,
119
+ direction: () => props.grip.direction(),
120
+ measure: element => props.grip.measure(element),
121
+ // the row of columns around the seam and every column in it
122
+ observe: element => {
123
+ const row = element.parentElement?.parentElement;
124
+ return row ? [row, ...row.children] : [];
125
+ }
126
+ });
127
+ const [ref, attrs] = splitProps(grip, ["ref"]);
128
+ return _$ssrElement("span", _$mergeProps({
129
+ "class": "k2-grip",
130
+ "data-k2-grip": ""
131
+ }, attrs), undefined, false);
132
+ };
133
+
134
+ /** The seam between two columns: the one 1 px line, and on a line that moves its grip. */
135
+ const PaneSeam = props => _$ssr(_tmpl$, _$ssrAttribute("aria-hidden", props.grip ? _$escape(undefined, true) : "true", false), _$escape(_$createComponent(Show, {
136
+ get when() {
137
+ return props.grip;
138
+ },
139
+ children: grip => _$createComponent(SeamGrip, {
140
+ get grip() {
141
+ return grip();
142
+ }
143
+ })
144
+ })));
145
+ /**
146
+ * The seam between two columns that a layout of its own places (a grid in a dialog), with the grip of `Workspace` and
147
+ * `Pane.Split`: the 1 px line, blue with its pill on hover and focus, a separator that a drag or the keys move (8 px,
148
+ * Shift 64; Home and End to the minimum and the most; Enter and a double click back to the default). The column
149
+ * before it has the width `value`; the layout clamps it as it likes, the grip reads the width the column has. Place
150
+ * it between the two columns, as their row's child; its root is one 1 px column of that row.
151
+ */
152
+ export const Seam = props => // its own root, so the seam inside stays an inner part of a primitive (scripts/v2-parts.ts), as in a Pane.Split
153
+ _$ssr(_tmpl$2, _$escape(_$createComponent(PaneSeam, {
154
+ get grip() {
155
+ return {
156
+ label: props.label,
157
+ width: {
158
+ min: props.min,
159
+ default: props.reset
160
+ },
161
+ value: () => props.value,
162
+ onChange: px => props.onChange(px),
163
+ direction: () => 1,
164
+ measure: grip => {
165
+ // grip → seam → this root, which stands between the two columns of the row
166
+ const host = grip.parentElement?.parentElement;
167
+ const column = host?.previousElementSibling;
168
+ const row = host?.parentElement;
169
+ if (!column || !row) return undefined;
170
+ const now = column.getBoundingClientRect().width;
171
+ return now > 0 ? {
172
+ now,
173
+ max: props.max(row)
174
+ } : undefined;
175
+ }
176
+ };
177
+ }
178
+ })));
179
+
180
+ /** How much `element` can give: its rendered width above its own minimum. */
181
+ const slackOf = element => {
182
+ const width = element.getBoundingClientRect().width;
183
+ return Math.max(0, width - (Number.parseFloat(getComputedStyle(element).minWidth) || 0));
184
+ };
185
+
186
+ // ── Workspace ────────────────────────────────────────────────────────────────────────────────────────────────────
187
+
188
+ /** What the page knows about its workspaces before they render, such as the sidebar a person hid (a cookie). */
189
+
190
+ const LayoutContext = createContext({});
191
+
192
+ /** Hands every `Workspace` inside it the page's layout, such as whether its sidebar starts hidden. */
193
+ export const WorkspaceLayout = props => _$createComponent(LayoutContext.Provider, {
194
+ value: {
195
+ get sidebarCollapsed() {
196
+ return props.sidebarCollapsed;
197
+ }
198
+ },
199
+ get children() {
200
+ return props.children;
201
+ }
202
+ });
203
+ const sidebarDefault = {
204
+ min: 200,
205
+ default: 248
206
+ };
207
+ /** What a column without a width keeps at least: the concept's main column, 400 px (as in v2.css). */
208
+ const flexibleMin = 400;
209
+
210
+ /**
211
+ * A pane's head and its toolbar as one block (look rule 30): the pane hands its toolbar to its head's `Bar`, which
212
+ * stands it between its start and its end, so the bar stays one box (it measures what it folds) and the order of the
213
+ * Tab key is the order on the screen. The first bar made in the head claims the block, so a bar inside it finds it
214
+ * taken; it tells the pane what it made of it: `""` (the toolbar under the start and the end, or beside them where the
215
+ * pane is wide), `"row"` (no start: the toolbar beside the end) or `undefined` (no toolbar). Told while the parts are
216
+ * made, so the server and the first render agree.
217
+ */
218
+
219
+ const HeadBlockContext = createContext();
220
+
221
+ /**
222
+ * The working surface of an app: a sidebar, a head and the columns below it, with one hairline between columns and
223
+ * a grip on every line that moves. On the phone the sidebar leaves and columns become pages.
224
+ *
225
+ * It renders on the server: the frame, its columns, heads and bars are markup, and only what needs the browser loads
226
+ * script, through `attachWorkspace` (the page's frame entry calls `attachWorkspaces`; a Workspace inside an island
227
+ * attaches itself). Keep the islands small: a control, a row's actions, a list that updates.
228
+ *
229
+ * The sidebar stands beside the columns while the workspace holds it at its default width and every column at its
230
+ * minimum, with the lines between them; a detail it declares (`detail`) counts also while it is closed. Where it does
231
+ * not (a tablet, a narrow window), the sidebar is a drawer from the start of the window, opened by a button at the
232
+ * start of the head; picking an entry in it closes it. The stylesheet decides this from the workspace's own width, on
233
+ * the server's page too, so nothing moves when the page comes alive. The drawer holds the sidebar's own nodes while it
234
+ * is open, so its scroll position and open folds stay. The rule is a `<style>` of the workspace; a page whose content
235
+ * security policy allows no inline style keeps the sidebar as a column.
236
+ */
237
+ export const Workspace = props => {
238
+ const t = useUiMessages();
239
+ const words = useWorkspaceMessages();
240
+ const layout = useContext(LayoutContext);
241
+ const width = () => props.sidebarWidth ?? sidebarDefault;
242
+ // A part passed as JSX is made once, here, and read from here: reading the prop again would make it again (the
243
+ // server's `Show` reads `when` more than once), and the browser would look for nodes the server never sent.
244
+ const id = createUniqueId();
245
+ // the first Nav in a sidebar the person may put away carries the button that puts it away, and says so here
246
+ const [awayInNav, setAwayInNav] = createSignal(false);
247
+ const claim = () => {
248
+ if (untrack(awayInNav)) return undefined;
249
+ setAwayInNav(true);
250
+ return () => setAwayInNav(false);
251
+ };
252
+ const sidebar = resolveChildren(() => _$createComponent(SidebarAwayContext.Provider, {
253
+ value: {
254
+ collapsible: () => props.collapsible === true,
255
+ controls: `${id}-side`,
256
+ claim
257
+ },
258
+ get children() {
259
+ return props.sidebar;
260
+ }
261
+ }));
262
+ const head = resolveChildren(() => props.head);
263
+ const top = resolveChildren(() => props.top);
264
+ // `detailEmpty` written as an object in JSX is a getter that makes its hero anew on every read: read it once here.
265
+ const detailEmpty = createMemo(() => props.detailEmpty);
266
+ const emptyHero = resolveChildren(() => detailEmpty()?.hero);
267
+ const [columns, setColumns] = createSignal([]);
268
+ const register = column => {
269
+ setColumns(list => [...list, column]);
270
+ onCleanup(() => setColumns(list => list.filter(other => other !== column)));
271
+ };
272
+ // the detail the workspace declares, at its minimum; it counts open or closed
273
+ const declared = () => props.detail === undefined ? undefined : props.detail === true ? flexibleMin : props.detail;
274
+ // Read where it is drawn, never ahead: on the server the panes register their columns while they render, after this
275
+ // line, so a value computed here would not know an open detail yet.
276
+ const empty = () => declared() === undefined || columns().some(column => column.detail) ? undefined : {
277
+ icon: detailEmpty()?.icon ?? "click",
278
+ text: detailEmpty()?.text ?? t().nothingSelected,
279
+ hero: emptyHero()
280
+ };
281
+ // The columns are made here, before the workspace's own element: they register their widths as they are made, and the
282
+ // server writes the element's attributes (its room) before it renders what stands inside it.
283
+ const body = resolveChildren(() => _$createComponent(ColumnsContext.Provider, {
284
+ value: {
285
+ register,
286
+ empty
287
+ },
288
+ get children() {
289
+ return props.children;
290
+ }
291
+ }));
292
+ // The room the sidebar needs beside the columns: its default, every column's minimum and the lines between them, in
293
+ // the workspace's content box (inside its edge), which the container query measures. A declared detail counts at
294
+ // its declared minimum, open or closed, so the room stays the same when it opens.
295
+ const room = () => {
296
+ const counted = columns().filter(column => !column.away);
297
+ const list = counted.filter(column => !column.detail);
298
+ const open = counted.filter(column => column.detail);
299
+ const detail = declared() ?? (open.length > 0 ? Math.max(...open.map(column => column.need)) : 0);
300
+ const panes = list.length + (detail ? 1 : 0);
301
+ return width().default + 1 + list.reduce((sum, column) => sum + column.need, 0) + detail + Math.max(0, panes - 1);
302
+ };
303
+ const collapsible = () => props.collapsible === true && !!sidebar();
304
+ const collapsed = () => collapsible() && (props.sidebarCollapsed ?? layout.sidebarCollapsed ?? false);
305
+ const accent = () => props.accent?.vars;
306
+ // Below that room (from 768 px on; the phone has its own pages) the sidebar is a drawer: one container query on
307
+ // this workspace's width. It is the one rule here that is made per workspace, since the room is the workspace's own.
308
+ // A sidebar its grip made wider gives way first when the window narrows, so the columns keep their minimum.
309
+ const drawerRule = () => `@media (min-width: 768px) { .k2-ui [data-k2-ws="${id}"] > .k2-ws-side { max-width: calc(100% - ${room() - width().default}px); } ` + `@container k2-ws-${id} (width < ${room()}px) { ` + `.k2-ui [data-k2-ws="${id}"] > :is(.k2-ws-side, .k2-ws-side + .k2-seam) { display: none; } ` + `.k2-ui [data-k2-ws="${id}"] > .k2-ws-main { --k2-ws-toggle: inline-flex; --k2-ws-collapse: none; --k2-ws-drawer: 1; } } }`;
310
+ let element;
311
+ // The sidebar's width while its grip has moved it; its default until then. It gives the columns at most what they
312
+ // need beyond their minimum (the room above without the sidebar's default).
313
+ const [side, setSide] = createSignal();
314
+ const sideWidth = () => side() ?? width().default;
315
+ const sideGrip = () => ({
316
+ label: props.sidebarLabel ?? "Sidebar",
317
+ width: width(),
318
+ value: sideWidth,
319
+ onChange: setSide,
320
+ direction: () => 1,
321
+ measure: () => {
322
+ const now = element?.querySelector(":scope > .k2-ws-side")?.getBoundingClientRect().width;
323
+ if (!now || !element) return undefined;
324
+ return {
325
+ now,
326
+ max: element.clientWidth - room() + width().default
327
+ };
328
+ }
329
+ });
330
+ // In an island the Workspace is alive itself; on the server's page the frame entry attaches it. A sidebar or a collapse
331
+ // button that comes or goes renders its elements anew, so the workspace attaches again to the new ones.
332
+ const bound = createMemo(() => `${Boolean(sidebar())}:${collapsible()}`);
333
+ // A chunk that did not load leaves the page's controls dead: the notice says so and offers to reload the page, the
334
+ // likely cause being a page from an older release.
335
+ const [attachFailed, setAttachFailed] = createSignal(false);
336
+ onMount(() => {
337
+ createEffect(on(bound, () => {
338
+ const target = element;
339
+ if (target) withAttach(({
340
+ attachRenderedWorkspace
341
+ }) => attachRenderedWorkspace(target), () => setAttachFailed(true));
342
+ }));
343
+ });
344
+ return _$ssr(_tmpl$0, _$ssrAttribute("data-k2-ws", _$escape(id, true), false) + _$ssrAttribute("data-collapsible", collapsible() ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-collapsed", collapsed() ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-collapse-in-nav", collapsible() && awayInNav() ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-k2-room", sidebar() ? _$escape(room(), true) : _$escape(undefined, true), false) + _$ssrAttribute("data-k2-accent", accent() ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-plain", props.plain ? "" : _$escape(undefined, true), false), _$ssrStyle(custom({
345
+ ...accent(),
346
+ "--k2-ws-side": `${sideWidth()}px`,
347
+ "--k2-ws-side-min": `${width().min}px`,
348
+ "container-name": sidebar() ? `k2-ws-${id}` : undefined
349
+ })), _$escape(_$createComponent(Show, {
350
+ get when() {
351
+ return sidebar();
352
+ },
353
+ get children() {
354
+ return [_$ssr(_tmpl$3, `${_$escape(id, true)}-side`, _$escape(sidebar())), _$createComponent(PaneSeam, {
355
+ get grip() {
356
+ return sideGrip();
357
+ }
358
+ })];
359
+ }
360
+ })), _$escape(_$createComponent(Show, {
361
+ get when() {
362
+ return head() || sidebar();
363
+ },
364
+ get children() {
365
+ return _$ssr(_tmpl$6, _$ssrAttribute("data-toggle-only", head() ? _$escape(undefined, true) : "", false), _$escape(_$createComponent(Show, {
366
+ get when() {
367
+ return sidebar();
368
+ },
369
+ get children() {
370
+ return [_$ssr(_tmpl$4, _$ssrAttribute("aria-label", _$escape(t().showSidebar, true), false) + _$ssrAttribute("title", _$escape(t().showSidebar, true), false), _$escape(_$createComponent(Icon, {
371
+ name: "layout-sidebar"
372
+ }))), _$createComponent(Show, {
373
+ get when() {
374
+ return collapsible();
375
+ },
376
+ get children() {
377
+ return _$ssr(_tmpl$5, `${_$escape(id, true)}-side`, _$ssrAttribute("aria-expanded", collapsed() ? "false" : "true", false), _$ssrAttribute("aria-label", collapsed() ? _$escape(t().showSidebar, true) : _$escape(words().hideSidebar, true), false) + _$ssrAttribute("title", collapsed() ? _$escape(t().showSidebar, true) : _$escape(words().hideSidebar, true), false), _$escape(_$createComponent(Icon, {
378
+ name: "layout-sidebar"
379
+ })));
380
+ }
381
+ })];
382
+ }
383
+ })), _$escape(head()));
384
+ }
385
+ })), _$escape(_$createComponent(Show, {
386
+ get when() {
387
+ return top();
388
+ },
389
+ get children() {
390
+ return _$ssr(_tmpl$7, _$escape(top()));
391
+ }
392
+ })), _$escape(body()), _$escape(_$createComponent(Show, {
393
+ get when() {
394
+ return sidebar();
395
+ },
396
+ get children() {
397
+ return _$ssr(_tmpl$8, drawerRule());
398
+ }
399
+ })), _$escape(_$createComponent(Show, {
400
+ get when() {
401
+ return props.primary;
402
+ },
403
+ children: action => // a disabled link is an anchor without an address, as in `Button`
404
+ _$createComponent(Dynamic, {
405
+ get component() {
406
+ return _$memo(() => !!(action().disabled && action().href !== undefined))() ? "a" : linkOr(action().href, "button");
407
+ },
408
+ get type() {
409
+ return action().href !== undefined ? undefined : "button";
410
+ },
411
+ "class": "k2-btn k2-fab",
412
+ "data-variant": "primary",
413
+ get href() {
414
+ return _$memo(() => !!action().disabled)() ? undefined : action().href;
415
+ },
416
+ get onNavigate() {
417
+ return _$memo(() => !!(action().href !== undefined && !action().disabled))() ? action().onNavigate : undefined;
418
+ },
419
+ get disabled() {
420
+ return _$memo(() => action().href === undefined)() ? action().disabled : undefined;
421
+ },
422
+ get ["aria-disabled"]() {
423
+ return action().href !== undefined && action().disabled ? "true" : undefined;
424
+ },
425
+ onClick: () => {
426
+ if (!action().disabled) action().onClick?.();
427
+ },
428
+ get children() {
429
+ return [_$createComponent(Show, {
430
+ get when() {
431
+ return action().icon;
432
+ },
433
+ children: name => _$createComponent(Icon, {
434
+ get name() {
435
+ return name();
436
+ }
437
+ })
438
+ }), action().label];
439
+ }
440
+ })
441
+ })), _$escape(_$createComponent(Announcer, {})), _$escape(_$createComponent(Show, {
442
+ get when() {
443
+ return attachFailed();
444
+ },
445
+ get children() {
446
+ return _$ssr(_tmpl$9, _$ssrStyleProperty("display:", "contents"), _$escape(words().controlsFailed), _$escape(words().reloadPage));
447
+ }
448
+ })));
449
+ };
450
+
451
+ // ── Pane and Pane.Split ──────────────────────────────────────────────────────────────────────────────────────────
452
+
453
+ /** The place of a declared detail while none is open: a pane without a width, which needs no room of its own. */
454
+ const emptyDetail = {
455
+ need: 0,
456
+ detail: true
457
+ };
458
+ /** A pane inside a split registers its width and name for the seam beside it, for as long as it exists. */
459
+ const SplitContext = createContext();
460
+ /** Whether the split is a main column with one context column after it: then the context gives way where there is no room. */
461
+ const ContextualContext = createContext();
462
+ /** A column that scrolls. It has no padding and no gutter, so every band in it reaches both edges. */
463
+ export const Pane = props => {
464
+ // the width the grip beside it gave it; its default until then
465
+ const [size, setSize] = createSignal();
466
+ // what a split inside this column needs beside each other (see `InnerContext`); the column needs the larger of that
467
+ // and its own minimum, and says so to the split it stands in or to the workspace, at any depth
468
+ const [inner, setInner] = createSignal([]);
469
+ const registerInner = need => {
470
+ setInner(list => [...list, need]);
471
+ onCleanup(() => setInner(list => list.filter(other => other !== need)));
472
+ };
473
+ // a fixed column needs its one width; one that can be dragged, its minimum
474
+ const own = () => props.width === undefined ? flexibleMin : draggable(props.width) ? props.width.min : columnPx(props.width);
475
+ const need = () => Math.max(own(), ...inner().map(each => each()));
476
+ const entry = {
477
+ get width() {
478
+ return props.width;
479
+ },
480
+ get label() {
481
+ return props.label;
482
+ },
483
+ get persistIndex() {
484
+ return props.persistIndex;
485
+ },
486
+ get side() {
487
+ return props.side;
488
+ },
489
+ get need() {
490
+ return need();
491
+ },
492
+ get detail() {
493
+ return props.detail === true;
494
+ },
495
+ size,
496
+ resize: setSize
497
+ };
498
+ useContext(SplitContext)?.(entry);
499
+ const contextual = useContext(ContextualContext);
500
+ // a column at the top of a workspace tells it what it needs; panes inside this one are not its columns, but what a
501
+ // split inside it needs counts. A context column beside a single main column needs nothing: where there is no room
502
+ // beside, it stands under the main column.
503
+ useContext(ColumnsContext)?.register({
504
+ get need() {
505
+ return need();
506
+ },
507
+ get detail() {
508
+ return props.detail === true;
509
+ },
510
+ get away() {
511
+ return Boolean(props.side) && (contextual?.() ?? false);
512
+ }
513
+ });
514
+ // whether the status is a toolbar of the list (StatusRow, FilterBar): only a toolbar joins the head as one block
515
+ const [toolbars, setToolbars] = createSignal([]);
516
+ const status = resolveChildren(() => _$createComponent(StatusToolbarContext.Provider, {
517
+ value: setToolbars,
518
+ get children() {
519
+ return props.status;
520
+ }
521
+ }));
522
+ // the head's bar takes the toolbar between its start and its end, and says what it made of it
523
+ const [block, setBlock] = createSignal();
524
+ const head = resolveChildren(() => {
525
+ let taken = false;
526
+ const claim = () => {
527
+ if (taken) return;
528
+ taken = true;
529
+ onCleanup(() => {
530
+ taken = false;
531
+ setBlock();
532
+ });
533
+ return {
534
+ toolbar: () => toolbars().length > 0 ? status() : undefined,
535
+ quiet: () => toolbars().length > 0 && toolbars().every(toolbar => toolbar.quiet()),
536
+ tell: setBlock
537
+ };
538
+ };
539
+ return _$createComponent(HeadBlockContext.Provider, {
540
+ value: claim,
541
+ get children() {
542
+ return props.head;
543
+ }
544
+ });
545
+ });
546
+ let section;
547
+ const sheet = () => props.detail === true && props.phone === "sheet" && props.back !== undefined;
548
+ // `phone="sheet"`: the detail watches the phone's sheet (pane-sheet.ts), loaded only for such a detail
549
+ createEffect(() => {
550
+ const pane = section;
551
+ if (!sheet() || !pane) return;
552
+ let stop;
553
+ let gone = false;
554
+ void import("./pane-sheet").then(({
555
+ watchPaneSheet
556
+ }) => {
557
+ if (!gone) stop = watchPaneSheet(pane);
558
+ });
559
+ onCleanup(() => {
560
+ gone = true;
561
+ stop?.();
562
+ });
563
+ });
564
+ // `print`: the column watches the browser's print (pane-print.ts), loaded only for such a column
565
+ createEffect(() => {
566
+ const pane = section;
567
+ if (!props.print || !pane) return;
568
+ let stop;
569
+ let gone = false;
570
+ void import("./pane-print").then(({
571
+ watchPanePrint
572
+ }) => {
573
+ if (!gone) stop = watchPanePrint(pane);
574
+ });
575
+ onCleanup(() => {
576
+ gone = true;
577
+ stop?.();
578
+ });
579
+ });
580
+ // A detail appears because something opened it, which then has the focus (the row). When the detail goes while the
581
+ // focus is in it (its way back, its close button), the focus returns there instead of falling to the page.
582
+ onMount(() => {
583
+ if (!props.detail) return;
584
+ const opener = document.activeElement;
585
+ if (!(opener instanceof HTMLElement) || opener === document.body || section?.contains(opener)) return;
586
+ onCleanup(() => {
587
+ const inside = section?.contains(document.activeElement) ?? false;
588
+ queueMicrotask(() => {
589
+ const lost = inside || document.activeElement === null || document.activeElement === document.body;
590
+ if (lost && opener.isConnected) opener.focus();
591
+ });
592
+ });
593
+ });
594
+ return _$ssr(_tmpl$11, _$ssrAttribute("aria-label", _$escape(props.label, true), false) + _$ssrAttribute("data-width", props.width ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-k2-width-key", _$escape(entry.persistence?.["data-k2-width-key"], true), false) + _$ssrAttribute("data-k2-width-index", _$escape(entry.persistence?.["data-k2-width-index"], true), false) + _$ssrAttribute("data-k2-width-max", _$escape(entry.persistence?.["data-k2-width-max"], true), false) + _$ssrAttribute("data-detail", props.detail ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-phone", sheet() ? "sheet" : _$escape(undefined, true), false) + _$ssrAttribute("data-sheet-head", sheet() && head() ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-side", props.side ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-wide-back", props.wideBack && props.back ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-center", props.center ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-print-region", props.print ? "" : _$escape(undefined, true), false), _$ssrStyle(custom({
595
+ "--k2-pane-w": props.width ? `${size() ?? columnPx(props.width)}px` : undefined,
596
+ "--k2-pane-min": props.width ? `${draggable(props.width) ? props.width.min : columnPx(props.width)}px` : undefined
597
+ })), _$escape(_$createComponent(Show, {
598
+ get when() {
599
+ return props.back;
600
+ },
601
+ children: back => // a sheet's way back closes it; it is no part `Back` a shell takes into its bar, as the list stays the page
602
+ _$ssr(_tmpl$12, _$ssrAttribute("data-k2-part", sheet() ? _$escape(undefined, true) : "Back", false), _$escape(_$createComponent(ActionButton, {
603
+ get action() {
604
+ return {
605
+ icon: "chevron-left",
606
+ ...back()
607
+ };
608
+ },
609
+ variant: "text",
610
+ titled: true
611
+ })), _$escape(_$createComponent(Show, {
612
+ get when() {
613
+ return _$memo(() => !!(!head() && !props.ownHead))() && props.label;
614
+ },
615
+ children: label => // the page's name for assistive technology too: it heads the pane as its title would
616
+ _$ssr(_tmpl$13, _$escape(label()))
617
+ })))
618
+ })), _$escape(_$createComponent(Show, {
619
+ get when() {
620
+ return head();
621
+ },
622
+ get children() {
623
+ return _$ssr(_tmpl$1, _$ssrAttribute("data-block", _$escape(block(), true), false), _$escape(head()));
624
+ }
625
+ })), _$escape(_$createComponent(Show, {
626
+ get when() {
627
+ return _$memo(() => !!status())() && block() === undefined;
628
+ },
629
+ get children() {
630
+ return _$ssr(_tmpl$10, _$escape(status()));
631
+ }
632
+ })), _$ssrAttribute("data-scroll-preserve", _$escape(props.scrollKey, true), false), _$escape(_$createComponent(ColumnsContext.Provider, {
633
+ value: undefined,
634
+ get children() {
635
+ return _$createComponent(InnerContext.Provider, {
636
+ value: registerInner,
637
+ get children() {
638
+ return props.children;
639
+ }
640
+ });
641
+ }
642
+ })));
643
+ };
644
+
645
+ /**
646
+ * Panes side by side inside content: a list beside its reader, a main column beside its info column. One hairline
647
+ * between them; where a pane has a `width`, its line carries a grip.
648
+ */
649
+ Pane.Split = props => {
650
+ const [entries, setEntries] = createSignal([]);
651
+ const register = entry => {
652
+ const index = entry.persistIndex;
653
+ const persist = props.persist;
654
+ // Explicit slots survive conditional siblings and a pane that unmounts and returns in the same split.
655
+ if (index !== undefined && Number.isInteger(index) && index >= 0 && index < 64 && draggable(entry.width) && persist) {
656
+ const initial = retainedWidth(persist, index, entry.width);
657
+ if (initial !== undefined) entry.resize?.(initial);
658
+ entry.persistence = widthCookieAttrs(persist, index);
659
+ const resize = entry.resize;
660
+ const width = entry.width;
661
+ entry.resize = px => {
662
+ const next = retainedWidth({
663
+ ...persist,
664
+ widths: [px]
665
+ }, 0, width) ?? px;
666
+ resize?.(next);
667
+ writeWidthCookie(persist.key, index, next);
668
+ };
669
+ }
670
+ setEntries(list => [...list, entry]);
671
+ onCleanup(() => setEntries(list => list.filter(other => other !== entry)));
672
+ };
673
+ // at the top of a workspace that declares a detail: what stands in its place while none is open
674
+ const columns = useContext(ColumnsContext);
675
+ // exactly one main column and one context column after it, and no place of a detail: only then the context gives way
676
+ // (a list, its reader and an info column keep their own columns and scrollers)
677
+ const contextual = () => {
678
+ const [main, context, ...rest] = entries();
679
+ return rest.length === 0 && main !== undefined && !main.side && Boolean(context?.side) && !columns?.empty();
680
+ };
681
+ // inside a column: what its panes need beside each other, each at its minimum (a column without a width at 400 px)
682
+ // with the lines between them; a context column that gives way needs nothing
683
+ // A context column that gives way asks nothing beyond its column's own minimum; a detail counts nothing either (the
684
+ // workspace's declared `detail` holds its room, open or closed, so the sidebar does not jump when it opens).
685
+ if (!columns) useContext(InnerContext)?.(() => {
686
+ if (contextual()) return 0;
687
+ const beside = entries().filter(entry => !entry.detail);
688
+ return beside.reduce((sum, entry) => sum + entry.need, 0) + Math.max(0, beside.length - 1);
689
+ });
690
+ return _$createComponent(SplitContext.Provider, {
691
+ value: register,
692
+ get children() {
693
+ return _$createComponent(ContextualContext.Provider, {
694
+ value: contextual,
695
+ get children() {
696
+ return _$createComponent(SplitBody, {
697
+ get entries() {
698
+ return entries();
699
+ },
700
+ get empty() {
701
+ return columns?.empty();
702
+ },
703
+ get contextual() {
704
+ return contextual();
705
+ },
706
+ get children() {
707
+ return props.children;
708
+ }
709
+ });
710
+ }
711
+ });
712
+ }
713
+ });
714
+ };
715
+
716
+ /**
717
+ * Renders the panes first (each registers its width), then puts a seam after every pane; the stylesheet hides the one
718
+ * after the last. Panes may come and go (`Show`): each takes its own seam with it, and the grips follow. Every entry
719
+ * of the list is the same two nodes, so nothing in it comes and goes on its own (that would not be removed cleanly
720
+ * after hydration). In the browser a pane's entry is found by its element, on the server by its order.
721
+ */
722
+ const SplitBody = props => {
723
+ const resolved = resolveChildren(() => props.children);
724
+ // a pane hidden by `Show` or `{open && <Pane …/>}` stays in the list as what renders nothing: it gets no seam
725
+ const panes = () => resolved.toArray().filter(pane => pane !== undefined && pane !== null && typeof pane !== "boolean" && pane !== "");
726
+ const entryOf = index => {
727
+ const pane = panes()[index];
728
+ if (pane === undefined) return undefined;
729
+ return props.entries.find(entry => entry.element !== undefined && entry.element === pane) ?? props.entries[index];
730
+ };
731
+ // The seam after pane `index`: the pane on its right moves it if it has a width, else the pane on its left. The place
732
+ // of a detail that is not open counts as a pane without a width, so the grip stays where it is when it opens.
733
+ const grip = index => {
734
+ const left = entryOf(index);
735
+ const right = entryOf(index + 1) ?? (props.empty && index === panes().length - 1 ? emptyDetail : undefined);
736
+ if (!right) return undefined;
737
+ const moving = right.width ? right : left?.width ? left : undefined;
738
+ const width = moving?.width;
739
+ // a fixed width has no grip: it keeps its width
740
+ if (!moving || !draggable(width)) return undefined;
741
+ return {
742
+ label: moving.label ?? "Column",
743
+ width,
744
+ value: () => moving.size?.() ?? width.default,
745
+ onChange: px => moving.resize?.(px),
746
+ direction: () => moving === right ? -1 : 1,
747
+ measure: () => {
748
+ const pane = moving.element;
749
+ const split = pane?.parentElement;
750
+ const rendered = pane?.getBoundingClientRect().width;
751
+ if (!pane || !split || !rendered) return undefined;
752
+ // a fixed pane after a line includes it in its width (v2.css)
753
+ const now = rendered + (pane.previousElementSibling?.classList.contains("k2-seam") ? 1 : 0);
754
+ // the flexible panes beside it give way down to their minimum (a pane with a width keeps it)
755
+ let slack = 0;
756
+ for (const other of split.children) if (other.matches(".k2-pane:not([data-width])")) slack += slackOf(other);
757
+ return {
758
+ now,
759
+ max: Math.min(now + slack, moving.persistence?.["data-k2-width-max"] ?? Infinity)
760
+ };
761
+ }
762
+ };
763
+ };
764
+ // The room a context column needs beside its main column: both at their default width (a column without a width at
765
+ // 400 px; the context's default includes the line before it), or the more its `from` asks. The panes registered while
766
+ // they rendered above, so the server's page and the first render in the browser make the same rule.
767
+ const id = createUniqueId();
768
+ const room = () => {
769
+ if (!props.contextual) return undefined;
770
+ const [main, context] = props.entries;
771
+ // a fixed column counts its one width
772
+ const both = (main?.width ? columnPx(main.width) : flexibleMin) + (context?.width ? columnPx(context.width) : flexibleMin);
773
+ return typeof context?.side === "object" ? Math.max(context.side.from, both) : both;
774
+ };
775
+ // Below that room (from 768 px on; the phone stacks every split) the split wraps: the context column and the line
776
+ // before it take a row each, under the main column at the full width, and the split scrolls in one piece, to the end
777
+ // of its content. Above it nothing wraps, whatever width a grip gave a column. An element cannot ask its own width:
778
+ // the split itself asks its place (`k2-host`: the workspace's main column, or the pane the split stands in), which is
779
+ // as wide as the split. What stands inside the split asks the split, under a name only this split carries: the
780
+ // nearest `k2-host` of a column's scroller is that column, which is narrower than the room beside its context, so a
781
+ // rule there would always hold (#4340: the main column could not scroll). The grips' reach (their `::after`) stays
782
+ // inside its line, so the scroller ends at the content. Made per split, as the room is the split's own.
783
+ const split = `.k2-ui .k2-split[data-k2-split="${id}"][data-context]`;
784
+ const own = `k2-split-${id}`;
785
+ const flowRule = px => `.k2-ui .k2-split[data-k2-split="${id}"] { container: ${own} / inline-size; } ` + `@media (min-width: 768px) { @container k2-host (width < ${px}px) { ` + `${split} { flex-wrap: wrap; align-content: flex-start; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; } ` + `${split}::-webkit-scrollbar { display: none; } } ` + `@container ${own} (width < ${px}px) { ` + `${split} > .k2-pane, ${split} > .k2-seam + .k2-pane[data-width] { flex: 0 0 100%; width: auto; min-width: 0; min-height: auto; overflow: visible; } ` + `${split} > .k2-pane > .k2-scroll { flex: none; overflow: visible; -webkit-mask-image: none; mask-image: none; animation: none; } ` + `${split} > .k2-seam { flex: 0 0 100%; width: auto; height: 1px; } ${split} > .k2-seam > .k2-grip { display: none; } ` +
786
+ // the line across under the main column is the one line there: the last line inside the main column gives way
787
+ `${split} > .k2-pane:first-child > .k2-scroll > :is(.k2-sec, .k2-row):last-child, ` + `${split} > .k2-pane:first-child > .k2-scroll > .k2-list:last-child > .k2-row:last-child, ` + `${split} > .k2-pane:first-child > .k2-scroll > .k2-table-phone:last-child > .k2-list > .k2-row:last-child { border-bottom: 0; } } }`;
788
+ // The rule stays once it is made, also while a detail stands in the place of the context (the split then drops its
789
+ // `data-context`): no `<style>` comes and goes, so the browser does not restyle the page each time.
790
+ const rule = createMemo(made => {
791
+ const px = room();
792
+ return px === undefined ? made : flowRule(px);
793
+ });
794
+ return [_$createComponent(Show, {
795
+ get when() {
796
+ return rule();
797
+ },
798
+ children: text => _$ssr(_tmpl$15, text())
799
+ }), _$ssr(_tmpl$14, _$ssrAttribute("data-k2-split", rule() === undefined ? _$escape(undefined, true) : _$escape(id, true), false) + _$ssrAttribute("data-context", room() === undefined ? _$escape(undefined, true) : "", false), _$escape(_$createComponent(For, {
800
+ get each() {
801
+ return panes();
802
+ },
803
+ children: (pane, index) => [pane, _$createComponent(PaneSeam, {
804
+ get grip() {
805
+ return grip(index());
806
+ }
807
+ })]
808
+ })), _$escape(_$createComponent(Show, {
809
+ get when() {
810
+ return props.empty;
811
+ },
812
+ children: empty => _$ssr(_tmpl$17, _$ssrAttribute("aria-label", _$escape(empty().text, true), false), _$escape(_$createComponent(Show, {
813
+ get when() {
814
+ return empty().hero;
815
+ },
816
+ get children() {
817
+ return _$ssr(_tmpl$16, _$escape(empty().hero));
818
+ }
819
+ })), _$escape(_$createComponent(Empty, {
820
+ get icon() {
821
+ return empty().icon;
822
+ },
823
+ get text() {
824
+ return empty().text;
825
+ }
826
+ })))
827
+ })))];
828
+ };
829
+
830
+ // ── Bar ──────────────────────────────────────────────────────────────────────────────────────────────────────────
831
+
832
+ /**
833
+ * A bar of fixed height with a line below. Its height comes from its place: 56 as the head of a workspace or pane,
834
+ * 52 as a status row, 40 on its own. Controls in it take the height that leaves equal air above and below. The
835
+ * stylesheet reads the place from the slot the bar stands in, so a bar built ahead and passed on behaves the same.
836
+ * In a column narrower than 480 px, a bar in the flow whose start is an `Inline` wraps instead of cutting: its things
837
+ * and its end flow as one line, one line stays 40, and only a second line makes the bar higher.
838
+ *
839
+ * The start keeps a least: its name at `--k2-start-least` (16ch; its whole content, where narrower), or its open
840
+ * tab. Where the end does not fit beside the whole start (six actions beside tabs on the phone), the end folds first:
841
+ * its buttons that do not fit move into a menu "…" at its end, in their order, the last first. Where the end's last
842
+ * `Menu` "…" (no symbol of its own, whatever its `label`) is followed only by parts that never fold (the primary, a
843
+ * closing ×, a menu with a symbol or words of its own), they are that menu's first section; an end made outside
844
+ * the bar (an island of its own) gets the bar's own "…" instead. The primary action, a closing ×, a menu and a search
845
+ * never fold. Only when nothing more can fold does the start shorten its words with "…", down to its least. The
846
+ * browser measures the fold once the page is alive; before that the bar stands as it does when nothing folds (the end
847
+ * whole, the start given way down to its least), so the server's page is the live one wherever nothing folds. Only an
848
+ * end that has to fold cuts, from its start, until the fold takes over.
849
+ */
850
+ export const Bar = props => {
851
+ const t = useOverlayMessages();
852
+ // the entries of the buttons that do not fit, and the menu of the end that holds them; none on the server's page
853
+ const [folded, setFolded] = createSignal([]);
854
+ const [host, setHost] = createSignal();
855
+ // the bar's own "…" takes another name where the end holds a menu of the same name that does not take the buttons
856
+ const [twin, setTwin] = createSignal(false);
857
+ let bar;
858
+ let watch;
859
+ // menus that offered themselves before the bar watched (children mount before the bar's effect runs)
860
+ const waiting = new Map();
861
+ const offer = trigger => {
862
+ if (watch) return watch.offer(trigger);
863
+ waiting.set(trigger, () => {});
864
+ return () => {
865
+ waiting.get(trigger)?.();
866
+ waiting.delete(trigger);
867
+ };
868
+ };
869
+ // the first bar of a pane's head claims its block, before its parts are made (a bar inside them finds it taken)
870
+ const headBlock = useContext(HeadBlockContext)?.();
871
+ const start = resolveChildren(() => _$createComponent(InBarStart.Provider, {
872
+ value: true,
873
+ get children() {
874
+ return props.start;
875
+ }
876
+ }));
877
+ // the pane's toolbar, which this head bar stands between its start and its end (one block, one box, one Tab order)
878
+ const toolbar = () => headBlock?.toolbar();
879
+ // `"line"`: a quiet toolbar (no filter set) stands in the head's own row between the start and the end, on every
880
+ // width, so the head takes one row until a filter is set; then the toolbar takes its row under them (`""`)
881
+ createRenderEffect(() => headBlock?.tell(toolbar() === undefined ? undefined : start() === undefined ? "row" : headBlock.quiet() ? "line" : ""));
882
+ // the end is made inside the fold's context, so a menu "…" in it can offer itself to take the folded buttons
883
+ const end = resolveChildren(() => _$createComponent(BarFold.Provider, {
884
+ value: {
885
+ offer,
886
+ host,
887
+ entries: folded
888
+ },
889
+ get children() {
890
+ return props.end;
891
+ }
892
+ }));
893
+ const hasEnd = createMemo(() => end() !== undefined);
894
+ createEffect(() => {
895
+ if (!bar || !hasEnd()) return;
896
+ const own = t().moreActions;
897
+ const fold = watchFold(bar, (entries, menu) => {
898
+ setFolded(entries);
899
+ setHost(menu);
900
+ setTwin(!menu && [...(bar?.querySelectorAll('.k2-bar-end [aria-haspopup="menu"][data-icon-only]') ?? [])].some(other => !other.closest(".k2-bar-fold") && other.getAttribute("aria-label") === own));
901
+ });
902
+ watch = fold;
903
+ for (const trigger of waiting.keys()) waiting.set(trigger, fold.offer(trigger));
904
+ onCleanup(() => {
905
+ watch = undefined;
906
+ fold.stop();
907
+ });
908
+ });
909
+ return _$ssr(_tmpl$21, _$escape(_$createComponent(Show, {
910
+ get when() {
911
+ return start() !== undefined;
912
+ },
913
+ get children() {
914
+ return _$ssr(_tmpl$18, _$escape(start()));
915
+ }
916
+ })), _$escape(_$createComponent(Show, {
917
+ get when() {
918
+ return toolbar();
919
+ },
920
+ children: part => _$ssr(_tmpl$10, _$escape(part()))
921
+ })), _$escape(_$createComponent(Show, {
922
+ get when() {
923
+ return hasEnd();
924
+ },
925
+ get children() {
926
+ return _$ssr(_tmpl$20, _$escape(end()), _$escape(_$createComponent(Show, {
927
+ get when() {
928
+ return _$memo(() => folded().length > 0)() && !host();
929
+ },
930
+ get children() {
931
+ return _$ssr(_tmpl$19, _$escape(_$createComponent(BarFold.Provider, {
932
+ value: undefined,
933
+ get children() {
934
+ return _$createComponent(Menu, {
935
+ get items() {
936
+ return folded();
937
+ },
938
+ get label() {
939
+ return _$memo(() => !!twin())() ? t().moreInBar : undefined;
940
+ }
941
+ });
942
+ }
943
+ })));
944
+ }
945
+ })));
946
+ }
947
+ })));
948
+ };
949
+
950
+ // ── Band ─────────────────────────────────────────────────────────────────────────────────────────────────────────
951
+
952
+ /** A band of free height with one line below, from edge to edge. What stands in it draws no line of its own. */
953
+ export const Band = props => _$ssr(_tmpl$22, _$ssrAttribute("data-tone", _$escape(props.tone, true), false) + _$ssrAttribute("aria-label", _$escape(props.label, true), false) + _$ssrAttribute("data-print-region", props.print ? "" : _$escape(undefined, true), false), _$escape(props.children));
954
+
955
+ // ── Cells ────────────────────────────────────────────────────────────────────────────────────────────────────────
956
+
957
+ /** Two to four equal cells side by side with a line between them; one under the other on the phone. */
958
+ export const Cells = props => _$ssr(_tmpl$23, _$escape(props.children));
959
+ Cells.Cell = props => {
960
+ const meta = resolveChildren(() => props.meta);
961
+ return (// a cell that leads somewhere: its label is the link, stretched over the cell, so a value may hold its own controls
962
+ _$ssr(_tmpl$26, _$ssrAttribute("data-open", props.href !== undefined ? "" : _$escape(undefined, true), false) + _$ssrAttribute("aria-busy", props.loading ? "true" : _$escape(undefined, true), false), _$ssrStyle(custom({
963
+ "--k2-c": props.color
964
+ })), _$escape(_$createComponent(Icon, {
965
+ get name() {
966
+ return props.icon;
967
+ }
968
+ })), _$escape(_$createComponent(RowOpen, {
969
+ get href() {
970
+ return props.href;
971
+ },
972
+ get children() {
973
+ return props.label;
974
+ }
975
+ })), _$escape(_$createComponent(Show, {
976
+ get when() {
977
+ return props.href;
978
+ },
979
+ get fallback() {
980
+ return _$ssr(_tmpl$27);
981
+ },
982
+ get children() {
983
+ return _$ssr(_tmpl$24);
984
+ }
985
+ })), _$escape(_$createComponent(Show, {
986
+ get when() {
987
+ return !props.loading;
988
+ },
989
+ get fallback() {
990
+ return _$createComponent(PlaceholderValue, {
991
+ get children() {
992
+ return props.value;
993
+ }
994
+ });
995
+ },
996
+ get children() {
997
+ return props.value;
998
+ }
999
+ })), _$escape(_$createComponent(Show, {
1000
+ get when() {
1001
+ return props.trend;
1002
+ },
1003
+ children: trend => _$createComponent(Spark, _$mergeProps(trend))
1004
+ })), _$escape(_$createComponent(Show, {
1005
+ get when() {
1006
+ return meta() !== undefined;
1007
+ },
1008
+ get children() {
1009
+ return _$ssr(_tmpl$25, _$escape(_$createComponent(Show, {
1010
+ get when() {
1011
+ return !props.loading;
1012
+ },
1013
+ get fallback() {
1014
+ return _$createComponent(PlaceholderValue, {
1015
+ said: false,
1016
+ get children() {
1017
+ return meta();
1018
+ }
1019
+ });
1020
+ },
1021
+ get children() {
1022
+ return meta();
1023
+ }
1024
+ })));
1025
+ }
1026
+ })))
1027
+ );
1028
+ };
1029
+
1030
+ // ── Tiles ────────────────────────────────────────────────────────────────────────────────────────────────────────
1031
+
1032
+ /** A figure on a card, such as "6 Tabellen" or a state such as "8 knapp". */
1033
+ /** The symbol a state brings when a figure names none, so a state is always colour, symbol and word. */
1034
+ const statIcon = {
1035
+ ok: "circle-check",
1036
+ warn: "alert-circle",
1037
+ bad: "alert-triangle"
1038
+ };
1039
+
1040
+ /** What a card's preview shows: the app gives the words, the card draws them. */
1041
+
1042
+ /**
1043
+ * A column of a preview's table: its head, or its head and its place. `align: "end"` sets the column at the end with
1044
+ * figures of one width, for amounts and counts.
1045
+ */
1046
+
1047
+ const columnLabel = column => typeof column === "string" ? column : column.label;
1048
+ const columnAlign = column => column !== undefined && typeof column !== "string" ? column.align : undefined;
1049
+
1050
+ /** The columns of a preview's table that the phone's narrow card shows; the rest are marked `data-past`. */
1051
+ const TILE_PREVIEW_PHONE_COLUMNS = 2;
1052
+ const TilePreviewView = props => _$ssr(_tmpl$28, _$escape(_$createComponent(Switch, {
1053
+ get children() {
1054
+ return [_$createComponent(Match, {
1055
+ get when() {
1056
+ return _$memo(() => "table" in props.preview)() && props.preview.table;
1057
+ },
1058
+ children: table => _$ssr(_tmpl$29, _$escape(_$createComponent(For, {
1059
+ get each() {
1060
+ return table().columns;
1061
+ },
1062
+ children: (column, index) => _$ssr(_tmpl$30, _$ssrAttribute("data-past", index() >= TILE_PREVIEW_PHONE_COLUMNS ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-align", _$escape(columnAlign(column), true), false), _$escape(columnLabel(column)))
1063
+ })), _$escape(_$createComponent(For, {
1064
+ get each() {
1065
+ return table().rows;
1066
+ },
1067
+ children: row => _$ssr(_tmpl$31, _$escape(_$createComponent(For, {
1068
+ each: row,
1069
+ children: (cell, index) => _$ssr(_tmpl$32, _$ssrAttribute("data-past", index() >= TILE_PREVIEW_PHONE_COLUMNS ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-align", _$escape(columnAlign(table().columns[index()]), true), false), _$escape(cell))
1070
+ })))
1071
+ })))
1072
+ }), _$createComponent(Match, {
1073
+ get when() {
1074
+ return _$memo(() => "page" in props.preview)() && props.preview.page;
1075
+ },
1076
+ children: page => _$ssr(_tmpl$33, _$escape(page().title), _$escape(_$createComponent(Show, {
1077
+ get when() {
1078
+ return page().text;
1079
+ },
1080
+ children: text => _$ssr(_tmpl$34, _$escape(text()))
1081
+ })))
1082
+ }), _$createComponent(Match, {
1083
+ get when() {
1084
+ return _$memo(() => "icon" in props.preview)() && props.preview.icon;
1085
+ },
1086
+ children: icon => _$createComponent(Icon, {
1087
+ get name() {
1088
+ return icon();
1089
+ }
1090
+ })
1091
+ })];
1092
+ }
1093
+ })));
1094
+
1095
+ /** The last card, which makes a new thing: a dashed frame, its name, and optional quick choices such as templates. */
1096
+
1097
+ /** Like things side by side, such as attachments. Each is pressed, so each is round; never nested. */
1098
+
1099
+ const TileName = props => _$ssr(_tmpl$36, _$ssrAttribute("data-one-word", /\s/.test(props.tile.title.trim()) ? _$escape(undefined, true) : "", false), _$escape(_$createComponent(RowOpen, {
1100
+ get href() {
1101
+ return props.tile.href;
1102
+ },
1103
+ get onNavigate() {
1104
+ return props.tile.onNavigate;
1105
+ },
1106
+ get onOpen() {
1107
+ return props.tile.onOpen;
1108
+ },
1109
+ get children() {
1110
+ return props.tile.title;
1111
+ }
1112
+ })), _$escape(_$createComponent(Show, {
1113
+ get when() {
1114
+ return props.tile.meta;
1115
+ },
1116
+ get children() {
1117
+ return _$ssr(_tmpl$35, _$escape(props.tile.meta));
1118
+ }
1119
+ })));
1120
+ const TileCard = props => _$ssr(_tmpl$40, _$ssrAttribute("data-open", props.tile.href !== undefined || props.tile.onOpen ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-preview", props.tile.preview ? "" : _$escape(undefined, true), false), _$ssrStyle(custom({
1121
+ "--k2-c": props.tile.color
1122
+ })), _$escape(_$createComponent(Show, {
1123
+ get when() {
1124
+ return props.tile.preview;
1125
+ },
1126
+ children: preview => _$createComponent(TilePreviewView, {
1127
+ get preview() {
1128
+ return preview();
1129
+ }
1130
+ })
1131
+ })), _$escape(_$createComponent(Mark, {
1132
+ get icon() {
1133
+ return props.tile.icon;
1134
+ },
1135
+ get color() {
1136
+ return props.tile.color;
1137
+ }
1138
+ })), _$escape(_$createComponent(TileName, {
1139
+ get tile() {
1140
+ return props.tile;
1141
+ }
1142
+ })), _$escape(_$createComponent(Show, {
1143
+ get when() {
1144
+ return props.tile.trend;
1145
+ },
1146
+ children: trend => _$createComponent(Spark, _$mergeProps(trend))
1147
+ })), _$escape(_$createComponent(Show, {
1148
+ get when() {
1149
+ return props.tile.stats?.length;
1150
+ },
1151
+ get children() {
1152
+ return _$ssr(_tmpl$37, _$escape(_$createComponent(For, {
1153
+ get each() {
1154
+ return props.tile.stats;
1155
+ },
1156
+ children: stat => _$ssr(_tmpl$41, _$ssrAttribute("data-status", _$escape(stat.status, true), false) + _$ssrAttribute("data-yours", stat.yours ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(Show, {
1157
+ get when() {
1158
+ return stat.icon ?? (stat.status ? statIcon[stat.status] : undefined);
1159
+ },
1160
+ children: name => _$createComponent(Icon, {
1161
+ get name() {
1162
+ return name();
1163
+ }
1164
+ })
1165
+ })), _$escape(stat.label))
1166
+ })));
1167
+ }
1168
+ })), _$escape(_$createComponent(Show, {
1169
+ get when() {
1170
+ return props.tile.people?.length || props.tile.foot;
1171
+ },
1172
+ get children() {
1173
+ return _$ssr(_tmpl$39, _$escape(_$createComponent(Show, {
1174
+ get when() {
1175
+ return props.tile.people?.length;
1176
+ },
1177
+ get children() {
1178
+ return _$createComponent(Avatar.Stack, {
1179
+ get people() {
1180
+ return props.tile.people ?? [];
1181
+ }
1182
+ });
1183
+ }
1184
+ })), _$escape(_$createComponent(Show, {
1185
+ get when() {
1186
+ return props.tile.foot;
1187
+ },
1188
+ get children() {
1189
+ return _$ssr(_tmpl$38, _$escape(props.tile.foot));
1190
+ }
1191
+ })));
1192
+ }
1193
+ })));
1194
+ const TileMake = props => _$ssr(_tmpl$43, _$ssrAttribute("data-open", props.create.href !== undefined || props.create.onClick ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(Mark, {
1195
+ icon: "plus"
1196
+ })), _$escape(_$createComponent(RowOpen, {
1197
+ get href() {
1198
+ return props.create.href;
1199
+ },
1200
+ get onOpen() {
1201
+ return props.create.onClick;
1202
+ },
1203
+ get children() {
1204
+ return props.create.title;
1205
+ }
1206
+ })), _$escape(_$createComponent(Show, {
1207
+ get when() {
1208
+ return props.create.meta;
1209
+ },
1210
+ get children() {
1211
+ return _$ssr(_tmpl$35, _$escape(props.create.meta));
1212
+ }
1213
+ })), _$escape(_$createComponent(Show, {
1214
+ get when() {
1215
+ return props.create.choices?.length;
1216
+ },
1217
+ get children() {
1218
+ return _$ssr(_tmpl$42, _$escape(_$createComponent(For, {
1219
+ get each() {
1220
+ return props.create.choices;
1221
+ },
1222
+ children: choice => _$createComponent(Chip, {
1223
+ get href() {
1224
+ return choice.href;
1225
+ },
1226
+ get onNavigate() {
1227
+ return choice.onNavigate;
1228
+ },
1229
+ get onClick() {
1230
+ return choice.onClick;
1231
+ },
1232
+ get icon() {
1233
+ return choice.icon;
1234
+ },
1235
+ get children() {
1236
+ return choice.label;
1237
+ }
1238
+ })
1239
+ })));
1240
+ }
1241
+ })));
1242
+
1243
+ /** The place to make a new thing among media: a dashed picture with a plus, then what it makes and a quiet hint. */
1244
+ const TileMakeMedia = props => _$ssr(_tmpl$45, _$ssrAttribute("data-open", props.create.href !== undefined || props.create.onClick ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(Icon, {
1245
+ name: "plus"
1246
+ })), _$ssrAttribute("title", _$escape(props.create.title, true), false), _$escape(_$createComponent(RowOpen, {
1247
+ get href() {
1248
+ return props.create.href;
1249
+ },
1250
+ get onOpen() {
1251
+ return props.create.onClick;
1252
+ },
1253
+ get children() {
1254
+ return props.create.title;
1255
+ }
1256
+ })), _$escape(_$createComponent(Show, {
1257
+ get when() {
1258
+ return props.create.meta;
1259
+ },
1260
+ get children() {
1261
+ return _$ssr(_tmpl$44, _$escape(props.create.meta));
1262
+ }
1263
+ })));
1264
+ const keyOf = tile => tile.key ?? tile.href ?? tile.title;
1265
+
1266
+ /**
1267
+ * A photo, a page or a video as a tile in a grid of at least 160 px: its picture 4:3 above its name and a quiet line
1268
+ * with its owner, its meta and a sign. The whole tile opens its `href` (or presses `onOpen`); the box on the picture
1269
+ * selects it.
1270
+ */
1271
+ const TileMedia = props => {
1272
+ const title = createUniqueId();
1273
+ const selected = () => props.select?.selected.includes(keyOf(props.tile)) ?? false;
1274
+ const owner = () => props.tile.people?.[0];
1275
+ return _$ssr(_tmpl$46, _$ssrAttribute("data-open", props.tile.href !== undefined || props.tile.onOpen ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-selected", selected() ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(Mark, {
1276
+ get icon() {
1277
+ return props.tile.icon;
1278
+ },
1279
+ get color() {
1280
+ return props.tile.color;
1281
+ },
1282
+ get image() {
1283
+ return props.tile.image;
1284
+ },
1285
+ get kind() {
1286
+ return props.tile.kind;
1287
+ }
1288
+ })), _$escape(_$createComponent(Show, {
1289
+ get when() {
1290
+ return props.select;
1291
+ },
1292
+ children: select => _$ssr(_tmpl$47, _$escape(_$createComponent(MarkCheck, {
1293
+ labelledBy: title,
1294
+ get checked() {
1295
+ return selected();
1296
+ },
1297
+ onChange: on => select().onChange(keyOf(props.tile), on)
1298
+ })))
1299
+ })), _$ssrAttribute("id", _$escape(title, true), false) + _$ssrAttribute("title", _$escape(props.tile.title, true), false), _$escape(_$createComponent(RowOpen, {
1300
+ get href() {
1301
+ return props.tile.href;
1302
+ },
1303
+ get onNavigate() {
1304
+ return props.tile.onNavigate;
1305
+ },
1306
+ get onOpen() {
1307
+ return props.tile.onOpen;
1308
+ },
1309
+ get children() {
1310
+ return props.tile.title;
1311
+ }
1312
+ })), _$escape(_$createComponent(Show, {
1313
+ get when() {
1314
+ return owner();
1315
+ },
1316
+ children: person => _$createComponent(Avatar, _$mergeProps(person))
1317
+ })), _$escape(_$createComponent(Show, {
1318
+ get when() {
1319
+ return props.tile.meta;
1320
+ },
1321
+ get children() {
1322
+ return _$ssr(_tmpl$35, _$escape(props.tile.meta));
1323
+ }
1324
+ })), _$escape(_$createComponent(Show, {
1325
+ get when() {
1326
+ return props.tile.sign;
1327
+ },
1328
+ children: sign => _$createComponent(Icon, {
1329
+ get name() {
1330
+ return sign().icon;
1331
+ },
1332
+ get label() {
1333
+ return sign().label;
1334
+ }
1335
+ })
1336
+ })));
1337
+ };
1338
+
1339
+ /** How many tiles share a row, a whole number of at least one, and the half (rounded up) they fall back to. */
1340
+ const perRowStyle = perRow => {
1341
+ const count = Math.max(1, Math.floor(perRow));
1342
+ return custom({
1343
+ "--k2-per-row": String(count),
1344
+ "--k2-per-row-half": String(Math.ceil(count / 2))
1345
+ });
1346
+ };
1347
+ export const Tiles = props => {
1348
+ const t = useOverlayMessages();
1349
+ // with the tile that makes a new one: fewer than a row stand together (`data-short`)
1350
+ const tiles = () => props.items.length + (props.create ? 1 : 0);
1351
+ return _$ssr(_tmpl$48, _$ssrAttribute("data-variant", _$escape(props.variant, true), false) + _$ssrAttribute("data-selecting", props.select && props.select.selected.length > 0 ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-per-row", props.perRow ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-short", props.perRow && tiles() < Math.floor(props.perRow) ? "" : _$escape(undefined, true), false), _$ssrStyle(props.perRow ? perRowStyle(props.perRow) : undefined), _$ssrAttribute("aria-label", _$escape(props.label, true), false), _$escape(_$createComponent(Show, {
1352
+ get when() {
1353
+ return props.variant === "media";
1354
+ },
1355
+ get children() {
1356
+ return [_$createComponent(For, {
1357
+ get each() {
1358
+ return props.items;
1359
+ },
1360
+ children: tile => _$createComponent(TileMedia, {
1361
+ tile: tile,
1362
+ get select() {
1363
+ return props.select;
1364
+ }
1365
+ })
1366
+ }), _$createComponent(Show, {
1367
+ get when() {
1368
+ return props.create;
1369
+ },
1370
+ children: create => _$createComponent(TileMakeMedia, {
1371
+ get create() {
1372
+ return create();
1373
+ }
1374
+ })
1375
+ })];
1376
+ }
1377
+ })), _$escape(_$createComponent(Show, {
1378
+ get when() {
1379
+ return props.variant === "card";
1380
+ },
1381
+ get fallback() {
1382
+ return _$createComponent(For, {
1383
+ get each() {
1384
+ return _$memo(() => props.variant === undefined)() ? props.items : [];
1385
+ },
1386
+ children: tile => _$ssr(_tmpl$50, _$ssrAttribute("data-open", tile.href !== undefined || tile.onOpen ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(Show, {
1387
+ get when() {
1388
+ return tile.color;
1389
+ },
1390
+ get fallback() {
1391
+ return _$createComponent(Icon, {
1392
+ get name() {
1393
+ return tile.icon;
1394
+ }
1395
+ });
1396
+ },
1397
+ children: color => _$createComponent(Mark, {
1398
+ get icon() {
1399
+ return tile.icon;
1400
+ },
1401
+ get color() {
1402
+ return color();
1403
+ }
1404
+ })
1405
+ })), _$escape(_$createComponent(TileName, {
1406
+ tile: tile
1407
+ })), _$escape(_$createComponent(Show, {
1408
+ get when() {
1409
+ return tile.copy || tile.menu;
1410
+ },
1411
+ get children() {
1412
+ return _$ssr(_tmpl$49, _$escape(_$createComponent(Show, {
1413
+ get when() {
1414
+ return tile.copy;
1415
+ },
1416
+ children: copy => _$createComponent(CopyButton, {
1417
+ get label() {
1418
+ return copy().label;
1419
+ },
1420
+ get value() {
1421
+ return copy().value;
1422
+ }
1423
+ })
1424
+ })), _$escape(_$createComponent(Show, {
1425
+ get when() {
1426
+ return tile.menu;
1427
+ },
1428
+ children: items => _$createComponent(Menu, {
1429
+ get label() {
1430
+ return `${t().moreActions}: ${tile.title}`;
1431
+ },
1432
+ get items() {
1433
+ return items();
1434
+ }
1435
+ })
1436
+ })));
1437
+ }
1438
+ })))
1439
+ });
1440
+ },
1441
+ get children() {
1442
+ return [_$createComponent(For, {
1443
+ get each() {
1444
+ return props.items;
1445
+ },
1446
+ children: tile => _$createComponent(TileCard, {
1447
+ tile: tile
1448
+ })
1449
+ }), _$createComponent(Show, {
1450
+ get when() {
1451
+ return props.create;
1452
+ },
1453
+ children: create => _$createComponent(TileMake, {
1454
+ get create() {
1455
+ return create();
1456
+ }
1457
+ })
1458
+ })];
1459
+ }
1460
+ })), _$escape(_$createComponent(Show, {
1461
+ get when() {
1462
+ return props.more;
1463
+ },
1464
+ children: more => _$createComponent(ActionButton, {
1465
+ get action() {
1466
+ return more();
1467
+ },
1468
+ variant: "text"
1469
+ })
1470
+ })));
1471
+ };
1472
+
1473
+ // ── Canvas ───────────────────────────────────────────────────────────────────────────────────────────────────────
1474
+
1475
+ /**
1476
+ * The one way out: a surface with its own drawing, where an app may write its own CSS. Never measured by the rules.
1477
+ * It draws no line of its own; the structure around it separates it, and a drawing that needs an edge draws it.
1478
+ * While the drawing loads, has no data or fails, `Loading`, `Empty` or `Failed` stand inside it and keep its height.
1479
+ */
1480
+ export const Canvas = props => _$ssr(_tmpl$51, _$ssrAttribute("aria-label", _$escape(props.label, true), false) + _$ssrAttribute("data-height", props.height !== undefined ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-fill", props.height === "fill" ? "" : _$escape(undefined, true), false), _$ssrStyle(custom({
1481
+ "--k2-canvas-h": typeof props.height === "number" ? `${props.height}px` : undefined
1482
+ })), _$escape(props.children));
1483
+ //# sourceMappingURL=layout.js.map