@dxos/plugin-template 0.8.4-main.21d9917 → 0.8.4-main.2244d791bb
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/index.mjs +8 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-FXQGYDUN.mjs → react-surface-MI664JPL.mjs} +5 -4
- package/dist/lib/browser/react-surface-MI664JPL.mjs.map +7 -0
- package/dist/types/src/TemplatePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/TemplateContainer.d.ts +1 -1
- package/dist/types/src/components/TemplateContainer.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -19
- package/src/TemplatePlugin.tsx +6 -5
- package/src/capabilities/react-surface/react-surface.tsx +4 -3
- package/src/components/TemplateContainer.tsx +2 -2
- package/dist/lib/browser/react-surface-FXQGYDUN.mjs.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-template",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.2244d791bb",
|
|
4
4
|
"description": "Template for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -38,18 +38,19 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@radix-ui/react-context": "1.1.1",
|
|
41
|
-
"effect": "3.19.
|
|
42
|
-
"@dxos/app-
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/plugin-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/plugin-
|
|
50
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.
|
|
51
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
52
|
-
"@dxos/
|
|
41
|
+
"effect": "3.19.16",
|
|
42
|
+
"@dxos/app-toolkit": "0.8.4-main.2244d791bb",
|
|
43
|
+
"@dxos/app-framework": "0.8.4-main.2244d791bb",
|
|
44
|
+
"@dxos/echo": "0.8.4-main.2244d791bb",
|
|
45
|
+
"@dxos/async": "0.8.4-main.2244d791bb",
|
|
46
|
+
"@dxos/operation": "0.8.4-main.2244d791bb",
|
|
47
|
+
"@dxos/plugin-client": "0.8.4-main.2244d791bb",
|
|
48
|
+
"@dxos/plugin-space": "0.8.4-main.2244d791bb",
|
|
49
|
+
"@dxos/plugin-graph": "0.8.4-main.2244d791bb",
|
|
50
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.2244d791bb",
|
|
51
|
+
"@dxos/react-ui-stack": "0.8.4-main.2244d791bb",
|
|
52
|
+
"@dxos/react-client": "0.8.4-main.2244d791bb",
|
|
53
|
+
"@dxos/util": "0.8.4-main.2244d791bb"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@types/react": "~19.2.7",
|
|
@@ -57,16 +58,16 @@
|
|
|
57
58
|
"react": "~19.2.3",
|
|
58
59
|
"react-dom": "~19.2.3",
|
|
59
60
|
"vite": "7.1.9",
|
|
60
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
61
|
+
"@dxos/react-ui": "0.8.4-main.2244d791bb",
|
|
62
|
+
"@dxos/ui-theme": "0.8.4-main.2244d791bb",
|
|
63
|
+
"@dxos/storybook-utils": "0.8.4-main.2244d791bb"
|
|
63
64
|
},
|
|
64
65
|
"peerDependencies": {
|
|
65
|
-
"effect": "3.19.
|
|
66
|
+
"effect": "3.19.16",
|
|
66
67
|
"react": "~19.2.3",
|
|
67
68
|
"react-dom": "~19.2.3",
|
|
68
|
-
"@dxos/ui
|
|
69
|
-
"@dxos/
|
|
69
|
+
"@dxos/react-ui": "0.8.4-main.2244d791bb",
|
|
70
|
+
"@dxos/ui-theme": "0.8.4-main.2244d791bb"
|
|
70
71
|
},
|
|
71
72
|
"publishConfig": {
|
|
72
73
|
"access": "public"
|
package/src/TemplatePlugin.tsx
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
8
9
|
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
9
10
|
|
|
10
11
|
import { ReactSurface } from './capabilities';
|
|
@@ -13,8 +14,7 @@ import { translations } from './translations';
|
|
|
13
14
|
import { Template } from './types';
|
|
14
15
|
|
|
15
16
|
export const TemplatePlugin = Plugin.define(meta).pipe(
|
|
16
|
-
|
|
17
|
-
Common.Plugin.addMetadataModule({
|
|
17
|
+
AppPlugin.addMetadataModule({
|
|
18
18
|
metadata: {
|
|
19
19
|
id: Template.Data.typename,
|
|
20
20
|
metadata: {
|
|
@@ -25,7 +25,8 @@ export const TemplatePlugin = Plugin.define(meta).pipe(
|
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
}),
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
AppPlugin.addSchemaModule({ schema: [Template.Data] }),
|
|
29
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
30
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
30
31
|
Plugin.make,
|
|
31
32
|
);
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
9
10
|
import { Obj } from '@dxos/echo';
|
|
10
11
|
|
|
11
12
|
import { TemplateContainer } from '../../components';
|
|
@@ -15,8 +16,8 @@ import { Template } from '../../types';
|
|
|
15
16
|
export default Capability.makeModule(() =>
|
|
16
17
|
Effect.succeed(
|
|
17
18
|
Capability.contributes(
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
Capabilities.ReactSurface,
|
|
20
|
+
Surface.create({
|
|
20
21
|
id: meta.id,
|
|
21
22
|
role: 'article',
|
|
22
23
|
filter: (data): data is { subject: Obj.Unknown } => Obj.instanceOf(Template.Data, data.subject),
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { type SurfaceComponentProps } from '@dxos/app-
|
|
7
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { Layout } from '@dxos/react-ui
|
|
9
|
+
import { Layout } from '@dxos/react-ui';
|
|
10
10
|
|
|
11
11
|
export type TemplateContainerProps = SurfaceComponentProps<Obj.Unknown>;
|
|
12
12
|
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/components/TemplateContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { TemplateContainer } from '../../components';\nimport { meta } from '../../meta';\nimport { Template } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Common.Capability.ReactSurface,\n Common.createSurface({\n id: meta.id,\n role: 'article',\n filter: (data): data is { subject: Obj.Unknown } => Obj.instanceOf(Template.Data, data.subject),\n component: ({ data, role }: { data: { subject: Obj.Unknown }; role: string }) => (\n <TemplateContainer role={role} subject={data.subject} />\n ),\n }),\n ),\n ),\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-framework/react';\nimport { Obj } from '@dxos/echo';\nimport { Layout } from '@dxos/react-ui-mosaic';\n\nexport type TemplateContainerProps = SurfaceComponentProps<Obj.Unknown>;\n\nexport const TemplateContainer = ({ role, subject: object }: TemplateContainerProps) => {\n return (\n <Layout.Main role={role}>\n <pre className='m-4 p-2 ring'>\n <span>{Obj.getDXN(object).toString()}</span>\n </pre>\n </Layout.Main>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,YAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,OAAAA,YAAW;;;ACJpB,OAAOC,WAAW;AAGlB,SAASC,WAAW;AACpB,SAASC,cAAc;AAIhB,IAAMC,oBAAoB,CAAC,EAAEC,MAAMC,SAASC,OAAM,MAA0B;AACjF,SACE,sBAAA,cAACC,OAAOC,MAAI;IAACJ;KACX,sBAAA,cAACK,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACC,QAAAA,MAAMC,IAAIC,OAAOP,MAAAA,EAAQQ,SAAQ,CAAA,CAAA,CAAA;AAI1C;;;ADNA,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YACTC,OAAOJ,WAAWK,cAClBD,OAAOE,cAAc;EACnBC,IAAIC,KAAKD;EACTE,MAAM;EACNC,QAAQ,CAACC,SAA2CC,KAAIC,WAAWC,SAASC,MAAMJ,KAAKK,OAAO;EAC9FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MACtB,gBAAAS,OAAA,cAACC,mBAAAA;IAAkBV;IAAYO,SAASL,KAAKK;;AAEjD,CAAA,CAAA,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "Obj", "React", "Obj", "Layout", "TemplateContainer", "role", "subject", "object", "Layout", "Main", "pre", "className", "span", "Obj", "getDXN", "toString", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Template", "Data", "subject", "component", "React", "TemplateContainer"]
|
|
7
|
-
}
|