@k2b/ui 0.26.0 → 0.27.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 (65) hide show
  1. package/dist/browser/chat/ChatComposer.js +811 -406
  2. package/dist/browser/chat/ChatComposer.js.map +1 -1
  3. package/dist/browser/chat/chat-behavior.js +4 -0
  4. package/dist/browser/chat/chat-behavior.js.map +1 -1
  5. package/dist/browser/chat/chat-messages.js +14 -0
  6. package/dist/browser/chat/chat-messages.js.map +1 -1
  7. package/dist/browser/chat/command-search.js +170 -0
  8. package/dist/browser/chat/command-search.js.map +1 -0
  9. package/dist/browser/chat/composer-document.js +1 -1
  10. package/dist/browser/chat/composer-document.js.map +1 -1
  11. package/dist/browser/chat/index.js.map +1 -1
  12. package/dist/browser/content/CalendarDayView.js +28 -3
  13. package/dist/browser/content/CalendarDayView.js.map +1 -1
  14. package/dist/browser/inputs/Combobox.js +4 -2
  15. package/dist/browser/inputs/Combobox.js.map +1 -1
  16. package/dist/browser/inputs/SelectChip.js +43 -12
  17. package/dist/browser/inputs/SelectChip.js.map +1 -1
  18. package/dist/browser/layout/AppWorkspace.js +708 -515
  19. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  20. package/dist/browser/layout/BottomSheet.js +8 -0
  21. package/dist/browser/layout/BottomSheet.js.map +1 -1
  22. package/dist/browser/layout/app-workspace-controller.js +155 -23
  23. package/dist/browser/layout/app-workspace-controller.js.map +1 -1
  24. package/dist/browser/layout/app-workspace-state.js +5 -1
  25. package/dist/browser/layout/app-workspace-state.js.map +1 -1
  26. package/dist/browser/layout/index.js +1 -1
  27. package/dist/browser/layout/index.js.map +1 -1
  28. package/dist/ssr/chat/ChatComposer.js +410 -93
  29. package/dist/ssr/chat/ChatComposer.js.map +1 -1
  30. package/dist/ssr/chat/chat-behavior.js +4 -0
  31. package/dist/ssr/chat/chat-behavior.js.map +1 -1
  32. package/dist/ssr/chat/chat-messages.js +14 -0
  33. package/dist/ssr/chat/chat-messages.js.map +1 -1
  34. package/dist/ssr/chat/command-search.js +170 -0
  35. package/dist/ssr/chat/command-search.js.map +1 -0
  36. package/dist/ssr/chat/composer-document.js +1 -1
  37. package/dist/ssr/chat/composer-document.js.map +1 -1
  38. package/dist/ssr/chat/index.js.map +1 -1
  39. package/dist/ssr/content/CalendarDayView.js +28 -3
  40. package/dist/ssr/content/CalendarDayView.js.map +1 -1
  41. package/dist/ssr/inputs/Combobox.js +4 -2
  42. package/dist/ssr/inputs/Combobox.js.map +1 -1
  43. package/dist/ssr/inputs/SelectChip.js +35 -11
  44. package/dist/ssr/inputs/SelectChip.js.map +1 -1
  45. package/dist/ssr/layout/AppWorkspace.js +242 -105
  46. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  47. package/dist/ssr/layout/BottomSheet.js +8 -0
  48. package/dist/ssr/layout/BottomSheet.js.map +1 -1
  49. package/dist/ssr/layout/app-workspace-controller.js +155 -23
  50. package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
  51. package/dist/ssr/layout/app-workspace-state.js +5 -1
  52. package/dist/ssr/layout/app-workspace-state.js.map +1 -1
  53. package/dist/ssr/layout/index.js +1 -1
  54. package/dist/ssr/layout/index.js.map +1 -1
  55. package/dist/styles.css +1 -1
  56. package/dist/types/chat/ChatComposer.d.ts +44 -2
  57. package/dist/types/chat/chat-behavior.d.ts +4 -0
  58. package/dist/types/chat/chat-messages.d.ts +7 -0
  59. package/dist/types/chat/command-search.d.ts +39 -0
  60. package/dist/types/chat/index.d.ts +1 -1
  61. package/dist/types/inputs/SelectChip.d.ts +4 -0
  62. package/dist/types/layout/AppWorkspace.d.ts +13 -1
  63. package/dist/types/layout/BottomSheet.d.ts +8 -0
  64. package/dist/types/layout/index.d.ts +1 -1
  65. package/package.json +4 -4
@@ -2,75 +2,80 @@ import { template as _$template } from "solid-js/web";
2
2
  import { delegateEvents as _$delegateEvents } from "solid-js/web";
3
3
  import { addEventListener as _$addEventListener } from "solid-js/web";
4
4
  import { setStyleProperty as _$setStyleProperty } from "solid-js/web";
5
- import { getNextMarker as _$getNextMarker } from "solid-js/web";
6
- import { use as _$use } from "solid-js/web";
7
5
  import { setProperty as _$setProperty } from "solid-js/web";
8
6
  import { className as _$className } from "solid-js/web";
9
7
  import { runHydrationEvents as _$runHydrationEvents } from "solid-js/web";
10
- import { insert as _$insert } from "solid-js/web";
11
- import { createComponent as _$createComponent } from "solid-js/web";
8
+ import { use as _$use } from "solid-js/web";
12
9
  import { spread as _$spread } from "solid-js/web";
13
10
  import { mergeProps as _$mergeProps } from "solid-js/web";
14
11
  import { memo as _$memo } from "solid-js/web";
12
+ import { getNextMarker as _$getNextMarker } from "solid-js/web";
13
+ import { createComponent as _$createComponent } from "solid-js/web";
14
+ import { insert as _$insert } from "solid-js/web";
15
15
  import { style as _$style } from "solid-js/web";
16
16
  import { setAttribute as _$setAttribute } from "solid-js/web";
17
17
  import { effect as _$effect } from "solid-js/web";
18
18
  import { getNextElement as _$getNextElement } from "solid-js/web";
19
19
  var _tmpl$ = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspace__resize role=separator><span aria-hidden=true>`),
20
- _tmpl$2 = /*#__PURE__*/_$template(`<div>`),
21
- _tmpl$3 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__main-primary data-workspace-main-region=main>`),
22
- _tmpl$4 = /*#__PURE__*/_$template(`<section>`),
23
- _tmpl$5 = /*#__PURE__*/_$template(`<style>`),
24
- _tmpl$6 = /*#__PURE__*/_$template(`<aside><button type=button class=k2b-app-workspace__detail-grabber aria-pressed=false><span aria-hidden=true></span></button><!$><!/>`),
25
- _tmpl$7 = /*#__PURE__*/_$template(`<aside>`),
26
- _tmpl$8 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-desktop>`),
27
- _tmpl$9 = /*#__PURE__*/_$template(`<script>`),
28
- _tmpl$0 = /*#__PURE__*/_$template(`<footer>`),
29
- _tmpl$1 = /*#__PURE__*/_$template(`<span aria-hidden=true><i>`),
30
- _tmpl$10 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-section-count>`),
31
- _tmpl$11 = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspace__sidebar-section-toggle><!$><!/><i aria-hidden=true>`),
32
- _tmpl$12 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-section-actions>`),
33
- _tmpl$13 = /*#__PURE__*/_$template(`<header class=k2b-app-workspace__sidebar-section-header><!$><!/><!$><!/>`),
34
- _tmpl$14 = /*#__PURE__*/_$template(`<section><!$><!/><div class=k2b-app-workspace__sidebar-section-content>`),
35
- _tmpl$15 = /*#__PURE__*/_$template(`<h2>`),
36
- _tmpl$16 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-item-actions>`),
37
- _tmpl$17 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-mention aria-hidden=true>@`),
38
- _tmpl$18 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-muted aria-hidden=true><i class="ti ti-bell-off">`),
39
- _tmpl$19 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-count>`),
40
- _tmpl$20 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-unread aria-hidden=true>`),
41
- _tmpl$21 = /*#__PURE__*/_$template(`<span class=k2b-sr-only>, <!$><!/>`),
42
- _tmpl$22 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status>`),
43
- _tmpl$23 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-dot>`),
44
- _tmpl$24 = /*#__PURE__*/_$template(`<button type=button>`),
45
- _tmpl$25 = /*#__PURE__*/_$template(`<a>`),
46
- _tmpl$26 = /*#__PURE__*/_$template(`<div><!$><!/><!$><!/>`),
47
- _tmpl$27 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-icon aria-hidden=true>`),
48
- _tmpl$28 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-context-meta>`),
49
- _tmpl$29 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-context><span class=k2b-app-workspace__sidebar-item-context-label></span><!$><!/>`),
50
- _tmpl$30 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-description>`),
51
- _tmpl$31 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-copy><!$><!/><span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text></span></span><!$><!/>`),
52
- _tmpl$32 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-meta>`),
53
- _tmpl$33 = /*#__PURE__*/_$template(`<i>`),
54
- _tmpl$34 = /*#__PURE__*/_$template(`<a class=k2b-app-workspace__sidebar-item-action>`),
55
- _tmpl$35 = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspace__sidebar-item-action>`),
56
- _tmpl$36 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-icon><i>`),
57
- _tmpl$37 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-copy><span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text></span></span><span class=k2b-app-workspace__sidebar-item-description>`),
58
- _tmpl$38 = /*#__PURE__*/_$template(`<span>`),
59
- _tmpl$39 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__nav-tree-toggle data-k2b-nav-tree-toggle aria-hidden=true><i>`),
60
- _tmpl$40 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text>`),
61
- _tmpl$41 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__nav-tree-group role=group>`),
62
- _tmpl$42 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__nav-tree-node role=treeitem><!$><!/><!$><!/>`),
63
- _tmpl$43 = /*#__PURE__*/_$template(`<div role=tree>`),
64
- _tmpl$44 = /*#__PURE__*/_$template(`<section><!$><!/><div class=k2b-app-workspace__sidebar-icon-grid>`),
65
- _tmpl$45 = /*#__PURE__*/_$template(`<i aria-hidden=true>`),
66
- _tmpl$46 = /*#__PURE__*/_$template(`<i class="ti ti-layout-sidebar"aria-hidden=true>`),
67
- _tmpl$47 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__head><!$><!/><!$><!/>`),
68
- _tmpl$48 = /*#__PURE__*/_$template(`<h1 class=k2b-app-workspace__head-heading data-k2b-page-trail-title>`),
69
- _tmpl$49 = /*#__PURE__*/_$template(`<div data-k2b-app-workspace><!$><!/><!$><!/>`);
20
+ _tmpl$2 = /*#__PURE__*/_$template(`<p>`),
21
+ _tmpl$3 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__level-actions>`),
22
+ _tmpl$4 = /*#__PURE__*/_$template(`<header class=k2b-app-workspace__level-head><!$><!/><div class=k2b-app-workspace__level-title><h2 tabindex=-1></h2><!$><!/></div><!$><!/>`),
23
+ _tmpl$5 = /*#__PURE__*/_$template(`<div>`),
24
+ _tmpl$6 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__main-primary data-workspace-main-region=main>`),
25
+ _tmpl$7 = /*#__PURE__*/_$template(`<section>`),
26
+ _tmpl$8 = /*#__PURE__*/_$template(`<i class="ti ti-chevron-left"aria-hidden=true>`),
27
+ _tmpl$9 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__level-body>`),
28
+ _tmpl$0 = /*#__PURE__*/_$template(`<style>`),
29
+ _tmpl$1 = /*#__PURE__*/_$template(`<aside><button type=button class=k2b-app-workspace__detail-grabber aria-pressed=false><span aria-hidden=true></span></button><!$><!/>`),
30
+ _tmpl$10 = /*#__PURE__*/_$template(`<aside>`),
31
+ _tmpl$11 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-desktop>`),
32
+ _tmpl$12 = /*#__PURE__*/_$template(`<script>`),
33
+ _tmpl$13 = /*#__PURE__*/_$template(`<footer>`),
34
+ _tmpl$14 = /*#__PURE__*/_$template(`<span aria-hidden=true><i>`),
35
+ _tmpl$15 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-section-count>`),
36
+ _tmpl$16 = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspace__sidebar-section-toggle><!$><!/><i aria-hidden=true>`),
37
+ _tmpl$17 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-section-actions>`),
38
+ _tmpl$18 = /*#__PURE__*/_$template(`<header class=k2b-app-workspace__sidebar-section-header><!$><!/><!$><!/>`),
39
+ _tmpl$19 = /*#__PURE__*/_$template(`<section><!$><!/><div class=k2b-app-workspace__sidebar-section-content>`),
40
+ _tmpl$20 = /*#__PURE__*/_$template(`<h2>`),
41
+ _tmpl$21 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-item-actions>`),
42
+ _tmpl$22 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-mention aria-hidden=true>@`),
43
+ _tmpl$23 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-muted aria-hidden=true><i class="ti ti-bell-off">`),
44
+ _tmpl$24 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-count>`),
45
+ _tmpl$25 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-unread aria-hidden=true>`),
46
+ _tmpl$26 = /*#__PURE__*/_$template(`<span class=k2b-sr-only>, <!$><!/>`),
47
+ _tmpl$27 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status>`),
48
+ _tmpl$28 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-dot>`),
49
+ _tmpl$29 = /*#__PURE__*/_$template(`<button type=button>`),
50
+ _tmpl$30 = /*#__PURE__*/_$template(`<a>`),
51
+ _tmpl$31 = /*#__PURE__*/_$template(`<div><!$><!/><!$><!/>`),
52
+ _tmpl$32 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-icon aria-hidden=true>`),
53
+ _tmpl$33 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-context-meta>`),
54
+ _tmpl$34 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-context><span class=k2b-app-workspace__sidebar-item-context-label></span><!$><!/>`),
55
+ _tmpl$35 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-description>`),
56
+ _tmpl$36 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-copy><!$><!/><span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text></span></span><!$><!/>`),
57
+ _tmpl$37 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-meta>`),
58
+ _tmpl$38 = /*#__PURE__*/_$template(`<i>`),
59
+ _tmpl$39 = /*#__PURE__*/_$template(`<a class=k2b-app-workspace__sidebar-item-action>`),
60
+ _tmpl$40 = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspace__sidebar-item-action>`),
61
+ _tmpl$41 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-icon><i>`),
62
+ _tmpl$42 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-copy><span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text></span></span><span class=k2b-app-workspace__sidebar-item-description>`),
63
+ _tmpl$43 = /*#__PURE__*/_$template(`<span>`),
64
+ _tmpl$44 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__nav-tree-toggle data-k2b-nav-tree-toggle aria-hidden=true><i>`),
65
+ _tmpl$45 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text>`),
66
+ _tmpl$46 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__nav-tree-group role=group>`),
67
+ _tmpl$47 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__nav-tree-node role=treeitem><!$><!/><!$><!/>`),
68
+ _tmpl$48 = /*#__PURE__*/_$template(`<div role=tree>`),
69
+ _tmpl$49 = /*#__PURE__*/_$template(`<section><!$><!/><div class=k2b-app-workspace__sidebar-icon-grid>`),
70
+ _tmpl$50 = /*#__PURE__*/_$template(`<i aria-hidden=true>`),
71
+ _tmpl$51 = /*#__PURE__*/_$template(`<i class="ti ti-layout-sidebar"aria-hidden=true>`),
72
+ _tmpl$52 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__head><!$><!/><!$><!/>`),
73
+ _tmpl$53 = /*#__PURE__*/_$template(`<h1 class=k2b-app-workspace__head-heading data-k2b-page-trail-title>`),
74
+ _tmpl$54 = /*#__PURE__*/_$template(`<div data-k2b-app-workspace><!$><!/><!$><!/>`);
70
75
  import { Link } from "@k2b/ssr/nav";
71
- import { children, createContext, createEffect, createMemo, createSignal, createUniqueId, For, mergeProps, onCleanup, onMount, Show, useContext } from "solid-js";
76
+ import { children, createContext, createEffect, createMemo, createSignal, createUniqueId, For, mergeProps, on, onCleanup, onMount, Show, useContext } from "solid-js";
72
77
  import { isServer } from "solid-js/web";
73
- import { IconButton } from "../actions/Button";
78
+ import { IconButton, IconButtonLink } from "../actions/Button";
74
79
  import { APP_WORKSPACE_DETAIL_CLOSE_EVENT, APP_WORKSPACE_DETAIL_STEP_EVENT, APP_WORKSPACE_SIDEBAR_HIDE_EVENT, installAppWorkspaceController } from "./app-workspace-controller";
75
80
  import { APP_WORKSPACE_DETAIL_DEFAULT, APP_WORKSPACE_DETAIL_MAX, APP_WORKSPACE_DETAIL_MIN, APP_WORKSPACE_DRAWER_DEFAULT, APP_WORKSPACE_DRAWER_MAX, APP_WORKSPACE_DRAWER_MIN, APP_WORKSPACE_PANE_DEFAULT, APP_WORKSPACE_PANE_MAX, APP_WORKSPACE_PANE_MIN, APP_WORKSPACE_SIDEBAR_COLLAPSED, APP_WORKSPACE_SIDEBAR_DEFAULT, APP_WORKSPACE_SIDEBAR_MAX, APP_WORKSPACE_SIDEBAR_MIN, appWorkspaceLayoutStyle, appWorkspacePanelVariable } from "./app-workspace-state";
76
81
  import { PageTitle, usePageTrail } from "./PageTitle";
@@ -105,6 +110,14 @@ const sidebarItemSlot = value => Boolean(value && typeof value === "object" && "
105
110
  const navTreeItemSlot = value => Boolean(value && typeof value === "object" && "kind" in value && value.kind === NAV_TREE_ITEM);
106
111
  function ResizeHandle(props) {
107
112
  const workspaceMessages = useWorkspaceMessages();
113
+ const workspace = useContext(WorkspaceContext);
114
+ const providerState = useContext(LayoutStateContext);
115
+ const initialSize = () => {
116
+ const state = workspace?.initialLayoutState() ?? providerState;
117
+ const id = props.panelId ?? "primary";
118
+ const size = props.kind === "sidebar" ? state?.sidebarCollapsed ? APP_WORKSPACE_SIDEBAR_COLLAPSED : state?.sidebarWidth : props.kind === "pane" ? state?.paneWidths?.[id] : props.kind === "detail" ? state?.detailWidths?.[id] : state?.drawerHeights?.[id];
119
+ return Math.min(props.maxSize, Math.max(props.minSize, size ?? props.defaultSize));
120
+ };
108
121
  return (() => {
109
122
  var _el$ = _$getNextElement(_tmpl$);
110
123
  _$effect(_p$ => {
@@ -113,29 +126,31 @@ function ResizeHandle(props) {
113
126
  _v$3 = props.kind === "drawer" ? "horizontal" : "vertical",
114
127
  _v$4 = props.minSize,
115
128
  _v$5 = props.maxSize,
116
- _v$6 = props.defaultSize,
117
- _v$7 = props.kind,
118
- _v$8 = props.panelId,
119
- _v$9 = props.edge,
120
- _v$0 = props.shadow ? "true" : undefined,
121
- _v$1 = props.defaultSize,
122
- _v$10 = props.minSize,
123
- _v$11 = props.maxSize,
124
- _v$12 = props.style;
129
+ _v$6 = initialSize(),
130
+ _v$7 = props.levelShown,
131
+ _v$8 = props.kind,
132
+ _v$9 = props.panelId,
133
+ _v$0 = props.edge,
134
+ _v$1 = props.shadow ? "true" : undefined,
135
+ _v$10 = props.defaultSize,
136
+ _v$11 = props.minSize,
137
+ _v$12 = props.maxSize,
138
+ _v$13 = props.style;
125
139
  _v$ !== _p$.e && _$setAttribute(_el$, "aria-label", _p$.e = _v$);
126
140
  _v$2 !== _p$.t && _$setAttribute(_el$, "aria-controls", _p$.t = _v$2);
127
141
  _v$3 !== _p$.a && _$setAttribute(_el$, "aria-orientation", _p$.a = _v$3);
128
142
  _v$4 !== _p$.o && _$setAttribute(_el$, "aria-valuemin", _p$.o = _v$4);
129
143
  _v$5 !== _p$.i && _$setAttribute(_el$, "aria-valuemax", _p$.i = _v$5);
130
144
  _v$6 !== _p$.n && _$setAttribute(_el$, "aria-valuenow", _p$.n = _v$6);
131
- _v$7 !== _p$.s && _$setAttribute(_el$, "data-app-workspace-resize", _p$.s = _v$7);
132
- _v$8 !== _p$.h && _$setAttribute(_el$, "data-workspace-panel-id", _p$.h = _v$8);
133
- _v$9 !== _p$.r && _$setAttribute(_el$, "data-workspace-resize-edge", _p$.r = _v$9);
134
- _v$0 !== _p$.d && _$setAttribute(_el$, "data-workspace-resize-shadow", _p$.d = _v$0);
135
- _v$1 !== _p$.l && _$setAttribute(_el$, "data-workspace-default-size", _p$.l = _v$1);
136
- _v$10 !== _p$.u && _$setAttribute(_el$, "data-workspace-min-size", _p$.u = _v$10);
137
- _v$11 !== _p$.c && _$setAttribute(_el$, "data-workspace-max-size", _p$.c = _v$11);
138
- _p$.w = _$style(_el$, _v$12, _p$.w);
145
+ _v$7 !== _p$.s && _$setAttribute(_el$, "data-workspace-level-shown", _p$.s = _v$7);
146
+ _v$8 !== _p$.h && _$setAttribute(_el$, "data-app-workspace-resize", _p$.h = _v$8);
147
+ _v$9 !== _p$.r && _$setAttribute(_el$, "data-workspace-panel-id", _p$.r = _v$9);
148
+ _v$0 !== _p$.d && _$setAttribute(_el$, "data-workspace-resize-edge", _p$.d = _v$0);
149
+ _v$1 !== _p$.l && _$setAttribute(_el$, "data-workspace-resize-shadow", _p$.l = _v$1);
150
+ _v$10 !== _p$.u && _$setAttribute(_el$, "data-workspace-default-size", _p$.u = _v$10);
151
+ _v$11 !== _p$.c && _$setAttribute(_el$, "data-workspace-min-size", _p$.c = _v$11);
152
+ _v$12 !== _p$.w && _$setAttribute(_el$, "data-workspace-max-size", _p$.w = _v$12);
153
+ _p$.m = _$style(_el$, _v$13, _p$.m);
139
154
  return _p$;
140
155
  }, {
141
156
  e: undefined,
@@ -151,7 +166,8 @@ function ResizeHandle(props) {
151
166
  l: undefined,
152
167
  u: undefined,
153
168
  c: undefined,
154
- w: undefined
169
+ w: undefined,
170
+ m: undefined
155
171
  });
156
172
  return _el$;
157
173
  })();
@@ -189,10 +205,60 @@ function AppWorkspaceMainPane(props) {
189
205
  domId: `k2b-workspace-pane-${createUniqueId()}`
190
206
  };
191
207
  }
208
+
209
+ /** A level's head; `children` is its back step. It mounts and cleans up with its open pane. */
210
+ function LevelHead(props) {
211
+ // Read each slot once: every read of a JSX prop builds it again, and the
212
+ // server and the client would then disagree on hydration keys.
213
+ const description = children(() => props.description);
214
+ const actions = children(() => props.actions);
215
+ return (() => {
216
+ var _el$2 = _$getNextElement(_tmpl$4),
217
+ _el$9 = _el$2.firstChild,
218
+ [_el$0, _co$2] = _$getNextMarker(_el$9.nextSibling),
219
+ _el$3 = _el$0.nextSibling,
220
+ _el$4 = _el$3.firstChild,
221
+ _el$6 = _el$4.nextSibling,
222
+ [_el$7, _co$] = _$getNextMarker(_el$6.nextSibling),
223
+ _el$1 = _el$3.nextSibling,
224
+ [_el$10, _co$3] = _$getNextMarker(_el$1.nextSibling);
225
+ _$insert(_el$2, () => props.children, _el$0, _co$2);
226
+ _$insert(_el$4, () => props.label);
227
+ _$insert(_el$3, _$createComponent(Show, {
228
+ get when() {
229
+ return description();
230
+ },
231
+ get children() {
232
+ var _el$5 = _$getNextElement(_tmpl$2);
233
+ _$insert(_el$5, description);
234
+ return _el$5;
235
+ }
236
+ }), _el$7, _co$);
237
+ _$insert(_el$2, _$createComponent(Show, {
238
+ get when() {
239
+ return actions();
240
+ },
241
+ get children() {
242
+ var _el$8 = _$getNextElement(_tmpl$3);
243
+ _$insert(_el$8, actions);
244
+ return _el$8;
245
+ }
246
+ }), _el$10, _co$3);
247
+ return _el$2;
248
+ })();
249
+ }
192
250
  function AppWorkspaceMain(props) {
193
251
  const rootResizable = useContext(ResizeContext);
252
+ const workspaceMessages = useWorkspaceMessages();
253
+ const levelsMode = createMemo(() => props.level !== undefined);
194
254
  const resolved = children(() => props.children);
195
- const values = createMemo(() => flatten(resolved()));
255
+ const values = createMemo(() => {
256
+ const all = flatten(resolved());
257
+ if (levelsMode() && all.some(value => !mainPaneSlot(value))) {
258
+ throw new Error("AppWorkspace.Main level requires only AppWorkspace.MainPane children.");
259
+ }
260
+ return all;
261
+ });
196
262
  const paneIds = createMemo(() => {
197
263
  const ids = values().filter(mainPaneSlot).map(slot => slot.props.id);
198
264
  assertUniqueStableUiIds(ids, "AppWorkspace.MainPane id");
@@ -222,19 +288,68 @@ function AppWorkspaceMain(props) {
222
288
  });
223
289
  return result;
224
290
  });
225
- const anchorRegion = createMemo(() => regions().find(candidate => candidate.type === "primary") ?? regions().find(candidate => candidate.type === "pane" && candidate.slot.props.open !== false));
291
+ const levels = createMemo(() => {
292
+ const open = values().filter(mainPaneSlot).filter(slot => slot.props.open !== false);
293
+ if (levelsMode()) {
294
+ for (const pane of open.slice(0, -1)) {
295
+ if (!pane.props.href) throw new Error(`AppWorkspace.MainPane "${pane.props.id}" requires href before the last level.`);
296
+ }
297
+ }
298
+ return open;
299
+ });
300
+ const depth = () => Math.max(1, levels().findIndex(pane => pane.props.id === props.level) + 1);
301
+ const levelClasses = (index, kind) => [1, 2, 3].filter(widthClass => {
302
+ const count = Math.min(widthClass, levels().length);
303
+ const end = Math.max(depth(), count);
304
+ const start = end - count + 1;
305
+ return kind === "first" ? index === start && index > 1 : kind === "last" ? index === end : kind === "handle" ? index >= start && index + 1 <= end : index >= start && index <= end;
306
+ }).join(" ");
307
+ const anchorRegion = createMemo(() => (levelsMode() ? regions().find(candidate => candidate.type === "pane" && candidate.slot === levels().at(-1)) : undefined) ?? regions().find(candidate => candidate.type === "primary") ?? regions().find(candidate => candidate.type === "pane" && candidate.slot.props.open !== false));
308
+ // A level change can hide the control that made it: the back step, or a row
309
+ // of a list that a phone no longer shows. Focus then moves to the title of
310
+ // the selected level, so keyboard and screen reader users keep their place.
311
+ // The back step to the first level unmounts, and focus has left with it by
312
+ // the time the level changes, so pressing it is remembered.
313
+ let mainElement;
314
+ let backStepFocused = false;
315
+ const navigateBack = event => {
316
+ backStepFocused = Boolean(mainElement?.contains(document.activeElement));
317
+ return props.onLevelNavigate?.(event);
318
+ };
319
+ createEffect(on(() => levelsMode() ? depth() : 0, current => {
320
+ const pressedBack = backStepFocused;
321
+ backStepFocused = false;
322
+ const focused = document.activeElement;
323
+ if (!current || !mainElement) return;
324
+ const lost = pressedBack && (!focused || focused === document.body);
325
+ const hidden = focused instanceof HTMLElement && mainElement.contains(focused) && focused.getClientRects().length === 0;
326
+ if (!lost && !hidden) return;
327
+ mainElement.querySelector(`:scope > [data-workspace-level="${current}"] > .k2b-app-workspace__level-head h2`)?.focus({
328
+ preventScroll: true
329
+ });
330
+ }, {
331
+ defer: true
332
+ }));
226
333
  // Presence of a MainPane slot — not of an *open* one — decides the split
227
334
  // layout. Deriving it from `regions()` made a workspace whose panes are all
228
335
  // closed fall back to `resolved()`, which renders the raw slot objects.
229
336
  const hasPanes = createMemo(() => paneIds().length > 0);
230
337
  return (() => {
231
- var _el$2 = _$getNextElement(_tmpl$2);
232
- _$spread(_el$2, _$mergeProps({
338
+ var _el$11 = _$getNextElement(_tmpl$5);
339
+ var _ref$ = mainElement;
340
+ typeof _ref$ === "function" ? _$use(_ref$, _el$11) : mainElement = _el$11;
341
+ _$spread(_el$11, _$mergeProps({
233
342
  get ["class"]() {
234
343
  return `k2b-app-workspace__main ${hasPanes() ? "has-panes" : ""} ${props.class ?? ""}`;
235
344
  },
345
+ get ["data-workspace-levels"]() {
346
+ return levelsMode() ? "" : undefined;
347
+ },
348
+ get ["data-workspace-level-count"]() {
349
+ return _$memo(() => !!levelsMode())() ? levels().length : undefined;
350
+ },
236
351
  get ["data-mobile-pane"]() {
237
- return props.mobilePane;
352
+ return _$memo(() => !!levelsMode())() ? undefined : props.mobilePane;
238
353
  },
239
354
  get ["data-width"]() {
240
355
  return props.width === "content" ? "content" : undefined;
@@ -249,7 +364,7 @@ function AppWorkspaceMain(props) {
249
364
  return props["aria-busy"];
250
365
  }
251
366
  }, () => scrollAttrs(props.scrollPreserveKey)), false, true);
252
- _$insert(_el$2, _$createComponent(Show, {
367
+ _$insert(_el$11, _$createComponent(Show, {
253
368
  get when() {
254
369
  return hasPanes();
255
370
  },
@@ -268,13 +383,15 @@ function AppWorkspaceMain(props) {
268
383
  };
269
384
  if (region.type === "primary") {
270
385
  return (() => {
271
- var _el$3 = _$getNextElement(_tmpl$3);
272
- _$insert(_el$3, () => region.children);
273
- _$effect(() => _$setAttribute(_el$3, "data-workspace-mobile-active", activeMobilePane() === "main" ? "true" : "false"));
274
- return _el$3;
386
+ var _el$12 = _$getNextElement(_tmpl$6);
387
+ _$insert(_el$12, () => region.children);
388
+ _$effect(() => _$setAttribute(_el$12, "data-workspace-mobile-active", activeMobilePane() === "main" ? "true" : "false"));
389
+ return _el$12;
275
390
  })();
276
391
  }
277
392
  const pane = region.slot;
393
+ const levelIndex = () => levels().indexOf(pane) + 1;
394
+ const levelAttr = kind => levelsMode() ? levelClasses(levelIndex(), kind) : undefined;
278
395
  const panelId = assertStableUiId(pane.props.id, "AppWorkspace.MainPane id");
279
396
  const variable = appWorkspacePanelVariable("pane", panelId);
280
397
  const isAnchor = () => region === anchorRegion();
@@ -282,9 +399,12 @@ function AppWorkspaceMain(props) {
282
399
  const defaultSize = () => pane.props.defaultSize ?? APP_WORKSPACE_PANE_DEFAULT;
283
400
  const minSize = () => pane.props.minSize ?? APP_WORKSPACE_PANE_MIN;
284
401
  const maxSize = () => Math.max(minSize(), pane.props.maxSize ?? APP_WORKSPACE_PANE_MAX);
285
- const before = () => region.index < (anchorRegion()?.index ?? 0);
402
+ const before = () => levelsMode() || region.index < (anchorRegion()?.index ?? 0);
286
403
  const handle = () => _$createComponent(ResizeHandle, {
287
404
  kind: "pane",
405
+ get levelShown() {
406
+ return levelAttr("handle");
407
+ },
288
408
  get edge() {
289
409
  return before() ? "end" : "start";
290
410
  },
@@ -321,33 +441,98 @@ function AppWorkspaceMain(props) {
321
441
  return handle();
322
442
  }
323
443
  }), (() => {
324
- var _el$4 = _$getNextElement(_tmpl$4);
325
- _$setAttribute(_el$4, "data-workspace-panel-id", panelId);
326
- _$insert(_el$4, () => pane.props.children);
444
+ var _el$13 = _$getNextElement(_tmpl$7);
445
+ _$setAttribute(_el$13, "data-workspace-panel-id", panelId);
446
+ _$insert(_el$13, (() => {
447
+ var _c$ = _$memo(() => !!levelsMode());
448
+ return () => _c$() ? [_$createComponent(LevelHead, {
449
+ get label() {
450
+ return pane.props.label;
451
+ },
452
+ get description() {
453
+ return pane.props.description;
454
+ },
455
+ get actions() {
456
+ return pane.props.actions;
457
+ },
458
+ get children() {
459
+ return _$createComponent(Show, {
460
+ get when() {
461
+ return _$memo(() => levelIndex() > 1)() && depth() > 1;
462
+ },
463
+ get children() {
464
+ return _$createComponent(IconButtonLink, {
465
+ "class": "k2b-app-workspace__level-back",
466
+ get href() {
467
+ return levels()[depth() - 2]?.props.href;
468
+ },
469
+ get label() {
470
+ return workspaceMessages().backTo({
471
+ page: levels()[levelIndex() - 2]?.props.label ?? ""
472
+ });
473
+ },
474
+ get navigation() {
475
+ return props.onLevelNavigate ? "enhanced" : "document";
476
+ },
477
+ get onNavigate() {
478
+ return props.onLevelNavigate ? navigateBack : undefined;
479
+ },
480
+ get children() {
481
+ return _$getNextElement(_tmpl$8);
482
+ }
483
+ });
484
+ }
485
+ });
486
+ }
487
+ }), (() => {
488
+ var _el$15 = _$getNextElement(_tmpl$9);
489
+ _$insert(_el$15, () => pane.props.children);
490
+ _$effect(_p$ => {
491
+ var _v$28 = pane.props.scroll === false ? "false" : undefined,
492
+ _v$29 = pane.props.scroll !== false && pane.props.scrollFade !== false ? "both" : undefined;
493
+ _v$28 !== _p$.e && _$setAttribute(_el$15, "data-scroll", _p$.e = _v$28);
494
+ _v$29 !== _p$.t && _$setAttribute(_el$15, "data-scroll-fade-mode", _p$.t = _v$29);
495
+ return _p$;
496
+ }, {
497
+ e: undefined,
498
+ t: undefined
499
+ });
500
+ return _el$15;
501
+ })()] : pane.props.children;
502
+ })());
327
503
  _$effect(_p$ => {
328
- var _v$13 = pane.domId,
329
- _v$14 = `k2b-app-workspace__main-pane ${isAnchor() ? "is-primary" : ""} ${pane.props.class ?? ""}`,
330
- _v$15 = pane.props.label,
331
- _v$16 = pane.props.id,
332
- _v$17 = activeMobilePane() === pane.props.id ? "true" : "false",
333
- _v$18 = resizable() ? "true" : "false",
334
- _v$19 = pane.props.surface === "navigation" ? "navigation" : undefined,
335
- _v$20 = pane.props.scroll === false ? "false" : undefined,
336
- _v$21 = pane.props.scroll !== false && pane.props.scrollFade !== false ? "both" : undefined,
337
- _v$22 = isAnchor() ? undefined : {
338
- "--k2b-workspace-panel-size": `var(${variable}, ${defaultSize()}px)`,
504
+ var _v$14 = pane.domId,
505
+ _v$15 = `k2b-app-workspace__main-pane ${isAnchor() ? "is-primary" : ""} ${pane.props.class ?? ""}`,
506
+ _v$16 = pane.props.label,
507
+ _v$17 = levelsMode() ? levelIndex() : undefined,
508
+ _v$18 = levelAttr("shown"),
509
+ _v$19 = levelAttr("first"),
510
+ _v$20 = levelAttr("last"),
511
+ _v$21 = pane.props.id,
512
+ _v$22 = (levelsMode() ? levelClasses(levelIndex(), "shown").split(" ").includes("1") : activeMobilePane() === pane.props.id) ? "true" : "false",
513
+ _v$23 = resizable() ? "true" : "false",
514
+ _v$24 = pane.props.surface === "navigation" ? "navigation" : undefined,
515
+ _v$25 = !levelsMode() && pane.props.scroll === false ? "false" : undefined,
516
+ _v$26 = !levelsMode() && pane.props.scroll !== false && pane.props.scrollFade !== false ? "both" : undefined,
517
+ _v$27 = isAnchor() ? undefined : {
518
+ // A stored width keeps to this pane's limits before the controller attaches.
519
+ "--k2b-workspace-panel-size": `clamp(${minSize()}px, var(${variable}, ${defaultSize()}px), ${maxSize()}px)`,
339
520
  "--k2b-workspace-panel-min": `${minSize()}px`
340
521
  };
341
- _v$13 !== _p$.e && _$setAttribute(_el$4, "id", _p$.e = _v$13);
342
- _v$14 !== _p$.t && _$className(_el$4, _p$.t = _v$14);
343
- _v$15 !== _p$.a && _$setAttribute(_el$4, "aria-label", _p$.a = _v$15);
344
- _v$16 !== _p$.o && _$setAttribute(_el$4, "data-workspace-main-region", _p$.o = _v$16);
345
- _v$17 !== _p$.i && _$setAttribute(_el$4, "data-workspace-mobile-active", _p$.i = _v$17);
346
- _v$18 !== _p$.n && _$setAttribute(_el$4, "data-workspace-resizable", _p$.n = _v$18);
347
- _v$19 !== _p$.s && _$setAttribute(_el$4, "data-surface", _p$.s = _v$19);
348
- _v$20 !== _p$.h && _$setAttribute(_el$4, "data-scroll", _p$.h = _v$20);
349
- _v$21 !== _p$.r && _$setAttribute(_el$4, "data-scroll-fade-mode", _p$.r = _v$21);
350
- _p$.d = _$style(_el$4, _v$22, _p$.d);
522
+ _v$14 !== _p$.e && _$setAttribute(_el$13, "id", _p$.e = _v$14);
523
+ _v$15 !== _p$.t && _$className(_el$13, _p$.t = _v$15);
524
+ _v$16 !== _p$.a && _$setAttribute(_el$13, "aria-label", _p$.a = _v$16);
525
+ _v$17 !== _p$.o && _$setAttribute(_el$13, "data-workspace-level", _p$.o = _v$17);
526
+ _v$18 !== _p$.i && _$setAttribute(_el$13, "data-workspace-level-shown", _p$.i = _v$18);
527
+ _v$19 !== _p$.n && _$setAttribute(_el$13, "data-workspace-level-first", _p$.n = _v$19);
528
+ _v$20 !== _p$.s && _$setAttribute(_el$13, "data-workspace-level-last", _p$.s = _v$20);
529
+ _v$21 !== _p$.h && _$setAttribute(_el$13, "data-workspace-main-region", _p$.h = _v$21);
530
+ _v$22 !== _p$.r && _$setAttribute(_el$13, "data-workspace-mobile-active", _p$.r = _v$22);
531
+ _v$23 !== _p$.d && _$setAttribute(_el$13, "data-workspace-resizable", _p$.d = _v$23);
532
+ _v$24 !== _p$.l && _$setAttribute(_el$13, "data-surface", _p$.l = _v$24);
533
+ _v$25 !== _p$.u && _$setAttribute(_el$13, "data-scroll", _p$.u = _v$25);
534
+ _v$26 !== _p$.c && _$setAttribute(_el$13, "data-scroll-fade-mode", _p$.c = _v$26);
535
+ _p$.w = _$style(_el$13, _v$27, _p$.w);
351
536
  return _p$;
352
537
  }, {
353
538
  e: undefined,
@@ -359,9 +544,13 @@ function AppWorkspaceMain(props) {
359
544
  s: undefined,
360
545
  h: undefined,
361
546
  r: undefined,
362
- d: undefined
547
+ d: undefined,
548
+ l: undefined,
549
+ u: undefined,
550
+ c: undefined,
551
+ w: undefined
363
552
  });
364
- return _el$4;
553
+ return _el$13;
365
554
  })(), _$createComponent(Show, {
366
555
  get when() {
367
556
  return _$memo(() => !!resizable())() && before();
@@ -377,7 +566,7 @@ function AppWorkspaceMain(props) {
377
566
  }
378
567
  }));
379
568
  _$runHydrationEvents();
380
- return _el$2;
569
+ return _el$11;
381
570
  })();
382
571
  }
383
572
  function AppWorkspaceDetail(props) {
@@ -429,9 +618,9 @@ function AppWorkspaceDetail(props) {
429
618
  });
430
619
  });
431
620
  return [(() => {
432
- var _el$5 = _$getNextElement(_tmpl$5);
433
- _$effect(() => _$setProperty(_el$5, "innerHTML", workspaceRule()));
434
- return _el$5;
621
+ var _el$16 = _$getNextElement(_tmpl$0);
622
+ _$effect(() => _$setProperty(_el$16, "innerHTML", workspaceRule()));
623
+ return _el$16;
435
624
  })(), _$createComponent(Show, {
436
625
  get when() {
437
626
  return resizable();
@@ -461,37 +650,39 @@ function AppWorkspaceDetail(props) {
461
650
  });
462
651
  }
463
652
  }), (() => {
464
- var _el$6 = _$getNextElement(_tmpl$6),
465
- _el$7 = _el$6.firstChild,
466
- _el$8 = _el$7.nextSibling,
467
- [_el$9, _co$] = _$getNextMarker(_el$8.nextSibling);
468
- var _ref$ = aside;
469
- typeof _ref$ === "function" ? _$use(_ref$, _el$6) : aside = _el$6;
470
- _$insert(_el$6, () => props.children, _el$9, _co$);
653
+ var _el$17 = _$getNextElement(_tmpl$1),
654
+ _el$18 = _el$17.firstChild,
655
+ _el$19 = _el$18.nextSibling,
656
+ [_el$20, _co$4] = _$getNextMarker(_el$19.nextSibling);
657
+ var _ref$2 = aside;
658
+ typeof _ref$2 === "function" ? _$use(_ref$2, _el$17) : aside = _el$17;
659
+ _$insert(_el$17, () => props.children, _el$20, _co$4);
471
660
  _$effect(_p$ => {
472
- var _v$23 = domId(),
473
- _v$24 = `k2b-app-workspace__detail ${props.class ?? ""}`,
474
- _v$25 = props.width ?? "md",
475
- _v$26 = panelId(),
476
- _v$27 = resizable() ? "true" : "false",
477
- _v$28 = props.onClose ? "true" : undefined,
478
- _v$29 = props.onStep ? "true" : undefined,
479
- _v$30 = !props.open,
480
- _v$31 = {
661
+ var _v$30 = domId(),
662
+ _v$31 = `k2b-app-workspace__detail ${props.class ?? ""}`,
663
+ _v$32 = props.width ?? "md",
664
+ _v$33 = props.phone === "page" ? "page" : undefined,
665
+ _v$34 = panelId(),
666
+ _v$35 = resizable() ? "true" : "false",
667
+ _v$36 = props.onClose ? "true" : undefined,
668
+ _v$37 = props.onStep ? "true" : undefined,
669
+ _v$38 = !props.open,
670
+ _v$39 = {
481
671
  ...sizeStyle(),
482
672
  "view-transition-name": props.viewTransitionName
483
673
  },
484
- _v$32 = workspaceMessages().detailFullHeight;
485
- _v$23 !== _p$.e && _$setAttribute(_el$6, "id", _p$.e = _v$23);
486
- _v$24 !== _p$.t && _$className(_el$6, _p$.t = _v$24);
487
- _v$25 !== _p$.a && _$setAttribute(_el$6, "data-width", _p$.a = _v$25);
488
- _v$26 !== _p$.o && _$setAttribute(_el$6, "data-workspace-panel-id", _p$.o = _v$26);
489
- _v$27 !== _p$.i && _$setAttribute(_el$6, "data-workspace-resizable", _p$.i = _v$27);
490
- _v$28 !== _p$.n && _$setAttribute(_el$6, "data-workspace-detail-closable", _p$.n = _v$28);
491
- _v$29 !== _p$.s && _$setAttribute(_el$6, "data-workspace-detail-steppable", _p$.s = _v$29);
492
- _v$30 !== _p$.h && _$setProperty(_el$6, "hidden", _p$.h = _v$30);
493
- _p$.r = _$style(_el$6, _v$31, _p$.r);
494
- _v$32 !== _p$.d && _$setAttribute(_el$7, "aria-label", _p$.d = _v$32);
674
+ _v$40 = workspaceMessages().detailFullHeight;
675
+ _v$30 !== _p$.e && _$setAttribute(_el$17, "id", _p$.e = _v$30);
676
+ _v$31 !== _p$.t && _$className(_el$17, _p$.t = _v$31);
677
+ _v$32 !== _p$.a && _$setAttribute(_el$17, "data-width", _p$.a = _v$32);
678
+ _v$33 !== _p$.o && _$setAttribute(_el$17, "data-workspace-detail-phone", _p$.o = _v$33);
679
+ _v$34 !== _p$.i && _$setAttribute(_el$17, "data-workspace-panel-id", _p$.i = _v$34);
680
+ _v$35 !== _p$.n && _$setAttribute(_el$17, "data-workspace-resizable", _p$.n = _v$35);
681
+ _v$36 !== _p$.s && _$setAttribute(_el$17, "data-workspace-detail-closable", _p$.s = _v$36);
682
+ _v$37 !== _p$.h && _$setAttribute(_el$17, "data-workspace-detail-steppable", _p$.h = _v$37);
683
+ _v$38 !== _p$.r && _$setProperty(_el$17, "hidden", _p$.r = _v$38);
684
+ _p$.d = _$style(_el$17, _v$39, _p$.d);
685
+ _v$40 !== _p$.l && _$setAttribute(_el$18, "aria-label", _p$.l = _v$40);
495
686
  return _p$;
496
687
  }, {
497
688
  e: undefined,
@@ -503,9 +694,10 @@ function AppWorkspaceDetail(props) {
503
694
  s: undefined,
504
695
  h: undefined,
505
696
  r: undefined,
506
- d: undefined
697
+ d: undefined,
698
+ l: undefined
507
699
  });
508
- return _el$6;
700
+ return _el$17;
509
701
  })()];
510
702
  }
511
703
  function AppWorkspaceBottomDrawer(props) {
@@ -555,25 +747,25 @@ function AppWorkspaceBottomDrawer(props) {
555
747
  });
556
748
  }
557
749
  }), (() => {
558
- var _el$0 = _$getNextElement(_tmpl$7);
559
- _$insert(_el$0, () => props.children);
750
+ var _el$21 = _$getNextElement(_tmpl$10);
751
+ _$insert(_el$21, () => props.children);
560
752
  _$effect(_p$ => {
561
- var _v$33 = domId(),
562
- _v$34 = `k2b-app-workspace__drawer ${props.class ?? ""}`,
563
- _v$35 = props.height ?? "md",
564
- _v$36 = panelId(),
565
- _v$37 = resizable() ? "true" : "false",
566
- _v$38 = !props.open,
567
- _v$39 = `var(${variable()}, ${defaultHeight()}px)`,
568
- _v$40 = props.viewTransitionName;
569
- _v$33 !== _p$.e && _$setAttribute(_el$0, "id", _p$.e = _v$33);
570
- _v$34 !== _p$.t && _$className(_el$0, _p$.t = _v$34);
571
- _v$35 !== _p$.a && _$setAttribute(_el$0, "data-height", _p$.a = _v$35);
572
- _v$36 !== _p$.o && _$setAttribute(_el$0, "data-workspace-panel-id", _p$.o = _v$36);
573
- _v$37 !== _p$.i && _$setAttribute(_el$0, "data-workspace-resizable", _p$.i = _v$37);
574
- _v$38 !== _p$.n && _$setProperty(_el$0, "hidden", _p$.n = _v$38);
575
- _v$39 !== _p$.s && _$setStyleProperty(_el$0, "--k2b-workspace-panel-size", _p$.s = _v$39);
576
- _v$40 !== _p$.h && _$setStyleProperty(_el$0, "view-transition-name", _p$.h = _v$40);
753
+ var _v$41 = domId(),
754
+ _v$42 = `k2b-app-workspace__drawer ${props.class ?? ""}`,
755
+ _v$43 = props.height ?? "md",
756
+ _v$44 = panelId(),
757
+ _v$45 = resizable() ? "true" : "false",
758
+ _v$46 = !props.open,
759
+ _v$47 = `var(${variable()}, ${defaultHeight()}px)`,
760
+ _v$48 = props.viewTransitionName;
761
+ _v$41 !== _p$.e && _$setAttribute(_el$21, "id", _p$.e = _v$41);
762
+ _v$42 !== _p$.t && _$className(_el$21, _p$.t = _v$42);
763
+ _v$43 !== _p$.a && _$setAttribute(_el$21, "data-height", _p$.a = _v$43);
764
+ _v$44 !== _p$.o && _$setAttribute(_el$21, "data-workspace-panel-id", _p$.o = _v$44);
765
+ _v$45 !== _p$.i && _$setAttribute(_el$21, "data-workspace-resizable", _p$.i = _v$45);
766
+ _v$46 !== _p$.n && _$setProperty(_el$21, "hidden", _p$.n = _v$46);
767
+ _v$47 !== _p$.s && _$setStyleProperty(_el$21, "--k2b-workspace-panel-size", _p$.s = _v$47);
768
+ _v$48 !== _p$.h && _$setStyleProperty(_el$21, "view-transition-name", _p$.h = _v$48);
577
769
  return _p$;
578
770
  }, {
579
771
  e: undefined,
@@ -585,7 +777,7 @@ function AppWorkspaceBottomDrawer(props) {
585
777
  s: undefined,
586
778
  h: undefined
587
779
  });
588
- return _el$0;
780
+ return _el$21;
589
781
  })()];
590
782
  }
591
783
  function AppWorkspaceSidebar(props) {
@@ -611,36 +803,36 @@ function AppWorkspaceSidebar(props) {
611
803
  onCleanup(() => aside?.removeEventListener(APP_WORKSPACE_SIDEBAR_HIDE_EVENT, requestHide));
612
804
  });
613
805
  return [(() => {
614
- var _el$1 = _$getNextElement(_tmpl$7);
615
- var _ref$2 = aside;
616
- typeof _ref$2 === "function" ? _$use(_ref$2, _el$1) : aside = _el$1;
617
- _$insert(_el$1, _$createComponent(Show, {
806
+ var _el$22 = _$getNextElement(_tmpl$10);
807
+ var _ref$3 = aside;
808
+ typeof _ref$3 === "function" ? _$use(_ref$3, _el$22) : aside = _el$22;
809
+ _$insert(_el$22, _$createComponent(Show, {
618
810
  get when() {
619
811
  return !props.hidden;
620
812
  },
621
813
  get children() {
622
- var _el$10 = _$getNextElement(_tmpl$8);
623
- _$insert(_el$10, () => desktop()?.children);
624
- return _el$10;
814
+ var _el$23 = _$getNextElement(_tmpl$11);
815
+ _$insert(_el$23, () => desktop()?.children);
816
+ return _el$23;
625
817
  }
626
818
  }));
627
819
  _$effect(_p$ => {
628
- var _v$41 = domId(),
629
- _v$42 = `k2b-app-workspace__sidebar ${props.class ?? ""}`,
630
- _v$43 = props.label,
631
- _v$44 = props.hidden || undefined,
632
- _v$45 = props.mobile === "stacked" ? "stacked" : undefined,
633
- _v$46 = resizable() ? "true" : "false",
634
- _v$47 = props.collapsible ? "true" : "false",
635
- _v$48 = props.onHiddenChange ? "true" : undefined;
636
- _v$41 !== _p$.e && _$setAttribute(_el$1, "id", _p$.e = _v$41);
637
- _v$42 !== _p$.t && _$className(_el$1, _p$.t = _v$42);
638
- _v$43 !== _p$.a && _$setAttribute(_el$1, "aria-label", _p$.a = _v$43);
639
- _v$44 !== _p$.o && _$setProperty(_el$1, "hidden", _p$.o = _v$44);
640
- _v$45 !== _p$.i && _$setAttribute(_el$1, "data-mobile", _p$.i = _v$45);
641
- _v$46 !== _p$.n && _$setAttribute(_el$1, "data-workspace-resizable", _p$.n = _v$46);
642
- _v$47 !== _p$.s && _$setAttribute(_el$1, "data-workspace-collapsible", _p$.s = _v$47);
643
- _v$48 !== _p$.h && _$setAttribute(_el$1, "data-workspace-hideable", _p$.h = _v$48);
820
+ var _v$49 = domId(),
821
+ _v$50 = `k2b-app-workspace__sidebar ${props.class ?? ""}`,
822
+ _v$51 = props.label,
823
+ _v$52 = props.hidden || undefined,
824
+ _v$53 = props.mobile === "stacked" ? "stacked" : undefined,
825
+ _v$54 = resizable() ? "true" : "false",
826
+ _v$55 = props.collapsible ? "true" : "false",
827
+ _v$56 = props.onHiddenChange ? "true" : undefined;
828
+ _v$49 !== _p$.e && _$setAttribute(_el$22, "id", _p$.e = _v$49);
829
+ _v$50 !== _p$.t && _$className(_el$22, _p$.t = _v$50);
830
+ _v$51 !== _p$.a && _$setAttribute(_el$22, "aria-label", _p$.a = _v$51);
831
+ _v$52 !== _p$.o && _$setProperty(_el$22, "hidden", _p$.o = _v$52);
832
+ _v$53 !== _p$.i && _$setAttribute(_el$22, "data-mobile", _p$.i = _v$53);
833
+ _v$54 !== _p$.n && _$setAttribute(_el$22, "data-workspace-resizable", _p$.n = _v$54);
834
+ _v$55 !== _p$.s && _$setAttribute(_el$22, "data-workspace-collapsible", _p$.s = _v$55);
835
+ _v$56 !== _p$.h && _$setAttribute(_el$22, "data-workspace-hideable", _p$.h = _v$56);
644
836
  return _p$;
645
837
  }, {
646
838
  e: undefined,
@@ -652,7 +844,7 @@ function AppWorkspaceSidebar(props) {
652
844
  s: undefined,
653
845
  h: undefined
654
846
  });
655
- return _el$1;
847
+ return _el$22;
656
848
  })(), _$createComponent(Show, {
657
849
  get when() {
658
850
  return _$memo(() => !!resizable())() && !props.hidden;
@@ -698,10 +890,10 @@ const AppWorkspaceSidebarBody = props => {
698
890
  onMount(() => onCleanup(rememberSidebarScroll(body, scrollFadeEdges)));
699
891
  createScrollFade(() => body, () => props.scrollFade !== false);
700
892
  return [(() => {
701
- var _el$11 = _$getNextElement(_tmpl$2);
702
- var _ref$3 = body;
703
- typeof _ref$3 === "function" ? _$use(_ref$3, _el$11) : body = _el$11;
704
- _$spread(_el$11, _$mergeProps({
893
+ var _el$24 = _$getNextElement(_tmpl$5);
894
+ var _ref$4 = body;
895
+ typeof _ref$4 === "function" ? _$use(_ref$4, _el$24) : body = _el$24;
896
+ _$spread(_el$24, _$mergeProps({
705
897
  get ["class"]() {
706
898
  return `k2b-app-workspace__sidebar-body ${props.class ?? ""}`;
707
899
  },
@@ -709,25 +901,25 @@ const AppWorkspaceSidebarBody = props => {
709
901
  return props.scrollFade !== false ? "both" : undefined;
710
902
  }
711
903
  }, () => scrollAttrs(props.scrollPreserveKey), () => modeAttrs(props.sidebarMode)), false, true);
712
- _$insert(_el$11, () => props.children);
904
+ _$insert(_el$24, () => props.children);
713
905
  _$runHydrationEvents();
714
- return _el$11;
906
+ return _el$24;
715
907
  })(), (() => {
716
- var _el$12 = _$getNextElement(_tmpl$9);
717
- _$setProperty(_el$12, "innerHTML", SIDEBAR_SCROLL_MEMORY_SCRIPT);
718
- return _el$12;
908
+ var _el$25 = _$getNextElement(_tmpl$12);
909
+ _$setProperty(_el$25, "innerHTML", SIDEBAR_SCROLL_MEMORY_SCRIPT);
910
+ return _el$25;
719
911
  })()];
720
912
  };
721
913
  const AppWorkspaceSidebarFooter = props => (() => {
722
- var _el$13 = _$getNextElement(_tmpl$0);
723
- _$spread(_el$13, _$mergeProps({
914
+ var _el$26 = _$getNextElement(_tmpl$13);
915
+ _$spread(_el$26, _$mergeProps({
724
916
  get ["class"]() {
725
917
  return `k2b-app-workspace__sidebar-footer ${props.class ?? ""}`;
726
918
  }
727
919
  }, () => modeAttrs(props.sidebarMode)), false, true);
728
- _$insert(_el$13, () => props.children);
920
+ _$insert(_el$26, () => props.children);
729
921
  _$runHydrationEvents();
730
- return _el$13;
922
+ return _el$26;
731
923
  })();
732
924
  const AppWorkspaceSidebarSection = props => {
733
925
  const [expanded, setExpanded] = createSignal(props.defaultOpen ?? true);
@@ -738,27 +930,27 @@ const AppWorkspaceSidebarSection = props => {
738
930
  return props.icon;
739
931
  },
740
932
  get children() {
741
- var _el$14 = _$getNextElement(_tmpl$1),
742
- _el$15 = _el$14.firstChild;
743
- _$effect(() => _$className(_el$15, iconClass(props.icon)));
744
- return _el$14;
933
+ var _el$27 = _$getNextElement(_tmpl$14),
934
+ _el$28 = _el$27.firstChild;
935
+ _$effect(() => _$className(_el$28, iconClass(props.icon)));
936
+ return _el$27;
745
937
  }
746
938
  }), _$memo(() => props.title), _$createComponent(Show, {
747
939
  get when() {
748
940
  return props.count !== undefined;
749
941
  },
750
942
  get children() {
751
- var _el$16 = _$getNextElement(_tmpl$10);
752
- _$insert(_el$16, () => props.count);
753
- return _el$16;
943
+ var _el$29 = _$getNextElement(_tmpl$15);
944
+ _$insert(_el$29, () => props.count);
945
+ return _el$29;
754
946
  }
755
947
  })];
756
948
  return (() => {
757
- var _el$17 = _$getNextElement(_tmpl$14),
758
- _el$29 = _el$17.firstChild,
759
- [_el$30, _co$5] = _$getNextMarker(_el$29.nextSibling),
760
- _el$28 = _el$30.nextSibling;
761
- _$spread(_el$17, _$mergeProps({
949
+ var _el$30 = _$getNextElement(_tmpl$19),
950
+ _el$42 = _el$30.firstChild,
951
+ [_el$43, _co$8] = _$getNextMarker(_el$42.nextSibling),
952
+ _el$41 = _el$43.nextSibling;
953
+ _$spread(_el$30, _$mergeProps({
762
954
  get ["class"]() {
763
955
  return `k2b-app-workspace__sidebar-section ${props.class ?? ""}`;
764
956
  },
@@ -766,17 +958,17 @@ const AppWorkspaceSidebarSection = props => {
766
958
  return props.collapsible ? "true" : undefined;
767
959
  }
768
960
  }, () => modeAttrs(props.sidebarMode)), false, true);
769
- _$insert(_el$17, _$createComponent(Show, {
961
+ _$insert(_el$30, _$createComponent(Show, {
770
962
  get when() {
771
963
  return props.title || props.actions;
772
964
  },
773
965
  get children() {
774
- var _el$18 = _$getNextElement(_tmpl$13),
775
- _el$24 = _el$18.firstChild,
776
- [_el$25, _co$3] = _$getNextMarker(_el$24.nextSibling),
777
- _el$26 = _el$25.nextSibling,
778
- [_el$27, _co$4] = _$getNextMarker(_el$26.nextSibling);
779
- _$insert(_el$18, _$createComponent(Show, {
966
+ var _el$31 = _$getNextElement(_tmpl$18),
967
+ _el$37 = _el$31.firstChild,
968
+ [_el$38, _co$6] = _$getNextMarker(_el$37.nextSibling),
969
+ _el$39 = _el$38.nextSibling,
970
+ [_el$40, _co$7] = _$getNextMarker(_el$39.nextSibling);
971
+ _$insert(_el$31, _$createComponent(Show, {
780
972
  get when() {
781
973
  return props.collapsible;
782
974
  },
@@ -786,56 +978,56 @@ const AppWorkspaceSidebarSection = props => {
786
978
  return props.title;
787
979
  },
788
980
  get children() {
789
- var _el$31 = _$getNextElement(_tmpl$15);
790
- _$insert(_el$31, title);
791
- return _el$31;
981
+ var _el$44 = _$getNextElement(_tmpl$20);
982
+ _$insert(_el$44, title);
983
+ return _el$44;
792
984
  }
793
985
  });
794
986
  },
795
987
  get children() {
796
- var _el$19 = _$getNextElement(_tmpl$11),
797
- _el$21 = _el$19.firstChild,
798
- [_el$22, _co$2] = _$getNextMarker(_el$21.nextSibling),
799
- _el$20 = _el$22.nextSibling;
800
- _el$19.$$click = () => {
988
+ var _el$32 = _$getNextElement(_tmpl$16),
989
+ _el$34 = _el$32.firstChild,
990
+ [_el$35, _co$5] = _$getNextMarker(_el$34.nextSibling),
991
+ _el$33 = _el$35.nextSibling;
992
+ _el$32.$$click = () => {
801
993
  const next = !open();
802
994
  setExpanded(next);
803
995
  props.onOpenChange?.(next);
804
996
  };
805
- _$setAttribute(_el$19, "aria-controls", id);
806
- _$insert(_el$19, title, _el$22, _co$2);
997
+ _$setAttribute(_el$32, "aria-controls", id);
998
+ _$insert(_el$32, title, _el$35, _co$5);
807
999
  _$effect(_p$ => {
808
- var _v$49 = open(),
809
- _v$50 = open() ? "ti ti-chevron-down" : "ti ti-chevron-right";
810
- _v$49 !== _p$.e && _$setAttribute(_el$19, "aria-expanded", _p$.e = _v$49);
811
- _v$50 !== _p$.t && _$className(_el$20, _p$.t = _v$50);
1000
+ var _v$57 = open(),
1001
+ _v$58 = open() ? "ti ti-chevron-down" : "ti ti-chevron-right";
1002
+ _v$57 !== _p$.e && _$setAttribute(_el$32, "aria-expanded", _p$.e = _v$57);
1003
+ _v$58 !== _p$.t && _$className(_el$33, _p$.t = _v$58);
812
1004
  return _p$;
813
1005
  }, {
814
1006
  e: undefined,
815
1007
  t: undefined
816
1008
  });
817
1009
  _$runHydrationEvents();
818
- return _el$19;
1010
+ return _el$32;
819
1011
  }
820
- }), _el$25, _co$3);
821
- _$insert(_el$18, _$createComponent(Show, {
1012
+ }), _el$38, _co$6);
1013
+ _$insert(_el$31, _$createComponent(Show, {
822
1014
  get when() {
823
1015
  return props.actions;
824
1016
  },
825
1017
  get children() {
826
- var _el$23 = _$getNextElement(_tmpl$12);
827
- _$insert(_el$23, () => props.actions);
828
- return _el$23;
1018
+ var _el$36 = _$getNextElement(_tmpl$17);
1019
+ _$insert(_el$36, () => props.actions);
1020
+ return _el$36;
829
1021
  }
830
- }), _el$27, _co$4);
831
- return _el$18;
1022
+ }), _el$40, _co$7);
1023
+ return _el$31;
832
1024
  }
833
- }), _el$30, _co$5);
834
- _$setAttribute(_el$28, "id", id);
835
- _$insert(_el$28, () => props.children);
836
- _$effect(() => _$setProperty(_el$28, "hidden", !open()));
1025
+ }), _el$43, _co$8);
1026
+ _$setAttribute(_el$41, "id", id);
1027
+ _$insert(_el$41, () => props.children);
1028
+ _$effect(() => _$setProperty(_el$41, "hidden", !open()));
837
1029
  _$runHydrationEvents();
838
- return _el$17;
1030
+ return _el$30;
839
1031
  })();
840
1032
  };
841
1033
  const AppWorkspaceSidebarItemIcon = props => mergeProps({
@@ -851,10 +1043,10 @@ const AppWorkspaceSidebarItemAction = props => mergeProps({
851
1043
  kind: SIDEBAR_ITEM_ACTION
852
1044
  }, props);
853
1045
  const AppWorkspaceSidebarItemActions = props => (() => {
854
- var _el$32 = _$getNextElement(_tmpl$16);
855
- _$insert(_el$32, () => props.children);
856
- _$effect(() => _$setAttribute(_el$32, "data-visibility", props.visibility === "hover" ? "hover" : undefined));
857
- return _el$32;
1046
+ var _el$45 = _$getNextElement(_tmpl$21);
1047
+ _$insert(_el$45, () => props.children);
1048
+ _$effect(() => _$setAttribute(_el$45, "data-visibility", props.visibility === "hover" ? "hover" : undefined));
1049
+ return _el$45;
858
1050
  })();
859
1051
  const AppWorkspaceSidebarItemStatus = props => {
860
1052
  const workspaceMessages = useWorkspaceMessages();
@@ -872,8 +1064,8 @@ const AppWorkspaceSidebarItemStatus = props => {
872
1064
  // space, and it still keeps the row's label on one line, so the first count
873
1065
  // never re-wraps the label and moves the rows below.
874
1066
  return (() => {
875
- var _el$33 = _$getNextElement(_tmpl$22);
876
- _$insert(_el$33, _$createComponent(Show, {
1067
+ var _el$46 = _$getNextElement(_tmpl$27);
1068
+ _$insert(_el$46, _$createComponent(Show, {
877
1069
  get when() {
878
1070
  return description();
879
1071
  },
@@ -883,18 +1075,18 @@ const AppWorkspaceSidebarItemStatus = props => {
883
1075
  return props.mention;
884
1076
  },
885
1077
  get children() {
886
- return _$getNextElement(_tmpl$17);
1078
+ return _$getNextElement(_tmpl$22);
887
1079
  }
888
1080
  }), _$createComponent(Show, {
889
1081
  get when() {
890
1082
  return props.muted;
891
1083
  },
892
1084
  get children() {
893
- return _$getNextElement(_tmpl$18);
1085
+ return _$getNextElement(_tmpl$23);
894
1086
  }
895
1087
  }), (() => {
896
- var _el$36 = _$getNextElement(_tmpl$20);
897
- _$insert(_el$36, _$createComponent(Show, {
1088
+ var _el$49 = _$getNextElement(_tmpl$25);
1089
+ _$insert(_el$49, _$createComponent(Show, {
898
1090
  get when() {
899
1091
  return count() || waiting() === 0;
900
1092
  },
@@ -904,42 +1096,42 @@ const AppWorkspaceSidebarItemStatus = props => {
904
1096
  return dot();
905
1097
  },
906
1098
  get children() {
907
- return _$getNextElement(_tmpl$23);
1099
+ return _$getNextElement(_tmpl$28);
908
1100
  }
909
1101
  });
910
1102
  },
911
1103
  get children() {
912
- var _el$37 = _$getNextElement(_tmpl$19);
913
- _$insert(_el$37, (() => {
914
- var _c$ = _$memo(() => count() > 99);
915
- return () => _c$() ? "99+" : count();
1104
+ var _el$50 = _$getNextElement(_tmpl$24);
1105
+ _$insert(_el$50, (() => {
1106
+ var _c$2 = _$memo(() => count() > 99);
1107
+ return () => _c$2() ? "99+" : count();
916
1108
  })());
917
- _$effect(() => _$setAttribute(_el$37, "data-mention", props.mention ? "true" : undefined));
918
- return _el$37;
1109
+ _$effect(() => _$setAttribute(_el$50, "data-mention", props.mention ? "true" : undefined));
1110
+ return _el$50;
919
1111
  }
920
1112
  }));
921
- return _el$36;
1113
+ return _el$49;
922
1114
  })(), (() => {
923
- var _el$38 = _$getNextElement(_tmpl$21),
924
- _el$39 = _el$38.firstChild,
925
- _el$40 = _el$39.nextSibling,
926
- [_el$41, _co$6] = _$getNextMarker(_el$40.nextSibling);
927
- _$insert(_el$38, description, _el$41, _co$6);
928
- return _el$38;
1115
+ var _el$51 = _$getNextElement(_tmpl$26),
1116
+ _el$52 = _el$51.firstChild,
1117
+ _el$53 = _el$52.nextSibling,
1118
+ [_el$54, _co$9] = _$getNextMarker(_el$53.nextSibling);
1119
+ _$insert(_el$51, description, _el$54, _co$9);
1120
+ return _el$51;
929
1121
  })()];
930
1122
  }
931
1123
  }));
932
1124
  _$effect(_p$ => {
933
- var _v$51 = waiting() !== null ? undefined : count() ? "count" : dot() ? "dot" : undefined,
934
- _v$52 = waiting() === null ? undefined : waiting() ? "count" : "zero";
935
- _v$51 !== _p$.e && _$setAttribute(_el$33, "data-unread", _p$.e = _v$51);
936
- _v$52 !== _p$.t && _$setAttribute(_el$33, "data-waiting", _p$.t = _v$52);
1125
+ var _v$59 = waiting() !== null ? undefined : count() ? "count" : dot() ? "dot" : undefined,
1126
+ _v$60 = waiting() === null ? undefined : waiting() ? "count" : "zero";
1127
+ _v$59 !== _p$.e && _$setAttribute(_el$46, "data-unread", _p$.e = _v$59);
1128
+ _v$60 !== _p$.t && _$setAttribute(_el$46, "data-waiting", _p$.t = _v$60);
937
1129
  return _p$;
938
1130
  }, {
939
1131
  e: undefined,
940
1132
  t: undefined
941
1133
  });
942
- return _el$33;
1134
+ return _el$46;
943
1135
  })();
944
1136
  };
945
1137
  /** Shared visual and semantic row frame for flat sidebar items and tree items. */
@@ -967,8 +1159,8 @@ function AppWorkspaceSidebarRow(props) {
967
1159
  },
968
1160
  get fallback() {
969
1161
  return (() => {
970
- var _el$43 = _$getNextElement(_tmpl$24);
971
- _$spread(_el$43, _$mergeProps(attrs, {
1162
+ var _el$56 = _$getNextElement(_tmpl$29);
1163
+ _$spread(_el$56, _$mergeProps(attrs, {
972
1164
  get tabIndex() {
973
1165
  return props.tabIndex;
974
1166
  },
@@ -979,9 +1171,9 @@ function AppWorkspaceSidebarRow(props) {
979
1171
  return props.onClick;
980
1172
  }
981
1173
  }), false, true);
982
- _$insert(_el$43, () => props.children);
1174
+ _$insert(_el$56, () => props.children);
983
1175
  _$runHydrationEvents();
984
- return _el$43;
1176
+ return _el$56;
985
1177
  })();
986
1178
  },
987
1179
  get children() {
@@ -991,8 +1183,8 @@ function AppWorkspaceSidebarRow(props) {
991
1183
  },
992
1184
  get fallback() {
993
1185
  return (() => {
994
- var _el$44 = _$getNextElement(_tmpl$25);
995
- _$spread(_el$44, _$mergeProps({
1186
+ var _el$57 = _$getNextElement(_tmpl$30);
1187
+ _$spread(_el$57, _$mergeProps({
996
1188
  get href() {
997
1189
  return props.href;
998
1190
  }
@@ -1007,9 +1199,9 @@ function AppWorkspaceSidebarRow(props) {
1007
1199
  return props.onClick;
1008
1200
  }
1009
1201
  }), false, true);
1010
- _$insert(_el$44, () => props.children);
1202
+ _$insert(_el$57, () => props.children);
1011
1203
  _$runHydrationEvents();
1012
- return _el$44;
1204
+ return _el$57;
1013
1205
  })();
1014
1206
  },
1015
1207
  get children() {
@@ -1055,22 +1247,22 @@ function AppWorkspaceSidebarRow(props) {
1055
1247
  });
1056
1248
  },
1057
1249
  get children() {
1058
- var _el$45 = _$getNextElement(_tmpl$26),
1059
- _el$46 = _el$45.firstChild,
1060
- [_el$47, _co$7] = _$getNextMarker(_el$46.nextSibling),
1061
- _el$48 = _el$47.nextSibling,
1062
- [_el$49, _co$8] = _$getNextMarker(_el$48.nextSibling);
1063
- _$spread(_el$45, _$mergeProps(common, {
1250
+ var _el$58 = _$getNextElement(_tmpl$31),
1251
+ _el$59 = _el$58.firstChild,
1252
+ [_el$60, _co$0] = _$getNextMarker(_el$59.nextSibling),
1253
+ _el$61 = _el$60.nextSibling,
1254
+ [_el$62, _co$1] = _$getNextMarker(_el$61.nextSibling);
1255
+ _$spread(_el$58, _$mergeProps(common, {
1064
1256
  get ["data-disabled"]() {
1065
1257
  return props.disabled ? "true" : undefined;
1066
1258
  }
1067
1259
  }), false, true);
1068
- _$insert(_el$45, _$createComponent(Control, {
1260
+ _$insert(_el$58, _$createComponent(Control, {
1069
1261
  grouped: true
1070
- }), _el$47, _co$7);
1071
- _$insert(_el$45, () => props.actions, _el$49, _co$8);
1262
+ }), _el$60, _co$0);
1263
+ _$insert(_el$58, () => props.actions, _el$62, _co$1);
1072
1264
  _$runHydrationEvents();
1073
- return _el$45;
1265
+ return _el$58;
1074
1266
  }
1075
1267
  });
1076
1268
  }
@@ -1103,85 +1295,85 @@ function AppWorkspaceSidebarItem(props) {
1103
1295
  return iconContent() || icon();
1104
1296
  },
1105
1297
  get children() {
1106
- var _el$50 = _$getNextElement(_tmpl$27);
1107
- _$insert(_el$50, () => iconContent() ?? (() => {
1108
- var _el$65 = _$getNextElement(_tmpl$33);
1109
- _$effect(() => _$className(_el$65, iconClass(icon())));
1110
- return _el$65;
1298
+ var _el$63 = _$getNextElement(_tmpl$32);
1299
+ _$insert(_el$63, () => iconContent() ?? (() => {
1300
+ var _el$78 = _$getNextElement(_tmpl$38);
1301
+ _$effect(() => _$className(_el$78, iconClass(icon())));
1302
+ return _el$78;
1111
1303
  })());
1112
- return _el$50;
1304
+ return _el$63;
1113
1305
  }
1114
1306
  }), (() => {
1115
- var _el$51 = _$getNextElement(_tmpl$31),
1116
- _el$60 = _el$51.firstChild,
1117
- [_el$61, _co$0] = _$getNextMarker(_el$60.nextSibling),
1118
- _el$57 = _el$61.nextSibling,
1119
- _el$58 = _el$57.firstChild,
1120
- _el$62 = _el$57.nextSibling,
1121
- [_el$63, _co$1] = _$getNextMarker(_el$62.nextSibling);
1122
- _$insert(_el$51, _$createComponent(Show, {
1307
+ var _el$64 = _$getNextElement(_tmpl$36),
1308
+ _el$73 = _el$64.firstChild,
1309
+ [_el$74, _co$11] = _$getNextMarker(_el$73.nextSibling),
1310
+ _el$70 = _el$74.nextSibling,
1311
+ _el$71 = _el$70.firstChild,
1312
+ _el$75 = _el$70.nextSibling,
1313
+ [_el$76, _co$12] = _$getNextMarker(_el$75.nextSibling);
1314
+ _$insert(_el$64, _$createComponent(Show, {
1123
1315
  get when() {
1124
1316
  return props.context || props.contextMeta;
1125
1317
  },
1126
1318
  get children() {
1127
- var _el$52 = _$getNextElement(_tmpl$29),
1128
- _el$53 = _el$52.firstChild,
1129
- _el$55 = _el$53.nextSibling,
1130
- [_el$56, _co$9] = _$getNextMarker(_el$55.nextSibling);
1131
- _$insert(_el$53, () => props.context);
1132
- _$insert(_el$52, _$createComponent(Show, {
1319
+ var _el$65 = _$getNextElement(_tmpl$34),
1320
+ _el$66 = _el$65.firstChild,
1321
+ _el$68 = _el$66.nextSibling,
1322
+ [_el$69, _co$10] = _$getNextMarker(_el$68.nextSibling);
1323
+ _$insert(_el$66, () => props.context);
1324
+ _$insert(_el$65, _$createComponent(Show, {
1133
1325
  get when() {
1134
1326
  return props.contextMeta;
1135
1327
  },
1136
1328
  get children() {
1137
- var _el$54 = _$getNextElement(_tmpl$28);
1138
- _$insert(_el$54, () => props.contextMeta);
1139
- return _el$54;
1329
+ var _el$67 = _$getNextElement(_tmpl$33);
1330
+ _$insert(_el$67, () => props.contextMeta);
1331
+ return _el$67;
1140
1332
  }
1141
- }), _el$56, _co$9);
1142
- return _el$52;
1333
+ }), _el$69, _co$10);
1334
+ return _el$65;
1143
1335
  }
1144
- }), _el$61, _co$0);
1145
- _$insert(_el$58, () => label());
1146
- _$insert(_el$51, _$createComponent(Show, {
1336
+ }), _el$74, _co$11);
1337
+ _$insert(_el$71, () => label());
1338
+ _$insert(_el$64, _$createComponent(Show, {
1147
1339
  get when() {
1148
1340
  return props.description;
1149
1341
  },
1150
1342
  get children() {
1151
- var _el$59 = _$getNextElement(_tmpl$30);
1152
- _$insert(_el$59, () => props.description);
1153
- return _el$59;
1343
+ var _el$72 = _$getNextElement(_tmpl$35);
1344
+ _$insert(_el$72, () => props.description);
1345
+ return _el$72;
1154
1346
  }
1155
- }), _el$63, _co$1);
1347
+ }), _el$76, _co$12);
1156
1348
  _$effect(_p$ => {
1157
- var _v$53 = oneLine() ? "1" : undefined,
1158
- _v$54 = !oneLine() && typeof label() === "string" ? label() : undefined;
1159
- _v$53 !== _p$.e && _$setAttribute(_el$57, "data-lines", _p$.e = _v$53);
1160
- _v$54 !== _p$.t && _$setAttribute(_el$57, "data-label", _p$.t = _v$54);
1349
+ var _v$61 = oneLine() ? "1" : undefined,
1350
+ _v$62 = !oneLine() && typeof label() === "string" ? label() : undefined;
1351
+ _v$61 !== _p$.e && _$setAttribute(_el$70, "data-lines", _p$.e = _v$61);
1352
+ _v$62 !== _p$.t && _$setAttribute(_el$70, "data-label", _p$.t = _v$62);
1161
1353
  return _p$;
1162
1354
  }, {
1163
1355
  e: undefined,
1164
1356
  t: undefined
1165
1357
  });
1166
- return _el$51;
1358
+ return _el$64;
1167
1359
  })(), _$createComponent(Show, {
1168
1360
  get when() {
1169
1361
  return hasMeta();
1170
1362
  },
1171
1363
  get children() {
1172
- var _el$64 = _$getNextElement(_tmpl$32);
1173
- _$insert(_el$64, meta);
1364
+ var _el$77 = _$getNextElement(_tmpl$37);
1365
+ _$insert(_el$77, meta);
1174
1366
  _$effect(_p$ => {
1175
- var _v$55 = props.preview?.trigger === "row" ? metaId : undefined,
1176
- _v$56 = metaVisibility() === "hover" ? "hover" : undefined;
1177
- _v$55 !== _p$.e && _$setAttribute(_el$64, "id", _p$.e = _v$55);
1178
- _v$56 !== _p$.t && _$setAttribute(_el$64, "data-visibility", _p$.t = _v$56);
1367
+ var _v$63 = props.preview?.trigger === "row" ? metaId : undefined,
1368
+ _v$64 = metaVisibility() === "hover" ? "hover" : undefined;
1369
+ _v$63 !== _p$.e && _$setAttribute(_el$77, "id", _p$.e = _v$63);
1370
+ _v$64 !== _p$.t && _$setAttribute(_el$77, "data-visibility", _p$.t = _v$64);
1179
1371
  return _p$;
1180
1372
  }, {
1181
1373
  e: undefined,
1182
1374
  t: undefined
1183
1375
  });
1184
- return _el$64;
1376
+ return _el$77;
1185
1377
  }
1186
1378
  })];
1187
1379
  const singleAction = () => {
@@ -1197,9 +1389,9 @@ function AppWorkspaceSidebarItem(props) {
1197
1389
  props.onActionClick?.(event);
1198
1390
  };
1199
1391
  const content = () => actionSlot()?.children ?? (() => {
1200
- var _el$66 = _$getNextElement(_tmpl$33);
1201
- _$effect(() => _$className(_el$66, iconClass(actionSlot()?.icon ?? props.actionIcon, "ti-dots")));
1202
- return _el$66;
1392
+ var _el$79 = _$getNextElement(_tmpl$38);
1393
+ _$effect(() => _$className(_el$79, iconClass(actionSlot()?.icon ?? props.actionIcon, "ti-dots")));
1394
+ return _el$79;
1203
1395
  })();
1204
1396
  return _$createComponent(Show, {
1205
1397
  get when() {
@@ -1212,16 +1404,16 @@ function AppWorkspaceSidebarItem(props) {
1212
1404
  },
1213
1405
  get fallback() {
1214
1406
  return (() => {
1215
- var _el$68 = _$getNextElement(_tmpl$35);
1216
- _el$68.$$click = select;
1217
- _$insert(_el$68, content);
1407
+ var _el$81 = _$getNextElement(_tmpl$40);
1408
+ _el$81.$$click = select;
1409
+ _$insert(_el$81, content);
1218
1410
  _$effect(_p$ => {
1219
- var _v$60 = actionSlot()?.disabled,
1220
- _v$61 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
1221
- _v$62 = label();
1222
- _v$60 !== _p$.e && _$setProperty(_el$68, "disabled", _p$.e = _v$60);
1223
- _v$61 !== _p$.t && _$setAttribute(_el$68, "data-visibility", _p$.t = _v$61);
1224
- _v$62 !== _p$.a && _$setAttribute(_el$68, "aria-label", _p$.a = _v$62);
1411
+ var _v$68 = actionSlot()?.disabled,
1412
+ _v$69 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
1413
+ _v$70 = label();
1414
+ _v$68 !== _p$.e && _$setProperty(_el$81, "disabled", _p$.e = _v$68);
1415
+ _v$69 !== _p$.t && _$setAttribute(_el$81, "data-visibility", _p$.t = _v$69);
1416
+ _v$70 !== _p$.a && _$setAttribute(_el$81, "aria-label", _p$.a = _v$70);
1225
1417
  return _p$;
1226
1418
  }, {
1227
1419
  e: undefined,
@@ -1229,20 +1421,20 @@ function AppWorkspaceSidebarItem(props) {
1229
1421
  a: undefined
1230
1422
  });
1231
1423
  _$runHydrationEvents();
1232
- return _el$68;
1424
+ return _el$81;
1233
1425
  })();
1234
1426
  },
1235
1427
  get children() {
1236
- var _el$67 = _$getNextElement(_tmpl$34);
1237
- _el$67.$$click = select;
1238
- _$insert(_el$67, content);
1428
+ var _el$80 = _$getNextElement(_tmpl$39);
1429
+ _el$80.$$click = select;
1430
+ _$insert(_el$80, content);
1239
1431
  _$effect(_p$ => {
1240
- var _v$57 = actionSlot()?.href,
1241
- _v$58 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
1242
- _v$59 = label();
1243
- _v$57 !== _p$.e && _$setAttribute(_el$67, "href", _p$.e = _v$57);
1244
- _v$58 !== _p$.t && _$setAttribute(_el$67, "data-visibility", _p$.t = _v$58);
1245
- _v$59 !== _p$.a && _$setAttribute(_el$67, "aria-label", _p$.a = _v$59);
1432
+ var _v$65 = actionSlot()?.href,
1433
+ _v$66 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
1434
+ _v$67 = label();
1435
+ _v$65 !== _p$.e && _$setAttribute(_el$80, "href", _p$.e = _v$65);
1436
+ _v$66 !== _p$.t && _$setAttribute(_el$80, "data-visibility", _p$.t = _v$66);
1437
+ _v$67 !== _p$.a && _$setAttribute(_el$80, "aria-label", _p$.a = _v$67);
1246
1438
  return _p$;
1247
1439
  }, {
1248
1440
  e: undefined,
@@ -1250,7 +1442,7 @@ function AppWorkspaceSidebarItem(props) {
1250
1442
  a: undefined
1251
1443
  });
1252
1444
  _$runHydrationEvents();
1253
- return _el$67;
1445
+ return _el$80;
1254
1446
  }
1255
1447
  });
1256
1448
  }
@@ -1551,16 +1743,16 @@ const AppWorkspaceNavTree = props => {
1551
1743
  return rowIcon();
1552
1744
  },
1553
1745
  get children() {
1554
- var _el$69 = _$getNextElement(_tmpl$36),
1555
- _el$70 = _el$69.firstChild;
1556
- _$spread(_el$69, _$mergeProps({
1746
+ var _el$82 = _$getNextElement(_tmpl$41),
1747
+ _el$83 = _el$82.firstChild;
1748
+ _$spread(_el$82, _$mergeProps({
1557
1749
  get ["data-k2b-nav-tree-toggle"]() {
1558
1750
  return usesIconDisclosure() ? "" : undefined;
1559
1751
  }
1560
1752
  }, () => iconAccessibility(item.iconLabel)), false, true);
1561
- _$effect(() => _$className(_el$70, iconClass(rowIcon())));
1753
+ _$effect(() => _$className(_el$83, iconClass(rowIcon())));
1562
1754
  _$runHydrationEvents();
1563
- return _el$69;
1755
+ return _el$82;
1564
1756
  }
1565
1757
  }), _$createComponent(Show, {
1566
1758
  get when() {
@@ -1568,51 +1760,51 @@ const AppWorkspaceNavTree = props => {
1568
1760
  },
1569
1761
  get fallback() {
1570
1762
  return (() => {
1571
- var _el$78 = _$getNextElement(_tmpl$40),
1572
- _el$79 = _el$78.firstChild;
1573
- _$insert(_el$79, () => item.label);
1574
- _$effect(() => _$setAttribute(_el$78, "data-label", typeof item.label === "string" ? item.label : undefined));
1575
- return _el$78;
1763
+ var _el$91 = _$getNextElement(_tmpl$45),
1764
+ _el$92 = _el$91.firstChild;
1765
+ _$insert(_el$92, () => item.label);
1766
+ _$effect(() => _$setAttribute(_el$91, "data-label", typeof item.label === "string" ? item.label : undefined));
1767
+ return _el$91;
1576
1768
  })();
1577
1769
  },
1578
1770
  get children() {
1579
- var _el$71 = _$getNextElement(_tmpl$37),
1580
- _el$72 = _el$71.firstChild,
1581
- _el$73 = _el$72.firstChild,
1582
- _el$74 = _el$72.nextSibling;
1583
- _$insert(_el$73, () => item.label);
1584
- _$insert(_el$74, () => item.description);
1585
- _$effect(() => _$setAttribute(_el$72, "data-label", typeof item.label === "string" ? item.label : undefined));
1586
- return _el$71;
1771
+ var _el$84 = _$getNextElement(_tmpl$42),
1772
+ _el$85 = _el$84.firstChild,
1773
+ _el$86 = _el$85.firstChild,
1774
+ _el$87 = _el$85.nextSibling;
1775
+ _$insert(_el$86, () => item.label);
1776
+ _$insert(_el$87, () => item.description);
1777
+ _$effect(() => _$setAttribute(_el$85, "data-label", typeof item.label === "string" ? item.label : undefined));
1778
+ return _el$84;
1587
1779
  }
1588
1780
  }), _$createComponent(Show, {
1589
1781
  get when() {
1590
1782
  return item.meta !== undefined;
1591
1783
  },
1592
1784
  get children() {
1593
- var _el$75 = _$getNextElement(_tmpl$38);
1594
- _$insert(_el$75, () => item.meta);
1785
+ var _el$88 = _$getNextElement(_tmpl$43);
1786
+ _$insert(_el$88, () => item.meta);
1595
1787
  _$effect(_p$ => {
1596
- var _v$63 = `k2b-app-workspace__sidebar-item-meta ${hasChildren() ? "" : "k2b-app-workspace__nav-tree-leaf-meta"}`,
1597
- _v$64 = item.metaVisibility === "hover" ? "hover" : undefined;
1598
- _v$63 !== _p$.e && _$className(_el$75, _p$.e = _v$63);
1599
- _v$64 !== _p$.t && _$setAttribute(_el$75, "data-visibility", _p$.t = _v$64);
1788
+ var _v$71 = `k2b-app-workspace__sidebar-item-meta ${hasChildren() ? "" : "k2b-app-workspace__nav-tree-leaf-meta"}`,
1789
+ _v$72 = item.metaVisibility === "hover" ? "hover" : undefined;
1790
+ _v$71 !== _p$.e && _$className(_el$88, _p$.e = _v$71);
1791
+ _v$72 !== _p$.t && _$setAttribute(_el$88, "data-visibility", _p$.t = _v$72);
1600
1792
  return _p$;
1601
1793
  }, {
1602
1794
  e: undefined,
1603
1795
  t: undefined
1604
1796
  });
1605
- return _el$75;
1797
+ return _el$88;
1606
1798
  }
1607
1799
  }), _$createComponent(Show, {
1608
1800
  get when() {
1609
1801
  return _$memo(() => !!hasChildren())() && !usesIconDisclosure();
1610
1802
  },
1611
1803
  get children() {
1612
- var _el$76 = _$getNextElement(_tmpl$39),
1613
- _el$77 = _el$76.firstChild;
1614
- _$effect(() => _$className(_el$77, `ti ${isExpanded(item.id) ? "ti-chevron-down" : "ti-chevron-right"}`));
1615
- return _el$76;
1804
+ var _el$89 = _$getNextElement(_tmpl$44),
1805
+ _el$90 = _el$89.firstChild;
1806
+ _$effect(() => _$className(_el$90, `ti ${isExpanded(item.id) ? "ti-chevron-down" : "ti-chevron-right"}`));
1807
+ return _el$89;
1616
1808
  }
1617
1809
  })];
1618
1810
  const row = () => _$createComponent(AppWorkspaceSidebarRow, {
@@ -1720,56 +1912,56 @@ const AppWorkspaceNavTree = props => {
1720
1912
  requestMove(target.move, false);
1721
1913
  };
1722
1914
  return (() => {
1723
- var _el$80 = _$getNextElement(_tmpl$42),
1724
- _el$82 = _el$80.firstChild,
1725
- [_el$83, _co$10] = _$getNextMarker(_el$82.nextSibling),
1726
- _el$84 = _el$83.nextSibling,
1727
- [_el$85, _co$11] = _$getNextMarker(_el$84.nextSibling);
1728
- _el$80.addEventListener("drop", onDrop);
1729
- _$addEventListener(_el$80, "dragleave", item.onDragLeave);
1730
- _el$80.addEventListener("dragover", onDragOver);
1731
- _$addEventListener(_el$80, "dragenter", item.onDragEnter);
1732
- _el$80.addEventListener("dragstart", onDragStart);
1733
- _el$80.$$keydown = onKeyDown;
1734
- _el$80.addEventListener("focus", () => setFocusedId(item.id));
1735
- var _ref$4 = treeItem;
1736
- typeof _ref$4 === "function" ? _$use(_ref$4, _el$80) : treeItem = _el$80;
1737
- _$setAttribute(_el$80, "aria-level", depth + 1);
1738
- _$setAttribute(_el$80, "data-k2b-nav-tree-parent-id", parentId);
1739
- _$insert(_el$80, row, _el$83, _co$10);
1740
- _$insert(_el$80, _$createComponent(Show, {
1915
+ var _el$93 = _$getNextElement(_tmpl$47),
1916
+ _el$95 = _el$93.firstChild,
1917
+ [_el$96, _co$13] = _$getNextMarker(_el$95.nextSibling),
1918
+ _el$97 = _el$96.nextSibling,
1919
+ [_el$98, _co$14] = _$getNextMarker(_el$97.nextSibling);
1920
+ _el$93.addEventListener("drop", onDrop);
1921
+ _$addEventListener(_el$93, "dragleave", item.onDragLeave);
1922
+ _el$93.addEventListener("dragover", onDragOver);
1923
+ _$addEventListener(_el$93, "dragenter", item.onDragEnter);
1924
+ _el$93.addEventListener("dragstart", onDragStart);
1925
+ _el$93.$$keydown = onKeyDown;
1926
+ _el$93.addEventListener("focus", () => setFocusedId(item.id));
1927
+ var _ref$5 = treeItem;
1928
+ typeof _ref$5 === "function" ? _$use(_ref$5, _el$93) : treeItem = _el$93;
1929
+ _$setAttribute(_el$93, "aria-level", depth + 1);
1930
+ _$setAttribute(_el$93, "data-k2b-nav-tree-parent-id", parentId);
1931
+ _$insert(_el$93, row, _el$96, _co$13);
1932
+ _$insert(_el$93, _$createComponent(Show, {
1741
1933
  get when() {
1742
1934
  return _$memo(() => !!hasChildren())() && isExpanded(item.id);
1743
1935
  },
1744
1936
  get children() {
1745
- var _el$81 = _$getNextElement(_tmpl$41);
1746
- _$insert(_el$81, () => renderItems(nested, depth + 1, item.id));
1747
- return _el$81;
1937
+ var _el$94 = _$getNextElement(_tmpl$46);
1938
+ _$insert(_el$94, () => renderItems(nested, depth + 1, item.id));
1939
+ return _el$94;
1748
1940
  }
1749
- }), _el$85, _co$11);
1941
+ }), _el$98, _co$14);
1750
1942
  _$effect(_p$ => {
1751
- var _v$65 = siblings().length,
1752
- _v$66 = place() + 1,
1753
- _v$67 = selected(),
1754
- _v$68 = hasChildren() ? isExpanded(item.id) : undefined,
1755
- _v$69 = item.disabled ? "true" : undefined,
1756
- _v$70 = item.disabled ? -1 : tabStopId() === item.id ? 0 : -1,
1757
- _v$71 = movable() ? true : undefined,
1758
- _v$72 = item.id,
1759
- _v$73 = dragged()?.id === item.id ? "" : undefined,
1760
- _v$74 = dropTarget()?.id === item.id ? dropTarget().side : undefined,
1761
- _v$75 = String(props.indented === false ? 0 : depth);
1762
- _v$65 !== _p$.e && _$setAttribute(_el$80, "aria-setsize", _p$.e = _v$65);
1763
- _v$66 !== _p$.t && _$setAttribute(_el$80, "aria-posinset", _p$.t = _v$66);
1764
- _v$67 !== _p$.a && _$setAttribute(_el$80, "aria-selected", _p$.a = _v$67);
1765
- _v$68 !== _p$.o && _$setAttribute(_el$80, "aria-expanded", _p$.o = _v$68);
1766
- _v$69 !== _p$.i && _$setAttribute(_el$80, "aria-disabled", _p$.i = _v$69);
1767
- _v$70 !== _p$.n && _$setAttribute(_el$80, "tabindex", _p$.n = _v$70);
1768
- _v$71 !== _p$.s && _$setAttribute(_el$80, "draggable", _p$.s = _v$71);
1769
- _v$72 !== _p$.h && _$setAttribute(_el$80, "data-k2b-nav-tree-id", _p$.h = _v$72);
1770
- _v$73 !== _p$.r && _$setAttribute(_el$80, "data-k2b-nav-tree-dragging", _p$.r = _v$73);
1771
- _v$74 !== _p$.d && _$setAttribute(_el$80, "data-k2b-nav-tree-drop", _p$.d = _v$74);
1772
- _v$75 !== _p$.l && _$setStyleProperty(_el$80, "--k2b-nav-tree-depth", _p$.l = _v$75);
1943
+ var _v$73 = siblings().length,
1944
+ _v$74 = place() + 1,
1945
+ _v$75 = selected(),
1946
+ _v$76 = hasChildren() ? isExpanded(item.id) : undefined,
1947
+ _v$77 = item.disabled ? "true" : undefined,
1948
+ _v$78 = item.disabled ? -1 : tabStopId() === item.id ? 0 : -1,
1949
+ _v$79 = movable() ? true : undefined,
1950
+ _v$80 = item.id,
1951
+ _v$81 = dragged()?.id === item.id ? "" : undefined,
1952
+ _v$82 = dropTarget()?.id === item.id ? dropTarget().side : undefined,
1953
+ _v$83 = String(props.indented === false ? 0 : depth);
1954
+ _v$73 !== _p$.e && _$setAttribute(_el$93, "aria-setsize", _p$.e = _v$73);
1955
+ _v$74 !== _p$.t && _$setAttribute(_el$93, "aria-posinset", _p$.t = _v$74);
1956
+ _v$75 !== _p$.a && _$setAttribute(_el$93, "aria-selected", _p$.a = _v$75);
1957
+ _v$76 !== _p$.o && _$setAttribute(_el$93, "aria-expanded", _p$.o = _v$76);
1958
+ _v$77 !== _p$.i && _$setAttribute(_el$93, "aria-disabled", _p$.i = _v$77);
1959
+ _v$78 !== _p$.n && _$setAttribute(_el$93, "tabindex", _p$.n = _v$78);
1960
+ _v$79 !== _p$.s && _$setAttribute(_el$93, "draggable", _p$.s = _v$79);
1961
+ _v$80 !== _p$.h && _$setAttribute(_el$93, "data-k2b-nav-tree-id", _p$.h = _v$80);
1962
+ _v$81 !== _p$.r && _$setAttribute(_el$93, "data-k2b-nav-tree-dragging", _p$.r = _v$81);
1963
+ _v$82 !== _p$.d && _$setAttribute(_el$93, "data-k2b-nav-tree-drop", _p$.d = _v$82);
1964
+ _v$83 !== _p$.l && _$setStyleProperty(_el$93, "--k2b-nav-tree-depth", _p$.l = _v$83);
1773
1965
  return _p$;
1774
1966
  }, {
1775
1967
  e: undefined,
@@ -1785,7 +1977,7 @@ const AppWorkspaceNavTree = props => {
1785
1977
  l: undefined
1786
1978
  });
1787
1979
  _$runHydrationEvents();
1788
- return _el$80;
1980
+ return _el$93;
1789
1981
  })();
1790
1982
  }
1791
1983
  });
@@ -1810,62 +2002,62 @@ const AppWorkspaceNavTree = props => {
1810
2002
  });
1811
2003
  });
1812
2004
  return (() => {
1813
- var _el$86 = _$getNextElement(_tmpl$43);
1814
- _el$86.addEventListener("dragend", endDrag);
1815
- _el$86.addEventListener("dragleave", event => {
2005
+ var _el$99 = _$getNextElement(_tmpl$48);
2006
+ _el$99.addEventListener("dragend", endDrag);
2007
+ _el$99.addEventListener("dragleave", event => {
1816
2008
  if (!root?.contains(event.relatedTarget)) setDropTarget(null);
1817
2009
  });
1818
- _el$86.addEventListener("dragover", event => {
2010
+ _el$99.addEventListener("dragover", event => {
1819
2011
  // Runs after the rows: a position no row claimed shows no gap.
1820
2012
  if (claimedDragOver !== event) setDropTarget(null);
1821
2013
  });
1822
- var _ref$5 = root;
1823
- typeof _ref$5 === "function" ? _$use(_ref$5, _el$86) : root = _el$86;
1824
- _$insert(_el$86, () => renderItems(roots, 0));
2014
+ var _ref$6 = root;
2015
+ typeof _ref$6 === "function" ? _$use(_ref$6, _el$99) : root = _el$99;
2016
+ _$insert(_el$99, () => renderItems(roots, 0));
1825
2017
  _$effect(_p$ => {
1826
- var _v$76 = `k2b-app-workspace__nav-tree ${props.class ?? ""}`,
1827
- _v$77 = props.ariaLabel;
1828
- _v$76 !== _p$.e && _$className(_el$86, _p$.e = _v$76);
1829
- _v$77 !== _p$.t && _$setAttribute(_el$86, "aria-label", _p$.t = _v$77);
2018
+ var _v$84 = `k2b-app-workspace__nav-tree ${props.class ?? ""}`,
2019
+ _v$85 = props.ariaLabel;
2020
+ _v$84 !== _p$.e && _$className(_el$99, _p$.e = _v$84);
2021
+ _v$85 !== _p$.t && _$setAttribute(_el$99, "aria-label", _p$.t = _v$85);
1830
2022
  return _p$;
1831
2023
  }, {
1832
2024
  e: undefined,
1833
2025
  t: undefined
1834
2026
  });
1835
- return _el$86;
2027
+ return _el$99;
1836
2028
  })();
1837
2029
  };
1838
2030
  AppWorkspaceNavTree.Item = AppWorkspaceNavTreeItem;
1839
2031
  const AppWorkspaceSidebarIconGrid = props => (() => {
1840
- var _el$87 = _$getNextElement(_tmpl$44),
1841
- _el$89 = _el$87.firstChild,
1842
- [_el$90, _co$12] = _$getNextMarker(_el$89.nextSibling),
1843
- _el$88 = _el$90.nextSibling;
1844
- _$spread(_el$87, _$mergeProps({
2032
+ var _el$100 = _$getNextElement(_tmpl$49),
2033
+ _el$102 = _el$100.firstChild,
2034
+ [_el$103, _co$15] = _$getNextMarker(_el$102.nextSibling),
2035
+ _el$101 = _el$103.nextSibling;
2036
+ _$spread(_el$100, _$mergeProps({
1845
2037
  get ["class"]() {
1846
2038
  return `k2b-app-workspace__sidebar-icon-grid-wrap ${props.class ?? ""}`;
1847
2039
  }
1848
2040
  }, () => modeAttrs(props.sidebarMode)), false, true);
1849
- _$insert(_el$87, _$createComponent(Show, {
2041
+ _$insert(_el$100, _$createComponent(Show, {
1850
2042
  get when() {
1851
2043
  return props.title;
1852
2044
  },
1853
2045
  children: title => (() => {
1854
- var _el$91 = _$getNextElement(_tmpl$15);
1855
- _$insert(_el$91, title);
1856
- return _el$91;
2046
+ var _el$104 = _$getNextElement(_tmpl$20);
2047
+ _$insert(_el$104, title);
2048
+ return _el$104;
1857
2049
  })()
1858
- }), _el$90, _co$12);
1859
- _$insert(_el$88, () => props.children);
1860
- _$effect(() => _$setAttribute(_el$88, "data-columns", props.columns ?? 2));
2050
+ }), _el$103, _co$15);
2051
+ _$insert(_el$101, () => props.children);
2052
+ _$effect(() => _$setAttribute(_el$101, "data-columns", props.columns ?? 2));
1861
2053
  _$runHydrationEvents();
1862
- return _el$87;
2054
+ return _el$100;
1863
2055
  })();
1864
2056
  const AppWorkspaceSidebarIconAction = props => {
1865
2057
  const content = (() => {
1866
- var _el$92 = _$getNextElement(_tmpl$45);
1867
- _$effect(() => _$className(_el$92, iconClass(props.icon)));
1868
- return _el$92;
2058
+ var _el$105 = _$getNextElement(_tmpl$50);
2059
+ _$effect(() => _$className(_el$105, iconClass(props.icon)));
2060
+ return _el$105;
1869
2061
  })();
1870
2062
  const attrs = () => ({
1871
2063
  class: `k2b-app-workspace__sidebar-icon-action ${props.active ? "is-active" : ""}`,
@@ -1878,8 +2070,8 @@ const AppWorkspaceSidebarIconAction = props => {
1878
2070
  ...modeAttrs(props.sidebarMode)
1879
2071
  });
1880
2072
  if (!props.href || props.disabled) return (() => {
1881
- var _el$93 = _$getNextElement(_tmpl$24);
1882
- _$spread(_el$93, _$mergeProps(attrs, {
2073
+ var _el$106 = _$getNextElement(_tmpl$29);
2074
+ _$spread(_el$106, _$mergeProps(attrs, {
1883
2075
  get disabled() {
1884
2076
  return props.disabled;
1885
2077
  },
@@ -1887,13 +2079,13 @@ const AppWorkspaceSidebarIconAction = props => {
1887
2079
  return props.onClick;
1888
2080
  }
1889
2081
  }), false, true);
1890
- _$insert(_el$93, content);
2082
+ _$insert(_el$106, content);
1891
2083
  _$runHydrationEvents();
1892
- return _el$93;
2084
+ return _el$106;
1893
2085
  })();
1894
2086
  if (props.navigation !== "enhanced" || !props.onNavigate) return (() => {
1895
- var _el$94 = _$getNextElement(_tmpl$25);
1896
- _$spread(_el$94, _$mergeProps({
2087
+ var _el$107 = _$getNextElement(_tmpl$30);
2088
+ _$spread(_el$107, _$mergeProps({
1897
2089
  get href() {
1898
2090
  return props.href;
1899
2091
  }
@@ -1902,9 +2094,9 @@ const AppWorkspaceSidebarIconAction = props => {
1902
2094
  return props.onClick;
1903
2095
  }
1904
2096
  }), false, true);
1905
- _$insert(_el$94, content);
2097
+ _$insert(_el$107, content);
1906
2098
  _$runHydrationEvents();
1907
- return _el$94;
2099
+ return _el$107;
1908
2100
  })();
1909
2101
  return _$createComponent(Link, _$mergeProps({
1910
2102
  get href() {
@@ -1942,12 +2134,12 @@ function AppWorkspaceHead(props) {
1942
2134
  // A nested workspace is part of a page that already shows its title.
1943
2135
  const trail = props.nested ? () => undefined : usePageTrail();
1944
2136
  return (() => {
1945
- var _el$95 = _$getNextElement(_tmpl$47),
1946
- _el$97 = _el$95.firstChild,
1947
- [_el$98, _co$13] = _$getNextMarker(_el$97.nextSibling),
1948
- _el$99 = _el$98.nextSibling,
1949
- [_el$100, _co$14] = _$getNextMarker(_el$99.nextSibling);
1950
- _$insert(_el$95, _$createComponent(IconButton, {
2137
+ var _el$108 = _$getNextElement(_tmpl$52),
2138
+ _el$110 = _el$108.firstChild,
2139
+ [_el$111, _co$16] = _$getNextMarker(_el$110.nextSibling),
2140
+ _el$112 = _el$111.nextSibling,
2141
+ [_el$113, _co$17] = _$getNextMarker(_el$112.nextSibling);
2142
+ _$insert(_el$108, _$createComponent(IconButton, {
1951
2143
  "class": "k2b-app-workspace__head-toggle",
1952
2144
  get label() {
1953
2145
  return messages().showNavigation;
@@ -1958,10 +2150,10 @@ function AppWorkspaceHead(props) {
1958
2150
  "aria-expanded": "false",
1959
2151
  "data-app-workspace-sidebar-toggle": "",
1960
2152
  get children() {
1961
- return _$getNextElement(_tmpl$46);
2153
+ return _$getNextElement(_tmpl$51);
1962
2154
  }
1963
- }), _el$98, _co$13);
1964
- _$insert(_el$95, _$createComponent(Show, {
2155
+ }), _el$111, _co$16);
2156
+ _$insert(_el$108, _$createComponent(Show, {
1965
2157
  get when() {
1966
2158
  return trail();
1967
2159
  },
@@ -1972,14 +2164,14 @@ function AppWorkspaceHead(props) {
1972
2164
  as: "p",
1973
2165
  fallback: true
1974
2166
  }), (() => {
1975
- var _el$101 = _$getNextElement(_tmpl$48);
1976
- _$setAttribute(_el$101, "data-k2b-server", isServer ? "" : undefined);
1977
- _$insert(_el$101, () => current().title);
1978
- return _el$101;
2167
+ var _el$114 = _$getNextElement(_tmpl$53);
2168
+ _$setAttribute(_el$114, "data-k2b-server", isServer ? "" : undefined);
2169
+ _$insert(_el$114, () => current().title);
2170
+ return _el$114;
1979
2171
  })()]
1980
- }), _el$100, _co$14);
1981
- _$effect(() => _$setAttribute(_el$95, "data-trail", trail()?.ancestors.length ? "up" : trail() ? "title" : undefined));
1982
- return _el$95;
2172
+ }), _el$113, _co$17);
2173
+ _$effect(() => _$setAttribute(_el$108, "data-trail", trail()?.ancestors.length ? "up" : trail() ? "title" : undefined));
2174
+ return _el$108;
1983
2175
  })();
1984
2176
  }
1985
2177
  const AppWorkspace = props => {
@@ -1987,11 +2179,12 @@ const AppWorkspace = props => {
1987
2179
  const serverLayoutState = useContext(LayoutStateContext);
1988
2180
  const nested = Boolean(useContext(WorkspaceContext));
1989
2181
  const [sidebarId, setSidebarId] = createSignal(`k2b-workspace-sidebar-${createUniqueId()}`);
2182
+ const initialLayoutState = () => props.layoutState?.() ?? serverLayoutState;
1990
2183
  const workspace = {
1991
2184
  sidebarId: sidebarId(),
1992
- setSidebarId
2185
+ setSidebarId,
2186
+ initialLayoutState
1993
2187
  };
1994
- const initialLayoutState = () => props.layoutState?.() ?? serverLayoutState;
1995
2188
 
1996
2189
  // The resize handles are inert markup until the controller is attached, so
1997
2190
  // the workspace attaches it itself and scopes it to this root. `onMount`
@@ -2014,31 +2207,31 @@ const AppWorkspace = props => {
2014
2207
  return _$createComponent(WorkspaceContext.Provider, {
2015
2208
  value: workspace,
2016
2209
  get children() {
2017
- var _el$102 = _$getNextElement(_tmpl$49),
2018
- _el$103 = _el$102.firstChild,
2019
- [_el$104, _co$15] = _$getNextMarker(_el$103.nextSibling),
2020
- _el$105 = _el$104.nextSibling,
2021
- [_el$106, _co$16] = _$getNextMarker(_el$105.nextSibling);
2022
- var _ref$6 = root;
2023
- typeof _ref$6 === "function" ? _$use(_ref$6, _el$102) : root = _el$102;
2024
- _$insert(_el$102, _$createComponent(AppWorkspaceHead, {
2210
+ var _el$115 = _$getNextElement(_tmpl$54),
2211
+ _el$116 = _el$115.firstChild,
2212
+ [_el$117, _co$18] = _$getNextMarker(_el$116.nextSibling),
2213
+ _el$118 = _el$117.nextSibling,
2214
+ [_el$119, _co$19] = _$getNextMarker(_el$118.nextSibling);
2215
+ var _ref$7 = root;
2216
+ typeof _ref$7 === "function" ? _$use(_ref$7, _el$115) : root = _el$115;
2217
+ _$insert(_el$115, _$createComponent(AppWorkspaceHead, {
2025
2218
  sidebarId: sidebarId,
2026
2219
  nested: nested
2027
- }), _el$104, _co$15);
2028
- _$insert(_el$102, () => props.children, _el$106, _co$16);
2220
+ }), _el$117, _co$18);
2221
+ _$insert(_el$115, () => props.children, _el$119, _co$19);
2029
2222
  _$effect(_p$ => {
2030
- var _v$78 = `k2b-app-workspace ${props.class ?? ""}`,
2031
- _v$79 = props.mobileSurface,
2032
- _v$80 = props.flat ? "true" : undefined,
2033
- _v$81 = initialLayoutState()?.sidebarCollapsed === undefined ? undefined : String(initialLayoutState()?.sidebarCollapsed),
2034
- _v$82 = props.resizable === false ? "false" : "true",
2035
- _v$83 = appWorkspaceLayoutStyle(initialLayoutState());
2036
- _v$78 !== _p$.e && _$className(_el$102, _p$.e = _v$78);
2037
- _v$79 !== _p$.t && _$setAttribute(_el$102, "data-mobile-surface", _p$.t = _v$79);
2038
- _v$80 !== _p$.a && _$setAttribute(_el$102, "data-flat", _p$.a = _v$80);
2039
- _v$81 !== _p$.o && _$setAttribute(_el$102, "data-sidebar-collapsed", _p$.o = _v$81);
2040
- _v$82 !== _p$.i && _$setAttribute(_el$102, "data-workspace-resizable", _p$.i = _v$82);
2041
- _p$.n = _$style(_el$102, _v$83, _p$.n);
2223
+ var _v$86 = `k2b-app-workspace ${props.class ?? ""}`,
2224
+ _v$87 = props.mobileSurface,
2225
+ _v$88 = props.flat ? "true" : undefined,
2226
+ _v$89 = initialLayoutState()?.sidebarCollapsed === undefined ? undefined : String(initialLayoutState()?.sidebarCollapsed),
2227
+ _v$90 = props.resizable === false ? "false" : "true",
2228
+ _v$91 = appWorkspaceLayoutStyle(initialLayoutState());
2229
+ _v$86 !== _p$.e && _$className(_el$115, _p$.e = _v$86);
2230
+ _v$87 !== _p$.t && _$setAttribute(_el$115, "data-mobile-surface", _p$.t = _v$87);
2231
+ _v$88 !== _p$.a && _$setAttribute(_el$115, "data-flat", _p$.a = _v$88);
2232
+ _v$89 !== _p$.o && _$setAttribute(_el$115, "data-sidebar-collapsed", _p$.o = _v$89);
2233
+ _v$90 !== _p$.i && _$setAttribute(_el$115, "data-workspace-resizable", _p$.i = _v$90);
2234
+ _p$.n = _$style(_el$115, _v$91, _p$.n);
2042
2235
  return _p$;
2043
2236
  }, {
2044
2237
  e: undefined,
@@ -2048,7 +2241,7 @@ const AppWorkspace = props => {
2048
2241
  i: undefined,
2049
2242
  n: undefined
2050
2243
  });
2051
- return _el$102;
2244
+ return _el$115;
2052
2245
  }
2053
2246
  });
2054
2247
  }
@@ -2063,10 +2256,10 @@ AppWorkspace.LayoutStateProvider = props => _$createComponent(LayoutStateContext
2063
2256
  }
2064
2257
  });
2065
2258
  AppWorkspace.Content = props => (() => {
2066
- var _el$107 = _$getNextElement(_tmpl$2);
2067
- _$insert(_el$107, () => props.children);
2068
- _$effect(() => _$className(_el$107, `k2b-app-workspace__content ${props.class ?? ""}`));
2069
- return _el$107;
2259
+ var _el$120 = _$getNextElement(_tmpl$5);
2260
+ _$insert(_el$120, () => props.children);
2261
+ _$effect(() => _$className(_el$120, `k2b-app-workspace__content ${props.class ?? ""}`));
2262
+ return _el$120;
2070
2263
  })();
2071
2264
  AppWorkspace.Main = AppWorkspaceMain;
2072
2265
  AppWorkspace.MainPane = AppWorkspaceMainPane;