@dxos/app-framework 0.7.5-labs.e27f9b9 → 0.7.5-main.2567c87
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-G3HBVVT5.mjs → chunk-GNLU3GAU.mjs} +819 -627
- package/dist/lib/browser/chunk-GNLU3GAU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +74 -57
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +3 -10
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/chunk-FBA4BB3J.cjs +1639 -0
- package/dist/lib/node/chunk-FBA4BB3J.cjs.map +7 -0
- package/dist/lib/node/index.cjs +118 -106
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +8 -15
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node-esm/{chunk-ZTB4TA6Q.mjs → chunk-KPMTPXQI.mjs} +819 -627
- package/dist/lib/node-esm/chunk-KPMTPXQI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +74 -57
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +3 -10
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/common/capabilities.d.ts +110 -66
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/events.d.ts +1 -8
- package/dist/types/src/common/events.d.ts.map +1 -1
- package/dist/types/src/common/file.d.ts +1 -1
- package/dist/types/src/common/file.d.ts.map +1 -1
- package/dist/types/src/common/graph.d.ts +2 -2
- package/dist/types/src/common/graph.d.ts.map +1 -1
- package/dist/types/src/common/index.d.ts +1 -0
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +121 -204
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/common/navigation.d.ts +241 -0
- package/dist/types/src/common/navigation.d.ts.map +1 -0
- package/dist/types/src/common/surface.d.ts +3 -3
- package/dist/types/src/common/surface.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +7 -7
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/core/capabilities.d.ts +2 -6
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/manager.d.ts +9 -2
- package/dist/types/src/core/manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +2 -5
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/generator/generator.d.ts +0 -2
- package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
- package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/schema.d.ts +1 -1
- package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
- package/dist/types/src/{react → plugin-intent}/IntentContext.d.ts +1 -1
- package/dist/types/src/plugin-intent/IntentContext.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/index.d.ts +1 -0
- package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +20 -27
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent.d.ts +3 -3
- package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/actions.d.ts +1 -11
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
- package/dist/types/src/react/Surface.d.ts.map +1 -1
- package/dist/types/src/react/index.d.ts +0 -2
- package/dist/types/src/react/index.d.ts.map +1 -1
- package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/package.json +21 -28
- package/project.json +3 -3
- package/src/App.tsx +14 -15
- package/src/common/capabilities.ts +11 -26
- package/src/common/events.ts +1 -10
- package/src/common/file.ts +1 -1
- package/src/common/graph.ts +2 -2
- package/src/common/index.ts +1 -0
- package/src/common/layout.ts +126 -194
- package/src/common/navigation.ts +199 -0
- package/src/common/surface.ts +2 -2
- package/src/common/translations.ts +8 -7
- package/src/core/capabilities.ts +7 -16
- package/src/core/manager.test.ts +73 -22
- package/src/core/manager.ts +91 -105
- package/src/core/plugin.ts +3 -6
- package/src/playground/debug/plugin.ts +1 -1
- package/src/playground/generator/Toolbar.tsx +11 -11
- package/src/playground/generator/generator.ts +0 -25
- package/src/playground/generator/plugin.ts +1 -6
- package/src/playground/layout/plugin.ts +1 -1
- package/src/playground/logger/Toolbar.tsx +1 -2
- package/src/playground/logger/plugin.ts +3 -6
- package/src/playground/logger/schema.ts +1 -1
- package/src/{react → plugin-intent}/IntentContext.tsx +2 -2
- package/src/plugin-intent/IntentPlugin.tsx +43 -3
- package/src/plugin-intent/actions.ts +1 -1
- package/src/plugin-intent/errors.ts +1 -1
- package/src/plugin-intent/index.ts +1 -0
- package/src/plugin-intent/intent-dispatcher.test.ts +29 -48
- package/src/plugin-intent/intent-dispatcher.ts +41 -76
- package/src/plugin-intent/intent.ts +5 -5
- package/src/plugin-settings/SettingsPlugin.ts +13 -19
- package/src/plugin-settings/actions.ts +1 -11
- package/src/react/Surface.tsx +8 -11
- package/src/react/index.ts +0 -2
- package/src/react/useCapabilities.ts +0 -1
- package/src/testing/withPluginManager.tsx +3 -11
- package/tsconfig.json +3 -6
- package/dist/lib/browser/app-graph-builder-MOLT4EHG.mjs +0 -137
- package/dist/lib/browser/app-graph-builder-MOLT4EHG.mjs.map +0 -7
- package/dist/lib/browser/chunk-G3HBVVT5.mjs.map +0 -7
- package/dist/lib/browser/chunk-LDJ3T4V3.mjs +0 -32
- package/dist/lib/browser/chunk-LDJ3T4V3.mjs.map +0 -7
- package/dist/lib/browser/chunk-TGOF2WQZ.mjs +0 -285
- package/dist/lib/browser/chunk-TGOF2WQZ.mjs.map +0 -7
- package/dist/lib/browser/intent-dispatcher-LJKNIGAM.mjs +0 -11
- package/dist/lib/browser/intent-dispatcher-LJKNIGAM.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-Z724VAMC.mjs +0 -38
- package/dist/lib/browser/intent-resolver-Z724VAMC.mjs.map +0 -7
- package/dist/lib/browser/store-NWCY7LAP.mjs +0 -19
- package/dist/lib/browser/store-NWCY7LAP.mjs.map +0 -7
- package/dist/lib/browser/worker.mjs +0 -77
- package/dist/lib/browser/worker.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-G7SRXDFD.cjs +0 -146
- package/dist/lib/node/app-graph-builder-G7SRXDFD.cjs.map +0 -7
- package/dist/lib/node/chunk-55KIQ6YK.cjs +0 -1437
- package/dist/lib/node/chunk-55KIQ6YK.cjs.map +0 -7
- package/dist/lib/node/chunk-5GABBW2Q.cjs +0 -308
- package/dist/lib/node/chunk-5GABBW2Q.cjs.map +0 -7
- package/dist/lib/node/chunk-QLVQ6PND.cjs +0 -58
- package/dist/lib/node/chunk-QLVQ6PND.cjs.map +0 -7
- package/dist/lib/node/intent-dispatcher-CGUK3BCJ.cjs +0 -32
- package/dist/lib/node/intent-dispatcher-CGUK3BCJ.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-7GNKPRWT.cjs +0 -45
- package/dist/lib/node/intent-resolver-7GNKPRWT.cjs.map +0 -7
- package/dist/lib/node/store-WMJSEQPC.cjs +0 -34
- package/dist/lib/node/store-WMJSEQPC.cjs.map +0 -7
- package/dist/lib/node/worker.cjs +0 -99
- package/dist/lib/node/worker.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-MKLYH3NE.mjs +0 -138
- package/dist/lib/node-esm/app-graph-builder-MKLYH3NE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-47FG42II.mjs +0 -286
- package/dist/lib/node-esm/chunk-47FG42II.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CNJYZNSL.mjs +0 -34
- package/dist/lib/node-esm/chunk-CNJYZNSL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZTB4TA6Q.mjs.map +0 -7
- package/dist/lib/node-esm/intent-dispatcher-RZAWA4XD.mjs +0 -12
- package/dist/lib/node-esm/intent-dispatcher-RZAWA4XD.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-UIU37CKJ.mjs +0 -39
- package/dist/lib/node-esm/intent-resolver-UIU37CKJ.mjs.map +0 -7
- package/dist/lib/node-esm/store-YUWINFBN.mjs +0 -20
- package/dist/lib/node-esm/store-YUWINFBN.mjs.map +0 -7
- package/dist/lib/node-esm/worker.mjs +0 -78
- package/dist/lib/node-esm/worker.mjs.map +0 -7
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +0 -197
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/intent-resolver.d.ts +0 -4
- package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/store.d.ts +0 -5
- package/dist/types/src/plugin-settings/store.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/translations.d.ts +0 -11
- package/dist/types/src/plugin-settings/translations.d.ts.map +0 -1
- package/dist/types/src/react/IntentContext.d.ts.map +0 -1
- package/dist/types/src/react/Surface.stories.d.ts +0 -16
- package/dist/types/src/react/Surface.stories.d.ts.map +0 -1
- package/dist/types/src/react/common.d.ts +0 -12
- package/dist/types/src/react/common.d.ts.map +0 -1
- package/dist/types/src/react/useIntentResolver.d.ts +0 -3
- package/dist/types/src/react/useIntentResolver.d.ts.map +0 -1
- package/dist/types/src/worker.d.ts +0 -4
- package/dist/types/src/worker.d.ts.map +0 -1
- package/src/plugin-settings/app-graph-builder.ts +0 -122
- package/src/plugin-settings/intent-resolver.ts +0 -28
- package/src/plugin-settings/store.ts +0 -20
- package/src/plugin-settings/translations.ts +0 -17
- package/src/react/Surface.stories.tsx +0 -96
- package/src/react/common.ts +0 -12
- package/src/react/useIntentResolver.ts +0 -22
- package/src/worker.ts +0 -11
|
@@ -1,105 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
export declare const Toast: S.Struct<{
|
|
3
|
+
id: typeof S.String;
|
|
4
|
+
title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
5
|
+
ns: typeof S.String;
|
|
6
|
+
count: S.optional<typeof S.Number>;
|
|
7
|
+
}>>]>>]>>;
|
|
8
|
+
description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
9
|
+
ns: typeof S.String;
|
|
10
|
+
count: S.optional<typeof S.Number>;
|
|
11
|
+
}>>]>>]>>;
|
|
12
|
+
icon: S.optional<typeof S.String>;
|
|
13
|
+
duration: S.optional<typeof S.Number>;
|
|
14
|
+
closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
15
|
+
ns: typeof S.String;
|
|
16
|
+
count: S.optional<typeof S.Number>;
|
|
17
|
+
}>>]>>]>>;
|
|
18
|
+
actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
19
|
+
ns: typeof S.String;
|
|
20
|
+
count: S.optional<typeof S.Number>;
|
|
21
|
+
}>>]>>]>>;
|
|
22
|
+
actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
23
|
+
ns: typeof S.String;
|
|
24
|
+
count: S.optional<typeof S.Number>;
|
|
25
|
+
}>>]>>]>>;
|
|
26
|
+
onAction: S.optional<typeof S.Any>;
|
|
27
|
+
}>;
|
|
28
|
+
export type Toast = S.Schema.Type<typeof Toast>;
|
|
4
29
|
/**
|
|
5
|
-
*
|
|
30
|
+
* Basic state provided by a layout plugin.
|
|
31
|
+
*
|
|
32
|
+
* Layout provides the state of global UI landmarks, such as the sidebar, dialog, and popover.
|
|
33
|
+
* Generally only one dialog or popover should be open at a time, a layout plugin should manage this.
|
|
34
|
+
* For other landmarks, such as toasts, rendering them in the layout prevents them from unmounting when navigating.
|
|
6
35
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
subject: S.optional<S.SchemaClass<any, any, never>>;
|
|
15
|
-
options: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
16
|
-
}>;
|
|
17
|
-
output: typeof S.Void;
|
|
18
|
-
}>;
|
|
36
|
+
declare const LayoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
|
|
37
|
+
export declare const isLayoutMode: (value: any) => value is LayoutMode;
|
|
38
|
+
export type LayoutMode = S.Schema.Type<typeof LayoutMode>;
|
|
39
|
+
export declare const Layout: S.mutable<S.Struct<{
|
|
40
|
+
layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
|
|
41
|
+
sidebarOpen: typeof S.Boolean;
|
|
42
|
+
complementarySidebarOpen: typeof S.Boolean;
|
|
19
43
|
/**
|
|
20
|
-
*
|
|
44
|
+
* @deprecated Data to be passed to the complementary sidebar Surface.
|
|
21
45
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export class SetLayoutMode extends SetLayoutMode_base {
|
|
39
|
-
}
|
|
40
|
-
const UpdateSidebar_base: S.TaggedClass<UpdateSidebar, "dxos.org/plugin/layout/action/update-layout", {
|
|
41
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
42
|
-
} & {
|
|
43
|
-
input: S.Struct<{
|
|
44
|
-
part: S.Literal<["sidebar"]>;
|
|
45
|
-
subject: S.optional<S.SchemaClass<string, string, never>>;
|
|
46
|
-
options: S.optional<S.Struct<{
|
|
47
|
-
state: S.Literal<["closed", "collapsed", "expanded"]>;
|
|
48
|
-
}>>;
|
|
49
|
-
}>;
|
|
50
|
-
output: typeof S.Void;
|
|
51
|
-
}>;
|
|
52
|
-
export class UpdateSidebar extends UpdateSidebar_base {
|
|
53
|
-
}
|
|
54
|
-
const UpdateComplementary_base: S.TaggedClass<UpdateComplementary, "dxos.org/plugin/layout/action/update-layout", {
|
|
55
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
56
|
-
} & {
|
|
57
|
-
input: S.Struct<{
|
|
58
|
-
part: S.Literal<["complementary"]>;
|
|
59
|
-
subject: S.optional<S.SchemaClass<string, string, never>>;
|
|
60
|
-
options: S.optional<S.Struct<{
|
|
61
|
-
state: S.Literal<["closed", "collapsed", "expanded"]>;
|
|
62
|
-
}>>;
|
|
63
|
-
}>;
|
|
64
|
-
output: typeof S.Void;
|
|
65
|
-
}>;
|
|
66
|
-
export class UpdateComplementary extends UpdateComplementary_base {
|
|
67
|
-
}
|
|
68
|
-
const UpdateDialog_base: S.TaggedClass<UpdateDialog, "dxos.org/plugin/layout/action/update-layout", {
|
|
69
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
70
|
-
} & {
|
|
71
|
-
input: S.Struct<{
|
|
72
|
-
part: S.Literal<["dialog"]>;
|
|
73
|
-
subject: S.optional<S.SchemaClass<string, string, never>>;
|
|
74
|
-
options: S.Struct<{
|
|
75
|
-
state: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
76
|
-
blockAlign: S.optional<S.Literal<["start", "center"]>>;
|
|
77
|
-
type: S.optional<S.Literal<["default", "alert"]>>;
|
|
78
|
-
props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
79
|
-
}>;
|
|
80
|
-
}>;
|
|
81
|
-
output: typeof S.Void;
|
|
82
|
-
}>;
|
|
83
|
-
export class UpdateDialog extends UpdateDialog_base {
|
|
84
|
-
}
|
|
85
|
-
const UpdatePopover_base: S.TaggedClass<UpdatePopover, "dxos.org/plugin/layout/action/update-layout", {
|
|
86
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
87
|
-
} & {
|
|
88
|
-
input: S.Struct<{
|
|
89
|
-
part: S.Literal<["popover"]>;
|
|
90
|
-
subject: S.optional<S.SchemaClass<string, string, never>>;
|
|
91
|
-
options: S.Struct<{
|
|
92
|
-
anchorId: S.SchemaClass<string, string, never>;
|
|
93
|
-
state: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
94
|
-
props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
95
|
-
}>;
|
|
96
|
-
}>;
|
|
97
|
-
output: typeof S.Void;
|
|
98
|
-
}>;
|
|
99
|
-
export class UpdatePopover extends UpdatePopover_base {
|
|
100
|
-
}
|
|
101
|
-
export const Toast: S.Struct<{
|
|
102
|
-
id: S.SchemaClass<string, string, never>;
|
|
46
|
+
complementarySidebarContent: S.optional<typeof S.Any>;
|
|
47
|
+
dialogOpen: typeof S.Boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Data to be passed to the dialog Surface.
|
|
50
|
+
*/
|
|
51
|
+
dialogContent: S.optional<typeof S.Any>;
|
|
52
|
+
dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
|
|
53
|
+
dialogType: S.optional<S.Literal<["default", "alert"]>>;
|
|
54
|
+
popoverOpen: typeof S.Boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Data to be passed to the popover Surface.
|
|
57
|
+
*/
|
|
58
|
+
popoverContent: S.optional<typeof S.Any>;
|
|
59
|
+
popoverAnchorId: S.optional<typeof S.String>;
|
|
60
|
+
toasts: S.mutable<S.Array$<S.Struct<{
|
|
61
|
+
id: typeof S.String;
|
|
103
62
|
title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
104
63
|
ns: typeof S.String;
|
|
105
64
|
count: S.optional<typeof S.Number>;
|
|
@@ -108,8 +67,8 @@ export declare namespace LayoutAction {
|
|
|
108
67
|
ns: typeof S.String;
|
|
109
68
|
count: S.optional<typeof S.Number>;
|
|
110
69
|
}>>]>>]>>;
|
|
111
|
-
icon: S.optional<S.
|
|
112
|
-
duration: S.optional<S.
|
|
70
|
+
icon: S.optional<typeof S.String>;
|
|
71
|
+
duration: S.optional<typeof S.Number>;
|
|
113
72
|
closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
114
73
|
ns: typeof S.String;
|
|
115
74
|
count: S.optional<typeof S.Number>;
|
|
@@ -122,127 +81,85 @@ export declare namespace LayoutAction {
|
|
|
122
81
|
ns: typeof S.String;
|
|
123
82
|
count: S.optional<typeof S.Number>;
|
|
124
83
|
}>>]>>]>>;
|
|
125
|
-
onAction: S.optional<S.
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
142
|
-
ns: typeof S.String;
|
|
143
|
-
count: S.optional<typeof S.Number>;
|
|
144
|
-
}>>]>>]>>;
|
|
145
|
-
icon: S.optional<S.SchemaClass<string, string, never>>;
|
|
146
|
-
duration: S.optional<S.SchemaClass<number, number, never>>;
|
|
147
|
-
closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
148
|
-
ns: typeof S.String;
|
|
149
|
-
count: S.optional<typeof S.Number>;
|
|
150
|
-
}>>]>>]>>;
|
|
151
|
-
actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
152
|
-
ns: typeof S.String;
|
|
153
|
-
count: S.optional<typeof S.Number>;
|
|
154
|
-
}>>]>>]>>;
|
|
155
|
-
actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
156
|
-
ns: typeof S.String;
|
|
157
|
-
count: S.optional<typeof S.Number>;
|
|
158
|
-
}>>]>>]>>;
|
|
159
|
-
onAction: S.optional<S.SchemaClass<any, any, never>>;
|
|
160
|
-
}>;
|
|
161
|
-
}>;
|
|
162
|
-
output: typeof S.Void;
|
|
163
|
-
}>;
|
|
164
|
-
export class AddToast extends AddToast_base {
|
|
165
|
-
}
|
|
166
|
-
const SwitchWorkspace_base: S.TaggedClass<SwitchWorkspace, "dxos.org/plugin/layout/action/update-layout", {
|
|
167
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
168
|
-
} & {
|
|
169
|
-
input: S.Struct<{
|
|
170
|
-
part: S.Literal<["workspace"]>;
|
|
171
|
-
subject: S.SchemaClass<string, string, never>;
|
|
172
|
-
}>;
|
|
173
|
-
output: typeof S.Void;
|
|
174
|
-
}>;
|
|
175
|
-
export class SwitchWorkspace extends SwitchWorkspace_base {
|
|
176
|
-
}
|
|
177
|
-
const Open_base: S.TaggedClass<Open, "dxos.org/plugin/layout/action/update-layout", {
|
|
178
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
179
|
-
} & {
|
|
180
|
-
input: S.Struct<{
|
|
181
|
-
part: S.Literal<["main"]>;
|
|
182
|
-
subject: S.Array$<S.SchemaClass<string, string, never>>;
|
|
183
|
-
options: S.optional<S.Struct<{
|
|
184
|
-
state: S.optional<S.Literal<[true]>>;
|
|
185
|
-
key: S.optional<S.SchemaClass<string, string, never>>;
|
|
186
|
-
scrollIntoView: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
187
|
-
pivotId: S.optional<S.SchemaClass<string, string, never>>;
|
|
188
|
-
positioning: S.optional<S.Union<[S.Literal<["start"]>, S.Literal<["end"]>]>>;
|
|
189
|
-
}>>;
|
|
190
|
-
}>;
|
|
191
|
-
output: typeof S.Void;
|
|
192
|
-
}>;
|
|
193
|
-
export class Open extends Open_base {
|
|
194
|
-
}
|
|
195
|
-
const Set_base: S.TaggedClass<Set, "dxos.org/plugin/layout/action/update-layout", {
|
|
196
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
84
|
+
onAction: S.optional<typeof S.Any>;
|
|
85
|
+
}>>>;
|
|
86
|
+
/**
|
|
87
|
+
* The identifier of a component to scroll into view when it is mounted.
|
|
88
|
+
*/
|
|
89
|
+
scrollIntoView: S.optional<typeof S.String>;
|
|
90
|
+
}>>;
|
|
91
|
+
export type Layout = S.Schema.Type<typeof Layout>;
|
|
92
|
+
export declare const LAYOUT_PLUGIN = "dxos.org/plugin/layout";
|
|
93
|
+
export declare const LAYOUT_ACTION = "dxos.org/plugin/layout/action";
|
|
94
|
+
/**
|
|
95
|
+
* Expected payload for layout actions.
|
|
96
|
+
*/
|
|
97
|
+
export declare namespace LayoutAction {
|
|
98
|
+
const SetLayout_base: S.TaggedClass<SetLayout, "dxos.org/plugin/layout/action/set-layout", {
|
|
99
|
+
readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout">;
|
|
197
100
|
} & {
|
|
198
101
|
input: S.Struct<{
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Element to set the state of.
|
|
104
|
+
*/
|
|
105
|
+
element: S.Literal<["fullscreen", "sidebar", "complementary", "dialog", "popover", "toast"]>;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the element is on or off.
|
|
108
|
+
*
|
|
109
|
+
* If omitted, the element's state will be toggled or set based on other provided data.
|
|
110
|
+
* For example, if `component` is provided, the state will be set to `true`.
|
|
111
|
+
*/
|
|
112
|
+
state: S.optional<typeof S.Boolean>;
|
|
113
|
+
/**
|
|
114
|
+
* Component to render in the dialog or popover.
|
|
115
|
+
*/
|
|
116
|
+
component: S.optional<typeof S.String>;
|
|
117
|
+
/**
|
|
118
|
+
* Data to be passed to the dialog or popover Surface.
|
|
119
|
+
*/
|
|
120
|
+
subject: S.optional<typeof S.Any>;
|
|
121
|
+
/**
|
|
122
|
+
* Anchor ID for the popover.
|
|
123
|
+
*/
|
|
124
|
+
anchorId: S.optional<typeof S.String>;
|
|
125
|
+
/**
|
|
126
|
+
* Block alignment for the dialog.
|
|
127
|
+
*/
|
|
128
|
+
dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
|
|
129
|
+
/**
|
|
130
|
+
* Type of dialog.
|
|
131
|
+
*/
|
|
132
|
+
dialogType: S.optional<S.Literal<["default", "alert"]>>;
|
|
204
133
|
}>;
|
|
205
134
|
output: typeof S.Void;
|
|
206
135
|
}>;
|
|
207
|
-
export class
|
|
136
|
+
export class SetLayout extends SetLayout_base {
|
|
208
137
|
}
|
|
209
|
-
const
|
|
210
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/
|
|
138
|
+
const SetLayoutMode_base: S.TaggedClass<SetLayoutMode, "dxos.org/plugin/layout/action/set-layout-mode", {
|
|
139
|
+
readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout-mode">;
|
|
211
140
|
} & {
|
|
212
|
-
input: S.Struct<{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}>;
|
|
218
|
-
}>;
|
|
141
|
+
input: S.Union<[S.Struct<{
|
|
142
|
+
layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
|
|
143
|
+
}>, S.Struct<{
|
|
144
|
+
revert: S.Literal<[true]>;
|
|
145
|
+
}>]>;
|
|
219
146
|
output: typeof S.Void;
|
|
220
147
|
}>;
|
|
221
|
-
export class
|
|
148
|
+
export class SetLayoutMode extends SetLayoutMode_base {
|
|
222
149
|
}
|
|
223
|
-
const ScrollIntoView_base: S.TaggedClass<ScrollIntoView, "dxos.org/plugin/layout/action/
|
|
224
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/
|
|
150
|
+
const ScrollIntoView_base: S.TaggedClass<ScrollIntoView, "dxos.org/plugin/layout/action/scroll-into-view", {
|
|
151
|
+
readonly _tag: S.tag<"dxos.org/plugin/layout/action/scroll-into-view">;
|
|
225
152
|
} & {
|
|
226
153
|
input: S.Struct<{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
154
|
+
id: S.optional<typeof S.String>;
|
|
155
|
+
cursor: S.optional<typeof S.String>;
|
|
156
|
+
ref: S.optional<typeof S.String>;
|
|
230
157
|
}>;
|
|
231
158
|
output: typeof S.Void;
|
|
232
159
|
}>;
|
|
233
160
|
export class ScrollIntoView extends ScrollIntoView_base {
|
|
234
161
|
}
|
|
235
|
-
const Expose_base: S.TaggedClass<Expose, "dxos.org/plugin/layout/action/update-layout", {
|
|
236
|
-
readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
|
|
237
|
-
} & {
|
|
238
|
-
input: S.Struct<{
|
|
239
|
-
part: S.Literal<["navigation"]>;
|
|
240
|
-
subject: S.SchemaClass<string, string, never>;
|
|
241
|
-
}>;
|
|
242
|
-
output: typeof S.Void;
|
|
243
|
-
}>;
|
|
244
|
-
export class Expose extends Expose_base {
|
|
245
|
-
}
|
|
246
162
|
export {};
|
|
247
163
|
}
|
|
164
|
+
export {};
|
|
248
165
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAQtC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;EAWhB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC;AAEhD;;;;;;GAMG;AAEH,QAAA,MAAM,UAAU,gFAAyE,CAAC;AAC1F,eAAO,MAAM,YAAY,UAAW,GAAG,KAAG,KAAK,IAAI,UAAqC,CAAC;AACzF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE1D,eAAO,MAAM,MAAM;;;;IAMf;;OAEG;;;IAIH;;OAEG;;;;;IAOH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMH;;OAEG;;GAGN,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC;AAMlD,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC;AAEvD;;GAEG;AACH,yBAAiB,YAAY,CAAC;;;;;YAGxB;;eAEG;;YAGH;;;;;eAKG;;YAGH;;eAEG;;YAGH;;eAEG;;YAGH;;eAEG;;YAKH;;eAEG;;YAGH;;eAEG;;;;;IAvCP,MAAM,OAAO,SAAU,SAAQ,cA2C7B;KAAG;;;;;;;;;;;IAIL,MAAM,OAAO,aAAc,SAAQ,kBAUjC;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAQlC;KAAG;;CACN"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { Schema as S } from '@effect/schema';
|
|
2
|
+
export declare const SLUG_LIST_SEPARATOR = "+";
|
|
3
|
+
export declare const SLUG_ENTRY_SEPARATOR = "_";
|
|
4
|
+
export declare const SLUG_KEY_VALUE_SEPARATOR = "-";
|
|
5
|
+
export declare const SLUG_PATH_SEPARATOR = "~";
|
|
6
|
+
export declare const SLUG_COLLECTION_INDICATOR = "";
|
|
7
|
+
declare const LayoutEntrySchema: S.mutable<S.Struct<{
|
|
8
|
+
id: typeof S.String;
|
|
9
|
+
path: S.optional<typeof S.String>;
|
|
10
|
+
}>>;
|
|
11
|
+
export type LayoutEntry = S.Schema.Type<typeof LayoutEntrySchema>;
|
|
12
|
+
declare const LayoutPartSchema: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
13
|
+
export type LayoutPart = S.Schema.Type<typeof LayoutPartSchema>;
|
|
14
|
+
declare const LayoutPartsSchema: S.SchemaClass<{
|
|
15
|
+
main?: {
|
|
16
|
+
path?: string | undefined;
|
|
17
|
+
id: string;
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
solo?: {
|
|
20
|
+
path?: string | undefined;
|
|
21
|
+
id: string;
|
|
22
|
+
}[] | undefined;
|
|
23
|
+
sidebar?: {
|
|
24
|
+
path?: string | undefined;
|
|
25
|
+
id: string;
|
|
26
|
+
}[] | undefined;
|
|
27
|
+
complementary?: {
|
|
28
|
+
path?: string | undefined;
|
|
29
|
+
id: string;
|
|
30
|
+
}[] | undefined;
|
|
31
|
+
fullScreen?: {
|
|
32
|
+
path?: string | undefined;
|
|
33
|
+
id: string;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
main?: {
|
|
37
|
+
id: string;
|
|
38
|
+
path?: string | undefined;
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
solo?: {
|
|
41
|
+
id: string;
|
|
42
|
+
path?: string | undefined;
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
sidebar?: {
|
|
45
|
+
id: string;
|
|
46
|
+
path?: string | undefined;
|
|
47
|
+
}[] | undefined;
|
|
48
|
+
complementary?: {
|
|
49
|
+
id: string;
|
|
50
|
+
path?: string | undefined;
|
|
51
|
+
}[] | undefined;
|
|
52
|
+
fullScreen?: {
|
|
53
|
+
id: string;
|
|
54
|
+
path?: string | undefined;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
}, never>;
|
|
57
|
+
export type LayoutParts = S.Schema.Type<typeof LayoutPartsSchema>;
|
|
58
|
+
declare const LayoutCoordinateSchema: S.mutable<S.Struct<{
|
|
59
|
+
part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
60
|
+
entryId: typeof S.String;
|
|
61
|
+
}>>;
|
|
62
|
+
export type LayoutCoordinate = S.Schema.Type<typeof LayoutCoordinateSchema>;
|
|
63
|
+
declare const PartAdjustmentSchema: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["pin-start"]>, S.Literal<["pin-end"]>, S.Literal<["close"]>, S.Literal<["solo"]>]>;
|
|
64
|
+
export type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;
|
|
65
|
+
declare const LayoutAdjustmentSchema: S.mutable<S.Struct<{
|
|
66
|
+
layoutCoordinate: S.mutable<S.Struct<{
|
|
67
|
+
part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
68
|
+
entryId: typeof S.String;
|
|
69
|
+
}>>;
|
|
70
|
+
type: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["pin-start"]>, S.Literal<["pin-end"]>, S.Literal<["close"]>, S.Literal<["solo"]>]>;
|
|
71
|
+
}>>;
|
|
72
|
+
export type LayoutAdjustment = S.Schema.Type<typeof LayoutAdjustmentSchema>;
|
|
73
|
+
/** @deprecated */
|
|
74
|
+
export declare const ActiveParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
75
|
+
export type ActiveParts = S.Schema.Type<typeof ActiveParts>;
|
|
76
|
+
export type LayoutContainerProps<T> = T & {
|
|
77
|
+
role?: string;
|
|
78
|
+
coordinate?: LayoutCoordinate;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Provides for a plugin that can manage the app navigation.
|
|
82
|
+
*/
|
|
83
|
+
declare const LocationProvidesSchema: S.mutable<S.Struct<{
|
|
84
|
+
location: S.Struct<{
|
|
85
|
+
active: S.SchemaClass<{
|
|
86
|
+
main?: {
|
|
87
|
+
path?: string | undefined;
|
|
88
|
+
id: string;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
solo?: {
|
|
91
|
+
path?: string | undefined;
|
|
92
|
+
id: string;
|
|
93
|
+
}[] | undefined;
|
|
94
|
+
sidebar?: {
|
|
95
|
+
path?: string | undefined;
|
|
96
|
+
id: string;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
complementary?: {
|
|
99
|
+
path?: string | undefined;
|
|
100
|
+
id: string;
|
|
101
|
+
}[] | undefined;
|
|
102
|
+
fullScreen?: {
|
|
103
|
+
path?: string | undefined;
|
|
104
|
+
id: string;
|
|
105
|
+
}[] | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
main?: {
|
|
108
|
+
id: string;
|
|
109
|
+
path?: string | undefined;
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
solo?: {
|
|
112
|
+
id: string;
|
|
113
|
+
path?: string | undefined;
|
|
114
|
+
}[] | undefined;
|
|
115
|
+
sidebar?: {
|
|
116
|
+
id: string;
|
|
117
|
+
path?: string | undefined;
|
|
118
|
+
}[] | undefined;
|
|
119
|
+
complementary?: {
|
|
120
|
+
id: string;
|
|
121
|
+
path?: string | undefined;
|
|
122
|
+
}[] | undefined;
|
|
123
|
+
fullScreen?: {
|
|
124
|
+
id: string;
|
|
125
|
+
path?: string | undefined;
|
|
126
|
+
}[] | undefined;
|
|
127
|
+
}, never>;
|
|
128
|
+
closed: S.Array$<typeof S.String>;
|
|
129
|
+
}>;
|
|
130
|
+
}>>;
|
|
131
|
+
export type LocationProvides = S.Schema.Type<typeof LocationProvidesSchema>;
|
|
132
|
+
/**
|
|
133
|
+
* Type guard for layout plugins.
|
|
134
|
+
*/
|
|
135
|
+
export declare const isLayoutParts: (value: unknown) => value is LayoutParts;
|
|
136
|
+
export declare const isLayoutAdjustment: (value: unknown) => value is LayoutAdjustment;
|
|
137
|
+
/**
|
|
138
|
+
* Utilities.
|
|
139
|
+
*/
|
|
140
|
+
/** Extracts all unique IDs from the layout parts. */
|
|
141
|
+
export declare const openIds: (layout: LayoutParts, parts?: LayoutPart[]) => string[];
|
|
142
|
+
export declare const firstIdInPart: (layout: LayoutParts | undefined, part: LayoutPart) => string | undefined;
|
|
143
|
+
export declare const indexInPart: (layout: LayoutParts | undefined, layoutCoordinate: LayoutCoordinate | undefined) => number | undefined;
|
|
144
|
+
export declare const partLength: (layout: LayoutParts | undefined, part: LayoutPart | undefined) => number;
|
|
145
|
+
export declare const NAVIGATION_PLUGIN = "dxos.org/plugin/navigation";
|
|
146
|
+
export declare const NAVIGATION_ACTION = "dxos.org/plugin/navigation/action";
|
|
147
|
+
/**
|
|
148
|
+
* Expected payload for navigation actions.
|
|
149
|
+
*/
|
|
150
|
+
export declare namespace NavigationAction {
|
|
151
|
+
const Open_base: S.TaggedClass<Open, "dxos.org/plugin/navigation/action/open", {
|
|
152
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/open">;
|
|
153
|
+
} & {
|
|
154
|
+
input: S.Struct<{
|
|
155
|
+
activeParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
156
|
+
noToggle: S.optional<typeof S.Boolean>;
|
|
157
|
+
}>;
|
|
158
|
+
output: S.Struct<{
|
|
159
|
+
open: S.Array$<typeof S.String>;
|
|
160
|
+
}>;
|
|
161
|
+
}>;
|
|
162
|
+
/**
|
|
163
|
+
* An additive overlay to apply to `location.active` (i.e. the result is a union of previous active and the argument)
|
|
164
|
+
*/
|
|
165
|
+
export class Open extends Open_base {
|
|
166
|
+
}
|
|
167
|
+
const AddToActive_base: S.TaggedClass<AddToActive, "dxos.org/plugin/navigation/action/add-to-active", {
|
|
168
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/add-to-active">;
|
|
169
|
+
} & {
|
|
170
|
+
input: S.Struct<{
|
|
171
|
+
id: typeof S.String;
|
|
172
|
+
part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
173
|
+
scrollIntoView: S.optional<typeof S.Boolean>;
|
|
174
|
+
pivotId: S.optional<typeof S.String>;
|
|
175
|
+
positioning: S.optional<S.Literal<["start", "end"]>>;
|
|
176
|
+
}>;
|
|
177
|
+
output: typeof S.Void;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Payload for adding an item to the active items.
|
|
181
|
+
*/
|
|
182
|
+
export class AddToActive extends AddToActive_base {
|
|
183
|
+
}
|
|
184
|
+
const Set_base: S.TaggedClass<Set, "dxos.org/plugin/navigation/action/set", {
|
|
185
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/set">;
|
|
186
|
+
} & {
|
|
187
|
+
input: S.Struct<{
|
|
188
|
+
activeParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
189
|
+
}>;
|
|
190
|
+
output: typeof S.Void;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* The active parts to directly set, to be used when working with URLs or restoring a specific state.
|
|
194
|
+
*/
|
|
195
|
+
export class Set extends Set_base {
|
|
196
|
+
}
|
|
197
|
+
const Close_base: S.TaggedClass<Close, "dxos.org/plugin/navigation/action/close", {
|
|
198
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/close">;
|
|
199
|
+
} & {
|
|
200
|
+
input: S.Struct<{
|
|
201
|
+
activeParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
202
|
+
noToggle: S.optional<typeof S.Boolean>;
|
|
203
|
+
}>;
|
|
204
|
+
output: typeof S.Void;
|
|
205
|
+
}>;
|
|
206
|
+
/**
|
|
207
|
+
* A subtractive overlay to apply to `location.active` (i.e. the result is a subtraction from the previous active of the argument)
|
|
208
|
+
*/
|
|
209
|
+
export class Close extends Close_base {
|
|
210
|
+
}
|
|
211
|
+
const Adjust_base: S.TaggedClass<Adjust, "dxos.org/plugin/navigation/action/adjust", {
|
|
212
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/adjust">;
|
|
213
|
+
} & {
|
|
214
|
+
input: S.mutable<S.Struct<{
|
|
215
|
+
layoutCoordinate: S.mutable<S.Struct<{
|
|
216
|
+
part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
217
|
+
entryId: typeof S.String;
|
|
218
|
+
}>>;
|
|
219
|
+
type: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["pin-start"]>, S.Literal<["pin-end"]>, S.Literal<["close"]>, S.Literal<["solo"]>]>;
|
|
220
|
+
}>>;
|
|
221
|
+
output: typeof S.Void;
|
|
222
|
+
}>;
|
|
223
|
+
/**
|
|
224
|
+
* An atomic transaction to apply to `location.active`, describing which element to (attempt to) move to which location.
|
|
225
|
+
*/
|
|
226
|
+
export class Adjust extends Adjust_base {
|
|
227
|
+
}
|
|
228
|
+
const Expose_base: S.TaggedClass<Expose, "dxos.org/plugin/navigation/action/expose", {
|
|
229
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/expose">;
|
|
230
|
+
} & {
|
|
231
|
+
input: S.Struct<{
|
|
232
|
+
id: typeof S.String;
|
|
233
|
+
}>;
|
|
234
|
+
output: typeof S.Void;
|
|
235
|
+
}>;
|
|
236
|
+
export class Expose extends Expose_base {
|
|
237
|
+
}
|
|
238
|
+
export {};
|
|
239
|
+
}
|
|
240
|
+
export {};
|
|
241
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../src/common/navigation.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX, type ForwardedRef, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
-
import { type GuardedType, type MakeOptional, type
|
|
2
|
+
import { type GuardedType, type MakeOptional, type Disposition } from '@dxos/util';
|
|
3
3
|
import { type ErrorBoundary } from '../react';
|
|
4
4
|
/**
|
|
5
5
|
* SurfaceProps are the props that are passed to the Surface component.
|
|
@@ -53,14 +53,14 @@ export type SurfaceComponent<T extends Record<string, any> = Record<string, unkn
|
|
|
53
53
|
export type SurfaceDefinition<T extends Record<string, any> = any> = Readonly<{
|
|
54
54
|
id: string;
|
|
55
55
|
role: string | string[];
|
|
56
|
-
|
|
56
|
+
disposition?: Disposition;
|
|
57
57
|
filter?: (data: Record<string, unknown>) => data is T;
|
|
58
58
|
component: SurfaceComponent<GuardedType<SurfaceDefinition<T>['filter']>>;
|
|
59
59
|
}>;
|
|
60
60
|
export declare const createSurface: <T extends Record<string, any> = any>(definition: SurfaceDefinition<T>) => Readonly<{
|
|
61
61
|
id: string;
|
|
62
62
|
role: string | string[];
|
|
63
|
-
|
|
63
|
+
disposition?: Disposition;
|
|
64
64
|
filter?: ((data: Record<string, unknown>) => data is T) | undefined;
|
|
65
65
|
component: SurfaceComponent<T>;
|
|
66
66
|
}>;
|