@dxos/plugin-deck 0.7.4-staging.f7e8224 → 0.7.5-main.499c70c
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-ZC3K6C2W.mjs +37 -0
- package/dist/lib/browser/chunk-ZC3K6C2W.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +392 -420
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types.mjs +6 -1
- package/dist/types/src/DeckPlugin.d.ts +1 -10
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankControls.d.ts +2 -2
- package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +16 -0
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +29 -28
- package/src/DeckPlugin.tsx +222 -256
- package/src/components/DeckLayout/ActiveNode.tsx +1 -1
- package/src/components/DeckLayout/ComplementarySidebar.tsx +4 -3
- package/src/components/DeckLayout/DeckLayout.tsx +3 -7
- package/src/components/DeckLayout/Fullscreen.tsx +1 -1
- package/src/components/DeckLayout/NodePlankHeading.tsx +15 -29
- package/src/components/DeckLayout/Plank.tsx +7 -5
- package/src/components/DeckLayout/PlankControls.tsx +3 -5
- package/src/components/DeckLayout/Sidebar.tsx +4 -21
- package/src/components/DeckLayout/Toast.tsx +19 -6
- package/src/translations.ts +3 -0
- package/src/types.ts +15 -0
- package/dist/lib/browser/chunk-NIRHDTX4.mjs +0 -17
- package/dist/lib/browser/chunk-NIRHDTX4.mjs.map +0 -7
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DECK_PLUGIN
|
|
3
|
+
} from "./chunk-GVOGPULO.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-deck/src/types.ts
|
|
6
|
+
import { S } from "@dxos/echo-schema";
|
|
7
|
+
var NewPlankPositions = [
|
|
8
|
+
"start",
|
|
9
|
+
"end"
|
|
10
|
+
];
|
|
11
|
+
var OverscrollOptions = [
|
|
12
|
+
"none",
|
|
13
|
+
"centering"
|
|
14
|
+
];
|
|
15
|
+
var parsePanelPlugin = (plugin) => Array.isArray(plugin?.provides.complementary?.panels) ? plugin : void 0;
|
|
16
|
+
var DECK_ACTION = `${DECK_PLUGIN}/action`;
|
|
17
|
+
var DeckAction;
|
|
18
|
+
(function(DeckAction2) {
|
|
19
|
+
class UpdatePlankSize extends S.TaggedClass()(`${DECK_ACTION}/update-plank-size`, {
|
|
20
|
+
input: S.Struct({
|
|
21
|
+
id: S.String,
|
|
22
|
+
size: S.Number
|
|
23
|
+
}),
|
|
24
|
+
output: S.Void
|
|
25
|
+
}) {
|
|
26
|
+
}
|
|
27
|
+
DeckAction2.UpdatePlankSize = UpdatePlankSize;
|
|
28
|
+
})(DeckAction || (DeckAction = {}));
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
NewPlankPositions,
|
|
32
|
+
OverscrollOptions,
|
|
33
|
+
parsePanelPlugin,
|
|
34
|
+
DECK_ACTION,
|
|
35
|
+
DeckAction
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-ZC3K6C2W.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 type {\n Plugin,\n GraphBuilderProvides,\n IntentResolverProvides,\n LayoutProvides,\n LocationProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Label } from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from './meta';\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\n// TODO(wittjosiah): Include a predicate for whether the panel is visible for the current subject.\nexport type Panel = { id: string; label: Label; icon: string };\n\n// TODO(wittjosiah): Is this generic enough to be in the app framework?\nexport type PanelProvides = {\n complementary: {\n panels: Panel[];\n };\n};\n\nexport const parsePanelPlugin = (plugin?: Plugin) =>\n Array.isArray((plugin?.provides as any).complementary?.panels) ? (plugin as Plugin<PanelProvides>) : undefined;\n\nexport type DeckSettingsProps = {\n showHints: boolean;\n customSlots: boolean;\n flatDeck: boolean;\n enableNativeRedirect: boolean;\n disableDeck: boolean;\n newPlankPositioning: NewPlankPositioning;\n overscroll: Overscroll;\n};\n\nexport type DeckPluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n TranslationsProvides &\n SettingsProvides<DeckSettingsProps> &\n LayoutProvides &\n LocationProvides;\n\nexport const DECK_ACTION = `${DECK_PLUGIN}/action`;\n\nexport namespace DeckAction {\n export class UpdatePlankSize extends S.TaggedClass<UpdatePlankSize>()(`${DECK_ACTION}/update-plank-size`, {\n input: S.Struct({\n id: S.String,\n size: S.Number,\n }),\n output: S.Void,\n }) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAcA,SAASA,SAAS;AAMX,IAAMC,oBAAoB;EAAC;EAAS;;AAGpC,IAAMC,oBAAoB;EAAC;EAAQ;;AAanC,IAAMC,mBAAmB,CAACC,WAC/BC,MAAMC,QAASF,QAAQG,SAAiBC,eAAeC,MAAAA,IAAWL,SAAmCM;AAoBhG,IAAMC,cAAc,GAAGC,WAAAA;;UAEbC,aAAAA;EACR,MAAMC,wBAAwBC,EAAEC,YAAW,EAAoB,GAAGL,WAAAA,sBAAiC;IACxGM,OAAOF,EAAEG,OAAO;MACdC,IAAIJ,EAAEK;MACNC,MAAMN,EAAEO;IACV,CAAA;IACAC,QAAQR,EAAES;EACZ,CAAA,EAAA;EAAI;cANSV,kBAAAA;AAOf,GARiBD,eAAAA,aAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["S", "NewPlankPositions", "OverscrollOptions", "parsePanelPlugin", "plugin", "Array", "isArray", "provides", "complementary", "panels", "undefined", "DECK_ACTION", "DECK_PLUGIN", "DeckAction", "UpdatePlankSize", "S", "TaggedClass", "input", "Struct", "id", "String", "size", "Number", "output", "Void"]
|
|
7
|
+
}
|