@dxos/plugin-template 0.8.2-staging.7ac8446 → 0.8.2

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.
@@ -1,5 +1,6 @@
1
1
  // packages/plugins/plugin-template/src/types.ts
2
- import { S, TypedObject } from "@dxos/echo-schema";
2
+ import { Schema } from "effect";
3
+ import { TypedObject } from "@dxos/echo-schema";
3
4
  import { isEchoObject, ReactiveObjectSchema } from "@dxos/react-client/echo";
4
5
 
5
6
  // packages/plugins/plugin-template/src/meta.ts
@@ -8,18 +9,17 @@ var meta = {
8
9
  id: TEMPLATE_PLUGIN,
9
10
  name: "Template",
10
11
  icon: "ph--asterisk--regular",
11
- source: "https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-template"
12
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template"
12
13
  };
13
14
 
14
15
  // packages/plugins/plugin-template/src/types.ts
15
- var TemplateAction;
16
16
  (function(TemplateAction2) {
17
17
  const TEMPLATE_ACTION = `${TEMPLATE_PLUGIN}/action`;
18
- class Create extends S.TaggedClass()(`${TEMPLATE_ACTION}/create`, {
19
- input: S.Struct({
20
- name: S.optional(S.String)
18
+ class Create extends Schema.TaggedClass()(`${TEMPLATE_ACTION}/create`, {
19
+ input: Schema.Struct({
20
+ name: Schema.optional(Schema.String)
21
21
  }),
22
- output: S.Struct({
22
+ output: Schema.Struct({
23
23
  object: ReactiveObjectSchema
24
24
  })
25
25
  }) {
@@ -33,15 +33,16 @@ var TemplateType = class extends TypedObject({
33
33
  typename: "dxos.org/type/Template",
34
34
  version: "0.1.0"
35
35
  })({
36
- name: S.optional(S.String)
36
+ name: Schema.optional(Schema.String)
37
37
  }) {
38
38
  };
39
+ var TemplateAction;
39
40
 
40
41
  export {
41
42
  TEMPLATE_PLUGIN,
42
43
  meta,
43
- TemplateAction,
44
44
  isObject,
45
- TemplateType
45
+ TemplateType,
46
+ TemplateAction
46
47
  };
47
- //# sourceMappingURL=chunk-2PY435KZ.mjs.map
48
+ //# sourceMappingURL=chunk-3HYGWWDQ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types.ts", "../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\nimport { isEchoObject, ReactiveObjectSchema, type AnyLiveObject } from '@dxos/react-client/echo';\n\nimport { TEMPLATE_PLUGIN } from './meta';\n\nexport namespace TemplateAction {\n const TEMPLATE_ACTION = `${TEMPLATE_PLUGIN}/action`;\n\n export class Create extends Schema.TaggedClass<Create>()(`${TEMPLATE_ACTION}/create`, {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: ReactiveObjectSchema,\n }),\n }) {}\n}\n\n// TODO(burdon): Warning: Encountered two children with the same key, `dxos.org/plugin/template`.\n// TODO(burdon): Better way to detect?\nexport const isObject = (object: unknown): object is AnyLiveObject<any> => {\n return isEchoObject(object) && object.type === 'template';\n};\n\nexport class TemplateType extends TypedObject({ typename: 'dxos.org/type/Template', version: '0.1.0' })({\n name: Schema.optional(Schema.String),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const TEMPLATE_PLUGIN = 'dxos.org/plugin/template';\n\nexport const meta: PluginMeta = {\n id: TEMPLATE_PLUGIN,\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,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAC5B,SAASC,cAAcC,4BAAgD;;;ACDhE,IAAMC,kBAAkB;AAExB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;;;UDFiBC,iBAAAA;AACf,QAAMC,kBAAkB,GAAGC,eAAAA;EAEpB,MAAMC,eAAeC,OAAOC,YAAW,EAAW,GAAGJ,eAAAA,WAA0B;IACpFK,OAAOF,OAAOG,OAAO;MACnBC,MAAMJ,OAAOK,SAASL,OAAOM,MAAM;IACrC,CAAA;IACAC,QAAQP,OAAOG,OAAO;MACpBK,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;kBAPSV,SAAAA;AAQf,GAXiBH,mBAAAA,iBAAAA,CAAAA,EAAAA;AAeV,IAAMc,WAAW,CAACF,WAAAA;AACvB,SAAOG,aAAaH,MAAAA,KAAWA,OAAOI,SAAS;AACjD;AAEO,IAAMC,eAAN,cAA2BC,YAAY;EAAEC,UAAU;EAA0BC,SAAS;AAAQ,CAAA,EAAG;EACtGZ,MAAMJ,OAAOK,SAASL,OAAOM,MAAM;AACrC,CAAA,EAAA;AAAI;;",
6
+ "names": ["Schema", "TypedObject", "isEchoObject", "ReactiveObjectSchema", "TEMPLATE_PLUGIN", "meta", "id", "name", "icon", "source", "TemplateAction", "TEMPLATE_ACTION", "TEMPLATE_PLUGIN", "Create", "Schema", "TaggedClass", "input", "Struct", "name", "optional", "String", "output", "object", "ReactiveObjectSchema", "isObject", "isEchoObject", "type", "TemplateType", "TypedObject", "typename", "version"]
7
+ }
@@ -3,7 +3,7 @@ import {
3
3
  TemplateAction,
4
4
  TemplateType,
5
5
  meta
6
- } from "./chunk-2PY435KZ.mjs";
6
+ } from "./chunk-3HYGWWDQ.mjs";
7
7
 
8
8
  // packages/plugins/plugin-template/src/TemplatePlugin.tsx
9
9
  import { createIntent, Capabilities, contributes, Events, defineModule, definePlugin } from "@dxos/app-framework";
@@ -13,8 +13,8 @@ import { defineObjectForm } from "@dxos/plugin-space/types";
13
13
 
14
14
  // packages/plugins/plugin-template/src/capabilities/index.ts
15
15
  import { lazy } from "@dxos/app-framework";
16
- var IntentResolver = lazy(() => import("./intent-resolver-EM763SK4.mjs"));
17
- var ReactSurface = lazy(() => import("./react-surface-WTZDBSE4.mjs"));
16
+ var IntentResolver = lazy(() => import("./intent-resolver-LEEW7WF5.mjs"));
17
+ var ReactSurface = lazy(() => import("./react-surface-QKHEP25U.mjs"));
18
18
 
19
19
  // packages/plugins/plugin-template/src/translations.ts
20
20
  var translations_default = [
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  TemplateAction,
3
3
  TemplateType
4
- } from "./chunk-2PY435KZ.mjs";
4
+ } from "./chunk-3HYGWWDQ.mjs";
5
5
 
6
6
  // packages/plugins/plugin-template/src/capabilities/intent-resolver.ts
7
7
  import { contributes, Capabilities, createResolver } from "@dxos/app-framework";
8
- import { create } from "@dxos/react-client/echo";
8
+ import { live } from "@dxos/react-client/echo";
9
9
  var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
10
10
  intent: TemplateAction.Create,
11
11
  resolve: ({ name }) => ({
12
12
  data: {
13
- object: create(TemplateType, {
13
+ object: live(TemplateType, {
14
14
  name
15
15
  })
16
16
  }
@@ -19,4 +19,4 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
19
19
  export {
20
20
  intent_resolver_default as default
21
21
  };
22
- //# sourceMappingURL=intent-resolver-EM763SK4.mjs.map
22
+ //# sourceMappingURL=intent-resolver-LEEW7WF5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, Capabilities, createResolver } from '@dxos/app-framework';\nimport { live } from '@dxos/react-client/echo';\n\nimport { TemplateAction, TemplateType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: TemplateAction.Create,\n resolve: ({ name }) => ({\n data: { object: live(TemplateType, { name }) },\n }),\n }),\n );\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,aAAaC,cAAcC,sBAAsB;AAC1D,SAASC,YAAY;AAIrB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,eAAeC;EACvBC,SAAS,CAAC,EAAEC,KAAI,OAAQ;IACtBC,MAAM;MAAEC,QAAQC,KAAKC,cAAc;QAAEJ;MAAK,CAAA;IAAG;EAC/C;AACF,CAAA,CAAA;",
6
+ "names": ["contributes", "Capabilities", "createResolver", "live", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "TemplateAction", "Create", "resolve", "name", "data", "object", "live", "TemplateType"]
7
+ }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-template/src/meta.ts":{"bytes":1352,"imports":[],"format":"esm"},"packages/plugins/plugin-template/src/types.ts":{"bytes":3891,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts":{"bytes":2198,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-template/src/components/TemplateContainer.tsx":{"bytes":1912,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-template/src/components/index.ts":{"bytes":540,"imports":[{"path":"packages/plugins/plugin-template/src/components/TemplateContainer.tsx","kind":"import-statement","original":"./TemplateContainer"}],"format":"esm"},"packages/plugins/plugin-template/src/capabilities/react-surface.tsx":{"bytes":2699,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-template/src/capabilities/index.ts":{"bytes":1083,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-template/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-template/src/translations.ts":{"bytes":1826,"imports":[{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-template/src/TemplatePlugin.tsx":{"bytes":7569,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-template/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-template/src/index.ts":{"bytes":602,"imports":[{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-template/src/TemplatePlugin.tsx","kind":"import-statement","original":"./TemplatePlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-template/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4858},"packages/plugins/plugin-template/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-2PY435KZ.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-EM763SK4.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-template/dist/lib/browser/react-surface-WTZDBSE4.mjs","kind":"dynamic-import"}],"exports":["TEMPLATE_PLUGIN","TemplatePlugin","meta"],"entryPoint":"packages/plugins/plugin-template/src/index.ts","inputs":{"packages/plugins/plugin-template/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-template/src/TemplatePlugin.tsx":{"bytesInOutput":1561},"packages/plugins/plugin-template/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-template/src/translations.ts":{"bytesInOutput":301}},"bytes":2483},"packages/plugins/plugin-template/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-template/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-2PY435KZ.mjs","kind":"import-statement"}],"exports":["TemplateAction","TemplateType","isObject"],"entryPoint":"packages/plugins/plugin-template/src/types.ts","inputs":{},"bytes":177},"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-EM763SK4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1077},"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-EM763SK4.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-2PY435KZ.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts":{"bytesInOutput":373}},"bytes":622},"packages/plugins/plugin-template/dist/lib/browser/react-surface-WTZDBSE4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2276},"packages/plugins/plugin-template/dist/lib/browser/react-surface-WTZDBSE4.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-2PY435KZ.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-template/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-template/src/capabilities/react-surface.tsx":{"bytesInOutput":419},"packages/plugins/plugin-template/src/components/TemplateContainer.tsx":{"bytesInOutput":411},"packages/plugins/plugin-template/src/components/index.ts":{"bytesInOutput":0}},"bytes":1217},"packages/plugins/plugin-template/dist/lib/browser/chunk-2PY435KZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2537},"packages/plugins/plugin-template/dist/lib/browser/chunk-2PY435KZ.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["TEMPLATE_PLUGIN","TemplateAction","TemplateType","isObject","meta"],"inputs":{"packages/plugins/plugin-template/src/types.ts":{"bytesInOutput":762},"packages/plugins/plugin-template/src/meta.ts":{"bytesInOutput":239}},"bytes":1278}}}
1
+ {"inputs":{"packages/plugins/plugin-template/src/meta.ts":{"bytes":1283,"imports":[],"format":"esm"},"packages/plugins/plugin-template/src/types.ts":{"bytes":3984,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts":{"bytes":2138,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-template/src/components/TemplateContainer.tsx":{"bytes":2046,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-template/src/components/index.ts":{"bytes":508,"imports":[{"path":"packages/plugins/plugin-template/src/components/TemplateContainer.tsx","kind":"import-statement","original":"./TemplateContainer"}],"format":"esm"},"packages/plugins/plugin-template/src/capabilities/react-surface.tsx":{"bytes":2635,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-template/src/capabilities/index.ts":{"bytes":1051,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-template/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-template/src/translations.ts":{"bytes":1774,"imports":[{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-template/src/TemplatePlugin.tsx":{"bytes":7433,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-template/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-template/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-template/src/index.ts":{"bytes":570,"imports":[{"path":"packages/plugins/plugin-template/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-template/src/TemplatePlugin.tsx","kind":"import-statement","original":"./TemplatePlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-template/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4858},"packages/plugins/plugin-template/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-3HYGWWDQ.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-LEEW7WF5.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-template/dist/lib/browser/react-surface-QKHEP25U.mjs","kind":"dynamic-import"}],"exports":["TEMPLATE_PLUGIN","TemplatePlugin","meta"],"entryPoint":"packages/plugins/plugin-template/src/index.ts","inputs":{"packages/plugins/plugin-template/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-template/src/TemplatePlugin.tsx":{"bytesInOutput":1561},"packages/plugins/plugin-template/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-template/src/translations.ts":{"bytesInOutput":301}},"bytes":2483},"packages/plugins/plugin-template/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-template/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-3HYGWWDQ.mjs","kind":"import-statement"}],"exports":["TemplateAction","TemplateType","isObject"],"entryPoint":"packages/plugins/plugin-template/src/types.ts","inputs":{},"bytes":177},"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-LEEW7WF5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1069},"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-LEEW7WF5.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-3HYGWWDQ.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-template/src/capabilities/intent-resolver.ts":{"bytesInOutput":369}},"bytes":618},"packages/plugins/plugin-template/dist/lib/browser/react-surface-QKHEP25U.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2262},"packages/plugins/plugin-template/dist/lib/browser/react-surface-QKHEP25U.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-3HYGWWDQ.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-template/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-template/src/capabilities/react-surface.tsx":{"bytesInOutput":419},"packages/plugins/plugin-template/src/components/TemplateContainer.tsx":{"bytesInOutput":572},"packages/plugins/plugin-template/src/components/index.ts":{"bytesInOutput":0}},"bytes":1378},"packages/plugins/plugin-template/dist/lib/browser/chunk-3HYGWWDQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2605},"packages/plugins/plugin-template/dist/lib/browser/chunk-3HYGWWDQ.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["TEMPLATE_PLUGIN","TemplateAction","TemplateType","isObject","meta"],"inputs":{"packages/plugins/plugin-template/src/types.ts":{"bytesInOutput":827},"packages/plugins/plugin-template/src/meta.ts":{"bytesInOutput":226}},"bytes":1330}}}
@@ -1,20 +1,26 @@
1
1
  import {
2
2
  TEMPLATE_PLUGIN,
3
3
  isObject
4
- } from "./chunk-2PY435KZ.mjs";
4
+ } from "./chunk-3HYGWWDQ.mjs";
5
5
 
6
6
  // packages/plugins/plugin-template/src/capabilities/react-surface.tsx
7
7
  import React2 from "react";
8
8
  import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
9
9
 
10
10
  // packages/plugins/plugin-template/src/components/TemplateContainer.tsx
11
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
11
12
  import React from "react";
12
13
  import { fullyQualifiedId } from "@dxos/react-client/echo";
13
14
  import { StackItem } from "@dxos/react-ui-stack";
14
15
  var TemplateContainer = ({ object }) => {
15
- return /* @__PURE__ */ React.createElement(StackItem.Content, null, /* @__PURE__ */ React.createElement("pre", {
16
- className: "m-4 p-2 ring"
17
- }, /* @__PURE__ */ React.createElement("span", null, fullyQualifiedId(object))));
16
+ var _effect = _useSignals();
17
+ try {
18
+ return /* @__PURE__ */ React.createElement(StackItem.Content, null, /* @__PURE__ */ React.createElement("pre", {
19
+ className: "m-4 p-2 ring"
20
+ }, /* @__PURE__ */ React.createElement("span", null, fullyQualifiedId(object))));
21
+ } finally {
22
+ _effect.f();
23
+ }
18
24
  };
19
25
 
20
26
  // packages/plugins/plugin-template/src/capabilities/react-surface.tsx
@@ -30,4 +36,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
30
36
  export {
31
37
  react_surface_default as default
32
38
  };
33
- //# sourceMappingURL=react-surface-WTZDBSE4.mjs.map
39
+ //# sourceMappingURL=react-surface-QKHEP25U.mjs.map
@@ -0,0 +1,7 @@
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 { type AnyLiveObject } from '@dxos/react-client/echo';\n\nimport { TemplateContainer } from '../components';\nimport { TEMPLATE_PLUGIN } from '../meta';\nimport { isObject } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: TEMPLATE_PLUGIN,\n role: 'article',\n filter: (data): data is { subject: AnyLiveObject<any> } => isObject(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 AnyLiveObject, fullyQualifiedId } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nexport const TemplateContainer = ({ object }: { object: AnyLiveObject<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;;;;ACFzD,OAAOC,WAAW;AAElB,SAA6BC,wBAAwB;AACrD,SAASC,iBAAiB;AAEnB,IAAMC,oBAAoB,CAAC,EAAEC,OAAM,MAAgD;;;AACxF,WACE,sBAAA,cAACC,UAAUC,SAAO,MAChB,sBAAA,cAACC,OAAAA;MAAIC,WAAU;OACb,sBAAA,cAACC,QAAAA,MAAMC,iBAAiBN,MAAAA,CAAAA,CAAAA,CAAAA;;;;AAIhC;;;ADJA,IAAA,wBAAe,MACbO,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAIC;EACJC,MAAM;EACNC,QAAQ,CAACC,SAAkDC,SAASD,KAAKE,OAAO;EAChFC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,gBAAAM,OAAA,cAACC,mBAAAA;IAAkBP;IAAYQ,QAAQN,KAAKE;;AAC7E,CAAA,CAAA;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "React", "fullyQualifiedId", "StackItem", "TemplateContainer", "object", "StackItem", "Content", "pre", "className", "span", "fullyQualifiedId", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "TEMPLATE_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "React", "TemplateContainer", "object"]
7
+ }
@@ -2,7 +2,7 @@ import {
2
2
  TemplateAction,
3
3
  TemplateType,
4
4
  isObject
5
- } from "./chunk-2PY435KZ.mjs";
5
+ } from "./chunk-3HYGWWDQ.mjs";
6
6
  export {
7
7
  TemplateAction,
8
8
  TemplateType,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { type ReactiveEchoObject } from '@dxos/react-client/echo';
2
+ import { type AnyLiveObject } from '@dxos/react-client/echo';
3
3
  export declare const TemplateContainer: ({ object }: {
4
- object: ReactiveEchoObject<any>;
4
+ object: AnyLiveObject<any>;
5
5
  role: string;
6
6
  }) => React.JSX.Element;
7
7
  //# sourceMappingURL=TemplateContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/TemplateContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,yBAAyB,CAAC;AAGpF,eAAO,MAAM,iBAAiB,eAAgB;IAAE,MAAM,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,sBAQ9F,CAAC"}
1
+ {"version":3,"file":"TemplateContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/TemplateContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,yBAAyB,CAAC;AAG/E,eAAO,MAAM,iBAAiB,GAAI,YAAY;IAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,sBAQzF,CAAC"}
@@ -1,15 +1,9 @@
1
+ import { TemplateType } from './types';
1
2
  declare const _default: {
2
3
  'en-US': {
3
- [x: string]: {
4
+ [TemplateType.typename]: {
4
5
  'typename label': string;
5
6
  'object name placeholder': string;
6
- 'plugin name'?: undefined;
7
- 'delete object label'?: undefined;
8
- } | {
9
- 'plugin name': string;
10
- 'delete object label': string;
11
- 'typename label'?: undefined;
12
- 'object name placeholder'?: undefined;
13
7
  };
14
8
  "dxos.org/plugin/template": {
15
9
  'plugin name': string;
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAOA,wBAaE"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;;;QAKjC,CAAC,YAAY,CAAC,QAAQ,CAAC;;;UAGtB;;;;;;;AANP,wBAaE"}
@@ -1,25 +1,25 @@
1
- import { S } from '@dxos/echo-schema';
2
- import { type ReactiveEchoObject } from '@dxos/react-client/echo';
1
+ import { Schema } from 'effect';
2
+ import { type AnyLiveObject } from '@dxos/react-client/echo';
3
3
  export declare namespace TemplateAction {
4
- const Create_base: S.TaggedClass<Create, "dxos.org/plugin/template/action/create", {
5
- readonly _tag: S.tag<"dxos.org/plugin/template/action/create">;
4
+ const Create_base: Schema.TaggedClass<Create, "dxos.org/plugin/template/action/create", {
5
+ readonly _tag: Schema.tag<"dxos.org/plugin/template/action/create">;
6
6
  } & {
7
- input: S.Struct<{
8
- name: S.optional<typeof S.String>;
7
+ input: Schema.Struct<{
8
+ name: Schema.optional<typeof Schema.String>;
9
9
  }>;
10
- output: S.Struct<{
11
- object: S.Schema<import("@dxos/live-object").ReactiveObject<any>, import("@dxos/live-object").ReactiveObject<any>, never>;
10
+ output: Schema.Struct<{
11
+ object: Schema.Schema<any, any, never>;
12
12
  }>;
13
13
  }>;
14
14
  export class Create extends Create_base {
15
15
  }
16
16
  export {};
17
17
  }
18
- export declare const isObject: (object: unknown) => object is ReactiveEchoObject<any>;
18
+ export declare const isObject: (object: unknown) => object is AnyLiveObject<any>;
19
19
  declare const TemplateType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
20
- name: S.optional<typeof S.String>;
21
- }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
22
- name: S.optional<typeof S.String>;
20
+ name: Schema.optional<typeof Schema.String>;
21
+ }, import("@dxos/echo-schema").TypedObjectOptions>, Schema.Struct.Encoded<{
22
+ name: Schema.optional<typeof Schema.String>;
23
23
  }>>;
24
24
  export declare class TemplateType extends TemplateType_base {
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAsC,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAItG,yBAAiB,cAAc,CAAC;;;;;;;;;;;IAG9B,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;CACN;AAID,eAAO,MAAM,QAAQ,WAAY,OAAO,KAAG,MAAM,IAAI,kBAAkB,CAAC,GAAG,CAE1E,CAAC;;;;;;AAEF,qBAAa,YAAa,SAAQ,iBAEhC;CAAG"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAsC,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIjG,yBAAiB,cAAc,CAAC;;;;;;;;;;;IAG9B,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;CACN;AAID,eAAO,MAAM,QAAQ,GAAI,QAAQ,OAAO,KAAG,MAAM,IAAI,aAAa,CAAC,GAAG,CAErE,CAAC;;;;;;AAEF,qBAAa,YAAa,SAAQ,iBAEhC;CAAG"}
@@ -1 +1 @@
1
- {"version":"5.7.3"}
1
+ {"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-template",
3
- "version": "0.8.2-staging.7ac8446",
3
+ "version": "0.8.2",
4
4
  "description": "Template for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -31,15 +31,18 @@
31
31
  "src"
32
32
  ],
33
33
  "dependencies": {
34
- "@preact/signals-core": "^1.6.0",
35
- "@dxos/app-framework": "0.8.2-staging.7ac8446",
36
- "@dxos/async": "0.8.2-staging.7ac8446",
37
- "@dxos/plugin-graph": "0.8.2-staging.7ac8446",
38
- "@dxos/plugin-client": "0.8.2-staging.7ac8446",
39
- "@dxos/plugin-space": "0.8.2-staging.7ac8446",
40
- "@dxos/echo-schema": "0.8.2-staging.7ac8446",
41
- "@dxos/react-client": "0.8.2-staging.7ac8446",
42
- "@dxos/react-ui-stack": "0.8.2-staging.7ac8446"
34
+ "@preact-signals/safe-react": "^0.9.0",
35
+ "@preact/signals-core": "^1.9.0",
36
+ "effect": "3.14.21",
37
+ "@dxos/app-framework": "0.8.2",
38
+ "@dxos/echo": "0.8.2",
39
+ "@dxos/echo-schema": "0.8.2",
40
+ "@dxos/async": "0.8.2",
41
+ "@dxos/plugin-client": "0.8.2",
42
+ "@dxos/plugin-graph": "0.8.2",
43
+ "@dxos/plugin-space": "0.8.2",
44
+ "@dxos/react-client": "0.8.2",
45
+ "@dxos/react-ui-stack": "0.8.2"
43
46
  },
44
47
  "devDependencies": {
45
48
  "@phosphor-icons/react": "^2.1.5",
@@ -48,16 +51,17 @@
48
51
  "react": "~18.2.0",
49
52
  "react-dom": "~18.2.0",
50
53
  "vite": "5.4.7",
51
- "@dxos/react-ui": "0.8.2-staging.7ac8446",
52
- "@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
53
- "@dxos/storybook-utils": "0.8.2-staging.7ac8446"
54
+ "@dxos/react-ui": "0.8.2",
55
+ "@dxos/react-ui-theme": "0.8.2",
56
+ "@dxos/storybook-utils": "0.8.2"
54
57
  },
55
58
  "peerDependencies": {
56
59
  "@phosphor-icons/react": "^2.1.5",
60
+ "effect": "^3.13.3",
57
61
  "react": "~18.2.0",
58
62
  "react-dom": "~18.2.0",
59
- "@dxos/react-ui": "0.8.2-staging.7ac8446",
60
- "@dxos/react-ui-theme": "0.8.2-staging.7ac8446"
63
+ "@dxos/react-ui-theme": "0.8.2",
64
+ "@dxos/react-ui": "0.8.2"
61
65
  },
62
66
  "publishConfig": {
63
67
  "access": "public"
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { contributes, Capabilities, createResolver } from '@dxos/app-framework';
6
- import { create } from '@dxos/react-client/echo';
6
+ import { live } from '@dxos/react-client/echo';
7
7
 
8
8
  import { TemplateAction, TemplateType } from '../types';
9
9
 
@@ -13,7 +13,7 @@ export default () =>
13
13
  createResolver({
14
14
  intent: TemplateAction.Create,
15
15
  resolve: ({ name }) => ({
16
- data: { object: create(TemplateType, { name }) },
16
+ data: { object: live(TemplateType, { name }) },
17
17
  }),
18
18
  }),
19
19
  );
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
- import { type ReactiveEchoObject } from '@dxos/react-client/echo';
8
+ import { type AnyLiveObject } from '@dxos/react-client/echo';
9
9
 
10
10
  import { TemplateContainer } from '../components';
11
11
  import { TEMPLATE_PLUGIN } from '../meta';
@@ -17,7 +17,7 @@ export default () =>
17
17
  createSurface({
18
18
  id: TEMPLATE_PLUGIN,
19
19
  role: 'article',
20
- filter: (data): data is { subject: ReactiveEchoObject<any> } => isObject(data.subject),
20
+ filter: (data): data is { subject: AnyLiveObject<any> } => isObject(data.subject),
21
21
  component: ({ data, role }) => <TemplateContainer role={role} object={data.subject} />,
22
22
  }),
23
23
  );
@@ -4,10 +4,10 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/react-client/echo';
7
+ import { type AnyLiveObject, fullyQualifiedId } from '@dxos/react-client/echo';
8
8
  import { StackItem } from '@dxos/react-ui-stack';
9
9
 
10
- export const TemplateContainer = ({ object }: { object: ReactiveEchoObject<any>; role: string }) => {
10
+ export const TemplateContainer = ({ object }: { object: AnyLiveObject<any>; role: string }) => {
11
11
  return (
12
12
  <StackItem.Content>
13
13
  <pre className='m-4 p-2 ring'>
package/src/meta.ts CHANGED
@@ -10,5 +10,5 @@ export const meta: PluginMeta = {
10
10
  id: TEMPLATE_PLUGIN,
11
11
  name: 'Template',
12
12
  icon: 'ph--asterisk--regular',
13
- source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-template',
13
+ source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',
14
14
  };
package/src/types.ts CHANGED
@@ -2,19 +2,21 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { S, TypedObject } from '@dxos/echo-schema';
6
- import { isEchoObject, ReactiveObjectSchema, type ReactiveEchoObject } from '@dxos/react-client/echo';
5
+ import { Schema } from 'effect';
6
+
7
+ import { TypedObject } from '@dxos/echo-schema';
8
+ import { isEchoObject, ReactiveObjectSchema, type AnyLiveObject } from '@dxos/react-client/echo';
7
9
 
8
10
  import { TEMPLATE_PLUGIN } from './meta';
9
11
 
10
12
  export namespace TemplateAction {
11
13
  const TEMPLATE_ACTION = `${TEMPLATE_PLUGIN}/action`;
12
14
 
13
- export class Create extends S.TaggedClass<Create>()(`${TEMPLATE_ACTION}/create`, {
14
- input: S.Struct({
15
- name: S.optional(S.String),
15
+ export class Create extends Schema.TaggedClass<Create>()(`${TEMPLATE_ACTION}/create`, {
16
+ input: Schema.Struct({
17
+ name: Schema.optional(Schema.String),
16
18
  }),
17
- output: S.Struct({
19
+ output: Schema.Struct({
18
20
  object: ReactiveObjectSchema,
19
21
  }),
20
22
  }) {}
@@ -22,10 +24,10 @@ export namespace TemplateAction {
22
24
 
23
25
  // TODO(burdon): Warning: Encountered two children with the same key, `dxos.org/plugin/template`.
24
26
  // TODO(burdon): Better way to detect?
25
- export const isObject = (object: unknown): object is ReactiveEchoObject<any> => {
27
+ export const isObject = (object: unknown): object is AnyLiveObject<any> => {
26
28
  return isEchoObject(object) && object.type === 'template';
27
29
  };
28
30
 
29
31
  export class TemplateType extends TypedObject({ typename: 'dxos.org/type/Template', version: '0.1.0' })({
30
- name: S.optional(S.String),
32
+ name: Schema.optional(Schema.String),
31
33
  }) {}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types.ts", "../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\nimport { isEchoObject, ReactiveObjectSchema, type ReactiveEchoObject } from '@dxos/react-client/echo';\n\nimport { TEMPLATE_PLUGIN } from './meta';\n\nexport namespace TemplateAction {\n const TEMPLATE_ACTION = `${TEMPLATE_PLUGIN}/action`;\n\n export class Create extends S.TaggedClass<Create>()(`${TEMPLATE_ACTION}/create`, {\n input: S.Struct({\n name: S.optional(S.String),\n }),\n output: S.Struct({\n object: ReactiveObjectSchema,\n }),\n }) {}\n}\n\n// TODO(burdon): Warning: Encountered two children with the same key, `dxos.org/plugin/template`.\n// TODO(burdon): Better way to detect?\nexport const isObject = (object: unknown): object is ReactiveEchoObject<any> => {\n return isEchoObject(object) && object.type === 'template';\n};\n\nexport class TemplateType extends TypedObject({ typename: 'dxos.org/type/Template', version: '0.1.0' })({\n name: S.optional(S.String),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const TEMPLATE_PLUGIN = 'dxos.org/plugin/template';\n\nexport const meta: PluginMeta = {\n id: TEMPLATE_PLUGIN,\n name: 'Template',\n icon: 'ph--asterisk--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-template',\n};\n"],
5
- "mappings": ";AAIA,SAASA,GAAGC,mBAAmB;AAC/B,SAASC,cAAcC,4BAAqD;;;ACCrE,IAAMC,kBAAkB;AAExB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;;;;UDJiBC,iBAAAA;AACf,QAAMC,kBAAkB,GAAGC,eAAAA;EAEpB,MAAMC,eAAeC,EAAEC,YAAW,EAAW,GAAGJ,eAAAA,WAA0B;IAC/EK,OAAOF,EAAEG,OAAO;MACdC,MAAMJ,EAAEK,SAASL,EAAEM,MAAM;IAC3B,CAAA;IACAC,QAAQP,EAAEG,OAAO;MACfK,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;kBAPSV,SAAAA;AAQf,GAXiBH,mBAAAA,iBAAAA,CAAAA,EAAAA;AAeV,IAAMc,WAAW,CAACF,WAAAA;AACvB,SAAOG,aAAaH,MAAAA,KAAWA,OAAOI,SAAS;AACjD;AAEO,IAAMC,eAAN,cAA2BC,YAAY;EAAEC,UAAU;EAA0BC,SAAS;AAAQ,CAAA,EAAG;EACtGZ,MAAMJ,EAAEK,SAASL,EAAEM,MAAM;AAC3B,CAAA,EAAA;AAAI;",
6
- "names": ["S", "TypedObject", "isEchoObject", "ReactiveObjectSchema", "TEMPLATE_PLUGIN", "meta", "id", "name", "icon", "source", "TemplateAction", "TEMPLATE_ACTION", "TEMPLATE_PLUGIN", "Create", "S", "TaggedClass", "input", "Struct", "name", "optional", "String", "output", "object", "ReactiveObjectSchema", "isObject", "isEchoObject", "type", "TemplateType", "TypedObject", "typename", "version"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, Capabilities, createResolver } from '@dxos/app-framework';\nimport { create } from '@dxos/react-client/echo';\n\nimport { TemplateAction, TemplateType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: TemplateAction.Create,\n resolve: ({ name }) => ({\n data: { object: create(TemplateType, { name }) },\n }),\n }),\n );\n"],
5
- "mappings": ";;;;;;AAIA,SAASA,aAAaC,cAAcC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,eAAeC;EACvBC,SAAS,CAAC,EAAEC,KAAI,OAAQ;IACtBC,MAAM;MAAEC,QAAQC,OAAOC,cAAc;QAAEJ;MAAK,CAAA;IAAG;EACjD;AACF,CAAA,CAAA;",
6
- "names": ["contributes", "Capabilities", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "TemplateAction", "Create", "resolve", "name", "data", "object", "create", "TemplateType"]
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 { type ReactiveEchoObject } from '@dxos/react-client/echo';\n\nimport { TemplateContainer } from '../components';\nimport { TEMPLATE_PLUGIN } from '../meta';\nimport { isObject } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: TEMPLATE_PLUGIN,\n role: 'article',\n filter: (data): data is { subject: ReactiveEchoObject<any> } => isObject(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 ReactiveEchoObject, fullyQualifiedId } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nexport const TemplateContainer = ({ object }: { object: ReactiveEchoObject<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;;;ACFzD,OAAOC,WAAW;AAElB,SAAkCC,wBAAwB;AAC1D,SAASC,iBAAiB;AAEnB,IAAMC,oBAAoB,CAAC,EAAEC,OAAM,MAAqD;AAC7F,SACE,sBAAA,cAACC,UAAUC,SAAO,MAChB,sBAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACC,QAAAA,MAAMC,iBAAiBN,MAAAA,CAAAA,CAAAA,CAAAA;AAIhC;;;ADJA,IAAA,wBAAe,MACbO,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAIC;EACJC,MAAM;EACNC,QAAQ,CAACC,SAAuDC,SAASD,KAAKE,OAAO;EACrFC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,gBAAAM,OAAA,cAACC,mBAAAA;IAAkBP;IAAYQ,QAAQN,KAAKE;;AAC7E,CAAA,CAAA;",
6
- "names": ["React", "Capabilities", "contributes", "createSurface", "React", "fullyQualifiedId", "StackItem", "TemplateContainer", "object", "StackItem", "Content", "pre", "className", "span", "fullyQualifiedId", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "TEMPLATE_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "React", "TemplateContainer", "object"]
7
- }