@dxos/plugin-stack 0.8.4-main.a4bbb77 → 0.8.4-main.abd8ff62ef

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 (101) hide show
  1. package/dist/lib/browser/StackPlugin-QWVPZHNO.mjs +42 -0
  2. package/dist/lib/browser/StackPlugin-QWVPZHNO.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +19 -91
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +37 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/browser/types/index.mjs +21 -4
  9. package/dist/lib/browser/types/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/StackPlugin-5PFRZ364.mjs +44 -0
  11. package/dist/lib/node-esm/StackPlugin-5PFRZ364.mjs.map +7 -0
  12. package/dist/lib/node-esm/index.mjs +19 -90
  13. package/dist/lib/node-esm/index.mjs.map +4 -4
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/lib/node-esm/translations.mjs +39 -0
  16. package/dist/lib/node-esm/translations.mjs.map +7 -0
  17. package/dist/lib/node-esm/types/index.mjs +22 -4
  18. package/dist/lib/node-esm/types/index.mjs.map +4 -4
  19. package/dist/types/src/StackPlugin.d.ts +3 -1
  20. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  21. package/dist/types/src/capabilities/index.d.ts +2 -1
  22. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  24. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  25. package/dist/types/src/components/{StackContext.d.ts → StackContext/StackContext.d.ts} +2 -1
  26. package/dist/types/src/components/StackContext/StackContext.d.ts.map +1 -0
  27. package/dist/types/src/components/StackContext/index.d.ts +2 -0
  28. package/dist/types/src/components/StackContext/index.d.ts.map +1 -0
  29. package/dist/types/src/components/{CaretDownUp.d.ts → StackSection/CaretDownUp.d.ts} +1 -1
  30. package/dist/types/src/components/StackSection/CaretDownUp.d.ts.map +1 -0
  31. package/dist/types/src/components/{StackSection.d.ts → StackSection/StackSection.d.ts} +1 -1
  32. package/dist/types/src/components/StackSection/StackSection.d.ts.map +1 -0
  33. package/dist/types/src/components/StackSection/index.d.ts +2 -0
  34. package/dist/types/src/components/StackSection/index.d.ts.map +1 -0
  35. package/dist/types/src/components/{StackSettings.d.ts → StackSettings/StackSettings.d.ts} +1 -1
  36. package/dist/types/src/components/StackSettings/StackSettings.d.ts.map +1 -0
  37. package/dist/types/src/components/StackSettings/index.d.ts +2 -0
  38. package/dist/types/src/components/StackSettings/index.d.ts.map +1 -0
  39. package/dist/types/src/components/index.d.ts +2 -7
  40. package/dist/types/src/components/index.d.ts.map +1 -1
  41. package/dist/types/src/containers/StackContainer/StackContainer.d.ts +7 -0
  42. package/dist/types/src/containers/StackContainer/StackContainer.d.ts.map +1 -0
  43. package/dist/types/src/containers/StackContainer/index.d.ts +2 -0
  44. package/dist/types/src/containers/StackContainer/index.d.ts.map +1 -0
  45. package/dist/types/src/containers/index.d.ts +3 -0
  46. package/dist/types/src/containers/index.d.ts.map +1 -0
  47. package/dist/types/src/index.d.ts +2 -1
  48. package/dist/types/src/index.d.ts.map +1 -1
  49. package/dist/types/src/meta.d.ts +3 -3
  50. package/dist/types/src/meta.d.ts.map +1 -1
  51. package/dist/types/src/translations.d.ts +31 -31
  52. package/dist/types/src/translations.d.ts.map +1 -1
  53. package/dist/types/src/types/stack.d.ts +13 -14
  54. package/dist/types/src/types/stack.d.ts.map +1 -1
  55. package/dist/types/src/types/types.d.ts +3 -3
  56. package/dist/types/src/types/types.d.ts.map +1 -1
  57. package/dist/types/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +57 -43
  59. package/src/StackPlugin.ts +29 -42
  60. package/src/capabilities/index.ts +2 -2
  61. package/src/capabilities/react-surface.tsx +20 -26
  62. package/src/components/{StackContext.tsx → StackContext/StackContext.tsx} +3 -1
  63. package/src/components/StackContext/index.ts +5 -0
  64. package/src/components/{StackSection.tsx → StackSection/StackSection.tsx} +27 -24
  65. package/src/components/StackSection/index.ts +5 -0
  66. package/src/components/StackSettings/StackSettings.tsx +28 -0
  67. package/src/components/StackSettings/index.ts +5 -0
  68. package/src/components/index.ts +2 -4
  69. package/src/containers/StackContainer/StackContainer.tsx +170 -0
  70. package/src/containers/StackContainer/index.ts +5 -0
  71. package/src/containers/index.ts +7 -0
  72. package/src/index.ts +6 -1
  73. package/src/meta.ts +9 -5
  74. package/src/translations.ts +23 -22
  75. package/src/types/stack.ts +12 -8
  76. package/src/types/types.ts +3 -3
  77. package/dist/lib/browser/StackMain-XB2KQL47.mjs +0 -299
  78. package/dist/lib/browser/StackMain-XB2KQL47.mjs.map +0 -7
  79. package/dist/lib/browser/chunk-IRTROCUQ.mjs +0 -28
  80. package/dist/lib/browser/chunk-IRTROCUQ.mjs.map +0 -7
  81. package/dist/lib/browser/chunk-MS4QSWEZ.mjs +0 -17
  82. package/dist/lib/browser/chunk-MS4QSWEZ.mjs.map +0 -7
  83. package/dist/lib/browser/react-surface-DEADYQ54.mjs +0 -46
  84. package/dist/lib/browser/react-surface-DEADYQ54.mjs.map +0 -7
  85. package/dist/lib/node-esm/StackMain-BXSBDAF5.mjs +0 -300
  86. package/dist/lib/node-esm/StackMain-BXSBDAF5.mjs.map +0 -7
  87. package/dist/lib/node-esm/chunk-5FDDKAPB.mjs +0 -19
  88. package/dist/lib/node-esm/chunk-5FDDKAPB.mjs.map +0 -7
  89. package/dist/lib/node-esm/chunk-LRAZXJ65.mjs +0 -30
  90. package/dist/lib/node-esm/chunk-LRAZXJ65.mjs.map +0 -7
  91. package/dist/lib/node-esm/react-surface-VDFOPDUT.mjs +0 -47
  92. package/dist/lib/node-esm/react-surface-VDFOPDUT.mjs.map +0 -7
  93. package/dist/types/src/components/CaretDownUp.d.ts.map +0 -1
  94. package/dist/types/src/components/StackContext.d.ts.map +0 -1
  95. package/dist/types/src/components/StackMain.d.ts +0 -9
  96. package/dist/types/src/components/StackMain.d.ts.map +0 -1
  97. package/dist/types/src/components/StackSection.d.ts.map +0 -1
  98. package/dist/types/src/components/StackSettings.d.ts.map +0 -1
  99. package/src/components/StackMain.tsx +0 -160
  100. package/src/components/StackSettings.tsx +0 -30
  101. /package/src/components/{CaretDownUp.tsx → StackSection/CaretDownUp.tsx} +0 -0
@@ -0,0 +1,42 @@
1
+ // src/StackPlugin.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { ReactSurface } from "#capabilities";
5
+ import { SECTION_IDENTIFIER, meta } from "#meta";
6
+ import { translations } from "#translations";
7
+ import { StackViewType } from "#types";
8
+ var StackPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
9
+ metadata: {
10
+ id: SECTION_IDENTIFIER,
11
+ metadata: {
12
+ parse: (section, type) => {
13
+ switch (type) {
14
+ case "node":
15
+ return {
16
+ id: section.object.id,
17
+ label: section.object.title,
18
+ data: section.object
19
+ };
20
+ case "object":
21
+ return section.object;
22
+ case "view-object":
23
+ return section;
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }), AppPlugin.addSchemaModule({
29
+ schema: [
30
+ StackViewType
31
+ ]
32
+ }), AppPlugin.addSurfaceModule({
33
+ activate: ReactSurface
34
+ }), AppPlugin.addTranslationsModule({
35
+ translations
36
+ }), Plugin.make);
37
+ var StackPlugin_default = StackPlugin;
38
+ export {
39
+ StackPlugin,
40
+ StackPlugin_default as default
41
+ };
42
+ //# sourceMappingURL=StackPlugin-QWVPZHNO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/StackPlugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type Obj } from '@dxos/echo';\n\nimport { ReactSurface } from '#capabilities';\nimport { SECTION_IDENTIFIER, meta } from '#meta';\nimport { translations } from '#translations';\nimport { StackViewType } from '#types';\n\nexport const StackPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: Obj.Unknown }, type: string) => {\n switch (type) {\n case 'node':\n return { id: section.object.id, label: (section.object as any).title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [StackViewType] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default StackPlugin;\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAG1B,SAASC,oBAAoB;AAC7B,SAASC,oBAAoBC,YAAY;AACzC,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;AAEvB,IAAMC,cAAcP,OAAOQ,OAAOJ,IAAAA,EAAMK,KAC7CR,UAAUS,kBAAkB;EAC1BC,UAAU;IACRC,IAAIT;IACJQ,UAAU;MACRE,OAAO,CAACC,SAAkCC,SAAAA;AACxC,gBAAQA,MAAAA;UACN,KAAK;AACH,mBAAO;cAAEH,IAAIE,QAAQE,OAAOJ;cAAIK,OAAQH,QAAQE,OAAeE;cAAOC,MAAML,QAAQE;YAAO;UAC7F,KAAK;AACH,mBAAOF,QAAQE;UACjB,KAAK;AACH,mBAAOF;QACX;MACF;IACF;EACF;AACF,CAAA,GACAb,UAAUmB,gBAAgB;EAAEC,QAAQ;IAACf;;AAAe,CAAA,GACpDL,UAAUqB,iBAAiB;EAAEC,UAAUrB;AAAa,CAAA,GACpDD,UAAUuB,sBAAsB;EAAEnB;AAAa,CAAA,GAC/CL,OAAOyB,IAAI;AAGb,IAAA,sBAAelB;",
6
+ "names": ["Plugin", "AppPlugin", "ReactSurface", "SECTION_IDENTIFIER", "meta", "translations", "StackViewType", "StackPlugin", "define", "pipe", "addMetadataModule", "metadata", "id", "parse", "section", "type", "object", "label", "title", "data", "addSchemaModule", "schema", "addSurfaceModule", "activate", "addTranslationsModule", "make"]
7
+ }
@@ -1,96 +1,24 @@
1
- import {
2
- StackViewType
3
- } from "./chunk-IRTROCUQ.mjs";
4
- import {
5
- SECTION_IDENTIFIER,
6
- meta
7
- } from "./chunk-MS4QSWEZ.mjs";
8
-
9
- // src/StackPlugin.ts
10
- import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
11
- import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
1
+ // src/index.ts
2
+ import { Plugin } from "@dxos/app-framework";
12
3
 
13
- // src/capabilities/index.ts
14
- import { lazy } from "@dxos/app-framework";
15
- var ReactSurface = lazy(() => import("./react-surface-DEADYQ54.mjs"));
16
-
17
- // src/translations.ts
18
- import { translations as stackTranslations } from "@dxos/react-ui-stack";
19
- var translations = [
20
- {
21
- "en-US": {
22
- [meta.id]: {
23
- "plugin name": "Stacks",
24
- "settings title": "Stack plugin settings",
25
- "settings separation label": "Separate sections",
26
- "add section beforeAll dialog title": "Add a section to the start",
27
- "add section afterAll dialog title": "Add a section to the end",
28
- "add section before dialog title": "Add a section",
29
- "add section after dialog title": "Add a section",
30
- "add section input placeholder": "Find the type of section to add",
31
- "upload file label": "Add file",
32
- "add section label": "Add section",
33
- "empty stack message": "Drag items into the stack.",
34
- "remove section label": "Delete",
35
- "navigate to section label": "Navigate to item",
36
- "untitled section title": "Untitled section",
37
- "add section before label": "Add before",
38
- "add section after label": "Add after",
39
- "expand label": "Expand",
40
- "collapse label": "Collapse",
41
- "open chat thread label": "Open chat thread",
42
- "drag handle label": "Press space or enter to begin dragging this item."
43
- }
44
- }
45
- },
46
- ...stackTranslations
47
- ];
4
+ // src/meta.ts
5
+ import { trim } from "@dxos/util";
6
+ var SECTION_IDENTIFIER = "org.dxos.type.stackSection";
7
+ var meta = {
8
+ id: "org.dxos.plugin.stack",
9
+ // TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
10
+ // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
11
+ name: "Collections",
12
+ description: trim`
13
+ Organize and view curated collections of workspace objects in customizable layouts.
14
+ Group related items together and manage collections with sections and filtering.
15
+ `,
16
+ icon: "ph--stack-simple--regular",
17
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
18
+ };
48
19
 
49
- // src/StackPlugin.ts
50
- var StackPlugin = definePlugin(meta, () => [
51
- defineModule({
52
- id: `${meta.id}/module/translations`,
53
- activatesOn: Events.SetupTranslations,
54
- activate: () => contributes(Capabilities.Translations, translations)
55
- }),
56
- defineModule({
57
- id: `${meta.id}/module/metadata`,
58
- activatesOn: Events.SetupMetadata,
59
- activate: () => [
60
- contributes(Capabilities.Metadata, {
61
- id: SECTION_IDENTIFIER,
62
- metadata: {
63
- parse: (section, type) => {
64
- switch (type) {
65
- case "node":
66
- return {
67
- id: section.object.id,
68
- label: section.object.title,
69
- data: section.object
70
- };
71
- case "object":
72
- return section.object;
73
- case "view-object":
74
- return section;
75
- }
76
- }
77
- }
78
- })
79
- ]
80
- }),
81
- defineModule({
82
- id: `${meta.id}/module/schema`,
83
- activatesOn: ClientEvents.SetupSchema,
84
- activate: () => contributes(ClientCapabilities.Schema, [
85
- StackViewType
86
- ])
87
- }),
88
- defineModule({
89
- id: `${meta.id}/module/react-surface`,
90
- activatesOn: Events.SetupReactSurface,
91
- activate: ReactSurface
92
- })
93
- ]);
20
+ // src/index.ts
21
+ var StackPlugin = Plugin.lazy(meta, () => import("./StackPlugin-QWVPZHNO.mjs"));
94
22
  export {
95
23
  SECTION_IDENTIFIER,
96
24
  StackPlugin,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StackPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { type Obj } from '@dxos/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { ReactSurface } from './capabilities';\nimport { SECTION_IDENTIFIER, meta } from './meta';\nimport { translations } from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = definePlugin(meta, () => [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: Obj.Any }, type: string) => {\n switch (type) {\n case 'node':\n return { id: section.object.id, label: (section.object as any).title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [StackViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Stacks',\n 'settings title': 'Stack plugin settings',\n 'settings separation label': 'Separate sections',\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 items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\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 item.',\n },\n },\n },\n ...stackTranslations,\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;;;AAIA,SAASA,cAAcC,QAAQC,aAAaC,cAAcC,oBAAoB;AAE9E,SAASC,oBAAoBC,oBAAoB;;;ACFjD,SAASC,YAAY;AAEd,IAAMC,eAAeC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACD9C,SAASC,gBAAgBC,yBAAyB;AAI3C,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,6BAA6B;QAC7B,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;KACGC;;;;AFvBE,IAAMC,cAAcC,aAAaC,MAAM,MAAM;EAClDC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MAAM;MACdC,YAAYC,aAAaI,UAAU;QACjCV,IAAIW;QACJC,UAAU;UACRC,OAAO,CAACC,SAA8BC,SAAAA;AACpC,oBAAQA,MAAAA;cACN,KAAK;AACH,uBAAO;kBAAEf,IAAIc,QAAQE,OAAOhB;kBAAIiB,OAAQH,QAAQE,OAAeE;kBAAOC,MAAML,QAAQE;gBAAO;cAC7F,KAAK;AACH,uBAAOF,QAAQE;cACjB,KAAK;AACH,uBAAOF;YACX;UACF;QACF;MACF,CAAA;;EAEJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAamB,aAAaC;IAC1BjB,UAAU,MAAMC,YAAYiB,mBAAmBC,QAAQ;MAACC;KAAc;EACxE,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;CACD;",
6
- "names": ["Capabilities", "Events", "contributes", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "lazy", "ReactSurface", "lazy", "translations", "stackTranslations", "translations", "meta", "id", "stackTranslations", "StackPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "SECTION_IDENTIFIER", "metadata", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "StackViewType", "SetupReactSurface", "ReactSurface"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.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('./StackPlugin'));\n\nexport * from './meta';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const SECTION_IDENTIFIER = 'org.dxos.type.stackSection';\n\nexport const meta: Plugin.Meta = {\n id: '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 description: trim`\n Organize and view curated collections of workspace objects in customizable layouts.\n Group related items together and manage collections with sections and filtering.\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;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,qBAAqB;AAE3B,IAAMC,OAAoB;EAC/BC,IAAI;;;EAGJC,MAAM;EACNC,aAAaL;;;;EAIbM,MAAM;EACNC,QAAQ;AACV;;;ADZO,IAAMC,cAAcC,OAAOC,KAAKC,MAAM,MAAM,OAAO,4BAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "SECTION_IDENTIFIER", "meta", "id", "name", "description", "icon", "source", "StackPlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":2047,"imports":[],"format":"esm"},"src/components/StackSettings.tsx":{"bytes":3545,"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":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/StackContext.tsx":{"bytes":1834,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/CaretDownUp.tsx":{"bytes":3228,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/StackSection.tsx":{"bytes":17860,"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":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"src/components/StackMain.tsx":{"bytes":19077,"imports":[{"path":"@preact-signals/safe-react/tracking","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/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":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"}],"format":"esm"},"src/components/index.ts":{"bytes":824,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":4516,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":778,"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/translations.ts":{"bytes":4437,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/types/stack.ts":{"bytes":3625,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":499,"imports":[{"path":"src/types/stack.ts","kind":"import-statement","original":"./stack"}],"format":"esm"},"src/StackPlugin.ts":{"bytes":6689,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/index.ts":{"bytes":547,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5372},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-IRTROCUQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-MS4QSWEZ.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":"dist/lib/browser/react-surface-DEADYQ54.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","StackPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/StackPlugin.ts":{"bytesInOutput":1394},"src/capabilities/index.ts":{"bytesInOutput":115},"src/translations.ts":{"bytesInOutput":1268}},"bytes":3093},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-IRTROCUQ.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":154},"dist/lib/browser/chunk-IRTROCUQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1752},"dist/lib/browser/chunk-IRTROCUQ.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"src/types/stack.ts":{"bytesInOutput":595},"src/types/index.ts":{"bytesInOutput":0}},"bytes":707},"dist/lib/browser/StackMain-XB2KQL47.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21510},"dist/lib/browser/StackMain-XB2KQL47.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MS4QSWEZ.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","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/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":"src/components/StackMain.tsx","inputs":{"src/components/StackMain.tsx":{"bytesInOutput":4469},"src/components/StackContext.tsx":{"bytesInOutput":265},"src/components/StackSection.tsx":{"bytesInOutput":5406},"src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":11459},"dist/lib/browser/react-surface-DEADYQ54.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3734},"dist/lib/browser/react-surface-DEADYQ54.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MS4QSWEZ.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","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":"dist/lib/browser/StackMain-XB2KQL47.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":858},"src/components/index.ts":{"bytesInOutput":94},"src/components/StackSettings.tsx":{"bytesInOutput":263}},"bytes":1532},"dist/lib/browser/chunk-MS4QSWEZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":957},"dist/lib/browser/chunk-MS4QSWEZ.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":524}},"bytes":625}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":2443,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/StackPlugin.ts":{"bytes":4332,"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}],"format":"esm"},"src/index.ts":{"bytes":948,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/StackPlugin.ts","kind":"dynamic-import","original":"./StackPlugin"}],"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"},"src/types/stack.ts":{"bytes":3664,"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"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1539},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"dist/lib/browser/StackPlugin-QWVPZHNO.mjs","kind":"dynamic-import"}],"exports":["SECTION_IDENTIFIER","StackPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":127},"src/meta.ts":{"bytesInOutput":695}},"bytes":962},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2139},"dist/lib/browser/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},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1756},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"entryPoint":"src/types/index.ts","inputs":{"src/types/stack.ts":{"bytesInOutput":575},"src/types/index.ts":{"bytesInOutput":0}},"bytes":677},"dist/lib/browser/StackPlugin-QWVPZHNO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2211},"dist/lib/browser/StackPlugin-QWVPZHNO.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":1018}},"bytes":1150}}}
@@ -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,24 @@
1
- import {
2
- SectionSchema,
3
- StackViewType
4
- } from "../chunk-IRTROCUQ.mjs";
1
+ // src/types/stack.ts
2
+ import * as Schema from "effect/Schema";
3
+ import { Type } from "@dxos/echo";
4
+ var SectionSchema = Schema.Struct({
5
+ height: Schema.optional(Schema.Number),
6
+ // Space for data that isn't stack-specific but is specific to this view instance.
7
+ // e.g. cover/fill for an image
8
+ custom: Schema.optional(Schema.Record({
9
+ key: Schema.String,
10
+ value: Schema.Any
11
+ }))
12
+ });
13
+ var StackViewType = Schema.Struct({
14
+ sections: Schema.Record({
15
+ key: Schema.String,
16
+ value: SectionSchema
17
+ })
18
+ }).pipe(Type.object({
19
+ typename: "org.dxos.type.stackView",
20
+ version: "0.1.0"
21
+ }));
5
22
  export {
6
23
  SectionSchema,
7
24
  StackViewType
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
3
+ "sources": ["../../../../src/types/stack.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { 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(\n Type.object({\n typename: 'org.dxos.type.stackView',\n version: '0.1.0',\n }),\n);\n\nexport interface StackViewType extends Schema.Schema.Type<typeof StackViewType> {}\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,YAAY;AAOd,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,KACDd,KAAKe,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;",
6
+ "names": ["Schema", "Type", "SectionSchema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "sections", "pipe", "object", "typename", "version"]
7
7
  }
@@ -0,0 +1,44 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/StackPlugin.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { ReactSurface } from "#capabilities";
7
+ import { SECTION_IDENTIFIER, meta } from "#meta";
8
+ import { translations } from "#translations";
9
+ import { StackViewType } from "#types";
10
+ var StackPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
11
+ metadata: {
12
+ id: SECTION_IDENTIFIER,
13
+ metadata: {
14
+ parse: (section, type) => {
15
+ switch (type) {
16
+ case "node":
17
+ return {
18
+ id: section.object.id,
19
+ label: section.object.title,
20
+ data: section.object
21
+ };
22
+ case "object":
23
+ return section.object;
24
+ case "view-object":
25
+ return section;
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }), AppPlugin.addSchemaModule({
31
+ schema: [
32
+ StackViewType
33
+ ]
34
+ }), AppPlugin.addSurfaceModule({
35
+ activate: ReactSurface
36
+ }), AppPlugin.addTranslationsModule({
37
+ translations
38
+ }), Plugin.make);
39
+ var StackPlugin_default = StackPlugin;
40
+ export {
41
+ StackPlugin,
42
+ StackPlugin_default as default
43
+ };
44
+ //# sourceMappingURL=StackPlugin-5PFRZ364.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/StackPlugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type Obj } from '@dxos/echo';\n\nimport { ReactSurface } from '#capabilities';\nimport { SECTION_IDENTIFIER, meta } from '#meta';\nimport { translations } from '#translations';\nimport { StackViewType } from '#types';\n\nexport const StackPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: Obj.Unknown }, type: string) => {\n switch (type) {\n case 'node':\n return { id: section.object.id, label: (section.object as any).title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [StackViewType] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default StackPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAG1B,SAASC,oBAAoB;AAC7B,SAASC,oBAAoBC,YAAY;AACzC,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;AAEvB,IAAMC,cAAcP,OAAOQ,OAAOJ,IAAAA,EAAMK,KAC7CR,UAAUS,kBAAkB;EAC1BC,UAAU;IACRC,IAAIT;IACJQ,UAAU;MACRE,OAAO,CAACC,SAAkCC,SAAAA;AACxC,gBAAQA,MAAAA;UACN,KAAK;AACH,mBAAO;cAAEH,IAAIE,QAAQE,OAAOJ;cAAIK,OAAQH,QAAQE,OAAeE;cAAOC,MAAML,QAAQE;YAAO;UAC7F,KAAK;AACH,mBAAOF,QAAQE;UACjB,KAAK;AACH,mBAAOF;QACX;MACF;IACF;EACF;AACF,CAAA,GACAb,UAAUmB,gBAAgB;EAAEC,QAAQ;IAACf;;AAAe,CAAA,GACpDL,UAAUqB,iBAAiB;EAAEC,UAAUrB;AAAa,CAAA,GACpDD,UAAUuB,sBAAsB;EAAEnB;AAAa,CAAA,GAC/CL,OAAOyB,IAAI;AAGb,IAAA,sBAAelB;",
6
+ "names": ["Plugin", "AppPlugin", "ReactSurface", "SECTION_IDENTIFIER", "meta", "translations", "StackViewType", "StackPlugin", "define", "pipe", "addMetadataModule", "metadata", "id", "parse", "section", "type", "object", "label", "title", "data", "addSchemaModule", "schema", "addSurfaceModule", "activate", "addTranslationsModule", "make"]
7
+ }
@@ -1,97 +1,26 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- StackViewType
4
- } from "./chunk-LRAZXJ65.mjs";
5
- import {
6
- SECTION_IDENTIFIER,
7
- meta
8
- } from "./chunk-5FDDKAPB.mjs";
9
2
 
10
- // src/StackPlugin.ts
11
- import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
12
- import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
3
+ // src/index.ts
4
+ import { Plugin } from "@dxos/app-framework";
13
5
 
14
- // src/capabilities/index.ts
15
- import { lazy } from "@dxos/app-framework";
16
- var ReactSurface = lazy(() => import("./react-surface-VDFOPDUT.mjs"));
17
-
18
- // src/translations.ts
19
- import { translations as stackTranslations } from "@dxos/react-ui-stack";
20
- var translations = [
21
- {
22
- "en-US": {
23
- [meta.id]: {
24
- "plugin name": "Stacks",
25
- "settings title": "Stack plugin settings",
26
- "settings separation label": "Separate sections",
27
- "add section beforeAll dialog title": "Add a section to the start",
28
- "add section afterAll dialog title": "Add a section to the end",
29
- "add section before dialog title": "Add a section",
30
- "add section after dialog title": "Add a section",
31
- "add section input placeholder": "Find the type of section to add",
32
- "upload file label": "Add file",
33
- "add section label": "Add section",
34
- "empty stack message": "Drag items into the stack.",
35
- "remove section label": "Delete",
36
- "navigate to section label": "Navigate to item",
37
- "untitled section title": "Untitled section",
38
- "add section before label": "Add before",
39
- "add section after label": "Add after",
40
- "expand label": "Expand",
41
- "collapse label": "Collapse",
42
- "open chat thread label": "Open chat thread",
43
- "drag handle label": "Press space or enter to begin dragging this item."
44
- }
45
- }
46
- },
47
- ...stackTranslations
48
- ];
6
+ // src/meta.ts
7
+ import { trim } from "@dxos/util";
8
+ var SECTION_IDENTIFIER = "org.dxos.type.stackSection";
9
+ var meta = {
10
+ id: "org.dxos.plugin.stack",
11
+ // TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
12
+ // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
13
+ name: "Collections",
14
+ description: trim`
15
+ Organize and view curated collections of workspace objects in customizable layouts.
16
+ Group related items together and manage collections with sections and filtering.
17
+ `,
18
+ icon: "ph--stack-simple--regular",
19
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
20
+ };
49
21
 
50
- // src/StackPlugin.ts
51
- var StackPlugin = definePlugin(meta, () => [
52
- defineModule({
53
- id: `${meta.id}/module/translations`,
54
- activatesOn: Events.SetupTranslations,
55
- activate: () => contributes(Capabilities.Translations, translations)
56
- }),
57
- defineModule({
58
- id: `${meta.id}/module/metadata`,
59
- activatesOn: Events.SetupMetadata,
60
- activate: () => [
61
- contributes(Capabilities.Metadata, {
62
- id: SECTION_IDENTIFIER,
63
- metadata: {
64
- parse: (section, type) => {
65
- switch (type) {
66
- case "node":
67
- return {
68
- id: section.object.id,
69
- label: section.object.title,
70
- data: section.object
71
- };
72
- case "object":
73
- return section.object;
74
- case "view-object":
75
- return section;
76
- }
77
- }
78
- }
79
- })
80
- ]
81
- }),
82
- defineModule({
83
- id: `${meta.id}/module/schema`,
84
- activatesOn: ClientEvents.SetupSchema,
85
- activate: () => contributes(ClientCapabilities.Schema, [
86
- StackViewType
87
- ])
88
- }),
89
- defineModule({
90
- id: `${meta.id}/module/react-surface`,
91
- activatesOn: Events.SetupReactSurface,
92
- activate: ReactSurface
93
- })
94
- ]);
22
+ // src/index.ts
23
+ var StackPlugin = Plugin.lazy(meta, () => import("./StackPlugin-5PFRZ364.mjs"));
95
24
  export {
96
25
  SECTION_IDENTIFIER,
97
26
  StackPlugin,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StackPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { type Obj } from '@dxos/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { ReactSurface } from './capabilities';\nimport { SECTION_IDENTIFIER, meta } from './meta';\nimport { translations } from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = definePlugin(meta, () => [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: Obj.Any }, type: string) => {\n switch (type) {\n case 'node':\n return { id: section.object.id, label: (section.object as any).title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [StackViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Stacks',\n 'settings title': 'Stack plugin settings',\n 'settings separation label': 'Separate sections',\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 items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\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 item.',\n },\n },\n },\n ...stackTranslations,\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;;;;AAIA,SAASA,cAAcC,QAAQC,aAAaC,cAAcC,oBAAoB;AAE9E,SAASC,oBAAoBC,oBAAoB;;;ACFjD,SAASC,YAAY;AAEd,IAAMC,eAAeC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACD9C,SAASC,gBAAgBC,yBAAyB;AAI3C,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,6BAA6B;QAC7B,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;KACGC;;;;AFvBE,IAAMC,cAAcC,aAAaC,MAAM,MAAM;EAClDC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MAAM;MACdC,YAAYC,aAAaI,UAAU;QACjCV,IAAIW;QACJC,UAAU;UACRC,OAAO,CAACC,SAA8BC,SAAAA;AACpC,oBAAQA,MAAAA;cACN,KAAK;AACH,uBAAO;kBAAEf,IAAIc,QAAQE,OAAOhB;kBAAIiB,OAAQH,QAAQE,OAAeE;kBAAOC,MAAML,QAAQE;gBAAO;cAC7F,KAAK;AACH,uBAAOF,QAAQE;cACjB,KAAK;AACH,uBAAOF;YACX;UACF;QACF;MACF,CAAA;;EAEJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAamB,aAAaC;IAC1BjB,UAAU,MAAMC,YAAYiB,mBAAmBC,QAAQ;MAACC;KAAc;EACxE,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;CACD;",
6
- "names": ["Capabilities", "Events", "contributes", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "lazy", "ReactSurface", "lazy", "translations", "stackTranslations", "translations", "meta", "id", "stackTranslations", "StackPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "SECTION_IDENTIFIER", "metadata", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "StackViewType", "SetupReactSurface", "ReactSurface"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.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('./StackPlugin'));\n\nexport * from './meta';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const SECTION_IDENTIFIER = 'org.dxos.type.stackSection';\n\nexport const meta: Plugin.Meta = {\n id: '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 description: trim`\n Organize and view curated collections of workspace objects in customizable layouts.\n Group related items together and manage collections with sections and filtering.\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;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,qBAAqB;AAE3B,IAAMC,OAAoB;EAC/BC,IAAI;;;EAGJC,MAAM;EACNC,aAAaL;;;;EAIbM,MAAM;EACNC,QAAQ;AACV;;;ADZO,IAAMC,cAAcC,OAAOC,KAAKC,MAAM,MAAM,OAAO,4BAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "SECTION_IDENTIFIER", "meta", "id", "name", "description", "icon", "source", "StackPlugin", "Plugin", "lazy", "meta"]
7
7
  }