@dxos/plugin-stack 0.14.0 → 0.16.0-next-60712ab191a99ba90316cc4be753e9e11b17100a

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 (34) hide show
  1. package/dist/lib/Stack.mjs +1 -10
  2. package/dist/lib/StackEvents.mjs +1 -15
  3. package/dist/lib/StackPlugin.mjs +1 -16
  4. package/dist/lib/capabilities.browser.mjs +1 -2
  5. package/dist/lib/capabilities.browser.mjs.map +1 -1
  6. package/dist/lib/capabilities.mjs +1 -2
  7. package/dist/lib/capabilities.mjs.map +1 -1
  8. package/dist/lib/capabilities.tauri.mjs +1 -2
  9. package/dist/lib/capabilities.tauri.mjs.map +1 -1
  10. package/dist/lib/chunk-PLUGIN.mjs +1 -1
  11. package/dist/lib/chunk-Stack.mjs +10 -0
  12. package/dist/lib/chunk-Stack.mjs.map +1 -0
  13. package/dist/lib/chunk-StackEvents.mjs +15 -0
  14. package/dist/lib/chunk-StackEvents.mjs.map +1 -0
  15. package/dist/lib/chunk-StackPlugin.mjs +16 -0
  16. package/dist/lib/chunk-StackPlugin.mjs.map +1 -0
  17. package/dist/lib/components.mjs +2 -1
  18. package/dist/lib/components.mjs.map +1 -1
  19. package/dist/lib/index.mjs +1 -2
  20. package/dist/lib/meta.mjs.map +1 -1
  21. package/dist/lib/types.mjs +2 -2
  22. package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  25. package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
  26. package/dist/types/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +28 -28
  28. package/src/capabilities/gen/browser.ts +1 -3
  29. package/src/capabilities/gen/tauri.ts +1 -3
  30. package/src/capabilities/index.ts +1 -4
  31. package/src/components/Stack/Stack.tsx +2 -1
  32. package/dist/lib/Stack.mjs.map +0 -1
  33. package/dist/lib/StackEvents.mjs.map +0 -1
  34. package/dist/lib/StackPlugin.mjs.map +0 -1
@@ -1,10 +1 @@
1
- import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { DXN, Type } from "@dxos/echo";
3
- import * as Schema from "effect/Schema";
4
- //#region src/types/Stack.ts
5
- var Stack_exports = /* @__PURE__ */ __exportAll({ Stack: () => Stack });
6
- var Stack = class extends Type.makeObject(DXN.make("org.dxos.type.stack", "0.1.0"))(Schema.Struct({})) {};
7
- //#endregion
8
- export { Stack, Stack_exports as t };
9
-
10
- //# sourceMappingURL=Stack.mjs.map
1
+ export { t as Stack } from "./chunk-Stack.mjs";
@@ -1,15 +1 @@
1
- import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { meta } from "#meta";
3
- import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
4
- //#region src/types/StackEvents.ts
5
- var StackEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
6
- /**
7
- * The feature's start event: the plugin's start-gated modules (and cross-plugin
8
- * contributions consumed by this feature) activate here. Fired on demand and by the
9
- * host's idle trickle.
10
- */
11
- var Start = ActivationEvent.pluginStart(meta.profile.key);
12
- //#endregion
13
- export { Start, StackEvents_exports as t };
14
-
15
- //# sourceMappingURL=StackEvents.mjs.map
1
+ export { n as Start } from "./chunk-StackEvents.mjs";
@@ -1,16 +1 @@
1
- import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { meta as meta$1 } from "#meta";
3
- import * as Plugin from "@dxos/app-framework/Plugin";
4
- //#region src/StackPlugin.ts
5
- var StackPlugin_exports = /* @__PURE__ */ __exportAll({
6
- make: () => make,
7
- meta: () => meta
8
- });
9
- /** Plugin metadata, available without loading the plugin body. */
10
- var meta = meta$1;
11
- /** Constructs the plugin; the body loads on first enable. */
12
- var make = Plugin.lazy(meta, () => import("#plugin"));
13
- //#endregion
14
- export { make, meta, StackPlugin_exports as t };
15
-
16
- //# sourceMappingURL=StackPlugin.mjs.map
1
+ export { n as make, r as meta } from "./chunk-StackPlugin.mjs";
@@ -1,4 +1,3 @@
1
- import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
2
1
  import * as AppCapability from "@dxos/app-toolkit/AppCapability";
3
2
  import { translations } from "#translations";
4
3
  import { meta } from "#meta";
@@ -6,7 +5,7 @@ import { meta } from "#meta";
6
5
  var PluginAsset = AppCapability.pluginAsset({
7
6
  pluginId: meta.profile.key,
8
7
  path: "PLUGIN.mdl",
9
- content: PLUGIN_default,
8
+ content: () => import("./chunk-PLUGIN.mjs"),
10
9
  mimeType: "application/x-mdl"
11
10
  });
12
11
  var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: ["org.dxos.role.article"] });
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nimport pluginSpec from '../../../PLUGIN.mdl?raw';\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.article'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;;AAaA,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC;AAED,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO,CAAC,uBAAuB,EACjC,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,eAAe,cAAc,aAAa,YAAY"}
1
+ {"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.article'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;AAWA,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC;AAED,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO,CAAC,uBAAuB,EACjC,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,eAAe,cAAc,aAAa,YAAY"}
@@ -1,4 +1,3 @@
1
- import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
2
1
  import * as AppCapability from "@dxos/app-toolkit/AppCapability";
3
2
  import { translations } from "#translations";
4
3
  import { meta } from "#meta";
@@ -6,7 +5,7 @@ import { meta } from "#meta";
6
5
  var PluginAsset = AppCapability.pluginAsset({
7
6
  pluginId: meta.profile.key,
8
7
  path: "PLUGIN.mdl",
9
- content: PLUGIN_default,
8
+ content: () => import("./chunk-PLUGIN.mjs"),
10
9
  mimeType: "application/x-mdl"
11
10
  });
12
11
  var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: ["org.dxos.role.article"] });
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../../PLUGIN.mdl?raw';\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {\n roles: ['org.dxos.role.article'],\n});\nexport const Schema = AppCapability.schema(() => import('./schema.ts'));\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;;AAYA,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC;AACD,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAuB,EACpF,OAAO,CAAC,uBAAuB,EACjC,CAAC;AACD,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAc;AACtE,IAAa,eAAe,cAAc,aAAa,YAAY"}
1
+ {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {\n roles: ['org.dxos.role.article'],\n});\nexport const Schema = AppCapability.schema(() => import('./schema.ts'));\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;AASA,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC;AACD,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAuB,EACpF,OAAO,CAAC,uBAAuB,EACjC,CAAC;AACD,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAc;AACtE,IAAa,eAAe,cAAc,aAAa,YAAY"}
@@ -1,4 +1,3 @@
1
- import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
2
1
  import * as AppCapability from "@dxos/app-toolkit/AppCapability";
3
2
  import { translations } from "#translations";
4
3
  import { meta } from "#meta";
@@ -6,7 +5,7 @@ import { meta } from "#meta";
6
5
  var PluginAsset = AppCapability.pluginAsset({
7
6
  pluginId: meta.profile.key,
8
7
  path: "PLUGIN.mdl",
9
- content: PLUGIN_default,
8
+ content: () => import("./chunk-PLUGIN.mjs"),
10
9
  mimeType: "application/x-mdl"
11
10
  });
12
11
  var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: ["org.dxos.role.article"] });
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.tauri.mjs","names":[],"sources":["../../src/capabilities/gen/tauri.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.\n\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nimport pluginSpec from '../../../PLUGIN.mdl?raw';\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.article'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;;AAaA,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC;AAED,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO,CAAC,uBAAuB,EACjC,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,eAAe,cAAc,aAAa,YAAY"}
1
+ {"version":3,"file":"capabilities.tauri.mjs","names":[],"sources":["../../src/capabilities/gen/tauri.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.\n\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.article'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;AAWA,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC;AAED,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO,CAAC,uBAAuB,EACjC,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,eAAe,cAAc,aAAa,YAAY"}
@@ -1,6 +1,6 @@
1
1
  //#region PLUGIN.mdl?raw
2
2
  var PLUGIN_default = "---\nid: org.dxos.plugin.stack\nname: StackPlugin\nversion: 0.1.0\n---\n\nCollections plugin for `DXOS` Composer — renders any `Collection` object as a vertically scrollable stack of collapsible sections, where each section displays an arbitrary ECHO object via the `section` surface role. Supports adding, removing, navigating, and collapsing individual sections.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `scenario` | `org.dxos.mdl.scenario@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n\n## Types\n\n```mdl\ntype SectionSchema\n fields:\n height?: number # explicit height override for the section\n custom?: Record<string, any> # view-instance-specific data (e.g. cover mode for images)\n```\n\n```mdl\ntype StackViewType\n typename: org.dxos.type.stackView\n version: 0.1.0\n fields:\n sections: Record<string, SectionSchema>\n```\n\n```mdl\ntype StackSectionView\n fields:\n title?: string\n size?: StackItemSize\n height?: number\n collapsed?: boolean\n custom?: Record<string, any>\n```\n\n```mdl\ntype StackSectionMetadata\n fields:\n icon?: string\n placeholder?: Label\n viewActions?: (item: CollectionItem) => StackSectionAction\n```\n\n```mdl\ntype StackSectionItem\n fields:\n id: string # DXN string for the contained object\n object: Obj.Unknown\n view: StackSectionView\n metadata: StackSectionMetadata\n```\n\n```mdl\ntype AddSectionPosition\n literals: before | after | beforeAll | afterAll\n```\n\n```mdl\ntype StackSettingsProps\n fields:\n separation: boolean # whether visual separators are shown between sections\n```\n\n## Components\n\n```mdl\ncomponent StackArticle\n desc: Full-page article view of a Collection — renders items as a vertical stack of StackSection components with a toolbar for adding sections.\n props:\n subject: Collection\n role: AppSurface.Role\n attendableId?: string\n state:\n collapsedSections: Record<string, boolean> # collapsed state by DXN string\n items: StackSectionItem[] # derived from collection objects\n slots:\n (none)\n actions:\n handleAdd(id: string, position: AddSectionPosition)\n handleDelete(id: string)\n handleNavigate(id: string)\n handleCollapse(id: string, collapsed: boolean)\n handleAddSection()\n emits:\n (none)\n layout: |\n ┌──────────────────────────────┐\n │ Toolbar [+ Add Section] │\n ├──────────────────────────────┤\n │ Stack (vertical, intrinsic) │\n │ ┌────────────────────────┐ │\n │ │ StackSection │ │\n │ │ ▾ [icon] Title [→] │ │\n │ │ └─ Surface:section │ │\n │ └────────────────────────┘ │\n │ ┌────────────────────────┐ │\n │ │ StackSection (collapsed│ │\n │ │ ▸ [icon] Title [↕] │ │\n │ └────────────────────────┘ │\n │ … │\n └──────────────────────────────┘\n```\n\n```mdl\ncomponent StackSection\n desc: A single collapsible section in the stack — shows a sigil icon button with a dropdown menu and delegates content rendering to the section surface slot.\n props:\n id: string\n object: Obj.Unknown\n view: StackSectionView\n metadata: StackSectionMetadata\n state:\n optionsMenuOpen: boolean\n attendableId: string # composed as parentAttendableId/object.id\n slots:\n content: ReactNode # rendered by Surface(type=section, subject=object)\n actions:\n navigate(id: string)\n add(id: string, position: AddSectionPosition)\n collapse(id: string, collapsed: boolean)\n delete(id: string)\n layout: |\n ┌─────────────────────────────────┐\n │ StackItem.Heading │\n │ [sigil▾] (sticky) [→ or ↕] │\n ├─────────────────────────────────┤\n │ CollapsibleContent │\n │ Surface type=section │\n └─────────────────────────────────┘\n```\n\n```mdl\ncomponent StackSettings\n desc: Settings panel for configuring stack-level display preferences such as section separation.\n props:\n settings: StackSettingsProps\n layout: |\n ┌─────────────────────────────┐\n │ Settings.Section │\n │ Separation [toggle] │\n └─────────────────────────────┘\n```\n\n## Features\n\n```mdl\nfeat F-1: Stack Rendering\n\n req F-1.1: StackPlugin registers a surface for the article role filtered to Collection objects.\n req F-1.2: StackArticle renders each item in the collection as a StackSection in document order.\n req F-1.3: Each StackSection title is derived from the object's title property or graph node label.\n req F-1.4: The icon displayed on the section sigil is taken from the object schema's IconAnnotation.\n```\n\n```mdl\nfeat F-2: Section Management\n\n req F-2.1:\n when: user clicks the Add Section button in the toolbar\n then: SpaceOperation.OpenObjectForm dialog is invoked with the collection as target\n req F-2.2:\n when: user selects \"Add Before\" or \"Add After\" from a section dropdown\n then: LayoutOperation.UpdateDialog is invoked with the AddSectionDialog, position, and collection context\n req F-2.3:\n when: user selects \"Remove\" from a section dropdown\n then: SpaceOperation.RemoveObjects is invoked; section is removed from the collection\n req F-2.4:\n when: user selects \"Navigate to\" from a collapsed section dropdown or the navigate button\n then: LayoutOperation.Open is invoked with the section's id\n```\n\n```mdl\nfeat F-3: Collapse / Expand\n\n req F-3.1: Each section can be individually collapsed via the dropdown menu or caret trigger.\n req F-3.2:\n when: section is expanded\n then: full Surface:section content is visible; navigate button shown in heading\n req F-3.3:\n when: section is collapsed\n then: only the title is shown in StackItem.Content; expand toggle shown in heading\n req F-3.4: Collapsed state is managed locally in StackArticle component state (not persisted).\n```\n\n```mdl\nfeat F-4: Settings\n\n req F-4.1: StackPlugin exposes a settings panel via the StackSettings component.\n req F-4.2: The separation setting controls whether visual separators appear between sections.\n```\n\n```mdl\nfeat F-5: Schema Registration\n\n req F-5.1: StackPlugin registers StackViewType with the ECHO schema module on activation.\n req F-5.2: StackViewType stores per-section metadata (height, custom data) keyed by object id.\n```\n\n## Acceptance\n\n```mdl\nscenario T-1: Collection renders as stack\n given: a Collection with three objects is opened in article role\n then:\n - StackArticle is displayed\n - three StackSection components are rendered in order\n - each section shows the object's title\n```\n\n```mdl\nscenario T-2: Add section via toolbar\n given: StackArticle is open\n when: user clicks the Add Section toolbar button\n then: SpaceOperation.OpenObjectForm is invoked with the collection as target\n```\n\n```mdl\nscenario T-3: Remove section\n given: StackArticle is open with at least one section\n when: user selects Remove from a section dropdown\n then:\n - SpaceOperation.RemoveObjects is invoked\n - section no longer appears in the stack\n```\n\n```mdl\nscenario T-4: Collapse section\n given: a section is expanded\n when: user selects Collapse from the section dropdown\n then:\n - section content is hidden\n - section title is shown in collapsed state\n - expand toggle is visible in heading\n```\n\n```mdl\nscenario T-5: Navigate to section\n given: StackArticle is open\n when: user clicks the navigate button on a section heading\n then: LayoutOperation.Open is invoked with the section's DXN id\n```\n\n```mdl\nscenario T-6: StackViewType registered\n given: StackPlugin is active\n then: StackViewType (typename org.dxos.type.stackView) is registered with the ECHO schema module\n```\n\n---\n\n## QA\n\nExecutable tests. Each step carries a human instruction (`do`) and, where the step maps to an\ninvocable operation, an agent binding (`invoke`). Report failures by test and step number.\n\n```mdl\ntest QA-1: Render a collection as a stack, add, collapse, and remove a section\n desc: |\n StackPlugin declares no operations of its own — every mutation goes through\n `SpaceOperation.AddObject`/`RemoveObjects` (F-2.1, F-2.3), which belong to `plugin-space`.\n actors: both\n covers: [F-1.1, F-1.2, F-2.3, F-3.1, T-1, T-3, T-4]\n status: unverified\n given:\n - an identity exists\n - space: a space is open\n - plugin-stack is enabled — it is OFF by default for everyone (not listed in\n `getDefaults`, unlike most content plugins in `plugin-defs.tsx`), so no `article` surface\n resolves for a Collection's stack view until it is turned on\n - no collection named \"QA Stack\" exists — ABORT rather than deleting one this test did not\n create\n steps:\n - name: Create the collection and a section\n do: In the navtree, click + on the space and choose Collection. Name it \"QA Stack\". Open\n it, click \"Add Section\" in the toolbar, and choose Markdown, naming it \"QA Section\".\n invoke: org.dxos.operation.space.createCollection { name: \"QA Stack\" }\n capture: collection\n expect: \"QA Stack\" opens as a StackArticle with one StackSection titled \"QA Section\"\n assert: return $collection.object.name === 'QA Stack';\n note: |\n Coalesce the \"Add Section\" click with the object creation it triggers — `OpenObjectForm`\n opens a dialog and the resulting object is added via `AddObject`, which is the same\n pattern as `plugin-markdown`'s create+place split.\n - name: Add the section object\n do: (the Add Section dialog places it for you on confirm)\n invoke: org.dxos.operation.markdown.create { name: \"QA Section\" }\n capture: doc\n expect: a Document named \"QA Section\" exists\n - name: Place the section in the stack\n do: (as above)\n invoke: org.dxos.operation.space.addObject { object: $doc.object, target: $collection.object }\n expect: a StackSection titled \"QA Section\" now renders below the toolbar (F-1.2)\n assert: return $collection.object.objects.some((ref) => ref.target?.id === $doc.object.id);\n - name: Collapse the section\n do: Open the section's sigil dropdown and choose Collapse.\n expect: the section shows only its title; the caret points to \"expand\" (F-3.3, T-4)\n note: NO invoke — collapse state is local StackArticle component state (F-3.4), not an\n ECHO write, so there is nothing to verify against the database.\n - name: Remove the section\n do: Open the dropdown again and choose Remove.\n invoke: org.dxos.operation.space.removeObjects { objects: [$doc.object], target: $collection.object }\n expect: the section no longer appears in the stack (T-3)\n assert: return !$collection.object.objects.some((ref) => ref.target?.id === $doc.object.id);\n after:\n - name: Delete the collection\n do: Right-click \"QA Stack\" in the navtree and choose Delete.\n invoke: org.dxos.operation.space.removeObjects { objects: [$collection.object], target: $given.space }\n expect: the row leaves the navtree and its plank closes\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next scenario\n uri: org.dxos.mdl.scenario@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n";
3
3
  //#endregion
4
- export { PLUGIN_default as t };
4
+ export { PLUGIN_default as default };
5
5
 
6
6
  //# sourceMappingURL=chunk-PLUGIN.mjs.map
@@ -0,0 +1,10 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { DXN, Type } from "@dxos/echo";
3
+ import * as Schema from "effect/Schema";
4
+ //#region src/types/Stack.ts
5
+ var Stack_exports = /* @__PURE__ */ __exportAll({ Stack: () => Stack });
6
+ var Stack = class extends Type.makeObject(DXN.make("org.dxos.type.stack", "0.1.0"))(Schema.Struct({})) {};
7
+ //#endregion
8
+ export { Stack_exports as n, Stack as t };
9
+
10
+ //# sourceMappingURL=chunk-Stack.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-Stack.mjs","names":[],"sources":["../../src/types/Stack.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { DXN, Type } from '@dxos/echo';\n\n// TODO(burdon): Placeholder.\nexport class Stack extends Type.makeObject<Stack>(DXN.make('org.dxos.type.stack', '0.1.0'))(Schema.Struct({})) {}\n"],"mappings":";;;;;AAWA,IAAa,QAAb,cAA2B,KAAK,WAAkB,IAAI,KAAK,uBAAuB,OAAO,CAAC,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { meta } from "#meta";
3
+ import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
4
+ //#region src/types/StackEvents.ts
5
+ var StackEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
6
+ /**
7
+ * The feature's start event: the plugin's start-gated modules (and cross-plugin
8
+ * contributions consumed by this feature) activate here. Fired on demand and by the
9
+ * host's idle trickle.
10
+ */
11
+ var Start = ActivationEvent.pluginStart(meta.profile.key);
12
+ //#endregion
13
+ export { Start as n, StackEvents_exports as t };
14
+
15
+ //# sourceMappingURL=chunk-StackEvents.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-StackEvents.mjs","names":[],"sources":["../../src/types/StackEvents.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as ActivationEvent from '@dxos/app-framework/ActivationEvent';\n\nimport { meta } from '#meta';\n\n/**\n * The feature's start event: the plugin's start-gated modules (and cross-plugin\n * contributions consumed by this feature) activate here. Fired on demand and by the\n * host's idle trickle.\n */\nexport const Start = ActivationEvent.pluginStart(meta.profile.key);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,gBAAgB,YAAY,KAAK,QAAQ,GAAG"}
@@ -0,0 +1,16 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { meta } from "#meta";
3
+ import * as Plugin from "@dxos/app-framework/Plugin";
4
+ //#region src/StackPlugin.ts
5
+ var StackPlugin_exports = /* @__PURE__ */ __exportAll({
6
+ make: () => make,
7
+ meta: () => meta$1
8
+ });
9
+ /** Plugin metadata, available without loading the plugin body. */
10
+ var meta$1 = meta;
11
+ /** Constructs the plugin; the body loads on first enable. */
12
+ var make = Plugin.lazy(meta$1, () => import("#plugin"));
13
+ //#endregion
14
+ export { make as n, meta$1 as r, StackPlugin_exports as t };
15
+
16
+ //# sourceMappingURL=chunk-StackPlugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-StackPlugin.mjs","names":["meta","pluginMeta"],"sources":["../../src/StackPlugin.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport { meta as pluginMeta } from '#meta';\n\n/** Plugin metadata, available without loading the plugin body. */\nexport const meta = pluginMeta;\n\n/** Constructs the plugin; the body loads on first enable. */\nexport const make = Plugin.lazy(meta, () => import('#plugin'));\n"],"mappings":";;;;;;;;;AAWA,IAAaA,SAAOC;;AAGpB,IAAa,OAAO,OAAO,KAAKD,cAAY,OAAO,UAAU"}
@@ -5,6 +5,7 @@ import * as AppSurface from "@dxos/app-toolkit/AppSurface";
5
5
  import * as AttentionSigil from "@dxos/app-toolkit/AttentionSigil";
6
6
  import * as GraphPath from "@dxos/app-toolkit/GraphPath";
7
7
  import { Obj } from "@dxos/echo";
8
+ import { useLabel } from "@dxos/echo-react";
8
9
  import { useAttentionAttributes } from "@dxos/react-ui-attention";
9
10
  import { Mosaic } from "@dxos/react-ui-mosaic";
10
11
  import * as Hooks from "@dxos/react-ui/Hooks";
@@ -124,7 +125,7 @@ var StackSection = ({ data, ...tileProps }) => {
124
125
  }), [object, attendableId]);
125
126
  const isCollapsed = collapsed.has(id);
126
127
  const icon = Obj.getIcon(object)?.icon ?? "ph--circle-dashed--regular";
127
- const title = Obj.getLabel(object, { fallback: "typename" }) ?? t("untitled-section.title");
128
+ const title = useLabel(object, { fallback: "typename" }) ?? t("untitled-section.title");
128
129
  const rail = /* @__PURE__ */ jsxs(Layout.Grid, {
129
130
  rows: ["min", "fill"],
130
131
  children: [/* @__PURE__ */ jsx("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"components.mjs","names":[],"sources":["../../src/components/Stack/StackContext.ts","../../src/components/Stack/Stack.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type StackContextType, type StackContextValue } from './Stack.tsx';\n\n// Kept out of `Stack.tsx`: react-refresh only fast-refreshes a module whose exports are all\n// components, so a context and its hook exported beside them force a full page reload on every edit.\n\nexport const StackContext = createContext<StackContextType | undefined>(undefined);\n\nexport const useStackContext = (consumer: string): StackContextType => {\n const context = useContext(StackContext);\n if (!context) {\n throw new Error(`\\`${consumer}\\` must be used within \\`Stack.Root\\`.`);\n }\n return context;\n};\n\n/** Section-level callbacks consumed by stack sections. */\nexport const useStack = (): StackContextValue => useStackContext('useStack');\n","//\n// Copyright 2024 DXOS.org\n//\n\nimport React, {\n type ComponentPropsWithoutRef,\n type ForwardedRef,\n type PropsWithChildren,\n forwardRef,\n useCallback,\n useMemo,\n useState,\n} from 'react';\n\nimport * as Surface from '@dxos/app-framework/Surface';\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport * as AttentionSigil from '@dxos/app-toolkit/AttentionSigil';\nimport * as GraphPath from '@dxos/app-toolkit/GraphPath';\nimport { Obj } from '@dxos/echo';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { type DndContainerHandler } from '@dxos/react-ui-dnd';\nimport { Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport * as Icon from '@dxos/react-ui/Icon';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport * as Menu from '@dxos/react-ui/Menu';\nimport * as ScrollArea from '@dxos/react-ui/ScrollArea';\nimport type * as Util from '@dxos/react-ui/Util';\n\nimport { meta } from '#meta';\n\nimport { StackContext, useStack, useStackContext } from './StackContext.ts';\n\n//\n// Types\n//\n\nexport type StackSectionItem = {\n id: string;\n object: Obj.Unknown;\n};\n\n//\n// Context\n//\n\n/** Section-level callbacks consumed by stack sections. */\nexport type StackContextValue = {\n attendableId: string;\n /** Ids of sections that are currently collapsed. */\n collapsed: ReadonlySet<string>;\n onCollapse: (id: string, collapsed: boolean) => void;\n /** Add a new section immediately after the given section. */\n onAdd: (id: string) => void;\n onMoveUp: (id: string) => void;\n onMoveDown: (id: string) => void;\n onDelete: (id: string) => void;\n};\n\nexport type StackContextType = StackContextValue & {\n /** Container id used to scope Mosaic drag/drop. */\n id: string;\n eventHandler: DndContainerHandler;\n /** Scroll viewport element; threaded to the Mosaic container for autoscroll. */\n viewport: HTMLElement | null;\n setViewport: (element: HTMLElement | null) => void;\n};\n\n//\n// Root\n//\n\ntype StackRootProps = PropsWithChildren<\n StackContextValue & {\n /** Container id used to scope Mosaic drag/drop. */\n id: string;\n /** Drag/drop event handler; defaults to a read-only (no-drop) handler. */\n eventHandler?: DndContainerHandler;\n }\n>;\n\nconst StackRoot = ({\n id,\n eventHandler,\n children,\n attendableId,\n collapsed,\n onCollapse,\n onAdd,\n onMoveUp,\n onMoveDown,\n onDelete,\n}: StackRootProps) => {\n const [viewport, setViewport] = useState<HTMLElement | null>(null);\n const value = useMemo<StackContextType>(\n () => ({\n id,\n eventHandler: eventHandler ?? { id, canDrop: () => false },\n viewport,\n setViewport,\n attendableId,\n collapsed,\n onCollapse,\n onAdd,\n onMoveUp,\n onMoveDown,\n onDelete,\n }),\n [id, eventHandler, viewport, attendableId, collapsed, onCollapse, onAdd, onMoveUp, onMoveDown, onDelete],\n );\n\n return <StackContext.Provider value={value}>{children}</StackContext.Provider>;\n};\n\nStackRoot.displayName = 'Stack.Root';\n\n//\n// Content\n//\n\ntype StackContentProps = Util.ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nconst StackContent = forwardRef<HTMLDivElement, StackContentProps>(({ children, ...props }, forwardedRef) => {\n const { eventHandler, viewport } = useStackContext('Stack.Content');\n return (\n <Mosaic.Container asChild orientation='vertical' autoScroll={viewport} eventHandler={eventHandler}>\n <ScrollArea.Root {...props} orientation='vertical' ref={forwardedRef}>\n {children}\n </ScrollArea.Root>\n </Mosaic.Container>\n );\n});\n\nStackContent.displayName = 'Stack.Content';\n\n//\n// Viewport\n//\n\ntype StackViewportProps = Util.ThemedClassName<PropsWithChildren>;\n\nconst StackViewport = forwardRef<HTMLDivElement, StackViewportProps>(\n ({ classNames, children }, forwardedRef: ForwardedRef<HTMLDivElement>) => {\n const { setViewport } = useStackContext('Stack.Viewport');\n // Capture the viewport element for autoscroll while still honouring a forwarded ref.\n const setRefs = useCallback(\n (element: HTMLDivElement | null) => {\n setViewport(element);\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [setViewport, forwardedRef],\n );\n\n return (\n <ScrollArea.Viewport classNames={classNames} ref={setRefs}>\n {children}\n </ScrollArea.Viewport>\n );\n },\n);\n\nStackViewport.displayName = 'Stack.Viewport';\n\n//\n// Section\n//\n\ntype StackSectionProps = MosaicTileProps<StackSectionItem>;\n\n/**\n * A stack section rendered as a Mosaic tile: a 40px left rail (drag handle + section menu) beside the\n * main content area, which renders the object's content surface (or its title when collapsed). The\n * rail sticks to the top of the scroll viewport while the section is in view.\n */\n// TODO(burdon): All sections are intrinsic (content-sized) for now. Extrinsic content (e.g. a sketch\n// with no intrinsic height) should later get a Mosaic-native resizable height affordance.\n\n// Inline grip glyph for the drag preview. The native drag image does not rasterize external SVG sprite\n// `<use>` icons (e.g. `@dxos/react-ui` `Icon`), so the preview uses plain inline SVG circles instead.\nconst DragHandleGlyph = () => (\n <svg width={10} height={16} viewBox='0 0 10 16' aria-hidden className='shrink-0 text-fg-muted'>\n {[3, 8, 13].flatMap((cy) =>\n [2.5, 7.5].map((cx) => <circle key={`${cx}-${cy}`} cx={cx} cy={cy} r={1.1} fill='currentColor' />),\n )}\n </svg>\n);\n\nconst StackSection = ({ data, ...tileProps }: StackSectionProps) => {\n const { id, object } = data;\n const { t } = Hooks.useTranslation(meta.profile.key);\n const { attendableId: parentAttendableId, collapsed, onAdd, onMoveUp, onMoveDown, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableId = GraphPath.getCollectionObjectPath(parentAttendableId, object.id);\n const attentionAttrs = useAttentionAttributes(attendableId);\n const surfaceData = useMemo(() => ({ attendableId, subject: object }), [object, attendableId]);\n const isCollapsed = collapsed.has(id);\n const icon = Obj.getIcon(object)?.icon ?? 'ph--circle-dashed--regular';\n const title = Obj.getLabel(object, { fallback: 'typename' }) ?? t('untitled-section.title');\n\n const rail = (\n <Layout.Grid rows={['min', 'fill']}>\n <div className='p-1 dx-toolbar-surface'>\n <Menu.Root open={optionsMenuOpen} onOpenChange={({ open }) => setOptionsMenuOpen(open)}>\n <Menu.Trigger asChild>\n <AttentionSigil.Button size='md' attendableId={attendableId}>\n <Icon.Icon icon={icon} classNames='transition-opacity' />\n </AttentionSigil.Button>\n </Menu.Trigger>\n <Menu.Content>\n {isCollapsed ? (\n <Menu.Item\n item={{\n value: 'section.expand',\n label: t('expand.label'),\n icon: 'ph--arrows-out-line-vertical--regular',\n }}\n onClick={() => onCollapse(id, false)}\n data-testid='section.expand'\n />\n ) : (\n <Menu.Item\n item={{\n value: 'section.collapse',\n label: t('collapse.label'),\n icon: 'ph--arrows-in-line-vertical--regular',\n }}\n onClick={() => onCollapse(id, true)}\n data-testid='section.collapse'\n />\n )}\n <Menu.Separator />\n <Menu.Item\n item={{ value: 'section.add', label: t('add-section.label'), icon: 'ph--plus--regular' }}\n onClick={() => onAdd(id)}\n data-testid='section.add'\n />\n <Menu.Item\n item={{ value: 'section.move-up', label: t('move-up.label'), icon: 'ph--arrow-line-up--regular' }}\n onClick={() => onMoveUp(id)}\n data-testid='section.move-up'\n />\n <Menu.Item\n item={{ value: 'section.move-down', label: t('move-down.label'), icon: 'ph--arrow-line-down--regular' }}\n onClick={() => onMoveDown(id)}\n data-testid='section.move-down'\n />\n <Menu.Separator />\n <Menu.Item\n item={{ value: 'section.remove', label: t('remove-section.label'), icon: 'ph--trash--regular' }}\n onClick={() => onDelete(id)}\n data-testid='section.remove'\n />\n </Menu.Content>\n </Menu.Root>\n </div>\n <div className='p-1'>\n {/* Inline glyph (not a sprite `Icon`) so the handle stays visible in the tile's native drag image. */}\n <Mosaic.DragHandle\n label={t('drag-handle.label')}\n classNames='p-1 min-h-0 w-(--dx-rail-item) h-(--dx-rail-item)'\n testId='section.drag-handle'\n >\n <DragHandleGlyph />\n </Mosaic.DragHandle>\n </div>\n </Layout.Grid>\n );\n\n return (\n <Mosaic.Tile\n {...tileProps}\n data={data}\n classNames='grid grid-cols-[var(--dx-rail-action)_1fr] dx-attention-surface border border-separator-subtle'\n >\n <div className='border-e border-separator-subtle'>\n <Layout.Flex column align='center' classNames='sticky top-0'>\n {rail}\n </Layout.Flex>\n </div>\n <div {...attentionAttrs} className='min-w-0'>\n <span className='sr-only'>{title}</span>\n {isCollapsed ? (\n <Layout.Flex classNames='h-(--dx-toolbar-size) p-1'>\n <h2 className='flex items-center font-medium'>{title}</h2>\n </Layout.Flex>\n ) : (\n <Surface.Surface type={AppSurface.Section} data={surfaceData} limit={1} />\n )}\n </div>\n </Mosaic.Tile>\n );\n};\n\nStackSection.displayName = 'Stack.Section';\n\n//\n// Stack\n//\n\nexport const Stack = {\n Root: StackRoot,\n Content: StackContent,\n Viewport: StackViewport,\n Section: StackSection,\n};\n\nexport type { StackContentProps, StackRootProps, StackSectionProps, StackViewportProps };\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,IAAa,eAAe,cAA4C,KAAA,CAAS;AAEjF,IAAa,mBAAmB,aAAuC;CACrE,MAAM,UAAU,WAAW,YAAY;CACvC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,KAAK,SAAS,uCAAuC;CAEvE,OAAO;AACT;;AAGA,IAAa,iBAAoC,gBAAgB,UAAU;;;AC2D3E,IAAM,aAAa,EACjB,IACA,cACA,UACA,cACA,WACA,YACA,OACA,UACA,YACA,eACoB;CACpB,MAAM,CAAC,UAAU,eAAe,SAA6B,IAAI;CACjE,MAAM,QAAQ,eACL;EACL;EACA,cAAc,gBAAgB;GAAE;GAAI,eAAe;EAAM;EACzD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,IACA;EAAC;EAAI;EAAc;EAAU;EAAc;EAAW;EAAY;EAAO;EAAU;EAAY;CAAQ,CACzG;CAEA,OAAO,oBAAC,aAAa,UAAd;EAA8B;EAAQ;CAAgC,CAAA;AAC/E;AAEA,UAAU,cAAc;AAQxB,IAAM,eAAe,YAA+C,EAAE,UAAU,GAAG,SAAS,iBAAiB;CAC3G,MAAM,EAAE,cAAc,aAAa,gBAAgB,eAAe;CAClE,OACE,oBAAC,OAAO,WAAR;EAAkB,SAAA;EAAQ,aAAY;EAAW,YAAY;EAAwB;EACnF,UAAA,oBAAC,WAAW,MAAZ;GAAiB,GAAI;GAAO,aAAY;GAAW,KAAK;GACrD;EACc,CAAA;CACD,CAAA;AAEtB,CAAC;AAED,aAAa,cAAc;AAQ3B,IAAM,gBAAgB,YACnB,EAAE,YAAY,YAAY,iBAA+C;C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,OAAO;OAAkB,OAAO,EAAE,sBAAsB;OAAG,MAAM;MAAqB;MAC9F,eAAe,SAAS,EAAE;MAC1B,eAAY;KACb,CAAA;IACW,EAAA,CAAA,CACL;;EACR,CAAA,GACL,oBAAC,OAAD;GAAK,WAAU;GAEb,UAAA,oBAAC,OAAO,YAAR;IACE,OAAO,EAAE,mBAAmB;IAC5B,YAAW;IACX,QAAO;IAEP,UAAA,oBAAC,iBAAD,CAAkB,CAAA;GACD,CAAA;EAChB,CAAA,CACM;;CAGf,OACE,qBAAC,OAAO,MAAR;EACE,GAAI;EACE;EACN,YAAW;EAHb,UAAA,CAKE,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,oBAAC,OAAO,MAAR;IAAa,QAAA;IAAO,OAAM;IAAS,YAAW;IAC3C,UAAA;GACU,CAAA;EACV,CAAA,GACL,qBAAC,OAAD;GAAK,GAAI;GAAgB,WAAU;GAAnC,UAAA,CACE,oBAAC,QAAD;IAAM,WAAU;IAAW,UAAA;GAAY,CAAA,GACtC,cACC,oBAAC,OAAO,MAAR;IAAa,YAAW;IACtB,UAAA,oBAAC,MAAD;KAAI,WAAU;KAAiC,UAAA;IAAU,CAAA;GAC9C,CAAA,IAEb,oBAAC,QAAQ,SAAT;IAAiB,MAAM,WAAW;IAAS,MAAM;IAAa,OAAO;GAAI,CAAA,CAExE;EACM,CAAA,CAAA;;AAEjB;AAEA,aAAa,cAAc;AAM3B,IAAa,QAAQ;CACnB,MAAM;CACN,SAAS;CACT,UAAU;CACV,SAAS;AACX"}
1
+ {"version":3,"file":"components.mjs","names":[],"sources":["../../src/components/Stack/StackContext.ts","../../src/components/Stack/Stack.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type StackContextType, type StackContextValue } from './Stack.tsx';\n\n// Kept out of `Stack.tsx`: react-refresh only fast-refreshes a module whose exports are all\n// components, so a context and its hook exported beside them force a full page reload on every edit.\n\nexport const StackContext = createContext<StackContextType | undefined>(undefined);\n\nexport const useStackContext = (consumer: string): StackContextType => {\n const context = useContext(StackContext);\n if (!context) {\n throw new Error(`\\`${consumer}\\` must be used within \\`Stack.Root\\`.`);\n }\n return context;\n};\n\n/** Section-level callbacks consumed by stack sections. */\nexport const useStack = (): StackContextValue => useStackContext('useStack');\n","//\n// Copyright 2024 DXOS.org\n//\n\nimport React, {\n type ComponentPropsWithoutRef,\n type ForwardedRef,\n type PropsWithChildren,\n forwardRef,\n useCallback,\n useMemo,\n useState,\n} from 'react';\n\nimport * as Surface from '@dxos/app-framework/Surface';\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport * as AttentionSigil from '@dxos/app-toolkit/AttentionSigil';\nimport * as GraphPath from '@dxos/app-toolkit/GraphPath';\nimport { Obj } from '@dxos/echo';\nimport { useLabel } from '@dxos/echo-react';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { type DndContainerHandler } from '@dxos/react-ui-dnd';\nimport { Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport * as Icon from '@dxos/react-ui/Icon';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport * as Menu from '@dxos/react-ui/Menu';\nimport * as ScrollArea from '@dxos/react-ui/ScrollArea';\nimport type * as Util from '@dxos/react-ui/Util';\n\nimport { meta } from '#meta';\n\nimport { StackContext, useStack, useStackContext } from './StackContext.ts';\n\n//\n// Types\n//\n\nexport type StackSectionItem = {\n id: string;\n object: Obj.Unknown;\n};\n\n//\n// Context\n//\n\n/** Section-level callbacks consumed by stack sections. */\nexport type StackContextValue = {\n attendableId: string;\n /** Ids of sections that are currently collapsed. */\n collapsed: ReadonlySet<string>;\n onCollapse: (id: string, collapsed: boolean) => void;\n /** Add a new section immediately after the given section. */\n onAdd: (id: string) => void;\n onMoveUp: (id: string) => void;\n onMoveDown: (id: string) => void;\n onDelete: (id: string) => void;\n};\n\nexport type StackContextType = StackContextValue & {\n /** Container id used to scope Mosaic drag/drop. */\n id: string;\n eventHandler: DndContainerHandler;\n /** Scroll viewport element; threaded to the Mosaic container for autoscroll. */\n viewport: HTMLElement | null;\n setViewport: (element: HTMLElement | null) => void;\n};\n\n//\n// Root\n//\n\ntype StackRootProps = PropsWithChildren<\n StackContextValue & {\n /** Container id used to scope Mosaic drag/drop. */\n id: string;\n /** Drag/drop event handler; defaults to a read-only (no-drop) handler. */\n eventHandler?: DndContainerHandler;\n }\n>;\n\nconst StackRoot = ({\n id,\n eventHandler,\n children,\n attendableId,\n collapsed,\n onCollapse,\n onAdd,\n onMoveUp,\n onMoveDown,\n onDelete,\n}: StackRootProps) => {\n const [viewport, setViewport] = useState<HTMLElement | null>(null);\n const value = useMemo<StackContextType>(\n () => ({\n id,\n eventHandler: eventHandler ?? { id, canDrop: () => false },\n viewport,\n setViewport,\n attendableId,\n collapsed,\n onCollapse,\n onAdd,\n onMoveUp,\n onMoveDown,\n onDelete,\n }),\n [id, eventHandler, viewport, attendableId, collapsed, onCollapse, onAdd, onMoveUp, onMoveDown, onDelete],\n );\n\n return <StackContext.Provider value={value}>{children}</StackContext.Provider>;\n};\n\nStackRoot.displayName = 'Stack.Root';\n\n//\n// Content\n//\n\ntype StackContentProps = Util.ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nconst StackContent = forwardRef<HTMLDivElement, StackContentProps>(({ children, ...props }, forwardedRef) => {\n const { eventHandler, viewport } = useStackContext('Stack.Content');\n return (\n <Mosaic.Container asChild orientation='vertical' autoScroll={viewport} eventHandler={eventHandler}>\n <ScrollArea.Root {...props} orientation='vertical' ref={forwardedRef}>\n {children}\n </ScrollArea.Root>\n </Mosaic.Container>\n );\n});\n\nStackContent.displayName = 'Stack.Content';\n\n//\n// Viewport\n//\n\ntype StackViewportProps = Util.ThemedClassName<PropsWithChildren>;\n\nconst StackViewport = forwardRef<HTMLDivElement, StackViewportProps>(\n ({ classNames, children }, forwardedRef: ForwardedRef<HTMLDivElement>) => {\n const { setViewport } = useStackContext('Stack.Viewport');\n // Capture the viewport element for autoscroll while still honouring a forwarded ref.\n const setRefs = useCallback(\n (element: HTMLDivElement | null) => {\n setViewport(element);\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [setViewport, forwardedRef],\n );\n\n return (\n <ScrollArea.Viewport classNames={classNames} ref={setRefs}>\n {children}\n </ScrollArea.Viewport>\n );\n },\n);\n\nStackViewport.displayName = 'Stack.Viewport';\n\n//\n// Section\n//\n\ntype StackSectionProps = MosaicTileProps<StackSectionItem>;\n\n/**\n * A stack section rendered as a Mosaic tile: a 40px left rail (drag handle + section menu) beside the\n * main content area, which renders the object's content surface (or its title when collapsed). The\n * rail sticks to the top of the scroll viewport while the section is in view.\n */\n// TODO(burdon): All sections are intrinsic (content-sized) for now. Extrinsic content (e.g. a sketch\n// with no intrinsic height) should later get a Mosaic-native resizable height affordance.\n\n// Inline grip glyph for the drag preview. The native drag image does not rasterize external SVG sprite\n// `<use>` icons (e.g. `@dxos/react-ui` `Icon`), so the preview uses plain inline SVG circles instead.\nconst DragHandleGlyph = () => (\n <svg width={10} height={16} viewBox='0 0 10 16' aria-hidden className='shrink-0 text-fg-muted'>\n {[3, 8, 13].flatMap((cy) =>\n [2.5, 7.5].map((cx) => <circle key={`${cx}-${cy}`} cx={cx} cy={cy} r={1.1} fill='currentColor' />),\n )}\n </svg>\n);\n\nconst StackSection = ({ data, ...tileProps }: StackSectionProps) => {\n const { id, object } = data;\n const { t } = Hooks.useTranslation(meta.profile.key);\n const { attendableId: parentAttendableId, collapsed, onAdd, onMoveUp, onMoveDown, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableId = GraphPath.getCollectionObjectPath(parentAttendableId, object.id);\n const attentionAttrs = useAttentionAttributes(attendableId);\n const surfaceData = useMemo(() => ({ attendableId, subject: object }), [object, attendableId]);\n const isCollapsed = collapsed.has(id);\n const icon = Obj.getIcon(object)?.icon ?? 'ph--circle-dashed--regular';\n const title = useLabel(object, { fallback: 'typename' }) ?? t('untitled-section.title');\n\n const rail = (\n <Layout.Grid rows={['min', 'fill']}>\n <div className='p-1 dx-toolbar-surface'>\n <Menu.Root open={optionsMenuOpen} onOpenChange={({ open }) => setOptionsMenuOpen(open)}>\n <Menu.Trigger asChild>\n <AttentionSigil.Button size='md' attendableId={attendableId}>\n <Icon.Icon icon={icon} classNames='transition-opacity' />\n </AttentionSigil.Button>\n </Menu.Trigger>\n <Menu.Content>\n {isCollapsed ? (\n <Menu.Item\n item={{\n value: 'section.expand',\n label: t('expand.label'),\n icon: 'ph--arrows-out-line-vertical--regular',\n }}\n onClick={() => onCollapse(id, false)}\n data-testid='section.expand'\n />\n ) : (\n <Menu.Item\n item={{\n value: 'section.collapse',\n label: t('collapse.label'),\n icon: 'ph--arrows-in-line-vertical--regular',\n }}\n onClick={() => onCollapse(id, true)}\n data-testid='section.collapse'\n />\n )}\n <Menu.Separator />\n <Menu.Item\n item={{ value: 'section.add', label: t('add-section.label'), icon: 'ph--plus--regular' }}\n onClick={() => onAdd(id)}\n data-testid='section.add'\n />\n <Menu.Item\n item={{ value: 'section.move-up', label: t('move-up.label'), icon: 'ph--arrow-line-up--regular' }}\n onClick={() => onMoveUp(id)}\n data-testid='section.move-up'\n />\n <Menu.Item\n item={{ value: 'section.move-down', label: t('move-down.label'), icon: 'ph--arrow-line-down--regular' }}\n onClick={() => onMoveDown(id)}\n data-testid='section.move-down'\n />\n <Menu.Separator />\n <Menu.Item\n item={{ value: 'section.remove', label: t('remove-section.label'), icon: 'ph--trash--regular' }}\n onClick={() => onDelete(id)}\n data-testid='section.remove'\n />\n </Menu.Content>\n </Menu.Root>\n </div>\n <div className='p-1'>\n {/* Inline glyph (not a sprite `Icon`) so the handle stays visible in the tile's native drag image. */}\n <Mosaic.DragHandle\n label={t('drag-handle.label')}\n classNames='p-1 min-h-0 w-(--dx-rail-item) h-(--dx-rail-item)'\n testId='section.drag-handle'\n >\n <DragHandleGlyph />\n </Mosaic.DragHandle>\n </div>\n </Layout.Grid>\n );\n\n return (\n <Mosaic.Tile\n {...tileProps}\n data={data}\n classNames='grid grid-cols-[var(--dx-rail-action)_1fr] dx-attention-surface border border-separator-subtle'\n >\n <div className='border-e border-separator-subtle'>\n <Layout.Flex column align='center' classNames='sticky top-0'>\n {rail}\n </Layout.Flex>\n </div>\n <div {...attentionAttrs} className='min-w-0'>\n <span className='sr-only'>{title}</span>\n {isCollapsed ? (\n <Layout.Flex classNames='h-(--dx-toolbar-size) p-1'>\n <h2 className='flex items-center font-medium'>{title}</h2>\n </Layout.Flex>\n ) : (\n <Surface.Surface type={AppSurface.Section} data={surfaceData} limit={1} />\n )}\n </div>\n </Mosaic.Tile>\n );\n};\n\nStackSection.displayName = 'Stack.Section';\n\n//\n// Stack\n//\n\nexport const Stack = {\n Root: StackRoot,\n Content: StackContent,\n Viewport: StackViewport,\n Section: StackSection,\n};\n\nexport type { StackContentProps, StackRootProps, StackSectionProps, StackViewportProps };\n"],"mappings":";;;;;;;;;;;;;;;;;AAWA,IAAa,eAAe,cAA4C,KAAA,CAAS;AAEjF,IAAa,mBAAmB,aAAuC;CACrE,MAAM,UAAU,WAAW,YAAY;CACvC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,KAAK,SAAS,uCAAuC;CAEvE,OAAO;AACT;;AAGA,IAAa,iBAAoC,gBAAgB,UAAU;;;AC4D3E,IAAM,aAAa,EACjB,IACA,cACA,UACA,cACA,WACA,YACA,OACA,UACA,YACA,eACoB;CACpB,MAAM,CAAC,UAAU,eAAe,SAA6B,IAAI;CACjE,MAAM,QAAQ,eACL;EACL;EACA,cAAc,gBAAgB;GAAE;GAAI,eAAe;EAAM;EACzD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,IACA;EAAC;EAAI;EAAc;EAAU;EAAc;EAAW;EAAY;EAAO;EAAU;EAAY;CAAQ,CACzG;CAEA,OAAO,oBAAC,a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OAAO;GAAI,CAAA,CAExE;EACM,CAAA,CAAA;;AAEjB;AAEA,aAAa,cAAc;AAM3B,IAAa,QAAQ;CACnB,MAAM;CACN,SAAS;CACT,UAAU;CACV,SAAS;AACX"}
@@ -1,3 +1,2 @@
1
- import { t as StackPlugin_exports } from "./StackPlugin.mjs";
1
+ export { t as StackPlugin } from "./chunk-StackPlugin.mjs";
2
2
  export * from "#types";
3
- export { StackPlugin_exports as StackPlugin };
@@ -1 +1 @@
1
- {"version":3,"file":"meta.mjs","names":[],"sources":["../../dx.config.ts","../../src/meta.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.stack',\n name: 'Stacks',\n author: 'DXOS',\n description: trim`\n The Stack plugin renders any Collection as a vertically scrollable stack of collapsible sections in the\n Composer article surface. Each section wraps an arbitrary ECHO object and delegates its content rendering\n to the section surface role, enabling any other plugin to contribute its own section renderer.\n\n Sections can be individually collapsed to show only their title, expanded to reveal full content, navigated\n to directly, or removed from the collection. New sections can be inserted before or after any existing\n section via a per-section dropdown menu, or appended via the toolbar Add button.\n\n The plugin registers StackViewType with the ECHO schema module so that per-section view metadata\n (height overrides, custom display data) can be stored and replicated alongside the collection.\n\n A settings panel exposes a separation toggle that controls whether visual dividers are rendered between\n sections.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack',\n icon: { key: 'ph--stack-simple--regular' },\n spec: 'PLUGIN.mdl',\n tags: ['alpha'],\n },\n});\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport { DXN } from '@dxos/keys';\n\nimport config from '../dx.config.ts';\n\nexport const SECTION_IDENTIFIER = DXN.make('org.dxos.type.stackSection');\n\nexport const meta = Plugin.getMetaFromConfig(config);\n"],"mappings":";;;;;AAOA,IAAA,oBAAe,QAAQ,KAAK,EAC1B,QAAQ;CACN,KAAK;CACL,MAAM;CACN,QAAQ;CACR,aAAa,IAAI;;;;;;;;;;;;;;;CAejB,QAAQ;CACR,MAAM,EAAE,KAAK,4BAA4B;CACzC,MAAM;CACN,MAAM,CAAC,OAAO;AAChB,EACF,CAAC;;;ACvBD,IAAa,qBAAqB,IAAI,KAAK,4BAA4B;AAEvE,IAAa,OAAO,OAAO,kBAAkB,iBAAM"}
1
+ {"version":3,"file":"meta.mjs","names":["config"],"sources":["../../dx.config.ts","../../src/meta.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.stack',\n name: 'Stacks',\n author: 'DXOS',\n description: trim`\n The Stack plugin renders any Collection as a vertically scrollable stack of collapsible sections in the\n Composer article surface. Each section wraps an arbitrary ECHO object and delegates its content rendering\n to the section surface role, enabling any other plugin to contribute its own section renderer.\n\n Sections can be individually collapsed to show only their title, expanded to reveal full content, navigated\n to directly, or removed from the collection. New sections can be inserted before or after any existing\n section via a per-section dropdown menu, or appended via the toolbar Add button.\n\n The plugin registers StackViewType with the ECHO schema module so that per-section view metadata\n (height overrides, custom display data) can be stored and replicated alongside the collection.\n\n A settings panel exposes a separation toggle that controls whether visual dividers are rendered between\n sections.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack',\n icon: { key: 'ph--stack-simple--regular' },\n spec: 'PLUGIN.mdl',\n tags: ['alpha'],\n },\n});\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport { DXN } from '@dxos/keys';\n\nimport config from '../dx.config.ts';\n\nexport const SECTION_IDENTIFIER = DXN.make('org.dxos.type.stackSection');\n\nexport const meta = Plugin.getMetaFromConfig(config);\n"],"mappings":";;;;;AAOA,IAAA,oBAAe,QAAQ,KAAK,EAC1B,QAAQ;CACN,KAAK;CACL,MAAM;CACN,QAAQ;CACR,aAAa,IAAI;;;;;;;;;;;;;;;CAejB,QAAQ;CACR,MAAM,EAAE,KAAK,4BAA4B;CACzC,MAAM;CACN,MAAM,CAAC,OAAO;AAChB,EACF,CAAC;;;ACvBD,IAAa,qBAAqB,IAAI,KAAK,4BAA4B;AAEvE,IAAa,OAAO,OAAO,kBAAkBA,iBAAM"}
@@ -1,3 +1,3 @@
1
- import { t as Stack_exports } from "./Stack.mjs";
2
- import { t as StackEvents_exports } from "./StackEvents.mjs";
1
+ import { n as Stack_exports } from "./chunk-Stack.mjs";
2
+ import { t as StackEvents_exports } from "./chunk-StackEvents.mjs";
3
3
  export { Stack_exports as Stack, StackEvents_exports as StackEvents };
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/gen/browser.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,WAAW,uDAKtB,CAAC;AAEH,eAAO,MAAM,YAAY,uDAEvB,CAAC;AAEH,eAAO,MAAM,MAAM,uDAAqD,CAAC;AAEzE,eAAO,MAAM,YAAY,uDAA2C,CAAC"}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/gen/browser.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,WAAW,uDAKtB,CAAC;AAEH,eAAO,MAAM,YAAY,uDAEvB,CAAC;AAEH,eAAO,MAAM,MAAM,uDAAqD,CAAC;AAEzE,eAAO,MAAM,YAAY,uDAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tauri.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/gen/tauri.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,WAAW,uDAKtB,CAAC;AAEH,eAAO,MAAM,YAAY,uDAEvB,CAAC;AAEH,eAAO,MAAM,MAAM,uDAAqD,CAAC;AAEzE,eAAO,MAAM,YAAY,uDAA2C,CAAC"}
1
+ {"version":3,"file":"tauri.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/gen/tauri.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,WAAW,uDAKtB,CAAC;AAEH,eAAO,MAAM,YAAY,uDAEvB,CAAC;AAEH,eAAO,MAAM,MAAM,uDAAqD,CAAC;AAEzE,eAAO,MAAM,YAAY,uDAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW,uDAKtB,CAAC;AACH,eAAO,MAAM,YAAY,uDAEvB,CAAC;AACH,eAAO,MAAM,MAAM,uDAAoD,CAAC;AACxE,eAAO,MAAM,YAAY,uDAA2C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,uDAKtB,CAAC;AACH,eAAO,MAAM,YAAY,uDAEvB,CAAC;AACH,eAAO,MAAM,MAAM,uDAAoD,CAAC;AACxE,eAAO,MAAM,YAAY,uDAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EACZ,KAAK,wBAAwB,EAE7B,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMrE,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAUjD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB,CAAC;AAMF,0DAA0D;AAC1D,MAAM,MAAM,i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