@dxos/plugin-simple-layout 0.8.4-main.937b3ca → 0.8.4-main.bc674ce

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 (83) hide show
  1. package/dist/lib/browser/{chunk-FK4M7GJV.mjs → chunk-LR3EE3VB.mjs} +298 -122
  2. package/dist/lib/browser/chunk-LR3EE3VB.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-CLPGTNWJ.mjs → chunk-P77G4YTR.mjs} +1 -1
  4. package/dist/lib/browser/chunk-P77G4YTR.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +13 -7
  6. package/dist/lib/browser/index.mjs.map +2 -2
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/{operation-resolver-LTB63NKP.mjs → operation-resolver-775UYAC2.mjs} +50 -15
  9. package/dist/lib/browser/operation-resolver-775UYAC2.mjs.map +7 -0
  10. package/dist/lib/browser/{react-root-6ARAPH3O.mjs → react-root-KM55OMGJ.mjs} +3 -3
  11. package/dist/lib/browser/{react-surface-SO7B23GS.mjs → react-surface-BABGAWGY.mjs} +3 -3
  12. package/dist/lib/browser/{state-H4IGICBB.mjs → state-OUFTC2KV.mjs} +5 -3
  13. package/dist/lib/browser/state-OUFTC2KV.mjs.map +7 -0
  14. package/dist/lib/browser/{url-handler-7CFGTLNG.mjs → url-handler-DOUFQIAC.mjs} +2 -2
  15. package/dist/lib/node-esm/{chunk-MUVVYBUE.mjs → chunk-F5TEKVJG.mjs} +1 -1
  16. package/dist/lib/node-esm/chunk-F5TEKVJG.mjs.map +7 -0
  17. package/dist/lib/node-esm/{chunk-EGFZAVBD.mjs → chunk-HB2B3LLG.mjs} +298 -122
  18. package/dist/lib/node-esm/chunk-HB2B3LLG.mjs.map +7 -0
  19. package/dist/lib/node-esm/index.mjs +13 -7
  20. package/dist/lib/node-esm/index.mjs.map +2 -2
  21. package/dist/lib/node-esm/meta.json +1 -1
  22. package/dist/lib/node-esm/{operation-resolver-7O6O7T4Q.mjs → operation-resolver-LDNYS3DI.mjs} +50 -15
  23. package/dist/lib/node-esm/operation-resolver-LDNYS3DI.mjs.map +7 -0
  24. package/dist/lib/node-esm/{react-root-2CPA2ZUS.mjs → react-root-36UYFEEB.mjs} +3 -3
  25. package/dist/lib/node-esm/{react-surface-FKAV56MO.mjs → react-surface-CGHFVWU3.mjs} +3 -3
  26. package/dist/lib/node-esm/{state-QIU2LMLT.mjs → state-Q2ZA26W5.mjs} +5 -3
  27. package/dist/lib/node-esm/state-Q2ZA26W5.mjs.map +7 -0
  28. package/dist/lib/node-esm/{url-handler-4LYP3JM7.mjs → url-handler-DVAZZEUO.mjs} +2 -2
  29. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/state/state.d.ts.map +1 -1
  31. package/dist/types/src/components/ContentError.stories.d.ts +6 -0
  32. package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
  33. package/dist/types/src/components/SimpleLayout/Banner.d.ts.map +1 -1
  34. package/dist/types/src/components/SimpleLayout/Drawer.d.ts +9 -0
  35. package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -0
  36. package/dist/types/src/components/SimpleLayout/Main.d.ts +1 -1
  37. package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
  38. package/dist/types/src/components/SimpleLayout/NavBar.d.ts +5 -2
  39. package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
  40. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +10 -6
  41. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/SimpleLayout/SimpleLayout.d.ts.map +1 -1
  43. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +10 -0
  44. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
  45. package/dist/types/src/components/hooks.d.ts.map +1 -1
  46. package/dist/types/src/hooks/index.d.ts +1 -0
  47. package/dist/types/src/hooks/index.d.ts.map +1 -1
  48. package/dist/types/src/hooks/useCompanions.d.ts +8 -0
  49. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -0
  50. package/dist/types/src/translations.d.ts +6 -0
  51. package/dist/types/src/translations.d.ts.map +1 -1
  52. package/dist/types/src/types/capabilities.d.ts +5 -1
  53. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  54. package/dist/types/tsconfig.tsbuildinfo +1 -1
  55. package/package.json +23 -23
  56. package/src/capabilities/operation-resolver/operation-resolver.ts +50 -13
  57. package/src/capabilities/state/state.tsx +2 -0
  58. package/src/components/SimpleLayout/Banner.tsx +35 -4
  59. package/src/components/SimpleLayout/Drawer.tsx +151 -0
  60. package/src/components/SimpleLayout/Main.tsx +31 -40
  61. package/src/components/SimpleLayout/NavBar.stories.tsx +0 -3
  62. package/src/components/SimpleLayout/NavBar.tsx +29 -37
  63. package/src/components/SimpleLayout/SimpleLayout.stories.tsx +4 -0
  64. package/src/components/SimpleLayout/SimpleLayout.tsx +26 -6
  65. package/src/components/hooks.ts +8 -12
  66. package/src/hooks/index.ts +1 -0
  67. package/src/hooks/useCompanions.ts +19 -0
  68. package/src/translations.ts +6 -0
  69. package/src/types/capabilities.ts +6 -1
  70. package/dist/lib/browser/chunk-CLPGTNWJ.mjs.map +0 -7
  71. package/dist/lib/browser/chunk-FK4M7GJV.mjs.map +0 -7
  72. package/dist/lib/browser/operation-resolver-LTB63NKP.mjs.map +0 -7
  73. package/dist/lib/browser/state-H4IGICBB.mjs.map +0 -7
  74. package/dist/lib/node-esm/chunk-EGFZAVBD.mjs.map +0 -7
  75. package/dist/lib/node-esm/chunk-MUVVYBUE.mjs.map +0 -7
  76. package/dist/lib/node-esm/operation-resolver-7O6O7T4Q.mjs.map +0 -7
  77. package/dist/lib/node-esm/state-QIU2LMLT.mjs.map +0 -7
  78. /package/dist/lib/browser/{react-root-6ARAPH3O.mjs.map → react-root-KM55OMGJ.mjs.map} +0 -0
  79. /package/dist/lib/browser/{react-surface-SO7B23GS.mjs.map → react-surface-BABGAWGY.mjs.map} +0 -0
  80. /package/dist/lib/browser/{url-handler-7CFGTLNG.mjs.map → url-handler-DOUFQIAC.mjs.map} +0 -0
  81. /package/dist/lib/node-esm/{react-root-2CPA2ZUS.mjs.map → react-root-36UYFEEB.mjs.map} +0 -0
  82. /package/dist/lib/node-esm/{react-surface-FKAV56MO.mjs.map → react-surface-CGHFVWU3.mjs.map} +0 -0
  83. /package/dist/lib/node-esm/{url-handler-4LYP3JM7.mjs.map → url-handler-DVAZZEUO.mjs.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/operation-resolver/operation-resolver.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Operation, OperationResolver } from '@dxos/operation';\nimport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nimport { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../../types';\n\n/** Maximum number of items to keep in navigation history. */\nconst MAX_HISTORY_LENGTH = 50;\n\n/** Parse entry ID to extract primary ID and variant. */\nconst parseEntryId = (entryId: string) => {\n const [id, variant] = entryId.split(ATTENDABLE_PATH_SEPARATOR);\n return { id, variant };\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const registry = yield* Capability.get(Common.Capability.AtomRegistry);\n const stateAtom = yield* Capability.get(SimpleLayoutStateCapability);\n\n const getState = () => registry.get(stateAtom);\n const updateState = (fn: (current: SimpleLayoutState) => SimpleLayoutState) => {\n registry.set(stateAtom, fn(getState()));\n };\n\n return Capability.contributes(Common.Capability.OperationResolver, [\n //\n // SetLayoutMode\n //\n // TODO(burdon): No-op for to fix startup bug?\n OperationResolver.make({\n operation: Common.LayoutOperation.SetLayoutMode,\n handler: Effect.fnUntraced(function* () {}),\n }),\n\n //\n // UpdateSidebar - No-op for simple layout.\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.UpdateSidebar,\n handler: () => Effect.void,\n }),\n\n //\n // UpdateComplementary - Controls companion drawer.\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.UpdateComplementary,\n handler: Effect.fnUntraced(function* (input) {\n if (input.state === 'closed') {\n updateState((state) => ({\n ...state,\n drawerState: 'closed',\n }));\n }\n }),\n }),\n\n //\n // UpdateDialog\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.UpdateDialog,\n handler: Effect.fnUntraced(function* (input) {\n updateState((state) => ({\n ...state,\n dialogOpen: input.state ?? Boolean(input.subject),\n dialogType: input.type ?? 'default',\n dialogBlockAlign: input.blockAlign ?? 'center',\n dialogOverlayClasses: input.overlayClasses,\n dialogOverlayStyle: input.overlayStyle,\n dialogContent: input.subject ? { component: input.subject, props: input.props } : undefined,\n }));\n }),\n }),\n\n //\n // UpdatePopover\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.UpdatePopover,\n handler: Effect.fnUntraced(function* (input) {\n updateState((state) => ({\n ...state,\n popoverOpen: input.state ?? Boolean(input.subject),\n popoverKind: input.kind ?? 'base',\n popoverTitle: input.kind === 'card' ? input.title : undefined,\n popoverContent:\n typeof input.subject === 'string'\n ? { component: input.subject, props: input.props }\n : input.subject\n ? { subject: input.subject }\n : undefined,\n popoverSide: input.side,\n popoverVariant: input.variant,\n popoverAnchor: input.variant === 'virtual' ? input.anchor : state.popoverAnchor,\n popoverAnchorId: input.variant !== 'virtual' ? input.anchorId : state.popoverAnchorId,\n }));\n }),\n }),\n\n //\n // SwitchWorkspace\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.SwitchWorkspace,\n handler: Effect.fnUntraced(function* (input) {\n updateState((state) => ({\n ...state,\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n previousWorkspace: !state.workspace.startsWith('!') ? state.workspace : state.previousWorkspace,\n workspace: input.subject,\n active: undefined,\n // Clear history when switching workspaces.\n history: [],\n }));\n }),\n }),\n\n //\n // RevertWorkspace\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.RevertWorkspace,\n handler: Effect.fnUntraced(function* () {\n const state = getState();\n yield* Operation.invoke(Common.LayoutOperation.SwitchWorkspace, {\n subject: state.previousWorkspace,\n });\n }),\n }),\n\n //\n // Open\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.Open,\n handler: Effect.fnUntraced(function* (input) {\n const id = input.subject[0];\n const { variant } = parseEntryId(id);\n\n if (variant) {\n // It's a companion - store the variant preference and open drawer.\n updateState((state) => ({\n ...state,\n companionVariant: variant,\n // Open drawer if closed, otherwise preserve current state (expanded/full).\n drawerState: state.drawerState === 'closed' || !state.drawerState ? 'expanded' : state.drawerState,\n }));\n } else {\n // Regular navigation - update active and history.\n updateState((state) => {\n // Push current active to history if it exists.\n const newHistory = state.active ? [...state.history, state.active] : state.history;\n // Limit history length to prevent memory issues.\n const trimmedHistory =\n newHistory.length > MAX_HISTORY_LENGTH ? newHistory.slice(-MAX_HISTORY_LENGTH) : newHistory;\n return {\n ...state,\n active: id,\n history: trimmedHistory,\n };\n });\n }\n }),\n }),\n\n //\n // Close\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.Close,\n handler: Effect.fnUntraced(function* () {\n updateState((state) => {\n // Pop from history if available.\n if (state.history.length > 0) {\n const newHistory = [...state.history];\n const previousActive = newHistory.pop();\n return {\n ...state,\n active: previousActive,\n history: newHistory,\n };\n }\n // No history, just clear active.\n return {\n ...state,\n active: undefined,\n };\n });\n }),\n }),\n\n //\n // Set\n //\n OperationResolver.make({\n operation: Common.LayoutOperation.Set,\n handler: Effect.fnUntraced(function* (input) {\n updateState((state) => ({\n ...state,\n active: input.subject[0],\n }));\n }),\n }),\n ]);\n }),\n);\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,W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,SAAgBjB,kBAAW,WAAWqB,OAAK;AACzCb,oBAAY,CAACc,WAAW;UACtB,GAAGA;UACHoC,QAAQrC,MAAMM,QAAQ,CAAA;QACxB,EAAA;MACF,CAAA;IACF,CAAA;GACD;AACH,CAAA,CAAA;",
6
+ "names": ["Effect", "Capability", "Common", "Operation", "OperationResolver", "ATTENDABLE_PATH_SEPARATOR", "MAX_HISTORY_LENGTH", "parseEntryId", "entryId", "id", "variant", "split", "ATTENDABLE_PATH_SEPARATOR", "Capability", "makeModule", "fnUntraced", "registry", "get", "Common", "AtomRegistry", "stateAtom", "SimpleLayoutStateCapability", "getState", "updateState", "fn", "set", "contributes", "OperationResolver", "make", "operation", "LayoutOperation", "SetLayoutMode", "handler", "UpdateSidebar", "void", "UpdateComplementary", "input", "state", "drawerState", "UpdateDialog", "dialogOpen", "Boolean", "subject", "dialogType", "type", "dialogBlockAlign", "blockAlign", "dialogOverlayClasses", "overlayClasses", "dialogOverlayStyle", "overlayStyle", "dialogContent", "component", "props", "undefined", "UpdatePopover", "popoverOpen", "popoverKind", "kind", "popoverTitle", "title", "popoverContent", "popoverSide", "side", "popoverVariant", "popoverAnchor", "anchor", "popoverAnchorId", "anchorId", "SwitchWorkspace", "previousWorkspace", "workspace", "startsWith", "active", "history", "RevertWorkspace", "Operation", "invoke", "Open", "companionVariant", "newHistory", "trimmedHistory", "length", "slice", "Close", "previousActive", "pop", "Set"]
7
+ }
@@ -1,10 +1,10 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  SimpleLayout
4
- } from "./chunk-EGFZAVBD.mjs";
4
+ } from "./chunk-HB2B3LLG.mjs";
5
5
  import {
6
6
  meta
7
- } from "./chunk-MUVVYBUE.mjs";
7
+ } from "./chunk-F5TEKVJG.mjs";
8
8
 
9
9
  // src/capabilities/react-root/react-root.tsx
10
10
  import * as Effect from "effect/Effect";
@@ -19,4 +19,4 @@ var react_root_default = Capability.makeModule(() => Effect.succeed(Capability.c
19
19
  export {
20
20
  react_root_default as default
21
21
  };
22
- //# sourceMappingURL=react-root-2CPA2ZUS.mjs.map
22
+ //# sourceMappingURL=react-root-36UYFEEB.mjs.map
@@ -2,10 +2,10 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  Home,
4
4
  Workspace
5
- } from "./chunk-EGFZAVBD.mjs";
5
+ } from "./chunk-HB2B3LLG.mjs";
6
6
  import {
7
7
  meta
8
- } from "./chunk-MUVVYBUE.mjs";
8
+ } from "./chunk-F5TEKVJG.mjs";
9
9
 
10
10
  // src/capabilities/react-surface/react-surface.tsx
11
11
  import * as Effect from "effect/Effect";
@@ -37,4 +37,4 @@ var react_surface_default = Capability.makeModule(() => Effect.succeed(Capabilit
37
37
  export {
38
38
  react_surface_default as default
39
39
  };
40
- //# sourceMappingURL=react-surface-FKAV56MO.mjs.map
40
+ //# sourceMappingURL=react-surface-CGHFVWU3.mjs.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  SimpleLayoutState
4
- } from "./chunk-MUVVYBUE.mjs";
4
+ } from "./chunk-F5TEKVJG.mjs";
5
5
 
6
6
  // src/capabilities/state/state.tsx
7
7
  import { Atom } from "@effect-atom/atom-react";
@@ -13,7 +13,9 @@ var defaultState = {
13
13
  workspace: Node.RootId,
14
14
  previousWorkspace: Node.RootId,
15
15
  history: [],
16
- isPopover: false
16
+ isPopover: false,
17
+ companionVariant: void 0,
18
+ drawerState: "closed"
17
19
  };
18
20
  var state_default = Capability.makeModule(({ initialState } = {}) => Effect.sync(() => {
19
21
  const stateAtom = Atom.make({
@@ -43,4 +45,4 @@ var state_default = Capability.makeModule(({ initialState } = {}) => Effect.sync
43
45
  export {
44
46
  state_default as default
45
47
  };
46
- //# sourceMappingURL=state-QIU2LMLT.mjs.map
48
+ //# sourceMappingURL=state-Q2ZA26W5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/state/state.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Node } from '@dxos/plugin-graph';\n\nimport { type SimpleLayoutState } from '../../types';\nimport { SimpleLayoutState as SimpleLayoutStateCapability } from '../../types';\n\nconst defaultState: SimpleLayoutState = {\n dialogOpen: false,\n workspace: Node.RootId,\n previousWorkspace: Node.RootId,\n history: [],\n isPopover: false,\n companionVariant: undefined,\n drawerState: 'closed',\n};\n\nexport type SimpleLayoutStateOptions = {\n initialState?: Partial<SimpleLayoutState>;\n};\n\nexport default Capability.makeModule(({ initialState }: SimpleLayoutStateOptions = {}) =>\n Effect.sync(() => {\n const stateAtom = Atom.make<SimpleLayoutState>({ ...defaultState, ...initialState });\n\n const layoutAtom = Atom.make((get): Common.Capability.Layout => {\n const state = get(stateAtom);\n return {\n mode: 'simple',\n dialogOpen: state.dialogOpen,\n sidebarOpen: false,\n complementarySidebarOpen: false,\n workspace: state.workspace,\n active: state.active ? [state.active] : [],\n inactive: [],\n scrollIntoView: undefined,\n };\n });\n\n return [\n Capability.contributes(SimpleLayoutStateCapability, stateAtom),\n Capability.contributes(Common.Capability.Layout, layoutAtom),\n ];\n }),\n);\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,YAAY;AACrB,YAAYC,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,YAAY;AAKrB,IAAMC,eAAkC;EACtCC,YAAY;EACZC,WAAWC,KAAKC;EAChBC,mBAAmBF,KAAKC;EACxBE,SAAS,CAAA;EACTC,WAAW;EACXC,kBAAkBC;EAClBC,aAAa;AACf;AAMA,IAAA,gBAAeC,WAAWC,WAAW,CAAC,EAAEC,aAAY,IAA+B,CAAC,MAC3EC,YAAK,MAAA;AACV,QAAMC,YAAYC,KAAKC,KAAwB;IAAE,GAAGjB;IAAc,GAAGa;EAAa,CAAA;AAElF,QAAMK,aAAaF,KAAKC,KAAK,CAACE,QAAAA;AAC5B,UAAMC,QAAQD,IAAIJ,SAAAA;AAClB,WAAO;MACLM,MAAM;MACNpB,YAAYmB,MAAMnB;MAClBqB,aAAa;MACbC,0BAA0B;MAC1BrB,WAAWkB,MAAMlB;MACjBsB,QAAQJ,MAAMI,SAAS;QAACJ,MAAMI;UAAU,CAAA;MACxCC,UAAU,CAAA;MACVC,gBAAgBjB;IAClB;EACF,CAAA;AAEA,SAAO;IACLE,WAAWgB,YAAYC,mBAA6Bb,SAAAA;IACpDJ,WAAWgB,YAAYE,OAAOlB,WAAWmB,QAAQZ,UAAAA;;AAErD,CAAA,CAAA;",
6
+ "names": ["Atom", "Effect", "Capability", "Common", "Node", "defaultState", "dialogOpen", "workspace", "Node", "RootId", "previousWorkspace", "history", "isPopover", "companionVariant", "undefined", "drawerState", "Capability", "makeModule", "initialState", "sync", "stateAtom", "Atom", "make", "layoutAtom", "get", "state", "mode", "sidebarOpen", "complementarySidebarOpen", "active", "inactive", "scrollIntoView", "contributes", "SimpleLayoutStateCapability", "Common", "Layout"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  SimpleLayoutState
4
- } from "./chunk-MUVVYBUE.mjs";
4
+ } from "./chunk-F5TEKVJG.mjs";
5
5
 
6
6
  // src/capabilities/url-handler/url-handler.ts
7
7
  import * as Effect from "effect/Effect";
@@ -52,4 +52,4 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
52
52
  export {
53
53
  url_handler_default as default
54
54
  };
55
- //# sourceMappingURL=url-handler-4LYP3JM7.mjs.map
55
+ //# sourceMappingURL=url-handler-DVAZZEUO.mjs.map
@@ -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,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAQzD,wBAmKE"}
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,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAezD,wBAiME"}
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/state/state.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAWrD,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;;;;;;;;;;;AAEF,wBAuBE"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/state/state.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAarD,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;;;;;;;;;;;AAEF,wBAuBE"}
@@ -20,8 +20,14 @@ declare const meta: {
20
20
  readonly 'profile label': "Profile";
21
21
  readonly 'app menu label': "App menu";
22
22
  readonly 'main menu label': "Main menu";
23
+ readonly 'companions menu label': "Companions";
23
24
  readonly 'error fallback message': "An error occurred";
24
25
  readonly 'search placeholder': "Search...";
26
+ readonly 'drawer label': "Drawer";
27
+ readonly 'close drawer label': "Close drawer";
28
+ readonly 'expand drawer label': "Expand drawer";
29
+ readonly 'collapse drawer label': "Collapse drawer";
30
+ readonly 'actions menu label': "Actions";
25
31
  };
26
32
  };
27
33
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"ContentError.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ContentError.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQjE,QAAA,MAAM,IAAI;;;aACE,CAAC;;;;;;;yBALJ,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;CAYY,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC"}
1
+ {"version":3,"file":"ContentError.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ContentError.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQjE,QAAA,MAAM,IAAI;;;aACE,CAAC;;;;;;;yBALJ,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAYY,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Banner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAS,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAc,KAAK,eAAe,EAA8C,MAAM,gBAAgB,CAAC;AAiB9G,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;IACxC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,MAAM,GAAI,sBAAsB,WAAW,6BAmDvD,CAAC"}
1
+ {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Banner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,EAAS,IAAI,EAA+B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAuB,KAAK,eAAe,EAA8C,MAAM,gBAAgB,CAAC;AAkBvH,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;IACxC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,MAAM,GAAI,sBAAsB,WAAW,6BAiFvD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ /**
3
+ * Companion drawer component.
4
+ */
5
+ export declare const Drawer: {
6
+ (): React.JSX.Element | null;
7
+ displayName: string;
8
+ };
9
+ //# sourceMappingURL=Drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAcpD;;GAEG;AACH,eAAO,MAAM,MAAM;;;CA0FlB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Main root component.
3
+ * Main content component.
4
4
  */
5
5
  export declare const Main: {
6
6
  (): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Main.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAiBpD;;GAEG;AACH,eAAO,MAAM,IAAI;;;CAgDhB,CAAC"}
1
+ {"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Main.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAiBvC;;GAEG;AACH,eAAO,MAAM,IAAI;;;CA6ChB,CAAC"}
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
3
  export type NavBarProps = ThemedClassName<{
4
+ /** Active AppGraph node ID. */
4
5
  activeId?: string;
5
- onActiveIdChange?: (nextActiveId: string | null) => void;
6
6
  }>;
7
- export declare const NavBar: ({ classNames, activeId, onActiveIdChange }: NavBarProps) => React.JSX.Element;
7
+ export declare const NavBar: {
8
+ ({ classNames, activeId }: NavBarProps): React.JSX.Element;
9
+ displayName: string;
10
+ };
8
11
  //# sourceMappingURL=NavBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAc,KAAK,eAAe,EAAoC,MAAM,gBAAgB,CAAC;AAMpG,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC1D,CAAC,CAAC;AAEH,eAAO,MAAM,MAAM,GAAI,4CAA4C,WAAW,sBAsD7E,CAAC"}
1
+ {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAc,KAAK,eAAe,EAAuD,MAAM,gBAAgB,CAAC;AASvH,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;IACxC,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC,CAAC;AAEH,eAAO,MAAM,MAAM;+BAA8B,WAAW;;CAwC3D,CAAC"}
@@ -1,7 +1,10 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ classNames, activeId, onActiveIdChange }: import("./NavBar").NavBarProps) => import("react").JSX.Element;
4
+ component: {
5
+ ({ classNames, activeId }: import("./NavBar").NavBarProps): import("react").JSX.Element;
6
+ displayName: string;
7
+ };
5
8
  decorators: import("@storybook/react").Decorator[];
6
9
  parameters: {
7
10
  layout: string;
@@ -18,17 +21,18 @@ declare const meta: {
18
21
  readonly 'profile label': "Profile";
19
22
  readonly 'app menu label': "App menu";
20
23
  readonly 'main menu label': "Main menu";
24
+ readonly 'companions menu label': "Companions";
21
25
  readonly 'error fallback message': "An error occurred";
22
26
  readonly 'search placeholder': "Search...";
27
+ readonly 'drawer label': "Drawer";
28
+ readonly 'close drawer label': "Close drawer";
29
+ readonly 'expand drawer label': "Expand drawer";
30
+ readonly 'collapse drawer label': "Collapse drawer";
31
+ readonly 'actions menu label': "Actions";
23
32
  };
24
33
  };
25
34
  }];
26
35
  };
27
- argTypes: {
28
- onActiveIdChange: {
29
- action: string;
30
- };
31
- };
32
36
  };
33
37
  export default meta;
34
38
  type Story = StoryObj<typeof meta>;
@@ -1 +1 @@
1
- {"version":3,"file":"NavBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUjE,QAAA,MAAM,IAAI;;;;;;;;yBARoD,CACzD,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;CAuBkB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC"}
1
+ {"version":3,"file":"NavBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUjE,QAAA,MAAM,IAAI;;;;;;;;;;;yBARoD,CACzD,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAoBkB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,YAAY,yBAQxB,CAAC"}
1
+ {"version":3,"file":"SimpleLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAY3C,eAAO,MAAM,YAAY,yBAuBxB,CAAC"}
@@ -17,8 +17,14 @@ declare const meta: {
17
17
  readonly 'profile label': "Profile";
18
18
  readonly 'app menu label': "App menu";
19
19
  readonly 'main menu label': "Main menu";
20
+ readonly 'companions menu label': "Companions";
20
21
  readonly 'error fallback message': "An error occurred";
21
22
  readonly 'search placeholder': "Search...";
23
+ readonly 'drawer label': "Drawer";
24
+ readonly 'close drawer label': "Close drawer";
25
+ readonly 'expand drawer label': "Expand drawer";
26
+ readonly 'collapse drawer label': "Collapse drawer";
27
+ readonly 'actions menu label': "Actions";
22
28
  };
23
29
  };
24
30
  } | {
@@ -32,6 +38,10 @@ declare const meta: {
32
38
  };
33
39
  export default meta;
34
40
  type Story = StoryObj<typeof meta>;
41
+ /**
42
+ * NOTE: To expose to iphone on network:
43
+ * `moon run storybook-react:serve dev -H 0.0.0.0`
44
+ */
35
45
  export declare const Default: Story;
36
46
  export declare const Popover: Story;
37
47
  //# sourceMappingURL=SimpleLayout.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleLayout.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA4EjE,QAAA,MAAM,IAAI;;;;;;;yBAzEW,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAgFA,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
1
+ {"version":3,"file":"SimpleLayout.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA4EjE,QAAA,MAAM,IAAI;;;;;;;yBAzEW,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFA,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -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,SAiBjD,CAAC"}
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,2 +1,3 @@
1
+ export * from './useCompanions';
1
2
  export * from './useSimpleLayoutState';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const useCompanions: (id?: string) => Readonly<{
2
+ id: string;
3
+ type: string;
4
+ cacheable?: string[];
5
+ properties: Readonly<Record<string, any>>;
6
+ data: any;
7
+ }>[];
8
+ //# sourceMappingURL=useCompanions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCompanions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCompanions.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM;;;;;;IAKxC,CAAC"}
@@ -12,8 +12,14 @@ export declare const translations: [{
12
12
  readonly 'profile label': "Profile";
13
13
  readonly 'app menu label': "App menu";
14
14
  readonly 'main menu label': "Main menu";
15
+ readonly 'companions menu label': "Companions";
15
16
  readonly 'error fallback message': "An error occurred";
16
17
  readonly 'search placeholder': "Search...";
18
+ readonly 'drawer label': "Drawer";
19
+ readonly 'close drawer label': "Close drawer";
20
+ readonly 'expand drawer label': "Expand drawer";
21
+ readonly 'collapse drawer label': "Collapse drawer";
22
+ readonly 'actions menu label': "Actions";
17
23
  };
18
24
  };
19
25
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;UAaR;;EAGwB,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;UAmBR;;EAGwB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type Atom } from '@effect-atom/atom-react';
2
2
  import { Capability } from '@dxos/app-framework';
3
- import { type Label } from '@dxos/react-ui';
3
+ import { type DrawerState, type Label } from '@dxos/react-ui';
4
4
  export type SimpleLayoutState = {
5
5
  /** Data to be passed to the main content Surface. */
6
6
  content?: any;
@@ -26,6 +26,10 @@ export type SimpleLayoutState = {
26
26
  history: string[];
27
27
  /** Whether running in popover window context (hides mobile-specific UI). */
28
28
  isPopover?: boolean;
29
+ /** Variant of the companion to display in the drawer (e.g., "comments", "assistant-chat"). */
30
+ companionVariant?: string;
31
+ /** State of the companion drawer. */
32
+ drawerState?: DrawerState;
29
33
  };
30
34
  export declare const SimpleLayoutState: Capability.InterfaceDef<Atom.Writable<SimpleLayoutState, SimpleLayoutState>>;
31
35
  //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +1 @@
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;AAK5C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,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,GAAG,CAAC;IAEpB,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;IAC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