@dxos/plugin-template 0.8.2-main.2f9c567 → 0.8.2-main.5885341

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,6 +1,5 @@
1
1
  // packages/plugins/plugin-template/src/types.ts
2
- import { Schema } from "effect";
3
- import { TypedObject } from "@dxos/echo-schema";
2
+ import { S, TypedObject } from "@dxos/echo-schema";
4
3
  import { isEchoObject, ReactiveObjectSchema } from "@dxos/react-client/echo";
5
4
 
6
5
  // packages/plugins/plugin-template/src/meta.ts
@@ -16,11 +15,11 @@ var meta = {
16
15
  var TemplateAction;
17
16
  (function(TemplateAction2) {
18
17
  const TEMPLATE_ACTION = `${TEMPLATE_PLUGIN}/action`;
19
- class Create extends Schema.TaggedClass()(`${TEMPLATE_ACTION}/create`, {
20
- input: Schema.Struct({
21
- name: Schema.optional(Schema.String)
18
+ class Create extends S.TaggedClass()(`${TEMPLATE_ACTION}/create`, {
19
+ input: S.Struct({
20
+ name: S.optional(S.String)
22
21
  }),
23
- output: Schema.Struct({
22
+ output: S.Struct({
24
23
  object: ReactiveObjectSchema
25
24
  })
26
25
  }) {
@@ -34,7 +33,7 @@ var TemplateType = class extends TypedObject({
34
33
  typename: "dxos.org/type/Template",
35
34
  version: "0.1.0"
36
35
  })({
37
- name: Schema.optional(Schema.String)
36
+ name: S.optional(S.String)
38
37
  }) {
39
38
  };
40
39
 
@@ -45,4 +44,4 @@ export {
45
44
  isObject,
46
45
  TemplateType
47
46
  };
48
- //# sourceMappingURL=chunk-2HUYWR4F.mjs.map
47
+ //# sourceMappingURL=chunk-2PY435KZ.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 { 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
+ }
@@ -3,7 +3,7 @@ import {
3
3
  TemplateAction,
4
4
  TemplateType,
5
5
  meta
6
- } from "./chunk-2HUYWR4F.mjs";
6
+ } from "./chunk-2PY435KZ.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-OHIRIASR.mjs"));
17
- var ReactSurface = lazy(() => import("./react-surface-DWZQKSMX.mjs"));
16
+ var IntentResolver = lazy(() => import("./intent-resolver-EOHOSDQ6.mjs"));
17
+ var ReactSurface = lazy(() => import("./react-surface-WTZDBSE4.mjs"));
18
18
 
19
19
  // packages/plugins/plugin-template/src/translations.ts
20
20
  var translations_default = [
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TemplateAction,
3
3
  TemplateType
4
- } from "./chunk-2HUYWR4F.mjs";
4
+ } from "./chunk-2PY435KZ.mjs";
5
5
 
6
6
  // packages/plugins/plugin-template/src/capabilities/intent-resolver.ts
7
7
  import { contributes, Capabilities, createResolver } from "@dxos/app-framework";
@@ -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-OHIRIASR.mjs.map
22
+ //# sourceMappingURL=intent-resolver-EOHOSDQ6.mjs.map
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-template/src/meta.ts":{"bytes":1352,"imports":[],"format":"esm"},"packages/plugins/plugin-template/src/types.ts":{"bytes":4068,"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":2186,"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":1900,"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":2683,"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-2HUYWR4F.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-OHIRIASR.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-template/dist/lib/browser/react-surface-DWZQKSMX.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-2HUYWR4F.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-OHIRIASR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1069},"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-OHIRIASR.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-2HUYWR4F.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-DWZQKSMX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2256},"packages/plugins/plugin-template/dist/lib/browser/react-surface-DWZQKSMX.mjs":{"imports":[{"path":"packages/plugins/plugin-template/dist/lib/browser/chunk-2HUYWR4F.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-2HUYWR4F.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2618},"packages/plugins/plugin-template/dist/lib/browser/chunk-2HUYWR4F.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":239}},"bytes":1343}}}
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":2186,"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-EOHOSDQ6.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-EOHOSDQ6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1069},"packages/plugins/plugin-template/dist/lib/browser/intent-resolver-EOHOSDQ6.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":369}},"bytes":618},"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,7 +1,7 @@
1
1
  import {
2
2
  TEMPLATE_PLUGIN,
3
3
  isObject
4
- } from "./chunk-2HUYWR4F.mjs";
4
+ } from "./chunk-2PY435KZ.mjs";
5
5
 
6
6
  // packages/plugins/plugin-template/src/capabilities/react-surface.tsx
7
7
  import React2 from "react";
@@ -30,4 +30,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
30
30
  export {
31
31
  react_surface_default as default
32
32
  };
33
- //# sourceMappingURL=react-surface-DWZQKSMX.mjs.map
33
+ //# sourceMappingURL=react-surface-WTZDBSE4.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 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
+ }
@@ -2,7 +2,7 @@ import {
2
2
  TemplateAction,
3
3
  TemplateType,
4
4
  isObject
5
- } from "./chunk-2HUYWR4F.mjs";
5
+ } from "./chunk-2PY435KZ.mjs";
6
6
  export {
7
7
  TemplateAction,
8
8
  TemplateType,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { type AnyLiveObject } from '@dxos/react-client/echo';
2
+ import { type ReactiveEchoObject } from '@dxos/react-client/echo';
3
3
  export declare const TemplateContainer: ({ object }: {
4
- object: AnyLiveObject<any>;
4
+ object: ReactiveEchoObject<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,aAAa,EAAoB,MAAM,yBAAyB,CAAC;AAG/E,eAAO,MAAM,iBAAiB,eAAgB;IAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,sBAQzF,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,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,25 +1,25 @@
1
- import { Schema } from 'effect';
2
- import { type AnyLiveObject } from '@dxos/react-client/echo';
1
+ import { S } from '@dxos/echo-schema';
2
+ import { type ReactiveEchoObject } from '@dxos/react-client/echo';
3
3
  export declare namespace TemplateAction {
4
- const Create_base: Schema.TaggedClass<Create, "dxos.org/plugin/template/action/create", {
5
- readonly _tag: Schema.tag<"dxos.org/plugin/template/action/create">;
4
+ const Create_base: S.TaggedClass<Create, "dxos.org/plugin/template/action/create", {
5
+ readonly _tag: S.tag<"dxos.org/plugin/template/action/create">;
6
6
  } & {
7
- input: Schema.Struct<{
8
- name: Schema.optional<typeof Schema.String>;
7
+ input: S.Struct<{
8
+ name: S.optional<typeof S.String>;
9
9
  }>;
10
- output: Schema.Struct<{
11
- object: Schema.Schema<any, any, never>;
10
+ output: S.Struct<{
11
+ object: S.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 AnyLiveObject<any>;
18
+ export declare const isObject: (object: unknown) => object is ReactiveEchoObject<any>;
19
19
  declare const TemplateType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
20
- name: Schema.optional<typeof Schema.String>;
21
- }, import("@dxos/echo-schema").TypedObjectOptions>, Schema.Struct.Encoded<{
22
- name: Schema.optional<typeof Schema.String>;
20
+ name: S.optional<typeof S.String>;
21
+ }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
22
+ name: S.optional<typeof S.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,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,WAAY,OAAO,KAAG,MAAM,IAAI,aAAa,CAAC,GAAG,CAErE,CAAC;;;;;;AAEF,qBAAa,YAAa,SAAQ,iBAEhC;CAAG"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-template",
3
- "version": "0.8.2-main.2f9c567",
3
+ "version": "0.8.2-main.5885341",
4
4
  "description": "Template for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -32,15 +32,14 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@preact/signals-core": "^1.6.0",
35
- "effect": "3.14.21",
36
- "@dxos/app-framework": "0.8.2-main.2f9c567",
37
- "@dxos/echo-schema": "0.8.2-main.2f9c567",
38
- "@dxos/async": "0.8.2-main.2f9c567",
39
- "@dxos/plugin-client": "0.8.2-main.2f9c567",
40
- "@dxos/plugin-graph": "0.8.2-main.2f9c567",
41
- "@dxos/plugin-space": "0.8.2-main.2f9c567",
42
- "@dxos/react-client": "0.8.2-main.2f9c567",
43
- "@dxos/react-ui-stack": "0.8.2-main.2f9c567"
35
+ "@dxos/app-framework": "0.8.2-main.5885341",
36
+ "@dxos/async": "0.8.2-main.5885341",
37
+ "@dxos/plugin-client": "0.8.2-main.5885341",
38
+ "@dxos/plugin-graph": "0.8.2-main.5885341",
39
+ "@dxos/plugin-space": "0.8.2-main.5885341",
40
+ "@dxos/echo-schema": "0.8.2-main.5885341",
41
+ "@dxos/react-ui-stack": "0.8.2-main.5885341",
42
+ "@dxos/react-client": "0.8.2-main.5885341"
44
43
  },
45
44
  "devDependencies": {
46
45
  "@phosphor-icons/react": "^2.1.5",
@@ -49,17 +48,16 @@
49
48
  "react": "~18.2.0",
50
49
  "react-dom": "~18.2.0",
51
50
  "vite": "5.4.7",
52
- "@dxos/react-ui": "0.8.2-main.2f9c567",
53
- "@dxos/react-ui-theme": "0.8.2-main.2f9c567",
54
- "@dxos/storybook-utils": "0.8.2-main.2f9c567"
51
+ "@dxos/react-ui": "0.8.2-main.5885341",
52
+ "@dxos/storybook-utils": "0.8.2-main.5885341",
53
+ "@dxos/react-ui-theme": "0.8.2-main.5885341"
55
54
  },
56
55
  "peerDependencies": {
57
56
  "@phosphor-icons/react": "^2.1.5",
58
- "effect": "^3.13.3",
59
57
  "react": "~18.2.0",
60
58
  "react-dom": "~18.2.0",
61
- "@dxos/react-ui": "0.8.2-main.2f9c567",
62
- "@dxos/react-ui-theme": "0.8.2-main.2f9c567"
59
+ "@dxos/react-ui": "0.8.2-main.5885341",
60
+ "@dxos/react-ui-theme": "0.8.2-main.5885341"
63
61
  },
64
62
  "publishConfig": {
65
63
  "access": "public"
@@ -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 AnyLiveObject } from '@dxos/react-client/echo';
8
+ import { type ReactiveEchoObject } 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: AnyLiveObject<any> } => isObject(data.subject),
20
+ filter: (data): data is { subject: ReactiveEchoObject<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 AnyLiveObject, fullyQualifiedId } from '@dxos/react-client/echo';
7
+ import { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/react-client/echo';
8
8
  import { StackItem } from '@dxos/react-ui-stack';
9
9
 
10
- export const TemplateContainer = ({ object }: { object: AnyLiveObject<any>; role: string }) => {
10
+ export const TemplateContainer = ({ object }: { object: ReactiveEchoObject<any>; role: string }) => {
11
11
  return (
12
12
  <StackItem.Content>
13
13
  <pre className='m-4 p-2 ring'>
package/src/types.ts CHANGED
@@ -2,21 +2,19 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
6
-
7
- import { TypedObject } from '@dxos/echo-schema';
8
- import { isEchoObject, ReactiveObjectSchema, type AnyLiveObject } from '@dxos/react-client/echo';
5
+ import { S, TypedObject } from '@dxos/echo-schema';
6
+ import { isEchoObject, ReactiveObjectSchema, type ReactiveEchoObject } from '@dxos/react-client/echo';
9
7
 
10
8
  import { TEMPLATE_PLUGIN } from './meta';
11
9
 
12
10
  export namespace TemplateAction {
13
11
  const TEMPLATE_ACTION = `${TEMPLATE_PLUGIN}/action`;
14
12
 
15
- export class Create extends Schema.TaggedClass<Create>()(`${TEMPLATE_ACTION}/create`, {
16
- input: Schema.Struct({
17
- name: Schema.optional(Schema.String),
13
+ export class Create extends S.TaggedClass<Create>()(`${TEMPLATE_ACTION}/create`, {
14
+ input: S.Struct({
15
+ name: S.optional(S.String),
18
16
  }),
19
- output: Schema.Struct({
17
+ output: S.Struct({
20
18
  object: ReactiveObjectSchema,
21
19
  }),
22
20
  }) {}
@@ -24,10 +22,10 @@ export namespace TemplateAction {
24
22
 
25
23
  // TODO(burdon): Warning: Encountered two children with the same key, `dxos.org/plugin/template`.
26
24
  // TODO(burdon): Better way to detect?
27
- export const isObject = (object: unknown): object is AnyLiveObject<any> => {
25
+ export const isObject = (object: unknown): object is ReactiveEchoObject<any> => {
28
26
  return isEchoObject(object) && object.type === 'template';
29
27
  };
30
28
 
31
29
  export class TemplateType extends TypedObject({ typename: 'dxos.org/type/Template', version: '0.1.0' })({
32
- name: Schema.optional(Schema.String),
30
+ name: S.optional(S.String),
33
31
  }) {}
@@ -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 { 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/experimental/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
- }
@@ -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 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,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,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
- }