@dxos/plugin-template 0.8.4-main.fd6878d → 0.8.4-main.fffef41
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-LT6IO5CC.mjs → chunk-6T47OUOE.mjs} +9 -3
- package/dist/lib/browser/chunk-6T47OUOE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -5
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-AILWDC74.mjs → intent-resolver-4BJJ7NBA.mjs} +4 -4
- package/dist/lib/browser/{intent-resolver-AILWDC74.mjs.map → intent-resolver-4BJJ7NBA.mjs.map} +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-7J6GGCX4.mjs +68 -0
- package/dist/lib/browser/react-surface-7J6GGCX4.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/types/src/TemplatePlugin.d.ts +1 -1
- package/dist/types/src/TemplatePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/components/Example/Example.d.ts +16 -0
- package/dist/types/src/components/Example/Example.d.ts.map +1 -0
- package/dist/types/src/components/Example/Example.stories.d.ts +19 -0
- package/dist/types/src/components/Example/Example.stories.d.ts.map +1 -0
- package/dist/types/src/components/Example/index.d.ts +2 -0
- package/dist/types/src/components/Example/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateContainer.d.ts +1 -1
- package/dist/types/src/components/TemplateContainer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +5 -5
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -24
- package/src/TemplatePlugin.tsx +45 -45
- package/src/components/Example/Example.stories.tsx +32 -0
- package/src/components/Example/Example.tsx +54 -0
- package/src/components/Example/index.ts +5 -0
- package/src/components/TemplateContainer.tsx +2 -3
- package/src/components/index.ts +1 -0
- package/src/meta.ts +6 -0
- package/src/types/schema.ts +2 -2
- package/dist/lib/browser/chunk-LT6IO5CC.mjs.map +0 -7
- package/dist/lib/browser/react-surface-NRU2N7BS.mjs +0 -40
- package/dist/lib/browser/react-surface-NRU2N7BS.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.fffef41",
|
|
4
4
|
"description": "Template for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -34,34 +34,35 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@preact-signals/safe-react": "^0.9.0",
|
|
37
|
-
"@preact/signals-core": "^1.
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/plugin-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
46
|
-
"@dxos/react-
|
|
47
|
-
"@dxos/react-
|
|
37
|
+
"@preact/signals-core": "^1.12.1",
|
|
38
|
+
"@radix-ui/react-context": "1.1.1",
|
|
39
|
+
"effect": "3.18.3",
|
|
40
|
+
"@dxos/app-framework": "0.8.4-main.fffef41",
|
|
41
|
+
"@dxos/async": "0.8.4-main.fffef41",
|
|
42
|
+
"@dxos/plugin-client": "0.8.4-main.fffef41",
|
|
43
|
+
"@dxos/plugin-graph": "0.8.4-main.fffef41",
|
|
44
|
+
"@dxos/echo": "0.8.4-main.fffef41",
|
|
45
|
+
"@dxos/plugin-space": "0.8.4-main.fffef41",
|
|
46
|
+
"@dxos/react-client": "0.8.4-main.fffef41",
|
|
47
|
+
"@dxos/react-ui-stack": "0.8.4-main.fffef41",
|
|
48
|
+
"@dxos/util": "0.8.4-main.fffef41"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@types/react": "~
|
|
51
|
-
"@types/react-dom": "~
|
|
52
|
-
"react": "~
|
|
53
|
-
"react-dom": "~
|
|
54
|
-
"vite": "
|
|
55
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
51
|
+
"@types/react": "~19.2.2",
|
|
52
|
+
"@types/react-dom": "~19.2.2",
|
|
53
|
+
"react": "~19.2.0",
|
|
54
|
+
"react-dom": "~19.2.0",
|
|
55
|
+
"vite": "7.1.9",
|
|
56
|
+
"@dxos/react-ui": "0.8.4-main.fffef41",
|
|
57
|
+
"@dxos/storybook-utils": "0.8.4-main.fffef41",
|
|
58
|
+
"@dxos/react-ui-theme": "0.8.4-main.fffef41"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
60
61
|
"effect": "^3.13.3",
|
|
61
|
-
"react": "
|
|
62
|
-
"react-dom": "
|
|
63
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
64
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
62
|
+
"react": "^19.0.0",
|
|
63
|
+
"react-dom": "^19.0.0",
|
|
64
|
+
"@dxos/react-ui": "0.8.4-main.fffef41",
|
|
65
|
+
"@dxos/react-ui-theme": "0.8.4-main.fffef41"
|
|
65
66
|
},
|
|
66
67
|
"publishConfig": {
|
|
67
68
|
"access": "public"
|
package/src/TemplatePlugin.tsx
CHANGED
|
@@ -12,49 +12,49 @@ import { meta } from './meta';
|
|
|
12
12
|
import { translations } from './translations';
|
|
13
13
|
import { Template } from './types';
|
|
14
14
|
|
|
15
|
-
export const TemplatePlugin = () =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
export const TemplatePlugin = definePlugin(meta, () => [
|
|
16
|
+
defineModule({
|
|
17
|
+
id: `${meta.id}/module/translations`,
|
|
18
|
+
activatesOn: Events.SetupTranslations,
|
|
19
|
+
activate: () => contributes(Capabilities.Translations, translations),
|
|
20
|
+
}),
|
|
21
|
+
defineModule({
|
|
22
|
+
id: `${meta.id}/module/metadata`,
|
|
23
|
+
activatesOn: Events.SetupMetadata,
|
|
24
|
+
activate: () =>
|
|
25
|
+
contributes(Capabilities.Metadata, {
|
|
26
|
+
id: Template.Data.typename,
|
|
27
|
+
metadata: {
|
|
28
|
+
icon: 'ph--asterisk--regular',
|
|
29
|
+
iconHue: 'sky',
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
defineModule({
|
|
34
|
+
id: `${meta.id}/module/object-form`,
|
|
35
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
36
|
+
activate: () =>
|
|
37
|
+
contributes(
|
|
38
|
+
SpaceCapabilities.ObjectForm,
|
|
39
|
+
defineObjectForm({
|
|
40
|
+
objectSchema: Template.Data,
|
|
41
|
+
getIntent: () => createIntent(Template.Create),
|
|
31
42
|
}),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
defineModule({
|
|
51
|
-
id: `${meta.id}/module/react-surface`,
|
|
52
|
-
activatesOn: Events.SetupReactSurface,
|
|
53
|
-
activate: ReactSurface,
|
|
54
|
-
}),
|
|
55
|
-
defineModule({
|
|
56
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
57
|
-
activatesOn: Events.SetupIntentResolver,
|
|
58
|
-
activate: IntentResolver,
|
|
59
|
-
}),
|
|
60
|
-
]);
|
|
43
|
+
),
|
|
44
|
+
}),
|
|
45
|
+
defineModule({
|
|
46
|
+
id: `${meta.id}/module/schema`,
|
|
47
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
48
|
+
activate: () => contributes(ClientCapabilities.Schema, [Template.Data]),
|
|
49
|
+
}),
|
|
50
|
+
defineModule({
|
|
51
|
+
id: `${meta.id}/module/react-surface`,
|
|
52
|
+
activatesOn: Events.SetupReactSurface,
|
|
53
|
+
activate: ReactSurface,
|
|
54
|
+
}),
|
|
55
|
+
defineModule({
|
|
56
|
+
id: `${meta.id}/module/intent-resolver`,
|
|
57
|
+
activatesOn: Events.SetupIntentResolver,
|
|
58
|
+
activate: IntentResolver,
|
|
59
|
+
}),
|
|
60
|
+
]);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
|
|
10
|
+
import { Example, type ExampleRootProps } from './Example';
|
|
11
|
+
|
|
12
|
+
const DefaultStory = (props: ExampleRootProps) => {
|
|
13
|
+
return <Example.Root {...props} />;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const meta = {
|
|
17
|
+
title: 'ui/react-ui-core/Example',
|
|
18
|
+
component: Example.Root,
|
|
19
|
+
render: DefaultStory,
|
|
20
|
+
decorators: [withTheme, withLayout({ container: 'column' })],
|
|
21
|
+
parameters: {
|
|
22
|
+
layout: 'fullscreen',
|
|
23
|
+
},
|
|
24
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
25
|
+
|
|
26
|
+
export default meta;
|
|
27
|
+
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
|
|
30
|
+
export const Default: Story = {
|
|
31
|
+
args: {},
|
|
32
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { createContext } from '@radix-ui/react-context';
|
|
6
|
+
import React, { type PropsWithChildren } from 'react';
|
|
7
|
+
|
|
8
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
9
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
10
|
+
|
|
11
|
+
//
|
|
12
|
+
// Context
|
|
13
|
+
//
|
|
14
|
+
|
|
15
|
+
type ExampleContextValue = {};
|
|
16
|
+
|
|
17
|
+
const [ExampleContextProvider, useExampleContext] = createContext<ExampleContextValue>('Example');
|
|
18
|
+
|
|
19
|
+
//
|
|
20
|
+
// Root
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
type ExampleRootProps = PropsWithChildren<{}>;
|
|
24
|
+
|
|
25
|
+
const ExampleRoot = ({ children }: ExampleRootProps) => {
|
|
26
|
+
return <ExampleContextProvider>{children}</ExampleContextProvider>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
ExampleRoot.displayName = 'Example.Root';
|
|
30
|
+
|
|
31
|
+
//
|
|
32
|
+
// Content
|
|
33
|
+
//
|
|
34
|
+
|
|
35
|
+
type ExampleContentProps = ThemedClassName<{}>;
|
|
36
|
+
|
|
37
|
+
const ExampleContent = ({ classNames }: ExampleContentProps) => {
|
|
38
|
+
const context = useExampleContext(ExampleContent.displayName);
|
|
39
|
+
return <div className={mx(classNames)}>{JSON.stringify(context)}</div>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
ExampleContent.displayName = 'Example.Content';
|
|
43
|
+
|
|
44
|
+
//
|
|
45
|
+
// Example
|
|
46
|
+
// https://www.radix-ui.com/primitives/docs/guides/composition
|
|
47
|
+
//
|
|
48
|
+
|
|
49
|
+
export const Example = {
|
|
50
|
+
Root: ExampleRoot,
|
|
51
|
+
Content: ExampleContent,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type { ExampleRootProps, ExampleContentProps };
|
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
9
8
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
10
9
|
|
|
11
10
|
export const TemplateContainer = ({ object }: { object: Obj.Any; role: string }) => {
|
|
12
11
|
return (
|
|
13
12
|
<StackItem.Content>
|
|
14
13
|
<pre className='m-4 p-2 ring'>
|
|
15
|
-
<span>{
|
|
14
|
+
<span>{Obj.getDXN(object).toString()}</span>
|
|
16
15
|
</pre>
|
|
17
16
|
</StackItem.Content>
|
|
18
17
|
);
|
package/src/components/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type PluginMeta } from '@dxos/app-framework';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
6
7
|
|
|
7
8
|
export const meta: PluginMeta = {
|
|
8
9
|
id: 'dxos.org/plugin/template',
|
|
9
10
|
name: 'Template',
|
|
11
|
+
description: trim`
|
|
12
|
+
Create reusable templates for documents, tables, and other objects.
|
|
13
|
+
Define structured patterns that can be quickly instantiated with pre-configured content and settings.
|
|
14
|
+
`,
|
|
10
15
|
icon: 'ph--asterisk--regular',
|
|
16
|
+
iconHue: 'sky',
|
|
11
17
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',
|
|
12
18
|
};
|
package/src/types/schema.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
7
|
import { Obj } from '@dxos/echo';
|
|
8
|
-
import { TypedObject } from '@dxos/echo
|
|
8
|
+
import { TypedObject } from '@dxos/echo/internal';
|
|
9
9
|
import { ReactiveObjectSchema } from '@dxos/react-client/echo';
|
|
10
10
|
|
|
11
11
|
import { meta } from '../meta';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/schema.ts", "../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { Obj } from '@dxos/echo';\nimport { TypedObject } from '@dxos/echo-schema';\nimport { ReactiveObjectSchema } from '@dxos/react-client/echo';\n\nimport { meta } from '../meta';\n\nexport namespace Template {\n export class Create extends Schema.TaggedClass<Create>()(`${meta.id}/action/create`, {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: ReactiveObjectSchema,\n }),\n }) {}\n\n export class Data extends TypedObject({\n typename: 'dxos.org/type/Data',\n version: '0.1.0',\n })({\n name: Schema.optional(Schema.String),\n }) {}\n\n export const make = (props: Partial<Data>) => Obj.make(Data, props);\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const meta: PluginMeta = {\n id: 'dxos.org/plugin/template',\n name: 'Template',\n icon: 'ph--asterisk--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-template',\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;AAEvB,SAASC,WAAW;AACpB,SAASC,mBAAmB;AAC5B,SAASC,4BAA4B;;;ACF9B,IAAMC,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;;;UDCiBC,WAAAA;EACR,MAAMC,eAAeC,OAAOC,YAAW,EAAW,GAAGC,KAAKC,EAAE,kBAAkB;IACnFC,OAAOJ,OAAOK,OAAO;MACnBC,MAAMN,OAAOO,SAASP,OAAOQ,MAAM;IACrC,CAAA;IACAC,QAAQT,OAAOK,OAAO;MACpBK,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;YAPSZ,SAAAA;EASN,MAAMa,aAAaC,YAAY;IACpCC,UAAU;IACVC,SAAS;EACX,CAAA,EAAG;IACDT,MAAMN,OAAOO,SAASP,OAAOQ,MAAM;EACrC,CAAA,EAAA;EAAI;YALSI,OAAAA;YAOAI,OAAO,CAACC,UAAyBC,IAAIF,KAAKJ,MAAMK,KAAAA;AAC/D,GAlBiBnB,aAAAA,WAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "Obj", "TypedObject", "ReactiveObjectSchema", "meta", "id", "name", "icon", "source", "Template", "Create", "Schema", "TaggedClass", "meta", "id", "input", "Struct", "name", "optional", "String", "output", "object", "ReactiveObjectSchema", "Data", "TypedObject", "typename", "version", "make", "props", "Obj"]
|
|
7
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Template,
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-LT6IO5CC.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/react-surface.tsx
|
|
7
|
-
import React2 from "react";
|
|
8
|
-
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
9
|
-
import { Obj } from "@dxos/echo";
|
|
10
|
-
|
|
11
|
-
// src/components/TemplateContainer.tsx
|
|
12
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
13
|
-
import React from "react";
|
|
14
|
-
import { fullyQualifiedId } from "@dxos/react-client/echo";
|
|
15
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
16
|
-
var TemplateContainer = ({ object }) => {
|
|
17
|
-
var _effect = _useSignals();
|
|
18
|
-
try {
|
|
19
|
-
return /* @__PURE__ */ React.createElement(StackItem.Content, null, /* @__PURE__ */ React.createElement("pre", {
|
|
20
|
-
className: "m-4 p-2 ring"
|
|
21
|
-
}, /* @__PURE__ */ React.createElement("span", null, fullyQualifiedId(object))));
|
|
22
|
-
} finally {
|
|
23
|
-
_effect.f();
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// src/capabilities/react-surface.tsx
|
|
28
|
-
var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
|
|
29
|
-
id: meta.id,
|
|
30
|
-
role: "article",
|
|
31
|
-
filter: (data) => Obj.instanceOf(Template.Data, data.subject),
|
|
32
|
-
component: ({ data, role }) => /* @__PURE__ */ React2.createElement(TemplateContainer, {
|
|
33
|
-
role,
|
|
34
|
-
object: data.subject
|
|
35
|
-
})
|
|
36
|
-
}));
|
|
37
|
-
export {
|
|
38
|
-
react_surface_default as default
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=react-surface-NRU2N7BS.mjs.map
|
|
@@ -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 { Obj } from '@dxos/echo';\n\nimport { TemplateContainer } from '../components';\nimport { meta } from '../meta';\nimport { Template } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: meta.id,\n role: 'article',\n filter: (data): data is { subject: Obj.Any } => Obj.instanceOf(Template.Data, 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 Obj } from '@dxos/echo';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nexport const TemplateContainer = ({ object }: { object: Obj.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;AACzD,SAASC,WAAW;;;;ACHpB,OAAOC,WAAW;AAGlB,SAASC,wBAAwB;AACjC,SAASC,iBAAiB;AAEnB,IAAMC,oBAAoB,CAAC,EAAEC,OAAM,MAAqC;;;AAC7E,WACE,sBAAA,cAACC,UAAUC,SAAO,MAChB,sBAAA,cAACC,OAAAA;MAAIC,WAAU;OACb,sBAAA,cAACC,QAAAA,MAAMC,iBAAiBN,MAAAA,CAAAA,CAAAA,CAAAA;;;;AAIhC;;;ADLA,IAAA,wBAAe,MACbO,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAIC,KAAKD;EACTE,MAAM;EACNC,QAAQ,CAACC,SAAuCC,IAAIC,WAAWC,SAASC,MAAMJ,KAAKK,OAAO;EAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,gBAAAS,OAAA,cAACC,mBAAAA;IAAkBV;IAAYW,QAAQT,KAAKK;;AAC7E,CAAA,CAAA;",
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "React", "fullyQualifiedId", "StackItem", "TemplateContainer", "object", "StackItem", "Content", "pre", "className", "span", "fullyQualifiedId", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Template", "Data", "subject", "component", "React", "TemplateContainer", "object"]
|
|
7
|
-
}
|