@k2b/ui 0.25.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 (111) hide show
  1. package/dist/browser/actions/GestureMenu.js +2 -2
  2. package/dist/browser/actions/GestureMenu.js.map +1 -1
  3. package/dist/browser/chat/ChatComposer.js +811 -406
  4. package/dist/browser/chat/ChatComposer.js.map +1 -1
  5. package/dist/browser/chat/chat-behavior.js +4 -0
  6. package/dist/browser/chat/chat-behavior.js.map +1 -1
  7. package/dist/browser/chat/chat-messages.js +14 -0
  8. package/dist/browser/chat/chat-messages.js.map +1 -1
  9. package/dist/browser/chat/command-search.js +170 -0
  10. package/dist/browser/chat/command-search.js.map +1 -0
  11. package/dist/browser/chat/composer-document.js +1 -1
  12. package/dist/browser/chat/composer-document.js.map +1 -1
  13. package/dist/browser/chat/index.js.map +1 -1
  14. package/dist/browser/content/Calendar.js +8 -7
  15. package/dist/browser/content/Calendar.js.map +1 -1
  16. package/dist/browser/content/CalendarDayView.js +32 -6
  17. package/dist/browser/content/CalendarDayView.js.map +1 -1
  18. package/dist/browser/content/CalendarWeekView.js +4 -3
  19. package/dist/browser/content/CalendarWeekView.js.map +1 -1
  20. package/dist/browser/content/Timeline.js +3 -3
  21. package/dist/browser/content/Timeline.js.map +1 -1
  22. package/dist/browser/content/calendar-time-view.js +0 -1
  23. package/dist/browser/content/calendar-time-view.js.map +1 -1
  24. package/dist/browser/index.js +1 -0
  25. package/dist/browser/index.js.map +1 -1
  26. package/dist/browser/inputs/Combobox.js +26 -5
  27. package/dist/browser/inputs/Combobox.js.map +1 -1
  28. package/dist/browser/inputs/QrScanner.js +2 -1
  29. package/dist/browser/inputs/QrScanner.js.map +1 -1
  30. package/dist/browser/inputs/SelectChip.js +43 -12
  31. package/dist/browser/inputs/SelectChip.js.map +1 -1
  32. package/dist/browser/layout/AppWorkspace.js +720 -528
  33. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  34. package/dist/browser/layout/BottomSheet.js +8 -0
  35. package/dist/browser/layout/BottomSheet.js.map +1 -1
  36. package/dist/browser/layout/app-workspace-controller.js +159 -27
  37. package/dist/browser/layout/app-workspace-controller.js.map +1 -1
  38. package/dist/browser/layout/app-workspace-state.js +5 -1
  39. package/dist/browser/layout/app-workspace-state.js.map +1 -1
  40. package/dist/browser/layout/index.js +1 -1
  41. package/dist/browser/layout/index.js.map +1 -1
  42. package/dist/browser/layout/scroll-fade.js +14 -9
  43. package/dist/browser/layout/scroll-fade.js.map +1 -1
  44. package/dist/browser/layout/sidebar-scroll-memory.js +38 -0
  45. package/dist/browser/layout/sidebar-scroll-memory.js.map +1 -0
  46. package/dist/browser/motion.js +7 -0
  47. package/dist/browser/motion.js.map +1 -0
  48. package/dist/ssr/actions/GestureMenu.js +2 -2
  49. package/dist/ssr/actions/GestureMenu.js.map +1 -1
  50. package/dist/ssr/chat/ChatComposer.js +410 -93
  51. package/dist/ssr/chat/ChatComposer.js.map +1 -1
  52. package/dist/ssr/chat/chat-behavior.js +4 -0
  53. package/dist/ssr/chat/chat-behavior.js.map +1 -1
  54. package/dist/ssr/chat/chat-messages.js +14 -0
  55. package/dist/ssr/chat/chat-messages.js.map +1 -1
  56. package/dist/ssr/chat/command-search.js +170 -0
  57. package/dist/ssr/chat/command-search.js.map +1 -0
  58. package/dist/ssr/chat/composer-document.js +1 -1
  59. package/dist/ssr/chat/composer-document.js.map +1 -1
  60. package/dist/ssr/chat/index.js.map +1 -1
  61. package/dist/ssr/content/Calendar.js +8 -7
  62. package/dist/ssr/content/Calendar.js.map +1 -1
  63. package/dist/ssr/content/CalendarDayView.js +32 -6
  64. package/dist/ssr/content/CalendarDayView.js.map +1 -1
  65. package/dist/ssr/content/CalendarWeekView.js +4 -3
  66. package/dist/ssr/content/CalendarWeekView.js.map +1 -1
  67. package/dist/ssr/content/Timeline.js +3 -3
  68. package/dist/ssr/content/Timeline.js.map +1 -1
  69. package/dist/ssr/content/calendar-time-view.js +0 -1
  70. package/dist/ssr/content/calendar-time-view.js.map +1 -1
  71. package/dist/ssr/index.js +1 -0
  72. package/dist/ssr/index.js.map +1 -1
  73. package/dist/ssr/inputs/Combobox.js +22 -5
  74. package/dist/ssr/inputs/Combobox.js.map +1 -1
  75. package/dist/ssr/inputs/QrScanner.js +2 -1
  76. package/dist/ssr/inputs/QrScanner.js.map +1 -1
  77. package/dist/ssr/inputs/SelectChip.js +35 -11
  78. package/dist/ssr/inputs/SelectChip.js.map +1 -1
  79. package/dist/ssr/layout/AppWorkspace.js +254 -118
  80. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  81. package/dist/ssr/layout/BottomSheet.js +8 -0
  82. package/dist/ssr/layout/BottomSheet.js.map +1 -1
  83. package/dist/ssr/layout/app-workspace-controller.js +159 -27
  84. package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
  85. package/dist/ssr/layout/app-workspace-state.js +5 -1
  86. package/dist/ssr/layout/app-workspace-state.js.map +1 -1
  87. package/dist/ssr/layout/index.js +1 -1
  88. package/dist/ssr/layout/index.js.map +1 -1
  89. package/dist/ssr/layout/scroll-fade.js +14 -9
  90. package/dist/ssr/layout/scroll-fade.js.map +1 -1
  91. package/dist/ssr/layout/sidebar-scroll-memory.js +38 -0
  92. package/dist/ssr/layout/sidebar-scroll-memory.js.map +1 -0
  93. package/dist/ssr/motion.js +7 -0
  94. package/dist/ssr/motion.js.map +1 -0
  95. package/dist/styles.css +1 -1
  96. package/dist/types/chat/ChatComposer.d.ts +44 -2
  97. package/dist/types/chat/chat-behavior.d.ts +4 -0
  98. package/dist/types/chat/chat-messages.d.ts +7 -0
  99. package/dist/types/chat/command-search.d.ts +39 -0
  100. package/dist/types/chat/index.d.ts +1 -1
  101. package/dist/types/content/calendar-time-view.d.ts +0 -1
  102. package/dist/types/index.d.ts +1 -0
  103. package/dist/types/inputs/Combobox.d.ts +1 -0
  104. package/dist/types/inputs/SelectChip.d.ts +4 -0
  105. package/dist/types/layout/AppWorkspace.d.ts +13 -1
  106. package/dist/types/layout/BottomSheet.d.ts +8 -0
  107. package/dist/types/layout/index.d.ts +1 -1
  108. package/dist/types/layout/scroll-fade.d.ts +2 -0
  109. package/dist/types/layout/sidebar-scroll-memory.d.ts +6 -0
  110. package/dist/types/motion.d.ts +6 -0
  111. package/package.json +4 -4
@@ -2,81 +2,87 @@ 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";
77
82
  import { SidebarItemPreview } from "./SidebarItemPreview";
78
83
  import { AppWorkspaceSidebarSwitcher } from "./SidebarSwitcher";
79
- import { createScrollFade } from "./scroll-fade";
84
+ import { createScrollFade, scrollFadeEdges } from "./scroll-fade";
85
+ import { rememberSidebarScroll } from "./sidebar-scroll-memory";
80
86
  import { assertStableUiId, assertUniqueStableUiIds } from "./stable-id";
81
87
  import { useWorkspaceMessages } from "./workspace-messages";
82
88
  const ResizeContext = createContext(true);
@@ -104,6 +110,14 @@ const sidebarItemSlot = value => Boolean(value && typeof value === "object" && "
104
110
  const navTreeItemSlot = value => Boolean(value && typeof value === "object" && "kind" in value && value.kind === NAV_TREE_ITEM);
105
111
  function ResizeHandle(props) {
106
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
+ };
107
121
  return (() => {
108
122
  var _el$ = _$getNextElement(_tmpl$);
109
123
  _$effect(_p$ => {
@@ -112,29 +126,31 @@ function ResizeHandle(props) {
112
126
  _v$3 = props.kind === "drawer" ? "horizontal" : "vertical",
113
127
  _v$4 = props.minSize,
114
128
  _v$5 = props.maxSize,
115
- _v$6 = props.defaultSize,
116
- _v$7 = props.kind,
117
- _v$8 = props.panelId,
118
- _v$9 = props.edge,
119
- _v$0 = props.shadow ? "true" : undefined,
120
- _v$1 = props.defaultSize,
121
- _v$10 = props.minSize,
122
- _v$11 = props.maxSize,
123
- _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;
124
139
  _v$ !== _p$.e && _$setAttribute(_el$, "aria-label", _p$.e = _v$);
125
140
  _v$2 !== _p$.t && _$setAttribute(_el$, "aria-controls", _p$.t = _v$2);
126
141
  _v$3 !== _p$.a && _$setAttribute(_el$, "aria-orientation", _p$.a = _v$3);
127
142
  _v$4 !== _p$.o && _$setAttribute(_el$, "aria-valuemin", _p$.o = _v$4);
128
143
  _v$5 !== _p$.i && _$setAttribute(_el$, "aria-valuemax", _p$.i = _v$5);
129
144
  _v$6 !== _p$.n && _$setAttribute(_el$, "aria-valuenow", _p$.n = _v$6);
130
- _v$7 !== _p$.s && _$setAttribute(_el$, "data-app-workspace-resize", _p$.s = _v$7);
131
- _v$8 !== _p$.h && _$setAttribute(_el$, "data-workspace-panel-id", _p$.h = _v$8);
132
- _v$9 !== _p$.r && _$setAttribute(_el$, "data-workspace-resize-edge", _p$.r = _v$9);
133
- _v$0 !== _p$.d && _$setAttribute(_el$, "data-workspace-resize-shadow", _p$.d = _v$0);
134
- _v$1 !== _p$.l && _$setAttribute(_el$, "data-workspace-default-size", _p$.l = _v$1);
135
- _v$10 !== _p$.u && _$setAttribute(_el$, "data-workspace-min-size", _p$.u = _v$10);
136
- _v$11 !== _p$.c && _$setAttribute(_el$, "data-workspace-max-size", _p$.c = _v$11);
137
- _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);
138
154
  return _p$;
139
155
  }, {
140
156
  e: undefined,
@@ -150,7 +166,8 @@ function ResizeHandle(props) {
150
166
  l: undefined,
151
167
  u: undefined,
152
168
  c: undefined,
153
- w: undefined
169
+ w: undefined,
170
+ m: undefined
154
171
  });
155
172
  return _el$;
156
173
  })();
@@ -188,10 +205,60 @@ function AppWorkspaceMainPane(props) {
188
205
  domId: `k2b-workspace-pane-${createUniqueId()}`
189
206
  };
190
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
+ }
191
250
  function AppWorkspaceMain(props) {
192
251
  const rootResizable = useContext(ResizeContext);
252
+ const workspaceMessages = useWorkspaceMessages();
253
+ const levelsMode = createMemo(() => props.level !== undefined);
193
254
  const resolved = children(() => props.children);
194
- 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
+ });
195
262
  const paneIds = createMemo(() => {
196
263
  const ids = values().filter(mainPaneSlot).map(slot => slot.props.id);
197
264
  assertUniqueStableUiIds(ids, "AppWorkspace.MainPane id");
@@ -221,19 +288,68 @@ function AppWorkspaceMain(props) {
221
288
  });
222
289
  return result;
223
290
  });
224
- 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
+ }));
225
333
  // Presence of a MainPane slot — not of an *open* one — decides the split
226
334
  // layout. Deriving it from `regions()` made a workspace whose panes are all
227
335
  // closed fall back to `resolved()`, which renders the raw slot objects.
228
336
  const hasPanes = createMemo(() => paneIds().length > 0);
229
337
  return (() => {
230
- var _el$2 = _$getNextElement(_tmpl$2);
231
- _$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({
232
342
  get ["class"]() {
233
343
  return `k2b-app-workspace__main ${hasPanes() ? "has-panes" : ""} ${props.class ?? ""}`;
234
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
+ },
235
351
  get ["data-mobile-pane"]() {
236
- return props.mobilePane;
352
+ return _$memo(() => !!levelsMode())() ? undefined : props.mobilePane;
237
353
  },
238
354
  get ["data-width"]() {
239
355
  return props.width === "content" ? "content" : undefined;
@@ -248,7 +364,7 @@ function AppWorkspaceMain(props) {
248
364
  return props["aria-busy"];
249
365
  }
250
366
  }, () => scrollAttrs(props.scrollPreserveKey)), false, true);
251
- _$insert(_el$2, _$createComponent(Show, {
367
+ _$insert(_el$11, _$createComponent(Show, {
252
368
  get when() {
253
369
  return hasPanes();
254
370
  },
@@ -267,13 +383,15 @@ function AppWorkspaceMain(props) {
267
383
  };
268
384
  if (region.type === "primary") {
269
385
  return (() => {
270
- var _el$3 = _$getNextElement(_tmpl$3);
271
- _$insert(_el$3, () => region.children);
272
- _$effect(() => _$setAttribute(_el$3, "data-workspace-mobile-active", activeMobilePane() === "main" ? "true" : "false"));
273
- 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;
274
390
  })();
275
391
  }
276
392
  const pane = region.slot;
393
+ const levelIndex = () => levels().indexOf(pane) + 1;
394
+ const levelAttr = kind => levelsMode() ? levelClasses(levelIndex(), kind) : undefined;
277
395
  const panelId = assertStableUiId(pane.props.id, "AppWorkspace.MainPane id");
278
396
  const variable = appWorkspacePanelVariable("pane", panelId);
279
397
  const isAnchor = () => region === anchorRegion();
@@ -281,9 +399,12 @@ function AppWorkspaceMain(props) {
281
399
  const defaultSize = () => pane.props.defaultSize ?? APP_WORKSPACE_PANE_DEFAULT;
282
400
  const minSize = () => pane.props.minSize ?? APP_WORKSPACE_PANE_MIN;
283
401
  const maxSize = () => Math.max(minSize(), pane.props.maxSize ?? APP_WORKSPACE_PANE_MAX);
284
- const before = () => region.index < (anchorRegion()?.index ?? 0);
402
+ const before = () => levelsMode() || region.index < (anchorRegion()?.index ?? 0);
285
403
  const handle = () => _$createComponent(ResizeHandle, {
286
404
  kind: "pane",
405
+ get levelShown() {
406
+ return levelAttr("handle");
407
+ },
287
408
  get edge() {
288
409
  return before() ? "end" : "start";
289
410
  },
@@ -320,33 +441,98 @@ function AppWorkspaceMain(props) {
320
441
  return handle();
321
442
  }
322
443
  }), (() => {
323
- var _el$4 = _$getNextElement(_tmpl$4);
324
- _$setAttribute(_el$4, "data-workspace-panel-id", panelId);
325
- _$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
+ })());
326
503
  _$effect(_p$ => {
327
- var _v$13 = pane.domId,
328
- _v$14 = `k2b-app-workspace__main-pane ${isAnchor() ? "is-primary" : ""} ${pane.props.class ?? ""}`,
329
- _v$15 = pane.props.label,
330
- _v$16 = pane.props.id,
331
- _v$17 = activeMobilePane() === pane.props.id ? "true" : "false",
332
- _v$18 = resizable() ? "true" : "false",
333
- _v$19 = pane.props.surface === "navigation" ? "navigation" : undefined,
334
- _v$20 = pane.props.scroll === false ? "false" : undefined,
335
- _v$21 = pane.props.scroll !== false && pane.props.scrollFade !== false ? "both" : undefined,
336
- _v$22 = isAnchor() ? undefined : {
337
- "--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)`,
338
520
  "--k2b-workspace-panel-min": `${minSize()}px`
339
521
  };
340
- _v$13 !== _p$.e && _$setAttribute(_el$4, "id", _p$.e = _v$13);
341
- _v$14 !== _p$.t && _$className(_el$4, _p$.t = _v$14);
342
- _v$15 !== _p$.a && _$setAttribute(_el$4, "aria-label", _p$.a = _v$15);
343
- _v$16 !== _p$.o && _$setAttribute(_el$4, "data-workspace-main-region", _p$.o = _v$16);
344
- _v$17 !== _p$.i && _$setAttribute(_el$4, "data-workspace-mobile-active", _p$.i = _v$17);
345
- _v$18 !== _p$.n && _$setAttribute(_el$4, "data-workspace-resizable", _p$.n = _v$18);
346
- _v$19 !== _p$.s && _$setAttribute(_el$4, "data-surface", _p$.s = _v$19);
347
- _v$20 !== _p$.h && _$setAttribute(_el$4, "data-scroll", _p$.h = _v$20);
348
- _v$21 !== _p$.r && _$setAttribute(_el$4, "data-scroll-fade-mode", _p$.r = _v$21);
349
- _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);
350
536
  return _p$;
351
537
  }, {
352
538
  e: undefined,
@@ -358,9 +544,13 @@ function AppWorkspaceMain(props) {
358
544
  s: undefined,
359
545
  h: undefined,
360
546
  r: undefined,
361
- d: undefined
547
+ d: undefined,
548
+ l: undefined,
549
+ u: undefined,
550
+ c: undefined,
551
+ w: undefined
362
552
  });
363
- return _el$4;
553
+ return _el$13;
364
554
  })(), _$createComponent(Show, {
365
555
  get when() {
366
556
  return _$memo(() => !!resizable())() && before();
@@ -376,7 +566,7 @@ function AppWorkspaceMain(props) {
376
566
  }
377
567
  }));
378
568
  _$runHydrationEvents();
379
- return _el$2;
569
+ return _el$11;
380
570
  })();
381
571
  }
382
572
  function AppWorkspaceDetail(props) {
@@ -428,9 +618,9 @@ function AppWorkspaceDetail(props) {
428
618
  });
429
619
  });
430
620
  return [(() => {
431
- var _el$5 = _$getNextElement(_tmpl$5);
432
- _$effect(() => _$setProperty(_el$5, "innerHTML", workspaceRule()));
433
- return _el$5;
621
+ var _el$16 = _$getNextElement(_tmpl$0);
622
+ _$effect(() => _$setProperty(_el$16, "innerHTML", workspaceRule()));
623
+ return _el$16;
434
624
  })(), _$createComponent(Show, {
435
625
  get when() {
436
626
  return resizable();
@@ -460,37 +650,39 @@ function AppWorkspaceDetail(props) {
460
650
  });
461
651
  }
462
652
  }), (() => {
463
- var _el$6 = _$getNextElement(_tmpl$6),
464
- _el$7 = _el$6.firstChild,
465
- _el$8 = _el$7.nextSibling,
466
- [_el$9, _co$] = _$getNextMarker(_el$8.nextSibling);
467
- var _ref$ = aside;
468
- typeof _ref$ === "function" ? _$use(_ref$, _el$6) : aside = _el$6;
469
- _$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);
470
660
  _$effect(_p$ => {
471
- var _v$23 = domId(),
472
- _v$24 = `k2b-app-workspace__detail ${props.class ?? ""}`,
473
- _v$25 = props.width ?? "md",
474
- _v$26 = panelId(),
475
- _v$27 = resizable() ? "true" : "false",
476
- _v$28 = props.onClose ? "true" : undefined,
477
- _v$29 = props.onStep ? "true" : undefined,
478
- _v$30 = !props.open,
479
- _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 = {
480
671
  ...sizeStyle(),
481
672
  "view-transition-name": props.viewTransitionName
482
673
  },
483
- _v$32 = workspaceMessages().detailFullHeight;
484
- _v$23 !== _p$.e && _$setAttribute(_el$6, "id", _p$.e = _v$23);
485
- _v$24 !== _p$.t && _$className(_el$6, _p$.t = _v$24);
486
- _v$25 !== _p$.a && _$setAttribute(_el$6, "data-width", _p$.a = _v$25);
487
- _v$26 !== _p$.o && _$setAttribute(_el$6, "data-workspace-panel-id", _p$.o = _v$26);
488
- _v$27 !== _p$.i && _$setAttribute(_el$6, "data-workspace-resizable", _p$.i = _v$27);
489
- _v$28 !== _p$.n && _$setAttribute(_el$6, "data-workspace-detail-closable", _p$.n = _v$28);
490
- _v$29 !== _p$.s && _$setAttribute(_el$6, "data-workspace-detail-steppable", _p$.s = _v$29);
491
- _v$30 !== _p$.h && _$setProperty(_el$6, "hidden", _p$.h = _v$30);
492
- _p$.r = _$style(_el$6, _v$31, _p$.r);
493
- _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);
494
686
  return _p$;
495
687
  }, {
496
688
  e: undefined,
@@ -502,9 +694,10 @@ function AppWorkspaceDetail(props) {
502
694
  s: undefined,
503
695
  h: undefined,
504
696
  r: undefined,
505
- d: undefined
697
+ d: undefined,
698
+ l: undefined
506
699
  });
507
- return _el$6;
700
+ return _el$17;
508
701
  })()];
509
702
  }
510
703
  function AppWorkspaceBottomDrawer(props) {
@@ -554,25 +747,25 @@ function AppWorkspaceBottomDrawer(props) {
554
747
  });
555
748
  }
556
749
  }), (() => {
557
- var _el$0 = _$getNextElement(_tmpl$7);
558
- _$insert(_el$0, () => props.children);
750
+ var _el$21 = _$getNextElement(_tmpl$10);
751
+ _$insert(_el$21, () => props.children);
559
752
  _$effect(_p$ => {
560
- var _v$33 = domId(),
561
- _v$34 = `k2b-app-workspace__drawer ${props.class ?? ""}`,
562
- _v$35 = props.height ?? "md",
563
- _v$36 = panelId(),
564
- _v$37 = resizable() ? "true" : "false",
565
- _v$38 = !props.open,
566
- _v$39 = `var(${variable()}, ${defaultHeight()}px)`,
567
- _v$40 = props.viewTransitionName;
568
- _v$33 !== _p$.e && _$setAttribute(_el$0, "id", _p$.e = _v$33);
569
- _v$34 !== _p$.t && _$className(_el$0, _p$.t = _v$34);
570
- _v$35 !== _p$.a && _$setAttribute(_el$0, "data-height", _p$.a = _v$35);
571
- _v$36 !== _p$.o && _$setAttribute(_el$0, "data-workspace-panel-id", _p$.o = _v$36);
572
- _v$37 !== _p$.i && _$setAttribute(_el$0, "data-workspace-resizable", _p$.i = _v$37);
573
- _v$38 !== _p$.n && _$setProperty(_el$0, "hidden", _p$.n = _v$38);
574
- _v$39 !== _p$.s && _$setStyleProperty(_el$0, "--k2b-workspace-panel-size", _p$.s = _v$39);
575
- _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);
576
769
  return _p$;
577
770
  }, {
578
771
  e: undefined,
@@ -584,7 +777,7 @@ function AppWorkspaceBottomDrawer(props) {
584
777
  s: undefined,
585
778
  h: undefined
586
779
  });
587
- return _el$0;
780
+ return _el$21;
588
781
  })()];
589
782
  }
590
783
  function AppWorkspaceSidebar(props) {
@@ -610,36 +803,36 @@ function AppWorkspaceSidebar(props) {
610
803
  onCleanup(() => aside?.removeEventListener(APP_WORKSPACE_SIDEBAR_HIDE_EVENT, requestHide));
611
804
  });
612
805
  return [(() => {
613
- var _el$1 = _$getNextElement(_tmpl$7);
614
- var _ref$2 = aside;
615
- typeof _ref$2 === "function" ? _$use(_ref$2, _el$1) : aside = _el$1;
616
- _$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, {
617
810
  get when() {
618
811
  return !props.hidden;
619
812
  },
620
813
  get children() {
621
- var _el$10 = _$getNextElement(_tmpl$8);
622
- _$insert(_el$10, () => desktop()?.children);
623
- return _el$10;
814
+ var _el$23 = _$getNextElement(_tmpl$11);
815
+ _$insert(_el$23, () => desktop()?.children);
816
+ return _el$23;
624
817
  }
625
818
  }));
626
819
  _$effect(_p$ => {
627
- var _v$41 = domId(),
628
- _v$42 = `k2b-app-workspace__sidebar ${props.class ?? ""}`,
629
- _v$43 = props.label,
630
- _v$44 = props.hidden || undefined,
631
- _v$45 = props.mobile === "stacked" ? "stacked" : undefined,
632
- _v$46 = resizable() ? "true" : "false",
633
- _v$47 = props.collapsible ? "true" : "false",
634
- _v$48 = props.onHiddenChange ? "true" : undefined;
635
- _v$41 !== _p$.e && _$setAttribute(_el$1, "id", _p$.e = _v$41);
636
- _v$42 !== _p$.t && _$className(_el$1, _p$.t = _v$42);
637
- _v$43 !== _p$.a && _$setAttribute(_el$1, "aria-label", _p$.a = _v$43);
638
- _v$44 !== _p$.o && _$setProperty(_el$1, "hidden", _p$.o = _v$44);
639
- _v$45 !== _p$.i && _$setAttribute(_el$1, "data-mobile", _p$.i = _v$45);
640
- _v$46 !== _p$.n && _$setAttribute(_el$1, "data-workspace-resizable", _p$.n = _v$46);
641
- _v$47 !== _p$.s && _$setAttribute(_el$1, "data-workspace-collapsible", _p$.s = _v$47);
642
- _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);
643
836
  return _p$;
644
837
  }, {
645
838
  e: undefined,
@@ -651,7 +844,7 @@ function AppWorkspaceSidebar(props) {
651
844
  s: undefined,
652
845
  h: undefined
653
846
  });
654
- return _el$1;
847
+ return _el$22;
655
848
  })(), _$createComponent(Show, {
656
849
  get when() {
657
850
  return _$memo(() => !!resizable())() && !props.hidden;
@@ -683,26 +876,24 @@ const AppWorkspaceSidebarDesktop = props => ({
683
876
  kind: SIDEBAR_DESKTOP,
684
877
  children: props.children
685
878
  });
686
- // Document navigations rebuild the sidebar from the server, so this inline
687
- // script restores its offset while the document is still parsing: before the
688
- // first paint, before a view transition can snapshot it, and before any island
689
- // hydrates. Islands load asynchronously and server-only sidebars never mount,
690
- // so `onMount` would be too late or never run. The memory is one
691
- // `sessionStorage` entry per path segment and sidebar position and ends with
692
- // the tab. A stored offset is applied first; the current item, or on a deeper
693
- // page the item that contains it, is then kept in view, which is a no-op when
694
- // the offset already shows it. The frame callback
695
- // repeats the restore once the whole document is parsed, because content that
696
- // follows the sidebar can still change its height before the first paint.
697
- const SIDEBAR_SCROLL_MEMORY_SCRIPT = ["(function(){", "var body=document.currentScript&&document.currentScript.previousElementSibling;if(!body)return;", "var storage;try{storage=window.sessionStorage}catch(_){return}", 'var key="k2b-sidebar-scroll:"+location.pathname.split("/")[1]+":"+document.querySelectorAll(".k2b-app-workspace__sidebar-body").length;', "var restore=function(){", "var stored=storage.getItem(key);if(stored!==null)body.scrollTop=Number(stored);", 'var current=body.querySelector(\'[aria-current="page"]\')||body.querySelector(\'[aria-current="true"]\');if(current)current.scrollIntoView({block:"nearest"});', "};", "restore();requestAnimationFrame(restore);", "var frame=0;", 'body.addEventListener("scroll",function(){if(frame)return;frame=requestAnimationFrame(function(){frame=0;try{storage.setItem(key,String(body.scrollTop))}catch(_){}})},{passive:true});', "})();"].join("");
879
+ // The inline script restores server markup while parsing; onMount restores a
880
+ // client-rendered sidebar when an island replaces it. Both paths keep the
881
+ // current item in view and set the fade before paint, repeating the restore
882
+ // in the first frame when the whole document has its final layout. Only
883
+ // pagehide stores the offset: restores before final layout can be clamped,
884
+ // and remembering those programmatic scrolls would shrink the stored offset.
885
+ // Memory is per scroll-preserve key (or page path) and sidebar position and
886
+ // ends with the tab.
887
+ const SIDEBAR_SCROLL_MEMORY_SCRIPT = `(${rememberSidebarScroll})(document.currentScript&&document.currentScript.previousElementSibling,${scrollFadeEdges})`;
698
888
  const AppWorkspaceSidebarBody = props => {
699
889
  let body;
890
+ onMount(() => onCleanup(rememberSidebarScroll(body, scrollFadeEdges)));
700
891
  createScrollFade(() => body, () => props.scrollFade !== false);
701
892
  return [(() => {
702
- var _el$11 = _$getNextElement(_tmpl$2);
703
- var _ref$3 = body;
704
- typeof _ref$3 === "function" ? _$use(_ref$3, _el$11) : body = _el$11;
705
- _$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({
706
897
  get ["class"]() {
707
898
  return `k2b-app-workspace__sidebar-body ${props.class ?? ""}`;
708
899
  },
@@ -710,25 +901,25 @@ const AppWorkspaceSidebarBody = props => {
710
901
  return props.scrollFade !== false ? "both" : undefined;
711
902
  }
712
903
  }, () => scrollAttrs(props.scrollPreserveKey), () => modeAttrs(props.sidebarMode)), false, true);
713
- _$insert(_el$11, () => props.children);
904
+ _$insert(_el$24, () => props.children);
714
905
  _$runHydrationEvents();
715
- return _el$11;
906
+ return _el$24;
716
907
  })(), (() => {
717
- var _el$12 = _$getNextElement(_tmpl$9);
718
- _$setProperty(_el$12, "innerHTML", SIDEBAR_SCROLL_MEMORY_SCRIPT);
719
- return _el$12;
908
+ var _el$25 = _$getNextElement(_tmpl$12);
909
+ _$setProperty(_el$25, "innerHTML", SIDEBAR_SCROLL_MEMORY_SCRIPT);
910
+ return _el$25;
720
911
  })()];
721
912
  };
722
913
  const AppWorkspaceSidebarFooter = props => (() => {
723
- var _el$13 = _$getNextElement(_tmpl$0);
724
- _$spread(_el$13, _$mergeProps({
914
+ var _el$26 = _$getNextElement(_tmpl$13);
915
+ _$spread(_el$26, _$mergeProps({
725
916
  get ["class"]() {
726
917
  return `k2b-app-workspace__sidebar-footer ${props.class ?? ""}`;
727
918
  }
728
919
  }, () => modeAttrs(props.sidebarMode)), false, true);
729
- _$insert(_el$13, () => props.children);
920
+ _$insert(_el$26, () => props.children);
730
921
  _$runHydrationEvents();
731
- return _el$13;
922
+ return _el$26;
732
923
  })();
733
924
  const AppWorkspaceSidebarSection = props => {
734
925
  const [expanded, setExpanded] = createSignal(props.defaultOpen ?? true);
@@ -739,27 +930,27 @@ const AppWorkspaceSidebarSection = props => {
739
930
  return props.icon;
740
931
  },
741
932
  get children() {
742
- var _el$14 = _$getNextElement(_tmpl$1),
743
- _el$15 = _el$14.firstChild;
744
- _$effect(() => _$className(_el$15, iconClass(props.icon)));
745
- 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;
746
937
  }
747
938
  }), _$memo(() => props.title), _$createComponent(Show, {
748
939
  get when() {
749
940
  return props.count !== undefined;
750
941
  },
751
942
  get children() {
752
- var _el$16 = _$getNextElement(_tmpl$10);
753
- _$insert(_el$16, () => props.count);
754
- return _el$16;
943
+ var _el$29 = _$getNextElement(_tmpl$15);
944
+ _$insert(_el$29, () => props.count);
945
+ return _el$29;
755
946
  }
756
947
  })];
757
948
  return (() => {
758
- var _el$17 = _$getNextElement(_tmpl$14),
759
- _el$29 = _el$17.firstChild,
760
- [_el$30, _co$5] = _$getNextMarker(_el$29.nextSibling),
761
- _el$28 = _el$30.nextSibling;
762
- _$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({
763
954
  get ["class"]() {
764
955
  return `k2b-app-workspace__sidebar-section ${props.class ?? ""}`;
765
956
  },
@@ -767,17 +958,17 @@ const AppWorkspaceSidebarSection = props => {
767
958
  return props.collapsible ? "true" : undefined;
768
959
  }
769
960
  }, () => modeAttrs(props.sidebarMode)), false, true);
770
- _$insert(_el$17, _$createComponent(Show, {
961
+ _$insert(_el$30, _$createComponent(Show, {
771
962
  get when() {
772
963
  return props.title || props.actions;
773
964
  },
774
965
  get children() {
775
- var _el$18 = _$getNextElement(_tmpl$13),
776
- _el$24 = _el$18.firstChild,
777
- [_el$25, _co$3] = _$getNextMarker(_el$24.nextSibling),
778
- _el$26 = _el$25.nextSibling,
779
- [_el$27, _co$4] = _$getNextMarker(_el$26.nextSibling);
780
- _$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, {
781
972
  get when() {
782
973
  return props.collapsible;
783
974
  },
@@ -787,56 +978,56 @@ const AppWorkspaceSidebarSection = props => {
787
978
  return props.title;
788
979
  },
789
980
  get children() {
790
- var _el$31 = _$getNextElement(_tmpl$15);
791
- _$insert(_el$31, title);
792
- return _el$31;
981
+ var _el$44 = _$getNextElement(_tmpl$20);
982
+ _$insert(_el$44, title);
983
+ return _el$44;
793
984
  }
794
985
  });
795
986
  },
796
987
  get children() {
797
- var _el$19 = _$getNextElement(_tmpl$11),
798
- _el$21 = _el$19.firstChild,
799
- [_el$22, _co$2] = _$getNextMarker(_el$21.nextSibling),
800
- _el$20 = _el$22.nextSibling;
801
- _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 = () => {
802
993
  const next = !open();
803
994
  setExpanded(next);
804
995
  props.onOpenChange?.(next);
805
996
  };
806
- _$setAttribute(_el$19, "aria-controls", id);
807
- _$insert(_el$19, title, _el$22, _co$2);
997
+ _$setAttribute(_el$32, "aria-controls", id);
998
+ _$insert(_el$32, title, _el$35, _co$5);
808
999
  _$effect(_p$ => {
809
- var _v$49 = open(),
810
- _v$50 = open() ? "ti ti-chevron-down" : "ti ti-chevron-right";
811
- _v$49 !== _p$.e && _$setAttribute(_el$19, "aria-expanded", _p$.e = _v$49);
812
- _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);
813
1004
  return _p$;
814
1005
  }, {
815
1006
  e: undefined,
816
1007
  t: undefined
817
1008
  });
818
1009
  _$runHydrationEvents();
819
- return _el$19;
1010
+ return _el$32;
820
1011
  }
821
- }), _el$25, _co$3);
822
- _$insert(_el$18, _$createComponent(Show, {
1012
+ }), _el$38, _co$6);
1013
+ _$insert(_el$31, _$createComponent(Show, {
823
1014
  get when() {
824
1015
  return props.actions;
825
1016
  },
826
1017
  get children() {
827
- var _el$23 = _$getNextElement(_tmpl$12);
828
- _$insert(_el$23, () => props.actions);
829
- return _el$23;
1018
+ var _el$36 = _$getNextElement(_tmpl$17);
1019
+ _$insert(_el$36, () => props.actions);
1020
+ return _el$36;
830
1021
  }
831
- }), _el$27, _co$4);
832
- return _el$18;
1022
+ }), _el$40, _co$7);
1023
+ return _el$31;
833
1024
  }
834
- }), _el$30, _co$5);
835
- _$setAttribute(_el$28, "id", id);
836
- _$insert(_el$28, () => props.children);
837
- _$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()));
838
1029
  _$runHydrationEvents();
839
- return _el$17;
1030
+ return _el$30;
840
1031
  })();
841
1032
  };
842
1033
  const AppWorkspaceSidebarItemIcon = props => mergeProps({
@@ -852,10 +1043,10 @@ const AppWorkspaceSidebarItemAction = props => mergeProps({
852
1043
  kind: SIDEBAR_ITEM_ACTION
853
1044
  }, props);
854
1045
  const AppWorkspaceSidebarItemActions = props => (() => {
855
- var _el$32 = _$getNextElement(_tmpl$16);
856
- _$insert(_el$32, () => props.children);
857
- _$effect(() => _$setAttribute(_el$32, "data-visibility", props.visibility === "hover" ? "hover" : undefined));
858
- 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;
859
1050
  })();
860
1051
  const AppWorkspaceSidebarItemStatus = props => {
861
1052
  const workspaceMessages = useWorkspaceMessages();
@@ -873,8 +1064,8 @@ const AppWorkspaceSidebarItemStatus = props => {
873
1064
  // space, and it still keeps the row's label on one line, so the first count
874
1065
  // never re-wraps the label and moves the rows below.
875
1066
  return (() => {
876
- var _el$33 = _$getNextElement(_tmpl$22);
877
- _$insert(_el$33, _$createComponent(Show, {
1067
+ var _el$46 = _$getNextElement(_tmpl$27);
1068
+ _$insert(_el$46, _$createComponent(Show, {
878
1069
  get when() {
879
1070
  return description();
880
1071
  },
@@ -884,18 +1075,18 @@ const AppWorkspaceSidebarItemStatus = props => {
884
1075
  return props.mention;
885
1076
  },
886
1077
  get children() {
887
- return _$getNextElement(_tmpl$17);
1078
+ return _$getNextElement(_tmpl$22);
888
1079
  }
889
1080
  }), _$createComponent(Show, {
890
1081
  get when() {
891
1082
  return props.muted;
892
1083
  },
893
1084
  get children() {
894
- return _$getNextElement(_tmpl$18);
1085
+ return _$getNextElement(_tmpl$23);
895
1086
  }
896
1087
  }), (() => {
897
- var _el$36 = _$getNextElement(_tmpl$20);
898
- _$insert(_el$36, _$createComponent(Show, {
1088
+ var _el$49 = _$getNextElement(_tmpl$25);
1089
+ _$insert(_el$49, _$createComponent(Show, {
899
1090
  get when() {
900
1091
  return count() || waiting() === 0;
901
1092
  },
@@ -905,42 +1096,42 @@ const AppWorkspaceSidebarItemStatus = props => {
905
1096
  return dot();
906
1097
  },
907
1098
  get children() {
908
- return _$getNextElement(_tmpl$23);
1099
+ return _$getNextElement(_tmpl$28);
909
1100
  }
910
1101
  });
911
1102
  },
912
1103
  get children() {
913
- var _el$37 = _$getNextElement(_tmpl$19);
914
- _$insert(_el$37, (() => {
915
- var _c$ = _$memo(() => count() > 99);
916
- 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();
917
1108
  })());
918
- _$effect(() => _$setAttribute(_el$37, "data-mention", props.mention ? "true" : undefined));
919
- return _el$37;
1109
+ _$effect(() => _$setAttribute(_el$50, "data-mention", props.mention ? "true" : undefined));
1110
+ return _el$50;
920
1111
  }
921
1112
  }));
922
- return _el$36;
1113
+ return _el$49;
923
1114
  })(), (() => {
924
- var _el$38 = _$getNextElement(_tmpl$21),
925
- _el$39 = _el$38.firstChild,
926
- _el$40 = _el$39.nextSibling,
927
- [_el$41, _co$6] = _$getNextMarker(_el$40.nextSibling);
928
- _$insert(_el$38, description, _el$41, _co$6);
929
- 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;
930
1121
  })()];
931
1122
  }
932
1123
  }));
933
1124
  _$effect(_p$ => {
934
- var _v$51 = waiting() !== null ? undefined : count() ? "count" : dot() ? "dot" : undefined,
935
- _v$52 = waiting() === null ? undefined : waiting() ? "count" : "zero";
936
- _v$51 !== _p$.e && _$setAttribute(_el$33, "data-unread", _p$.e = _v$51);
937
- _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);
938
1129
  return _p$;
939
1130
  }, {
940
1131
  e: undefined,
941
1132
  t: undefined
942
1133
  });
943
- return _el$33;
1134
+ return _el$46;
944
1135
  })();
945
1136
  };
946
1137
  /** Shared visual and semantic row frame for flat sidebar items and tree items. */
@@ -968,8 +1159,8 @@ function AppWorkspaceSidebarRow(props) {
968
1159
  },
969
1160
  get fallback() {
970
1161
  return (() => {
971
- var _el$43 = _$getNextElement(_tmpl$24);
972
- _$spread(_el$43, _$mergeProps(attrs, {
1162
+ var _el$56 = _$getNextElement(_tmpl$29);
1163
+ _$spread(_el$56, _$mergeProps(attrs, {
973
1164
  get tabIndex() {
974
1165
  return props.tabIndex;
975
1166
  },
@@ -980,9 +1171,9 @@ function AppWorkspaceSidebarRow(props) {
980
1171
  return props.onClick;
981
1172
  }
982
1173
  }), false, true);
983
- _$insert(_el$43, () => props.children);
1174
+ _$insert(_el$56, () => props.children);
984
1175
  _$runHydrationEvents();
985
- return _el$43;
1176
+ return _el$56;
986
1177
  })();
987
1178
  },
988
1179
  get children() {
@@ -992,8 +1183,8 @@ function AppWorkspaceSidebarRow(props) {
992
1183
  },
993
1184
  get fallback() {
994
1185
  return (() => {
995
- var _el$44 = _$getNextElement(_tmpl$25);
996
- _$spread(_el$44, _$mergeProps({
1186
+ var _el$57 = _$getNextElement(_tmpl$30);
1187
+ _$spread(_el$57, _$mergeProps({
997
1188
  get href() {
998
1189
  return props.href;
999
1190
  }
@@ -1008,9 +1199,9 @@ function AppWorkspaceSidebarRow(props) {
1008
1199
  return props.onClick;
1009
1200
  }
1010
1201
  }), false, true);
1011
- _$insert(_el$44, () => props.children);
1202
+ _$insert(_el$57, () => props.children);
1012
1203
  _$runHydrationEvents();
1013
- return _el$44;
1204
+ return _el$57;
1014
1205
  })();
1015
1206
  },
1016
1207
  get children() {
@@ -1056,22 +1247,22 @@ function AppWorkspaceSidebarRow(props) {
1056
1247
  });
1057
1248
  },
1058
1249
  get children() {
1059
- var _el$45 = _$getNextElement(_tmpl$26),
1060
- _el$46 = _el$45.firstChild,
1061
- [_el$47, _co$7] = _$getNextMarker(_el$46.nextSibling),
1062
- _el$48 = _el$47.nextSibling,
1063
- [_el$49, _co$8] = _$getNextMarker(_el$48.nextSibling);
1064
- _$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, {
1065
1256
  get ["data-disabled"]() {
1066
1257
  return props.disabled ? "true" : undefined;
1067
1258
  }
1068
1259
  }), false, true);
1069
- _$insert(_el$45, _$createComponent(Control, {
1260
+ _$insert(_el$58, _$createComponent(Control, {
1070
1261
  grouped: true
1071
- }), _el$47, _co$7);
1072
- _$insert(_el$45, () => props.actions, _el$49, _co$8);
1262
+ }), _el$60, _co$0);
1263
+ _$insert(_el$58, () => props.actions, _el$62, _co$1);
1073
1264
  _$runHydrationEvents();
1074
- return _el$45;
1265
+ return _el$58;
1075
1266
  }
1076
1267
  });
1077
1268
  }
@@ -1104,85 +1295,85 @@ function AppWorkspaceSidebarItem(props) {
1104
1295
  return iconContent() || icon();
1105
1296
  },
1106
1297
  get children() {
1107
- var _el$50 = _$getNextElement(_tmpl$27);
1108
- _$insert(_el$50, () => iconContent() ?? (() => {
1109
- var _el$65 = _$getNextElement(_tmpl$33);
1110
- _$effect(() => _$className(_el$65, iconClass(icon())));
1111
- 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;
1112
1303
  })());
1113
- return _el$50;
1304
+ return _el$63;
1114
1305
  }
1115
1306
  }), (() => {
1116
- var _el$51 = _$getNextElement(_tmpl$31),
1117
- _el$60 = _el$51.firstChild,
1118
- [_el$61, _co$0] = _$getNextMarker(_el$60.nextSibling),
1119
- _el$57 = _el$61.nextSibling,
1120
- _el$58 = _el$57.firstChild,
1121
- _el$62 = _el$57.nextSibling,
1122
- [_el$63, _co$1] = _$getNextMarker(_el$62.nextSibling);
1123
- _$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, {
1124
1315
  get when() {
1125
1316
  return props.context || props.contextMeta;
1126
1317
  },
1127
1318
  get children() {
1128
- var _el$52 = _$getNextElement(_tmpl$29),
1129
- _el$53 = _el$52.firstChild,
1130
- _el$55 = _el$53.nextSibling,
1131
- [_el$56, _co$9] = _$getNextMarker(_el$55.nextSibling);
1132
- _$insert(_el$53, () => props.context);
1133
- _$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, {
1134
1325
  get when() {
1135
1326
  return props.contextMeta;
1136
1327
  },
1137
1328
  get children() {
1138
- var _el$54 = _$getNextElement(_tmpl$28);
1139
- _$insert(_el$54, () => props.contextMeta);
1140
- return _el$54;
1329
+ var _el$67 = _$getNextElement(_tmpl$33);
1330
+ _$insert(_el$67, () => props.contextMeta);
1331
+ return _el$67;
1141
1332
  }
1142
- }), _el$56, _co$9);
1143
- return _el$52;
1333
+ }), _el$69, _co$10);
1334
+ return _el$65;
1144
1335
  }
1145
- }), _el$61, _co$0);
1146
- _$insert(_el$58, () => label());
1147
- _$insert(_el$51, _$createComponent(Show, {
1336
+ }), _el$74, _co$11);
1337
+ _$insert(_el$71, () => label());
1338
+ _$insert(_el$64, _$createComponent(Show, {
1148
1339
  get when() {
1149
1340
  return props.description;
1150
1341
  },
1151
1342
  get children() {
1152
- var _el$59 = _$getNextElement(_tmpl$30);
1153
- _$insert(_el$59, () => props.description);
1154
- return _el$59;
1343
+ var _el$72 = _$getNextElement(_tmpl$35);
1344
+ _$insert(_el$72, () => props.description);
1345
+ return _el$72;
1155
1346
  }
1156
- }), _el$63, _co$1);
1347
+ }), _el$76, _co$12);
1157
1348
  _$effect(_p$ => {
1158
- var _v$53 = oneLine() ? "1" : undefined,
1159
- _v$54 = !oneLine() && typeof label() === "string" ? label() : undefined;
1160
- _v$53 !== _p$.e && _$setAttribute(_el$57, "data-lines", _p$.e = _v$53);
1161
- _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);
1162
1353
  return _p$;
1163
1354
  }, {
1164
1355
  e: undefined,
1165
1356
  t: undefined
1166
1357
  });
1167
- return _el$51;
1358
+ return _el$64;
1168
1359
  })(), _$createComponent(Show, {
1169
1360
  get when() {
1170
1361
  return hasMeta();
1171
1362
  },
1172
1363
  get children() {
1173
- var _el$64 = _$getNextElement(_tmpl$32);
1174
- _$insert(_el$64, meta);
1364
+ var _el$77 = _$getNextElement(_tmpl$37);
1365
+ _$insert(_el$77, meta);
1175
1366
  _$effect(_p$ => {
1176
- var _v$55 = props.preview?.trigger === "row" ? metaId : undefined,
1177
- _v$56 = metaVisibility() === "hover" ? "hover" : undefined;
1178
- _v$55 !== _p$.e && _$setAttribute(_el$64, "id", _p$.e = _v$55);
1179
- _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);
1180
1371
  return _p$;
1181
1372
  }, {
1182
1373
  e: undefined,
1183
1374
  t: undefined
1184
1375
  });
1185
- return _el$64;
1376
+ return _el$77;
1186
1377
  }
1187
1378
  })];
1188
1379
  const singleAction = () => {
@@ -1198,9 +1389,9 @@ function AppWorkspaceSidebarItem(props) {
1198
1389
  props.onActionClick?.(event);
1199
1390
  };
1200
1391
  const content = () => actionSlot()?.children ?? (() => {
1201
- var _el$66 = _$getNextElement(_tmpl$33);
1202
- _$effect(() => _$className(_el$66, iconClass(actionSlot()?.icon ?? props.actionIcon, "ti-dots")));
1203
- 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;
1204
1395
  })();
1205
1396
  return _$createComponent(Show, {
1206
1397
  get when() {
@@ -1213,16 +1404,16 @@ function AppWorkspaceSidebarItem(props) {
1213
1404
  },
1214
1405
  get fallback() {
1215
1406
  return (() => {
1216
- var _el$68 = _$getNextElement(_tmpl$35);
1217
- _el$68.$$click = select;
1218
- _$insert(_el$68, content);
1407
+ var _el$81 = _$getNextElement(_tmpl$40);
1408
+ _el$81.$$click = select;
1409
+ _$insert(_el$81, content);
1219
1410
  _$effect(_p$ => {
1220
- var _v$60 = actionSlot()?.disabled,
1221
- _v$61 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
1222
- _v$62 = label();
1223
- _v$60 !== _p$.e && _$setProperty(_el$68, "disabled", _p$.e = _v$60);
1224
- _v$61 !== _p$.t && _$setAttribute(_el$68, "data-visibility", _p$.t = _v$61);
1225
- _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);
1226
1417
  return _p$;
1227
1418
  }, {
1228
1419
  e: undefined,
@@ -1230,20 +1421,20 @@ function AppWorkspaceSidebarItem(props) {
1230
1421
  a: undefined
1231
1422
  });
1232
1423
  _$runHydrationEvents();
1233
- return _el$68;
1424
+ return _el$81;
1234
1425
  })();
1235
1426
  },
1236
1427
  get children() {
1237
- var _el$67 = _$getNextElement(_tmpl$34);
1238
- _el$67.$$click = select;
1239
- _$insert(_el$67, content);
1428
+ var _el$80 = _$getNextElement(_tmpl$39);
1429
+ _el$80.$$click = select;
1430
+ _$insert(_el$80, content);
1240
1431
  _$effect(_p$ => {
1241
- var _v$57 = actionSlot()?.href,
1242
- _v$58 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
1243
- _v$59 = label();
1244
- _v$57 !== _p$.e && _$setAttribute(_el$67, "href", _p$.e = _v$57);
1245
- _v$58 !== _p$.t && _$setAttribute(_el$67, "data-visibility", _p$.t = _v$58);
1246
- _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);
1247
1438
  return _p$;
1248
1439
  }, {
1249
1440
  e: undefined,
@@ -1251,7 +1442,7 @@ function AppWorkspaceSidebarItem(props) {
1251
1442
  a: undefined
1252
1443
  });
1253
1444
  _$runHydrationEvents();
1254
- return _el$67;
1445
+ return _el$80;
1255
1446
  }
1256
1447
  });
1257
1448
  }
@@ -1552,16 +1743,16 @@ const AppWorkspaceNavTree = props => {
1552
1743
  return rowIcon();
1553
1744
  },
1554
1745
  get children() {
1555
- var _el$69 = _$getNextElement(_tmpl$36),
1556
- _el$70 = _el$69.firstChild;
1557
- _$spread(_el$69, _$mergeProps({
1746
+ var _el$82 = _$getNextElement(_tmpl$41),
1747
+ _el$83 = _el$82.firstChild;
1748
+ _$spread(_el$82, _$mergeProps({
1558
1749
  get ["data-k2b-nav-tree-toggle"]() {
1559
1750
  return usesIconDisclosure() ? "" : undefined;
1560
1751
  }
1561
1752
  }, () => iconAccessibility(item.iconLabel)), false, true);
1562
- _$effect(() => _$className(_el$70, iconClass(rowIcon())));
1753
+ _$effect(() => _$className(_el$83, iconClass(rowIcon())));
1563
1754
  _$runHydrationEvents();
1564
- return _el$69;
1755
+ return _el$82;
1565
1756
  }
1566
1757
  }), _$createComponent(Show, {
1567
1758
  get when() {
@@ -1569,51 +1760,51 @@ const AppWorkspaceNavTree = props => {
1569
1760
  },
1570
1761
  get fallback() {
1571
1762
  return (() => {
1572
- var _el$78 = _$getNextElement(_tmpl$40),
1573
- _el$79 = _el$78.firstChild;
1574
- _$insert(_el$79, () => item.label);
1575
- _$effect(() => _$setAttribute(_el$78, "data-label", typeof item.label === "string" ? item.label : undefined));
1576
- 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;
1577
1768
  })();
1578
1769
  },
1579
1770
  get children() {
1580
- var _el$71 = _$getNextElement(_tmpl$37),
1581
- _el$72 = _el$71.firstChild,
1582
- _el$73 = _el$72.firstChild,
1583
- _el$74 = _el$72.nextSibling;
1584
- _$insert(_el$73, () => item.label);
1585
- _$insert(_el$74, () => item.description);
1586
- _$effect(() => _$setAttribute(_el$72, "data-label", typeof item.label === "string" ? item.label : undefined));
1587
- 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;
1588
1779
  }
1589
1780
  }), _$createComponent(Show, {
1590
1781
  get when() {
1591
1782
  return item.meta !== undefined;
1592
1783
  },
1593
1784
  get children() {
1594
- var _el$75 = _$getNextElement(_tmpl$38);
1595
- _$insert(_el$75, () => item.meta);
1785
+ var _el$88 = _$getNextElement(_tmpl$43);
1786
+ _$insert(_el$88, () => item.meta);
1596
1787
  _$effect(_p$ => {
1597
- var _v$63 = `k2b-app-workspace__sidebar-item-meta ${hasChildren() ? "" : "k2b-app-workspace__nav-tree-leaf-meta"}`,
1598
- _v$64 = item.metaVisibility === "hover" ? "hover" : undefined;
1599
- _v$63 !== _p$.e && _$className(_el$75, _p$.e = _v$63);
1600
- _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);
1601
1792
  return _p$;
1602
1793
  }, {
1603
1794
  e: undefined,
1604
1795
  t: undefined
1605
1796
  });
1606
- return _el$75;
1797
+ return _el$88;
1607
1798
  }
1608
1799
  }), _$createComponent(Show, {
1609
1800
  get when() {
1610
1801
  return _$memo(() => !!hasChildren())() && !usesIconDisclosure();
1611
1802
  },
1612
1803
  get children() {
1613
- var _el$76 = _$getNextElement(_tmpl$39),
1614
- _el$77 = _el$76.firstChild;
1615
- _$effect(() => _$className(_el$77, `ti ${isExpanded(item.id) ? "ti-chevron-down" : "ti-chevron-right"}`));
1616
- 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;
1617
1808
  }
1618
1809
  })];
1619
1810
  const row = () => _$createComponent(AppWorkspaceSidebarRow, {
@@ -1721,56 +1912,56 @@ const AppWorkspaceNavTree = props => {
1721
1912
  requestMove(target.move, false);
1722
1913
  };
1723
1914
  return (() => {
1724
- var _el$80 = _$getNextElement(_tmpl$42),
1725
- _el$82 = _el$80.firstChild,
1726
- [_el$83, _co$10] = _$getNextMarker(_el$82.nextSibling),
1727
- _el$84 = _el$83.nextSibling,
1728
- [_el$85, _co$11] = _$getNextMarker(_el$84.nextSibling);
1729
- _el$80.addEventListener("drop", onDrop);
1730
- _$addEventListener(_el$80, "dragleave", item.onDragLeave);
1731
- _el$80.addEventListener("dragover", onDragOver);
1732
- _$addEventListener(_el$80, "dragenter", item.onDragEnter);
1733
- _el$80.addEventListener("dragstart", onDragStart);
1734
- _el$80.$$keydown = onKeyDown;
1735
- _el$80.addEventListener("focus", () => setFocusedId(item.id));
1736
- var _ref$4 = treeItem;
1737
- typeof _ref$4 === "function" ? _$use(_ref$4, _el$80) : treeItem = _el$80;
1738
- _$setAttribute(_el$80, "aria-level", depth + 1);
1739
- _$setAttribute(_el$80, "data-k2b-nav-tree-parent-id", parentId);
1740
- _$insert(_el$80, row, _el$83, _co$10);
1741
- _$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, {
1742
1933
  get when() {
1743
1934
  return _$memo(() => !!hasChildren())() && isExpanded(item.id);
1744
1935
  },
1745
1936
  get children() {
1746
- var _el$81 = _$getNextElement(_tmpl$41);
1747
- _$insert(_el$81, () => renderItems(nested, depth + 1, item.id));
1748
- return _el$81;
1937
+ var _el$94 = _$getNextElement(_tmpl$46);
1938
+ _$insert(_el$94, () => renderItems(nested, depth + 1, item.id));
1939
+ return _el$94;
1749
1940
  }
1750
- }), _el$85, _co$11);
1941
+ }), _el$98, _co$14);
1751
1942
  _$effect(_p$ => {
1752
- var _v$65 = siblings().length,
1753
- _v$66 = place() + 1,
1754
- _v$67 = selected(),
1755
- _v$68 = hasChildren() ? isExpanded(item.id) : undefined,
1756
- _v$69 = item.disabled ? "true" : undefined,
1757
- _v$70 = item.disabled ? -1 : tabStopId() === item.id ? 0 : -1,
1758
- _v$71 = movable() ? true : undefined,
1759
- _v$72 = item.id,
1760
- _v$73 = dragged()?.id === item.id ? "" : undefined,
1761
- _v$74 = dropTarget()?.id === item.id ? dropTarget().side : undefined,
1762
- _v$75 = String(props.indented === false ? 0 : depth);
1763
- _v$65 !== _p$.e && _$setAttribute(_el$80, "aria-setsize", _p$.e = _v$65);
1764
- _v$66 !== _p$.t && _$setAttribute(_el$80, "aria-posinset", _p$.t = _v$66);
1765
- _v$67 !== _p$.a && _$setAttribute(_el$80, "aria-selected", _p$.a = _v$67);
1766
- _v$68 !== _p$.o && _$setAttribute(_el$80, "aria-expanded", _p$.o = _v$68);
1767
- _v$69 !== _p$.i && _$setAttribute(_el$80, "aria-disabled", _p$.i = _v$69);
1768
- _v$70 !== _p$.n && _$setAttribute(_el$80, "tabindex", _p$.n = _v$70);
1769
- _v$71 !== _p$.s && _$setAttribute(_el$80, "draggable", _p$.s = _v$71);
1770
- _v$72 !== _p$.h && _$setAttribute(_el$80, "data-k2b-nav-tree-id", _p$.h = _v$72);
1771
- _v$73 !== _p$.r && _$setAttribute(_el$80, "data-k2b-nav-tree-dragging", _p$.r = _v$73);
1772
- _v$74 !== _p$.d && _$setAttribute(_el$80, "data-k2b-nav-tree-drop", _p$.d = _v$74);
1773
- _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);
1774
1965
  return _p$;
1775
1966
  }, {
1776
1967
  e: undefined,
@@ -1786,7 +1977,7 @@ const AppWorkspaceNavTree = props => {
1786
1977
  l: undefined
1787
1978
  });
1788
1979
  _$runHydrationEvents();
1789
- return _el$80;
1980
+ return _el$93;
1790
1981
  })();
1791
1982
  }
1792
1983
  });
@@ -1811,62 +2002,62 @@ const AppWorkspaceNavTree = props => {
1811
2002
  });
1812
2003
  });
1813
2004
  return (() => {
1814
- var _el$86 = _$getNextElement(_tmpl$43);
1815
- _el$86.addEventListener("dragend", endDrag);
1816
- _el$86.addEventListener("dragleave", event => {
2005
+ var _el$99 = _$getNextElement(_tmpl$48);
2006
+ _el$99.addEventListener("dragend", endDrag);
2007
+ _el$99.addEventListener("dragleave", event => {
1817
2008
  if (!root?.contains(event.relatedTarget)) setDropTarget(null);
1818
2009
  });
1819
- _el$86.addEventListener("dragover", event => {
2010
+ _el$99.addEventListener("dragover", event => {
1820
2011
  // Runs after the rows: a position no row claimed shows no gap.
1821
2012
  if (claimedDragOver !== event) setDropTarget(null);
1822
2013
  });
1823
- var _ref$5 = root;
1824
- typeof _ref$5 === "function" ? _$use(_ref$5, _el$86) : root = _el$86;
1825
- _$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));
1826
2017
  _$effect(_p$ => {
1827
- var _v$76 = `k2b-app-workspace__nav-tree ${props.class ?? ""}`,
1828
- _v$77 = props.ariaLabel;
1829
- _v$76 !== _p$.e && _$className(_el$86, _p$.e = _v$76);
1830
- _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);
1831
2022
  return _p$;
1832
2023
  }, {
1833
2024
  e: undefined,
1834
2025
  t: undefined
1835
2026
  });
1836
- return _el$86;
2027
+ return _el$99;
1837
2028
  })();
1838
2029
  };
1839
2030
  AppWorkspaceNavTree.Item = AppWorkspaceNavTreeItem;
1840
2031
  const AppWorkspaceSidebarIconGrid = props => (() => {
1841
- var _el$87 = _$getNextElement(_tmpl$44),
1842
- _el$89 = _el$87.firstChild,
1843
- [_el$90, _co$12] = _$getNextMarker(_el$89.nextSibling),
1844
- _el$88 = _el$90.nextSibling;
1845
- _$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({
1846
2037
  get ["class"]() {
1847
2038
  return `k2b-app-workspace__sidebar-icon-grid-wrap ${props.class ?? ""}`;
1848
2039
  }
1849
2040
  }, () => modeAttrs(props.sidebarMode)), false, true);
1850
- _$insert(_el$87, _$createComponent(Show, {
2041
+ _$insert(_el$100, _$createComponent(Show, {
1851
2042
  get when() {
1852
2043
  return props.title;
1853
2044
  },
1854
2045
  children: title => (() => {
1855
- var _el$91 = _$getNextElement(_tmpl$15);
1856
- _$insert(_el$91, title);
1857
- return _el$91;
2046
+ var _el$104 = _$getNextElement(_tmpl$20);
2047
+ _$insert(_el$104, title);
2048
+ return _el$104;
1858
2049
  })()
1859
- }), _el$90, _co$12);
1860
- _$insert(_el$88, () => props.children);
1861
- _$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));
1862
2053
  _$runHydrationEvents();
1863
- return _el$87;
2054
+ return _el$100;
1864
2055
  })();
1865
2056
  const AppWorkspaceSidebarIconAction = props => {
1866
2057
  const content = (() => {
1867
- var _el$92 = _$getNextElement(_tmpl$45);
1868
- _$effect(() => _$className(_el$92, iconClass(props.icon)));
1869
- return _el$92;
2058
+ var _el$105 = _$getNextElement(_tmpl$50);
2059
+ _$effect(() => _$className(_el$105, iconClass(props.icon)));
2060
+ return _el$105;
1870
2061
  })();
1871
2062
  const attrs = () => ({
1872
2063
  class: `k2b-app-workspace__sidebar-icon-action ${props.active ? "is-active" : ""}`,
@@ -1879,8 +2070,8 @@ const AppWorkspaceSidebarIconAction = props => {
1879
2070
  ...modeAttrs(props.sidebarMode)
1880
2071
  });
1881
2072
  if (!props.href || props.disabled) return (() => {
1882
- var _el$93 = _$getNextElement(_tmpl$24);
1883
- _$spread(_el$93, _$mergeProps(attrs, {
2073
+ var _el$106 = _$getNextElement(_tmpl$29);
2074
+ _$spread(_el$106, _$mergeProps(attrs, {
1884
2075
  get disabled() {
1885
2076
  return props.disabled;
1886
2077
  },
@@ -1888,13 +2079,13 @@ const AppWorkspaceSidebarIconAction = props => {
1888
2079
  return props.onClick;
1889
2080
  }
1890
2081
  }), false, true);
1891
- _$insert(_el$93, content);
2082
+ _$insert(_el$106, content);
1892
2083
  _$runHydrationEvents();
1893
- return _el$93;
2084
+ return _el$106;
1894
2085
  })();
1895
2086
  if (props.navigation !== "enhanced" || !props.onNavigate) return (() => {
1896
- var _el$94 = _$getNextElement(_tmpl$25);
1897
- _$spread(_el$94, _$mergeProps({
2087
+ var _el$107 = _$getNextElement(_tmpl$30);
2088
+ _$spread(_el$107, _$mergeProps({
1898
2089
  get href() {
1899
2090
  return props.href;
1900
2091
  }
@@ -1903,9 +2094,9 @@ const AppWorkspaceSidebarIconAction = props => {
1903
2094
  return props.onClick;
1904
2095
  }
1905
2096
  }), false, true);
1906
- _$insert(_el$94, content);
2097
+ _$insert(_el$107, content);
1907
2098
  _$runHydrationEvents();
1908
- return _el$94;
2099
+ return _el$107;
1909
2100
  })();
1910
2101
  return _$createComponent(Link, _$mergeProps({
1911
2102
  get href() {
@@ -1943,12 +2134,12 @@ function AppWorkspaceHead(props) {
1943
2134
  // A nested workspace is part of a page that already shows its title.
1944
2135
  const trail = props.nested ? () => undefined : usePageTrail();
1945
2136
  return (() => {
1946
- var _el$95 = _$getNextElement(_tmpl$47),
1947
- _el$97 = _el$95.firstChild,
1948
- [_el$98, _co$13] = _$getNextMarker(_el$97.nextSibling),
1949
- _el$99 = _el$98.nextSibling,
1950
- [_el$100, _co$14] = _$getNextMarker(_el$99.nextSibling);
1951
- _$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, {
1952
2143
  "class": "k2b-app-workspace__head-toggle",
1953
2144
  get label() {
1954
2145
  return messages().showNavigation;
@@ -1959,10 +2150,10 @@ function AppWorkspaceHead(props) {
1959
2150
  "aria-expanded": "false",
1960
2151
  "data-app-workspace-sidebar-toggle": "",
1961
2152
  get children() {
1962
- return _$getNextElement(_tmpl$46);
2153
+ return _$getNextElement(_tmpl$51);
1963
2154
  }
1964
- }), _el$98, _co$13);
1965
- _$insert(_el$95, _$createComponent(Show, {
2155
+ }), _el$111, _co$16);
2156
+ _$insert(_el$108, _$createComponent(Show, {
1966
2157
  get when() {
1967
2158
  return trail();
1968
2159
  },
@@ -1973,14 +2164,14 @@ function AppWorkspaceHead(props) {
1973
2164
  as: "p",
1974
2165
  fallback: true
1975
2166
  }), (() => {
1976
- var _el$101 = _$getNextElement(_tmpl$48);
1977
- _$setAttribute(_el$101, "data-k2b-server", isServer ? "" : undefined);
1978
- _$insert(_el$101, () => current().title);
1979
- 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;
1980
2171
  })()]
1981
- }), _el$100, _co$14);
1982
- _$effect(() => _$setAttribute(_el$95, "data-trail", trail()?.ancestors.length ? "up" : trail() ? "title" : undefined));
1983
- 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;
1984
2175
  })();
1985
2176
  }
1986
2177
  const AppWorkspace = props => {
@@ -1988,11 +2179,12 @@ const AppWorkspace = props => {
1988
2179
  const serverLayoutState = useContext(LayoutStateContext);
1989
2180
  const nested = Boolean(useContext(WorkspaceContext));
1990
2181
  const [sidebarId, setSidebarId] = createSignal(`k2b-workspace-sidebar-${createUniqueId()}`);
2182
+ const initialLayoutState = () => props.layoutState?.() ?? serverLayoutState;
1991
2183
  const workspace = {
1992
2184
  sidebarId: sidebarId(),
1993
- setSidebarId
2185
+ setSidebarId,
2186
+ initialLayoutState
1994
2187
  };
1995
- const initialLayoutState = () => props.layoutState?.() ?? serverLayoutState;
1996
2188
 
1997
2189
  // The resize handles are inert markup until the controller is attached, so
1998
2190
  // the workspace attaches it itself and scopes it to this root. `onMount`
@@ -2015,31 +2207,31 @@ const AppWorkspace = props => {
2015
2207
  return _$createComponent(WorkspaceContext.Provider, {
2016
2208
  value: workspace,
2017
2209
  get children() {
2018
- var _el$102 = _$getNextElement(_tmpl$49),
2019
- _el$103 = _el$102.firstChild,
2020
- [_el$104, _co$15] = _$getNextMarker(_el$103.nextSibling),
2021
- _el$105 = _el$104.nextSibling,
2022
- [_el$106, _co$16] = _$getNextMarker(_el$105.nextSibling);
2023
- var _ref$6 = root;
2024
- typeof _ref$6 === "function" ? _$use(_ref$6, _el$102) : root = _el$102;
2025
- _$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, {
2026
2218
  sidebarId: sidebarId,
2027
2219
  nested: nested
2028
- }), _el$104, _co$15);
2029
- _$insert(_el$102, () => props.children, _el$106, _co$16);
2220
+ }), _el$117, _co$18);
2221
+ _$insert(_el$115, () => props.children, _el$119, _co$19);
2030
2222
  _$effect(_p$ => {
2031
- var _v$78 = `k2b-app-workspace ${props.class ?? ""}`,
2032
- _v$79 = props.mobileSurface,
2033
- _v$80 = props.flat ? "true" : undefined,
2034
- _v$81 = initialLayoutState()?.sidebarCollapsed === undefined ? undefined : String(initialLayoutState()?.sidebarCollapsed),
2035
- _v$82 = props.resizable === false ? "false" : "true",
2036
- _v$83 = appWorkspaceLayoutStyle(initialLayoutState());
2037
- _v$78 !== _p$.e && _$className(_el$102, _p$.e = _v$78);
2038
- _v$79 !== _p$.t && _$setAttribute(_el$102, "data-mobile-surface", _p$.t = _v$79);
2039
- _v$80 !== _p$.a && _$setAttribute(_el$102, "data-flat", _p$.a = _v$80);
2040
- _v$81 !== _p$.o && _$setAttribute(_el$102, "data-sidebar-collapsed", _p$.o = _v$81);
2041
- _v$82 !== _p$.i && _$setAttribute(_el$102, "data-workspace-resizable", _p$.i = _v$82);
2042
- _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);
2043
2235
  return _p$;
2044
2236
  }, {
2045
2237
  e: undefined,
@@ -2049,7 +2241,7 @@ const AppWorkspace = props => {
2049
2241
  i: undefined,
2050
2242
  n: undefined
2051
2243
  });
2052
- return _el$102;
2244
+ return _el$115;
2053
2245
  }
2054
2246
  });
2055
2247
  }
@@ -2064,10 +2256,10 @@ AppWorkspace.LayoutStateProvider = props => _$createComponent(LayoutStateContext
2064
2256
  }
2065
2257
  });
2066
2258
  AppWorkspace.Content = props => (() => {
2067
- var _el$107 = _$getNextElement(_tmpl$2);
2068
- _$insert(_el$107, () => props.children);
2069
- _$effect(() => _$className(_el$107, `k2b-app-workspace__content ${props.class ?? ""}`));
2070
- 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;
2071
2263
  })();
2072
2264
  AppWorkspace.Main = AppWorkspaceMain;
2073
2265
  AppWorkspace.MainPane = AppWorkspaceMainPane;