@dxos/plugin-template 0.9.1-staging.ee54ba693a → 0.11.0
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/TemplatePlugin.mjs +12 -0
- package/dist/lib/TemplatePlugin.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +8 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-create-object.mjs +24 -0
- package/dist/lib/chunk-create-object.mjs.map +1 -0
- package/dist/lib/chunk-meta.mjs +26 -0
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/{neutral/react-surface-SYA2674P.mjs → chunk-react-surface.mjs} +15 -15
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/components.mjs +16 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/index.mjs +3 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/plugin.mjs +8 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/translations.mjs +22 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +16 -0
- package/dist/lib/types.mjs.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +1 -0
- package/package.json +25 -25
- package/src/capabilities/{react-surface.tsx → react-surface.ts} +2 -4
- package/src/components/TemplatePanel/TemplatePanel.tsx +1 -1
- package/dist/lib/neutral/TemplatePlugin.mjs +0 -24
- package/dist/lib/neutral/TemplatePlugin.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -9
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4LTYW26S.mjs +0 -30
- package/dist/lib/neutral/chunk-4LTYW26S.mjs.map +0 -7
- package/dist/lib/neutral/chunk-NZ3DSXJY.mjs +0 -20
- package/dist/lib/neutral/chunk-NZ3DSXJY.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -14
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/create-object-2ARJFAMW.mjs +0 -25
- package/dist/lib/neutral/create-object-2ARJFAMW.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -11
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -7
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -11
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-SYA2674P.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -28
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -7
- package/dist/lib/neutral/types/index.mjs.map +0 -7
package/dx.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-template",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Template for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -16,49 +16,49 @@
|
|
|
16
16
|
"#capabilities": {
|
|
17
17
|
"source": "./src/capabilities/index.ts",
|
|
18
18
|
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
-
"default": "./dist/lib/
|
|
19
|
+
"default": "./dist/lib/capabilities.mjs"
|
|
20
20
|
},
|
|
21
21
|
"#components": {
|
|
22
22
|
"source": "./src/components/index.ts",
|
|
23
23
|
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
-
"default": "./dist/lib/
|
|
24
|
+
"default": "./dist/lib/components.mjs"
|
|
25
25
|
},
|
|
26
26
|
"#meta": {
|
|
27
27
|
"source": "./src/meta.ts",
|
|
28
28
|
"types": "./dist/types/src/meta.d.ts",
|
|
29
|
-
"default": "./dist/lib/
|
|
29
|
+
"default": "./dist/lib/meta.mjs"
|
|
30
30
|
},
|
|
31
31
|
"#plugin": {
|
|
32
32
|
"source": "./src/TemplatePlugin.tsx",
|
|
33
33
|
"types": "./dist/types/src/TemplatePlugin.d.ts",
|
|
34
|
-
"default": "./dist/lib/
|
|
34
|
+
"default": "./dist/lib/TemplatePlugin.mjs"
|
|
35
35
|
},
|
|
36
36
|
"#translations": {
|
|
37
37
|
"source": "./src/translations.ts",
|
|
38
38
|
"types": "./dist/types/src/translations.d.ts",
|
|
39
|
-
"default": "./dist/lib/
|
|
39
|
+
"default": "./dist/lib/translations.mjs"
|
|
40
40
|
},
|
|
41
41
|
"#types": {
|
|
42
42
|
"source": "./src/types/index.ts",
|
|
43
43
|
"types": "./dist/types/src/types/index.d.ts",
|
|
44
|
-
"default": "./dist/lib/
|
|
44
|
+
"default": "./dist/lib/types.mjs"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"exports": {
|
|
48
48
|
".": {
|
|
49
49
|
"source": "./src/index.ts",
|
|
50
50
|
"types": "./dist/types/src/index.d.ts",
|
|
51
|
-
"
|
|
51
|
+
"import": "./dist/lib/index.mjs"
|
|
52
52
|
},
|
|
53
53
|
"./plugin": {
|
|
54
54
|
"source": "./src/plugin.ts",
|
|
55
55
|
"types": "./dist/types/src/plugin.d.ts",
|
|
56
|
-
"
|
|
56
|
+
"import": "./dist/lib/plugin.mjs"
|
|
57
57
|
},
|
|
58
58
|
"./translations": {
|
|
59
59
|
"source": "./src/translations.ts",
|
|
60
60
|
"types": "./dist/types/src/translations.d.ts",
|
|
61
|
-
"
|
|
61
|
+
"import": "./dist/lib/translations.mjs"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -69,32 +69,32 @@
|
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"effect": "3.21.4",
|
|
72
|
-
"@dxos/app-
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/echo": "0.
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/plugin-space": "0.
|
|
79
|
-
"@dxos/
|
|
72
|
+
"@dxos/app-framework": "0.11.0",
|
|
73
|
+
"@dxos/app-toolkit": "0.11.0",
|
|
74
|
+
"@dxos/compute": "0.11.0",
|
|
75
|
+
"@dxos/echo": "0.11.0",
|
|
76
|
+
"@dxos/keys": "0.11.0",
|
|
77
|
+
"@dxos/plugin-client": "0.11.0",
|
|
78
|
+
"@dxos/plugin-space": "0.11.0",
|
|
79
|
+
"@dxos/util": "0.11.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@types/react": "~19.2.17",
|
|
83
83
|
"@types/react-dom": "~19.2.3",
|
|
84
84
|
"react": "~19.2.7",
|
|
85
85
|
"react-dom": "~19.2.7",
|
|
86
|
-
"vite": "^8.
|
|
87
|
-
"@dxos/plugin-testing": "0.
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/ui-theme": "0.
|
|
86
|
+
"vite": "^8.1.4",
|
|
87
|
+
"@dxos/plugin-testing": "0.11.0",
|
|
88
|
+
"@dxos/react-ui": "0.11.0",
|
|
89
|
+
"@dxos/storybook-utils": "0.11.0",
|
|
90
|
+
"@dxos/ui-theme": "0.11.0"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"effect": "3.21.4",
|
|
94
94
|
"react": "~19.2.7",
|
|
95
95
|
"react-dom": "~19.2.7",
|
|
96
|
-
"@dxos/react-ui": "0.
|
|
97
|
-
"@dxos/ui-theme": "0.
|
|
96
|
+
"@dxos/react-ui": "^0.11.0",
|
|
97
|
+
"@dxos/ui-theme": "^0.11.0"
|
|
98
98
|
},
|
|
99
99
|
"publishConfig": {
|
|
100
100
|
"access": "public"
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React from 'react';
|
|
7
6
|
|
|
8
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
8
|
import { Surface } from '@dxos/app-framework/ui';
|
|
@@ -19,9 +18,8 @@ export default Capability.makeModule(() =>
|
|
|
19
18
|
Surface.create({
|
|
20
19
|
id: 'root',
|
|
21
20
|
filter: AppSurface.object(AppSurface.Article, Template.Data),
|
|
22
|
-
component:
|
|
23
|
-
|
|
24
|
-
),
|
|
21
|
+
component: TemplatePanel,
|
|
22
|
+
props: ({ role, data: { subject, attendableId } }) => ({ role, subject, attendableId }),
|
|
25
23
|
}),
|
|
26
24
|
),
|
|
27
25
|
),
|
|
@@ -12,7 +12,7 @@ export type TemplatePanelProps = AppSurface.ObjectArticleProps<Obj.Unknown>;
|
|
|
12
12
|
|
|
13
13
|
export const TemplatePanel = ({ role, subject: object, attendableId: _attendableId }: TemplatePanelProps) => {
|
|
14
14
|
return (
|
|
15
|
-
<Panel.Root role={role}
|
|
15
|
+
<Panel.Root role={role} classNames='dx-document'>
|
|
16
16
|
<Panel.Content>
|
|
17
17
|
<span>{Obj.getURI(object)}</span>
|
|
18
18
|
</Panel.Content>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/TemplatePlugin.tsx
|
|
2
|
-
import { Plugin } from "@dxos/app-framework";
|
|
3
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
4
|
-
import { CreateObject, ReactSurface } from "#capabilities";
|
|
5
|
-
import { meta } from "#meta";
|
|
6
|
-
import { translations } from "#translations";
|
|
7
|
-
import { Template } from "#types";
|
|
8
|
-
var TemplatePlugin = Plugin.define(meta).pipe(AppPlugin.addCreateObjectModule({
|
|
9
|
-
activate: CreateObject
|
|
10
|
-
}), AppPlugin.addSchemaModule({
|
|
11
|
-
schema: [
|
|
12
|
-
Template.Data
|
|
13
|
-
]
|
|
14
|
-
}), AppPlugin.addSurfaceModule({
|
|
15
|
-
activate: ReactSurface
|
|
16
|
-
}), AppPlugin.addTranslationsModule({
|
|
17
|
-
translations
|
|
18
|
-
}), Plugin.make);
|
|
19
|
-
var TemplatePlugin_default = TemplatePlugin;
|
|
20
|
-
export {
|
|
21
|
-
TemplatePlugin,
|
|
22
|
-
TemplatePlugin_default as default
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=TemplatePlugin.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/TemplatePlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Template } from '#types';\n\nexport const TemplatePlugin = Plugin.define(meta).pipe(\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Template.Data] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default TemplatePlugin;\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,cAAcC,oBAAoB;AAC3C,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AAElB,IAAMC,iBAAiBP,OAAOQ,OAAOJ,IAAAA,EAAMK,KAChDR,UAAUS,sBAAsB;EAAEC,UAAUT;AAAa,CAAA,GACzDD,UAAUW,gBAAgB;EAAEC,QAAQ;IAACP,SAASQ;;AAAM,CAAA,GACpDb,UAAUc,iBAAiB;EAAEJ,UAAUR;AAAa,CAAA,GACpDF,UAAUe,sBAAsB;EAAEX;AAAa,CAAA,GAC/CL,OAAOiB,IAAI;AAGb,IAAA,yBAAeV;",
|
|
6
|
-
"names": ["Plugin", "AppPlugin", "CreateObject", "ReactSurface", "meta", "translations", "Template", "TemplatePlugin", "define", "pipe", "addCreateObjectModule", "activate", "addSchemaModule", "schema", "Data", "addSurfaceModule", "addTranslationsModule", "make"]
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// src/capabilities/index.ts
|
|
2
|
-
import { Capability } from "@dxos/app-framework";
|
|
3
|
-
var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-2ARJFAMW.mjs"));
|
|
4
|
-
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-SYA2674P.mjs"));
|
|
5
|
-
export {
|
|
6
|
-
CreateObject,
|
|
7
|
-
ReactSurface
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,kBAAkB;AAEpB,IAAMC,eAAeD,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
-
"names": ["Capability", "CreateObject", "lazy", "ReactSurface"]
|
|
7
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { Plugin } from "@dxos/app-framework";
|
|
3
|
-
|
|
4
|
-
// dx.config.ts
|
|
5
|
-
import { Config2 } from "@dxos/app-framework/config";
|
|
6
|
-
import { trim } from "@dxos/util";
|
|
7
|
-
var dx_config_default = Config2.make({
|
|
8
|
-
plugin: {
|
|
9
|
-
key: "org.dxos.plugin.template",
|
|
10
|
-
name: "Template",
|
|
11
|
-
author: "DXOS",
|
|
12
|
-
description: trim`
|
|
13
|
-
Create reusable templates for documents, tables, and other objects.
|
|
14
|
-
Define structured patterns that can be quickly instantiated with pre-configured content and settings.
|
|
15
|
-
`,
|
|
16
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template",
|
|
17
|
-
icon: {
|
|
18
|
-
key: "ph--asterisk--regular",
|
|
19
|
-
hue: "sky"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
// src/meta.ts
|
|
25
|
-
var meta = Plugin.getMetaFromConfig(dx_config_default);
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
meta
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=chunk-4LTYW26S.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.template',\n name: 'Template',\n author: 'DXOS',\n description: trim`\n Create reusable templates for documents, tables, and other objects.\n Define structured patterns that can be quickly instantiated with pre-configured content and settings.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',\n icon: { key: 'ph--asterisk--regular', hue: 'sky' },\n },\n});\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;IAIbO,QAAQ;IACRC,MAAM;MAAEL,KAAK;MAAyBM,KAAK;IAAM;EACnD;AACF,CAAA;;;ADXO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
|
|
6
|
-
"names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "source", "icon", "hue", "meta", "Plugin", "getMetaFromConfig", "config"]
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/types/schema.ts
|
|
2
|
-
import * as Schema from "effect/Schema";
|
|
3
|
-
import { Annotation, DXN, Obj, Type } from "@dxos/echo";
|
|
4
|
-
(function(Template2) {
|
|
5
|
-
class Data extends Type.makeObject(DXN.make("org.dxos.type.data", "0.1.0"))(Schema.Struct({
|
|
6
|
-
name: Schema.optional(Schema.String)
|
|
7
|
-
}).pipe(Annotation.IconAnnotation.set({
|
|
8
|
-
icon: "ph--asterisk--regular",
|
|
9
|
-
hue: "sky"
|
|
10
|
-
}))) {
|
|
11
|
-
}
|
|
12
|
-
Template2.Data = Data;
|
|
13
|
-
Template2.make = (props) => Obj.make(Data, props);
|
|
14
|
-
})(Template || (Template = {}));
|
|
15
|
-
var Template;
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
Template
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=chunk-NZ3DSXJY.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/schema.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, DXN, Obj, Type } from '@dxos/echo';\n\nexport namespace Template {\n export class Data extends Type.makeObject<Data>(DXN.make('org.dxos.type.data', '0.1.0'))(\n Schema.Struct({\n name: Schema.optional(Schema.String),\n }).pipe(Annotation.IconAnnotation.set({ icon: 'ph--asterisk--regular', hue: 'sky' })),\n ) {}\n\n export const make = (props: Partial<Data>) => Obj.make(Data, props);\n}\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;UAE1BC,WAAAA;EACR,MAAMC,aAAaF,KAAKG,WAAiBL,IAAIM,KAAK,sBAAsB,OAAA,CAAA,EACtEC,cAAO;IACZC,MAAaC,gBAAgBC,aAAM;EACrC,CAAA,EAAGC,KAAKZ,WAAWa,eAAeC,IAAI;IAAEC,MAAM;IAAyBC,KAAK;EAAM,CAAA,CAAA,CAAA,EAAA;EACjF;YAJUX,OAAAA;YAMAE,OAAO,CAACU,UAAyBf,IAAIK,KAAKF,MAAMY,KAAAA;AAC/D,GARiBb,aAAAA,WAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "Annotation", "DXN", "Obj", "Type", "Template", "Data", "makeObject", "make", "Struct", "name", "optional", "String", "pipe", "IconAnnotation", "set", "icon", "hue", "props"]
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/components/TemplatePanel/TemplatePanel.tsx
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Obj } from "@dxos/echo";
|
|
4
|
-
import { Panel } from "@dxos/react-ui";
|
|
5
|
-
var TemplatePanel = ({ role, subject: object, attendableId: _attendableId }) => {
|
|
6
|
-
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
7
|
-
role,
|
|
8
|
-
className: "dx-document"
|
|
9
|
-
}, /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement("span", null, Obj.getURI(object))));
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
TemplatePanel
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/TemplatePanel/TemplatePanel.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { Panel } from '@dxos/react-ui';\n\nexport type TemplatePanelProps = AppSurface.ObjectArticleProps<Obj.Unknown>;\n\nexport const TemplatePanel = ({ role, subject: object, attendableId: _attendableId }: TemplatePanelProps) => {\n return (\n <Panel.Root role={role} className='dx-document'>\n <Panel.Content>\n <span>{Obj.getURI(object)}</span>\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,OAAOA,WAAW;AAGlB,SAASC,WAAW;AACpB,SAASC,aAAa;AAIf,IAAMC,gBAAgB,CAAC,EAAEC,MAAMC,SAASC,QAAQC,cAAcC,cAAa,MAAsB;AACtG,SACE,sBAAA,cAACN,MAAMO,MAAI;IAACL;IAAYM,WAAU;KAChC,sBAAA,cAACR,MAAMS,SAAO,MACZ,sBAAA,cAACC,QAAAA,MAAMX,IAAIY,OAAOP,MAAAA,CAAAA,CAAAA,CAAAA;AAI1B;",
|
|
6
|
-
"names": ["React", "Obj", "Panel", "TemplatePanel", "role", "subject", "object", "attendableId", "_attendableId", "Root", "className", "Content", "span", "getURI"]
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// src/capabilities/create-object.ts
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import { Capability } from "@dxos/app-framework";
|
|
4
|
-
import { Operation } from "@dxos/compute";
|
|
5
|
-
import { Type } from "@dxos/echo";
|
|
6
|
-
import { SpaceOperation } from "@dxos/plugin-space";
|
|
7
|
-
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
8
|
-
import { Template } from "#types";
|
|
9
|
-
var create_object_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
10
|
-
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
11
|
-
id: Type.getTypename(Template.Data),
|
|
12
|
-
createObject: (props, options) => Effect.gen(function* () {
|
|
13
|
-
const object = Template.make(props);
|
|
14
|
-
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
15
|
-
object,
|
|
16
|
-
target: options.target,
|
|
17
|
-
targetNodeId: options.targetNodeId
|
|
18
|
-
});
|
|
19
|
-
})
|
|
20
|
-
});
|
|
21
|
-
}));
|
|
22
|
-
export {
|
|
23
|
-
create_object_default as default
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=create-object-2ARJFAMW.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/create-object.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\n\nimport { Template } from '#types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(Template.Data),\n createObject: (props, options) =>\n Effect.gen(function* () {\n const object = Template.make(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n targetNodeId: options.targetNodeId,\n });\n }),\n });\n }),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAElC,SAASC,gBAAgB;AAEzB,IAAA,wBAAeL,WAAWM,WACjBC,kBAAW,aAAA;AAChB,SAAOP,WAAWQ,YAAYJ,kBAAkBK,mBAAmB;IACjEC,IAAIR,KAAKS,YAAYN,SAASO,IAAI;IAClCC,cAAc,CAACC,OAAOC,YACbC,WAAI,aAAA;AACT,YAAMC,SAASZ,SAASa,KAAKJ,KAAAA;AAC7B,aAAO,OAAOb,UAAUkB,OAAOhB,eAAeiB,WAAW;QACvDH;QACAI,QAAQN,QAAQM;QAChBC,cAAcP,QAAQO;MACxB,CAAA;IACF,CAAA;EACJ,CAAA;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "Operation", "Type", "SpaceOperation", "SpaceCapabilities", "Template", "makeModule", "fnUntraced", "contributes", "CreateObjectEntry", "id", "getTypename", "Data", "createObject", "props", "options", "gen", "object", "make", "invoke", "AddObject", "target", "targetNodeId"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"dx.config.ts":{"bytes":2140,"imports":[{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":799,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dx.config.ts","kind":"import-statement","original":"../dx.config"}],"format":"esm"},"src/types/schema.ts":{"bytes":2144,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":370,"imports":[{"path":"src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"src/index.ts":{"bytes":449,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/TemplatePlugin.tsx":{"bytes":2666,"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/capabilities/create-object.ts":{"bytes":3428,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3047,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1130,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/create-object.ts","kind":"dynamic-import","original":"./create-object"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/components/TemplatePanel/TemplatePanel.tsx":{"bytes":2022,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/components/TemplatePanel/index.ts":{"bytes":389,"imports":[{"path":"src/components/TemplatePanel/TemplatePanel.tsx","kind":"import-statement","original":"./TemplatePanel"}],"format":"esm"},"src/components/index.ts":{"bytes":389,"imports":[{"path":"src/components/TemplatePanel/index.ts","kind":"import-statement","original":"./TemplatePanel"}],"format":"esm"},"src/plugin.ts":{"bytes":865,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/translations.ts":{"bytes":2803,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/create-object-2ARJFAMW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1796},"dist/lib/neutral/create-object-2ARJFAMW.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/create-object.ts","inputs":{"src/capabilities/create-object.ts":{"bytesInOutput":799}},"bytes":935},"dist/lib/neutral/react-surface-SYA2674P.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1589},"dist/lib/neutral/react-surface-SYA2674P.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":700}},"bytes":837},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-4LTYW26S.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-NZ3DSXJY.mjs","kind":"import-statement"}],"exports":["Template","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":164},"dist/lib/neutral/TemplatePlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1409},"dist/lib/neutral/TemplatePlugin.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":["TemplatePlugin","default"],"entryPoint":"src/TemplatePlugin.tsx","inputs":{"src/TemplatePlugin.tsx":{"bytesInOutput":609}},"bytes":745},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":600},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/create-object-2ARJFAMW.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-SYA2674P.mjs","kind":"dynamic-import"}],"exports":["CreateObject","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":248}},"bytes":355},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1153},"dist/lib/neutral/components/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["TemplatePanel"],"entryPoint":"src/components/index.ts","inputs":{"src/components/TemplatePanel/TemplatePanel.tsx":{"bytesInOutput":419},"src/components/TemplatePanel/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0}},"bytes":532},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-4LTYW26S.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":100},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":445},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-4LTYW26S.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["TemplatePlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":111}},"bytes":241},"dist/lib/neutral/chunk-4LTYW26S.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1362},"dist/lib/neutral/chunk-4LTYW26S.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":102},"dx.config.ts":{"bytesInOutput":597}},"bytes":811},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1370},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":690}},"bytes":782},"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-NZ3DSXJY.mjs","kind":"import-statement"}],"exports":["Template"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":110},"dist/lib/neutral/chunk-NZ3DSXJY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1167},"dist/lib/neutral/chunk-NZ3DSXJY.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["Template"],"inputs":{"src/types/schema.ts":{"bytesInOutput":486},"src/types/index.ts":{"bytesInOutput":0}},"bytes":577}}}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugin.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const TemplatePlugin = Plugin.lazy(meta, () => import('#plugin'));\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAc;AAIhB,IAAMC,iBAAiBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
|
|
6
|
-
"names": ["Plugin", "TemplatePlugin", "Plugin", "lazy", "meta"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\n\nimport { TemplatePanel } from '#components';\nimport { Template } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Capabilities.ReactSurface,\n Surface.create({\n id: 'root',\n filter: AppSurface.object(AppSurface.Article, Template.Data),\n component: ({ data, role }) => (\n <TemplatePanel role={role} subject={data.subject} attendableId={data.attendableId} />\n ),\n }),\n ),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAE3B,SAASC,qBAAqB;AAC9B,SAASC,gBAAgB;AAEzB,IAAA,wBAAeJ,WAAWK,WAAW,MAC5BC,eACLN,WAAWO,YACTR,aAAaS,cACbP,QAAQQ,OAAO;EACbC,IAAI;EACJC,QAAQT,WAAWU,OAAOV,WAAWW,SAAST,SAASU,IAAI;EAC3DC,WAAW,CAAC,EAAEC,MAAMC,KAAI,MACtB,sBAAA,cAACd,eAAAA;IAAcc;IAAYC,SAASF,KAAKE;IAASC,cAAcH,KAAKG;;AAEzE,CAAA,CAAA,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "TemplatePanel", "Template", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "filter", "object", "Article", "Data", "component", "data", "role", "subject", "attendableId"]
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// src/translations.ts
|
|
2
|
-
import { Type } from "@dxos/echo";
|
|
3
|
-
import { meta } from "#meta";
|
|
4
|
-
import { Template } from "#types";
|
|
5
|
-
var translations = [
|
|
6
|
-
{
|
|
7
|
-
"en-US": {
|
|
8
|
-
[Type.getTypename(Template.Data)]: {
|
|
9
|
-
"typename.label": "Template",
|
|
10
|
-
"typename.label_zero": "Templates",
|
|
11
|
-
"typename.label_one": "Template",
|
|
12
|
-
"typename.label_other": "Templates",
|
|
13
|
-
"object-name.placeholder": "New template",
|
|
14
|
-
"add-object.label": "Add template",
|
|
15
|
-
"rename-object.label": "Rename template",
|
|
16
|
-
"delete-object.label": "Delete template",
|
|
17
|
-
"object-deleted.label": "Template deleted"
|
|
18
|
-
},
|
|
19
|
-
[meta.profile.key]: {
|
|
20
|
-
"plugin.name": "Template"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
];
|
|
25
|
-
export {
|
|
26
|
-
translations
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=translations.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Type } from '@dxos/echo';\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\nimport { Template } from '#types';\n\nexport const translations = [\n {\n 'en-US': {\n [Type.getTypename(Template.Data)]: {\n 'typename.label': 'Template',\n 'typename.label_zero': 'Templates',\n 'typename.label_one': 'Template',\n 'typename.label_other': 'Templates',\n 'object-name.placeholder': 'New template',\n 'add-object.label': 'Add template',\n 'rename-object.label': 'Rename template',\n 'delete-object.label': 'Delete template',\n 'object-deleted.label': 'Template deleted',\n },\n [meta.profile.key]: {\n 'plugin.name': 'Template',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,YAAY;AAGrB,SAASC,YAAY;AACrB,SAASC,gBAAgB;AAElB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACH,KAAKI,YAAYF,SAASG,IAAI,CAAA,GAAI;QACjC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACJ,KAAKK,QAAQC,GAAG,GAAG;QAClB,eAAe;MACjB;IACF;EACF;;",
|
|
6
|
-
"names": ["Type", "meta", "Template", "translations", "getTypename", "Data", "profile", "key"]
|
|
7
|
-
}
|