@dxos/plugin-template 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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 +5 -63
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +27 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs.map +2 -2
- package/dist/types/src/TemplatePlugin.d.ts +1 -0
- package/dist/types/src/TemplatePlugin.d.ts.map +1 -1
- package/dist/types/src/TemplatePlugin.test.d.ts +2 -0
- package/dist/types/src/TemplatePlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/TemplatePanel/TemplatePanel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +22 -15
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -26
- package/src/TemplatePlugin.test.ts +26 -0
- package/src/TemplatePlugin.tsx +4 -3
- package/src/capabilities/react-surface.tsx +1 -2
- package/src/index.ts +6 -1
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.abd8ff62ef",
|
|
4
4
|
"description": "Template for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
|
+
"#plugin": "./src/TemplatePlugin.tsx",
|
|
16
17
|
"#capabilities": "./src/capabilities/index.ts",
|
|
17
18
|
"#components": "./src/components/index.ts",
|
|
18
19
|
"#meta": "./src/meta.ts",
|
|
20
|
+
"#translations": "./src/translations.ts",
|
|
19
21
|
"#types": "./src/types/index.ts"
|
|
20
22
|
},
|
|
21
23
|
"exports": {
|
|
@@ -24,6 +26,12 @@
|
|
|
24
26
|
"types": "./dist/types/src/index.d.ts",
|
|
25
27
|
"browser": "./dist/lib/browser/index.mjs"
|
|
26
28
|
},
|
|
29
|
+
"./translations": {
|
|
30
|
+
"source": "./src/translations.ts",
|
|
31
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
32
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
33
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
34
|
+
},
|
|
27
35
|
"./types": {
|
|
28
36
|
"source": "./src/types/index.ts",
|
|
29
37
|
"types": "./dist/types/src/types/index.d.ts",
|
|
@@ -31,13 +39,6 @@
|
|
|
31
39
|
}
|
|
32
40
|
},
|
|
33
41
|
"types": "dist/types/src/index.d.ts",
|
|
34
|
-
"typesVersions": {
|
|
35
|
-
"*": {
|
|
36
|
-
"types": [
|
|
37
|
-
"dist/types/src/types/index.d.ts"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
42
|
"files": [
|
|
42
43
|
"dist",
|
|
43
44
|
"src"
|
|
@@ -45,35 +46,36 @@
|
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"@radix-ui/react-context": "1.1.1",
|
|
47
48
|
"effect": "3.20.0",
|
|
48
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
49
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/react-client": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
59
|
-
"@dxos/
|
|
49
|
+
"@dxos/app-framework": "0.8.4-main.abd8ff62ef",
|
|
50
|
+
"@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
|
|
51
|
+
"@dxos/async": "0.8.4-main.abd8ff62ef",
|
|
52
|
+
"@dxos/compute": "0.8.4-main.abd8ff62ef",
|
|
53
|
+
"@dxos/echo": "0.8.4-main.abd8ff62ef",
|
|
54
|
+
"@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
|
|
55
|
+
"@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
|
|
56
|
+
"@dxos/react-client": "0.8.4-main.abd8ff62ef",
|
|
57
|
+
"@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
|
|
58
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.abd8ff62ef",
|
|
59
|
+
"@dxos/react-ui-stack": "0.8.4-main.abd8ff62ef",
|
|
60
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@types/react": "~19.2.7",
|
|
63
64
|
"@types/react-dom": "~19.2.3",
|
|
64
65
|
"react": "~19.2.3",
|
|
65
66
|
"react-dom": "~19.2.3",
|
|
66
|
-
"vite": "^
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
67
|
+
"vite": "^8.0.10",
|
|
68
|
+
"@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
|
|
69
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
70
|
+
"@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
|
|
71
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
70
72
|
},
|
|
71
73
|
"peerDependencies": {
|
|
72
74
|
"effect": "3.20.0",
|
|
73
75
|
"react": "~19.2.3",
|
|
74
76
|
"react-dom": "~19.2.3",
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/ui
|
|
77
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef",
|
|
78
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef"
|
|
77
79
|
},
|
|
78
80
|
"publishConfig": {
|
|
79
81
|
"access": "public"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { TemplatePlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('TemplatePlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), TemplatePlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
expect(harness.manager.getActive()).toEqual(
|
|
23
|
+
expect.arrayContaining([moduleId('metadata'), moduleId('schema'), moduleId('ReactSurface')]),
|
|
24
|
+
);
|
|
25
|
+
}, 20_000);
|
|
26
|
+
});
|
package/src/TemplatePlugin.tsx
CHANGED
|
@@ -7,17 +7,16 @@ import * as Option from 'effect/Option';
|
|
|
7
7
|
|
|
8
8
|
import { Plugin } from '@dxos/app-framework';
|
|
9
9
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
10
11
|
import { Annotation } from '@dxos/echo';
|
|
11
|
-
import { Operation } from '@dxos/operation';
|
|
12
12
|
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
13
|
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
14
|
|
|
15
15
|
import { ReactSurface } from '#capabilities';
|
|
16
16
|
import { meta } from '#meta';
|
|
17
|
+
import { translations } from '#translations';
|
|
17
18
|
import { Template } from '#types';
|
|
18
19
|
|
|
19
|
-
import { translations } from './translations';
|
|
20
|
-
|
|
21
20
|
export const TemplatePlugin = Plugin.define(meta).pipe(
|
|
22
21
|
AppPlugin.addMetadataModule({
|
|
23
22
|
metadata: {
|
|
@@ -43,3 +42,5 @@ export const TemplatePlugin = Plugin.define(meta).pipe(
|
|
|
43
42
|
AppPlugin.addTranslationsModule({ translations }),
|
|
44
43
|
Plugin.make,
|
|
45
44
|
);
|
|
45
|
+
|
|
46
|
+
export default TemplatePlugin;
|
|
@@ -18,8 +18,7 @@ export default Capability.makeModule(() =>
|
|
|
18
18
|
Capabilities.ReactSurface,
|
|
19
19
|
Surface.create({
|
|
20
20
|
id: 'root',
|
|
21
|
-
|
|
22
|
-
filter: AppSurface.objectArticle(Template.Data),
|
|
21
|
+
filter: AppSurface.object(AppSurface.Article, Template.Data),
|
|
23
22
|
component: ({ data, role }) => (
|
|
24
23
|
<TemplatePanel role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
25
24
|
),
|
package/src/index.ts
CHANGED
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
5
9
|
export * from './meta';
|
|
6
|
-
|
|
10
|
+
|
|
11
|
+
export const TemplatePlugin = Plugin.lazy(meta, () => import('#plugin'));
|