@dxos/plugin-template 0.8.4-main.7ace549 → 0.8.4-main.937b3ca

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.
Files changed (57) hide show
  1. package/dist/lib/browser/chunk-HRH4SQLU.mjs +18 -0
  2. package/dist/lib/browser/chunk-HRH4SQLU.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-TRYLFURO.mjs +18 -0
  4. package/dist/lib/browser/chunk-TRYLFURO.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +28 -45
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/react-surface-FXQGYDUN.mjs +39 -0
  9. package/dist/lib/browser/react-surface-FXQGYDUN.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +1 -1
  11. package/dist/types/src/TemplatePlugin.d.ts +2 -1
  12. package/dist/types/src/TemplatePlugin.d.ts.map +1 -1
  13. package/dist/types/src/capabilities/index.d.ts +1 -2
  14. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  15. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  16. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  17. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  18. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  19. package/dist/types/src/components/TemplateContainer.d.ts +3 -4
  20. package/dist/types/src/components/TemplateContainer.d.ts.map +1 -1
  21. package/dist/types/src/components/index.d.ts +0 -1
  22. package/dist/types/src/components/index.d.ts.map +1 -1
  23. package/dist/types/src/meta.d.ts +2 -2
  24. package/dist/types/src/meta.d.ts.map +1 -1
  25. package/dist/types/src/types/schema.d.ts +7 -23
  26. package/dist/types/src/types/schema.d.ts.map +1 -1
  27. package/dist/types/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +29 -25
  29. package/src/TemplatePlugin.tsx +21 -39
  30. package/src/capabilities/index.ts +1 -4
  31. package/src/capabilities/react-surface/index.ts +7 -0
  32. package/src/capabilities/react-surface/react-surface.tsx +29 -0
  33. package/src/components/TemplateContainer.tsx +7 -4
  34. package/src/components/index.ts +0 -1
  35. package/src/meta.ts +2 -2
  36. package/src/types/schema.ts +9 -18
  37. package/dist/lib/browser/chunk-6T47OUOE.mjs +0 -49
  38. package/dist/lib/browser/chunk-6T47OUOE.mjs.map +0 -7
  39. package/dist/lib/browser/intent-resolver-4BJJ7NBA.mjs +0 -20
  40. package/dist/lib/browser/intent-resolver-4BJJ7NBA.mjs.map +0 -7
  41. package/dist/lib/browser/react-surface-7J6GGCX4.mjs +0 -68
  42. package/dist/lib/browser/react-surface-7J6GGCX4.mjs.map +0 -7
  43. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  44. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  45. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  46. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  47. package/dist/types/src/components/Example/Example.d.ts +0 -16
  48. package/dist/types/src/components/Example/Example.d.ts.map +0 -1
  49. package/dist/types/src/components/Example/Example.stories.d.ts +0 -19
  50. package/dist/types/src/components/Example/Example.stories.d.ts.map +0 -1
  51. package/dist/types/src/components/Example/index.d.ts +0 -2
  52. package/dist/types/src/components/Example/index.d.ts.map +0 -1
  53. package/src/capabilities/intent-resolver.ts +0 -18
  54. package/src/capabilities/react-surface.tsx +0 -23
  55. package/src/components/Example/Example.stories.tsx +0 -32
  56. package/src/components/Example/Example.tsx +0 -54
  57. package/src/components/Example/index.ts +0 -5
@@ -1,54 +0,0 @@
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 };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- export * from './Example';