@dxos/plugin-stack 0.8.2-staging.7ac8446 → 0.8.2

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 (64) hide show
  1. package/dist/lib/browser/StackMain-RIX67KLY.mjs +315 -0
  2. package/dist/lib/browser/StackMain-RIX67KLY.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-L34RFJ2L.mjs → chunk-XOUJQIK6.mjs} +10 -9
  4. package/dist/lib/browser/chunk-XOUJQIK6.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +10 -38
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/react-surface-ED2DI7B5.mjs +46 -0
  9. package/dist/lib/browser/react-surface-ED2DI7B5.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +1 -1
  11. package/dist/lib/node/StackMain-4DMJWHZ3.cjs +329 -0
  12. package/dist/lib/node/StackMain-4DMJWHZ3.cjs.map +7 -0
  13. package/dist/lib/node/{chunk-6IPBX635.cjs → chunk-5QWZH22T.cjs} +12 -11
  14. package/dist/lib/node/chunk-5QWZH22T.cjs.map +7 -0
  15. package/dist/lib/node/index.cjs +5 -29
  16. package/dist/lib/node/index.cjs.map +4 -4
  17. package/dist/lib/node/meta.json +1 -1
  18. package/dist/lib/node/react-surface-L52YERMX.cjs +64 -0
  19. package/dist/lib/node/react-surface-L52YERMX.cjs.map +7 -0
  20. package/dist/lib/node/types/index.cjs +3 -3
  21. package/dist/lib/node/types/index.cjs.map +1 -1
  22. package/dist/lib/node-esm/StackMain-7FHYHLK6.mjs +316 -0
  23. package/dist/lib/node-esm/StackMain-7FHYHLK6.mjs.map +7 -0
  24. package/dist/lib/node-esm/{chunk-3ZYHKSIS.mjs → chunk-3R62SZZT.mjs} +10 -9
  25. package/dist/lib/node-esm/chunk-3R62SZZT.mjs.map +7 -0
  26. package/dist/lib/node-esm/index.mjs +10 -38
  27. package/dist/lib/node-esm/index.mjs.map +4 -4
  28. package/dist/lib/node-esm/meta.json +1 -1
  29. package/dist/lib/node-esm/react-surface-6WUOGQY6.mjs +47 -0
  30. package/dist/lib/node-esm/react-surface-6WUOGQY6.mjs.map +7 -0
  31. package/dist/lib/node-esm/types/index.mjs +1 -1
  32. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  33. package/dist/types/src/capabilities/index.d.ts +2 -0
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  35. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  36. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  37. package/dist/types/src/components/CaretDownUp.d.ts.map +1 -1
  38. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  39. package/dist/types/src/components/StackSection.d.ts +2 -1
  40. package/dist/types/src/components/StackSection.d.ts.map +1 -1
  41. package/dist/types/src/components/StackSettings.d.ts.map +1 -1
  42. package/dist/types/src/types/stack.d.ts +11 -11
  43. package/dist/types/src/types/stack.d.ts.map +1 -1
  44. package/dist/types/src/types/types.d.ts +2 -2
  45. package/dist/types/src/types/types.d.ts.map +1 -1
  46. package/dist/types/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +27 -23
  48. package/src/StackPlugin.ts +53 -0
  49. package/src/capabilities/index.ts +7 -0
  50. package/src/capabilities/react-surface.tsx +33 -0
  51. package/src/components/StackMain.tsx +11 -9
  52. package/src/components/StackSection.tsx +5 -3
  53. package/src/types/stack.ts +7 -5
  54. package/src/types/types.ts +2 -2
  55. package/dist/lib/browser/StackMain-E42SHTS6.mjs +0 -295
  56. package/dist/lib/browser/StackMain-E42SHTS6.mjs.map +0 -7
  57. package/dist/lib/browser/chunk-L34RFJ2L.mjs.map +0 -7
  58. package/dist/lib/node/StackMain-4N6IFLMF.cjs +0 -309
  59. package/dist/lib/node/StackMain-4N6IFLMF.cjs.map +0 -7
  60. package/dist/lib/node/chunk-6IPBX635.cjs.map +0 -7
  61. package/dist/lib/node-esm/StackMain-QFKYWI2J.mjs +0 -296
  62. package/dist/lib/node-esm/StackMain-QFKYWI2J.mjs.map +0 -7
  63. package/dist/lib/node-esm/chunk-3ZYHKSIS.mjs.map +0 -7
  64. package/src/StackPlugin.tsx +0 -76
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2262,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2814,"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":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17464,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2111,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18779,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","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/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":873,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4239,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":11027,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":592,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8229},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","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":"packages/plugins/plugin-stack/dist/lib/browser/StackMain-E42SHTS6.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":2245},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":167},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":4329},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-E42SHTS6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21725},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-E42SHTS6.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","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/util","kind":"import-statement","external":true},{"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","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/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4402},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5146},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11175},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":657}}}
1
+ {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17900,"imports":[{"path":"@preact-signals/safe-react/tracking","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","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/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3567,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","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/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":837,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5354},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3215},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-RIX67KLY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21913},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-RIX67KLY.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","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/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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","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/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5487},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12203},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":737},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3556},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"packages/plugins/plugin-stack/dist/lib/browser/StackMain-RIX67KLY.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1705},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704}}}
@@ -0,0 +1,46 @@
1
+ import {
2
+ STACK_PLUGIN
3
+ } from "./chunk-XHZTILS3.mjs";
4
+
5
+ // packages/plugins/plugin-stack/src/capabilities/react-surface.tsx
6
+ import React2 from "react";
7
+ import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
8
+ import { isInstanceOf } from "@dxos/echo-schema";
9
+ import { CollectionType } from "@dxos/plugin-space/types";
10
+ import { fullyQualifiedId } from "@dxos/react-client/echo";
11
+
12
+ // packages/plugins/plugin-stack/src/components/index.ts
13
+ import { lazy } from "react";
14
+
15
+ // packages/plugins/plugin-stack/src/components/StackSettings.tsx
16
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
17
+ import React from "react";
18
+ import { Input, useTranslation } from "@dxos/react-ui";
19
+ import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
20
+
21
+ // packages/plugins/plugin-stack/src/components/index.ts
22
+ var StackMain = lazy(() => import("./StackMain-RIX67KLY.mjs"));
23
+
24
+ // packages/plugins/plugin-stack/src/capabilities/react-surface.tsx
25
+ var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
26
+ id: `${STACK_PLUGIN}/article`,
27
+ role: "article",
28
+ filter: (data) => isInstanceOf(CollectionType, data.subject),
29
+ component: ({ data }) => {
30
+ const id = typeof data.id === "string" ? data.id : void 0;
31
+ return /* @__PURE__ */ React2.createElement("div", {
32
+ role: "none",
33
+ className: "overflow-auto",
34
+ style: {
35
+ contain: "layout"
36
+ }
37
+ }, /* @__PURE__ */ React2.createElement(StackMain, {
38
+ id: id ?? fullyQualifiedId(data.subject),
39
+ collection: data.subject
40
+ }));
41
+ }
42
+ }));
43
+ export {
44
+ react_surface_default as default
45
+ };
46
+ //# sourceMappingURL=react-surface-ED2DI7B5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\n\nimport { StackMain } from '../components';\nimport { STACK_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => isInstanceOf(CollectionType, data.subject),\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n );\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <DeprecatedFormContainer>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </DeprecatedFormContainer>\n );\n};\n"],
5
+ "mappings": ";;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAC/B,SAASC,wBAAwB;;;ACLjC,SAASC,YAAY;;;;ACArB,OAAOC,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,yBAAyBC,2BAA2B;;;ADDtD,IAAMC,YAAYC,KAAK,MAAM,OAAO,0BAAA,CAAA;;;ADQ3C,IAAA,wBAAe,MACbC,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAI,GAAGC,YAAAA;EACPC,MAAM;EACNC,QAAQ,CAACC,SAA2DC,aAAaC,gBAAgBF,KAAKG,OAAO;EAC7GC,WAAW,CAAC,EAAEJ,KAAI,MAAE;AAGlB,UAAMJ,KAAK,OAAOI,KAAKJ,OAAO,WAAWI,KAAKJ,KAAKS;AACnD,WACE,gBAAAC,OAAA,cAACC,OAAAA;MAAIT,MAAK;MAAOU,WAAU;MAAgBC,OAAO;QAAEC,SAAS;MAAS;OACpE,gBAAAJ,OAAA,cAACK,WAAAA;MAAUf,IAAIA,MAAMgB,iBAAiBZ,KAAKG,OAAO;MAAGU,YAAYb,KAAKG;;EAG5E;AACF,CAAA,CAAA;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "isInstanceOf", "CollectionType", "fullyQualifiedId", "lazy", "React", "Input", "useTranslation", "DeprecatedFormContainer", "DeprecatedFormInput", "StackMain", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "STACK_PLUGIN", "role", "filter", "data", "isInstanceOf", "CollectionType", "subject", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SectionSchema,
3
3
  StackViewType
4
- } from "../chunk-L34RFJ2L.mjs";
4
+ } from "../chunk-XOUJQIK6.mjs";
5
5
  export {
6
6
  SectionSchema,
7
7
  StackViewType
@@ -0,0 +1,329 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var StackMain_4DMJWHZ3_exports = {};
30
+ __export(StackMain_4DMJWHZ3_exports, {
31
+ default: () => StackMain_default
32
+ });
33
+ module.exports = __toCommonJS(StackMain_4DMJWHZ3_exports);
34
+ var import_chunk_5QWZH22T = require("./chunk-5QWZH22T.cjs");
35
+ var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
36
+ var import_tracking = require("@preact-signals/safe-react/tracking");
37
+ var import_react = require("@phosphor-icons/react");
38
+ var import_effect = require("effect");
39
+ var import_react2 = __toESM(require("react"));
40
+ var import_app_framework = require("@dxos/app-framework");
41
+ var import_echo = require("@dxos/client/echo");
42
+ var import_types = require("@dxos/plugin-space/types");
43
+ var import_react_ui = require("@dxos/react-ui");
44
+ var import_react_ui_attention = require("@dxos/react-ui-attention");
45
+ var import_react_ui_stack = require("@dxos/react-ui-stack");
46
+ var import_util = require("@dxos/util");
47
+ var import_react3 = require("react");
48
+ var import_tracking2 = require("@preact-signals/safe-react/tracking");
49
+ var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
50
+ var import_react4 = __toESM(require("react"));
51
+ var import_app_framework2 = require("@dxos/app-framework");
52
+ var import_react_ui2 = require("@dxos/react-ui");
53
+ var import_react_ui_attention2 = require("@dxos/react-ui-attention");
54
+ var import_react_ui_stack2 = require("@dxos/react-ui-stack");
55
+ var import_react_ui_theme = require("@dxos/react-ui-theme");
56
+ var import_tracking3 = require("@preact-signals/safe-react/tracking");
57
+ var import_react5 = __toESM(require("react"));
58
+ var StackContext = /* @__PURE__ */ (0, import_react3.createContext)({
59
+ onCollapse: () => {
60
+ },
61
+ onNavigate: async () => {
62
+ },
63
+ onDelete: async () => {
64
+ },
65
+ onAdd: () => {
66
+ }
67
+ });
68
+ var useStack = () => (0, import_react3.useContext)(StackContext);
69
+ var CaretDownUp = ({ children, ...props }) => {
70
+ var _effect = (0, import_tracking3.useSignals)();
71
+ try {
72
+ return /* @__PURE__ */ import_react5.default.createElement("svg", {
73
+ xmlns: "http://www.w3.org/2000/svg",
74
+ viewBox: "0 0 256 256",
75
+ ...props
76
+ }, /* @__PURE__ */ import_react5.default.createElement("rect", {
77
+ width: "256",
78
+ height: "256",
79
+ fill: "none"
80
+ }), /* @__PURE__ */ import_react5.default.createElement("polyline", {
81
+ points: "80 224 128 176 176 224",
82
+ fill: "none",
83
+ stroke: "currentColor",
84
+ strokeLinecap: "round",
85
+ strokeLinejoin: "round",
86
+ strokeWidth: "16"
87
+ }), /* @__PURE__ */ import_react5.default.createElement("polyline", {
88
+ points: "80 32 128 80 176 32",
89
+ fill: "none",
90
+ stroke: "currentColor",
91
+ strokeLinecap: "round",
92
+ strokeLinejoin: "round",
93
+ strokeWidth: "16"
94
+ }), children);
95
+ } finally {
96
+ _effect.f();
97
+ }
98
+ };
99
+ var sectionActionDimensions = "p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min";
100
+ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--regular" } }) => {
101
+ var _effect = (0, import_tracking2.useSignals)();
102
+ try {
103
+ const { t } = (0, import_react_ui2.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
104
+ const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
105
+ const [optionsMenuOpen, setOptionsMenuOpen] = (0, import_react4.useState)(false);
106
+ const attendableAttrs = (0, import_react_ui_attention2.useAttendableAttributes)(id);
107
+ return /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Root, {
108
+ asChild: true,
109
+ open: !view.collapsed,
110
+ onOpenChange: (nextOpen) => onCollapse?.(id, !nextOpen)
111
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Root, {
112
+ item: {
113
+ id
114
+ },
115
+ role: "section",
116
+ ...attendableAttrs,
117
+ classNames: "border-be border-separator"
118
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Heading, {
119
+ classNames: "attention-surface border-ie !border-separator"
120
+ }, /* @__PURE__ */ import_react4.default.createElement("span", {
121
+ className: "sr-only"
122
+ }, view.title), /* @__PURE__ */ import_react4.default.createElement("div", {
123
+ role: "none",
124
+ className: "sticky -block-start-px bg-[--sticky-bg] p-1 is-full"
125
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Root, {
126
+ open: optionsMenuOpen,
127
+ onOpenChange: setOptionsMenuOpen
128
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Trigger, {
129
+ asChild: true
130
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.SigilButton, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
131
+ icon,
132
+ size: 5,
133
+ classNames: "transition-opacity"
134
+ }))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Portal, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Viewport, null, view.collapsed ? /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
135
+ onClick: () => onNavigate(id),
136
+ "data-testid": "section.navigate-to"
137
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
138
+ icon: "ph--arrow-right--regular",
139
+ size: 5
140
+ }), /* @__PURE__ */ import_react4.default.createElement("span", {
141
+ className: "mis-2 grow"
142
+ }, t("navigate to section label"))) : /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Trigger, {
143
+ asChild: true
144
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, null, /* @__PURE__ */ import_react4.default.createElement(CaretDownUp, {
145
+ className: (0, import_react_ui_theme.getSize)(5)
146
+ }), /* @__PURE__ */ import_react4.default.createElement("span", {
147
+ className: "mis-2 grow"
148
+ }, t("collapse label")))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
149
+ onClick: () => onAdd(id, "before"),
150
+ "data-testid": "section.add-before"
151
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
152
+ icon: "ph--arrow-line-up--regular",
153
+ size: 5
154
+ }), /* @__PURE__ */ import_react4.default.createElement("span", {
155
+ className: "mis-2 grow"
156
+ }, t("add section before label"))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
157
+ onClick: () => onAdd(id, "after"),
158
+ "data-testid": "section.add-after"
159
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
160
+ icon: "ph--arrow-line-down--regular",
161
+ size: 5
162
+ }), /* @__PURE__ */ import_react4.default.createElement("span", {
163
+ className: "mis-2 grow"
164
+ }, t("add section after label"))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
165
+ onClick: () => onDelete(id),
166
+ "data-testid": "section.remove"
167
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
168
+ icon: "ph--trash--regular",
169
+ size: 5
170
+ }), /* @__PURE__ */ import_react4.default.createElement("span", {
171
+ className: "mis-2 grow"
172
+ }, t("remove section label")))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Trigger, {
173
+ asChild: true
174
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.IconButton, {
175
+ iconOnly: true,
176
+ variant: "ghost",
177
+ label: t("expand label"),
178
+ icon: "ph--caret-up-down--regular",
179
+ classNames: sectionActionDimensions
180
+ })) : /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.IconButton, {
181
+ iconOnly: true,
182
+ variant: "ghost",
183
+ onClick: () => onNavigate(id),
184
+ label: t("navigate to section label"),
185
+ icon: "ph--arrow-right--regular",
186
+ "data-testid": "section.navigate-to",
187
+ classNames: sectionActionDimensions
188
+ }))), /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_app_framework2.Surface, {
189
+ role: "section",
190
+ data: {
191
+ subject: object
192
+ },
193
+ limit: 1,
194
+ placeholder: /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null)
195
+ })), view.collapsed && /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Content, {
196
+ classNames: "attention-surface"
197
+ }, /* @__PURE__ */ import_react4.default.createElement("h2", {
198
+ className: (0, import_react_ui_theme.mx)("flex items-center p-4 font-medium", import_react_ui_theme.textBlockWidth)
199
+ }, view.title))));
200
+ } finally {
201
+ _effect.f();
202
+ }
203
+ };
204
+ var StackMain = ({ id, collection }) => {
205
+ var _effect = (0, import_tracking.useSignals)();
206
+ try {
207
+ const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
208
+ const { graph } = (0, import_app_framework.useAppGraph)();
209
+ const { t } = (0, import_react_ui.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
210
+ const allMetadata = (0, import_app_framework.useCapabilities)(import_app_framework.Capabilities.Metadata);
211
+ const defaultStack = (0, import_react2.useMemo)(() => (0, import_echo.live)(import_chunk_5QWZH22T.StackViewType, {
212
+ sections: {}
213
+ }), [
214
+ collection
215
+ ]);
216
+ const stack = collection.views[import_chunk_5QWZH22T.StackViewType.typename]?.target ?? defaultStack;
217
+ const [collapsedSections, setCollapsedSections] = (0, import_react2.useState)({});
218
+ (0, import_react2.useEffect)(() => {
219
+ if (!collection.views[import_chunk_5QWZH22T.StackViewType.typename]) {
220
+ collection.views[import_chunk_5QWZH22T.StackViewType.typename] = (0, import_echo.makeRef)(stack);
221
+ }
222
+ }, [
223
+ collection,
224
+ stack
225
+ ]);
226
+ const items = collection.objects.map((object) => object.target).filter(import_util.isNonNullable).map((object) => {
227
+ const metadata = allMetadata.find((m) => m.id === ((0, import_echo.getTypename)(object) ?? "never"))?.metadata;
228
+ const view = {
229
+ ...stack.sections[object.id],
230
+ collapsed: collapsedSections[(0, import_echo.fullyQualifiedId)(object)],
231
+ title: object?.title ?? // TODO(wittjosiah): `getNode` is not reactive.
232
+ (0, import_react_ui.toLocalizedString)(graph.getNode((0, import_echo.fullyQualifiedId)(object)).pipe(import_effect.Option.getOrNull)?.properties.label, t)
233
+ };
234
+ return {
235
+ id: (0, import_echo.fullyQualifiedId)(object),
236
+ object,
237
+ metadata,
238
+ view
239
+ };
240
+ }) ?? [];
241
+ const handleDelete = (0, import_react2.useCallback)(async (id2) => {
242
+ const index = collection.objects.map((object2) => object2.target).filter(import_util.isNonNullable).findIndex((section) => (0, import_echo.fullyQualifiedId)(section) === id2);
243
+ const object = collection.objects[index].target;
244
+ if ((0, import_echo.isLiveObject)(object)) {
245
+ await dispatch((0, import_app_framework.createIntent)(import_types.SpaceAction.RemoveObjects, {
246
+ objects: [
247
+ object
248
+ ],
249
+ target: collection
250
+ }));
251
+ }
252
+ }, [
253
+ collection,
254
+ dispatch
255
+ ]);
256
+ const handleAdd = (0, import_react2.useCallback)(async (id2, position) => {
257
+ await dispatch?.(
258
+ // TODO(wittjosiah): Use object creation dialog.
259
+ (0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdateDialog, {
260
+ part: "dialog",
261
+ subject: `${import_chunk_F7ZNJ53O.STACK_PLUGIN}/AddSectionDialog`,
262
+ options: {
263
+ blockAlign: "start",
264
+ props: {
265
+ path: id2,
266
+ position,
267
+ collection
268
+ }
269
+ }
270
+ })
271
+ );
272
+ }, [
273
+ collection,
274
+ dispatch
275
+ ]);
276
+ const handleNavigate = (0, import_react2.useCallback)(async (id2) => {
277
+ await dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.Open, {
278
+ part: "main",
279
+ subject: [
280
+ id2
281
+ ]
282
+ }));
283
+ }, [
284
+ dispatch
285
+ ]);
286
+ const handleCollapse = (0, import_react2.useCallback)((id2, collapsed) => setCollapsedSections((prev) => ({
287
+ ...prev,
288
+ [id2]: collapsed
289
+ })), []);
290
+ const handleAddSection = (0, import_react2.useCallback)(() => dispatch?.((0, import_app_framework.createIntent)(import_types.SpaceAction.OpenCreateObject, {
291
+ target: collection,
292
+ navigable: false
293
+ })), [
294
+ collection,
295
+ dispatch
296
+ ]);
297
+ return /* @__PURE__ */ import_react2.default.createElement(import_react_ui_attention.AttentionProvider, {
298
+ id
299
+ }, /* @__PURE__ */ import_react2.default.createElement(StackContext.Provider, {
300
+ value: {
301
+ onCollapse: handleCollapse,
302
+ onNavigate: handleNavigate,
303
+ onDelete: handleDelete,
304
+ onAdd: handleAdd
305
+ }
306
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_stack.Stack, {
307
+ orientation: "vertical",
308
+ size: "intrinsic",
309
+ id,
310
+ "data-testid": "main.stack"
311
+ }, items.map((item) => /* @__PURE__ */ import_react2.default.createElement(StackSection, {
312
+ key: item.id,
313
+ ...item
314
+ }))), /* @__PURE__ */ import_react2.default.createElement("div", {
315
+ role: "none",
316
+ className: "flex mlb-2 pli-2 justify-center"
317
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Button, {
318
+ "data-testid": "stack.createSection",
319
+ classNames: "gap-2",
320
+ onClick: handleAddSection
321
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react.Plus, null), /* @__PURE__ */ import_react2.default.createElement("span", {
322
+ className: "sr-only"
323
+ }, t("add section label"))))));
324
+ } finally {
325
+ _effect.f();
326
+ }
327
+ };
328
+ var StackMain_default = StackMain;
329
+ //# sourceMappingURL=StackMain-4DMJWHZ3.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/StackMain.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackSection.tsx", "../../../src/components/CaretDownUp.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, type CollectionType } from '@dxos/plugin-space/types';\nimport { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { AttentionProvider } from '@dxos/react-ui-attention';\nimport { Stack } from '@dxos/react-ui-stack';\nimport { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\n} from '../types';\n\ntype StackMainProps = {\n id: string;\n collection: CollectionType;\n};\n\nconst StackMain = ({ id, collection }: StackMainProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(StackViewType, { sections: {} }), [collection]);\n const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n useEffect(() => {\n if (!collection.views[StackViewType.typename]) {\n collection.views[StackViewType.typename] = makeRef(stack);\n }\n }, [collection, stack]);\n\n const items =\n collection.objects\n // TODO(wittjosiah): Should the database handle this differently?\n // TODO(wittjosiah): Render placeholders for missing objects so they can be removed from the stack?\n .map((object) => object.target)\n .filter(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.properties.label, t),\n } as StackSectionView;\n return { id: fullyQualifiedId(object), object, metadata, view } satisfies StackSectionItem;\n }) ?? [];\n\n const handleDelete = useCallback(\n async (id: string) => {\n const index = collection.objects\n .map((object) => object.target)\n .filter(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(object)) {\n await dispatch(createIntent(SpaceAction.RemoveObjects, { objects: [object], target: collection }));\n\n // TODO(wittjosiah): The section should also be removed, but needs to be restored if the action is undone.\n // delete stack.sections[Path.last(path)];\n }\n },\n [collection, dispatch],\n );\n\n const handleAdd = useCallback(\n async (id: string, position: AddSectionPosition) => {\n await dispatch?.(\n // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [id] }));\n },\n [dispatch],\n );\n\n const handleCollapse = useCallback(\n (id: string, collapsed: boolean) => setCollapsedSections((prev) => ({ ...prev, [id]: collapsed })),\n [],\n );\n\n const handleAddSection = useCallback(\n () => dispatch?.(createIntent(SpaceAction.OpenCreateObject, { target: collection, navigable: false })),\n [collection, dispatch],\n );\n\n return (\n <AttentionProvider id={id}>\n <StackContext.Provider\n value={{\n onCollapse: handleCollapse,\n onNavigate: handleNavigate,\n onDelete: handleDelete,\n onAdd: handleAdd,\n }}\n >\n <Stack orientation='vertical' size='intrinsic' id={id} data-testid='main.stack'>\n {items.map((item) => (\n <StackSection key={item.id} {...item} />\n ))}\n </Stack>\n\n <div role='none' className='flex mlb-2 pli-2 justify-center'>\n <Button data-testid='stack.createSection' classNames='gap-2' onClick={handleAddSection}>\n <Plus />\n <span className='sr-only'>{t('add section label')}</span>\n </Button>\n </div>\n </StackContext.Provider>\n </AttentionProvider>\n );\n};\n\nexport default StackMain;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type AddSectionPosition } from '../types';\n\nexport type StackContextValue = {\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 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, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { mx, getSize, textBlockWidth } from '@dxos/react-ui-theme';\n\nimport { CaretDownUp } from './CaretDownUp';\nimport { useStack } from './StackContext';\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSectionItem } from '../types';\n\nconst sectionActionDimensions = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableAttrs = useAttendableAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attendableAttrs} classNames='border-be border-separator'>\n <StackItem.Heading classNames='attention-surface border-ie !border-separator'>\n <span className='sr-only'>{view.title}</span>\n <div role='none' className='sticky -block-start-px bg-[--sticky-bg] p-1 is-full'>\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: setOptionsMenuOpen,\n }}\n >\n <DropdownMenu.Trigger asChild>\n <StackItem.SigilButton>\n <Icon icon={icon} size={5} 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' size={5} />\n <span className='mis-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='mis-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' size={5} />\n <span className='mis-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' size={5} />\n <span className='mis-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' size={5} />\n <span className='mis-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 </div>\n </StackItem.Heading>\n <CollapsiblePrimitive.Content>\n <Surface role='section' data={{ subject: object }} limit={1} placeholder={<></>} />\n </CollapsiblePrimitive.Content>\n {view.collapsed && (\n <StackItem.Content classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', textBlockWidth)}>{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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAqB;AACrB,oBAAuB;AACvB,IAAAA,gBAAiE;AAEjE,2BAOO;AACP,kBAA2E;AAC3E,mBAAiD;AACjD,sBAA0D;AAC1D,gCAAkC;AAClC,4BAA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", "import_app_framework", "import_react_ui", "import_react_ui_attention", "import_react_ui_stack", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CaretDownUp", "children", "props", "React", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attendableAttrs", "useAttendableAttributes", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "classNames", "Heading", "span", "className", "title", "div", "DropdownMenu", "Trigger", "SigilButton", "Icon", "size", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "StackMain", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useEffect", "makeRef", "items", "objects", "map", "filter", "isNonNullable", "find", "m", "getTypename", "fullyQualifiedId", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "options", "blockAlign", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "AttentionProvider", "Provider", "value", "Stack", "orientation", "key", "Button", "Plus"]
7
+ }
@@ -16,28 +16,29 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_6IPBX635_exports = {};
20
- __export(chunk_6IPBX635_exports, {
19
+ var chunk_5QWZH22T_exports = {};
20
+ __export(chunk_5QWZH22T_exports, {
21
21
  SectionSchema: () => SectionSchema,
22
22
  StackViewType: () => StackViewType
23
23
  });
24
- module.exports = __toCommonJS(chunk_6IPBX635_exports);
24
+ module.exports = __toCommonJS(chunk_5QWZH22T_exports);
25
+ var import_effect = require("effect");
25
26
  var import_echo_schema = require("@dxos/echo-schema");
26
- var SectionSchema = import_echo_schema.S.Struct({
27
- height: import_echo_schema.S.optional(import_echo_schema.S.Number),
27
+ var SectionSchema = import_effect.Schema.Struct({
28
+ height: import_effect.Schema.optional(import_effect.Schema.Number),
28
29
  // Space for data that isn't stack-specific but is specific to this view instance.
29
30
  // e.g. cover/fill for an image
30
- custom: import_echo_schema.S.optional(import_echo_schema.S.Record({
31
- key: import_echo_schema.S.String,
32
- value: import_echo_schema.S.Any
31
+ custom: import_effect.Schema.optional(import_effect.Schema.Record({
32
+ key: import_effect.Schema.String,
33
+ value: import_effect.Schema.Any
33
34
  }))
34
35
  });
35
36
  var StackViewType = class extends (0, import_echo_schema.TypedObject)({
36
37
  typename: "dxos.org/type/StackView",
37
38
  version: "0.1.0"
38
39
  })({
39
- sections: import_echo_schema.S.mutable(import_echo_schema.S.Record({
40
- key: import_echo_schema.S.String,
40
+ sections: import_effect.Schema.mutable(import_effect.Schema.Record({
41
+ key: import_effect.Schema.String,
41
42
  value: SectionSchema
42
43
  }))
43
44
  }) {
@@ -47,4 +48,4 @@ var StackViewType = class extends (0, import_echo_schema.TypedObject)({
47
48
  SectionSchema,
48
49
  StackViewType
49
50
  });
50
- //# sourceMappingURL=chunk-6IPBX635.cjs.map
51
+ //# sourceMappingURL=chunk-5QWZH22T.cjs.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 { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\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(burdon): Should be just type/Stack?\nexport class StackViewType extends TypedObject({ typename: 'dxos.org/type/StackView', version: '0.1.0' })({\n sections: Schema.mutable(Schema.Record({ key: Schema.String, value: SectionSchema })),\n}) {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAuB;AAEvB,yBAA4B;AAOrB,IAAMA,gBAAgBC,qBAAOC,OAAO;EACzCC,QAAQF,qBAAOG,SAASH,qBAAOI,MAAM;;;EAGrCC,QAAQL,qBAAOG,SAASH,qBAAOM,OAAO;IAAEC,KAAKP,qBAAOQ;IAAQC,OAAOT,qBAAOU;EAAI,CAAA,CAAA;AAChF,CAAA;AAGO,IAAMC,gBAAN,kBAA4BC,gCAAY;EAAEC,UAAU;EAA2BC,SAAS;AAAQ,CAAA,EAAG;EACxGC,UAAUf,qBAAOgB,QAAQhB,qBAAOM,OAAO;IAAEC,KAAKP,qBAAOQ;IAAQC,OAAOV;EAAc,CAAA,CAAA;AACpF,CAAA,EAAA;AAAI;",
6
+ "names": ["SectionSchema", "Schema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
7
+ }