@dxos/plugin-deck 0.8.4-main.406dc2a → 0.8.4-main.548089c
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/lib/browser/{app-graph-builder-YYP67JHW.mjs → app-graph-builder-2DE73K5P.mjs} +5 -30
- package/dist/lib/browser/app-graph-builder-2DE73K5P.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-GCOL6YDT.mjs → check-app-scheme-HIEVFAAX.mjs} +2 -2
- package/dist/lib/browser/{chunk-VX7MMQOW.mjs → chunk-27I7DJUG.mjs} +4 -4
- package/dist/lib/browser/{chunk-JQKOS2HB.mjs → chunk-2YHPKFFA.mjs} +55 -50
- package/dist/lib/browser/chunk-2YHPKFFA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HUWUYTOI.mjs → chunk-5KMJPIQC.mjs} +2 -2
- package/dist/lib/browser/{chunk-RJP5R7PY.mjs → chunk-ABGD5GHY.mjs} +16 -15
- package/dist/lib/browser/chunk-ABGD5GHY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7I6H3N4Q.mjs → chunk-F3VCCHVL.mjs} +2 -2
- package/dist/lib/browser/chunk-UXLU6CMW.mjs +16 -0
- package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -5
- package/dist/lib/browser/{intent-resolver-7XNOEPVN.mjs → intent-resolver-Q3KETDSS.mjs} +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-OJEF7YCH.mjs → react-root-EXJMQNOO.mjs} +9 -8
- package/dist/lib/browser/react-root-EXJMQNOO.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-XN2NJYHO.mjs → react-surface-D5R4UUKV.mjs} +7 -7
- package/dist/lib/browser/{settings-M3KSKRAP.mjs → settings-SDPTOCCM.mjs} +3 -3
- package/dist/lib/browser/state-QTVNH7N6.mjs +12 -0
- package/dist/lib/browser/toolkit-L5CFXJCF.mjs +52 -0
- package/dist/lib/browser/toolkit-L5CFXJCF.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/browser/{url-handler-EHTLXZRR.mjs → url-handler-QEYGYE2H.mjs} +4 -4
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +21 -2
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +33 -33
- package/src/capabilities/app-graph-builder.ts +19 -19
- package/src/capabilities/react-root.tsx +2 -1
- package/src/capabilities/toolkit.ts +23 -14
- package/src/components/DeckLayout/ActiveNode.tsx +1 -1
- package/src/components/DeckLayout/Banner.tsx +1 -1
- package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
- package/src/components/DeckLayout/DeckLayout.stories.tsx +7 -8
- package/src/components/DeckLayout/DeckLayout.tsx +1 -1
- package/src/components/DeckLayout/DeckMain.tsx +6 -10
- package/src/components/DeckLayout/Dialog.tsx +1 -1
- package/src/components/DeckLayout/Popover.tsx +2 -11
- package/src/components/DeckLayout/StatusBar.tsx +1 -1
- package/src/components/DeckLayout/Toast.tsx +1 -1
- package/src/components/Plank/Plank.tsx +51 -35
- package/src/components/Plank/PlankControls.tsx +3 -2
- package/src/components/Plank/PlankHeading.tsx +5 -4
- package/src/components/Sidebar/ComplementarySidebar.tsx +2 -2
- package/src/components/Sidebar/Sidebar.tsx +1 -1
- package/src/components/Sidebar/SidebarButton.tsx +7 -6
- package/src/hooks/useCompanions.ts +1 -1
- package/src/hooks/useDeckCompanions.ts +2 -1
- package/src/hooks/useHoistStatusbar.ts +2 -1
- package/src/meta.ts +5 -0
- package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs.map +0 -7
- package/dist/lib/browser/chunk-JQKOS2HB.mjs.map +0 -7
- package/dist/lib/browser/chunk-MHP4GPX5.mjs +0 -11
- package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +0 -7
- package/dist/lib/browser/chunk-RJP5R7PY.mjs.map +0 -7
- package/dist/lib/browser/react-root-OJEF7YCH.mjs.map +0 -7
- package/dist/lib/browser/state-6ZSDTF6Q.mjs +0 -12
- package/dist/lib/browser/toolkit-L7C3UAEU.mjs +0 -63
- package/dist/lib/browser/toolkit-L7C3UAEU.mjs.map +0 -7
- /package/dist/lib/browser/{check-app-scheme-GCOL6YDT.mjs.map → check-app-scheme-HIEVFAAX.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-VX7MMQOW.mjs.map → chunk-27I7DJUG.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-HUWUYTOI.mjs.map → chunk-5KMJPIQC.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-7I6H3N4Q.mjs.map → chunk-F3VCCHVL.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-7XNOEPVN.mjs.map → intent-resolver-Q3KETDSS.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-XN2NJYHO.mjs.map → react-surface-D5R4UUKV.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-M3KSKRAP.mjs.map → settings-SDPTOCCM.mjs.map} +0 -0
- /package/dist/lib/browser/{state-6ZSDTF6Q.mjs.map → state-QTVNH7N6.mjs.map} +0 -0
- /package/dist/lib/browser/{url-handler-EHTLXZRR.mjs.map → url-handler-QEYGYE2H.mjs.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeckCapabilities
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5KMJPIQC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
meta
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UXLU6CMW.mjs";
|
|
7
7
|
|
|
8
8
|
// src/capabilities/app-graph-builder.ts
|
|
9
|
-
import {
|
|
9
|
+
import { Atom } from "@effect-atom/atom-react";
|
|
10
10
|
import * as Function from "effect/Function";
|
|
11
11
|
import * as Option from "effect/Option";
|
|
12
12
|
import { Capabilities, LayoutAction, contributes, createIntent } from "@dxos/app-framework";
|
|
@@ -14,33 +14,8 @@ import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
|
14
14
|
import { ROOT_ID, createExtension, rxFromSignal } from "@dxos/plugin-graph";
|
|
15
15
|
var app_graph_builder_default = ((context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
16
16
|
id: meta.id,
|
|
17
|
-
actions: (node) =>
|
|
17
|
+
actions: (node) => Atom.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map(() => {
|
|
18
18
|
const state = context.getCapability(DeckCapabilities.MutableDeckState);
|
|
19
|
-
const _fullscreen = {
|
|
20
|
-
id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,
|
|
21
|
-
data: async () => {
|
|
22
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
23
|
-
await dispatch(createIntent(LayoutAction.SetLayoutMode, {
|
|
24
|
-
part: "mode",
|
|
25
|
-
options: {
|
|
26
|
-
mode: "fullscreen"
|
|
27
|
-
}
|
|
28
|
-
}));
|
|
29
|
-
},
|
|
30
|
-
properties: {
|
|
31
|
-
label: [
|
|
32
|
-
"toggle fullscreen label",
|
|
33
|
-
{
|
|
34
|
-
ns: meta.id
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
icon: "ph--arrows-out--regular",
|
|
38
|
-
keyBinding: {
|
|
39
|
-
macos: "ctrl+meta+f",
|
|
40
|
-
windows: "shift+ctrl+f"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
19
|
const closeCurrent = {
|
|
45
20
|
id: `${LayoutAction.Close._tag}/current`,
|
|
46
21
|
data: async () => {
|
|
@@ -150,4 +125,4 @@ var app_graph_builder_default = ((context) => contributes(Capabilities.AppGraphB
|
|
|
150
125
|
export {
|
|
151
126
|
app_graph_builder_default as default
|
|
152
127
|
};
|
|
153
|
-
//# sourceMappingURL=app-graph-builder-
|
|
128
|
+
//# sourceMappingURL=app-graph-builder-2DE73K5P.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';\n\nimport { meta } from '../meta';\n\nimport { DeckCapabilities } from './capabilities';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: meta.id,\n actions: (node) =>\n Atom.make((get) =>\n Function.pipe(\n get(node),\n Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const state = context.getCapability(DeckCapabilities.MutableDeckState);\n\n // NOTE(Zan): This is currently disabled.\n // TODO(Zan): Fullscreen needs to know the active node and provide that to the layout part.\n // const _fullscreen = {\n // id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,\n // data: async () => {\n // const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n // await dispatch(\n // createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }),\n // );\n // },\n // properties: {\n // label: ['toggle fullscreen label', { ns: meta.id }],\n // icon: 'ph--arrows-out--regular',\n // keyBinding: {\n // macos: 'ctrl+meta+f',\n // windows: 'shift+ctrl+f',\n // },\n // },\n // };\n\n const closeCurrent = {\n id: `${LayoutAction.Close._tag}/current`,\n data: async () => {\n const attention = context.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n if (attended) {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: [attended],\n options: { state: false },\n }),\n );\n }\n },\n properties: {\n label: ['close current label', { ns: meta.id }],\n icon: 'ph--x--regular',\n },\n };\n\n const closeOthers = {\n id: `${LayoutAction.Close._tag}/others`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const attention = context.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n const ids = state.deck.active.filter((id) => id !== attended) ?? [];\n await dispatch(\n createIntent(LayoutAction.Close, { part: 'main', subject: ids, options: { state: false } }),\n );\n },\n properties: {\n label: ['close others label', { ns: meta.id }],\n icon: 'ph--x-square--regular',\n },\n };\n\n const closeAll = {\n id: `${LayoutAction.Close._tag}/all`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: state.deck.active,\n options: { state: false },\n }),\n );\n },\n properties: {\n label: ['close all label', { ns: meta.id }],\n icon: 'ph--x-circle--regular',\n },\n };\n\n const toggleSidebar = {\n id: `${LayoutAction.UpdateSidebar._tag}/nav`,\n data: async () => {\n state.sidebarState = state.sidebarState === 'expanded' ? 'collapsed' : 'expanded';\n },\n properties: {\n label: [\n get(\n rxFromSignal(() =>\n state.sidebarState === 'expanded'\n ? 'collapse navigation sidebar label'\n : 'open navigation sidebar label',\n ),\n ),\n { ns: meta.id },\n ],\n icon: 'ph--sidebar--regular',\n keyBinding: {\n macos: \"meta+'\",\n },\n disposition: 'pin-end',\n position: 'hoist',\n l0Breakpoint: 'lg',\n },\n };\n\n return get(\n rxFromSignal(() =>\n !state.deck.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar],\n ),\n );\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Atom", "Function", "Option", "Capabilities", "LayoutAction", "contributes", "createIntent", "AttentionCapabilities", "ROOT_ID", "createExtension", "rxFromSignal", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "meta", "actions", "node", "Atom", "make", "get", "pipe", "flatMap", "ROOT_ID", "some", "none", "map", "state", "getCapability", "DeckCapabilities", "MutableDeckState", "closeCurrent", "LayoutAction", "Close", "_tag", "data", "attention", "AttentionCapabilities", "Attention", "attended", "current", "at", "dispatchPromise", "dispatch", "IntentDispatcher", "createIntent", "part", "subject", "options", "properties", "label", "ns", "icon", "closeOthers", "ids", "deck", "active", "filter", "closeAll", "toggleSidebar", "UpdateSidebar", "sidebarState", "rxFromSignal", "keyBinding", "macos", "disposition", "position", "l0Breakpoint", "solo", "getOrElse"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
meta
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UXLU6CMW.mjs";
|
|
4
4
|
|
|
5
5
|
// src/capabilities/check-app-scheme.ts
|
|
6
6
|
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
@@ -29,4 +29,4 @@ var check_app_scheme_default = (async (context) => {
|
|
|
29
29
|
export {
|
|
30
30
|
check_app_scheme_default as default
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=check-app-scheme-
|
|
32
|
+
//# sourceMappingURL=check-app-scheme-HIEVFAAX.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeckCapabilities
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5KMJPIQC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultDeck,
|
|
6
6
|
getMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F3VCCHVL.mjs";
|
|
8
8
|
import {
|
|
9
9
|
meta
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UXLU6CMW.mjs";
|
|
11
11
|
|
|
12
12
|
// src/capabilities/state.ts
|
|
13
13
|
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
@@ -126,4 +126,4 @@ export {
|
|
|
126
126
|
DeckStateFactory,
|
|
127
127
|
state_default
|
|
128
128
|
};
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
129
|
+
//# sourceMappingURL=chunk-27I7DJUG.mjs.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useHoistStatusbar,
|
|
7
7
|
useMainSize,
|
|
8
8
|
useNodeActionExpander
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ABGD5GHY.mjs";
|
|
10
10
|
import {
|
|
11
11
|
calculateOverscroll,
|
|
12
12
|
layoutAppliesTopbar,
|
|
@@ -14,36 +14,39 @@ import {
|
|
|
14
14
|
} from "./chunk-CNTGBCMK.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeckCapabilities
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5KMJPIQC.mjs";
|
|
18
18
|
import {
|
|
19
19
|
DeckAction,
|
|
20
20
|
NewPlankPositions,
|
|
21
21
|
OverscrollOptions,
|
|
22
22
|
PLANK_COMPANION_TYPE,
|
|
23
23
|
getMode
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-F3VCCHVL.mjs";
|
|
25
25
|
import {
|
|
26
26
|
meta
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-UXLU6CMW.mjs";
|
|
28
28
|
|
|
29
29
|
// src/components/DeckLayout/Banner.tsx
|
|
30
30
|
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
31
31
|
import React9 from "react";
|
|
32
|
-
import { Surface as Surface5 } from "@dxos/app-framework";
|
|
32
|
+
import { Surface as Surface5 } from "@dxos/app-framework/react";
|
|
33
33
|
import { useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
34
34
|
import { mx as mx4 } from "@dxos/react-ui-theme";
|
|
35
35
|
|
|
36
36
|
// src/components/Sidebar/ComplementarySidebar.tsx
|
|
37
37
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
38
38
|
import React7, { Fragment as Fragment2, useCallback as useCallback5, useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
|
|
39
|
-
import { LayoutAction as LayoutAction4,
|
|
39
|
+
import { LayoutAction as LayoutAction4, createIntent as createIntent5 } from "@dxos/app-framework";
|
|
40
|
+
import { Surface as Surface3, useCapability as useCapability3, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework/react";
|
|
40
41
|
import { IconButton as IconButton4, Main, toLocalizedString as toLocalizedString2, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
41
42
|
import { Tabs } from "@dxos/react-ui-tabs";
|
|
42
43
|
|
|
43
44
|
// src/components/Plank/Plank.tsx
|
|
44
45
|
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
46
|
+
import { useFocusFinders } from "@fluentui/react-tabster";
|
|
45
47
|
import React5, { memo as memo2, useCallback as useCallback3, useLayoutEffect, useMemo as useMemo2, useRef } from "react";
|
|
46
|
-
import { LayoutAction as LayoutAction2,
|
|
48
|
+
import { LayoutAction as LayoutAction2, createIntent as createIntent3 } from "@dxos/app-framework";
|
|
49
|
+
import { Surface as Surface2, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework/react";
|
|
47
50
|
import { debounce } from "@dxos/async";
|
|
48
51
|
import { useNode } from "@dxos/plugin-graph";
|
|
49
52
|
import { ATTENDABLE_PATH_SEPARATOR, useAttentionAttributes } from "@dxos/react-ui-attention";
|
|
@@ -59,7 +62,8 @@ import { descriptionMessage, mx as mx2 } from "@dxos/react-ui-theme";
|
|
|
59
62
|
// src/components/Plank/PlankHeading.tsx
|
|
60
63
|
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
61
64
|
import React2, { Fragment, memo, useCallback as useCallback2, useEffect, useMemo } from "react";
|
|
62
|
-
import { LayoutAction,
|
|
65
|
+
import { LayoutAction, createIntent as createIntent2 } from "@dxos/app-framework";
|
|
66
|
+
import { Surface, useAppGraph, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework/react";
|
|
63
67
|
import { Icon, IconButton as IconButton2, Popover, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
64
68
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
65
69
|
import { TextTooltip } from "@dxos/react-ui-text-tooltip";
|
|
@@ -75,7 +79,8 @@ var fixedComplementarySidebarToggleStyles = mx(sidebarToggleStyles, "inline-end-
|
|
|
75
79
|
// src/components/Plank/PlankControls.tsx
|
|
76
80
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
77
81
|
import React, { forwardRef, useCallback } from "react";
|
|
78
|
-
import { createIntent
|
|
82
|
+
import { createIntent } from "@dxos/app-framework";
|
|
83
|
+
import { useIntentDispatcher } from "@dxos/app-framework/react";
|
|
79
84
|
import { invariant } from "@dxos/invariant";
|
|
80
85
|
import { ButtonGroup, IconButton, useTranslation } from "@dxos/react-ui";
|
|
81
86
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-deck/src/components/Plank/PlankControls.tsx";
|
|
@@ -83,10 +88,9 @@ var PlankControl = ({ icon, label: label3, ...props }) => {
|
|
|
83
88
|
var _effect = _useSignals();
|
|
84
89
|
try {
|
|
85
90
|
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
86
|
-
iconOnly: true,
|
|
87
91
|
label: label3,
|
|
88
92
|
icon,
|
|
89
|
-
|
|
93
|
+
iconOnly: true,
|
|
90
94
|
variant: "ghost",
|
|
91
95
|
tooltipSide: "bottom",
|
|
92
96
|
...props
|
|
@@ -104,7 +108,7 @@ var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedR
|
|
|
104
108
|
const handleCloseCompanion = useCallback(() => {
|
|
105
109
|
invariant(primary, void 0, {
|
|
106
110
|
F: __dxlog_file,
|
|
107
|
-
L:
|
|
111
|
+
L: 50,
|
|
108
112
|
S: void 0,
|
|
109
113
|
A: [
|
|
110
114
|
"primary",
|
|
@@ -318,7 +322,8 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
318
322
|
...layoutMode === "solo--fullscreen" ? [
|
|
319
323
|
hoverableControls,
|
|
320
324
|
hoverableFocusedWithinControls,
|
|
321
|
-
"*:transition-opacity *:opacity-[--controls-opacity] bg-transparent border-transparent transition-[background-color,border-color]
|
|
325
|
+
"*:transition-opacity *:opacity-[--controls-opacity] bg-transparent border-transparent transition-[background-color,border-color]",
|
|
326
|
+
"hover-hover:hover:bg-headerSurface focus-within:bg-headerSurface hover-hover:hover:border-subduedSeparator focus-within:border-subduedSeparator"
|
|
322
327
|
] : []
|
|
323
328
|
],
|
|
324
329
|
"data-plank-heading": true
|
|
@@ -333,7 +338,6 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
333
338
|
icon: icon2,
|
|
334
339
|
iconOnly: companions.length > MAX_COMPANIONS && node?.id !== id2,
|
|
335
340
|
label: toLocalizedString(label4, t),
|
|
336
|
-
size: 5,
|
|
337
341
|
variant: node?.id === id2 ? "primary" : "ghost",
|
|
338
342
|
onClick: handleTabClick
|
|
339
343
|
})))
|
|
@@ -352,8 +356,7 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
352
356
|
})) : /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement("span", {
|
|
353
357
|
className: "sr-only"
|
|
354
358
|
}, label3), /* @__PURE__ */ React2.createElement(Icon, {
|
|
355
|
-
icon
|
|
356
|
-
size: 5
|
|
359
|
+
icon
|
|
357
360
|
}))), /* @__PURE__ */ React2.createElement(TextTooltip, {
|
|
358
361
|
text: label3,
|
|
359
362
|
onlyWhenTruncating: true
|
|
@@ -482,6 +485,7 @@ var PlankContainer = ({ children, solo, companion, encapsulate }) => {
|
|
|
482
485
|
}
|
|
483
486
|
return /* @__PURE__ */ React5.createElement("div", {
|
|
484
487
|
role: "none",
|
|
488
|
+
"data-popover-collision-boundary": true,
|
|
485
489
|
className: mx3("absolute inset-[--main-spacing] grid", encapsulate && "border border-separator rounded overflow-hidden", companion && "grid-cols-[6fr_4fr]", railGridHorizontal, mainIntrinsicSize),
|
|
486
490
|
...sizeAttrs
|
|
487
491
|
}, children);
|
|
@@ -494,6 +498,7 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
494
498
|
try {
|
|
495
499
|
const { dispatchPromise: dispatch } = useIntentDispatcher3();
|
|
496
500
|
const { deck, popoverAnchorId, scrollIntoView } = useCapability(DeckCapabilities.DeckState);
|
|
501
|
+
const { findFirstFocusable } = useFocusFinders();
|
|
497
502
|
const canResize = layoutMode === "deck";
|
|
498
503
|
const attentionAttrs = useAttentionAttributes(primary?.id ?? id);
|
|
499
504
|
const index = active ? active.findIndex((entryId) => entryId === id) : 0;
|
|
@@ -514,8 +519,15 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
514
519
|
sizeKey
|
|
515
520
|
]);
|
|
516
521
|
const handleKeyDown = useCallback3((event) => {
|
|
517
|
-
if (event.target === event.currentTarget
|
|
518
|
-
|
|
522
|
+
if (event.target === event.currentTarget) {
|
|
523
|
+
switch (event.key) {
|
|
524
|
+
case "Escape":
|
|
525
|
+
rootElement.current?.closest("main")?.focus();
|
|
526
|
+
break;
|
|
527
|
+
case "Enter":
|
|
528
|
+
rootElement.current && findFirstFocusable(rootElement.current)?.focus();
|
|
529
|
+
break;
|
|
530
|
+
}
|
|
519
531
|
}
|
|
520
532
|
}, []);
|
|
521
533
|
useLayoutEffect(() => {
|
|
@@ -556,10 +568,12 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
556
568
|
]);
|
|
557
569
|
const placeholder = useMemo2(() => /* @__PURE__ */ React5.createElement(PlankLoading, null), []);
|
|
558
570
|
const Root = part.startsWith("solo") ? "article" : StackItem2.Root;
|
|
559
|
-
const
|
|
571
|
+
const fullscreen = layoutMode === "solo--fullscreen";
|
|
572
|
+
const className = mx3("attention-surface relative dx-focus-ring-inset-over-all density-coarse", isSolo && "absolute inset-0", isSolo && mainIntrinsicSize, railGridHorizontal, part.startsWith("solo") && "grid", part.startsWith("solo-") && "grid-rows-subgrid row-span-2 min-is-0", fullscreen && "grid-rows-1", part === "deck" && (companioned === "companion" ? "!border-separator border-ie" : "!border-separator border-li"), part === "solo-companion" && "!border-separator border-is", settings?.encapsulatedPlanks && !part.startsWith("solo") && "mli-[--main-spacing] !border-separator border rounded overflow-hidden");
|
|
560
573
|
return /* @__PURE__ */ React5.createElement(Root, {
|
|
561
574
|
ref: rootElement,
|
|
562
575
|
"data-testid": "deck.plank",
|
|
576
|
+
"data-popover-collision-boundary": true,
|
|
563
577
|
tabIndex: 0,
|
|
564
578
|
...part.startsWith("solo") ? {
|
|
565
579
|
...sizeAttrs,
|
|
@@ -576,7 +590,7 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
576
590
|
},
|
|
577
591
|
...isAttendable ? attentionAttrs : {},
|
|
578
592
|
onKeyDown: handleKeyDown
|
|
579
|
-
}, node ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(PlankHeading, {
|
|
593
|
+
}, node ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, !fullscreen && /* @__PURE__ */ React5.createElement(PlankHeading, {
|
|
580
594
|
id,
|
|
581
595
|
part: part.startsWith("solo-") ? "solo" : part,
|
|
582
596
|
node,
|
|
@@ -607,7 +621,8 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
607
621
|
// src/components/Sidebar/SidebarButton.tsx
|
|
608
622
|
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
609
623
|
import React6, { useCallback as useCallback4 } from "react";
|
|
610
|
-
import { LayoutAction as LayoutAction3, createIntent as createIntent4
|
|
624
|
+
import { LayoutAction as LayoutAction3, createIntent as createIntent4 } from "@dxos/app-framework";
|
|
625
|
+
import { useCapability as useCapability2, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework/react";
|
|
611
626
|
import { IconButton as IconButton3, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
612
627
|
var ToggleSidebarButton = ({ classNames, variant = "ghost" }) => {
|
|
613
628
|
var _effect = _useSignals6();
|
|
@@ -616,8 +631,8 @@ var ToggleSidebarButton = ({ classNames, variant = "ghost" }) => {
|
|
|
616
631
|
const { t } = useTranslation4(meta.id);
|
|
617
632
|
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
618
633
|
variant,
|
|
619
|
-
iconOnly: true,
|
|
620
634
|
icon: "ph--sidebar--regular",
|
|
635
|
+
iconOnly: true,
|
|
621
636
|
size: 4,
|
|
622
637
|
label: t("open navigation sidebar label"),
|
|
623
638
|
onClick: () => layoutContext.sidebarState = layoutContext.sidebarState === "expanded" ? "collapsed" : "expanded",
|
|
@@ -634,8 +649,8 @@ var CloseSidebarButton = () => {
|
|
|
634
649
|
const { t } = useTranslation4(meta.id);
|
|
635
650
|
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
636
651
|
variant: "ghost",
|
|
637
|
-
iconOnly: true,
|
|
638
652
|
icon: "ph--caret-line-left--regular",
|
|
653
|
+
iconOnly: true,
|
|
639
654
|
size: 4,
|
|
640
655
|
label: t("close navigation sidebar label"),
|
|
641
656
|
onClick: () => layoutContext.sidebarState = "collapsed",
|
|
@@ -668,17 +683,17 @@ var ToggleComplementarySidebarButton = ({ inR0, classNames, current }) => {
|
|
|
668
683
|
dispatch
|
|
669
684
|
]);
|
|
670
685
|
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
671
|
-
iconOnly: true,
|
|
672
|
-
onClick: handleClick,
|
|
673
686
|
variant: "ghost",
|
|
674
|
-
label: t("open complementary sidebar label"),
|
|
675
687
|
classNames: [
|
|
676
688
|
"[&>svg]:-scale-x-100",
|
|
677
689
|
classNames
|
|
678
690
|
],
|
|
679
691
|
icon: "ph--sidebar-simple--regular",
|
|
692
|
+
iconOnly: true,
|
|
693
|
+
label: t("open complementary sidebar label"),
|
|
680
694
|
size: inR0 ? 5 : 4,
|
|
681
|
-
tooltipSide: inR0 ? "left" : void 0
|
|
695
|
+
tooltipSide: inR0 ? "left" : void 0,
|
|
696
|
+
onClick: handleClick
|
|
682
697
|
});
|
|
683
698
|
} finally {
|
|
684
699
|
_effect.f();
|
|
@@ -771,7 +786,6 @@ var ComplementarySidebar = ({ current }) => {
|
|
|
771
786
|
}, /* @__PURE__ */ React7.createElement(IconButton4, {
|
|
772
787
|
label: toLocalizedString2(companion.properties.label, t),
|
|
773
788
|
icon: companion.properties.icon,
|
|
774
|
-
size: 5,
|
|
775
789
|
iconOnly: true,
|
|
776
790
|
tooltipSide: "left",
|
|
777
791
|
"data-value": getCompanionId(companion.id),
|
|
@@ -843,7 +857,7 @@ var ComplementarySidebarPanel = ({ companion, activeId, data, hoistStatusbar })
|
|
|
843
857
|
// src/components/Sidebar/Sidebar.tsx
|
|
844
858
|
import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
|
|
845
859
|
import React8, { useMemo as useMemo4 } from "react";
|
|
846
|
-
import { Surface as Surface4, useCapability as useCapability4 } from "@dxos/app-framework";
|
|
860
|
+
import { Surface as Surface4, useCapability as useCapability4 } from "@dxos/app-framework/react";
|
|
847
861
|
import { Main as Main2 } from "@dxos/react-ui";
|
|
848
862
|
var label2 = [
|
|
849
863
|
"sidebar title",
|
|
@@ -925,12 +939,12 @@ var Banner = ({ variant, classNames }) => {
|
|
|
925
939
|
// src/components/DeckLayout/DeckLayout.tsx
|
|
926
940
|
import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
|
|
927
941
|
import React18 from "react";
|
|
928
|
-
import { useCapability as useCapability9 } from "@dxos/app-framework";
|
|
942
|
+
import { useCapability as useCapability9 } from "@dxos/app-framework/react";
|
|
929
943
|
|
|
930
944
|
// src/components/DeckLayout/ActiveNode.tsx
|
|
931
945
|
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
932
946
|
import React10 from "react";
|
|
933
|
-
import { Surface as Surface6, useAppGraph as useAppGraph3 } from "@dxos/app-framework";
|
|
947
|
+
import { Surface as Surface6, useAppGraph as useAppGraph3 } from "@dxos/app-framework/react";
|
|
934
948
|
import { useNode as useNode2 } from "@dxos/plugin-graph";
|
|
935
949
|
import { useAttended } from "@dxos/react-ui-attention";
|
|
936
950
|
var ActiveNode = () => {
|
|
@@ -959,7 +973,8 @@ var ActiveNode = () => {
|
|
|
959
973
|
import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
|
|
960
974
|
import { untracked } from "@preact/signals-core";
|
|
961
975
|
import React14, { Fragment as Fragment3, useCallback as useCallback6, useEffect as useEffect4, useMemo as useMemo5, useRef as useRef2 } from "react";
|
|
962
|
-
import { Capabilities, LayoutAction as LayoutAction5, createIntent as createIntent6
|
|
976
|
+
import { Capabilities, LayoutAction as LayoutAction5, createIntent as createIntent6 } from "@dxos/app-framework";
|
|
977
|
+
import { useCapability as useCapability6, useIntentDispatcher as useIntentDispatcher6, usePluginManager } from "@dxos/app-framework/react";
|
|
963
978
|
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
964
979
|
import { Main as Main3, useMediaQuery, useOnTransition } from "@dxos/react-ui";
|
|
965
980
|
import { DEFAULT_HORIZONTAL_SIZE, Stack, StackContext } from "@dxos/react-ui-stack";
|
|
@@ -968,7 +983,7 @@ import { mainPaddingTransitions, mx as mx5 } from "@dxos/react-ui-theme";
|
|
|
968
983
|
// src/components/DeckLayout/ContentEmpty.tsx
|
|
969
984
|
import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
|
|
970
985
|
import React11 from "react";
|
|
971
|
-
import { Surface as Surface7, useCapability as useCapability5 } from "@dxos/app-framework";
|
|
986
|
+
import { Surface as Surface7, useCapability as useCapability5 } from "@dxos/app-framework/react";
|
|
972
987
|
var ContentEmpty = () => {
|
|
973
988
|
var _effect = _useSignals11();
|
|
974
989
|
try {
|
|
@@ -994,7 +1009,7 @@ var ContentEmpty = () => {
|
|
|
994
1009
|
// src/components/DeckLayout/StatusBar.tsx
|
|
995
1010
|
import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
|
|
996
1011
|
import React12 from "react";
|
|
997
|
-
import { Surface as Surface8 } from "@dxos/app-framework";
|
|
1012
|
+
import { Surface as Surface8 } from "@dxos/app-framework/react";
|
|
998
1013
|
import { useLandmarkMover } from "@dxos/react-ui";
|
|
999
1014
|
var StatusBar = ({ showHints }) => {
|
|
1000
1015
|
var _effect = _useSignals12();
|
|
@@ -1086,7 +1101,7 @@ var DeckMain = () => {
|
|
|
1086
1101
|
dispatch
|
|
1087
1102
|
]);
|
|
1088
1103
|
useEffect4(() => {
|
|
1089
|
-
if (settings?.enableDeck && layoutMode === "deck") {
|
|
1104
|
+
if (!settings?.enableDeck && layoutMode === "deck") {
|
|
1090
1105
|
void dispatch(createIntent6(LayoutAction5.SetLayoutMode, {
|
|
1091
1106
|
part: "mode",
|
|
1092
1107
|
subject: active[0],
|
|
@@ -1157,8 +1172,8 @@ var DeckMain = () => {
|
|
|
1157
1172
|
]);
|
|
1158
1173
|
return /* @__PURE__ */ React14.createElement(Main3.Root, {
|
|
1159
1174
|
navigationSidebarState: fullscreen ? "closed" : context.sidebarState,
|
|
1160
|
-
onNavigationSidebarStateChange: (next) => context.sidebarState = next,
|
|
1161
1175
|
complementarySidebarState: fullscreen ? "closed" : context.complementarySidebarState,
|
|
1176
|
+
onNavigationSidebarStateChange: (next) => context.sidebarState = next,
|
|
1162
1177
|
onComplementarySidebarStateChange: (next) => context.complementarySidebarState = next
|
|
1163
1178
|
}, /* @__PURE__ */ React14.createElement(Sidebar, null), /* @__PURE__ */ React14.createElement(ComplementarySidebar, {
|
|
1164
1179
|
current: complementarySidebarPanel
|
|
@@ -1258,7 +1273,7 @@ var PlankSeparator = ({ order, encapsulate }) => {
|
|
|
1258
1273
|
// src/components/DeckLayout/Dialog.tsx
|
|
1259
1274
|
import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
|
|
1260
1275
|
import React15 from "react";
|
|
1261
|
-
import { Surface as Surface9, useCapability as useCapability7 } from "@dxos/app-framework";
|
|
1276
|
+
import { Surface as Surface9, useCapability as useCapability7 } from "@dxos/app-framework/react";
|
|
1262
1277
|
import { AlertDialog, Dialog as NaturalDialog } from "@dxos/react-ui";
|
|
1263
1278
|
var Dialog = () => {
|
|
1264
1279
|
var _effect = _useSignals15();
|
|
@@ -1298,8 +1313,8 @@ var Dialog = () => {
|
|
|
1298
1313
|
// src/components/DeckLayout/Popover.tsx
|
|
1299
1314
|
import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
|
|
1300
1315
|
import { createContext } from "@radix-ui/react-context";
|
|
1301
|
-
import React16, { useCallback as useCallback7, useEffect as useEffect5,
|
|
1302
|
-
import { Surface as Surface10, useCapability as useCapability8 } from "@dxos/app-framework";
|
|
1316
|
+
import React16, { useCallback as useCallback7, useEffect as useEffect5, useRef as useRef3, useState as useState3 } from "react";
|
|
1317
|
+
import { Surface as Surface10, useCapability as useCapability8 } from "@dxos/app-framework/react";
|
|
1303
1318
|
import { Popover as Popover2 } from "@dxos/react-ui";
|
|
1304
1319
|
var DEBOUNCE_DELAY = 40;
|
|
1305
1320
|
var [DeckPopoverProvider, useDeckPopoverContext] = createContext("DeckPopover");
|
|
@@ -1363,19 +1378,10 @@ var PopoverContent = () => {
|
|
|
1363
1378
|
}, [
|
|
1364
1379
|
setOpen
|
|
1365
1380
|
]);
|
|
1366
|
-
const collisionBoundaries = useMemo6(() => {
|
|
1367
|
-
const closest = layout.popoverAnchor?.closest("[data-popover-collision-boundary]");
|
|
1368
|
-
return closest ? [
|
|
1369
|
-
closest
|
|
1370
|
-
] : [];
|
|
1371
|
-
}, [
|
|
1372
|
-
layout.popoverAnchor
|
|
1373
|
-
]);
|
|
1374
1381
|
return /* @__PURE__ */ React16.createElement(Popover2.Portal, null, /* @__PURE__ */ React16.createElement(Popover2.Content, {
|
|
1375
1382
|
side: layout.popoverSide,
|
|
1376
1383
|
onInteractOutside: handleClose,
|
|
1377
1384
|
onEscapeKeyDown: handleClose,
|
|
1378
|
-
collisionBoundary: collisionBoundaries,
|
|
1379
1385
|
sticky: "always",
|
|
1380
1386
|
hideWhenDetached: true
|
|
1381
1387
|
}, /* @__PURE__ */ React16.createElement(Popover2.Viewport, null, /* @__PURE__ */ React16.createElement(Surface10, {
|
|
@@ -1405,7 +1411,6 @@ var Toast = ({ id, title, description, icon, duration, actionLabel, actionAlt, c
|
|
|
1405
1411
|
classNames: "items-center"
|
|
1406
1412
|
}, icon && /* @__PURE__ */ React17.createElement(Icon2, {
|
|
1407
1413
|
icon,
|
|
1408
|
-
size: 5,
|
|
1409
1414
|
classNames: "inline mr-1"
|
|
1410
1415
|
}), title && /* @__PURE__ */ React17.createElement("span", null, toLocalizedString3(title, t))), description && /* @__PURE__ */ React17.createElement(NaturalToast.Description, null, description && toLocalizedString3(description, t))), /* @__PURE__ */ React17.createElement(NaturalToast.Actions, null, onAction && actionAlt && actionLabel && /* @__PURE__ */ React17.createElement(NaturalToast.Action, {
|
|
1411
1416
|
altText: toLocalizedString3(actionAlt, t),
|
|
@@ -1528,4 +1533,4 @@ export {
|
|
|
1528
1533
|
DeckLayout,
|
|
1529
1534
|
DeckSettings
|
|
1530
1535
|
};
|
|
1531
|
-
//# sourceMappingURL=chunk-
|
|
1536
|
+
//# sourceMappingURL=chunk-2YHPKFFA.mjs.map
|