@dxos/plugin-template 0.8.1-staging.391c573 → 0.8.1-staging.97aedb1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{chunk-FLZIRPLH.mjs → chunk-2PY435KZ.mjs} +4 -4
- package/dist/lib/browser/{chunk-FLZIRPLH.mjs.map → chunk-2PY435KZ.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +11 -15
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-AQIXGFXM.mjs → intent-resolver-EM763SK4.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-UV46UZND.mjs → react-surface-WTZDBSE4.mjs} +6 -8
- package/dist/lib/browser/{react-surface-UV46UZND.mjs.map → react-surface-WTZDBSE4.mjs.map} +3 -3
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/types/src/TemplatePlugin.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -6
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +11 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/TemplatePlugin.tsx +1 -2
- package/src/components/TemplateContainer.tsx +1 -1
- package/src/meta.ts +2 -2
- package/src/translations.ts +5 -2
- /package/dist/lib/browser/{intent-resolver-AQIXGFXM.mjs.map → intent-resolver-EM763SK4.mjs.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// packages/plugins/
|
|
1
|
+
// packages/plugins/plugin-template/src/types.ts
|
|
2
2
|
import { S, TypedObject } from "@dxos/echo-schema";
|
|
3
3
|
import { isEchoObject, ReactiveObjectSchema } from "@dxos/react-client/echo";
|
|
4
4
|
|
|
5
|
-
// packages/plugins/
|
|
5
|
+
// packages/plugins/plugin-template/src/meta.ts
|
|
6
6
|
var TEMPLATE_PLUGIN = "dxos.org/plugin/template";
|
|
7
7
|
var meta = {
|
|
8
8
|
id: TEMPLATE_PLUGIN,
|
|
@@ -11,7 +11,7 @@ var meta = {
|
|
|
11
11
|
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-template"
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
// packages/plugins/
|
|
14
|
+
// packages/plugins/plugin-template/src/types.ts
|
|
15
15
|
var TemplateAction;
|
|
16
16
|
(function(TemplateAction2) {
|
|
17
17
|
const TEMPLATE_ACTION = `${TEMPLATE_PLUGIN}/action`;
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
isObject,
|
|
45
45
|
TemplateType
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-2PY435KZ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 = {\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}
|
|
5
|
-
"mappings": ";AAIA,SAASA,GAAGC,mBAAmB;AAC/B,SAASC,cAAcC,4BAAqD;;;ACCrE,IAAMC,kBAAkB;AAExB,IAAMC,
|
|
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
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
7
|
}
|
|
@@ -3,34 +3,36 @@ import {
|
|
|
3
3
|
TemplateAction,
|
|
4
4
|
TemplateType,
|
|
5
5
|
meta
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2PY435KZ.mjs";
|
|
7
7
|
|
|
8
|
-
// packages/plugins/
|
|
8
|
+
// packages/plugins/plugin-template/src/TemplatePlugin.tsx
|
|
9
9
|
import { createIntent, Capabilities, contributes, Events, defineModule, definePlugin } from "@dxos/app-framework";
|
|
10
10
|
import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
11
11
|
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
12
12
|
import { defineObjectForm } from "@dxos/plugin-space/types";
|
|
13
13
|
|
|
14
|
-
// packages/plugins/
|
|
14
|
+
// packages/plugins/plugin-template/src/capabilities/index.ts
|
|
15
15
|
import { lazy } from "@dxos/app-framework";
|
|
16
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
17
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
16
|
+
var IntentResolver = lazy(() => import("./intent-resolver-EM763SK4.mjs"));
|
|
17
|
+
var ReactSurface = lazy(() => import("./react-surface-WTZDBSE4.mjs"));
|
|
18
18
|
|
|
19
|
-
// packages/plugins/
|
|
19
|
+
// packages/plugins/plugin-template/src/translations.ts
|
|
20
20
|
var translations_default = [
|
|
21
21
|
{
|
|
22
22
|
"en-US": {
|
|
23
|
+
[TemplateType.typename]: {
|
|
24
|
+
"typename label": "Template",
|
|
25
|
+
"object name placeholder": "New template"
|
|
26
|
+
},
|
|
23
27
|
[TEMPLATE_PLUGIN]: {
|
|
24
28
|
"plugin name": "Template",
|
|
25
|
-
"object placeholder": "New object",
|
|
26
|
-
"create object label": "Create object",
|
|
27
29
|
"delete object label": "Delete"
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
];
|
|
32
34
|
|
|
33
|
-
// packages/plugins/
|
|
35
|
+
// packages/plugins/plugin-template/src/TemplatePlugin.tsx
|
|
34
36
|
var TemplatePlugin = () => definePlugin(meta, [
|
|
35
37
|
defineModule({
|
|
36
38
|
id: `${meta.id}/module/translations`,
|
|
@@ -43,12 +45,6 @@ var TemplatePlugin = () => definePlugin(meta, [
|
|
|
43
45
|
activate: () => contributes(Capabilities.Metadata, {
|
|
44
46
|
id: TemplateType.typename,
|
|
45
47
|
metadata: {
|
|
46
|
-
placeholder: [
|
|
47
|
-
"object placeholder",
|
|
48
|
-
{
|
|
49
|
-
ns: TEMPLATE_PLUGIN
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
48
|
icon: "ph--asterisk--regular"
|
|
53
49
|
}
|
|
54
50
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/TemplatePlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { createIntent, Capabilities, contributes, Events, defineModule, definePlugin } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ReactSurface, IntentResolver } from './capabilities';\nimport { meta
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,cAAcC,cAAcC,aAAaC,QAAQC,cAAcC,oBAAoB;AAC5F,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACHjC,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;
|
|
6
|
-
"names": ["createIntent", "Capabilities", "contributes", "Events", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "lazy", "IntentResolver", "lazy", "ReactSurface", "TEMPLATE_PLUGIN", "TemplatePlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "TemplateType", "typename", "metadata", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { createIntent, Capabilities, contributes, Events, defineModule, definePlugin } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ReactSurface, IntentResolver } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { TemplateAction, TemplateType } from './types';\n\nexport const TemplatePlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: TemplateType.typename,\n metadata: {\n icon: 'ph--asterisk--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: TemplateType,\n getIntent: () => createIntent(TemplateAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [TemplateType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { TEMPLATE_PLUGIN } from './meta';\nimport { TemplateType } from './types';\n\nexport default [\n {\n 'en-US': {\n [TemplateType.typename]: {\n 'typename label': 'Template',\n 'object name placeholder': 'New template',\n },\n [TEMPLATE_PLUGIN]: {\n 'plugin name': 'Template',\n 'delete object label': 'Delete', // TODO(burdon): Standard for actions menu.\n },\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,cAAcC,cAAcC,aAAaC,QAAQC,cAAcC,oBAAoB;AAC5F,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACHjC,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACA9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,aAAaC,QAAQ,GAAG;QACvB,kBAAkB;QAClB,2BAA2B;MAC7B;MACA,CAACC,eAAAA,GAAkB;QACjB,eAAe;QACf,uBAAuB;MACzB;IACF;EACF;;;;AFLK,IAAMC,iBAAiB,MAC5BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,aAAaC;MACjBC,UAAU;QACRC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAac,aAAaC;IAC1BZ,UAAU,MACRC,YACEY,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcT;MACdU,WAAW,MAAMC,aAAaC,eAAeC,MAAM;IACrD,CAAA,CAAA;EAEN,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAac,aAAaC;IAC1BZ,UAAU,MAAMC,YAAYoB,mBAAmBC,QAAQ;MAACf;KAAa;EACvE,CAAA;EACAZ,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOyB;IACpBvB,UAAUwB;EACZ,CAAA;EACA7B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO2B;IACpBzB,UAAU0B;EACZ,CAAA;CACD;",
|
|
6
|
+
"names": ["createIntent", "Capabilities", "contributes", "Events", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "lazy", "IntentResolver", "lazy", "ReactSurface", "TemplateType", "typename", "TEMPLATE_PLUGIN", "TemplatePlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "TemplateType", "typename", "metadata", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "TemplateAction", "Create", "ClientCapabilities", "Schema", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TemplateAction,
|
|
3
3
|
TemplateType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2PY435KZ.mjs";
|
|
5
5
|
|
|
6
|
-
// packages/plugins/
|
|
6
|
+
// packages/plugins/plugin-template/src/capabilities/intent-resolver.ts
|
|
7
7
|
import { contributes, Capabilities, createResolver } from "@dxos/app-framework";
|
|
8
8
|
import { create } from "@dxos/react-client/echo";
|
|
9
9
|
var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
|
|
@@ -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-
|
|
22
|
+
//# sourceMappingURL=intent-resolver-EM763SK4.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/
|
|
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,25 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TEMPLATE_PLUGIN,
|
|
3
3
|
isObject
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2PY435KZ.mjs";
|
|
5
5
|
|
|
6
|
-
// packages/plugins/
|
|
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
|
-
// packages/plugins/
|
|
10
|
+
// packages/plugins/plugin-template/src/components/TemplateContainer.tsx
|
|
11
11
|
import React from "react";
|
|
12
12
|
import { fullyQualifiedId } from "@dxos/react-client/echo";
|
|
13
13
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
14
14
|
var TemplateContainer = ({ object }) => {
|
|
15
|
-
return /* @__PURE__ */ React.createElement(StackItem.Content, {
|
|
16
|
-
toolbar: false
|
|
17
|
-
}, /* @__PURE__ */ React.createElement("pre", {
|
|
15
|
+
return /* @__PURE__ */ React.createElement(StackItem.Content, null, /* @__PURE__ */ React.createElement("pre", {
|
|
18
16
|
className: "m-4 p-2 ring"
|
|
19
17
|
}, /* @__PURE__ */ React.createElement("span", null, fullyQualifiedId(object))));
|
|
20
18
|
};
|
|
21
19
|
|
|
22
|
-
// packages/plugins/
|
|
20
|
+
// packages/plugins/plugin-template/src/capabilities/react-surface.tsx
|
|
23
21
|
var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
|
|
24
22
|
id: TEMPLATE_PLUGIN,
|
|
25
23
|
role: "article",
|
|
@@ -32,4 +30,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
|
|
|
32
30
|
export {
|
|
33
31
|
react_surface_default as default
|
|
34
32
|
};
|
|
35
|
-
//# sourceMappingURL=react-surface-
|
|
33
|
+
//# sourceMappingURL=react-surface-WTZDBSE4.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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
|
|
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
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "React", "fullyQualifiedId", "StackItem", "TemplateContainer", "object", "StackItem", "Content", "
|
|
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
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplatePlugin.d.ts","sourceRoot":"","sources":["../../../src/TemplatePlugin.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"TemplatePlugin.d.ts","sourceRoot":"","sources":["../../../src/TemplatePlugin.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,4CA6CvB,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
1
2
|
export declare const TEMPLATE_PLUGIN = "dxos.org/plugin/template";
|
|
2
|
-
export declare const meta:
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
source: string;
|
|
7
|
-
};
|
|
3
|
+
export declare const meta: PluginMeta;
|
|
8
4
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,eAAO,MAAM,IAAI,EAAE,UAKlB,CAAC"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'en-US': {
|
|
3
|
+
[x: string]: {
|
|
4
|
+
'typename label': string;
|
|
5
|
+
'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
|
+
};
|
|
3
14
|
"dxos.org/plugin/template": {
|
|
4
15
|
'plugin name': string;
|
|
5
|
-
'object placeholder': string;
|
|
6
|
-
'create object label': string;
|
|
7
16
|
'delete object label': string;
|
|
8
17
|
};
|
|
9
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAOA,wBAaE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-template",
|
|
3
|
-
"version": "0.8.1-staging.
|
|
3
|
+
"version": "0.8.1-staging.97aedb1",
|
|
4
4
|
"description": "Template for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@preact/signals-core": "^1.6.0",
|
|
35
|
-
"@dxos/async": "0.8.1-staging.
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/plugin-
|
|
38
|
-
"@dxos/echo-schema": "0.8.1-staging.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/plugin-space": "0.8.1-staging.
|
|
41
|
-
"@dxos/react-ui-stack": "0.8.1-staging.
|
|
42
|
-
"@dxos/
|
|
35
|
+
"@dxos/async": "0.8.1-staging.97aedb1",
|
|
36
|
+
"@dxos/app-framework": "0.8.1-staging.97aedb1",
|
|
37
|
+
"@dxos/plugin-client": "0.8.1-staging.97aedb1",
|
|
38
|
+
"@dxos/echo-schema": "0.8.1-staging.97aedb1",
|
|
39
|
+
"@dxos/plugin-graph": "0.8.1-staging.97aedb1",
|
|
40
|
+
"@dxos/plugin-space": "0.8.1-staging.97aedb1",
|
|
41
|
+
"@dxos/react-ui-stack": "0.8.1-staging.97aedb1",
|
|
42
|
+
"@dxos/react-client": "0.8.1-staging.97aedb1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
"react": "~18.2.0",
|
|
49
49
|
"react-dom": "~18.2.0",
|
|
50
50
|
"vite": "5.4.7",
|
|
51
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
52
|
-
"@dxos/react-ui-theme": "0.8.1-staging.
|
|
53
|
-
"@dxos/storybook-utils": "0.8.1-staging.
|
|
51
|
+
"@dxos/react-ui": "0.8.1-staging.97aedb1",
|
|
52
|
+
"@dxos/react-ui-theme": "0.8.1-staging.97aedb1",
|
|
53
|
+
"@dxos/storybook-utils": "0.8.1-staging.97aedb1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@phosphor-icons/react": "^2.1.5",
|
|
57
57
|
"react": "~18.2.0",
|
|
58
58
|
"react-dom": "~18.2.0",
|
|
59
|
-
"@dxos/react-ui-theme": "0.8.1-staging.
|
|
60
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
59
|
+
"@dxos/react-ui-theme": "0.8.1-staging.97aedb1",
|
|
60
|
+
"@dxos/react-ui": "0.8.1-staging.97aedb1"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
package/src/TemplatePlugin.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
|
8
8
|
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
9
9
|
|
|
10
10
|
import { ReactSurface, IntentResolver } from './capabilities';
|
|
11
|
-
import { meta
|
|
11
|
+
import { meta } from './meta';
|
|
12
12
|
import translations from './translations';
|
|
13
13
|
import { TemplateAction, TemplateType } from './types';
|
|
14
14
|
|
|
@@ -26,7 +26,6 @@ export const TemplatePlugin = () =>
|
|
|
26
26
|
contributes(Capabilities.Metadata, {
|
|
27
27
|
id: TemplateType.typename,
|
|
28
28
|
metadata: {
|
|
29
|
-
placeholder: ['object placeholder', { ns: TEMPLATE_PLUGIN }],
|
|
30
29
|
icon: 'ph--asterisk--regular',
|
|
31
30
|
},
|
|
32
31
|
}),
|
|
@@ -9,7 +9,7 @@ import { StackItem } from '@dxos/react-ui-stack';
|
|
|
9
9
|
|
|
10
10
|
export const TemplateContainer = ({ object }: { object: ReactiveEchoObject<any>; role: string }) => {
|
|
11
11
|
return (
|
|
12
|
-
<StackItem.Content
|
|
12
|
+
<StackItem.Content>
|
|
13
13
|
<pre className='m-4 p-2 ring'>
|
|
14
14
|
<span>{fullyQualifiedId(object)}</span>
|
|
15
15
|
</pre>
|
package/src/meta.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { type PluginMeta } from '@dxos/app-framework';
|
|
|
6
6
|
|
|
7
7
|
export const TEMPLATE_PLUGIN = 'dxos.org/plugin/template';
|
|
8
8
|
|
|
9
|
-
export const meta = {
|
|
9
|
+
export const meta: PluginMeta = {
|
|
10
10
|
id: TEMPLATE_PLUGIN,
|
|
11
11
|
name: 'Template',
|
|
12
12
|
icon: 'ph--asterisk--regular',
|
|
13
13
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-template',
|
|
14
|
-
}
|
|
14
|
+
};
|
package/src/translations.ts
CHANGED
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { TEMPLATE_PLUGIN } from './meta';
|
|
6
|
+
import { TemplateType } from './types';
|
|
6
7
|
|
|
7
8
|
export default [
|
|
8
9
|
{
|
|
9
10
|
'en-US': {
|
|
11
|
+
[TemplateType.typename]: {
|
|
12
|
+
'typename label': 'Template',
|
|
13
|
+
'object name placeholder': 'New template',
|
|
14
|
+
},
|
|
10
15
|
[TEMPLATE_PLUGIN]: {
|
|
11
16
|
'plugin name': 'Template',
|
|
12
|
-
'object placeholder': 'New object',
|
|
13
|
-
'create object label': 'Create object',
|
|
14
17
|
'delete object label': 'Delete', // TODO(burdon): Standard for actions menu.
|
|
15
18
|
},
|
|
16
19
|
},
|
/package/dist/lib/browser/{intent-resolver-AQIXGFXM.mjs.map → intent-resolver-EM763SK4.mjs.map}
RENAMED
|
File without changes
|