@dxos/plugin-template 0.9.0 → 0.9.1-staging.ee54ba693a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/lib/neutral/capabilities/index.mjs +1 -1
  2. package/dist/lib/neutral/chunk-4LTYW26S.mjs +30 -0
  3. package/dist/lib/neutral/chunk-4LTYW26S.mjs.map +7 -0
  4. package/dist/lib/neutral/{chunk-XVITFXCJ.mjs → chunk-NZ3DSXJY.mjs} +7 -5
  5. package/dist/lib/neutral/chunk-NZ3DSXJY.mjs.map +7 -0
  6. package/dist/lib/neutral/{create-object-K2JXEGV4.mjs → create-object-2ARJFAMW.mjs} +1 -2
  7. package/dist/lib/neutral/{create-object-K2JXEGV4.mjs.map → create-object-2ARJFAMW.mjs.map} +3 -3
  8. package/dist/lib/neutral/index.mjs +2 -2
  9. package/dist/lib/neutral/meta.json +1 -1
  10. package/dist/lib/neutral/meta.mjs +1 -1
  11. package/dist/lib/neutral/plugin.mjs +1 -1
  12. package/dist/lib/neutral/translations.mjs +1 -1
  13. package/dist/lib/neutral/translations.mjs.map +3 -3
  14. package/dist/lib/neutral/types/index.mjs +1 -1
  15. package/dist/types/dx.config.d.ts +28 -0
  16. package/dist/types/dx.config.d.ts.map +1 -0
  17. package/dist/types/src/capabilities/create-object.d.ts +1 -7
  18. package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
  19. package/dist/types/src/capabilities/index.d.ts +2 -7
  20. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  21. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  22. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  23. package/dist/types/src/meta.d.ts +32 -2
  24. package/dist/types/src/meta.d.ts.map +1 -1
  25. package/dist/types/src/types/schema.d.ts +6 -7
  26. package/dist/types/src/types/schema.d.ts.map +1 -1
  27. package/dist/types/tsconfig.tsbuildinfo +1 -1
  28. package/dx.config.ts +20 -0
  29. package/package.json +23 -22
  30. package/src/TemplatePlugin.test.ts +1 -1
  31. package/src/capabilities/create-object.ts +0 -1
  32. package/src/meta.ts +3 -14
  33. package/src/translations.ts +1 -1
  34. package/src/types/schema.ts +6 -9
  35. package/dist/lib/neutral/chunk-7RN2XYO6.mjs +0 -21
  36. package/dist/lib/neutral/chunk-7RN2XYO6.mjs.map +0 -7
  37. package/dist/lib/neutral/chunk-XVITFXCJ.mjs.map +0 -7
package/dx.config.ts ADDED
@@ -0,0 +1,20 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Config2 } from '@dxos/app-framework/config';
6
+ import { trim } from '@dxos/util';
7
+
8
+ export default Config2.make({
9
+ plugin: {
10
+ key: 'org.dxos.plugin.template',
11
+ name: 'Template',
12
+ author: 'DXOS',
13
+ description: trim`
14
+ Create reusable templates for documents, tables, and other objects.
15
+ Define structured patterns that can be quickly instantiated with pre-configured content and settings.
16
+ `,
17
+ source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',
18
+ icon: { key: 'ph--asterisk--regular', hue: 'sky' },
19
+ },
20
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-template",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-staging.ee54ba693a",
4
4
  "description": "Template for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -64,36 +64,37 @@
64
64
  "types": "dist/types/src/index.d.ts",
65
65
  "files": [
66
66
  "dist",
67
+ "dx.config.ts",
67
68
  "src"
68
69
  ],
69
70
  "dependencies": {
70
- "effect": "3.21.3",
71
- "@dxos/app-framework": "0.9.0",
72
- "@dxos/plugin-client": "0.9.0",
73
- "@dxos/compute": "0.9.0",
74
- "@dxos/plugin-space": "0.9.0",
75
- "@dxos/echo": "0.9.0",
76
- "@dxos/util": "0.9.0",
77
- "@dxos/keys": "0.9.0",
78
- "@dxos/app-toolkit": "0.9.0"
71
+ "effect": "3.21.4",
72
+ "@dxos/app-toolkit": "0.9.1-staging.ee54ba693a",
73
+ "@dxos/compute": "0.9.1-staging.ee54ba693a",
74
+ "@dxos/app-framework": "0.9.1-staging.ee54ba693a",
75
+ "@dxos/echo": "0.9.1-staging.ee54ba693a",
76
+ "@dxos/plugin-client": "0.9.1-staging.ee54ba693a",
77
+ "@dxos/util": "0.9.1-staging.ee54ba693a",
78
+ "@dxos/plugin-space": "0.9.1-staging.ee54ba693a",
79
+ "@dxos/keys": "0.9.1-staging.ee54ba693a"
79
80
  },
80
81
  "devDependencies": {
81
- "@types/react": "~19.2.7",
82
+ "@types/react": "~19.2.17",
82
83
  "@types/react-dom": "~19.2.3",
83
- "react": "~19.2.3",
84
- "react-dom": "~19.2.3",
84
+ "react": "~19.2.7",
85
+ "react-dom": "~19.2.7",
85
86
  "vite": "^8.0.16",
86
- "@dxos/storybook-utils": "0.9.0",
87
- "@dxos/react-ui": "0.9.0",
88
- "@dxos/ui-theme": "0.9.0",
89
- "@dxos/plugin-testing": "0.9.0"
87
+ "@dxos/plugin-testing": "0.9.1-staging.ee54ba693a",
88
+ "@dxos/storybook-utils": "0.9.1-staging.ee54ba693a",
89
+ "@dxos/react-ui": "0.9.1-staging.ee54ba693a",
90
+ "@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
90
91
  },
91
92
  "peerDependencies": {
92
- "effect": "3.21.3",
93
- "react": "~19.2.3",
94
- "react-dom": "~19.2.3",
95
- "@dxos/ui-theme": "0.9.0",
96
- "@dxos/react-ui": "0.9.0"
93
+ "effect": "3.21.4",
94
+ "react": "~19.2.7",
95
+ "react-dom": "~19.2.7",
96
+ "@dxos/react-ui": "0.9.1-staging.ee54ba693a",
97
+ "@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
97
98
  },
98
99
  "publishConfig": {
99
100
  "access": "public"
@@ -11,7 +11,7 @@ import { TemplatePlugin } from '#plugin';
11
11
 
12
12
  import { meta } from './meta';
13
13
 
14
- const moduleId = (name: string) => `${meta.id}.module.${name}`;
14
+ const moduleId = (name: string) => `${meta.profile.key}.module.${name}`;
15
15
 
16
16
  describe('TemplatePlugin', () => {
17
17
  test('modules activate on the expected events', async ({ expect }) => {
@@ -22,7 +22,6 @@ export default Capability.makeModule(
22
22
  return yield* Operation.invoke(SpaceOperation.AddObject, {
23
23
  object,
24
24
  target: options.target,
25
- hidden: true,
26
25
  targetNodeId: options.targetNodeId,
27
26
  });
28
27
  }),
package/src/meta.ts CHANGED
@@ -3,18 +3,7 @@
3
3
  //
4
4
 
5
5
  import { Plugin } from '@dxos/app-framework';
6
- import { DXN } from '@dxos/keys';
7
- import { trim } from '@dxos/util';
8
6
 
9
- export const meta = Plugin.makeMeta({
10
- key: DXN.make('org.dxos.plugin.template'),
11
- name: 'Template',
12
- author: 'DXOS',
13
- description: trim`
14
- Create reusable templates for documents, tables, and other objects.
15
- Define structured patterns that can be quickly instantiated with pre-configured content and settings.
16
- `,
17
- icon: 'ph--asterisk--regular',
18
- iconHue: 'sky',
19
- source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',
20
- });
7
+ import config from '../dx.config';
8
+
9
+ export const meta = Plugin.getMetaFromConfig(config);
@@ -22,7 +22,7 @@ export const translations = [
22
22
  'delete-object.label': 'Delete template',
23
23
  'object-deleted.label': 'Template deleted',
24
24
  },
25
- [meta.id]: {
25
+ [meta.profile.key]: {
26
26
  'plugin.name': 'Template',
27
27
  },
28
28
  },
@@ -4,17 +4,14 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { DXN, Annotation, Obj, Type } from '@dxos/echo';
7
+ import { Annotation, DXN, Obj, Type } from '@dxos/echo';
8
8
 
9
9
  export namespace Template {
10
- export const Data = Schema.Struct({
11
- name: Schema.optional(Schema.String),
12
- }).pipe(
13
- Annotation.IconAnnotation.set({ icon: 'ph--asterisk--regular', hue: 'sky' }),
14
- Type.makeObject(DXN.make('org.dxos.type.data', '0.1.0')),
15
- );
16
-
17
- export type Data = Type.InstanceType<typeof Data>;
10
+ export class Data extends Type.makeObject<Data>(DXN.make('org.dxos.type.data', '0.1.0'))(
11
+ Schema.Struct({
12
+ name: Schema.optional(Schema.String),
13
+ }).pipe(Annotation.IconAnnotation.set({ icon: 'ph--asterisk--regular', hue: 'sky' })),
14
+ ) {}
18
15
 
19
16
  export const make = (props: Partial<Data>) => Obj.make(Data, props);
20
17
  }
@@ -1,21 +0,0 @@
1
- // src/meta.ts
2
- import { Plugin } from "@dxos/app-framework";
3
- import { DXN } from "@dxos/keys";
4
- import { trim } from "@dxos/util";
5
- var meta = Plugin.makeMeta({
6
- key: DXN.make("org.dxos.plugin.template"),
7
- name: "Template",
8
- author: "DXOS",
9
- description: trim`
10
- Create reusable templates for documents, tables, and other objects.
11
- Define structured patterns that can be quickly instantiated with pre-configured content and settings.
12
- `,
13
- icon: "ph--asterisk--regular",
14
- iconHue: "sky",
15
- source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template"
16
- });
17
-
18
- export {
19
- meta
20
- };
21
- //# sourceMappingURL=chunk-7RN2XYO6.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('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 icon: 'ph--asterisk--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',\n});\n"],
5
- "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,0BAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;EAIbQ,MAAM;EACNC,SAAS;EACTC,QAAQ;AACV,CAAA;",
6
- "names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source"]
7
- }
@@ -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 { DXN, Annotation, Obj, Type } from '@dxos/echo';\n\nexport namespace Template {\n export const Data = Schema.Struct({\n name: Schema.optional(Schema.String),\n }).pipe(\n Annotation.IconAnnotation.set({ icon: 'ph--asterisk--regular', hue: 'sky' }),\n Type.makeObject(DXN.make('org.dxos.type.data', '0.1.0')),\n );\n\n export type Data = Type.InstanceType<typeof Data>;\n\n export const make = (props: Partial<Data>) => Obj.make(Data, props);\n}\n"],
5
- "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,YAAYC,KAAKC,YAAY;UAE1BC,WAAAA;YACFC,OAAcC,cAAO;IAChCC,MAAaC,gBAAgBC,aAAM;EACrC,CAAA,EAAGC,KACDT,WAAWU,eAAeC,IAAI;IAAEC,MAAM;IAAyBC,KAAK;EAAM,CAAA,GAC1EX,KAAKY,WAAWf,IAAIgB,KAAK,sBAAsB,OAAA,CAAA,CAAA;YAKpCA,OAAO,CAACC,UAAyBf,IAAIc,KAAIZ,UAACC,MAAMY,KAAAA;AAC/D,GAXiBb,aAAAA,WAAAA,CAAAA,EAAAA;;",
6
- "names": ["Schema", "DXN", "Annotation", "Obj", "Type", "Template", "Data", "Struct", "name", "optional", "String", "pipe", "IconAnnotation", "set", "icon", "hue", "makeObject", "make", "props"]
7
- }