@dxos/plugin-template 0.8.4-main.406dc2a → 0.8.4-main.548089c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-template",
3
- "version": "0.8.4-main.406dc2a",
3
+ "version": "0.8.4-main.548089c",
4
4
  "description": "Template for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -36,31 +36,32 @@
36
36
  "@preact-signals/safe-react": "^0.9.0",
37
37
  "@preact/signals-core": "^1.12.1",
38
38
  "effect": "3.18.3",
39
- "@dxos/app-framework": "0.8.4-main.406dc2a",
40
- "@dxos/async": "0.8.4-main.406dc2a",
41
- "@dxos/echo": "0.8.4-main.406dc2a",
42
- "@dxos/plugin-client": "0.8.4-main.406dc2a",
43
- "@dxos/plugin-graph": "0.8.4-main.406dc2a",
44
- "@dxos/plugin-space": "0.8.4-main.406dc2a",
45
- "@dxos/react-ui-stack": "0.8.4-main.406dc2a",
46
- "@dxos/react-client": "0.8.4-main.406dc2a"
39
+ "@dxos/async": "0.8.4-main.548089c",
40
+ "@dxos/app-framework": "0.8.4-main.548089c",
41
+ "@dxos/echo": "0.8.4-main.548089c",
42
+ "@dxos/plugin-space": "0.8.4-main.548089c",
43
+ "@dxos/plugin-client": "0.8.4-main.548089c",
44
+ "@dxos/plugin-graph": "0.8.4-main.548089c",
45
+ "@dxos/react-ui-stack": "0.8.4-main.548089c",
46
+ "@dxos/util": "0.8.4-main.548089c",
47
+ "@dxos/react-client": "0.8.4-main.548089c"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/react": "~19.2.2",
50
- "@types/react-dom": "~19.2.1",
51
+ "@types/react-dom": "~19.2.2",
51
52
  "react": "~19.2.0",
52
53
  "react-dom": "~19.2.0",
53
54
  "vite": "7.1.9",
54
- "@dxos/react-ui": "0.8.4-main.406dc2a",
55
- "@dxos/storybook-utils": "0.8.4-main.406dc2a",
56
- "@dxos/react-ui-theme": "0.8.4-main.406dc2a"
55
+ "@dxos/react-ui": "0.8.4-main.548089c",
56
+ "@dxos/react-ui-theme": "0.8.4-main.548089c",
57
+ "@dxos/storybook-utils": "0.8.4-main.548089c"
57
58
  },
58
59
  "peerDependencies": {
59
60
  "effect": "^3.13.3",
60
61
  "react": "^19.0.0",
61
62
  "react-dom": "^19.0.0",
62
- "@dxos/react-ui-theme": "0.8.4-main.406dc2a",
63
- "@dxos/react-ui": "0.8.4-main.406dc2a"
63
+ "@dxos/react-ui": "0.8.4-main.548089c",
64
+ "@dxos/react-ui-theme": "0.8.4-main.548089c"
64
65
  },
65
66
  "publishConfig": {
66
67
  "access": "public"
@@ -26,6 +26,7 @@ export const TemplatePlugin = definePlugin(meta, () => [
26
26
  id: Template.Data.typename,
27
27
  metadata: {
28
28
  icon: 'ph--asterisk--regular',
29
+ iconHue: 'sky',
29
30
  },
30
31
  }),
31
32
  }),
@@ -4,15 +4,14 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { type Obj } from '@dxos/echo';
8
- import { fullyQualifiedId } from '@dxos/react-client/echo';
7
+ import { Obj } from '@dxos/echo';
9
8
  import { StackItem } from '@dxos/react-ui-stack';
10
9
 
11
10
  export const TemplateContainer = ({ object }: { object: Obj.Any; role: string }) => {
12
11
  return (
13
12
  <StackItem.Content>
14
13
  <pre className='m-4 p-2 ring'>
15
- <span>{fullyQualifiedId(object)}</span>
14
+ <span>{Obj.getDXN(object).toString()}</span>
16
15
  </pre>
17
16
  </StackItem.Content>
18
17
  );
package/src/meta.ts CHANGED
@@ -3,10 +3,16 @@
3
3
  //
4
4
 
5
5
  import { type PluginMeta } from '@dxos/app-framework';
6
+ import { trim } from '@dxos/util';
6
7
 
7
8
  export const meta: PluginMeta = {
8
9
  id: 'dxos.org/plugin/template',
9
10
  name: 'Template',
11
+ description: trim`
12
+ Create reusable templates for documents, tables, and other objects.
13
+ Define structured patterns that can be quickly instantiated with pre-configured content and settings.
14
+ `,
10
15
  icon: 'ph--asterisk--regular',
16
+ iconHue: 'sky',
11
17
  source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',
12
18
  };
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/schema.ts", "../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj } from '@dxos/echo';\nimport { TypedObject } from '@dxos/echo/internal';\nimport { ReactiveObjectSchema } from '@dxos/react-client/echo';\n\nimport { meta } from '../meta';\n\nexport namespace Template {\n export class Create extends Schema.TaggedClass<Create>()(`${meta.id}/action/create`, {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: ReactiveObjectSchema,\n }),\n }) {}\n\n export class Data extends TypedObject({\n typename: 'dxos.org/type/Data',\n version: '0.1.0',\n })({\n name: Schema.optional(Schema.String),\n }) {}\n\n export const make = (props: Partial<Data>) => Obj.make(Data, props);\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const meta: PluginMeta = {\n id: 'dxos.org/plugin/template',\n name: 'Template',\n icon: 'ph--asterisk--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',\n};\n"],
5
- "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,WAAW;AACpB,SAASC,mBAAmB;AAC5B,SAASC,4BAA4B;;;ACF9B,IAAMC,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;;;UDCiBC,WAAAA;EACR,MAAMC,eAAsBC,mBAAW,EAAW,GAAGC,KAAKC,EAAE,kBAAkB;IACnFC,OAAcC,cAAO;MACnBC,MAAaC,gBAAgBC,aAAM;IACrC,CAAA;IACAC,QAAeJ,cAAO;MACpBK,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;YAPSX,SAAAA;EASN,MAAMY,aAAaC,YAAY;IACpCC,UAAU;IACVC,SAAS;EACX,CAAA,EAAG;IACDT,MAAaC,gBAAgBC,aAAM;EACrC,CAAA,EAAA;EAAI;YALSI,OAAAA;YAOAI,OAAO,CAACC,UAAyBC,IAAIF,KAAKJ,MAAMK,KAAAA;AAC/D,GAlBiBlB,aAAAA,WAAAA,CAAAA,EAAAA;;",
6
- "names": ["Schema", "Obj", "TypedObject", "ReactiveObjectSchema", "meta", "id", "name", "icon", "source", "Template", "Create", "TaggedClass", "meta", "id", "input", "Struct", "name", "optional", "String", "output", "object", "ReactiveObjectSchema", "Data", "TypedObject", "typename", "version", "make", "props", "Obj"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/TemplateContainer.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { TemplateContainer } from '../components';\nimport { meta } from '../meta';\nimport { Template } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: meta.id,\n role: 'article',\n filter: (data): data is { subject: Obj.Any } => Obj.instanceOf(Template.Data, data.subject),\n component: ({ data, role }) => <TemplateContainer role={role} object={data.subject} />,\n }),\n );\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Obj } from '@dxos/echo';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nexport const TemplateContainer = ({ object }: { object: Obj.Any; role: string }) => {\n return (\n <StackItem.Content>\n <pre className='m-4 p-2 ring'>\n <span>{fullyQualifiedId(object)}</span>\n </pre>\n </StackItem.Content>\n );\n};\n"],
5
- "mappings": ";;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;;;;ACHpB,OAAOC,WAAW;AAGlB,SAASC,wBAAwB;AACjC,SAASC,iBAAiB;AAEnB,IAAMC,oBAAoB,CAAC,EAAEC,OAAM,MAAqC;;;AAC7E,WACE,sBAAA,cAACC,UAAUC,SAAO,MAChB,sBAAA,cAACC,OAAAA;MAAIC,WAAU;OACb,sBAAA,cAACC,QAAAA,MAAMC,iBAAiBN,MAAAA,CAAAA,CAAAA,CAAAA;;;;AAIhC;;;ADLA,IAAA,yBAAe,MACbO,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAIC,KAAKD;EACTE,MAAM;EACNC,QAAQ,CAACC,SAAuCC,IAAIC,WAAWC,SAASC,MAAMJ,KAAKK,OAAO;EAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,gBAAAS,OAAA,cAACC,mBAAAA;IAAkBV;IAAYW,QAAQT,KAAKK;;AAC7E,CAAA,CAAA;",
6
- "names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "React", "fullyQualifiedId", "StackItem", "TemplateContainer", "object", "StackItem", "Content", "pre", "className", "span", "fullyQualifiedId", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Template", "Data", "subject", "component", "React", "TemplateContainer", "object"]
7
- }