@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.
- package/dist/browser/actions/GestureMenu.js +2 -2
- package/dist/browser/actions/GestureMenu.js.map +1 -1
- package/dist/browser/chat/ChatComposer.js +811 -406
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/chat-behavior.js +4 -0
- package/dist/browser/chat/chat-behavior.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +14 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/command-search.js +170 -0
- package/dist/browser/chat/command-search.js.map +1 -0
- package/dist/browser/chat/composer-document.js +1 -1
- package/dist/browser/chat/composer-document.js.map +1 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/content/Calendar.js +8 -7
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarDayView.js +32 -6
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/CalendarWeekView.js +4 -3
- package/dist/browser/content/CalendarWeekView.js.map +1 -1
- package/dist/browser/content/Timeline.js +3 -3
- package/dist/browser/content/Timeline.js.map +1 -1
- package/dist/browser/content/calendar-time-view.js +0 -1
- package/dist/browser/content/calendar-time-view.js.map +1 -1
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/inputs/Combobox.js +26 -5
- package/dist/browser/inputs/Combobox.js.map +1 -1
- package/dist/browser/inputs/QrScanner.js +2 -1
- package/dist/browser/inputs/QrScanner.js.map +1 -1
- package/dist/browser/inputs/SelectChip.js +43 -12
- package/dist/browser/inputs/SelectChip.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +720 -528
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/BottomSheet.js +8 -0
- package/dist/browser/layout/BottomSheet.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +159 -27
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/app-workspace-state.js +5 -1
- package/dist/browser/layout/app-workspace-state.js.map +1 -1
- package/dist/browser/layout/index.js +1 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/scroll-fade.js +14 -9
- package/dist/browser/layout/scroll-fade.js.map +1 -1
- package/dist/browser/layout/sidebar-scroll-memory.js +38 -0
- package/dist/browser/layout/sidebar-scroll-memory.js.map +1 -0
- package/dist/browser/motion.js +7 -0
- package/dist/browser/motion.js.map +1 -0
- package/dist/ssr/actions/GestureMenu.js +2 -2
- package/dist/ssr/actions/GestureMenu.js.map +1 -1
- package/dist/ssr/chat/ChatComposer.js +410 -93
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/chat-behavior.js +4 -0
- package/dist/ssr/chat/chat-behavior.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +14 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/command-search.js +170 -0
- package/dist/ssr/chat/command-search.js.map +1 -0
- package/dist/ssr/chat/composer-document.js +1 -1
- package/dist/ssr/chat/composer-document.js.map +1 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/content/Calendar.js +8 -7
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarDayView.js +32 -6
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/CalendarWeekView.js +4 -3
- package/dist/ssr/content/CalendarWeekView.js.map +1 -1
- package/dist/ssr/content/Timeline.js +3 -3
- package/dist/ssr/content/Timeline.js.map +1 -1
- package/dist/ssr/content/calendar-time-view.js +0 -1
- package/dist/ssr/content/calendar-time-view.js.map +1 -1
- package/dist/ssr/index.js +1 -0
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/inputs/Combobox.js +22 -5
- package/dist/ssr/inputs/Combobox.js.map +1 -1
- package/dist/ssr/inputs/QrScanner.js +2 -1
- package/dist/ssr/inputs/QrScanner.js.map +1 -1
- package/dist/ssr/inputs/SelectChip.js +35 -11
- package/dist/ssr/inputs/SelectChip.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +254 -118
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/BottomSheet.js +8 -0
- package/dist/ssr/layout/BottomSheet.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +159 -27
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/app-workspace-state.js +5 -1
- package/dist/ssr/layout/app-workspace-state.js.map +1 -1
- package/dist/ssr/layout/index.js +1 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/scroll-fade.js +14 -9
- package/dist/ssr/layout/scroll-fade.js.map +1 -1
- package/dist/ssr/layout/sidebar-scroll-memory.js +38 -0
- package/dist/ssr/layout/sidebar-scroll-memory.js.map +1 -0
- package/dist/ssr/motion.js +7 -0
- package/dist/ssr/motion.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/types/chat/ChatComposer.d.ts +44 -2
- package/dist/types/chat/chat-behavior.d.ts +4 -0
- package/dist/types/chat/chat-messages.d.ts +7 -0
- package/dist/types/chat/command-search.d.ts +39 -0
- package/dist/types/chat/index.d.ts +1 -1
- package/dist/types/content/calendar-time-view.d.ts +0 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/inputs/Combobox.d.ts +1 -0
- package/dist/types/inputs/SelectChip.d.ts +4 -0
- package/dist/types/layout/AppWorkspace.d.ts +13 -1
- package/dist/types/layout/BottomSheet.d.ts +8 -0
- package/dist/types/layout/index.d.ts +1 -1
- package/dist/types/layout/scroll-fade.d.ts +2 -0
- package/dist/types/layout/sidebar-scroll-memory.d.ts +6 -0
- package/dist/types/motion.d.ts +6 -0
- 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 {
|
|
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(`<
|
|
21
|
-
_tmpl$3 = /*#__PURE__*/_$template(`<div class=k2b-app-
|
|
22
|
-
_tmpl$4 = /*#__PURE__*/_$template(`<
|
|
23
|
-
_tmpl$5 = /*#__PURE__*/_$template(`<
|
|
24
|
-
_tmpl$6 = /*#__PURE__*/_$template(`<
|
|
25
|
-
_tmpl$7 = /*#__PURE__*/_$template(`<
|
|
26
|
-
_tmpl$8 = /*#__PURE__*/_$template(`<
|
|
27
|
-
_tmpl$9 = /*#__PURE__*/_$template(`<
|
|
28
|
-
_tmpl$0 = /*#__PURE__*/_$template(`<
|
|
29
|
-
_tmpl$1 = /*#__PURE__*/_$template(`<span aria-hidden=true
|
|
30
|
-
_tmpl$10 = /*#__PURE__*/_$template(`<
|
|
31
|
-
_tmpl$11 = /*#__PURE__*/_$template(`<
|
|
32
|
-
_tmpl$12 = /*#__PURE__*/_$template(`<
|
|
33
|
-
_tmpl$13 = /*#__PURE__*/_$template(`<
|
|
34
|
-
_tmpl$14 = /*#__PURE__*/_$template(`<
|
|
35
|
-
_tmpl$15 = /*#__PURE__*/_$template(`<
|
|
36
|
-
_tmpl$16 = /*#__PURE__*/_$template(`<
|
|
37
|
-
_tmpl$17 = /*#__PURE__*/_$template(`<
|
|
38
|
-
_tmpl$18 = /*#__PURE__*/_$template(`<
|
|
39
|
-
_tmpl$19 = /*#__PURE__*/_$template(`<
|
|
40
|
-
_tmpl$20 = /*#__PURE__*/_$template(`<
|
|
41
|
-
_tmpl$21 = /*#__PURE__*/_$template(`<
|
|
42
|
-
_tmpl$22 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status
|
|
43
|
-
_tmpl$23 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-status-
|
|
44
|
-
_tmpl$24 = /*#__PURE__*/_$template(`<
|
|
45
|
-
_tmpl$25 = /*#__PURE__*/_$template(`<
|
|
46
|
-
_tmpl$26 = /*#__PURE__*/_$template(`<
|
|
47
|
-
_tmpl$27 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-
|
|
48
|
-
_tmpl$28 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-
|
|
49
|
-
_tmpl$29 = /*#__PURE__*/_$template(`<
|
|
50
|
-
_tmpl$30 = /*#__PURE__*/_$template(`<
|
|
51
|
-
_tmpl$31 = /*#__PURE__*/_$template(`<
|
|
52
|
-
_tmpl$32 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-
|
|
53
|
-
_tmpl$33 = /*#__PURE__*/_$template(`<
|
|
54
|
-
_tmpl$34 = /*#__PURE__*/_$template(`<
|
|
55
|
-
_tmpl$35 = /*#__PURE__*/_$template(`<
|
|
56
|
-
_tmpl$36 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-
|
|
57
|
-
_tmpl$37 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-
|
|
58
|
-
_tmpl$38 = /*#__PURE__*/_$template(`<
|
|
59
|
-
_tmpl$39 = /*#__PURE__*/_$template(`<
|
|
60
|
-
_tmpl$40 = /*#__PURE__*/_$template(`<
|
|
61
|
-
_tmpl$41 = /*#__PURE__*/_$template(`<
|
|
62
|
-
_tmpl$42 = /*#__PURE__*/_$template(`<
|
|
63
|
-
_tmpl$43 = /*#__PURE__*/_$template(`<
|
|
64
|
-
_tmpl$44 = /*#__PURE__*/_$template(`<
|
|
65
|
-
_tmpl$45 = /*#__PURE__*/_$template(`<
|
|
66
|
-
_tmpl$46 = /*#__PURE__*/_$template(`<
|
|
67
|
-
_tmpl$47 = /*#__PURE__*/_$template(`<div class=k2b-app-
|
|
68
|
-
_tmpl$48 = /*#__PURE__*/_$template(`<
|
|
69
|
-
_tmpl$49 = /*#__PURE__*/_$template(`<div
|
|
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 =
|
|
116
|
-
_v$7 = props.
|
|
117
|
-
_v$8 = props.
|
|
118
|
-
_v$9 = props.
|
|
119
|
-
_v$0 = props.
|
|
120
|
-
_v$1 = props.
|
|
121
|
-
_v$10 = props.
|
|
122
|
-
_v$11 = props.
|
|
123
|
-
_v$12 = props.
|
|
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-
|
|
131
|
-
_v$8 !== _p$.h && _$setAttribute(_el$, "data-workspace-
|
|
132
|
-
_v$9 !== _p$.r && _$setAttribute(_el$, "data-workspace-
|
|
133
|
-
_v$0 !== _p$.d && _$setAttribute(_el$, "data-workspace-resize-
|
|
134
|
-
_v$1 !== _p$.l && _$setAttribute(_el$, "data-workspace-
|
|
135
|
-
_v$10 !== _p$.u && _$setAttribute(_el$, "data-workspace-
|
|
136
|
-
_v$11 !== _p$.c && _$setAttribute(_el$, "data-workspace-
|
|
137
|
-
_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(() =>
|
|
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
|
|
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$
|
|
231
|
-
|
|
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$
|
|
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$
|
|
271
|
-
_$insert(_el$
|
|
272
|
-
_$effect(() => _$setAttribute(_el$
|
|
273
|
-
return _el$
|
|
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$
|
|
324
|
-
_$setAttribute(_el$
|
|
325
|
-
_$insert(_el$
|
|
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$
|
|
328
|
-
_v$
|
|
329
|
-
_v$
|
|
330
|
-
_v$
|
|
331
|
-
_v$
|
|
332
|
-
_v$
|
|
333
|
-
_v$
|
|
334
|
-
_v$
|
|
335
|
-
_v$
|
|
336
|
-
_v$
|
|
337
|
-
|
|
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$
|
|
341
|
-
_v$
|
|
342
|
-
_v$
|
|
343
|
-
_v$
|
|
344
|
-
_v$
|
|
345
|
-
_v$
|
|
346
|
-
_v$
|
|
347
|
-
_v$
|
|
348
|
-
_v$
|
|
349
|
-
_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$
|
|
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$
|
|
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$
|
|
432
|
-
_$effect(() => _$setProperty(_el$
|
|
433
|
-
return _el$
|
|
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$
|
|
464
|
-
_el$
|
|
465
|
-
_el$
|
|
466
|
-
[_el$
|
|
467
|
-
var _ref$ = aside;
|
|
468
|
-
typeof _ref$ === "function" ? _$use(_ref
|
|
469
|
-
_$insert(_el$
|
|
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$
|
|
472
|
-
_v$
|
|
473
|
-
_v$
|
|
474
|
-
_v$
|
|
475
|
-
_v$
|
|
476
|
-
_v$
|
|
477
|
-
_v$
|
|
478
|
-
_v$
|
|
479
|
-
_v$
|
|
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$
|
|
484
|
-
_v$
|
|
485
|
-
_v$
|
|
486
|
-
_v$
|
|
487
|
-
_v$
|
|
488
|
-
_v$
|
|
489
|
-
_v$
|
|
490
|
-
_v$
|
|
491
|
-
_v$
|
|
492
|
-
_p$.r
|
|
493
|
-
|
|
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$
|
|
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$
|
|
558
|
-
_$insert(_el$
|
|
750
|
+
var _el$21 = _$getNextElement(_tmpl$10);
|
|
751
|
+
_$insert(_el$21, () => props.children);
|
|
559
752
|
_$effect(_p$ => {
|
|
560
|
-
var _v$
|
|
561
|
-
_v$
|
|
562
|
-
_v$
|
|
563
|
-
_v$
|
|
564
|
-
_v$
|
|
565
|
-
_v$
|
|
566
|
-
_v$
|
|
567
|
-
_v$
|
|
568
|
-
_v$
|
|
569
|
-
_v$
|
|
570
|
-
_v$
|
|
571
|
-
_v$
|
|
572
|
-
_v$
|
|
573
|
-
_v$
|
|
574
|
-
_v$
|
|
575
|
-
_v$
|
|
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$
|
|
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$
|
|
614
|
-
var _ref$
|
|
615
|
-
typeof _ref$
|
|
616
|
-
_$insert(_el$
|
|
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$
|
|
622
|
-
_$insert(_el$
|
|
623
|
-
return _el$
|
|
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$
|
|
628
|
-
_v$
|
|
629
|
-
_v$
|
|
630
|
-
_v$
|
|
631
|
-
_v$
|
|
632
|
-
_v$
|
|
633
|
-
_v$
|
|
634
|
-
_v$
|
|
635
|
-
_v$
|
|
636
|
-
_v$
|
|
637
|
-
_v$
|
|
638
|
-
_v$
|
|
639
|
-
_v$
|
|
640
|
-
_v$
|
|
641
|
-
_v$
|
|
642
|
-
_v$
|
|
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$
|
|
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
|
-
//
|
|
687
|
-
//
|
|
688
|
-
//
|
|
689
|
-
//
|
|
690
|
-
//
|
|
691
|
-
//
|
|
692
|
-
//
|
|
693
|
-
//
|
|
694
|
-
|
|
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$
|
|
703
|
-
var _ref$
|
|
704
|
-
typeof _ref$
|
|
705
|
-
_$spread(_el$
|
|
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$
|
|
904
|
+
_$insert(_el$24, () => props.children);
|
|
714
905
|
_$runHydrationEvents();
|
|
715
|
-
return _el$
|
|
906
|
+
return _el$24;
|
|
716
907
|
})(), (() => {
|
|
717
|
-
var _el$
|
|
718
|
-
_$setProperty(_el$
|
|
719
|
-
return _el$
|
|
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$
|
|
724
|
-
_$spread(_el$
|
|
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$
|
|
920
|
+
_$insert(_el$26, () => props.children);
|
|
730
921
|
_$runHydrationEvents();
|
|
731
|
-
return _el$
|
|
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$
|
|
743
|
-
_el$
|
|
744
|
-
_$effect(() => _$className(_el$
|
|
745
|
-
return _el$
|
|
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$
|
|
753
|
-
_$insert(_el$
|
|
754
|
-
return _el$
|
|
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$
|
|
759
|
-
_el$
|
|
760
|
-
[_el$
|
|
761
|
-
_el$
|
|
762
|
-
_$spread(_el$
|
|
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$
|
|
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$
|
|
776
|
-
_el$
|
|
777
|
-
[_el$
|
|
778
|
-
_el$
|
|
779
|
-
[_el$
|
|
780
|
-
_$insert(_el$
|
|
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$
|
|
791
|
-
_$insert(_el$
|
|
792
|
-
return _el$
|
|
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$
|
|
798
|
-
_el$
|
|
799
|
-
[_el$
|
|
800
|
-
_el$
|
|
801
|
-
_el$
|
|
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$
|
|
807
|
-
_$insert(_el$
|
|
997
|
+
_$setAttribute(_el$32, "aria-controls", id);
|
|
998
|
+
_$insert(_el$32, title, _el$35, _co$5);
|
|
808
999
|
_$effect(_p$ => {
|
|
809
|
-
var _v$
|
|
810
|
-
_v$
|
|
811
|
-
_v$
|
|
812
|
-
_v$
|
|
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$
|
|
1010
|
+
return _el$32;
|
|
820
1011
|
}
|
|
821
|
-
}), _el$
|
|
822
|
-
_$insert(_el$
|
|
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$
|
|
828
|
-
_$insert(_el$
|
|
829
|
-
return _el$
|
|
1018
|
+
var _el$36 = _$getNextElement(_tmpl$17);
|
|
1019
|
+
_$insert(_el$36, () => props.actions);
|
|
1020
|
+
return _el$36;
|
|
830
1021
|
}
|
|
831
|
-
}), _el$
|
|
832
|
-
return _el$
|
|
1022
|
+
}), _el$40, _co$7);
|
|
1023
|
+
return _el$31;
|
|
833
1024
|
}
|
|
834
|
-
}), _el$
|
|
835
|
-
_$setAttribute(_el$
|
|
836
|
-
_$insert(_el$
|
|
837
|
-
_$effect(() => _$setProperty(_el$
|
|
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$
|
|
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$
|
|
856
|
-
_$insert(_el$
|
|
857
|
-
_$effect(() => _$setAttribute(_el$
|
|
858
|
-
return _el$
|
|
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$
|
|
877
|
-
_$insert(_el$
|
|
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$
|
|
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$
|
|
1085
|
+
return _$getNextElement(_tmpl$23);
|
|
895
1086
|
}
|
|
896
1087
|
}), (() => {
|
|
897
|
-
var _el$
|
|
898
|
-
_$insert(_el$
|
|
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$
|
|
1099
|
+
return _$getNextElement(_tmpl$28);
|
|
909
1100
|
}
|
|
910
1101
|
});
|
|
911
1102
|
},
|
|
912
1103
|
get children() {
|
|
913
|
-
var _el$
|
|
914
|
-
_$insert(_el$
|
|
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$
|
|
919
|
-
return _el$
|
|
1109
|
+
_$effect(() => _$setAttribute(_el$50, "data-mention", props.mention ? "true" : undefined));
|
|
1110
|
+
return _el$50;
|
|
920
1111
|
}
|
|
921
1112
|
}));
|
|
922
|
-
return _el$
|
|
1113
|
+
return _el$49;
|
|
923
1114
|
})(), (() => {
|
|
924
|
-
var _el$
|
|
925
|
-
_el$
|
|
926
|
-
_el$
|
|
927
|
-
[_el$
|
|
928
|
-
_$insert(_el$
|
|
929
|
-
return _el$
|
|
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$
|
|
935
|
-
_v$
|
|
936
|
-
_v$
|
|
937
|
-
_v$
|
|
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$
|
|
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$
|
|
972
|
-
_$spread(_el$
|
|
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$
|
|
1174
|
+
_$insert(_el$56, () => props.children);
|
|
984
1175
|
_$runHydrationEvents();
|
|
985
|
-
return _el$
|
|
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$
|
|
996
|
-
_$spread(_el$
|
|
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$
|
|
1202
|
+
_$insert(_el$57, () => props.children);
|
|
1012
1203
|
_$runHydrationEvents();
|
|
1013
|
-
return _el$
|
|
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$
|
|
1060
|
-
_el$
|
|
1061
|
-
[_el$
|
|
1062
|
-
_el$
|
|
1063
|
-
[_el$
|
|
1064
|
-
_$spread(_el$
|
|
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$
|
|
1260
|
+
_$insert(_el$58, _$createComponent(Control, {
|
|
1070
1261
|
grouped: true
|
|
1071
|
-
}), _el$
|
|
1072
|
-
_$insert(_el$
|
|
1262
|
+
}), _el$60, _co$0);
|
|
1263
|
+
_$insert(_el$58, () => props.actions, _el$62, _co$1);
|
|
1073
1264
|
_$runHydrationEvents();
|
|
1074
|
-
return _el$
|
|
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$
|
|
1108
|
-
_$insert(_el$
|
|
1109
|
-
var _el$
|
|
1110
|
-
_$effect(() => _$className(_el$
|
|
1111
|
-
return _el$
|
|
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$
|
|
1304
|
+
return _el$63;
|
|
1114
1305
|
}
|
|
1115
1306
|
}), (() => {
|
|
1116
|
-
var _el$
|
|
1117
|
-
_el$
|
|
1118
|
-
[_el$
|
|
1119
|
-
_el$
|
|
1120
|
-
_el$
|
|
1121
|
-
_el$
|
|
1122
|
-
[_el$
|
|
1123
|
-
_$insert(_el$
|
|
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$
|
|
1129
|
-
_el$
|
|
1130
|
-
_el$
|
|
1131
|
-
[_el$
|
|
1132
|
-
_$insert(_el$
|
|
1133
|
-
_$insert(_el$
|
|
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$
|
|
1139
|
-
_$insert(_el$
|
|
1140
|
-
return _el$
|
|
1329
|
+
var _el$67 = _$getNextElement(_tmpl$33);
|
|
1330
|
+
_$insert(_el$67, () => props.contextMeta);
|
|
1331
|
+
return _el$67;
|
|
1141
1332
|
}
|
|
1142
|
-
}), _el$
|
|
1143
|
-
return _el$
|
|
1333
|
+
}), _el$69, _co$10);
|
|
1334
|
+
return _el$65;
|
|
1144
1335
|
}
|
|
1145
|
-
}), _el$
|
|
1146
|
-
_$insert(_el$
|
|
1147
|
-
_$insert(_el$
|
|
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$
|
|
1153
|
-
_$insert(_el$
|
|
1154
|
-
return _el$
|
|
1343
|
+
var _el$72 = _$getNextElement(_tmpl$35);
|
|
1344
|
+
_$insert(_el$72, () => props.description);
|
|
1345
|
+
return _el$72;
|
|
1155
1346
|
}
|
|
1156
|
-
}), _el$
|
|
1347
|
+
}), _el$76, _co$12);
|
|
1157
1348
|
_$effect(_p$ => {
|
|
1158
|
-
var _v$
|
|
1159
|
-
_v$
|
|
1160
|
-
_v$
|
|
1161
|
-
_v$
|
|
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$
|
|
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$
|
|
1174
|
-
_$insert(_el$
|
|
1364
|
+
var _el$77 = _$getNextElement(_tmpl$37);
|
|
1365
|
+
_$insert(_el$77, meta);
|
|
1175
1366
|
_$effect(_p$ => {
|
|
1176
|
-
var _v$
|
|
1177
|
-
_v$
|
|
1178
|
-
_v$
|
|
1179
|
-
_v$
|
|
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$
|
|
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$
|
|
1202
|
-
_$effect(() => _$className(_el$
|
|
1203
|
-
return _el$
|
|
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$
|
|
1217
|
-
_el$
|
|
1218
|
-
_$insert(_el$
|
|
1407
|
+
var _el$81 = _$getNextElement(_tmpl$40);
|
|
1408
|
+
_el$81.$$click = select;
|
|
1409
|
+
_$insert(_el$81, content);
|
|
1219
1410
|
_$effect(_p$ => {
|
|
1220
|
-
var _v$
|
|
1221
|
-
_v$
|
|
1222
|
-
_v$
|
|
1223
|
-
_v$
|
|
1224
|
-
_v$
|
|
1225
|
-
_v$
|
|
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$
|
|
1424
|
+
return _el$81;
|
|
1234
1425
|
})();
|
|
1235
1426
|
},
|
|
1236
1427
|
get children() {
|
|
1237
|
-
var _el$
|
|
1238
|
-
_el$
|
|
1239
|
-
_$insert(_el$
|
|
1428
|
+
var _el$80 = _$getNextElement(_tmpl$39);
|
|
1429
|
+
_el$80.$$click = select;
|
|
1430
|
+
_$insert(_el$80, content);
|
|
1240
1431
|
_$effect(_p$ => {
|
|
1241
|
-
var _v$
|
|
1242
|
-
_v$
|
|
1243
|
-
_v$
|
|
1244
|
-
_v$
|
|
1245
|
-
_v$
|
|
1246
|
-
_v$
|
|
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$
|
|
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$
|
|
1556
|
-
_el$
|
|
1557
|
-
_$spread(_el$
|
|
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$
|
|
1753
|
+
_$effect(() => _$className(_el$83, iconClass(rowIcon())));
|
|
1563
1754
|
_$runHydrationEvents();
|
|
1564
|
-
return _el$
|
|
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$
|
|
1573
|
-
_el$
|
|
1574
|
-
_$insert(_el$
|
|
1575
|
-
_$effect(() => _$setAttribute(_el$
|
|
1576
|
-
return _el$
|
|
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$
|
|
1581
|
-
_el$
|
|
1582
|
-
_el$
|
|
1583
|
-
_el$
|
|
1584
|
-
_$insert(_el$
|
|
1585
|
-
_$insert(_el$
|
|
1586
|
-
_$effect(() => _$setAttribute(_el$
|
|
1587
|
-
return _el$
|
|
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$
|
|
1595
|
-
_$insert(_el$
|
|
1785
|
+
var _el$88 = _$getNextElement(_tmpl$43);
|
|
1786
|
+
_$insert(_el$88, () => item.meta);
|
|
1596
1787
|
_$effect(_p$ => {
|
|
1597
|
-
var _v$
|
|
1598
|
-
_v$
|
|
1599
|
-
_v$
|
|
1600
|
-
_v$
|
|
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$
|
|
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$
|
|
1614
|
-
_el$
|
|
1615
|
-
_$effect(() => _$className(_el$
|
|
1616
|
-
return _el$
|
|
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$
|
|
1725
|
-
_el$
|
|
1726
|
-
[_el$
|
|
1727
|
-
_el$
|
|
1728
|
-
[_el$
|
|
1729
|
-
_el$
|
|
1730
|
-
_$addEventListener(_el$
|
|
1731
|
-
_el$
|
|
1732
|
-
_$addEventListener(_el$
|
|
1733
|
-
_el$
|
|
1734
|
-
_el$
|
|
1735
|
-
_el$
|
|
1736
|
-
var _ref$
|
|
1737
|
-
typeof _ref$
|
|
1738
|
-
_$setAttribute(_el$
|
|
1739
|
-
_$setAttribute(_el$
|
|
1740
|
-
_$insert(_el$
|
|
1741
|
-
_$insert(_el$
|
|
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$
|
|
1747
|
-
_$insert(_el$
|
|
1748
|
-
return _el$
|
|
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$
|
|
1941
|
+
}), _el$98, _co$14);
|
|
1751
1942
|
_$effect(_p$ => {
|
|
1752
|
-
var _v$
|
|
1753
|
-
_v$
|
|
1754
|
-
_v$
|
|
1755
|
-
_v$
|
|
1756
|
-
_v$
|
|
1757
|
-
_v$
|
|
1758
|
-
_v$
|
|
1759
|
-
_v$
|
|
1760
|
-
_v$
|
|
1761
|
-
_v$
|
|
1762
|
-
_v$
|
|
1763
|
-
_v$
|
|
1764
|
-
_v$
|
|
1765
|
-
_v$
|
|
1766
|
-
_v$
|
|
1767
|
-
_v$
|
|
1768
|
-
_v$
|
|
1769
|
-
_v$
|
|
1770
|
-
_v$
|
|
1771
|
-
_v$
|
|
1772
|
-
_v$
|
|
1773
|
-
_v$
|
|
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$
|
|
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$
|
|
1815
|
-
_el$
|
|
1816
|
-
_el$
|
|
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$
|
|
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$
|
|
1824
|
-
typeof _ref$
|
|
1825
|
-
_$insert(_el$
|
|
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$
|
|
1828
|
-
_v$
|
|
1829
|
-
_v$
|
|
1830
|
-
_v$
|
|
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$
|
|
2027
|
+
return _el$99;
|
|
1837
2028
|
})();
|
|
1838
2029
|
};
|
|
1839
2030
|
AppWorkspaceNavTree.Item = AppWorkspaceNavTreeItem;
|
|
1840
2031
|
const AppWorkspaceSidebarIconGrid = props => (() => {
|
|
1841
|
-
var _el$
|
|
1842
|
-
_el$
|
|
1843
|
-
[_el$
|
|
1844
|
-
_el$
|
|
1845
|
-
_$spread(_el$
|
|
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$
|
|
2041
|
+
_$insert(_el$100, _$createComponent(Show, {
|
|
1851
2042
|
get when() {
|
|
1852
2043
|
return props.title;
|
|
1853
2044
|
},
|
|
1854
2045
|
children: title => (() => {
|
|
1855
|
-
var _el$
|
|
1856
|
-
_$insert(_el$
|
|
1857
|
-
return _el$
|
|
2046
|
+
var _el$104 = _$getNextElement(_tmpl$20);
|
|
2047
|
+
_$insert(_el$104, title);
|
|
2048
|
+
return _el$104;
|
|
1858
2049
|
})()
|
|
1859
|
-
}), _el$
|
|
1860
|
-
_$insert(_el$
|
|
1861
|
-
_$effect(() => _$setAttribute(_el$
|
|
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$
|
|
2054
|
+
return _el$100;
|
|
1864
2055
|
})();
|
|
1865
2056
|
const AppWorkspaceSidebarIconAction = props => {
|
|
1866
2057
|
const content = (() => {
|
|
1867
|
-
var _el$
|
|
1868
|
-
_$effect(() => _$className(_el$
|
|
1869
|
-
return _el$
|
|
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$
|
|
1883
|
-
_$spread(_el$
|
|
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$
|
|
2082
|
+
_$insert(_el$106, content);
|
|
1892
2083
|
_$runHydrationEvents();
|
|
1893
|
-
return _el$
|
|
2084
|
+
return _el$106;
|
|
1894
2085
|
})();
|
|
1895
2086
|
if (props.navigation !== "enhanced" || !props.onNavigate) return (() => {
|
|
1896
|
-
var _el$
|
|
1897
|
-
_$spread(_el$
|
|
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$
|
|
2097
|
+
_$insert(_el$107, content);
|
|
1907
2098
|
_$runHydrationEvents();
|
|
1908
|
-
return _el$
|
|
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$
|
|
1947
|
-
_el$
|
|
1948
|
-
[_el$
|
|
1949
|
-
_el$
|
|
1950
|
-
[_el$
|
|
1951
|
-
_$insert(_el$
|
|
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$
|
|
2153
|
+
return _$getNextElement(_tmpl$51);
|
|
1963
2154
|
}
|
|
1964
|
-
}), _el$
|
|
1965
|
-
_$insert(_el$
|
|
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$
|
|
1977
|
-
_$setAttribute(_el$
|
|
1978
|
-
_$insert(_el$
|
|
1979
|
-
return _el$
|
|
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$
|
|
1982
|
-
_$effect(() => _$setAttribute(_el$
|
|
1983
|
-
return _el$
|
|
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$
|
|
2019
|
-
_el$
|
|
2020
|
-
[_el$
|
|
2021
|
-
_el$
|
|
2022
|
-
[_el$
|
|
2023
|
-
var _ref$
|
|
2024
|
-
typeof _ref$
|
|
2025
|
-
_$insert(_el$
|
|
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$
|
|
2029
|
-
_$insert(_el$
|
|
2220
|
+
}), _el$117, _co$18);
|
|
2221
|
+
_$insert(_el$115, () => props.children, _el$119, _co$19);
|
|
2030
2222
|
_$effect(_p$ => {
|
|
2031
|
-
var _v$
|
|
2032
|
-
_v$
|
|
2033
|
-
_v$
|
|
2034
|
-
_v$
|
|
2035
|
-
_v$
|
|
2036
|
-
_v$
|
|
2037
|
-
_v$
|
|
2038
|
-
_v$
|
|
2039
|
-
_v$
|
|
2040
|
-
_v$
|
|
2041
|
-
_v$
|
|
2042
|
-
_p$.n = _$style(_el$
|
|
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$
|
|
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$
|
|
2068
|
-
_$insert(_el$
|
|
2069
|
-
_$effect(() => _$className(_el$
|
|
2070
|
-
return _el$
|
|
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;
|