@dxos/plugin-stack 0.8.4-main.70d3990 → 0.8.4-main.74a063c4e0
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.
- package/dist/lib/browser/index.mjs +71 -77
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +21 -4
- package/dist/lib/browser/types/index.mjs.map +4 -4
- package/dist/lib/node-esm/index.mjs +72 -77
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +22 -4
- package/dist/lib/node-esm/types/index.mjs.map +4 -4
- package/dist/types/src/StackPlugin.d.ts +2 -1
- package/dist/types/src/StackPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/{StackContext.d.ts → StackContext/StackContext.d.ts} +2 -1
- package/dist/types/src/components/StackContext/StackContext.d.ts.map +1 -0
- package/dist/types/src/components/StackContext/index.d.ts +2 -0
- package/dist/types/src/components/StackContext/index.d.ts.map +1 -0
- package/dist/types/src/components/StackSection/CaretDownUp.d.ts.map +1 -0
- package/dist/types/src/components/{StackSection.d.ts → StackSection/StackSection.d.ts} +1 -1
- package/dist/types/src/components/StackSection/StackSection.d.ts.map +1 -0
- package/dist/types/src/components/StackSection/index.d.ts +2 -0
- package/dist/types/src/components/StackSection/index.d.ts.map +1 -0
- package/dist/types/src/components/{StackSettings.d.ts → StackSettings/StackSettings.d.ts} +1 -1
- package/dist/types/src/components/StackSettings/StackSettings.d.ts.map +1 -0
- package/dist/types/src/components/StackSettings/index.d.ts +2 -0
- package/dist/types/src/components/StackSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -7
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/StackContainer/StackContainer.d.ts +7 -0
- package/dist/types/src/containers/StackContainer/StackContainer.d.ts.map +1 -0
- package/dist/types/src/containers/StackContainer/index.d.ts +2 -0
- package/dist/types/src/containers/StackContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +3 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +31 -30
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/stack.d.ts +12 -13
- package/dist/types/src/types/stack.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +2 -2
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +49 -36
- package/src/StackPlugin.ts +27 -41
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/react-surface.tsx +21 -21
- package/src/components/{StackContext.tsx → StackContext/StackContext.tsx} +3 -1
- package/src/components/StackContext/index.ts +5 -0
- package/src/components/{StackSection.tsx → StackSection/StackSection.tsx} +26 -24
- package/src/components/StackSection/index.ts +5 -0
- package/src/components/StackSettings/StackSettings.tsx +28 -0
- package/src/components/StackSettings/index.ts +5 -0
- package/src/components/index.ts +2 -4
- package/src/containers/StackContainer/StackContainer.tsx +170 -0
- package/src/containers/StackContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/meta.ts +4 -4
- package/src/translations.ts +22 -21
- package/src/types/stack.ts +11 -7
- package/src/types/types.ts +2 -2
- package/dist/lib/browser/StackContainer-DD3ZD5OE.mjs +0 -299
- package/dist/lib/browser/StackContainer-DD3ZD5OE.mjs.map +0 -7
- package/dist/lib/browser/chunk-NHMDZYOB.mjs +0 -28
- package/dist/lib/browser/chunk-NHMDZYOB.mjs.map +0 -7
- package/dist/lib/browser/chunk-UIKFKRFJ.mjs +0 -21
- package/dist/lib/browser/chunk-UIKFKRFJ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HVPK7YZQ.mjs +0 -39
- package/dist/lib/browser/react-surface-HVPK7YZQ.mjs.map +0 -7
- package/dist/lib/node-esm/StackContainer-JGWPXSUF.mjs +0 -300
- package/dist/lib/node-esm/StackContainer-JGWPXSUF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BGVQYUYP.mjs +0 -23
- package/dist/lib/node-esm/chunk-BGVQYUYP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZZFA7HIV.mjs +0 -30
- package/dist/lib/node-esm/chunk-ZZFA7HIV.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-HYSD7AC2.mjs +0 -40
- package/dist/lib/node-esm/react-surface-HYSD7AC2.mjs.map +0 -7
- package/dist/types/src/components/CaretDownUp.d.ts.map +0 -1
- package/dist/types/src/components/StackContainer.d.ts +0 -9
- package/dist/types/src/components/StackContainer.d.ts.map +0 -1
- package/dist/types/src/components/StackContext.d.ts.map +0 -1
- package/dist/types/src/components/StackSection.d.ts.map +0 -1
- package/dist/types/src/components/StackSettings.d.ts.map +0 -1
- package/src/components/StackContainer.tsx +0 -172
- package/src/components/StackSettings.tsx +0 -30
- /package/dist/types/src/components/{CaretDownUp.d.ts → StackSection/CaretDownUp.d.ts} +0 -0
- /package/src/components/{CaretDownUp.tsx → StackSection/CaretDownUp.tsx} +0 -0
|
@@ -1,45 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var SECTION_IDENTIFIER = "org.dxos.type.stackSection";
|
|
4
|
+
var meta = {
|
|
5
|
+
id: "org.dxos.plugin.stack",
|
|
6
|
+
// TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
|
|
7
|
+
// Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
|
|
8
|
+
name: "Collections",
|
|
9
|
+
description: trim`
|
|
10
|
+
Organize and view curated collections of workspace objects in customizable layouts.
|
|
11
|
+
Group related items together and manage collections with sections and filtering.
|
|
12
|
+
`,
|
|
13
|
+
icon: "ph--stack-simple--regular",
|
|
14
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
|
|
15
|
+
};
|
|
8
16
|
|
|
9
17
|
// src/StackPlugin.ts
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
var ReactSurface = lazy(() => import("./react-surface-HVPK7YZQ.mjs"));
|
|
18
|
+
import { Plugin } from "@dxos/app-framework";
|
|
19
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
20
|
+
import { ReactSurface } from "#capabilities";
|
|
21
|
+
import { SECTION_IDENTIFIER as SECTION_IDENTIFIER2, meta as meta3 } from "#meta";
|
|
22
|
+
import { StackViewType } from "#types";
|
|
16
23
|
|
|
17
24
|
// src/translations.ts
|
|
18
25
|
import { translations as stackTranslations } from "@dxos/react-ui-stack";
|
|
26
|
+
import { meta as meta2 } from "#meta";
|
|
19
27
|
var translations = [
|
|
20
28
|
{
|
|
21
29
|
"en-US": {
|
|
22
|
-
[
|
|
23
|
-
"plugin
|
|
24
|
-
"settings
|
|
25
|
-
"settings
|
|
26
|
-
"
|
|
27
|
-
"add
|
|
28
|
-
"add
|
|
29
|
-
"add
|
|
30
|
-
"add
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"add
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
30
|
+
[meta2.id]: {
|
|
31
|
+
"plugin.name": "Stacks",
|
|
32
|
+
"settings.title": "Stack settings",
|
|
33
|
+
"settings.separation.label": "Separate sections",
|
|
34
|
+
"settings.separation.description": "Add visual dividers between sections in stacks.",
|
|
35
|
+
"add-section-beforeAll-dialog.title": "Add a section to the start",
|
|
36
|
+
"add-section-afterAll-dialog.title": "Add a section to the end",
|
|
37
|
+
"add-section-before-dialog.title": "Add a section",
|
|
38
|
+
"add-section-after-dialog.title": "Add a section",
|
|
39
|
+
"add-section-input.placeholder": "Find the type of section to add",
|
|
40
|
+
"upload-file.label": "Add file",
|
|
41
|
+
"add-section.label": "Add section",
|
|
42
|
+
"empty-stack.message": "Drag objects into the stack.",
|
|
43
|
+
"remove-section.label": "Delete",
|
|
44
|
+
"navigate-to-section.label": "Navigate to object",
|
|
45
|
+
"untitled-section.title": "Untitled section",
|
|
46
|
+
"add-section-before.label": "Add before",
|
|
47
|
+
"add-section-after.label": "Add after",
|
|
48
|
+
"expand.label": "Expand",
|
|
49
|
+
"collapse.label": "Collapse",
|
|
50
|
+
"open-chat-thread.label": "Open chat thread",
|
|
51
|
+
"drag-handle.label": "Press space or enter to begin dragging this object."
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
54
|
},
|
|
@@ -47,50 +56,35 @@ var translations = [
|
|
|
47
56
|
];
|
|
48
57
|
|
|
49
58
|
// src/StackPlugin.ts
|
|
50
|
-
var StackPlugin =
|
|
51
|
-
|
|
52
|
-
id:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
}
|
|
59
|
+
var StackPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
60
|
+
metadata: {
|
|
61
|
+
id: SECTION_IDENTIFIER2,
|
|
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;
|
|
77
75
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
activatesOn: Events.SetupReactSurface,
|
|
91
|
-
activate: ReactSurface
|
|
92
|
-
})
|
|
93
|
-
]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}), AppPlugin.addSchemaModule({
|
|
80
|
+
schema: [
|
|
81
|
+
StackViewType
|
|
82
|
+
]
|
|
83
|
+
}), AppPlugin.addSurfaceModule({
|
|
84
|
+
activate: ReactSurface
|
|
85
|
+
}), AppPlugin.addTranslationsModule({
|
|
86
|
+
translations
|
|
87
|
+
}), Plugin.make);
|
|
94
88
|
export {
|
|
95
89
|
SECTION_IDENTIFIER,
|
|
96
90
|
StackPlugin,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/StackPlugin.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\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", "//\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 { StackViewType } from '#types';\n\nimport { translations } from './translations';\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", "//\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 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,YAAY;AAEd,IAAMC,qBAAqB;AAE3B,IAAMC,OAAoB;EAC/BC,IAAI;;;EAGJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,QAAQ;AACV;;;AChBA,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAG1B,SAASC,oBAAoB;AAC7B,SAASC,sBAAAA,qBAAoBC,QAAAA,aAAY;AACzC,SAASC,qBAAqB;;;ACL9B,SAASC,gBAAgBC,yBAAyB;AAElD,SAASC,QAAAA,aAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,MAAKC,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;KACGC;;;;ADvBE,IAAMC,cAAcC,OAAOC,OAAOC,KAAAA,EAAMC,KAC7CC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC;IACJF,UAAU;MACRG,OAAO,CAACC,SAAkCC,SAAAA;AACxC,gBAAQA,MAAAA;UACN,KAAK;AACH,mBAAO;cAAEJ,IAAIG,QAAQE,OAAOL;cAAIM,OAAQH,QAAQE,OAAeE;cAAOC,MAAML,QAAQE;YAAO;UAC7F,KAAK;AACH,mBAAOF,QAAQE;UACjB,KAAK;AACH,mBAAOF;QACX;MACF;IACF;EACF;AACF,CAAA,GACAN,UAAUY,gBAAgB;EAAEC,QAAQ;IAACC;;AAAe,CAAA,GACpDd,UAAUe,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDjB,UAAUkB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CvB,OAAOwB,IAAI;",
|
|
6
|
+
"names": ["trim", "SECTION_IDENTIFIER", "meta", "id", "name", "description", "trim", "icon", "source", "Plugin", "AppPlugin", "ReactSurface", "SECTION_IDENTIFIER", "meta", "StackViewType", "translations", "stackTranslations", "meta", "translations", "meta", "id", "stackTranslations", "StackPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "SECTION_IDENTIFIER", "parse", "section", "type", "object", "label", "title", "data", "addSchemaModule", "schema", "StackViewType", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations", "make"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":2526,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"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":17874,"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/react","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/StackContainer.tsx":{"bytes":19859,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","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":858,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"src/components/StackContainer.tsx","kind":"dynamic-import","original":"./StackContainer"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3873,"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/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":4451,"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":3643,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","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":5378},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-NHMDZYOB.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-UIKFKRFJ.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-HVPK7YZQ.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":1274}},"bytes":3099},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-NHMDZYOB.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":154},"dist/lib/browser/chunk-NHMDZYOB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1695},"dist/lib/browser/chunk-NHMDZYOB.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"src/types/stack.ts":{"bytesInOutput":605},"src/types/index.ts":{"bytesInOutput":0}},"bytes":717},"dist/lib/browser/StackContainer-DD3ZD5OE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21901},"dist/lib/browser/StackContainer-DD3ZD5OE.mjs":{"imports":[{"path":"dist/lib/browser/chunk-UIKFKRFJ.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","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/react","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/StackContainer.tsx","inputs":{"src/components/StackContainer.tsx":{"bytesInOutput":4587},"src/components/StackContext.tsx":{"bytesInOutput":265},"src/components/StackSection.tsx":{"bytesInOutput":5412},"src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":11603},"dist/lib/browser/react-surface-HVPK7YZQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3434},"dist/lib/browser/react-surface-HVPK7YZQ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-UIKFKRFJ.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/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/StackContainer-DD3ZD5OE.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":655},"src/components/index.ts":{"bytesInOutput":104},"src/components/StackSettings.tsx":{"bytesInOutput":263}},"bytes":1339},"dist/lib/browser/chunk-UIKFKRFJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1168},"dist/lib/browser/chunk-UIKFKRFJ.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":695}},"bytes":796}}}
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":2522,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/translations.ts":{"bytes":4677,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/StackPlugin.ts":{"bytes":4331,"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":"#types","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"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"},"src/types/stack.ts":{"bytes":3750,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5417},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"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":"#types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","StackPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":695},"src/index.ts":{"bytesInOutput":0},"src/StackPlugin.ts":{"bytesInOutput":967},"src/translations.ts":{"bytesInOutput":1401}},"bytes":3239},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1764},"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}}}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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,KACDC,KAAKC,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", "Type", "object", "typename", "version"]
|
|
7
7
|
}
|
|
@@ -1,46 +1,56 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
StackViewType
|
|
4
|
-
} from "./chunk-ZZFA7HIV.mjs";
|
|
5
|
-
import {
|
|
6
|
-
SECTION_IDENTIFIER,
|
|
7
|
-
meta
|
|
8
|
-
} from "./chunk-BGVQYUYP.mjs";
|
|
9
2
|
|
|
10
|
-
// src/
|
|
11
|
-
import {
|
|
12
|
-
|
|
3
|
+
// src/meta.ts
|
|
4
|
+
import { trim } from "@dxos/util";
|
|
5
|
+
var SECTION_IDENTIFIER = "org.dxos.type.stackSection";
|
|
6
|
+
var meta = {
|
|
7
|
+
id: "org.dxos.plugin.stack",
|
|
8
|
+
// TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
|
|
9
|
+
// Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
|
|
10
|
+
name: "Collections",
|
|
11
|
+
description: trim`
|
|
12
|
+
Organize and view curated collections of workspace objects in customizable layouts.
|
|
13
|
+
Group related items together and manage collections with sections and filtering.
|
|
14
|
+
`,
|
|
15
|
+
icon: "ph--stack-simple--regular",
|
|
16
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
|
|
17
|
+
};
|
|
13
18
|
|
|
14
|
-
// src/
|
|
15
|
-
import {
|
|
16
|
-
|
|
19
|
+
// src/StackPlugin.ts
|
|
20
|
+
import { Plugin } from "@dxos/app-framework";
|
|
21
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
22
|
+
import { ReactSurface } from "#capabilities";
|
|
23
|
+
import { SECTION_IDENTIFIER as SECTION_IDENTIFIER2, meta as meta3 } from "#meta";
|
|
24
|
+
import { StackViewType } from "#types";
|
|
17
25
|
|
|
18
26
|
// src/translations.ts
|
|
19
27
|
import { translations as stackTranslations } from "@dxos/react-ui-stack";
|
|
28
|
+
import { meta as meta2 } from "#meta";
|
|
20
29
|
var translations = [
|
|
21
30
|
{
|
|
22
31
|
"en-US": {
|
|
23
|
-
[
|
|
24
|
-
"plugin
|
|
25
|
-
"settings
|
|
26
|
-
"settings
|
|
27
|
-
"
|
|
28
|
-
"add
|
|
29
|
-
"add
|
|
30
|
-
"add
|
|
31
|
-
"add
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"add
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
32
|
+
[meta2.id]: {
|
|
33
|
+
"plugin.name": "Stacks",
|
|
34
|
+
"settings.title": "Stack settings",
|
|
35
|
+
"settings.separation.label": "Separate sections",
|
|
36
|
+
"settings.separation.description": "Add visual dividers between sections in stacks.",
|
|
37
|
+
"add-section-beforeAll-dialog.title": "Add a section to the start",
|
|
38
|
+
"add-section-afterAll-dialog.title": "Add a section to the end",
|
|
39
|
+
"add-section-before-dialog.title": "Add a section",
|
|
40
|
+
"add-section-after-dialog.title": "Add a section",
|
|
41
|
+
"add-section-input.placeholder": "Find the type of section to add",
|
|
42
|
+
"upload-file.label": "Add file",
|
|
43
|
+
"add-section.label": "Add section",
|
|
44
|
+
"empty-stack.message": "Drag objects into the stack.",
|
|
45
|
+
"remove-section.label": "Delete",
|
|
46
|
+
"navigate-to-section.label": "Navigate to object",
|
|
47
|
+
"untitled-section.title": "Untitled section",
|
|
48
|
+
"add-section-before.label": "Add before",
|
|
49
|
+
"add-section-after.label": "Add after",
|
|
50
|
+
"expand.label": "Expand",
|
|
51
|
+
"collapse.label": "Collapse",
|
|
52
|
+
"open-chat-thread.label": "Open chat thread",
|
|
53
|
+
"drag-handle.label": "Press space or enter to begin dragging this object."
|
|
44
54
|
}
|
|
45
55
|
}
|
|
46
56
|
},
|
|
@@ -48,50 +58,35 @@ var translations = [
|
|
|
48
58
|
];
|
|
49
59
|
|
|
50
60
|
// src/StackPlugin.ts
|
|
51
|
-
var StackPlugin =
|
|
52
|
-
|
|
53
|
-
id:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
}
|
|
61
|
+
var StackPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
62
|
+
metadata: {
|
|
63
|
+
id: SECTION_IDENTIFIER2,
|
|
64
|
+
metadata: {
|
|
65
|
+
parse: (section, type) => {
|
|
66
|
+
switch (type) {
|
|
67
|
+
case "node":
|
|
68
|
+
return {
|
|
69
|
+
id: section.object.id,
|
|
70
|
+
label: section.object.title,
|
|
71
|
+
data: section.object
|
|
72
|
+
};
|
|
73
|
+
case "object":
|
|
74
|
+
return section.object;
|
|
75
|
+
case "view-object":
|
|
76
|
+
return section;
|
|
78
77
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
activatesOn: Events.SetupReactSurface,
|
|
92
|
-
activate: ReactSurface
|
|
93
|
-
})
|
|
94
|
-
]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}), AppPlugin.addSchemaModule({
|
|
82
|
+
schema: [
|
|
83
|
+
StackViewType
|
|
84
|
+
]
|
|
85
|
+
}), AppPlugin.addSurfaceModule({
|
|
86
|
+
activate: ReactSurface
|
|
87
|
+
}), AppPlugin.addTranslationsModule({
|
|
88
|
+
translations
|
|
89
|
+
}), Plugin.make);
|
|
95
90
|
export {
|
|
96
91
|
SECTION_IDENTIFIER,
|
|
97
92
|
StackPlugin,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/StackPlugin.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\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", "//\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 { StackViewType } from '#types';\n\nimport { translations } from './translations';\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", "//\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 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,YAAY;AAEd,IAAMC,qBAAqB;AAE3B,IAAMC,OAAoB;EAC/BC,IAAI;;;EAGJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,QAAQ;AACV;;;AChBA,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAG1B,SAASC,oBAAoB;AAC7B,SAASC,sBAAAA,qBAAoBC,QAAAA,aAAY;AACzC,SAASC,qBAAqB;;;ACL9B,SAASC,gBAAgBC,yBAAyB;AAElD,SAASC,QAAAA,aAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,MAAKC,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;KACGC;;;;ADvBE,IAAMC,cAAcC,OAAOC,OAAOC,KAAAA,EAAMC,KAC7CC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC;IACJF,UAAU;MACRG,OAAO,CAACC,SAAkCC,SAAAA;AACxC,gBAAQA,MAAAA;UACN,KAAK;AACH,mBAAO;cAAEJ,IAAIG,QAAQE,OAAOL;cAAIM,OAAQH,QAAQE,OAAeE;cAAOC,MAAML,QAAQE;YAAO;UAC7F,KAAK;AACH,mBAAOF,QAAQE;UACjB,KAAK;AACH,mBAAOF;QACX;MACF;IACF;EACF;AACF,CAAA,GACAN,UAAUY,gBAAgB;EAAEC,QAAQ;IAACC;;AAAe,CAAA,GACpDd,UAAUe,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDjB,UAAUkB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CvB,OAAOwB,IAAI;",
|
|
6
|
+
"names": ["trim", "SECTION_IDENTIFIER", "meta", "id", "name", "description", "trim", "icon", "source", "Plugin", "AppPlugin", "ReactSurface", "SECTION_IDENTIFIER", "meta", "StackViewType", "translations", "stackTranslations", "meta", "translations", "meta", "id", "stackTranslations", "StackPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "SECTION_IDENTIFIER", "parse", "section", "type", "object", "label", "title", "data", "addSchemaModule", "schema", "StackViewType", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations", "make"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":2526,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"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":17874,"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/react","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/StackContainer.tsx":{"bytes":19859,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","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":858,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"src/components/StackContainer.tsx","kind":"dynamic-import","original":"./StackContainer"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3873,"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/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":4451,"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":3643,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","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/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5379},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZZFA7HIV.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-BGVQYUYP.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/node-esm/react-surface-HYSD7AC2.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":1274}},"bytes":3191},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZZFA7HIV.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":246},"dist/lib/node-esm/chunk-ZZFA7HIV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1697},"dist/lib/node-esm/chunk-ZZFA7HIV.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"src/types/stack.ts":{"bytesInOutput":605},"src/types/index.ts":{"bytesInOutput":0}},"bytes":810},"dist/lib/node-esm/StackContainer-JGWPXSUF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21902},"dist/lib/node-esm/StackContainer-JGWPXSUF.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-BGVQYUYP.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","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/react","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/StackContainer.tsx","inputs":{"src/components/StackContainer.tsx":{"bytesInOutput":4587},"src/components/StackContext.tsx":{"bytesInOutput":265},"src/components/StackSection.tsx":{"bytesInOutput":5412},"src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":11695},"dist/lib/node-esm/react-surface-HYSD7AC2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3435},"dist/lib/node-esm/react-surface-HYSD7AC2.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-BGVQYUYP.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/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/node-esm/StackContainer-JGWPXSUF.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":655},"src/components/index.ts":{"bytesInOutput":104},"src/components/StackSettings.tsx":{"bytesInOutput":263}},"bytes":1431},"dist/lib/node-esm/chunk-BGVQYUYP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1170},"dist/lib/node-esm/chunk-BGVQYUYP.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":695}},"bytes":889}}}
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":2522,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/translations.ts":{"bytes":4677,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/StackPlugin.ts":{"bytes":4331,"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":"#types","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"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"},"src/types/stack.ts":{"bytes":3750,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5419},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"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":"#types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","StackPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":695},"src/index.ts":{"bytesInOutput":0},"src/StackPlugin.ts":{"bytesInOutput":967},"src/translations.ts":{"bytesInOutput":1401}},"bytes":3332},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1766},"dist/lib/node-esm/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":770}}}
|