@dxos/plugin-template 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65

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 (32) hide show
  1. package/dist/lib/browser/{chunk-HRH4SQLU.mjs → chunk-4GOY3DOO.mjs} +2 -2
  2. package/dist/lib/browser/{chunk-HRH4SQLU.mjs.map → chunk-4GOY3DOO.mjs.map} +1 -1
  3. package/dist/lib/browser/{chunk-TRYLFURO.mjs → chunk-N5OOI66W.mjs} +2 -2
  4. package/dist/lib/browser/{chunk-TRYLFURO.mjs.map → chunk-N5OOI66W.mjs.map} +1 -1
  5. package/dist/lib/browser/index.mjs +5 -5
  6. package/dist/lib/browser/index.mjs.map +3 -3
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/{react-surface-2ZHO2EXN.mjs → react-surface-X7Z6HT56.mjs} +7 -7
  9. package/dist/lib/browser/react-surface-X7Z6HT56.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +1 -1
  11. package/dist/types/src/TemplatePlugin.d.ts.map +1 -1
  12. package/dist/types/src/components/TemplatePanel/TemplatePanel.d.ts +6 -0
  13. package/dist/types/src/components/TemplatePanel/TemplatePanel.d.ts.map +1 -0
  14. package/dist/types/src/components/TemplatePanel/index.d.ts +2 -0
  15. package/dist/types/src/components/TemplatePanel/index.d.ts.map +1 -0
  16. package/dist/types/src/components/index.d.ts +1 -1
  17. package/dist/types/src/components/index.d.ts.map +1 -1
  18. package/dist/types/src/translations.d.ts +1 -0
  19. package/dist/types/src/translations.d.ts.map +1 -1
  20. package/dist/types/tsconfig.tsbuildinfo +1 -1
  21. package/package.json +18 -18
  22. package/src/TemplatePlugin.tsx +0 -1
  23. package/src/capabilities/react-surface/react-surface.tsx +2 -2
  24. package/src/components/{TemplateContainer.tsx → TemplatePanel/TemplatePanel.tsx} +3 -5
  25. package/src/components/TemplatePanel/index.ts +5 -0
  26. package/src/components/index.ts +1 -1
  27. package/src/meta.ts +1 -1
  28. package/src/translations.ts +1 -0
  29. package/src/types/schema.ts +1 -1
  30. package/dist/lib/browser/react-surface-2ZHO2EXN.mjs.map +0 -7
  31. package/dist/types/src/components/TemplateContainer.d.ts +0 -6
  32. package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
@@ -5,7 +5,7 @@ import { Obj, Type } from "@dxos/echo";
5
5
  Template2.Data = Schema.Struct({
6
6
  name: Schema.optional(Schema.String)
7
7
  }).pipe(Type.object({
8
- typename: "dxos.org/type/Data",
8
+ typename: "org.dxos.type.data",
9
9
  version: "0.1.0"
10
10
  }));
11
11
  Template2.make = (props) => Obj.make(Template2.Data, props);
@@ -15,4 +15,4 @@ var Template;
15
15
  export {
16
16
  Template
17
17
  };
18
- //# sourceMappingURL=chunk-HRH4SQLU.mjs.map
18
+ //# sourceMappingURL=chunk-4GOY3DOO.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/schema.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Type } from '@dxos/echo';\n\nexport namespace Template {\n export const Data = Schema.Struct({\n name: Schema.optional(Schema.String),\n }).pipe(\n Type.object({\n typename: 'dxos.org/type/Data',\n version: '0.1.0',\n }),\n );\n\n export type Data = Schema.Schema.Type<typeof Data>;\n\n export const make = (props: Partial<Data>) => Obj.make(Data, props);\n}\n"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Type } from '@dxos/echo';\n\nexport namespace Template {\n export const Data = Schema.Struct({\n name: Schema.optional(Schema.String),\n }).pipe(\n Type.object({\n typename: 'org.dxos.type.data',\n version: '0.1.0',\n }),\n );\n\n export type Data = Schema.Schema.Type<typeof Data>;\n\n export const make = (props: Partial<Data>) => Obj.make(Data, props);\n}\n"],
5
5
  "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,YAAY;UAETC,WAAAA;YACFC,OAAcC,cAAO;IAChCC,MAAaC,gBAAgBC,aAAM;EACrC,CAAA,EAAGC,KACDC,KAAKC,OAAO;IACVC,UAAU;IACVC,SAAS;EACX,CAAA,CAAA;YAKWC,OAAO,CAACC,UAAyBC,IAAIF,KAAIX,UAACC,MAAMW,KAAAA;AAC/D,GAbiBZ,aAAAA,WAAAA,CAAAA,EAAAA;;",
6
6
  "names": ["Schema", "Obj", "Type", "Template", "Data", "Struct", "name", "optional", "String", "pipe", "Type", "object", "typename", "version", "make", "props", "Obj"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  // src/meta.ts
2
2
  import { trim } from "@dxos/util";
3
3
  var meta = {
4
- id: "dxos.org/plugin/template",
4
+ id: "org.dxos.plugin.template",
5
5
  name: "Template",
6
6
  description: trim`
7
7
  Create reusable templates for documents, tables, and other objects.
@@ -15,4 +15,4 @@ var meta = {
15
15
  export {
16
16
  meta
17
17
  };
18
- //# sourceMappingURL=chunk-TRYLFURO.mjs.map
18
+ //# sourceMappingURL=chunk-N5OOI66W.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/meta.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 meta: Plugin.Meta = {\n id: 'dxos.org/plugin/template',\n name: 'Template',\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"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.template',\n name: 'Template',\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
5
  "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;AACV;",
6
6
  "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source"]
7
7
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-TRYLFURO.mjs";
3
+ } from "./chunk-N5OOI66W.mjs";
4
4
  import {
5
5
  Template
6
- } from "./chunk-HRH4SQLU.mjs";
6
+ } from "./chunk-4GOY3DOO.mjs";
7
7
 
8
8
  // src/TemplatePlugin.tsx
9
9
  import * as Effect from "effect/Effect";
@@ -12,7 +12,7 @@ import { AppPlugin } from "@dxos/app-toolkit";
12
12
 
13
13
  // src/capabilities/react-surface/index.ts
14
14
  import { Capability } from "@dxos/app-framework";
15
- var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-2ZHO2EXN.mjs"));
15
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-X7Z6HT56.mjs"));
16
16
 
17
17
  // src/translations.ts
18
18
  var translations = [
@@ -24,6 +24,7 @@ var translations = [
24
24
  "typename label_one": "Template",
25
25
  "typename label_other": "Templates",
26
26
  "object name placeholder": "New template",
27
+ "add object label": "Add template",
27
28
  "rename object label": "Rename template",
28
29
  "delete object label": "Delete template",
29
30
  "object deleted label": "Template deleted"
@@ -42,8 +43,7 @@ var TemplatePlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
42
43
  metadata: {
43
44
  icon: "ph--asterisk--regular",
44
45
  iconHue: "sky",
45
- createObject: (props) => Effect.sync(() => Template.make(props)),
46
- addToCollectionOnCreate: true
46
+ createObject: (props) => Effect.sync(() => Template.make(props))
47
47
  }
48
48
  }
49
49
  }), AppPlugin.addSchemaModule({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/TemplatePlugin.tsx", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type CreateObject } from '@dxos/plugin-space/types';\n\nimport { 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.addMetadataModule({\n metadata: {\n id: Template.Data.typename,\n metadata: {\n icon: 'ph--asterisk--regular',\n iconHue: 'sky',\n createObject: ((props) => Effect.sync(() => Template.make(props))) satisfies CreateObject,\n addToCollectionOnCreate: true,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [Template.Data] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\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 [Template.Data.typename]: {\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 'rename object label': 'Rename template',\n 'delete object label': 'Delete template',\n 'object deleted label': 'Template deleted',\n },\n [meta.id]: {\n 'plugin name': 'Template',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;;;ACH1B,SAASC,kBAAkB;AAEpB,IAAMC,eAAeC,WAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACGlE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,SAASC,KAAKC,QAAQ,GAAG;QACxB,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;;;AFXK,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC,SAASC,KAAKC;IAClBJ,UAAU;MACRK,MAAM;MACNC,SAAS;MACTC,cAAe,CAACC,UAAiBC,YAAK,MAAMP,SAASQ,KAAKF,KAAAA,CAAAA;MAC1DG,yBAAyB;IAC3B;EACF;AACF,CAAA,GACAb,UAAUc,gBAAgB;EAAEC,QAAQ;IAACX,SAASC;;AAAM,CAAA,GACpDL,UAAUgB,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDlB,UAAUmB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CxB,OAAOgB,IAAI;",
6
- "names": ["Effect", "Plugin", "AppPlugin", "Capability", "ReactSurface", "Capability", "lazy", "translations", "Template", "Data", "typename", "meta", "id", "TemplatePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "Template", "Data", "typename", "icon", "iconHue", "createObject", "props", "sync", "make", "addToCollectionOnCreate", "addSchemaModule", "schema", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type CreateObject } from '@dxos/plugin-space/types';\n\nimport { 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.addMetadataModule({\n metadata: {\n id: Template.Data.typename,\n metadata: {\n icon: 'ph--asterisk--regular',\n iconHue: 'sky',\n createObject: ((props) => Effect.sync(() => Template.make(props))) satisfies CreateObject,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [Template.Data] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\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 [Template.Data.typename]: {\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.id]: {\n 'plugin name': 'Template',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;;;ACH1B,SAASC,kBAAkB;AAEpB,IAAMC,eAAeC,WAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACGlE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,SAASC,KAAKC,QAAQ,GAAG;QACxB,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;;;AFZK,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC,SAASC,KAAKC;IAClBJ,UAAU;MACRK,MAAM;MACNC,SAAS;MACTC,cAAe,CAACC,UAAiBC,YAAK,MAAMP,SAASQ,KAAKF,KAAAA,CAAAA;IAC5D;EACF;AACF,CAAA,GACAV,UAAUa,gBAAgB;EAAEC,QAAQ;IAACV,SAASC;;AAAM,CAAA,GACpDL,UAAUe,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDjB,UAAUkB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CvB,OAAOgB,IAAI;",
6
+ "names": ["Effect", "Plugin", "AppPlugin", "Capability", "ReactSurface", "Capability", "lazy", "translations", "Template", "Data", "typename", "meta", "id", "TemplatePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "Template", "Data", "typename", "icon", "iconHue", "createObject", "props", "sync", "make", "addSchemaModule", "schema", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":1835,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/TemplateContainer.tsx":{"bytes":2246,"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/index.ts":{"bytes":495,"imports":[{"path":"src/components/TemplateContainer.tsx","kind":"import-statement","original":"./TemplateContainer"}],"format":"esm"},"src/types/schema.ts":{"bytes":1897,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":463,"imports":[{"path":"src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":3370,"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/echo","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":912,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":489,"imports":[{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":2554,"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":3783,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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":557,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/TemplatePlugin.tsx","kind":"import-statement","original":"./TemplatePlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3390},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-TRYLFURO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-HRH4SQLU.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-2ZHO2EXN.mjs","kind":"dynamic-import"}],"exports":["TemplatePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/TemplatePlugin.tsx":{"bytesInOutput":644},"src/capabilities/react-surface/index.ts":{"bytesInOutput":148},"src/capabilities/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":528}},"bytes":1612},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-HRH4SQLU.mjs","kind":"import-statement"}],"exports":["Template"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":110},"dist/lib/browser/react-surface-2ZHO2EXN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2884},"dist/lib/browser/react-surface-2ZHO2EXN.mjs":{"imports":[{"path":"dist/lib/browser/chunk-TRYLFURO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-HRH4SQLU.mjs","kind":"import-statement"},{"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/echo","kind":"import-statement","external":true},{"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":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":602},"src/components/TemplateContainer.tsx":{"bytesInOutput":462},"src/components/index.ts":{"bytesInOutput":0}},"bytes":1408},"dist/lib/browser/chunk-TRYLFURO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":878},"dist/lib/browser/chunk-TRYLFURO.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":444}},"bytes":523},"dist/lib/browser/chunk-HRH4SQLU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1019},"dist/lib/browser/chunk-HRH4SQLU.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":378},"src/types/index.ts":{"bytesInOutput":0}},"bytes":469}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1835,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/TemplatePanel/TemplatePanel.tsx":{"bytes":2068,"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":501,"imports":[{"path":"src/components/TemplatePanel/TemplatePanel.tsx","kind":"import-statement","original":"./TemplatePanel"}],"format":"esm"},"src/components/index.ts":{"bytes":487,"imports":[{"path":"src/components/TemplatePanel/index.ts","kind":"import-statement","original":"./TemplatePanel"}],"format":"esm"},"src/types/schema.ts":{"bytes":1897,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":463,"imports":[{"path":"src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":3342,"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/echo","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":912,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":489,"imports":[{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":2686,"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":3632,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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":557,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/TemplatePlugin.tsx","kind":"import-statement","original":"./TemplatePlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3366},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-N5OOI66W.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-4GOY3DOO.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-X7Z6HT56.mjs","kind":"dynamic-import"}],"exports":["TemplatePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/TemplatePlugin.tsx":{"bytesInOutput":607},"src/capabilities/react-surface/index.ts":{"bytesInOutput":148},"src/capabilities/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":572}},"bytes":1619},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-4GOY3DOO.mjs","kind":"import-statement"}],"exports":["Template"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":110},"dist/lib/browser/react-surface-X7Z6HT56.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2778},"dist/lib/browser/react-surface-X7Z6HT56.mjs":{"imports":[{"path":"dist/lib/browser/chunk-N5OOI66W.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-4GOY3DOO.mjs","kind":"import-statement"},{"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/echo","kind":"import-statement","external":true},{"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":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":598},"src/components/TemplatePanel/TemplatePanel.tsx":{"bytesInOutput":400},"src/components/TemplatePanel/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0}},"bytes":1352},"dist/lib/browser/chunk-N5OOI66W.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":878},"dist/lib/browser/chunk-N5OOI66W.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":444}},"bytes":523},"dist/lib/browser/chunk-4GOY3DOO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1019},"dist/lib/browser/chunk-4GOY3DOO.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":378},"src/types/index.ts":{"bytesInOutput":0}},"bytes":469}}}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-TRYLFURO.mjs";
3
+ } from "./chunk-N5OOI66W.mjs";
4
4
  import {
5
5
  Template
6
- } from "./chunk-HRH4SQLU.mjs";
6
+ } from "./chunk-4GOY3DOO.mjs";
7
7
 
8
8
  // src/capabilities/react-surface/react-surface.tsx
9
9
  import * as Effect from "effect/Effect";
@@ -12,15 +12,15 @@ import { Capabilities, Capability } from "@dxos/app-framework";
12
12
  import { Surface } from "@dxos/app-framework/ui";
13
13
  import { Obj as Obj2 } from "@dxos/echo";
14
14
 
15
- // src/components/TemplateContainer.tsx
15
+ // src/components/TemplatePanel/TemplatePanel.tsx
16
16
  import React from "react";
17
17
  import { Obj } from "@dxos/echo";
18
18
  import { Panel } from "@dxos/react-ui";
19
- var TemplateContainer = ({ role, subject: object }) => {
19
+ var TemplatePanel = ({ role, subject: object }) => {
20
20
  return /* @__PURE__ */ React.createElement(Panel.Root, {
21
21
  role,
22
22
  className: "dx-article"
23
- }, /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement("span", null, Obj.getDXN(object).toString()))));
23
+ }, /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement("span", null, Obj.getDXN(object).toString())));
24
24
  };
25
25
 
26
26
  // src/capabilities/react-surface/react-surface.tsx
@@ -28,7 +28,7 @@ var react_surface_default = Capability.makeModule(() => Effect.succeed(Capabilit
28
28
  id: meta.id,
29
29
  role: "article",
30
30
  filter: (data) => Obj2.instanceOf(Template.Data, data.subject),
31
- component: ({ data, role }) => /* @__PURE__ */ React2.createElement(TemplateContainer, {
31
+ component: ({ data, role }) => /* @__PURE__ */ React2.createElement(TemplatePanel, {
32
32
  role,
33
33
  subject: data.subject
34
34
  })
@@ -36,4 +36,4 @@ var react_surface_default = Capability.makeModule(() => Effect.succeed(Capabilit
36
36
  export {
37
37
  react_surface_default as default
38
38
  };
39
- //# sourceMappingURL=react-surface-2ZHO2EXN.mjs.map
39
+ //# sourceMappingURL=react-surface-X7Z6HT56.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/components/TemplatePanel/TemplatePanel.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 { Obj } from '@dxos/echo';\n\nimport { TemplatePanel } from '../../components';\nimport { meta } from '../../meta';\nimport { Template } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Capabilities.ReactSurface,\n Surface.create({\n id: meta.id,\n role: 'article',\n filter: (data): data is { subject: Obj.Unknown } => Obj.instanceOf(Template.Data, data.subject),\n component: ({ data, role }: { data: { subject: Obj.Unknown }; role: string }) => (\n <TemplatePanel role={role} subject={data.subject} />\n ),\n }),\n ),\n ),\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { Panel } from '@dxos/react-ui';\n\nexport type TemplatePanelProps = SurfaceComponentProps<Obj.Unknown>;\n\nexport const TemplatePanel = ({ role, subject: object }: TemplatePanelProps) => {\n return (\n <Panel.Root role={role} className='dx-article'>\n <Panel.Content>\n <span>{Obj.getDXN(object).toString()}</span>\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,YAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,OAAAA,YAAW;;;ACLpB,OAAOC,WAAW;AAGlB,SAASC,WAAW;AACpB,SAASC,aAAa;AAIf,IAAMC,gBAAgB,CAAC,EAAEC,MAAMC,SAASC,OAAM,MAAsB;AACzE,SACE,sBAAA,cAACC,MAAMC,MAAI;IAACJ;IAAYK,WAAU;KAChC,sBAAA,cAACF,MAAMG,SAAO,MACZ,sBAAA,cAACC,QAAAA,MAAMC,IAAIC,OAAOP,MAAAA,EAAQQ,SAAQ,CAAA,CAAA,CAAA;AAI1C;;;ADLA,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YACTC,aAAaC,cACbC,QAAQC,OAAO;EACbC,IAAIC,KAAKD;EACTE,MAAM;EACNC,QAAQ,CAACC,SAA2CC,KAAIC,WAAWC,SAASC,MAAMJ,KAAKK,OAAO;EAC9FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MACtB,gBAAAS,OAAA,cAACC,eAAAA;IAAcV;IAAYO,SAASL,KAAKK;;AAE7C,CAAA,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "React", "Capabilities", "Capability", "Surface", "Obj", "React", "Obj", "Panel", "TemplatePanel", "role", "subject", "object", "Panel", "Root", "className", "Content", "span", "Obj", "getDXN", "toString", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Template", "Data", "subject", "component", "React", "TemplatePanel"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Template
3
- } from "../chunk-HRH4SQLU.mjs";
3
+ } from "../chunk-4GOY3DOO.mjs";
4
4
  export {
5
5
  Template
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TemplatePlugin.d.ts","sourceRoot":"","sources":["../../../src/TemplatePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAS7C,eAAO,MAAM,cAAc,4BAgB1B,CAAC"}
1
+ {"version":3,"file":"TemplatePlugin.d.ts","sourceRoot":"","sources":["../../../src/TemplatePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAS7C,eAAO,MAAM,cAAc,4BAe1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
3
+ import { Obj } from '@dxos/echo';
4
+ export type TemplatePanelProps = SurfaceComponentProps<Obj.Unknown>;
5
+ export declare const TemplatePanel: ({ role, subject: object }: TemplatePanelProps) => React.JSX.Element;
6
+ //# sourceMappingURL=TemplatePanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplatePanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/TemplatePanel/TemplatePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGjC,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAEpE,eAAO,MAAM,aAAa,GAAI,2BAA2B,kBAAkB,sBAQ1E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './TemplatePanel';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TemplatePanel/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './TemplateContainer';
1
+ export * from './TemplatePanel';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
@@ -8,6 +8,7 @@ export declare const translations: [{
8
8
  readonly 'typename label_one': "Template";
9
9
  readonly 'typename label_other': "Templates";
10
10
  readonly 'object name placeholder': "New template";
11
+ readonly 'add object label': "Add template";
11
12
  readonly 'rename object label': "Rename template";
12
13
  readonly 'delete object label': "Delete template";
13
14
  readonly 'object deleted label': "Template deleted";
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;UASvB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;UAER;;EAGwB,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;;UAUvB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;UAER;;EAGwB,CAAC"}