@dxos/plugin-simple-layout 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc
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/LICENSE +102 -5
- package/dist/lib/{browser/SimpleLayoutPlugin-Q5BZE6KD.mjs → neutral/SimpleLayoutPlugin.mjs} +3 -1
- package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs +21 -0
- package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +21 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7UDV3JDT.mjs +22 -0
- package/dist/lib/neutral/chunk-7UDV3JDT.mjs.map +7 -0
- package/dist/lib/{browser/index.mjs → neutral/chunk-AMTEDJHG.mjs} +5 -8
- package/dist/lib/neutral/chunk-AMTEDJHG.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FD2CAY4Q.mjs +26 -0
- package/dist/lib/neutral/chunk-FD2CAY4Q.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XVUAQHKU.mjs +8 -0
- package/dist/lib/neutral/chunk-XVUAQHKU.mjs.map +7 -0
- package/dist/lib/neutral/close-WKMURGUB.mjs +35 -0
- package/dist/lib/neutral/close-WKMURGUB.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +926 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +332 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +14 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/open-XI2T7D5O.mjs +49 -0
- package/dist/lib/neutral/open-XI2T7D5O.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs +13 -0
- package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-root-VE265VX4.mjs +18 -0
- package/dist/lib/neutral/react-root-VE265VX4.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-REZMYKQV.mjs +46 -0
- package/dist/lib/neutral/react-surface-REZMYKQV.mjs.map +7 -0
- package/dist/lib/neutral/revert-workspace-ST6NZUNG.mjs +22 -0
- package/dist/lib/neutral/revert-workspace-ST6NZUNG.mjs.map +7 -0
- package/dist/lib/neutral/set-6ZRLWPJS.mjs +22 -0
- package/dist/lib/neutral/set-6ZRLWPJS.mjs.map +7 -0
- package/dist/lib/neutral/set-layout-mode-L22HRCKS.mjs +13 -0
- package/dist/lib/neutral/set-layout-mode-L22HRCKS.mjs.map +7 -0
- package/dist/lib/neutral/spotlight-dismiss-EIYW5E7M.mjs +58 -0
- package/dist/lib/neutral/spotlight-dismiss-EIYW5E7M.mjs.map +7 -0
- package/dist/lib/neutral/state-7NXKBLPY.mjs +47 -0
- package/dist/lib/neutral/state-7NXKBLPY.mjs.map +7 -0
- package/dist/lib/neutral/switch-workspace-PYWPTMFO.mjs +25 -0
- package/dist/lib/neutral/switch-workspace-PYWPTMFO.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/translations.mjs +2 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/update-complementary-HKWF5OXT.mjs +33 -0
- package/dist/lib/neutral/update-complementary-HKWF5OXT.mjs.map +7 -0
- package/dist/lib/neutral/update-dialog-P4ASXCE7.mjs +30 -0
- package/dist/lib/neutral/update-dialog-P4ASXCE7.mjs.map +7 -0
- package/dist/lib/neutral/update-popover-REAKC2GN.mjs +34 -0
- package/dist/lib/neutral/update-popover-REAKC2GN.mjs.map +7 -0
- package/dist/lib/neutral/update-sidebar-O5SQPR6Q.mjs +12 -0
- package/dist/lib/neutral/update-sidebar-O5SQPR6Q.mjs.map +7 -0
- package/dist/lib/neutral/url-handler-GZXUUAHD.mjs +129 -0
- package/dist/lib/neutral/url-handler-GZXUUAHD.mjs.map +7 -0
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +3 -3
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -1
- package/dist/types/src/hooks/actions.d.ts +3 -3
- package/dist/types/src/hooks/actions.d.ts.map +1 -1
- package/dist/types/src/hooks/useSimpleLayoutState.d.ts +3 -3
- package/dist/types/src/hooks/useSimpleLayoutState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/state-access.d.ts +3 -3
- package/dist/types/src/operations/state-access.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/types/{capabilities.d.ts → SimpleLayoutCapabilities.d.ts} +2 -8
- package/dist/types/src/types/SimpleLayoutCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/SimpleLayoutEvents.d.ts +4 -0
- package/dist/types/src/types/SimpleLayoutEvents.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +81 -45
- package/src/capabilities/state.tsx +5 -6
- package/src/capabilities/url-handler.ts +16 -13
- package/src/components/Home/Home.tsx +1 -1
- package/src/components/Loading/Loading.tsx +1 -1
- package/src/components/MobileLayout/MobileLayout.tsx +0 -2
- package/src/components/NavBranch/NavBranch.tsx +1 -1
- package/src/components/Popover/Popover.tsx +1 -0
- package/src/components/SimpleLayout/AppBar.tsx +42 -40
- package/src/components/SimpleLayout/SimpleLayout.stories.tsx +3 -3
- package/src/hooks/actions.ts +5 -3
- package/src/hooks/useAppBarProps.ts +2 -2
- package/src/hooks/useDrawerActions.ts +2 -2
- package/src/hooks/useNavbarActions.ts +2 -2
- package/src/hooks/useSimpleLayoutState.ts +7 -5
- package/src/index.ts +1 -6
- package/src/meta.ts +1 -0
- package/src/operations/open.ts +1 -1
- package/src/operations/state-access.ts +5 -3
- package/src/plugin.ts +11 -0
- package/src/types/{capabilities.ts → SimpleLayoutCapabilities.ts} +3 -15
- package/src/types/SimpleLayoutEvents.ts +15 -0
- package/src/types/index.ts +2 -2
- package/dist/lib/browser/SimpleLayoutPlugin-Q5BZE6KD.mjs.map +0 -7
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/translations.mjs.map +0 -7
- package/dist/lib/node-esm/SimpleLayoutPlugin-OD45TNPO.mjs +0 -52
- package/dist/lib/node-esm/index.mjs +0 -24
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/translations.mjs +0 -36
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -6
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/types/events.ts +0 -15
- /package/dist/lib/{node-esm/SimpleLayoutPlugin-OD45TNPO.mjs.map → neutral/SimpleLayoutPlugin.mjs.map} +0 -0
- /package/dist/lib/{node-esm → neutral}/translations.mjs.map +0 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
5
7
|
import { type Atom } from '@effect-atom/atom-react';
|
|
6
8
|
|
|
7
9
|
import { Capability } from '@dxos/app-framework';
|
|
@@ -11,23 +13,17 @@ import { meta } from '#meta';
|
|
|
11
13
|
|
|
12
14
|
export type DrawerState = 'closed' | 'open' | 'expanded';
|
|
13
15
|
|
|
14
|
-
// TODO(wittjosiah): Handle toasts.
|
|
15
16
|
export type SimpleLayoutState = {
|
|
16
|
-
/** Data to be passed to the main content Surface. */
|
|
17
17
|
content?: any;
|
|
18
|
-
|
|
19
18
|
previousWorkspace: string;
|
|
20
19
|
workspace: string;
|
|
21
20
|
active?: string;
|
|
22
|
-
|
|
23
21
|
dialogOpen: boolean;
|
|
24
22
|
dialogType?: 'default' | 'alert';
|
|
25
23
|
dialogBlockAlign?: 'start' | 'center' | 'end';
|
|
26
24
|
dialogOverlayClasses?: string;
|
|
27
25
|
dialogOverlayStyle?: Record<string, any>;
|
|
28
|
-
/** Data to be passed to the dialog Surface. */
|
|
29
26
|
dialogContent?: { component: string; props?: any } | null;
|
|
30
|
-
|
|
31
27
|
popoverOpen?: boolean;
|
|
32
28
|
popoverSide?: 'top' | 'right' | 'bottom' | 'left';
|
|
33
29
|
popoverVariant?: 'virtual' | 'react';
|
|
@@ -36,18 +32,10 @@ export type SimpleLayoutState = {
|
|
|
36
32
|
popoverKind?: 'base' | 'card';
|
|
37
33
|
popoverTitle?: Label;
|
|
38
34
|
popoverContent?: { component: string; props?: any } | { subject: any } | null;
|
|
39
|
-
|
|
40
|
-
/** Bottom drawer state. */
|
|
41
35
|
drawerState: DrawerState;
|
|
42
|
-
|
|
43
|
-
/** Stack of previously active item IDs for back navigation. */
|
|
44
36
|
history: string[];
|
|
45
|
-
|
|
46
|
-
/** Whether running in popover window context (hides mobile-specific UI). */
|
|
47
37
|
isPopover?: boolean;
|
|
48
|
-
|
|
49
|
-
/** Variant of the companion to display in the drawer (e.g., "comments", "assistant-chat"). */
|
|
50
38
|
companionVariant?: string;
|
|
51
39
|
};
|
|
52
40
|
|
|
53
|
-
export const
|
|
41
|
+
export const State = Capability.make<Atom.Writable<SimpleLayoutState>>(`${meta.id}.state`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { type ActivationEvent } from '@dxos/app-framework';
|
|
8
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
9
|
+
|
|
10
|
+
import * as SimpleLayoutCapabilities from './SimpleLayoutCapabilities';
|
|
11
|
+
|
|
12
|
+
/** Fired when State capability is ready. */
|
|
13
|
+
export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(
|
|
14
|
+
SimpleLayoutCapabilities.State.identifier,
|
|
15
|
+
);
|
package/src/types/index.ts
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/SimpleLayoutPlugin.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent, ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\n\nimport {\n AppGraphBuilder,\n OperationHandler,\n ReactRoot,\n ReactSurface,\n SpotlightDismiss,\n State,\n UrlHandler,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { SimpleLayoutEvents } from '#types';\n\nexport type SimpleLayoutPluginOptions = {\n /** Determines if running in popover window context (hides mobile-specific UI). */\n isPopover?: boolean;\n};\n\nexport const SimpleLayoutPlugin = Plugin.define<SimpleLayoutPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule(({ isPopover = false }) => ({\n id: Capability.getModuleTag(State),\n activatesOn: ActivationEvents.Startup,\n firesAfterActivation: [SimpleLayoutEvents.StateReady, AppActivationEvents.LayoutReady],\n activate: () => State({ initialState: { isPopover } }),\n })),\n Plugin.addModule(({ isPopover = false }) => ({\n id: Capability.getModuleTag(SpotlightDismiss),\n activatesOn: ActivationEvents.Startup,\n activate: () => SpotlightDismiss({ isPopover }),\n })),\n Plugin.addModule({\n id: Capability.getModuleTag(ReactRoot),\n activatesOn: ActivationEvents.Startup,\n activate: ReactRoot,\n }),\n Plugin.addModule({\n id: Capability.getModuleTag(ReactSurface),\n activatesOn: ActivationEvents.Startup,\n activate: ReactSurface,\n }),\n Plugin.addModule({\n id: Capability.getModuleTag(UrlHandler),\n activatesOn: ActivationEvent.allOf(ActivationEvents.OperationInvokerReady, SimpleLayoutEvents.StateReady),\n activate: UrlHandler,\n }),\n Plugin.make,\n);\n\nexport default SimpleLayoutPlugin;\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,iBAAiBC,kBAAkBC,YAAYC,cAAc;AACtE,SAASC,qBAAqBC,iBAAiB;AAE/C,SACEC,iBACAC,kBACAC,WACAC,cACAC,kBACAC,OACAC,kBACK;AACP,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,0BAA0B;AAO5B,IAAMC,qBAAqBb,OAAOc,OAAkCJ,IAAAA,EAAMK,KAC/Eb,UAAUc,kBAAkB;EAAEC,UAAUd;AAAgB,CAAA,GACxDD,UAAUgB,0BAA0B;EAAED,UAAUb;AAAiB,CAAA,GACjEF,UAAUiB,sBAAsB;EAAER;AAAa,CAAA,GAC/CX,OAAOoB,UAAU,CAAC,EAAEC,YAAY,MAAK,OAAQ;EAC3CC,IAAIvB,WAAWwB,aAAaf,KAAAA;EAC5BgB,aAAa1B,iBAAiB2B;EAC9BC,sBAAsB;IAACd,mBAAmBe;IAAY1B,oBAAoB2B;;EAC1EX,UAAU,MAAMT,MAAM;IAAEqB,cAAc;MAAER;IAAU;EAAE,CAAA;AACtD,EAAA,GACArB,OAAOoB,UAAU,CAAC,EAAEC,YAAY,MAAK,OAAQ;EAC3CC,IAAIvB,WAAWwB,aAAahB,gBAAAA;EAC5BiB,aAAa1B,iBAAiB2B;EAC9BR,UAAU,MAAMV,iBAAiB;IAAEc;EAAU,CAAA;AAC/C,EAAA,GACArB,OAAOoB,UAAU;EACfE,IAAIvB,WAAWwB,aAAalB,SAAAA;EAC5BmB,aAAa1B,iBAAiB2B;EAC9BR,UAAUZ;AACZ,CAAA,GACAL,OAAOoB,UAAU;EACfE,IAAIvB,WAAWwB,aAAajB,YAAAA;EAC5BkB,aAAa1B,iBAAiB2B;EAC9BR,UAAUX;AACZ,CAAA,GACAN,OAAOoB,UAAU;EACfE,IAAIvB,WAAWwB,aAAad,UAAAA;EAC5Be,aAAa3B,gBAAgBiC,MAAMhC,iBAAiBiC,uBAAuBnB,mBAAmBe,UAAU;EACxGV,UAAUR;AACZ,CAAA,GACAT,OAAOgC,IAAI;AAGb,IAAA,6BAAenB;",
|
|
6
|
-
"names": ["ActivationEvent", "ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "AppGraphBuilder", "OperationHandler", "ReactRoot", "ReactSurface", "SpotlightDismiss", "State", "UrlHandler", "meta", "translations", "SimpleLayoutEvents", "SimpleLayoutPlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "addTranslationsModule", "addModule", "isPopover", "id", "getModuleTag", "activatesOn", "Startup", "firesAfterActivation", "StateReady", "LayoutReady", "initialState", "allOf", "OperationInvokerReady", "make"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/index.ts", "../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const SimpleLayoutPlugin = Plugin.lazy(meta, () => import('./SimpleLayoutPlugin'));\n\nexport * from './meta';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.simpleLayout',\n name: 'Simple Layout',\n description: trim`\n Minimal layout plugin for simplified UI contexts like popover windows.\n Provides basic content rendering without sidebars or complex navigation.\n `,\n icon: 'ph--layout--regular',\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;AACR;;;ADPO,IAAMC,qBAAqBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,mCAAA,CAAA;",
|
|
6
|
-
"names": ["Plugin", "trim", "meta", "id", "name", "description", "icon", "SimpleLayoutPlugin", "Plugin", "lazy", "meta"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":1403,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/SimpleLayoutPlugin.ts":{"bytes":7143,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":994,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/SimpleLayoutPlugin.ts","kind":"dynamic-import","original":"./SimpleLayoutPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":3537,"imports":[{"path":"@dxos/react-ui-search/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1108},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"dist/lib/browser/SimpleLayoutPlugin-Q5BZE6KD.mjs","kind":"dynamic-import"}],"exports":["SimpleLayoutPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":141},"src/meta.ts":{"bytesInOutput":322}},"bytes":588},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1667},"dist/lib/browser/translations.mjs":{"imports":[{"path":"@dxos/react-ui-search/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":978}},"bytes":1070},"dist/lib/browser/SimpleLayoutPlugin-Q5BZE6KD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3769},"dist/lib/browser/SimpleLayoutPlugin-Q5BZE6KD.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["SimpleLayoutPlugin","default"],"entryPoint":"src/SimpleLayoutPlugin.ts","inputs":{"src/SimpleLayoutPlugin.ts":{"bytesInOutput":1678}},"bytes":1838}}}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as searchTranslations } from '@dxos/react-ui-search/translations';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n ...searchTranslations,\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Simple layout',\n 'settings.title': 'Simple layout settings',\n 'workspaces.heading': 'Workspaces',\n 'settings.heading': 'Settings',\n 'back.label': 'Back',\n 'browse.label': 'Browse',\n 'notifications.label': 'Notifications',\n 'profile.label': 'Profile',\n 'app-menu.label': 'App menu',\n 'main-menu.label': 'Main menu',\n 'companions-menu.label': 'Companions',\n 'error-fallback.message': 'An error occurred',\n 'drawer.label': 'Drawer',\n 'close-drawer.label': 'Close drawer',\n 'expand-drawer.label': 'Expand drawer',\n 'collapse-drawer.label': 'Collapse drawer',\n 'actions-menu.label': 'Actions',\n 'done.label': 'Done',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";AAKA,SAASA,gBAAgBC,0BAA0B;AAEnD,SAASC,YAAY;AAEd,IAAMF,eAAe;KACvBC;EACH;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,sBAAsB;QACtB,oBAAoB;QACpB,cAAc;QACd,gBAAgB;QAChB,uBAAuB;QACvB,iBAAiB;QACjB,kBAAkB;QAClB,mBAAmB;QACnB,yBAAyB;QACzB,0BAA0B;QAC1B,gBAAgB;QAChB,sBAAsB;QACtB,uBAAuB;QACvB,yBAAyB;QACzB,sBAAsB;QACtB,cAAc;MAChB;IACF;EACF;;",
|
|
6
|
-
"names": ["translations", "searchTranslations", "meta", "id"]
|
|
7
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/SimpleLayoutPlugin.ts
|
|
4
|
-
import { ActivationEvent, ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
|
|
5
|
-
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
-
import { AppGraphBuilder, OperationHandler, ReactRoot, ReactSurface, SpotlightDismiss, State, UrlHandler } from "#capabilities";
|
|
7
|
-
import { meta } from "#meta";
|
|
8
|
-
import { translations } from "#translations";
|
|
9
|
-
import { SimpleLayoutEvents } from "#types";
|
|
10
|
-
var SimpleLayoutPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
11
|
-
activate: AppGraphBuilder
|
|
12
|
-
}), AppPlugin.addOperationHandlerModule({
|
|
13
|
-
activate: OperationHandler
|
|
14
|
-
}), AppPlugin.addTranslationsModule({
|
|
15
|
-
translations
|
|
16
|
-
}), Plugin.addModule(({ isPopover = false }) => ({
|
|
17
|
-
id: Capability.getModuleTag(State),
|
|
18
|
-
activatesOn: ActivationEvents.Startup,
|
|
19
|
-
firesAfterActivation: [
|
|
20
|
-
SimpleLayoutEvents.StateReady,
|
|
21
|
-
AppActivationEvents.LayoutReady
|
|
22
|
-
],
|
|
23
|
-
activate: () => State({
|
|
24
|
-
initialState: {
|
|
25
|
-
isPopover
|
|
26
|
-
}
|
|
27
|
-
})
|
|
28
|
-
})), Plugin.addModule(({ isPopover = false }) => ({
|
|
29
|
-
id: Capability.getModuleTag(SpotlightDismiss),
|
|
30
|
-
activatesOn: ActivationEvents.Startup,
|
|
31
|
-
activate: () => SpotlightDismiss({
|
|
32
|
-
isPopover
|
|
33
|
-
})
|
|
34
|
-
})), Plugin.addModule({
|
|
35
|
-
id: Capability.getModuleTag(ReactRoot),
|
|
36
|
-
activatesOn: ActivationEvents.Startup,
|
|
37
|
-
activate: ReactRoot
|
|
38
|
-
}), Plugin.addModule({
|
|
39
|
-
id: Capability.getModuleTag(ReactSurface),
|
|
40
|
-
activatesOn: ActivationEvents.Startup,
|
|
41
|
-
activate: ReactSurface
|
|
42
|
-
}), Plugin.addModule({
|
|
43
|
-
id: Capability.getModuleTag(UrlHandler),
|
|
44
|
-
activatesOn: ActivationEvent.allOf(ActivationEvents.OperationInvokerReady, SimpleLayoutEvents.StateReady),
|
|
45
|
-
activate: UrlHandler
|
|
46
|
-
}), Plugin.make);
|
|
47
|
-
var SimpleLayoutPlugin_default = SimpleLayoutPlugin;
|
|
48
|
-
export {
|
|
49
|
-
SimpleLayoutPlugin,
|
|
50
|
-
SimpleLayoutPlugin_default as default
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=SimpleLayoutPlugin-OD45TNPO.mjs.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/index.ts
|
|
4
|
-
import { Plugin } from "@dxos/app-framework";
|
|
5
|
-
|
|
6
|
-
// src/meta.ts
|
|
7
|
-
import { trim } from "@dxos/util";
|
|
8
|
-
var meta = {
|
|
9
|
-
id: "org.dxos.plugin.simpleLayout",
|
|
10
|
-
name: "Simple Layout",
|
|
11
|
-
description: trim`
|
|
12
|
-
Minimal layout plugin for simplified UI contexts like popover windows.
|
|
13
|
-
Provides basic content rendering without sidebars or complex navigation.
|
|
14
|
-
`,
|
|
15
|
-
icon: "ph--layout--regular"
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// src/index.ts
|
|
19
|
-
var SimpleLayoutPlugin = Plugin.lazy(meta, () => import("./SimpleLayoutPlugin-OD45TNPO.mjs"));
|
|
20
|
-
export {
|
|
21
|
-
SimpleLayoutPlugin,
|
|
22
|
-
meta
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/index.ts", "../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const SimpleLayoutPlugin = Plugin.lazy(meta, () => import('./SimpleLayoutPlugin'));\n\nexport * from './meta';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.simpleLayout',\n name: 'Simple Layout',\n description: trim`\n Minimal layout plugin for simplified UI contexts like popover windows.\n Provides basic content rendering without sidebars or complex navigation.\n `,\n icon: 'ph--layout--regular',\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;AACR;;;ADPO,IAAMC,qBAAqBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,mCAAA,CAAA;",
|
|
6
|
-
"names": ["Plugin", "trim", "meta", "id", "name", "description", "icon", "SimpleLayoutPlugin", "Plugin", "lazy", "meta"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":1403,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/SimpleLayoutPlugin.ts":{"bytes":7143,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":994,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/SimpleLayoutPlugin.ts","kind":"dynamic-import","original":"./SimpleLayoutPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":3537,"imports":[{"path":"@dxos/react-ui-search/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1110},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/SimpleLayoutPlugin-OD45TNPO.mjs","kind":"dynamic-import"}],"exports":["SimpleLayoutPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":141},"src/meta.ts":{"bytesInOutput":322}},"bytes":681},"dist/lib/node-esm/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1669},"dist/lib/node-esm/translations.mjs":{"imports":[{"path":"@dxos/react-ui-search/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":978}},"bytes":1163},"dist/lib/node-esm/SimpleLayoutPlugin-OD45TNPO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3771},"dist/lib/node-esm/SimpleLayoutPlugin-OD45TNPO.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["SimpleLayoutPlugin","default"],"entryPoint":"src/SimpleLayoutPlugin.ts","inputs":{"src/SimpleLayoutPlugin.ts":{"bytesInOutput":1678}},"bytes":1931}}}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/translations.ts
|
|
4
|
-
import { translations as searchTranslations } from "@dxos/react-ui-search/translations";
|
|
5
|
-
import { meta } from "#meta";
|
|
6
|
-
var translations = [
|
|
7
|
-
...searchTranslations,
|
|
8
|
-
{
|
|
9
|
-
"en-US": {
|
|
10
|
-
[meta.id]: {
|
|
11
|
-
"plugin.name": "Simple layout",
|
|
12
|
-
"settings.title": "Simple layout settings",
|
|
13
|
-
"workspaces.heading": "Workspaces",
|
|
14
|
-
"settings.heading": "Settings",
|
|
15
|
-
"back.label": "Back",
|
|
16
|
-
"browse.label": "Browse",
|
|
17
|
-
"notifications.label": "Notifications",
|
|
18
|
-
"profile.label": "Profile",
|
|
19
|
-
"app-menu.label": "App menu",
|
|
20
|
-
"main-menu.label": "Main menu",
|
|
21
|
-
"companions-menu.label": "Companions",
|
|
22
|
-
"error-fallback.message": "An error occurred",
|
|
23
|
-
"drawer.label": "Drawer",
|
|
24
|
-
"close-drawer.label": "Close drawer",
|
|
25
|
-
"expand-drawer.label": "Expand drawer",
|
|
26
|
-
"collapse-drawer.label": "Collapse drawer",
|
|
27
|
-
"actions-menu.label": "Actions",
|
|
28
|
-
"done.label": "Done"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
export {
|
|
34
|
-
translations
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=translations.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI5C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAGzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC9C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,+CAA+C;IAC/C,aAAa,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,GAAG,CAAA;KAAE,GAAG,IAAI,CAAC;IAE1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClD,cAAc,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACrC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,GAAG,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,GAAG,IAAI,CAAC;IAE9E,2BAA2B;IAC3B,WAAW,EAAE,WAAW,CAAC;IAEzB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,8EAAwE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,yBAAiB,kBAAkB,CAAC,CAAC;IACnC,wDAAwD;IACjD,MAAM,UAAU,EAAE,eAAe,CAAC,eAExC,CAAC;CACH"}
|
package/src/types/events.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type ActivationEvent } from '@dxos/app-framework';
|
|
6
|
-
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
7
|
-
|
|
8
|
-
import { SimpleLayoutState } from './capabilities';
|
|
9
|
-
|
|
10
|
-
export namespace SimpleLayoutEvents {
|
|
11
|
-
/** Fired when SimpleLayoutState capability is ready. */
|
|
12
|
-
export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(
|
|
13
|
-
SimpleLayoutState.identifier,
|
|
14
|
-
);
|
|
15
|
-
}
|
|
File without changes
|
|
File without changes
|