@dxos/plugin-stack 0.8.4-main.d05673bc65 → 0.8.4-main.d9fc60f731

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 (110) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +326 -0
  3. package/README.md +1 -1
  4. package/dist/lib/neutral/StackArticle-M7AYNDZN.mjs +125 -0
  5. package/dist/lib/neutral/StackArticle-M7AYNDZN.mjs.map +7 -0
  6. package/dist/lib/neutral/StackPlugin.mjs +34 -0
  7. package/dist/lib/neutral/StackPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/capabilities/index.mjs +7 -0
  9. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  10. package/dist/lib/neutral/chunk-RGJSGQGF.mjs +36 -0
  11. package/dist/lib/neutral/chunk-RGJSGQGF.mjs.map +7 -0
  12. package/dist/lib/{browser/chunk-YPQYUBQP.mjs → neutral/chunk-T4NSFSPH.mjs} +3 -6
  13. package/dist/lib/neutral/chunk-T4NSFSPH.mjs.map +7 -0
  14. package/dist/lib/{browser/StackContainer-OLHE5F4E.mjs → neutral/components/index.mjs} +37 -149
  15. package/dist/lib/neutral/components/index.mjs.map +7 -0
  16. package/dist/lib/neutral/containers/index.mjs +7 -0
  17. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  18. package/dist/lib/neutral/index.mjs +15 -0
  19. package/dist/lib/neutral/meta.json +1 -0
  20. package/dist/lib/neutral/meta.mjs +9 -0
  21. package/dist/lib/neutral/plugin.mjs +11 -0
  22. package/dist/lib/neutral/plugin.mjs.map +7 -0
  23. package/dist/lib/neutral/react-surface-MD3CVY2N.mjs +23 -0
  24. package/dist/lib/neutral/react-surface-MD3CVY2N.mjs.map +7 -0
  25. package/dist/lib/neutral/translations.mjs +37 -0
  26. package/dist/lib/neutral/translations.mjs.map +7 -0
  27. package/dist/lib/{browser → neutral}/types/index.mjs +1 -1
  28. package/dist/lib/neutral/types/index.mjs.map +7 -0
  29. package/dist/types/src/StackPlugin.d.ts +1 -0
  30. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  31. package/dist/types/src/capabilities/index.d.ts +2 -1
  32. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  33. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  34. package/dist/types/src/components/StackContext/StackContext.d.ts +1 -1
  35. package/dist/types/src/components/StackContext/StackContext.d.ts.map +1 -1
  36. package/dist/types/src/components/StackSection/CaretDownUp.d.ts +1 -1
  37. package/dist/types/src/components/StackSection/CaretDownUp.d.ts.map +1 -1
  38. package/dist/types/src/components/StackSection/StackSection.d.ts +1 -1
  39. package/dist/types/src/components/StackSection/StackSection.d.ts.map +1 -1
  40. package/dist/types/src/components/StackSettings/StackSettings.d.ts +1 -1
  41. package/dist/types/src/components/StackSettings/StackSettings.d.ts.map +1 -1
  42. package/dist/types/src/containers/StackArticle/StackArticle.d.ts +7 -0
  43. package/dist/types/src/containers/StackArticle/StackArticle.d.ts.map +1 -0
  44. package/dist/types/src/containers/StackArticle/index.d.ts +2 -0
  45. package/dist/types/src/containers/StackArticle/index.d.ts.map +1 -0
  46. package/dist/types/src/containers/index.d.ts +1 -1
  47. package/dist/types/src/containers/index.d.ts.map +1 -1
  48. package/dist/types/src/index.d.ts +1 -1
  49. package/dist/types/src/index.d.ts.map +1 -1
  50. package/dist/types/src/meta.d.ts +3 -2
  51. package/dist/types/src/meta.d.ts.map +1 -1
  52. package/dist/types/src/plugin.d.ts +3 -0
  53. package/dist/types/src/plugin.d.ts.map +1 -0
  54. package/dist/types/src/translations.d.ts +30 -30
  55. package/dist/types/src/translations.d.ts.map +1 -1
  56. package/dist/types/src/types/stack.d.ts +1 -2
  57. package/dist/types/src/types/stack.d.ts.map +1 -1
  58. package/dist/types/src/types/types.d.ts +1 -2
  59. package/dist/types/src/types/types.d.ts.map +1 -1
  60. package/dist/types/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +76 -48
  62. package/src/StackPlugin.ts +12 -22
  63. package/src/capabilities/index.ts +3 -1
  64. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +5 -8
  65. package/src/components/StackContext/StackContext.tsx +1 -1
  66. package/src/components/StackSection/StackSection.tsx +20 -19
  67. package/src/components/StackSettings/StackSettings.tsx +13 -15
  68. package/src/containers/{StackContainer/StackContainer.tsx → StackArticle/StackArticle.tsx} +19 -25
  69. package/src/containers/StackArticle/index.ts +5 -0
  70. package/src/containers/index.ts +1 -1
  71. package/src/index.ts +1 -1
  72. package/src/meta.ts +21 -7
  73. package/src/plugin.ts +9 -0
  74. package/src/translations.ts +23 -22
  75. package/src/types/stack.ts +3 -8
  76. package/src/types/types.ts +1 -2
  77. package/src/vite-env.d.ts +10 -0
  78. package/dist/lib/browser/StackContainer-OLHE5F4E.mjs.map +0 -7
  79. package/dist/lib/browser/chunk-G4CLPE5A.mjs +0 -21
  80. package/dist/lib/browser/chunk-G4CLPE5A.mjs.map +0 -7
  81. package/dist/lib/browser/chunk-YPQYUBQP.mjs.map +0 -7
  82. package/dist/lib/browser/index.mjs +0 -84
  83. package/dist/lib/browser/index.mjs.map +0 -7
  84. package/dist/lib/browser/meta.json +0 -1
  85. package/dist/lib/browser/react-surface-JS4ERDMQ.mjs +0 -33
  86. package/dist/lib/browser/react-surface-JS4ERDMQ.mjs.map +0 -7
  87. package/dist/lib/node-esm/StackContainer-W3M7BKLT.mjs +0 -295
  88. package/dist/lib/node-esm/StackContainer-W3M7BKLT.mjs.map +0 -7
  89. package/dist/lib/node-esm/chunk-LELGTQAL.mjs +0 -29
  90. package/dist/lib/node-esm/chunk-LELGTQAL.mjs.map +0 -7
  91. package/dist/lib/node-esm/chunk-LOZ6GH5A.mjs +0 -23
  92. package/dist/lib/node-esm/chunk-LOZ6GH5A.mjs.map +0 -7
  93. package/dist/lib/node-esm/index.mjs +0 -85
  94. package/dist/lib/node-esm/index.mjs.map +0 -7
  95. package/dist/lib/node-esm/meta.json +0 -1
  96. package/dist/lib/node-esm/react-surface-YKS4OHR3.mjs +0 -34
  97. package/dist/lib/node-esm/react-surface-YKS4OHR3.mjs.map +0 -7
  98. package/dist/lib/node-esm/types/index.mjs +0 -10
  99. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  100. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  101. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  102. package/dist/types/src/containers/StackContainer/StackContainer.d.ts +0 -7
  103. package/dist/types/src/containers/StackContainer/StackContainer.d.ts.map +0 -1
  104. package/dist/types/src/containers/StackContainer/index.d.ts +0 -3
  105. package/dist/types/src/containers/StackContainer/index.d.ts.map +0 -1
  106. package/src/capabilities/react-surface/index.ts +0 -7
  107. package/src/containers/StackContainer/index.ts +0 -7
  108. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  109. /package/dist/lib/{node-esm/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
  110. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/StackPlugin.ts", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-stack/PLUGIN.mdl?raw"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { StackViewType } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const StackPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSchemaModule({ schema: [StackViewType] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default StackPlugin;\n", "---\nid: org.dxos.plugin.stack\nname: StackPlugin\nversion: 0.1.0\n---\n\nCollections plugin for `DXOS` Composer \u2014 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| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@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 \u2014 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 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Toolbar [+ Add Section] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 Stack (vertical, intrinsic) \u2502\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 StackSection \u2502 \u2502\n \u2502 \u2502 \u25BE [icon] Title [\u2192] \u2502 \u2502\n \u2502 \u2502 \u2514\u2500 Surface:section \u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 StackSection (collapsed\u2502 \u2502\n \u2502 \u2502 \u25B8 [icon] Title [\u2195] \u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent StackSection\n desc: A single collapsible section in the stack \u2014 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 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 StackItem.Heading \u2502\n \u2502 [sigil\u25BE] (sticky) [\u2192 or \u2195] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 CollapsibleContent \u2502\n \u2502 Surface type=section \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\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 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Settings.Section \u2502\n \u2502 Separation [toggle] \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\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.OpenCreateObject 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\ntest 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\ntest T-2: Add section via toolbar\n given: StackArticle is open\n when: user clicks the Add Section toolbar button\n then: SpaceOperation.OpenCreateObject is invoked with the collection as target\n```\n\n```mdl\ntest 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\ntest 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\ntest 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\ntest 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## 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 test\n uri: org.dxos.mdl.test@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"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,oBAAoB;AAC7B,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;;;ACV9B;;;ADeO,IAAMC,cAAcC,OAAOC,OAAOC,IAAAA,EAAMC,KAC7CC,UAAUC,gBAAgB;EAAEC,QAAQ;IAACC;;AAAe,CAAA,GACpDH,UAAUI,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDN,UAAUO,sBAAsB;EAAEC;AAAa,CAAA,GAC/CR,UAAUS,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUb,KAAKc;IAAIC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACApB,OAAOqB,IAAI;AAGb,IAAA,sBAAetB;",
6
+ "names": ["Plugin", "AppPlugin", "ReactSurface", "meta", "translations", "StackViewType", "StackPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addSchemaModule", "schema", "StackViewType", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations", "addPluginAssetModule", "asset", "pluginId", "id", "path", "content", "pluginSpec", "mimeType", "make"]
7
+ }
@@ -0,0 +1,7 @@
1
+ // src/capabilities/index.ts
2
+ import { Capability } from "@dxos/app-framework";
3
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-MD3CVY2N.mjs"));
4
+ export {
5
+ ReactSurface
6
+ };
7
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
5
+ "mappings": ";AAIA,SAASA,kBAAkB;AAEpB,IAAMC,eAAeD,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["Capability", "ReactSurface", "lazy"]
7
+ }
@@ -0,0 +1,36 @@
1
+ // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { DXN } from "@dxos/keys";
4
+ import { trim } from "@dxos/util";
5
+ var SECTION_IDENTIFIER = DXN.make("org.dxos.type.stackSection");
6
+ var meta = Plugin.makeMeta({
7
+ key: DXN.make("org.dxos.plugin.stack"),
8
+ // TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
9
+ // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
10
+ name: "Collections",
11
+ author: "DXOS",
12
+ spec: "PLUGIN.mdl",
13
+ description: trim`
14
+ StackPlugin renders any Collection object as a vertically scrollable stack of collapsible sections in the
15
+ Composer article surface. Each section wraps an arbitrary ECHO object and delegates its content rendering
16
+ to the section surface role, enabling any other plugin to contribute its own section renderer.
17
+
18
+ Sections can be individually collapsed to show only their title, expanded to reveal full content, navigated
19
+ to directly, or removed from the collection. New sections can be inserted before or after any existing
20
+ section via a per-section dropdown menu, or appended via the toolbar Add button.
21
+
22
+ The plugin registers StackViewType with the ECHO schema module so that per-section view metadata
23
+ (height overrides, custom display data) can be stored and replicated alongside the collection.
24
+
25
+ A settings panel exposes a separation toggle that controls whether visual dividers are rendered between
26
+ sections.
27
+ `,
28
+ icon: "ph--stack-simple--regular",
29
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
30
+ });
31
+
32
+ export {
33
+ SECTION_IDENTIFIER,
34
+ meta
35
+ };
36
+ //# sourceMappingURL=chunk-RGJSGQGF.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const SECTION_IDENTIFIER = DXN.make('org.dxos.type.stackSection');\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.stack'),\n // TODO(wittjosiah): Prevents \"stacks\" language from being exposed to users in settings panel.\n // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.\n name: 'Collections',\n author: 'DXOS',\n spec: 'PLUGIN.mdl',\n description: trim`\n StackPlugin renders any Collection object 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 icon: 'ph--stack-simple--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack',\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,qBAAqBF,IAAIG,KAAK,4BAAA;AAEpC,IAAMC,OAAOL,OAAOM,SAAS;EAClCC,KAAKN,IAAIG,KAAK,uBAAA;;;EAGdI,MAAM;EACNC,QAAQ;EACRC,MAAM;EACNC,aAAaT;;;;;;;;;;;;;;;EAebU,MAAM;EACNC,QAAQ;AACV,CAAA;",
6
+ "names": ["Plugin", "DXN", "trim", "SECTION_IDENTIFIER", "make", "meta", "makeMeta", "key", "name", "author", "spec", "description", "icon", "source"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  // src/types/stack.ts
2
2
  import * as Schema from "effect/Schema";
3
- import { Type } from "@dxos/echo";
3
+ import { DXN, Type } from "@dxos/echo";
4
4
  var SectionSchema = Schema.Struct({
5
5
  height: Schema.optional(Schema.Number),
6
6
  // Space for data that isn't stack-specific but is specific to this view instance.
@@ -15,13 +15,10 @@ var StackViewType = Schema.Struct({
15
15
  key: Schema.String,
16
16
  value: SectionSchema
17
17
  })
18
- }).pipe(Type.object({
19
- typename: "org.dxos.type.stack-view",
20
- version: "0.1.0"
21
- }));
18
+ }).pipe(Type.makeObject(DXN.make("org.dxos.type.stackView", "0.1.0")));
22
19
 
23
20
  export {
24
21
  SectionSchema,
25
22
  StackViewType
26
23
  };
27
- //# sourceMappingURL=chunk-YPQYUBQP.mjs.map
24
+ //# sourceMappingURL=chunk-T4NSFSPH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/stack.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { DXN, Type } from '@dxos/echo';\n\n// All section metadata needs to be optional/have defaults.\n// Any objects added to the collection will start with the section defaults.\n// If an object is removed from the collection without removing the section metadata this is fine.\n// Stack components should clean-up the superfluous data on future edits.\n\nexport const SectionSchema = Schema.Struct({\n height: Schema.optional(Schema.Number),\n // Space for data that isn't stack-specific but is specific to this view instance.\n // e.g. cover/fill for an image\n custom: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n});\n\n// TODO(wittjosiah): This needs a relation to be connected to a stack.\nexport const StackViewType = Schema.Struct({\n sections: Schema.Record({ key: Schema.String, value: SectionSchema }),\n}).pipe(Type.makeObject(DXN.make('org.dxos.type.stackView', '0.1.0')));\n\nexport type StackViewType = Type.InstanceType<typeof StackViewType>;\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,YAAY;AAOnB,IAAMC,gBAAuBC,cAAO;EACzCC,QAAeC,gBAAgBC,aAAM;;;EAGrCC,QAAeF,gBAAgBG,cAAO;IAAEC,KAAYC;IAAQC,OAAcC;EAAI,CAAA,CAAA;AAChF,CAAA;AAGO,IAAMC,gBAAuBV,cAAO;EACzCW,UAAiBN,cAAO;IAAEC,KAAYC;IAAQC,OAAOT;EAAc,CAAA;AACrE,CAAA,EAAGa,KAAKd,KAAKe,WAAWhB,IAAIiB,KAAK,2BAA2B,OAAA,CAAA,CAAA;",
6
+ "names": ["Schema", "DXN", "Type", "SectionSchema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "sections", "pipe", "makeObject", "make"]
7
+ }
@@ -1,22 +1,3 @@
1
- import {
2
- meta
3
- } from "./chunk-G4CLPE5A.mjs";
4
-
5
- // src/containers/StackContainer/StackContainer.tsx
6
- import { Atom, useAtomValue } from "@effect-atom/atom-react";
7
- import * as Option from "effect/Option";
8
- import React4, { useCallback, useState as useState2 } from "react";
9
- import { useCapabilities, useOperationInvoker } from "@dxos/app-framework/ui";
10
- import { AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
11
- import { useAppGraph } from "@dxos/app-toolkit/ui";
12
- import { Obj } from "@dxos/echo";
13
- import { AtomObj } from "@dxos/echo-atom";
14
- import { Graph } from "@dxos/plugin-graph";
15
- import { SpaceOperation } from "@dxos/plugin-space/types";
16
- import { Toolbar, toLocalizedString, useTranslation as useTranslation3 } from "@dxos/react-ui";
17
- import { Stack, StackItem as StackItem2 } from "@dxos/react-ui-stack";
18
- import { isNonNullable } from "@dxos/util";
19
-
20
1
  // src/components/StackContext/StackContext.tsx
21
2
  import { createContext, useContext } from "react";
22
3
  var StackContext = /* @__PURE__ */ createContext({
@@ -36,10 +17,12 @@ var useStack = () => useContext(StackContext);
36
17
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
37
18
  import React2, { useMemo, useState } from "react";
38
19
  import { Surface } from "@dxos/app-framework/ui";
20
+ import { AppSurface } from "@dxos/app-toolkit/ui";
39
21
  import { DropdownMenu, Icon, IconButton, useTranslation } from "@dxos/react-ui";
40
22
  import { useAttentionAttributes } from "@dxos/react-ui-attention";
41
23
  import { StackItem } from "@dxos/react-ui-stack";
42
- import { getSize, mx, textBlockWidth } from "@dxos/ui-theme";
24
+ import { getSize, mx } from "@dxos/ui-theme";
25
+ import { meta } from "#meta";
43
26
 
44
27
  // src/components/StackSection/CaretDownUp.tsx
45
28
  import React from "react";
@@ -71,7 +54,7 @@ var CaretDownUp = ({ children, ...props }) => {
71
54
 
72
55
  // src/components/StackSection/StackSection.tsx
73
56
  var sectionActionDimensions = "p-1 my-1 shrink-0 min-h-0 w-(--dx-rail-action) h-min";
74
- var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--regular" } }) => {
57
+ var StackSection = ({ id, view, object, metadata: { icon = "ph--circle-dashed--regular" } }) => {
75
58
  const { t } = useTranslation(meta.id);
76
59
  const { attendableId: parentAttendableId, onNavigate, onAdd, onCollapse, onDelete } = useStack();
77
60
  const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
@@ -108,187 +91,92 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
108
91
  asChild: true
109
92
  }, /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement(Icon, {
110
93
  icon,
111
- size: 5,
112
94
  classNames: "transition-opacity"
113
95
  }))), /* @__PURE__ */ React2.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React2.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React2.createElement(DropdownMenu.Viewport, null, view.collapsed ? /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
114
96
  onClick: () => onNavigate(id),
115
97
  "data-testid": "section.navigate-to"
116
98
  }, /* @__PURE__ */ React2.createElement(Icon, {
117
- icon: "ph--arrow-right--regular",
118
- size: 5
99
+ icon: "ph--arrow-right--regular"
119
100
  }), /* @__PURE__ */ React2.createElement("span", {
120
101
  className: "ms-2 grow"
121
- }, t("navigate to section label"))) : /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
102
+ }, t("navigate-to-section.label"))) : /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
122
103
  asChild: true
123
104
  }, /* @__PURE__ */ React2.createElement(DropdownMenu.Item, null, /* @__PURE__ */ React2.createElement(CaretDownUp, {
124
105
  className: getSize(5)
125
106
  }), /* @__PURE__ */ React2.createElement("span", {
126
107
  className: "ms-2 grow"
127
- }, t("collapse label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
108
+ }, t("collapse.label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
128
109
  onClick: () => onAdd(id, "before"),
129
110
  "data-testid": "section.add-before"
130
111
  }, /* @__PURE__ */ React2.createElement(Icon, {
131
- icon: "ph--arrow-line-up--regular",
132
- size: 5
112
+ icon: "ph--arrow-line-up--regular"
133
113
  }), /* @__PURE__ */ React2.createElement("span", {
134
114
  className: "ms-2 grow"
135
- }, t("add section before label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
115
+ }, t("add-section-before.label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
136
116
  onClick: () => onAdd(id, "after"),
137
117
  "data-testid": "section.add-after"
138
118
  }, /* @__PURE__ */ React2.createElement(Icon, {
139
- icon: "ph--arrow-line-down--regular",
140
- size: 5
119
+ icon: "ph--arrow-line-down--regular"
141
120
  }), /* @__PURE__ */ React2.createElement("span", {
142
121
  className: "ms-2 grow"
143
- }, t("add section after label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
122
+ }, t("add-section-after.label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
144
123
  onClick: () => onDelete(id),
145
124
  "data-testid": "section.remove"
146
125
  }, /* @__PURE__ */ React2.createElement(Icon, {
147
- icon: "ph--trash--regular",
148
- size: 5
126
+ icon: "ph--trash--regular"
149
127
  }), /* @__PURE__ */ React2.createElement("span", {
150
128
  className: "ms-2 grow"
151
- }, t("remove section label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
129
+ }, t("remove-section.label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
152
130
  asChild: true
153
131
  }, /* @__PURE__ */ React2.createElement(IconButton, {
154
132
  iconOnly: true,
155
133
  variant: "ghost",
156
- label: t("expand label"),
134
+ label: t("expand.label"),
157
135
  icon: "ph--caret-up-down--regular",
158
136
  classNames: sectionActionDimensions
159
137
  })) : /* @__PURE__ */ React2.createElement(IconButton, {
160
138
  iconOnly: true,
161
139
  variant: "ghost",
162
140
  onClick: () => onNavigate(id),
163
- label: t("navigate to section label"),
141
+ label: t("navigate-to-section.label"),
164
142
  icon: "ph--arrow-right--regular",
165
143
  "data-testid": "section.navigate-to",
166
144
  classNames: sectionActionDimensions
167
145
  }))), /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ React2.createElement(Surface.Surface, {
168
- role: "section",
146
+ type: AppSurface.Section,
169
147
  data,
170
148
  limit: 1,
171
149
  placeholder: /* @__PURE__ */ React2.createElement(React2.Fragment, null)
172
150
  })), view.collapsed && /* @__PURE__ */ React2.createElement(StackItem.Content, {
173
151
  classNames: "dx-attention-surface"
174
152
  }, /* @__PURE__ */ React2.createElement("h2", {
175
- className: mx("flex items-center p-4 font-medium", textBlockWidth)
153
+ className: mx("flex items-center p-4 font-medium")
176
154
  }, view.title))));
177
155
  };
178
156
 
179
157
  // src/components/StackSettings/StackSettings.tsx
180
158
  import React3 from "react";
181
159
  import { Input, useTranslation as useTranslation2 } from "@dxos/react-ui";
182
- import { Settings } from "@dxos/react-ui-form";
183
-
184
- // src/containers/StackContainer/StackContainer.tsx
185
- var collectionObjectsFamily = Atom.family((collection) => Atom.make((get) => {
186
- const snapshot = get(AtomObj.make(collection));
187
- return snapshot.objects.map((ref) => get(AtomObj.makeWithReactive(ref))).filter(isNonNullable);
188
- }));
189
- var StackContainer = ({ attendableId, subject: collection }) => {
190
- const { invokePromise } = useOperationInvoker();
191
- const { graph } = useAppGraph();
192
- const { t } = useTranslation3(meta.id);
193
- const allMetadata = useCapabilities(AppCapabilities.Metadata);
194
- const [collapsedSections, setCollapsedSections] = useState2({});
195
- const collectionObjects = useAtomValue(collectionObjectsFamily(collection));
196
- const items = collectionObjects.map((object) => {
197
- const metadata = allMetadata.find((m) => m.id === (Obj.getTypename(object) ?? "never"))?.metadata;
198
- const view = {
199
- // ...stack.sections[object.id],
200
- collapsed: collapsedSections[Obj.getDXN(object).toString()],
201
- title: object?.title ?? // TODO(wittjosiah): `getNode` is not reactive.
202
- toLocalizedString(Graph.getNode(graph, Obj.getDXN(object).toString()).pipe(Option.getOrNull)?.properties.label, t)
203
- };
204
- return {
205
- id: Obj.getDXN(object).toString(),
206
- object,
207
- metadata,
208
- view
209
- };
210
- });
211
- const handleDelete = useCallback(async (id) => {
212
- const index = collection.objects.map((object2) => object2.target).filter(isNonNullable).findIndex((section) => Obj.getDXN(section).toString() === id);
213
- const object = collection.objects[index].target;
214
- if (Obj.isObject(object)) {
215
- await invokePromise(SpaceOperation.RemoveObjects, {
216
- objects: [
217
- object
218
- ],
219
- target: collection
220
- });
221
- }
222
- }, [
223
- collection,
224
- invokePromise
225
- ]);
226
- const handleAdd = useCallback(async (id, position) => {
227
- await invokePromise(LayoutOperation.UpdateDialog, {
228
- subject: `${meta.id}.AddSectionDialog`,
229
- blockAlign: "start",
230
- props: {
231
- path: id,
232
- position,
233
- collection
234
- }
235
- });
236
- }, [
237
- collection,
238
- invokePromise
239
- ]);
240
- const handleNavigate = useCallback(async (id) => {
241
- await invokePromise(LayoutOperation.Open, {
242
- subject: [
243
- id
244
- ]
245
- });
246
- }, [
247
- invokePromise
248
- ]);
249
- const handleCollapse = useCallback((id, collapsed) => setCollapsedSections((prev) => ({
250
- ...prev,
251
- [id]: collapsed
252
- })), []);
253
- const handleAddSection = useCallback(() => invokePromise(SpaceOperation.OpenCreateObject, {
254
- target: collection,
255
- navigable: false
256
- }), [
257
- collection,
258
- invokePromise
259
- ]);
260
- return /* @__PURE__ */ React4.createElement(StackItem2.Content, {
261
- toolbar: true,
262
- classNames: "dx-article overflow-hidden border-l border-r border-subdued-separator"
263
- }, /* @__PURE__ */ React4.createElement(Toolbar.Root, null, /* @__PURE__ */ React4.createElement(Toolbar.IconButton, {
264
- icon: "ph--plus--regular",
265
- iconOnly: true,
266
- label: "Add section",
267
- "data-testid": "stack.addSection",
268
- onClick: handleAddSection
269
- })), /* @__PURE__ */ React4.createElement(StackContext.Provider, {
270
- value: {
271
- attendableId,
272
- onCollapse: handleCollapse,
273
- onNavigate: handleNavigate,
274
- onDelete: handleDelete,
275
- onAdd: handleAdd
276
- }
277
- }, /* @__PURE__ */ React4.createElement(Stack, {
278
- orientation: "vertical",
279
- size: "intrinsic",
280
- id: Obj.getDXN(collection).toString(),
281
- "data-testid": "main.stack",
282
- classNames: "overflow-y-auto"
283
- }, items.map((item) => /* @__PURE__ */ React4.createElement(StackSection, {
284
- key: item.id,
285
- ...item
286
- })))));
160
+ import { Settings as SettingsForm } from "@dxos/react-ui-form";
161
+ import { meta as meta2 } from "#meta";
162
+ var StackSettings = ({ settings }) => {
163
+ const { t } = useTranslation2(meta2.id);
164
+ return /* @__PURE__ */ React3.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React3.createElement(SettingsForm.Section, {
165
+ title: t("settings.title", {
166
+ ns: meta2.id
167
+ })
168
+ }, /* @__PURE__ */ React3.createElement(SettingsForm.Item, {
169
+ title: t("settings.separation.label"),
170
+ description: t("settings.separation.description")
171
+ }, /* @__PURE__ */ React3.createElement(Input.Switch, {
172
+ checked: settings.separation,
173
+ onCheckedChange: (checked) => settings.separation = !!checked
174
+ }))));
287
175
  };
288
-
289
- // src/containers/StackContainer/index.ts
290
- var StackContainer_default = StackContainer;
291
176
  export {
292
- StackContainer_default as default
177
+ StackContext,
178
+ StackSection,
179
+ StackSettings,
180
+ useStack
293
181
  };
294
- //# sourceMappingURL=StackContainer-OLHE5F4E.mjs.map
182
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/StackContext/StackContext.tsx", "../../../../src/components/StackSection/StackSection.tsx", "../../../../src/components/StackSection/CaretDownUp.tsx", "../../../../src/components/StackSettings/StackSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type AddSectionPosition } from '#types';\n\nexport type StackContextValue = {\n attendableId: string;\n onCollapse: (id: string, collapsed: boolean) => void;\n onNavigate: (id: string) => Promise<void>;\n onDelete: (id: string) => Promise<void>;\n onAdd: (id: string, position: AddSectionPosition) => void;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n attendableId: '',\n onCollapse: () => {},\n onNavigate: async () => {},\n onDelete: async () => {},\n onAdd: () => {},\n});\n\nexport const useStack = () => useContext(StackContext);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport React, { useMemo, useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { DropdownMenu, Icon, IconButton, useTranslation } from '@dxos/react-ui';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { getSize, mx } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\nimport { type StackSectionItem } from '#types';\n\nimport { useStack } from '../StackContext';\nimport { CaretDownUp } from './CaretDownUp';\n\nconst sectionActionDimensions = 'p-1 my-1 shrink-0 min-h-0 w-(--dx-rail-action) h-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--circle-dashed--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(meta.id);\n const { attendableId: parentAttendableId, onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableId = `${parentAttendableId}/${object.id}`;\n const attentionAttrs = useAttentionAttributes(attendableId);\n const stackItem = useMemo(() => ({ id }), [id]);\n const data = useMemo(() => ({ attendableId, subject: object }), [object, attendableId]);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={stackItem} role='section' {...attentionAttrs}>\n <StackItem.Heading classNames='dx-attention-surface'>\n <span className='sr-only'>{view.title}</span>\n <StackItem.HeadingStickyContent>\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: setOptionsMenuOpen,\n }}\n >\n <DropdownMenu.Trigger asChild>\n <StackItem.SigilButton>\n <Icon icon={icon} classNames='transition-opacity' />\n </StackItem.SigilButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content>\n <DropdownMenu.Viewport>\n {view.collapsed ? (\n <DropdownMenu.Item onClick={() => onNavigate(id)} data-testid='section.navigate-to'>\n <Icon icon='ph--arrow-right--regular' />\n <span className='ms-2 grow'>{t('navigate-to-section.label')}</span>\n </DropdownMenu.Item>\n ) : (\n <CollapsiblePrimitive.Trigger asChild>\n <DropdownMenu.Item>\n <CaretDownUp className={getSize(5)} />\n <span className='ms-2 grow'>{t('collapse.label')}</span>\n </DropdownMenu.Item>\n </CollapsiblePrimitive.Trigger>\n )}\n <DropdownMenu.Item onClick={() => onAdd(id, 'before')} data-testid='section.add-before'>\n <Icon icon='ph--arrow-line-up--regular' />\n <span className='ms-2 grow'>{t('add-section-before.label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onAdd(id, 'after')} data-testid='section.add-after'>\n <Icon icon='ph--arrow-line-down--regular' />\n <span className='ms-2 grow'>{t('add-section-after.label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onDelete(id)} data-testid='section.remove'>\n <Icon icon='ph--trash--regular' />\n <span className='ms-2 grow'>{t('remove-section.label')}</span>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n {view.collapsed ? (\n <CollapsiblePrimitive.Trigger asChild>\n <IconButton\n iconOnly\n variant='ghost'\n label={t('expand.label')}\n icon='ph--caret-up-down--regular'\n classNames={sectionActionDimensions}\n />\n </CollapsiblePrimitive.Trigger>\n ) : (\n <IconButton\n iconOnly\n variant='ghost'\n onClick={() => onNavigate(id)}\n label={t('navigate-to-section.label')}\n icon='ph--arrow-right--regular'\n data-testid='section.navigate-to'\n classNames={sectionActionDimensions}\n />\n )}\n </StackItem.HeadingStickyContent>\n </StackItem.Heading>\n <CollapsiblePrimitive.Content>\n <Surface.Surface type={AppSurface.Section} data={data} limit={1} placeholder={<></>} />\n </CollapsiblePrimitive.Content>\n {view.collapsed && (\n <StackItem.Content classNames='dx-attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium')}>{view.title}</h2>\n </StackItem.Content>\n )}\n </StackItem.Root>\n </CollapsiblePrimitive.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nexport const CaretDownUp = ({ children, ...props }: ComponentPropsWithoutRef<'svg'>) => {\n return (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' {...props}>\n <rect width='256' height='256' fill='none' />\n <polyline\n points='80 224 128 176 176 224'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n <polyline\n points='80 32 128 80 176 32'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n {children}\n </svg>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { Settings as SettingsForm } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { type StackSettingsProps } from '#types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title', { ns: meta.id })}>\n <SettingsForm.Item title={t('settings.separation.label')} description={t('settings.separation.description')}>\n <Input.Switch\n checked={settings.separation}\n onCheckedChange={(checked) => (settings.separation = !!checked)}\n />\n </SettingsForm.Item>\n </SettingsForm.Section>\n </SettingsForm.Viewport>\n );\n};\n"],
5
+ "mappings": "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",
6
+ "names": ["createContext", "useContext", "StackContext", "attendableId", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "CollapsiblePrimitive", "React", "useMemo", "useState", "Surface", "AppSurface", "DropdownMenu", "Icon", "IconButton", "useTranslation", "useAttentionAttributes", "StackItem", "getSize", "mx", "meta", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "meta", "attendableId", "parentAttendableId", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attentionAttrs", "useAttentionAttributes", "stackItem", "useMemo", "data", "subject", "React", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "Heading", "classNames", "span", "className", "title", "HeadingStickyContent", "DropdownMenu", "Trigger", "SigilButton", "Icon", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "type", "AppSurface", "Section", "limit", "placeholder", "h2", "mx", "React", "Input", "useTranslation", "Settings", "SettingsForm", "meta", "StackSettings", "settings", "t", "id", "Viewport", "Section", "title", "ns", "Item", "description", "Switch", "checked", "separation", "onCheckedChange"]
7
+ }
@@ -0,0 +1,7 @@
1
+ // src/containers/index.ts
2
+ import { lazy } from "react";
3
+ var StackArticle = lazy(() => import("../StackArticle-M7AYNDZN.mjs"));
4
+ export {
5
+ StackArticle
6
+ };
7
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/containers/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const StackArticle: ComponentType<any> = lazy(() => import('./StackArticle'));\n"],
5
+ "mappings": ";AAIA,SAA6BA,YAAY;AAElC,IAAMC,eAAmCD,KAAK,MAAM,OAAO,8BAAA,CAAA;",
6
+ "names": ["lazy", "StackArticle"]
7
+ }
@@ -0,0 +1,15 @@
1
+ import {
2
+ SectionSchema,
3
+ StackViewType
4
+ } from "./chunk-T4NSFSPH.mjs";
5
+ import {
6
+ SECTION_IDENTIFIER,
7
+ meta
8
+ } from "./chunk-RGJSGQGF.mjs";
9
+ export {
10
+ SECTION_IDENTIFIER,
11
+ SectionSchema,
12
+ StackViewType,
13
+ meta
14
+ };
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"inputs":{"src/meta.ts":{"bytes":4808,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/stack.ts":{"bytes":3608,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":409,"imports":[{"path":"src/types/stack.ts","kind":"import-statement","original":"./stack"}],"format":"esm"},"src/index.ts":{"bytes":449,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-stack/PLUGIN.mdl?raw":{"bytes":10138,"imports":[]},"src/StackPlugin.ts":{"bytes":3256,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-stack/PLUGIN.mdl?raw","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3130,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":802,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/components/StackContext/StackContext.tsx":{"bytes":1849,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/StackContext/index.ts":{"bytes":388,"imports":[{"path":"src/components/StackContext/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"src/components/StackSection/CaretDownUp.tsx":{"bytes":2864,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/StackSection/StackSection.tsx":{"bytes":17809,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/components/StackContext/index.ts","kind":"import-statement","original":"../StackContext"},{"path":"src/components/StackSection/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"}],"format":"esm"},"src/components/StackSection/index.ts":{"bytes":388,"imports":[{"path":"src/components/StackSection/StackSection.tsx","kind":"import-statement","original":"./StackSection"}],"format":"esm"},"src/components/StackSettings/StackSettings.tsx":{"bytes":3207,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/components/StackSettings/index.ts":{"bytes":389,"imports":[{"path":"src/components/StackSettings/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"}],"format":"esm"},"src/components/index.ts":{"bytes":589,"imports":[{"path":"src/components/StackContext/index.ts","kind":"import-statement","original":"./StackContext"},{"path":"src/components/StackSection/index.ts","kind":"import-statement","original":"./StackSection"},{"path":"src/components/StackSettings/index.ts","kind":"import-statement","original":"./StackSettings"}],"format":"esm"},"src/containers/StackArticle/StackArticle.tsx":{"bytes":18669,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-atom","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/containers/StackArticle/index.ts":{"bytes":506,"imports":[{"path":"src/containers/StackArticle/StackArticle.tsx","kind":"import-statement","original":"./StackArticle"}],"format":"esm"},"src/containers/index.ts":{"bytes":702,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/StackArticle/index.ts","kind":"dynamic-import","original":"./StackArticle"}],"format":"esm"},"src/plugin.ts":{"bytes":850,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/translations.ts":{"bytes":4619,"imports":[{"path":"@dxos/react-ui-stack/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-T4NSFSPH.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":154},"dist/lib/neutral/react-surface-MD3CVY2N.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1620},"dist/lib/neutral/react-surface-MD3CVY2N.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":741}},"bytes":878},"dist/lib/neutral/StackArticle-M7AYNDZN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9691},"dist/lib/neutral/StackArticle-M7AYNDZN.mjs":{"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-atom","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/StackArticle/index.ts","inputs":{"src/containers/StackArticle/StackArticle.tsx":{"bytesInOutput":4123},"src/containers/StackArticle/index.ts":{"bytesInOutput":0}},"bytes":4260},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-T4NSFSPH.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-RGJSGQGF.mjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","SectionSchema","StackViewType","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":252},"dist/lib/neutral/chunk-T4NSFSPH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1716},"dist/lib/neutral/chunk-T4NSFSPH.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"src/types/stack.ts":{"bytesInOutput":567},"src/types/index.ts":{"bytesInOutput":0}},"bytes":679},"dist/lib/neutral/StackPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13592},"dist/lib/neutral/StackPlugin.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["StackPlugin","default"],"entryPoint":"src/StackPlugin.ts","inputs":{"src/StackPlugin.ts":{"bytesInOutput":690},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-stack/PLUGIN.mdl?raw":{"bytesInOutput":11772}},"bytes":12683},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":432},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/react-surface-MD3CVY2N.mjs","kind":"dynamic-import"}],"exports":["ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":149}},"bytes":240},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13929},"dist/lib/neutral/components/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["StackContext","StackSection","StackSettings","useStack"],"entryPoint":"src/components/index.ts","inputs":{"src/components/StackContext/StackContext.tsx":{"bytesInOutput":285},"src/components/StackContext/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/StackSection/StackSection.tsx":{"bytesInOutput":5244},"src/components/StackSection/CaretDownUp.tsx":{"bytesInOutput":771},"src/components/StackSection/index.ts":{"bytesInOutput":0},"src/components/StackSettings/StackSettings.tsx":{"bytesInOutput":814},"src/components/StackSettings/index.ts":{"bytesInOutput":0}},"bytes":7466},"dist/lib/neutral/containers/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":395},"dist/lib/neutral/containers/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/neutral/StackArticle-M7AYNDZN.mjs","kind":"dynamic-import"}],"exports":["StackArticle"],"entryPoint":"src/containers/index.ts","inputs":{"src/containers/index.ts":{"bytesInOutput":101}},"bytes":190},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-RGJSGQGF.mjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":144},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":437},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-RGJSGQGF.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["StackPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":108}},"bytes":235},"dist/lib/neutral/chunk-RGJSGQGF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2215},"dist/lib/neutral/chunk-RGJSGQGF.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":1628}},"bytes":1729},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2139},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"@dxos/react-ui-stack/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":1404}},"bytes":1496}}}
@@ -0,0 +1,9 @@
1
+ import {
2
+ SECTION_IDENTIFIER,
3
+ meta
4
+ } from "./chunk-RGJSGQGF.mjs";
5
+ export {
6
+ SECTION_IDENTIFIER,
7
+ meta
8
+ };
9
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1,11 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-RGJSGQGF.mjs";
4
+
5
+ // src/plugin.ts
6
+ import { Plugin } from "@dxos/app-framework";
7
+ var StackPlugin = Plugin.lazy(meta, () => import("#plugin"));
8
+ export {
9
+ StackPlugin
10
+ };
11
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const StackPlugin = Plugin.lazy(meta, () => import('#plugin'));\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,cAAc;AAIhB,IAAMC,cAAcC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
6
+ "names": ["Plugin", "StackPlugin", "Plugin", "lazy", "meta"]
7
+ }
@@ -0,0 +1,23 @@
1
+ // src/capabilities/react-surface.tsx
2
+ import * as Effect from "effect/Effect";
3
+ import React from "react";
4
+ import { Capabilities, Capability } from "@dxos/app-framework";
5
+ import { Surface } from "@dxos/app-framework/ui";
6
+ import { AppSurface } from "@dxos/app-toolkit/ui";
7
+ import { Collection } from "@dxos/echo";
8
+ import { StackArticle } from "#containers";
9
+ var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, Surface.create({
10
+ id: "article",
11
+ filter: AppSurface.object(AppSurface.Article, Collection.Collection),
12
+ component: ({ role, data }) => {
13
+ return /* @__PURE__ */ React.createElement(StackArticle, {
14
+ attendableId: data.attendableId,
15
+ role,
16
+ subject: data.subject
17
+ });
18
+ }
19
+ }))));
20
+ export {
21
+ react_surface_default as default
22
+ };
23
+ //# sourceMappingURL=react-surface-MD3CVY2N.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { Collection } from '@dxos/echo';\n\nimport { StackArticle } from '#containers';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Capabilities.ReactSurface,\n Surface.create({\n id: 'article',\n filter: AppSurface.object(AppSurface.Article, Collection.Collection),\n component: ({ role, data }) => {\n return <StackArticle attendableId={data.attendableId} role={role} subject={data.subject} />;\n },\n }),\n ),\n ),\n);\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,kBAAkB;AAE3B,SAASC,oBAAoB;AAE7B,IAAA,wBAAeJ,WAAWK,WAAW,MAC5BC,eACLN,WAAWO,YACTR,aAAaS,cACbP,QAAQQ,OAAO;EACbC,IAAI;EACJC,QAAQT,WAAWU,OAAOV,WAAWW,SAASV,WAAWA,UAAU;EACnEW,WAAW,CAAC,EAAEC,MAAMC,KAAI,MAAE;AACxB,WAAO,sBAAA,cAACZ,cAAAA;MAAaa,cAAcD,KAAKC;MAAcF;MAAYG,SAASF,KAAKE;;EAClF;AACF,CAAA,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "Collection", "StackArticle", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "filter", "object", "Article", "component", "role", "data", "attendableId", "subject"]
7
+ }