@dxos/plugin-stack 0.8.4-main.406dc2a → 0.8.4-main.43cb759274

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 (123) 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-NHMDZYOB.mjs → neutral/chunk-T4NSFSPH.mjs} +6 -10
  13. package/dist/lib/neutral/chunk-T4NSFSPH.mjs.map +7 -0
  14. package/dist/lib/neutral/components/index.mjs +182 -0
  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 +3 -1
  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 +3 -2
  34. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  35. package/dist/types/src/components/{StackContext.d.ts → StackContext/StackContext.d.ts} +2 -1
  36. package/dist/types/src/components/StackContext/StackContext.d.ts.map +1 -0
  37. package/dist/types/src/components/StackContext/index.d.ts +2 -0
  38. package/dist/types/src/components/StackContext/index.d.ts.map +1 -0
  39. package/dist/types/src/components/{CaretDownUp.d.ts → StackSection/CaretDownUp.d.ts} +1 -1
  40. package/dist/types/src/components/StackSection/CaretDownUp.d.ts.map +1 -0
  41. package/dist/types/src/components/{StackSection.d.ts → StackSection/StackSection.d.ts} +1 -1
  42. package/dist/types/src/components/StackSection/StackSection.d.ts.map +1 -0
  43. package/dist/types/src/components/StackSection/index.d.ts +2 -0
  44. package/dist/types/src/components/StackSection/index.d.ts.map +1 -0
  45. package/dist/types/src/components/{StackSettings.d.ts → StackSettings/StackSettings.d.ts} +1 -1
  46. package/dist/types/src/components/StackSettings/StackSettings.d.ts.map +1 -0
  47. package/dist/types/src/components/StackSettings/index.d.ts +2 -0
  48. package/dist/types/src/components/StackSettings/index.d.ts.map +1 -0
  49. package/dist/types/src/components/index.d.ts +2 -7
  50. package/dist/types/src/components/index.d.ts.map +1 -1
  51. package/dist/types/src/containers/StackArticle/StackArticle.d.ts +7 -0
  52. package/dist/types/src/containers/StackArticle/StackArticle.d.ts.map +1 -0
  53. package/dist/types/src/containers/StackArticle/index.d.ts +2 -0
  54. package/dist/types/src/containers/StackArticle/index.d.ts.map +1 -0
  55. package/dist/types/src/containers/index.d.ts +3 -0
  56. package/dist/types/src/containers/index.d.ts.map +1 -0
  57. package/dist/types/src/index.d.ts +1 -1
  58. package/dist/types/src/index.d.ts.map +1 -1
  59. package/dist/types/src/meta.d.ts +4 -3
  60. package/dist/types/src/meta.d.ts.map +1 -1
  61. package/dist/types/src/plugin.d.ts +3 -0
  62. package/dist/types/src/plugin.d.ts.map +1 -0
  63. package/dist/types/src/translations.d.ts +31 -31
  64. package/dist/types/src/translations.d.ts.map +1 -1
  65. package/dist/types/src/types/stack.d.ts +12 -14
  66. package/dist/types/src/types/stack.d.ts.map +1 -1
  67. package/dist/types/src/types/types.d.ts +3 -4
  68. package/dist/types/src/types/types.d.ts.map +1 -1
  69. package/dist/types/tsconfig.tsbuildinfo +1 -1
  70. package/package.json +88 -53
  71. package/src/StackPlugin.ts +19 -44
  72. package/src/capabilities/index.ts +2 -2
  73. package/src/capabilities/react-surface.tsx +20 -22
  74. package/src/components/{StackContext.tsx → StackContext/StackContext.tsx} +3 -1
  75. package/src/components/StackContext/index.ts +5 -0
  76. package/src/components/{StackSection.tsx → StackSection/StackSection.tsx} +28 -25
  77. package/src/components/StackSection/index.ts +5 -0
  78. package/src/components/StackSettings/StackSettings.tsx +28 -0
  79. package/src/components/StackSettings/index.ts +5 -0
  80. package/src/components/index.ts +2 -4
  81. package/src/containers/StackArticle/StackArticle.tsx +165 -0
  82. package/src/containers/StackArticle/index.ts +5 -0
  83. package/src/containers/index.ts +7 -0
  84. package/src/index.ts +1 -1
  85. package/src/meta.ts +24 -6
  86. package/src/plugin.ts +9 -0
  87. package/src/translations.ts +23 -22
  88. package/src/types/stack.ts +6 -7
  89. package/src/types/types.ts +3 -4
  90. package/src/vite-env.d.ts +10 -0
  91. package/dist/lib/browser/StackContainer-RFJDTQBT.mjs +0 -297
  92. package/dist/lib/browser/StackContainer-RFJDTQBT.mjs.map +0 -7
  93. package/dist/lib/browser/chunk-MS4QSWEZ.mjs +0 -17
  94. package/dist/lib/browser/chunk-MS4QSWEZ.mjs.map +0 -7
  95. package/dist/lib/browser/chunk-NHMDZYOB.mjs.map +0 -7
  96. package/dist/lib/browser/index.mjs +0 -99
  97. package/dist/lib/browser/index.mjs.map +0 -7
  98. package/dist/lib/browser/meta.json +0 -1
  99. package/dist/lib/browser/react-surface-DGGN5OPM.mjs +0 -40
  100. package/dist/lib/browser/react-surface-DGGN5OPM.mjs.map +0 -7
  101. package/dist/lib/node-esm/StackContainer-HL6KYBW2.mjs +0 -298
  102. package/dist/lib/node-esm/StackContainer-HL6KYBW2.mjs.map +0 -7
  103. package/dist/lib/node-esm/chunk-5FDDKAPB.mjs +0 -19
  104. package/dist/lib/node-esm/chunk-5FDDKAPB.mjs.map +0 -7
  105. package/dist/lib/node-esm/chunk-ZZFA7HIV.mjs +0 -30
  106. package/dist/lib/node-esm/chunk-ZZFA7HIV.mjs.map +0 -7
  107. package/dist/lib/node-esm/index.mjs +0 -100
  108. package/dist/lib/node-esm/index.mjs.map +0 -7
  109. package/dist/lib/node-esm/meta.json +0 -1
  110. package/dist/lib/node-esm/react-surface-TEOPQTLH.mjs +0 -41
  111. package/dist/lib/node-esm/react-surface-TEOPQTLH.mjs.map +0 -7
  112. package/dist/lib/node-esm/types/index.mjs +0 -10
  113. package/dist/types/src/components/CaretDownUp.d.ts.map +0 -1
  114. package/dist/types/src/components/StackContainer.d.ts +0 -9
  115. package/dist/types/src/components/StackContainer.d.ts.map +0 -1
  116. package/dist/types/src/components/StackContext.d.ts.map +0 -1
  117. package/dist/types/src/components/StackSection.d.ts.map +0 -1
  118. package/dist/types/src/components/StackSettings.d.ts.map +0 -1
  119. package/src/components/StackContainer.tsx +0 -161
  120. package/src/components/StackSettings.tsx +0 -30
  121. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  122. /package/dist/lib/{node-esm/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
  123. /package/src/components/{CaretDownUp.tsx → StackSection/CaretDownUp.tsx} +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 { TypedObject } from "@dxos/echo/internal";
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.
@@ -10,19 +10,15 @@ var SectionSchema = Schema.Struct({
10
10
  value: Schema.Any
11
11
  }))
12
12
  });
13
- var StackViewType = class extends TypedObject({
14
- typename: "dxos.org/type/StackView",
15
- version: "0.1.0"
16
- })({
17
- sections: Schema.mutable(Schema.Record({
13
+ var StackViewType = Schema.Struct({
14
+ sections: Schema.Record({
18
15
  key: Schema.String,
19
16
  value: SectionSchema
20
- }))
21
- }) {
22
- };
17
+ })
18
+ }).pipe(Type.makeObject(DXN.make("org.dxos.type.stackView", "0.1.0")));
23
19
 
24
20
  export {
25
21
  SectionSchema,
26
22
  StackViewType
27
23
  };
28
- //# sourceMappingURL=chunk-NHMDZYOB.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
+ }
@@ -0,0 +1,182 @@
1
+ // src/components/StackContext/StackContext.tsx
2
+ import { createContext, useContext } from "react";
3
+ var StackContext = /* @__PURE__ */ createContext({
4
+ attendableId: "",
5
+ onCollapse: () => {
6
+ },
7
+ onNavigate: async () => {
8
+ },
9
+ onDelete: async () => {
10
+ },
11
+ onAdd: () => {
12
+ }
13
+ });
14
+ var useStack = () => useContext(StackContext);
15
+
16
+ // src/components/StackSection/StackSection.tsx
17
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
18
+ import React2, { useMemo, useState } from "react";
19
+ import { Surface } from "@dxos/app-framework/ui";
20
+ import { AppSurface } from "@dxos/app-toolkit/ui";
21
+ import { DropdownMenu, Icon, IconButton, useTranslation } from "@dxos/react-ui";
22
+ import { useAttentionAttributes } from "@dxos/react-ui-attention";
23
+ import { StackItem } from "@dxos/react-ui-stack";
24
+ import { getSize, mx } from "@dxos/ui-theme";
25
+ import { meta } from "#meta";
26
+
27
+ // src/components/StackSection/CaretDownUp.tsx
28
+ import React from "react";
29
+ var CaretDownUp = ({ children, ...props }) => {
30
+ return /* @__PURE__ */ React.createElement("svg", {
31
+ xmlns: "http://www.w3.org/2000/svg",
32
+ viewBox: "0 0 256 256",
33
+ ...props
34
+ }, /* @__PURE__ */ React.createElement("rect", {
35
+ width: "256",
36
+ height: "256",
37
+ fill: "none"
38
+ }), /* @__PURE__ */ React.createElement("polyline", {
39
+ points: "80 224 128 176 176 224",
40
+ fill: "none",
41
+ stroke: "currentColor",
42
+ strokeLinecap: "round",
43
+ strokeLinejoin: "round",
44
+ strokeWidth: "16"
45
+ }), /* @__PURE__ */ React.createElement("polyline", {
46
+ points: "80 32 128 80 176 32",
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ strokeLinecap: "round",
50
+ strokeLinejoin: "round",
51
+ strokeWidth: "16"
52
+ }), children);
53
+ };
54
+
55
+ // src/components/StackSection/StackSection.tsx
56
+ var sectionActionDimensions = "p-1 my-1 shrink-0 min-h-0 w-(--dx-rail-action) h-min";
57
+ var StackSection = ({ id, view, object, metadata: { icon = "ph--circle-dashed--regular" } }) => {
58
+ const { t } = useTranslation(meta.id);
59
+ const { attendableId: parentAttendableId, onNavigate, onAdd, onCollapse, onDelete } = useStack();
60
+ const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
61
+ const attendableId = `${parentAttendableId}/${object.id}`;
62
+ const attentionAttrs = useAttentionAttributes(attendableId);
63
+ const stackItem = useMemo(() => ({
64
+ id
65
+ }), [
66
+ id
67
+ ]);
68
+ const data = useMemo(() => ({
69
+ attendableId,
70
+ subject: object
71
+ }), [
72
+ object,
73
+ attendableId
74
+ ]);
75
+ return /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Root, {
76
+ asChild: true,
77
+ open: !view.collapsed,
78
+ onOpenChange: (nextOpen) => onCollapse?.(id, !nextOpen)
79
+ }, /* @__PURE__ */ React2.createElement(StackItem.Root, {
80
+ item: stackItem,
81
+ role: "section",
82
+ ...attentionAttrs
83
+ }, /* @__PURE__ */ React2.createElement(StackItem.Heading, {
84
+ classNames: "dx-attention-surface"
85
+ }, /* @__PURE__ */ React2.createElement("span", {
86
+ className: "sr-only"
87
+ }, view.title), /* @__PURE__ */ React2.createElement(StackItem.HeadingStickyContent, null, /* @__PURE__ */ React2.createElement(DropdownMenu.Root, {
88
+ open: optionsMenuOpen,
89
+ onOpenChange: setOptionsMenuOpen
90
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Trigger, {
91
+ asChild: true
92
+ }, /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement(Icon, {
93
+ icon,
94
+ classNames: "transition-opacity"
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, {
96
+ onClick: () => onNavigate(id),
97
+ "data-testid": "section.navigate-to"
98
+ }, /* @__PURE__ */ React2.createElement(Icon, {
99
+ icon: "ph--arrow-right--regular"
100
+ }), /* @__PURE__ */ React2.createElement("span", {
101
+ className: "ms-2 grow"
102
+ }, t("navigate-to-section.label"))) : /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
103
+ asChild: true
104
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Item, null, /* @__PURE__ */ React2.createElement(CaretDownUp, {
105
+ className: getSize(5)
106
+ }), /* @__PURE__ */ React2.createElement("span", {
107
+ className: "ms-2 grow"
108
+ }, t("collapse.label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
109
+ onClick: () => onAdd(id, "before"),
110
+ "data-testid": "section.add-before"
111
+ }, /* @__PURE__ */ React2.createElement(Icon, {
112
+ icon: "ph--arrow-line-up--regular"
113
+ }), /* @__PURE__ */ React2.createElement("span", {
114
+ className: "ms-2 grow"
115
+ }, t("add-section-before.label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
116
+ onClick: () => onAdd(id, "after"),
117
+ "data-testid": "section.add-after"
118
+ }, /* @__PURE__ */ React2.createElement(Icon, {
119
+ icon: "ph--arrow-line-down--regular"
120
+ }), /* @__PURE__ */ React2.createElement("span", {
121
+ className: "ms-2 grow"
122
+ }, t("add-section-after.label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
123
+ onClick: () => onDelete(id),
124
+ "data-testid": "section.remove"
125
+ }, /* @__PURE__ */ React2.createElement(Icon, {
126
+ icon: "ph--trash--regular"
127
+ }), /* @__PURE__ */ React2.createElement("span", {
128
+ className: "ms-2 grow"
129
+ }, t("remove-section.label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
130
+ asChild: true
131
+ }, /* @__PURE__ */ React2.createElement(IconButton, {
132
+ iconOnly: true,
133
+ variant: "ghost",
134
+ label: t("expand.label"),
135
+ icon: "ph--caret-up-down--regular",
136
+ classNames: sectionActionDimensions
137
+ })) : /* @__PURE__ */ React2.createElement(IconButton, {
138
+ iconOnly: true,
139
+ variant: "ghost",
140
+ onClick: () => onNavigate(id),
141
+ label: t("navigate-to-section.label"),
142
+ icon: "ph--arrow-right--regular",
143
+ "data-testid": "section.navigate-to",
144
+ classNames: sectionActionDimensions
145
+ }))), /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ React2.createElement(Surface.Surface, {
146
+ type: AppSurface.Section,
147
+ data,
148
+ limit: 1,
149
+ placeholder: /* @__PURE__ */ React2.createElement(React2.Fragment, null)
150
+ })), view.collapsed && /* @__PURE__ */ React2.createElement(StackItem.Content, {
151
+ classNames: "dx-attention-surface"
152
+ }, /* @__PURE__ */ React2.createElement("h2", {
153
+ className: mx("flex items-center p-4 font-medium")
154
+ }, view.title))));
155
+ };
156
+
157
+ // src/components/StackSettings/StackSettings.tsx
158
+ import React3 from "react";
159
+ import { Input, useTranslation as useTranslation2 } from "@dxos/react-ui";
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
+ }))));
175
+ };
176
+ export {
177
+ StackContext,
178
+ StackSection,
179
+ StackSettings,
180
+ useStack
181
+ };
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": ";AAIA,SAASA,eAAeC,kBAAkB;AAYnC,IAAMC,eAAeF,8BAAiC;EAC3DG,cAAc;EACdC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,MAAMP,WAAWC,YAAAA;;;ACpBzC,YAAYO,0BAA0B;AACtC,OAAOC,UAASC,SAASC,gBAAgB;AAEzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,cAAcC,MAAMC,YAAYC,sBAAsB;AAC/D,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,SAASC,UAAU;AAE5B,SAASC,YAAY;;;ACVrB,OAAOC,WAA8C;AAE9C,IAAMC,cAAc,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;AACjF,SACE,sBAAA,cAACC,OAAAA;IAAIC,OAAM;IAA6BC,SAAQ;IAAe,GAAGH;KAChE,sBAAA,cAACI,QAAAA;IAAKC,OAAM;IAAMC,QAAO;IAAMC,MAAK;MACpC,sBAAA,cAACC,YAAAA;IACCC,QAAO;IACPF,MAAK;IACLG,QAAO;IACPC,eAAc;IACdC,gBAAe;IACfC,aAAY;MAEd,sBAAA,cAACL,YAAAA;IACCC,QAAO;IACPF,MAAK;IACLG,QAAO;IACPC,eAAc;IACdC,gBAAe;IACfC,aAAY;MAEbd,QAAAA;AAGP;;;ADTA,IAAMe,0BAA0B;AAIzB,IAAMC,eAAe,CAAC,EAC3BC,IACAC,MACAC,QACAC,UAAU,EAAEC,OAAO,6BAA4B,EAAE,MAC/B;AAClB,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKP,EAAE;AACpC,QAAM,EAAEQ,cAAcC,oBAAoBC,YAAYC,OAAOC,YAAYC,SAAQ,IAAKC,SAAAA;AACtF,QAAM,CAACC,iBAAiBC,kBAAAA,IAAsBC,SAAS,KAAA;AACvD,QAAMT,eAAe,GAAGC,kBAAAA,IAAsBP,OAAOF,EAAE;AACvD,QAAMkB,iBAAiBC,uBAAuBX,YAAAA;AAC9C,QAAMY,YAAYC,QAAQ,OAAO;IAAErB;EAAG,IAAI;IAACA;GAAG;AAC9C,QAAMsB,OAAOD,QAAQ,OAAO;IAAEb;IAAce,SAASrB;EAAO,IAAI;IAACA;IAAQM;GAAa;AAEtF,SACE,gBAAAgB,OAAA,cAAsBC,2BAAI;IAACC,SAAAA;IAAQC,MAAM,CAAC1B,KAAK2B;IAAWC,cAAc,CAACC,aAAalB,aAAaZ,IAAI,CAAC8B,QAAAA;KACtG,gBAAAN,OAAA,cAACO,UAAUN,MAAI;IAACO,MAAMZ;IAAWa,MAAK;IAAW,GAAGf;KAClD,gBAAAM,OAAA,cAACO,UAAUG,SAAO;IAACC,YAAW;KAC5B,gBAAAX,OAAA,cAACY,QAAAA;IAAKC,WAAU;KAAWpC,KAAKqC,KAAK,GACrC,gBAAAd,OAAA,cAACO,UAAUQ,sBAAoB,MAC7B,gBAAAf,OAAA,cAACgB,aAAaf,MACR;IACFE,MAAMZ;IACNc,cAAcb;EAChB,GAEA,gBAAAQ,OAAA,cAACgB,aAAaC,SAAO;IAACf,SAAAA;KACpB,gBAAAF,OAAA,cAACO,UAAUW,aAAW,MACpB,gBAAAlB,OAAA,cAACmB,MAAAA;IAAKvC;IAAY+B,YAAW;QAGjC,gBAAAX,OAAA,cAACgB,aAAaI,QAAM,MAClB,gBAAApB,OAAA,cAACgB,aAAaK,SAAO,MACnB,gBAAArB,OAAA,cAACgB,aAAaM,UAAQ,MACnB7C,KAAK2B,YACJ,gBAAAJ,OAAA,cAACgB,aAAaO,MAAI;IAACC,SAAS,MAAMtC,WAAWV,EAAAA;IAAKiD,eAAY;KAC5D,gBAAAzB,OAAA,cAACmB,MAAAA;IAAKvC,MAAK;MACX,gBAAAoB,OAAA,cAACY,QAAAA;IAAKC,WAAU;KAAahC,EAAE,2BAAA,CAAA,CAAA,IAGjC,gBAAAmB,OAAA,cAAsBiB,8BAAO;IAACf,SAAAA;KAC5B,gBAAAF,OAAA,cAACgB,aAAaO,MAAI,MAChB,gBAAAvB,OAAA,cAAC0B,aAAAA;IAAYb,WAAWc,QAAQ,CAAA;MAChC,gBAAA3B,OAAA,cAACY,QAAAA;IAAKC,WAAU;KAAahC,EAAE,gBAAA,CAAA,CAAA,CAAA,GAIrC,gBAAAmB,OAAA,cAACgB,aAAaO,MAAI;IAACC,SAAS,MAAMrC,MAAMX,IAAI,QAAA;IAAWiD,eAAY;KACjE,gBAAAzB,OAAA,cAACmB,MAAAA;IAAKvC,MAAK;MACX,gBAAAoB,OAAA,cAACY,QAAAA;IAAKC,WAAU;KAAahC,EAAE,0BAAA,CAAA,CAAA,GAEjC,gBAAAmB,OAAA,cAACgB,aAAaO,MAAI;IAACC,SAAS,MAAMrC,MAAMX,IAAI,OAAA;IAAUiD,eAAY;KAChE,gBAAAzB,OAAA,cAACmB,MAAAA;IAAKvC,MAAK;MACX,gBAAAoB,OAAA,cAACY,QAAAA;IAAKC,WAAU;KAAahC,EAAE,yBAAA,CAAA,CAAA,GAEjC,gBAAAmB,OAAA,cAACgB,aAAaO,MAAI;IAACC,SAAS,MAAMnC,SAASb,EAAAA;IAAKiD,eAAY;KAC1D,gBAAAzB,OAAA,cAACmB,MAAAA;IAAKvC,MAAK;MACX,gBAAAoB,OAAA,cAACY,QAAAA;IAAKC,WAAU;KAAahC,EAAE,sBAAA,CAAA,CAAA,CAAA,GAGnC,gBAAAmB,OAAA,cAACgB,aAAaY,OAAK,IAAA,CAAA,CAAA,CAAA,GAIxBnD,KAAK2B,YACJ,gBAAAJ,OAAA,cAAsBiB,8BAAO;IAACf,SAAAA;KAC5B,gBAAAF,OAAA,cAAC6B,YAAAA;IACCC,UAAAA;IACAC,SAAQ;IACRC,OAAOnD,EAAE,cAAA;IACTD,MAAK;IACL+B,YAAYrC;QAIhB,gBAAA0B,OAAA,cAAC6B,YAAAA;IACCC,UAAAA;IACAC,SAAQ;IACRP,SAAS,MAAMtC,WAAWV,EAAAA;IAC1BwD,OAAOnD,EAAE,2BAAA;IACTD,MAAK;IACL6C,eAAY;IACZd,YAAYrC;QAKpB,gBAAA0B,OAAA,cAAsBqB,8BAAO,MAC3B,gBAAArB,OAAA,cAACiC,QAAQA,SAAO;IAACC,MAAMC,WAAWC;IAAStC;IAAYuC,OAAO;IAAGC,aAAa,gBAAAtC,OAAA,cAAAA,OAAA,UAAA,IAAA;OAE/EvB,KAAK2B,aACJ,gBAAAJ,OAAA,cAACO,UAAUc,SAAO;IAACV,YAAW;KAC5B,gBAAAX,OAAA,cAACuC,MAAAA;IAAG1B,WAAW2B,GAAG,mCAAA;KAAuC/D,KAAKqC,KAAK,CAAA,CAAA,CAAA;AAM/E;;;AEtHA,OAAO2B,YAAW;AAElB,SAASC,OAAOC,kBAAAA,uBAAsB;AACtC,SAASC,YAAYC,oBAAoB;AAEzC,SAASC,QAAAA,aAAY;AAGd,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAoC;AAC1E,QAAM,EAAEC,EAAC,IAAKN,gBAAeG,MAAKI,EAAE;AAEpC,SACE,gBAAAT,OAAA,cAACI,aAAaM,UAAQ,MACpB,gBAAAV,OAAA,cAACI,aAAaO,SAAO;IAACC,OAAOJ,EAAE,kBAAkB;MAAEK,IAAIR,MAAKI;IAAG,CAAA;KAC7D,gBAAAT,OAAA,cAACI,aAAaU,MAAI;IAACF,OAAOJ,EAAE,2BAAA;IAA8BO,aAAaP,EAAE,iCAAA;KACvE,gBAAAR,OAAA,cAACC,MAAMe,QAAM;IACXC,SAASV,SAASW;IAClBC,iBAAiB,CAACF,YAAaV,SAASW,aAAa,CAAC,CAACD;;AAMnE;",
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
+ }
@@ -0,0 +1,37 @@
1
+ // src/translations.ts
2
+ import { translations as stackTranslations } from "@dxos/react-ui-stack/translations";
3
+ import { meta } from "#meta";
4
+ var translations = [
5
+ {
6
+ "en-US": {
7
+ [meta.id]: {
8
+ "plugin.name": "Stacks",
9
+ "settings.title": "Stack settings",
10
+ "settings.separation.label": "Separate sections",
11
+ "settings.separation.description": "Add visual dividers between sections in stacks.",
12
+ "add-section-beforeAll-dialog.title": "Add a section to the start",
13
+ "add-section-afterAll-dialog.title": "Add a section to the end",
14
+ "add-section-before-dialog.title": "Add a section",
15
+ "add-section-after-dialog.title": "Add a section",
16
+ "add-section-input.placeholder": "Find the type of section to add",
17
+ "upload-file.label": "Add file",
18
+ "add-section.label": "Add section",
19
+ "empty-stack.message": "Drag objects into the stack.",
20
+ "remove-section.label": "Delete",
21
+ "navigate-to-section.label": "Navigate to object",
22
+ "untitled-section.title": "Untitled section",
23
+ "add-section-before.label": "Add before",
24
+ "add-section-after.label": "Add after",
25
+ "expand.label": "Expand",
26
+ "collapse.label": "Collapse",
27
+ "open-chat-thread.label": "Open chat thread",
28
+ "drag-handle.label": "Press space or enter to begin dragging this object."
29
+ }
30
+ }
31
+ },
32
+ ...stackTranslations
33
+ ];
34
+ export {
35
+ translations
36
+ };
37
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as stackTranslations } from '@dxos/react-ui-stack/translations';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Stacks',\n 'settings.title': 'Stack settings',\n 'settings.separation.label': 'Separate sections',\n 'settings.separation.description': 'Add visual dividers between sections in stacks.',\n 'add-section-beforeAll-dialog.title': 'Add a section to the start',\n 'add-section-afterAll-dialog.title': 'Add a section to the end',\n 'add-section-before-dialog.title': 'Add a section',\n 'add-section-after-dialog.title': 'Add a section',\n 'add-section-input.placeholder': 'Find the type of section to add',\n 'upload-file.label': 'Add file',\n 'add-section.label': 'Add section',\n 'empty-stack.message': 'Drag objects into the stack.',\n 'remove-section.label': 'Delete',\n 'navigate-to-section.label': 'Navigate to object',\n 'untitled-section.title': 'Untitled section',\n 'add-section-before.label': 'Add before',\n 'add-section-after.label': 'Add after',\n 'expand.label': 'Expand',\n 'collapse.label': 'Collapse',\n 'open-chat-thread.label': 'Open chat thread',\n 'drag-handle.label': 'Press space or enter to begin dragging this object.',\n },\n },\n },\n ...stackTranslations,\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";AAKA,SAASA,gBAAgBC,yBAAyB;AAElD,SAASC,YAAY;AAEd,IAAMF,eAAe;EAC1B;IACE,SAAS;MACP,CAACE,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,6BAA6B;QAC7B,mCAAmC;QACnC,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,0BAA0B;QAC1B,qBAAqB;MACvB;IACF;EACF;KACGF;;",
6
+ "names": ["translations", "stackTranslations", "meta", "id"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SectionSchema,
3
3
  StackViewType
4
- } from "../chunk-NHMDZYOB.mjs";
4
+ } from "../chunk-T4NSFSPH.mjs";
5
5
  export {
6
6
  SectionSchema,
7
7
  StackViewType
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,2 +1,4 @@
1
- export declare const StackPlugin: import("@dxos/app-framework").PluginFactory<void>;
1
+ import { Plugin } from '@dxos/app-framework';
2
+ export declare const StackPlugin: Plugin.PluginFactory<void>;
3
+ export default StackPlugin;
2
4
  //# sourceMappingURL=StackPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackPlugin.d.ts","sourceRoot":"","sources":["../../../src/StackPlugin.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,WAAW,mDAqCtB,CAAC"}
1
+ {"version":3,"file":"StackPlugin.d.ts","sourceRoot":"","sources":["../../../src/StackPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAW7C,eAAO,MAAM,WAAW,4BAQvB,CAAC;eAEa,WAAW"}