@dxos/plugin-deck 0.8.2-main.5885341 → 0.8.2-main.600d381
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/chunk-E7TOEOGO.mjs +157 -0
- package/dist/lib/browser/chunk-E7TOEOGO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RBJ6DLAC.mjs → chunk-HWEH5OJ7.mjs} +8 -8
- package/dist/lib/browser/{chunk-6HJZL3WT.mjs → chunk-PGSJT5PG.mjs} +2 -2
- package/dist/lib/browser/{chunk-RDFJGGGX.mjs → chunk-ZAL26IIZ.mjs} +27 -28
- package/dist/lib/browser/chunk-ZAL26IIZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3 -3
- package/dist/lib/browser/{intent-resolver-JKWXWUV6.mjs → intent-resolver-NO6L67KF.mjs} +23 -23
- package/dist/lib/browser/intent-resolver-NO6L67KF.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-S6ZAKNZA.mjs → react-root-SK3KDPHZ.mjs} +5 -5
- package/dist/lib/browser/{react-surface-I7WZBOGM.mjs → react-surface-LSSPY2BU.mjs} +5 -5
- package/dist/lib/browser/{settings-6NU7CF2B.mjs → settings-C7LX2GXF.mjs} +2 -2
- package/dist/lib/browser/{state-Z6UY2Z3M.mjs → state-AX74YEJD.mjs} +2 -2
- package/dist/lib/browser/{tools-VDVQTJMD.mjs → tools-7W7KZRAX.mjs} +7 -7
- package/dist/lib/browser/tools-7W7KZRAX.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/browser/{url-handler-3CARFXQK.mjs → url-handler-AF5SYROZ.mjs} +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.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/PlankError.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/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +104 -104
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
- package/dist/types/src/util/overscroll.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/src/util/useCompanions.d.ts.map +1 -1
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -28
- package/src/capabilities/intent-resolver.ts +32 -32
- package/src/capabilities/tools.ts +4 -3
- package/src/components/Plank/Plank.stories.tsx +1 -1
- package/src/components/Plank/PlankControls.tsx +3 -23
- package/src/components/Plank/PlankHeading.tsx +6 -3
- package/src/components/Sidebar/SidebarButton.tsx +3 -0
- package/src/types.ts +72 -71
- package/dist/lib/browser/chunk-RDFJGGGX.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZMJMCN7O.mjs +0 -157
- package/dist/lib/browser/chunk-ZMJMCN7O.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JKWXWUV6.mjs.map +0 -7
- package/dist/lib/browser/tools-VDVQTJMD.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-RBJ6DLAC.mjs.map → chunk-HWEH5OJ7.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-6HJZL3WT.mjs.map → chunk-PGSJT5PG.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-S6ZAKNZA.mjs.map → react-root-SK3KDPHZ.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-I7WZBOGM.mjs.map → react-surface-LSSPY2BU.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-6NU7CF2B.mjs.map → settings-C7LX2GXF.mjs.map} +0 -0
- /package/dist/lib/browser/{state-Z6UY2Z3M.mjs.map → state-AX74YEJD.mjs.map} +0 -0
- /package/dist/lib/browser/{url-handler-3CARFXQK.mjs.map → url-handler-AF5SYROZ.mjs.map} +0 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DECK_PLUGIN
|
|
3
|
+
} from "./chunk-NSATFAEE.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-deck/src/types.ts
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
import { LayoutAction } from "@dxos/app-framework";
|
|
8
|
+
import { ATTENDABLE_PATH_SEPARATOR } from "@dxos/react-ui-attention";
|
|
9
|
+
var PLANK_COMPANION_TYPE = "dxos.org/plugin/deck/plank-companion";
|
|
10
|
+
var DECK_COMPANION_TYPE = "dxos.org/plugin/deck/deck-companion";
|
|
11
|
+
var NewPlankPositions = [
|
|
12
|
+
"start",
|
|
13
|
+
"end"
|
|
14
|
+
];
|
|
15
|
+
var OverscrollOptions = [
|
|
16
|
+
"none",
|
|
17
|
+
"centering"
|
|
18
|
+
];
|
|
19
|
+
var DeckSettingsSchema = Schema.Struct({
|
|
20
|
+
showHints: Schema.optional(Schema.Boolean),
|
|
21
|
+
enableDeck: Schema.optional(Schema.Boolean),
|
|
22
|
+
enableNativeRedirect: Schema.optional(Schema.Boolean),
|
|
23
|
+
enableStatusbar: Schema.optional(Schema.Boolean),
|
|
24
|
+
newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),
|
|
25
|
+
overscroll: Schema.optional(Schema.Literal(...OverscrollOptions))
|
|
26
|
+
}).pipe(Schema.mutable);
|
|
27
|
+
var PlankSizing = Schema.Record({
|
|
28
|
+
key: Schema.String,
|
|
29
|
+
value: Schema.Number
|
|
30
|
+
});
|
|
31
|
+
var DeckState = Schema.Struct({
|
|
32
|
+
/** If false, the deck has not yet left solo mode and new planks should be soloed. */
|
|
33
|
+
initialized: Schema.Boolean,
|
|
34
|
+
active: Schema.mutable(Schema.Array(Schema.String)),
|
|
35
|
+
// TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.
|
|
36
|
+
activeCompanions: Schema.optional(Schema.mutable(Schema.Record({
|
|
37
|
+
key: Schema.String,
|
|
38
|
+
value: Schema.String
|
|
39
|
+
}))),
|
|
40
|
+
inactive: Schema.mutable(Schema.Array(Schema.String)),
|
|
41
|
+
solo: Schema.optional(Schema.String),
|
|
42
|
+
fullscreen: Schema.Boolean,
|
|
43
|
+
plankSizing: Schema.mutable(PlankSizing),
|
|
44
|
+
companionFrameSizing: Schema.mutable(PlankSizing)
|
|
45
|
+
});
|
|
46
|
+
var defaultDeck = {
|
|
47
|
+
initialized: false,
|
|
48
|
+
active: [],
|
|
49
|
+
activeCompanions: {},
|
|
50
|
+
inactive: [],
|
|
51
|
+
solo: void 0,
|
|
52
|
+
fullscreen: false,
|
|
53
|
+
plankSizing: {},
|
|
54
|
+
companionFrameSizing: {}
|
|
55
|
+
};
|
|
56
|
+
var LayoutMode = Schema.Literal("deck", "solo", "solo--fullscreen");
|
|
57
|
+
var isLayoutMode = (value) => Schema.is(LayoutMode)(value);
|
|
58
|
+
var getMode = (deck) => {
|
|
59
|
+
if (deck.solo) {
|
|
60
|
+
return deck.fullscreen ? "solo--fullscreen" : "solo";
|
|
61
|
+
}
|
|
62
|
+
return "deck";
|
|
63
|
+
};
|
|
64
|
+
var DeckPluginState = Schema.Struct({
|
|
65
|
+
sidebarState: Schema.Literal("closed", "collapsed", "expanded"),
|
|
66
|
+
complementarySidebarState: Schema.Literal("closed", "collapsed", "expanded"),
|
|
67
|
+
complementarySidebarPanel: Schema.optional(Schema.String),
|
|
68
|
+
dialogOpen: Schema.Boolean,
|
|
69
|
+
dialogBlockAlign: Schema.optional(Schema.Literal("start", "center", "end")),
|
|
70
|
+
dialogType: Schema.optional(Schema.Literal("default", "alert")),
|
|
71
|
+
/** Data to be passed to the dialog Surface. */
|
|
72
|
+
dialogContent: Schema.optional(Schema.Any),
|
|
73
|
+
popoverOpen: Schema.Boolean,
|
|
74
|
+
popoverSide: Schema.optional(Schema.Literal("top", "right", "bottom", "left")),
|
|
75
|
+
popoverAnchor: Schema.optional(Schema.Any),
|
|
76
|
+
popoverAnchorId: Schema.optional(Schema.String),
|
|
77
|
+
/** Data to be passed to the popover Surface. */
|
|
78
|
+
popoverContent: Schema.optional(Schema.Any),
|
|
79
|
+
toasts: Schema.mutable(Schema.Array(LayoutAction.Toast)),
|
|
80
|
+
currentUndoId: Schema.optional(Schema.String),
|
|
81
|
+
activeDeck: Schema.String,
|
|
82
|
+
previousDeck: Schema.String,
|
|
83
|
+
decks: Schema.mutable(Schema.Record({
|
|
84
|
+
key: Schema.String,
|
|
85
|
+
value: Schema.mutable(DeckState)
|
|
86
|
+
})),
|
|
87
|
+
previousMode: Schema.mutable(Schema.Record({
|
|
88
|
+
key: Schema.String,
|
|
89
|
+
value: LayoutMode
|
|
90
|
+
})),
|
|
91
|
+
deck: Schema.mutable(DeckState),
|
|
92
|
+
/** The identifier of a component to scroll into view when it is mounted. */
|
|
93
|
+
scrollIntoView: Schema.optional(Schema.String)
|
|
94
|
+
}).pipe(Schema.mutable);
|
|
95
|
+
var DECK_ACTION = `${DECK_PLUGIN}/action`;
|
|
96
|
+
var DeckAction;
|
|
97
|
+
(function(DeckAction2) {
|
|
98
|
+
const PartAdjustmentSchema = Schema.Union(Schema.Literal("close").annotations({
|
|
99
|
+
description: "Close the plank."
|
|
100
|
+
}), Schema.Literal("companion").annotations({
|
|
101
|
+
description: "Open the companion plank."
|
|
102
|
+
}), Schema.Literal("solo").annotations({
|
|
103
|
+
description: "Solo the plank."
|
|
104
|
+
}), Schema.Literal("solo--fullscreen").annotations({
|
|
105
|
+
description: "Fullscreen the plank."
|
|
106
|
+
}), Schema.Literal("increment-start").annotations({
|
|
107
|
+
description: "Move the plank towards the start of the deck."
|
|
108
|
+
}), Schema.Literal("increment-end").annotations({
|
|
109
|
+
description: "Move the plank towards the end of the deck."
|
|
110
|
+
}));
|
|
111
|
+
DeckAction2.Adjustment = Schema.mutable(Schema.Struct({
|
|
112
|
+
id: Schema.String,
|
|
113
|
+
type: PartAdjustmentSchema
|
|
114
|
+
}));
|
|
115
|
+
class Adjust extends Schema.TaggedClass()(`${DECK_ACTION}/adjust`, {
|
|
116
|
+
input: DeckAction2.Adjustment,
|
|
117
|
+
output: Schema.Void
|
|
118
|
+
}) {
|
|
119
|
+
}
|
|
120
|
+
DeckAction2.Adjust = Adjust;
|
|
121
|
+
class UpdatePlankSize extends Schema.TaggedClass()(`${DECK_ACTION}/update-plank-size`, {
|
|
122
|
+
input: Schema.Struct({
|
|
123
|
+
id: Schema.String,
|
|
124
|
+
size: Schema.Number
|
|
125
|
+
}),
|
|
126
|
+
output: Schema.Void
|
|
127
|
+
}) {
|
|
128
|
+
}
|
|
129
|
+
DeckAction2.UpdatePlankSize = UpdatePlankSize;
|
|
130
|
+
class ChangeCompanion extends Schema.TaggedClass()(`${DECK_ACTION}/change-companion`, {
|
|
131
|
+
input: Schema.Struct({
|
|
132
|
+
primary: Schema.String,
|
|
133
|
+
companion: Schema.Union(Schema.String, Schema.Null)
|
|
134
|
+
}),
|
|
135
|
+
output: Schema.Void
|
|
136
|
+
}) {
|
|
137
|
+
}
|
|
138
|
+
DeckAction2.ChangeCompanion = ChangeCompanion;
|
|
139
|
+
})(DeckAction || (DeckAction = {}));
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
PLANK_COMPANION_TYPE,
|
|
143
|
+
DECK_COMPANION_TYPE,
|
|
144
|
+
NewPlankPositions,
|
|
145
|
+
OverscrollOptions,
|
|
146
|
+
DeckSettingsSchema,
|
|
147
|
+
PlankSizing,
|
|
148
|
+
DeckState,
|
|
149
|
+
defaultDeck,
|
|
150
|
+
isLayoutMode,
|
|
151
|
+
getMode,
|
|
152
|
+
DeckPluginState,
|
|
153
|
+
DECK_ACTION,
|
|
154
|
+
DeckAction,
|
|
155
|
+
ATTENDABLE_PATH_SEPARATOR
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=chunk-E7TOEOGO.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { LayoutAction } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { DECK_PLUGIN } from './meta';\n\nexport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nexport const PLANK_COMPANION_TYPE = 'dxos.org/plugin/deck/plank-companion';\nexport const DECK_COMPANION_TYPE = 'dxos.org/plugin/deck/deck-companion';\n\n// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.\nexport const NewPlankPositions = ['start', 'end'] as const;\nexport type NewPlankPositioning = (typeof NewPlankPositions)[number];\n\nexport const OverscrollOptions = ['none', 'centering'] as const;\nexport type Overscroll = (typeof OverscrollOptions)[number];\n\nexport type Part = 'solo' | 'deck' | 'complementary';\nexport type ResolvedPart = Part | 'solo-primary' | 'solo-companion';\n\nexport const DeckSettingsSchema = Schema.Struct({\n showHints: Schema.optional(Schema.Boolean),\n enableDeck: Schema.optional(Schema.Boolean),\n enableNativeRedirect: Schema.optional(Schema.Boolean),\n enableStatusbar: Schema.optional(Schema.Boolean),\n newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),\n overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),\n}).pipe(Schema.mutable);\nexport type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;\n\nexport const PlankSizing = Schema.Record({ key: Schema.String, value: Schema.Number });\nexport type PlankSizing = Schema.Schema.Type<typeof PlankSizing>;\n\n// State of an individual deck.\nexport const DeckState = Schema.Struct({\n /** If false, the deck has not yet left solo mode and new planks should be soloed. */\n initialized: Schema.Boolean,\n active: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.\n activeCompanions: Schema.optional(Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.String }))),\n inactive: Schema.mutable(Schema.Array(Schema.String)),\n solo: Schema.optional(Schema.String),\n fullscreen: Schema.Boolean,\n plankSizing: Schema.mutable(PlankSizing),\n companionFrameSizing: Schema.mutable(PlankSizing),\n});\nexport type DeckState = Schema.Schema.Type<typeof DeckState>;\n\nexport const defaultDeck: DeckState = {\n initialized: false,\n active: [],\n activeCompanions: {},\n inactive: [],\n solo: undefined,\n fullscreen: false,\n plankSizing: {},\n companionFrameSizing: {},\n};\n\nconst LayoutMode = Schema.Literal('deck', 'solo', 'solo--fullscreen');\nexport type LayoutMode = Schema.Schema.Type<typeof LayoutMode>;\nexport const isLayoutMode = (value: any): value is LayoutMode => Schema.is(LayoutMode)(value);\n\nexport const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode => {\n if (deck.solo) {\n return deck.fullscreen ? 'solo--fullscreen' : 'solo';\n }\n\n return 'deck';\n};\n\n// State of the deck plugin.\nexport const DeckPluginState = Schema.Struct({\n sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarPanel: Schema.optional(Schema.String),\n\n dialogOpen: Schema.Boolean,\n dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),\n dialogType: Schema.optional(Schema.Literal('default', 'alert')),\n /** Data to be passed to the dialog Surface. */\n dialogContent: Schema.optional(Schema.Any),\n\n popoverOpen: Schema.Boolean,\n popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),\n popoverAnchor: Schema.optional(Schema.Any),\n popoverAnchorId: Schema.optional(Schema.String),\n /** Data to be passed to the popover Surface. */\n popoverContent: Schema.optional(Schema.Any),\n\n toasts: Schema.mutable(Schema.Array(LayoutAction.Toast)),\n currentUndoId: Schema.optional(Schema.String),\n\n activeDeck: Schema.String,\n previousDeck: Schema.String,\n decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),\n previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),\n deck: Schema.mutable(DeckState),\n\n /** The identifier of a component to scroll into view when it is mounted. */\n scrollIntoView: Schema.optional(Schema.String),\n}).pipe(Schema.mutable);\n\nexport type DeckPluginState = Schema.Schema.Type<typeof DeckPluginState>;\n\nexport const DECK_ACTION = `${DECK_PLUGIN}/action`;\n\nexport namespace DeckAction {\n const PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n );\n export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n export const Adjustment = Schema.mutable(Schema.Struct({ id: Schema.String, type: PartAdjustmentSchema }));\n export type Adjustment = Schema.Schema.Type<typeof Adjustment>;\n\n // An atomic transaction to apply to the deck, describing which element to move to which location.\n export class Adjust extends Schema.TaggedClass<Adjust>()(`${DECK_ACTION}/adjust`, {\n input: Adjustment,\n output: Schema.Void,\n }) {}\n\n export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${DECK_ACTION}/update-plank-size`, {\n input: Schema.Struct({\n id: Schema.String,\n size: Schema.Number,\n }),\n output: Schema.Void,\n }) {}\n\n export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${DECK_ACTION}/change-companion`, {\n input: Schema.Struct({\n primary: Schema.String,\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n }) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,oBAAoB;AAK7B,SAASC,iCAAiC;AAEnC,IAAMC,uBAAuB;AAC7B,IAAMC,sBAAsB;AAG5B,IAAMC,oBAAoB;EAAC;EAAS;;AAGpC,IAAMC,oBAAoB;EAAC;EAAQ;;AAMnC,IAAMC,qBAAqBC,OAAOC,OAAO;EAC9CC,WAAWF,OAAOG,SAASH,OAAOI,OAAO;EACzCC,YAAYL,OAAOG,SAASH,OAAOI,OAAO;EAC1CE,sBAAsBN,OAAOG,SAASH,OAAOI,OAAO;EACpDG,iBAAiBP,OAAOG,SAASH,OAAOI,OAAO;EAC/CI,qBAAqBR,OAAOG,SAASH,OAAOS,QAAO,GAAIZ,iBAAAA,CAAAA;EACvDa,YAAYV,OAAOG,SAASH,OAAOS,QAAO,GAAIX,iBAAAA,CAAAA;AAChD,CAAA,EAAGa,KAAKX,OAAOY,OAAO;AAGf,IAAMC,cAAcb,OAAOc,OAAO;EAAEC,KAAKf,OAAOgB;EAAQC,OAAOjB,OAAOkB;AAAO,CAAA;AAI7E,IAAMC,YAAYnB,OAAOC,OAAO;;EAErCmB,aAAapB,OAAOI;EACpBiB,QAAQrB,OAAOY,QAAQZ,OA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AA;cAG9FC,aAAalE,OAAOY,QAAQZ,OAAOC,OAAO;IAAEkE,IAAInE,OAAOgB;IAAQoD,MAAMN;EAAqB,CAAA,CAAA;EAIhG,MAAMO,eAAerE,OAAOsE,YAAW,EAAW,GAAGX,WAAAA,WAAsB;IAChFY,OAAKV,YAAEK;IACPM,QAAQxE,OAAOyE;EACjB,CAAA,EAAA;EAAI;cAHSJ,SAAAA;EAKN,MAAMK,wBAAwB1E,OAAOsE,YAAW,EAAoB,GAAGX,WAAAA,sBAAiC;IAC7GY,OAAOvE,OAAOC,OAAO;MACnBkE,IAAInE,OAAOgB;MACX2D,MAAM3E,OAAOkB;IACf,CAAA;IACAsD,QAAQxE,OAAOyE;EACjB,CAAA,EAAA;EAAI;cANSC,kBAAAA;EAQN,MAAME,wBAAwB5E,OAAOsE,YAAW,EAAoB,GAAGX,WAAAA,qBAAgC;IAC5GY,OAAOvE,OAAOC,OAAO;MACnB4E,SAAS7E,OAAOgB;MAChB8D,WAAW9E,OAAO+D,MAAM/D,OAAOgB,QAAQhB,OAAO+E,IAAI;IACpD,CAAA;IACAP,QAAQxE,OAAOyE;EACjB,CAAA,EAAA;EAAI;cANSG,kBAAAA;AAOf,GAlCiBf,eAAAA,aAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["Schema", "LayoutAction", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "DECK_COMPANION_TYPE", "NewPlankPositions", "OverscrollOptions", "DeckSettingsSchema", "Schema", "Struct", "showHints", "optional", "Boolean", "enableDeck", "enableNativeRedirect", "enableStatusbar", "newPlankPositioning", "Literal", "overscroll", "pipe", "mutable", "PlankSizing", "Record", "key", "String", "value", "Number", "DeckState", "initialized", "active", "Array", "activeCompanions", "inactive", "solo", "fullscreen", "plankSizing", "companionFrameSizing", "defaultDeck", "undefined", "LayoutMode", "isLayoutMode", "is", "getMode", "deck", "DeckPluginState", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "dialogOpen", "dialogBlockAlign", "dialogType", "dialogContent", "Any", "popoverOpen", "popoverSide", "popoverAnchor", "popoverAnchorId", "popoverContent", "toasts", "LayoutAction", "Toast", "currentUndoId", "activeDeck", "previousDeck", "decks", "previousMode", "scrollIntoView", "DECK_ACTION", "DECK_PLUGIN", "DeckAction", "PartAdjustmentSchema", "Union", "annotations", "description", "Adjustment", "id", "type", "Adjust", "TaggedClass", "input", "output", "Void", "UpdatePlankSize", "size", "ChangeCompanion", "primary", "companion", "Null"]
|
|
7
|
+
}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { lazy } from "@dxos/app-framework";
|
|
3
3
|
var AppGraphBuilder = lazy(() => import("./app-graph-builder-VYZ4IWI3.mjs"));
|
|
4
4
|
var CheckAppScheme = lazy(() => import("./check-app-scheme-O7JPE4TM.mjs"));
|
|
5
|
-
var DeckSettings = lazy(() => import("./settings-
|
|
6
|
-
var DeckState = lazy(() => import("./state-
|
|
7
|
-
var LayoutIntentResolver = lazy(() => import("./intent-resolver-
|
|
8
|
-
var ReactRoot = lazy(() => import("./react-root-
|
|
9
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
10
|
-
var Tools = lazy(() => import("./tools-
|
|
11
|
-
var UrlHandler = lazy(() => import("./url-handler-
|
|
5
|
+
var DeckSettings = lazy(() => import("./settings-C7LX2GXF.mjs"));
|
|
6
|
+
var DeckState = lazy(() => import("./state-AX74YEJD.mjs"));
|
|
7
|
+
var LayoutIntentResolver = lazy(() => import("./intent-resolver-NO6L67KF.mjs"));
|
|
8
|
+
var ReactRoot = lazy(() => import("./react-root-SK3KDPHZ.mjs"));
|
|
9
|
+
var ReactSurface = lazy(() => import("./react-surface-LSSPY2BU.mjs"));
|
|
10
|
+
var Tools = lazy(() => import("./tools-7W7KZRAX.mjs"));
|
|
11
|
+
var UrlHandler = lazy(() => import("./url-handler-AF5SYROZ.mjs"));
|
|
12
12
|
|
|
13
13
|
export {
|
|
14
14
|
AppGraphBuilder,
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
Tools,
|
|
22
22
|
UrlHandler
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-HWEH5OJ7.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLANK_COMPANION_TYPE
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E7TOEOGO.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DECK_PLUGIN
|
|
6
6
|
} from "./chunk-NSATFAEE.mjs";
|
|
@@ -115,4 +115,4 @@ export {
|
|
|
115
115
|
useHoistStatusbar,
|
|
116
116
|
useCompanions
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-PGSJT5PG.mjs.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
useBreakpoints,
|
|
8
8
|
useCompanions,
|
|
9
9
|
useHoistStatusbar
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PGSJT5PG.mjs";
|
|
11
11
|
import {
|
|
12
12
|
DeckCapabilities
|
|
13
13
|
} from "./chunk-XMCG42ID.mjs";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
OverscrollOptions,
|
|
20
20
|
PLANK_COMPANION_TYPE,
|
|
21
21
|
getMode
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-E7TOEOGO.mjs";
|
|
23
23
|
import {
|
|
24
24
|
DECK_PLUGIN
|
|
25
25
|
} from "./chunk-NSATFAEE.mjs";
|
|
@@ -33,7 +33,7 @@ import { mx as mx4 } from "@dxos/react-ui-theme";
|
|
|
33
33
|
// packages/plugins/plugin-deck/src/components/Sidebar/ComplementarySidebar.tsx
|
|
34
34
|
import React7, { Fragment as Fragment3, useCallback as useCallback4, useEffect as useEffect4, useMemo as useMemo3, useState as useState2 } from "react";
|
|
35
35
|
import { LayoutAction as LayoutAction3, Surface as Surface3, createIntent as createIntent4, useAppGraph as useAppGraph3, useCapability as useCapability3, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
|
|
36
|
-
import { Main, useTranslation as useTranslation5, toLocalizedString as toLocalizedString2, IconButton as
|
|
36
|
+
import { Main, useTranslation as useTranslation5, toLocalizedString as toLocalizedString2, IconButton as IconButton4 } from "@dxos/react-ui";
|
|
37
37
|
import { Tabs } from "@dxos/react-ui-tabs";
|
|
38
38
|
import { byPosition } from "@dxos/util";
|
|
39
39
|
|
|
@@ -71,6 +71,7 @@ var ToggleComplementarySidebarButton = ({ inR0, classNames }) => {
|
|
|
71
71
|
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
72
72
|
const { t } = useTranslation(DECK_PLUGIN);
|
|
73
73
|
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
74
|
+
noTooltip: true,
|
|
74
75
|
iconOnly: true,
|
|
75
76
|
onClick: () => layoutContext.complementarySidebarState = layoutContext.complementarySidebarState === "expanded" ? "collapsed" : "expanded",
|
|
76
77
|
variant: "ghost",
|
|
@@ -102,7 +103,7 @@ import { descriptionMessage, mx as mx2 } from "@dxos/react-ui-theme";
|
|
|
102
103
|
// packages/plugins/plugin-deck/src/components/Plank/PlankHeading.tsx
|
|
103
104
|
import React3, { Fragment, memo, useCallback as useCallback2, useEffect, useMemo } from "react";
|
|
104
105
|
import { createIntent as createIntent2, LayoutAction, Surface, useAppGraph, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
|
|
105
|
-
import { Icon
|
|
106
|
+
import { Icon, IconButton as IconButton3, Popover, toLocalizedString, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
106
107
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
107
108
|
import { TextTooltip } from "@dxos/react-ui-text-tooltip";
|
|
108
109
|
|
|
@@ -110,31 +111,27 @@ import { TextTooltip } from "@dxos/react-ui-text-tooltip";
|
|
|
110
111
|
import React2, { forwardRef, useCallback } from "react";
|
|
111
112
|
import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
112
113
|
import { invariant } from "@dxos/invariant";
|
|
113
|
-
import {
|
|
114
|
+
import { ButtonGroup, IconButton as IconButton2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
114
115
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-deck/src/components/Plank/PlankControls.tsx";
|
|
115
116
|
var PlankControl = ({ icon, label: label3, ...props }) => {
|
|
116
|
-
return /* @__PURE__ */ React2.createElement(
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
return /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
118
|
+
iconOnly: true,
|
|
119
|
+
label: label3,
|
|
120
|
+
icon,
|
|
121
|
+
size: 5,
|
|
119
122
|
variant: "ghost",
|
|
123
|
+
tooltipSide: "bottom",
|
|
120
124
|
...props
|
|
121
|
-
}
|
|
122
|
-
className: "sr-only"
|
|
123
|
-
}, label3), /* @__PURE__ */ React2.createElement(Icon, {
|
|
124
|
-
icon,
|
|
125
|
-
size: 5
|
|
126
|
-
}))), /* @__PURE__ */ React2.createElement(Tooltip.Portal, null, /* @__PURE__ */ React2.createElement(Tooltip.Content, {
|
|
127
|
-
side: "bottom"
|
|
128
|
-
}, label3)));
|
|
125
|
+
});
|
|
129
126
|
};
|
|
130
|
-
var plankControlSpacing = "pli-2
|
|
127
|
+
var plankControlSpacing = "pli-2";
|
|
131
128
|
var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedRef) => {
|
|
132
129
|
const { t } = useTranslation2(DECK_PLUGIN);
|
|
133
130
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
134
131
|
const handleCloseCompanion = useCallback(() => {
|
|
135
132
|
invariant(primary, void 0, {
|
|
136
133
|
F: __dxlog_file,
|
|
137
|
-
L:
|
|
134
|
+
L: 48,
|
|
138
135
|
S: void 0,
|
|
139
136
|
A: [
|
|
140
137
|
"primary",
|
|
@@ -271,10 +268,12 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
271
268
|
]);
|
|
272
269
|
const handleAction = useCallback2((action) => {
|
|
273
270
|
typeof action.data === "function" && action.data?.({
|
|
274
|
-
|
|
271
|
+
parent: node,
|
|
275
272
|
caller: DECK_PLUGIN
|
|
276
273
|
});
|
|
277
|
-
}, [
|
|
274
|
+
}, [
|
|
275
|
+
node
|
|
276
|
+
]);
|
|
278
277
|
const handlePlankAction = useCallback2((eventType) => {
|
|
279
278
|
if (eventType.startsWith("solo")) {
|
|
280
279
|
return dispatch(createIntent2(DeckAction.Adjust, {
|
|
@@ -334,7 +333,7 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
334
333
|
}, companions && isCompanionNode ? /* @__PURE__ */ React3.createElement("div", {
|
|
335
334
|
role: "none",
|
|
336
335
|
className: "flex-1 min-is-0 overflow-x-auto scrollbar-thin flex gap-1"
|
|
337
|
-
}, companions.map(({ id: id2, properties: { icon: icon2, label: label4 } }) => /* @__PURE__ */ React3.createElement(
|
|
336
|
+
}, companions.map(({ id: id2, properties: { icon: icon2, label: label4 } }) => /* @__PURE__ */ React3.createElement(IconButton3, {
|
|
338
337
|
key: id2,
|
|
339
338
|
"data-id": id2,
|
|
340
339
|
icon: icon2,
|
|
@@ -357,7 +356,7 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
357
356
|
}
|
|
358
357
|
})) : /* @__PURE__ */ React3.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React3.createElement("span", {
|
|
359
358
|
className: "sr-only"
|
|
360
|
-
}, label3), /* @__PURE__ */ React3.createElement(
|
|
359
|
+
}, label3), /* @__PURE__ */ React3.createElement(Icon, {
|
|
361
360
|
icon,
|
|
362
361
|
size: 5
|
|
363
362
|
}))), /* @__PURE__ */ React3.createElement(TextTooltip, {
|
|
@@ -701,7 +700,7 @@ var ComplementarySidebar = ({ current }) => {
|
|
|
701
700
|
key: getCompanionId(companion.id),
|
|
702
701
|
value: getCompanionId(companion.id),
|
|
703
702
|
asChild: true
|
|
704
|
-
}, /* @__PURE__ */ React7.createElement(
|
|
703
|
+
}, /* @__PURE__ */ React7.createElement(IconButton4, {
|
|
705
704
|
label: toLocalizedString2(companion.properties.label, t),
|
|
706
705
|
icon: companion.properties.icon,
|
|
707
706
|
size: 5,
|
|
@@ -1017,7 +1016,7 @@ var StatusBar = ({ showHints }) => {
|
|
|
1017
1016
|
|
|
1018
1017
|
// packages/plugins/plugin-deck/src/components/DeckLayout/Toast.tsx
|
|
1019
1018
|
import React15 from "react";
|
|
1020
|
-
import { Button
|
|
1019
|
+
import { Button, Icon as Icon2, Toast as NaturalToast, toLocalizedString as toLocalizedString3, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
1021
1020
|
var Toast = ({ id, title, description, icon, duration, actionLabel, actionAlt, closeLabel, onAction, onOpenChange }) => {
|
|
1022
1021
|
const { t } = useTranslation7(DECK_PLUGIN);
|
|
1023
1022
|
return /* @__PURE__ */ React15.createElement(NaturalToast.Root, {
|
|
@@ -1027,20 +1026,20 @@ var Toast = ({ id, title, description, icon, duration, actionLabel, actionAlt, c
|
|
|
1027
1026
|
onOpenChange
|
|
1028
1027
|
}, /* @__PURE__ */ React15.createElement(NaturalToast.Body, null, /* @__PURE__ */ React15.createElement(NaturalToast.Title, {
|
|
1029
1028
|
classNames: "items-center"
|
|
1030
|
-
}, icon && /* @__PURE__ */ React15.createElement(
|
|
1029
|
+
}, icon && /* @__PURE__ */ React15.createElement(Icon2, {
|
|
1031
1030
|
icon,
|
|
1032
1031
|
size: 5,
|
|
1033
1032
|
classNames: "inline mr-1"
|
|
1034
1033
|
}), title && /* @__PURE__ */ React15.createElement("span", null, toLocalizedString3(title, t))), description && /* @__PURE__ */ React15.createElement(NaturalToast.Description, null, description && toLocalizedString3(description, t))), /* @__PURE__ */ React15.createElement(NaturalToast.Actions, null, onAction && actionAlt && actionLabel && /* @__PURE__ */ React15.createElement(NaturalToast.Action, {
|
|
1035
1034
|
altText: toLocalizedString3(actionAlt, t),
|
|
1036
1035
|
asChild: true
|
|
1037
|
-
}, /* @__PURE__ */ React15.createElement(
|
|
1036
|
+
}, /* @__PURE__ */ React15.createElement(Button, {
|
|
1038
1037
|
"data-testid": "toast.action",
|
|
1039
1038
|
variant: "primary",
|
|
1040
1039
|
onClick: () => onAction?.()
|
|
1041
1040
|
}, toLocalizedString3(actionLabel, t))), closeLabel && /* @__PURE__ */ React15.createElement(NaturalToast.Close, {
|
|
1042
1041
|
asChild: true
|
|
1043
|
-
}, /* @__PURE__ */ React15.createElement(
|
|
1042
|
+
}, /* @__PURE__ */ React15.createElement(Button, {
|
|
1044
1043
|
"data-testid": "toast.close"
|
|
1045
1044
|
}, toLocalizedString3(closeLabel, t)))));
|
|
1046
1045
|
};
|
|
@@ -1331,4 +1330,4 @@ export {
|
|
|
1331
1330
|
DeckLayout,
|
|
1332
1331
|
DeckSettings
|
|
1333
1332
|
};
|
|
1334
|
-
//# sourceMappingURL=chunk-
|
|
1333
|
+
//# sourceMappingURL=chunk-ZAL26IIZ.mjs.map
|