@dxos/plugin-simple-layout 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65

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.
Files changed (88) hide show
  1. package/dist/lib/browser/{chunk-TMZNLVT2.mjs → chunk-MDPEKLKR.mjs} +55 -62
  2. package/dist/lib/browser/chunk-MDPEKLKR.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-7VLT3S46.mjs → chunk-MRR7PXSM.mjs} +3 -3
  4. package/dist/lib/browser/{chunk-7VLT3S46.mjs.map → chunk-MRR7PXSM.mjs.map} +1 -1
  5. package/dist/lib/browser/index.mjs +6 -6
  6. package/dist/lib/browser/meta.json +1 -1
  7. package/dist/lib/browser/{operation-resolver-BYRIQOQT.mjs → operation-resolver-VTZ6HZ4B.mjs} +24 -35
  8. package/dist/lib/browser/operation-resolver-VTZ6HZ4B.mjs.map +7 -0
  9. package/dist/lib/browser/{react-root-MMB575WY.mjs → react-root-WVQYY2JA.mjs} +3 -3
  10. package/dist/lib/browser/{react-surface-M6CURANW.mjs → react-surface-VLBR37ED.mjs} +11 -8
  11. package/dist/lib/browser/{react-surface-M6CURANW.mjs.map → react-surface-VLBR37ED.mjs.map} +3 -3
  12. package/dist/lib/browser/{state-A3PGDWWZ.mjs → state-TXSMUWYI.mjs} +2 -2
  13. package/dist/lib/browser/{url-handler-HTIUY6WL.mjs → url-handler-RBRONH7S.mjs} +18 -19
  14. package/dist/lib/browser/url-handler-RBRONH7S.mjs.map +7 -0
  15. package/dist/lib/node-esm/{chunk-FLOYBAHE.mjs → chunk-DCKASLMP.mjs} +55 -62
  16. package/dist/lib/node-esm/chunk-DCKASLMP.mjs.map +7 -0
  17. package/dist/lib/node-esm/{chunk-VIDE5UMB.mjs → chunk-WMNTJ2MK.mjs} +3 -3
  18. package/dist/lib/node-esm/{chunk-VIDE5UMB.mjs.map → chunk-WMNTJ2MK.mjs.map} +1 -1
  19. package/dist/lib/node-esm/index.mjs +6 -6
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/{operation-resolver-BDTFNCS2.mjs → operation-resolver-R7CQ6ERU.mjs} +24 -35
  22. package/dist/lib/node-esm/operation-resolver-R7CQ6ERU.mjs.map +7 -0
  23. package/dist/lib/node-esm/{react-root-ENZKVSY4.mjs → react-root-XBNDM7BE.mjs} +3 -3
  24. package/dist/lib/node-esm/{react-surface-ITVNQYLG.mjs → react-surface-U5NHA367.mjs} +11 -8
  25. package/dist/lib/node-esm/{react-surface-ITVNQYLG.mjs.map → react-surface-U5NHA367.mjs.map} +3 -3
  26. package/dist/lib/node-esm/{state-ZCFZTTPL.mjs → state-JMX6FAG4.mjs} +2 -2
  27. package/dist/lib/node-esm/{url-handler-WBVVKVPC.mjs → url-handler-QSMCH3JB.mjs} +18 -19
  28. package/dist/lib/node-esm/url-handler-QSMCH3JB.mjs.map +7 -0
  29. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
  31. package/dist/types/src/capabilities/url-handler/url-handler.d.ts +2 -2
  32. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -1
  33. package/dist/types/src/components/ContentLoading/ContentLoading.d.ts.map +1 -0
  34. package/dist/types/src/components/ContentLoading/ContentLoading.stories.d.ts.map +1 -0
  35. package/dist/types/src/components/ContentLoading/index.d.ts +2 -0
  36. package/dist/types/src/components/ContentLoading/index.d.ts.map +1 -0
  37. package/dist/types/src/components/NavBranch/NavBranch.d.ts +11 -0
  38. package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -0
  39. package/dist/types/src/components/NavBranch/index.d.ts +2 -0
  40. package/dist/types/src/components/NavBranch/index.d.ts.map +1 -0
  41. package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
  42. package/dist/types/src/components/hooks.d.ts +4 -2
  43. package/dist/types/src/components/hooks.d.ts.map +1 -1
  44. package/dist/types/src/components/index.d.ts +1 -1
  45. package/dist/types/src/hooks/actions.d.ts +3 -4
  46. package/dist/types/src/hooks/actions.d.ts.map +1 -1
  47. package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -1
  48. package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -1
  49. package/dist/types/src/hooks/useNavbarActions.d.ts.map +1 -1
  50. package/dist/types/tsconfig.tsbuildinfo +1 -1
  51. package/package.json +27 -27
  52. package/src/capabilities/operation-resolver/operation-resolver.ts +19 -34
  53. package/src/capabilities/react-surface/react-surface.tsx +8 -6
  54. package/src/capabilities/url-handler/url-handler.ts +11 -35
  55. package/src/components/ContentLoading/index.ts +5 -0
  56. package/src/components/Home/Home.tsx +3 -3
  57. package/src/components/{Workspace/Workspace.tsx → NavBranch/NavBranch.tsx} +18 -13
  58. package/src/components/{Workspace → NavBranch}/index.ts +1 -1
  59. package/src/components/SimpleLayout/Drawer.tsx +3 -12
  60. package/src/components/SimpleLayout/Main.tsx +3 -4
  61. package/src/components/hooks.ts +8 -8
  62. package/src/components/index.ts +1 -1
  63. package/src/hooks/actions.ts +13 -15
  64. package/src/hooks/useAppBarProps.ts +1 -2
  65. package/src/hooks/useDrawerActions.ts +7 -5
  66. package/src/hooks/useNavbarActions.ts +5 -4
  67. package/src/meta.ts +1 -1
  68. package/src/types/capabilities.ts +1 -1
  69. package/dist/lib/browser/chunk-TMZNLVT2.mjs.map +0 -7
  70. package/dist/lib/browser/operation-resolver-BYRIQOQT.mjs.map +0 -7
  71. package/dist/lib/browser/url-handler-HTIUY6WL.mjs.map +0 -7
  72. package/dist/lib/node-esm/chunk-FLOYBAHE.mjs.map +0 -7
  73. package/dist/lib/node-esm/operation-resolver-BDTFNCS2.mjs.map +0 -7
  74. package/dist/lib/node-esm/url-handler-WBVVKVPC.mjs.map +0 -7
  75. package/dist/types/src/components/ContentLoading.d.ts.map +0 -1
  76. package/dist/types/src/components/ContentLoading.stories.d.ts.map +0 -1
  77. package/dist/types/src/components/Workspace/Workspace.d.ts +0 -11
  78. package/dist/types/src/components/Workspace/Workspace.d.ts.map +0 -1
  79. package/dist/types/src/components/Workspace/index.d.ts +0 -2
  80. package/dist/types/src/components/Workspace/index.d.ts.map +0 -1
  81. /package/dist/lib/browser/{react-root-MMB575WY.mjs.map → react-root-WVQYY2JA.mjs.map} +0 -0
  82. /package/dist/lib/browser/{state-A3PGDWWZ.mjs.map → state-TXSMUWYI.mjs.map} +0 -0
  83. /package/dist/lib/node-esm/{react-root-ENZKVSY4.mjs.map → react-root-XBNDM7BE.mjs.map} +0 -0
  84. /package/dist/lib/node-esm/{state-ZCFZTTPL.mjs.map → state-JMX6FAG4.mjs.map} +0 -0
  85. /package/dist/types/src/components/{ContentLoading.d.ts → ContentLoading/ContentLoading.d.ts} +0 -0
  86. /package/dist/types/src/components/{ContentLoading.stories.d.ts → ContentLoading/ContentLoading.stories.d.ts} +0 -0
  87. /package/src/components/{ContentLoading.stories.tsx → ContentLoading/ContentLoading.stories.tsx} +0 -0
  88. /package/src/components/{ContentLoading.tsx → ContentLoading/ContentLoading.tsx} +0 -0
@@ -1,14 +1,13 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  SimpleLayoutState
4
- } from "./chunk-VIDE5UMB.mjs";
4
+ } from "./chunk-WMNTJ2MK.mjs";
5
5
 
6
6
  // src/capabilities/url-handler/url-handler.ts
7
7
  import * as Effect from "effect/Effect";
8
8
  import { Capabilities, Capability } from "@dxos/app-framework";
9
- import { LayoutOperation } from "@dxos/app-toolkit";
9
+ import { LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from "@dxos/app-toolkit";
10
10
  import { log } from "@dxos/log";
11
- import { Node } from "@dxos/plugin-graph";
12
11
  import { isTauri } from "@dxos/util";
13
12
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-simple-layout/src/capabilities/url-handler/url-handler.ts";
14
13
  var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
@@ -18,19 +17,20 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
18
17
  pathname
19
18
  }, {
20
19
  F: __dxlog_file,
21
- L: 31,
20
+ L: 30,
22
21
  S: this,
23
22
  C: (f, a) => f(...a)
24
23
  });
25
- const [_, nextWorkspace, nextActive] = pathname.split("/");
26
- const targetWorkspace = !nextWorkspace || nextWorkspace === "root" ? Node.RootId : nextWorkspace;
24
+ const qualifiedId = fromUrlPath(pathname);
25
+ const workspace = getWorkspaceFromPath(qualifiedId);
27
26
  invokeSync(LayoutOperation.SwitchWorkspace, {
28
- subject: targetWorkspace
27
+ subject: workspace
29
28
  });
30
- if (nextActive) {
29
+ const activeId = qualifiedId !== workspace ? qualifiedId : void 0;
30
+ if (activeId) {
31
31
  invokeSync(LayoutOperation.Open, {
32
32
  subject: [
33
- nextActive
33
+ activeId
34
34
  ]
35
35
  });
36
36
  }
@@ -49,7 +49,7 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
49
49
  urls: launchUrls
50
50
  }, {
51
51
  F: __dxlog_file,
52
- L: 62,
52
+ L: 56,
53
53
  S: this,
54
54
  C: (f, a) => f(...a)
55
55
  });
@@ -62,7 +62,7 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
62
62
  urls
63
63
  }, {
64
64
  F: __dxlog_file,
65
- L: 70,
65
+ L: 63,
66
66
  S: this,
67
67
  C: (f, a) => f(...a)
68
68
  });
@@ -72,7 +72,7 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
72
72
  });
73
73
  log.info("[UrlHandler] Deep link listener initialized", void 0, {
74
74
  F: __dxlog_file,
75
- L: 76,
75
+ L: 69,
76
76
  S: this,
77
77
  C: (f, a) => f(...a)
78
78
  });
@@ -82,7 +82,7 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
82
82
  error
83
83
  }, {
84
84
  F: __dxlog_file,
85
- L: 79,
85
+ L: 72,
86
86
  S: this,
87
87
  C: (f, a) => f(...a)
88
88
  });
@@ -97,7 +97,7 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
97
97
  if (workspace !== lastWorkspace || active !== lastActive) {
98
98
  lastWorkspace = workspace;
99
99
  lastActive = active;
100
- const path = pathFromState(workspace, active);
100
+ const path = active ? toUrlPath(active) : toUrlPath(workspace);
101
101
  if (window.location.pathname !== path) {
102
102
  history.pushState(null, "", `${path}${window.location.search}`);
103
103
  }
@@ -110,14 +110,13 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
110
110
  }));
111
111
  }));
112
112
  var isRedirectPath = (pathname) => pathname.startsWith("/redirect/");
113
- var pathFromState = (workspace, active) => workspace === Node.RootId ? active ? `/${Node.RootId}/${active}` : "/" : active ? `/${workspace}/${active}` : `/${workspace}`;
114
113
  var handleNavigation = (navigate) => () => navigate(window.location.pathname);
115
114
  var handleDeepLink = (urlString, navigate) => {
116
115
  log.info("[UrlHandler] Deep link received", {
117
116
  url: urlString
118
117
  }, {
119
118
  F: __dxlog_file,
120
- L: 146,
119
+ L: 122,
121
120
  S: void 0,
122
121
  C: (f, a) => f(...a)
123
122
  });
@@ -128,7 +127,7 @@ var handleDeepLink = (urlString, navigate) => {
128
127
  pathname: url.pathname
129
128
  }, {
130
129
  F: __dxlog_file,
131
- L: 150,
130
+ L: 126,
132
131
  S: void 0,
133
132
  C: (f, a) => f(...a)
134
133
  });
@@ -141,7 +140,7 @@ var handleDeepLink = (urlString, navigate) => {
141
140
  error
142
141
  }, {
143
142
  F: __dxlog_file,
144
- L: 155,
143
+ L: 131,
145
144
  S: void 0,
146
145
  C: (f, a) => f(...a)
147
146
  });
@@ -150,4 +149,4 @@ var handleDeepLink = (urlString, navigate) => {
150
149
  export {
151
150
  url_handler_default as default
152
151
  };
153
- //# sourceMappingURL=url-handler-WBVVKVPC.mjs.map
152
+ //# sourceMappingURL=url-handler-QSMCH3JB.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/url-handler/url-handler.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from '@dxos/app-toolkit';\nimport { log } from '@dxos/log';\nimport { isTauri } from '@dxos/util';\n\nimport { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../../types';\n\n/**\n * URL handler for simple layout that syncs browser URL with layout state.\n * URL paths map directly to qualified graph IDs with the leading `root` segment stripped.\n * Root is represented as `/`.\n *\n * On mobile Tauri, also listens for deep links via the deep-link plugin.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const { invokeSync } = yield* Capability.get(Capabilities.OperationInvoker);\n\n /**\n * Handle navigation from a pathname.\n * Restores the qualified graph ID and dispatches layout operations.\n */\n const handlePathNavigation = (pathname: string) => {\n log.info('[UrlHandler] Navigating to path', { pathname });\n\n const qualifiedId = fromUrlPath(pathname);\n const workspace = getWorkspaceFromPath(qualifiedId);\n\n invokeSync(LayoutOperation.SwitchWorkspace, { subject: workspace });\n\n const activeId = qualifiedId !== workspace ? qualifiedId : undefined;\n if (activeId) {\n invokeSync(LayoutOperation.Open, { subject: [activeId] });\n }\n };\n\n const onNavigation = handleNavigation(handlePathNavigation);\n\n yield* Effect.sync(() => onNavigation());\n window.addEventListener('popstate', onNavigation);\n\n let unlistenDeepLink: (() => void) | undefined;\n if (isTauri()) {\n yield* Effect.tryPromise({\n try: async () => {\n const { getCurrent, onOpenUrl } = await import('@tauri-apps/plugin-deep-link');\n\n const launchUrls = await getCurrent();\n if (launchUrls && launchUrls.length > 0) {\n log.info('[UrlHandler] App launched with deep links', { urls: launchUrls });\n for (const url of launchUrls) {\n handleDeepLink(url, handlePathNavigation);\n }\n }\n\n unlistenDeepLink = await onOpenUrl((urls) => {\n log.info('[UrlHandler] Deep links received', { urls });\n for (const url of urls) {\n handleDeepLink(url, handlePathNavigation);\n }\n });\n\n log.info('[UrlHandler] Deep link listener initialized');\n },\n catch: (error) => {\n log.warn('[UrlHandler] Failed to initialize deep link listener', { error });\n return error;\n },\n }).pipe(Effect.catchAll(() => Effect.void));\n }\n\n let lastWorkspace: string | undefined;\n let lastActive: string | undefined;\n const unsubscribe = yield* Capabilities.subscribeAtom(SimpleLayoutStateCapability, (state: SimpleLayoutState) => {\n const { workspace, active } = state;\n\n if (workspace !== lastWorkspace || active !== lastActive) {\n lastWorkspace = workspace;\n lastActive = active;\n\n const path = active ? toUrlPath(active) : toUrlPath(workspace);\n if (window.location.pathname !== path) {\n history.pushState(null, '', `${path}${window.location.search}`);\n }\n }\n });\n\n return Capability.contributes(Capabilities.Null, null, () =>\n Effect.sync(() => {\n window.removeEventListener('popstate', onNavigation);\n unsubscribe();\n unlistenDeepLink?.();\n }),\n );\n }),\n);\n\n/**\n * Check if a path is a special redirect path that shouldn't be navigated to.\n * These paths are handled by other systems (e.g., OAuth).\n */\nconst isRedirectPath = (pathname: string): boolean => pathname.startsWith('/redirect/');\n\n/**\n * Returns a handler for navigation events (initial load and popstate) that navigates to current pathname.\n */\nconst handleNavigation =\n (navigate: (pathname: string) => void): (() => void) =>\n () =>\n navigate(window.location.pathname);\n\n/**\n * Handle deep link URL from Tauri. Parses the URL and calls navigate unless it's a redirect path.\n */\nconst handleDeepLink = (urlString: string, navigate: (pathname: string) => void): void => {\n log.info('[UrlHandler] Deep link received', { url: urlString });\n try {\n const url = new URL(urlString);\n if (isRedirectPath(url.pathname)) {\n log.info('[UrlHandler] Skipping redirect path (handled elsewhere)', { pathname: url.pathname });\n return;\n }\n navigate(url.pathname);\n } catch (error) {\n log.warn('[UrlHandler] Failed to parse deep link URL', { urlString, error });\n }\n};\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,aAAaC,sBAAsBC,iBA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AI8B,KAAK,8CAA8C;MAAEuB;MAAWxB;IAAM,GAAA;;;;;;EAC5E;AACF;",
6
+ "names": ["Effect", "Capabilities", "Capability", "LayoutOperation", "fromUrlPath", "getWorkspaceFromPath", "toUrlPath", "log", "isTauri", "Capability", "makeModule", "fnUntraced", "invokeSync", "get", "Capabilities", "OperationInvoker", "handlePathNavigation", "pathname", "log", "info", "qualifiedId", "fromUrlPath", "workspace", "getWorkspaceFromPath", "LayoutOperation", "SwitchWorkspace", "subject", "activeId", "undefined", "Open", "onNavigation", "handleNavigation", "sync", "window", "addEventListener", "unlistenDeepLink", "isTauri", "tryPromise", "try", "getCurrent", "onOpenUrl", "launchUrls", "length", "urls", "url", "handleDeepLink", "catch", "error", "warn", "pipe", "catchAll", "void", "lastWorkspace", "lastActive", "unsubscribe", "subscribeAtom", "SimpleLayoutStateCapability", "state", "active", "path", "toUrlPath", "location", "history", "pushState", "search", "contributes", "Null", "removeEventListener", "isRedirectPath", "startsWith", "navigate", "urlString", "URL"]
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"operation-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/operation-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAgB/D,wBAkME"}
1
+ {"version":3,"file":"operation-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/operation-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAS/D,wBA0LE"}
@@ -1 +1 @@
1
- {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAc/D,wBAmBE"}
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAc/D,wBAqBE"}
@@ -2,8 +2,8 @@ import * as Effect from 'effect/Effect';
2
2
  import { Capability } from '@dxos/app-framework';
3
3
  /**
4
4
  * URL handler for simple layout that syncs browser URL with layout state.
5
- * URL format: /{workspace} or /{workspace}/{active}
6
- * Root is represented as / or /root.
5
+ * URL paths map directly to qualified graph IDs with the leading `root` segment stripped.
6
+ * Root is represented as `/`.
7
7
  *
8
8
  * On mobile Tauri, also listens for deep links via the deep-link plugin.
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"url-handler.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/url-handler/url-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAQ/D;;;;;;GAMG;;AACH,wBAyFE"}
1
+ {"version":3,"file":"url-handler.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/url-handler/url-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAO/D;;;;;;GAMG;;AACH,wBAiFE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentLoading.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentLoading/ContentLoading.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,cAAc,yBAE1B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentLoading.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentLoading/ContentLoading.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjE,QAAA,MAAM,IAAI;;;;;;;CAO6B,CAAC;AAExC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ContentLoading';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentLoading/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export type NavBranchProps = {
3
+ id: string;
4
+ };
5
+ /**
6
+ * Renders the children of a graph branch node as a searchable mosaic list.
7
+ * Used for any node with `role: 'branch'` or a workspace disposition, including
8
+ * spaces, collection sections, type sections, and schema nodes.
9
+ */
10
+ export declare const NavBranch: ({ id }: NavBranchProps) => React.JSX.Element;
11
+ //# sourceMappingURL=NavBranch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavBranch.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavBranch/NavBranch.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAevE,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,cAAc,sBA0C/C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './NavBranch';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavBranch/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Main.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAmBvC;;GAEG;AACH,eAAO,MAAM,IAAI;;;CAsDhB,CAAC"}
1
+ {"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Main.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAmBvC;;GAEG;AACH,eAAO,MAAM,IAAI;;;CAqDhB,CAAC"}
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Hook to expand graph nodes two levels deep when directly linked to.
2
+ * Expand graph nodes along the full path from root to the given node ID.
3
+ * Walks each progressive prefix, ensuring ancestor nodes are materialized
4
+ * before attempting to access their children.
3
5
  */
4
- export declare const useLoadDescendents: (nodeId?: string) => void;
6
+ export declare const useExpandPath: (nodeId?: string) => void;
5
7
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,SAajD,CAAC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,SAU5C,CAAC"}
@@ -3,5 +3,5 @@ export * from './Home';
3
3
  export * from './MobileLayout';
4
4
  export * from './Popover';
5
5
  export * from './SimpleLayout';
6
- export * from './Workspace';
6
+ export * from './NavBranch';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,16 +1,15 @@
1
1
  import { type Atom } from '@effect-atom/atom-react';
2
- import { type Capabilities } from '@dxos/app-framework';
3
2
  import { type AppCapabilities } from '@dxos/app-toolkit';
4
3
  import { type ActionGraphProps } from '@dxos/react-ui-menu';
5
4
  import { type SimpleLayoutState } from '../types';
6
- export declare const PLANK_COMPANION_TYPE = "dxos.org/plugin/deck/plank-companion";
5
+ export declare const PLANK_COMPANION_TYPE = "org.dxos.plugin.deck.plank-companion";
7
6
  export type CompanionActionsConfig = {
8
7
  /** Prefix for companion action IDs (e.g. 'navbar' or 'drawer') */
9
8
  idPrefix: string;
10
9
  /** Optional: highlight companion with this variant */
11
10
  selectedVariant?: string;
12
- /** invokeSync function for dispatching operations */
13
- invokeSync: Capabilities.OperationInvoker['invokeSync'];
11
+ /** State updater for toggling the drawer. */
12
+ updateState: (fn: (state: SimpleLayoutState) => SimpleLayoutState) => void;
14
13
  };
15
14
  /**
16
15
  * Creates action graph nodes and edges for companion actions.
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,mBAAmB,CAAC;AAG1E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,eAAO,MAAM,oBAAoB,yCAAyC,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG;IACnC,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,UAAU,EAAE,YAAY,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;CACzD,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,sBAAsB,GACjC,OAAO,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EACxC,WAAW,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,EACvC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,EAClC,QAAQ,sBAAsB,KAC7B,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,OAAO,CA8C1C,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,KAAK,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,eAAO,MAAM,oBAAoB,yCAAyC,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG;IACnC,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6CAA6C;IAC7C,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,iBAAiB,KAAK,IAAI,CAAC;CAC5E,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,sBAAsB,GACjC,OAAO,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EACxC,WAAW,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,EACvC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,EAClC,QAAQ,sBAAsB,KAC7B,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,OAAO,CA8C1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAppBarProps.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAppBarProps.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,IAAI,CAAC,WAAW,EAAE,YAAY,CA2F/D,CAAC"}
1
+ {"version":3,"file":"useAppBarProps.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAppBarProps.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,IAAI,CAAC,WAAW,EAAE,YAAY,CA0F/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDrawerActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDrawerActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAQ/C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;AASrG,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,gCAAgC;IAChC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,KAAG,aAkEvD,CAAC"}
1
+ {"version":3,"file":"useDrawerActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDrawerActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAQ/C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;AASrG,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,gCAAgC;IAChC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,KAAG,aAoEvD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useNavbarActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useNavbarActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAO/C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAGtB,MAAM,qBAAqB,CAAC;AAS7B,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,gCAAgC;IAChC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,aAiDnC,CAAC"}
1
+ {"version":3,"file":"useNavbarActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useNavbarActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAO/C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAGtB,MAAM,qBAAqB,CAAC;AAU7B,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,gCAAgC;IAChC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,aAiDnC,CAAC"}