@dxos/plugin-registry 0.8.4-main.f9ba587 → 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/{app-graph-builder-LKQBQDUA.mjs → app-graph-builder-6CNBP3A4.mjs} +27 -26
- package/dist/lib/browser/app-graph-builder-6CNBP3A4.mjs.map +7 -0
- package/dist/lib/browser/chunk-XPEFEID2.mjs +19 -0
- package/dist/lib/browser/chunk-XPEFEID2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-W67CIJI3.mjs → intent-resolver-LKNUYBTN.mjs} +5 -5
- package/dist/lib/browser/{intent-resolver-W67CIJI3.mjs.map → intent-resolver-LKNUYBTN.mjs.map} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-SRFVJQKE.mjs → react-surface-IGCXOVE2.mjs} +116 -92
- package/dist/lib/browser/react-surface-IGCXOVE2.mjs.map +7 -0
- package/dist/types/src/RegistryPlugin.d.ts +1 -1
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -3
- 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/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts +29 -5
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginItem.d.ts +1 -1
- package/dist/types/src/components/PluginItem.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.stories.d.ts +31 -8
- package/dist/types/src/components/PluginList.stories.d.ts.map +1 -1
- package/dist/types/src/components/RegistryContainer.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +3 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -30
- package/src/RegistryPlugin.tsx +23 -24
- package/src/capabilities/app-graph-builder.ts +27 -26
- package/src/capabilities/intent-resolver.ts +4 -4
- package/src/capabilities/react-surface.tsx +9 -13
- package/src/components/PluginDetail.stories.tsx +9 -9
- package/src/components/PluginDetail.tsx +53 -34
- package/src/components/PluginItem.tsx +53 -52
- package/src/components/PluginList.stories.tsx +25 -27
- package/src/components/PluginList.tsx +2 -4
- package/src/components/RegistryContainer.tsx +3 -11
- package/src/meta.ts +6 -3
- package/src/types.ts +5 -1
- package/dist/lib/browser/app-graph-builder-LKQBQDUA.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEBASNOI.mjs +0 -16
- package/dist/lib/browser/chunk-AEBASNOI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SRFVJQKE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-N44OGVQA.mjs +0 -162
- package/dist/lib/node-esm/app-graph-builder-N44OGVQA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-R3GXMWPJ.mjs +0 -18
- package/dist/lib/node-esm/chunk-R3GXMWPJ.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -72
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-M2CBVUVQ.mjs +0 -24
- package/dist/lib/node-esm/intent-resolver-M2CBVUVQ.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-5XAG2EYX.mjs +0 -336
- package/dist/lib/node-esm/react-surface-5XAG2EYX.mjs.map +0 -7
- package/dist/types/src/components/Icon.stories.d.ts +0 -6
- package/dist/types/src/components/Icon.stories.d.ts.map +0 -1
- package/src/components/Icon.stories.tsx +0 -107
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { IconBase, type IconWeight, GithubLogo, type IconProps } from '@phosphor-icons/react';
|
|
8
|
-
import { type Meta } from '@storybook/react-vite';
|
|
9
|
-
import React, { forwardRef, type SVGProps, type ReactElement } from 'react';
|
|
10
|
-
|
|
11
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Serializable icon props.
|
|
15
|
-
*/
|
|
16
|
-
type StoryIconProps = {
|
|
17
|
-
name: string;
|
|
18
|
-
weights: Record<string, SVGProps<SVGPathElement>[]>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Create icon from serializable data.
|
|
23
|
-
* https://github.com/phosphor-icons/react#custom-icons
|
|
24
|
-
* https://github.com/phosphor-icons/core/tree/main/assets
|
|
25
|
-
*/
|
|
26
|
-
const createIcon = ({ name, weights }: StoryIconProps) => {
|
|
27
|
-
const CustomIcon = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
|
|
28
|
-
<IconBase
|
|
29
|
-
ref={ref}
|
|
30
|
-
{...props}
|
|
31
|
-
weights={
|
|
32
|
-
new Map<IconWeight, ReactElement>(
|
|
33
|
-
Object.entries(weights).map(
|
|
34
|
-
([key, paths]) =>
|
|
35
|
-
[
|
|
36
|
-
key,
|
|
37
|
-
<>
|
|
38
|
-
{paths.map((props, i) => (
|
|
39
|
-
<path key={`${key}-${i}`} {...props} />
|
|
40
|
-
))}
|
|
41
|
-
</>,
|
|
42
|
-
] as [IconWeight, ReactElement],
|
|
43
|
-
),
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
/>
|
|
47
|
-
));
|
|
48
|
-
CustomIcon.displayName = name;
|
|
49
|
-
return CustomIcon;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const DefaultStory = () => {
|
|
53
|
-
const CustomIcon = createIcon({
|
|
54
|
-
name: 'GithubLogo',
|
|
55
|
-
weights: {
|
|
56
|
-
// https://github.com/phosphor-icons/core/tree/main/assets
|
|
57
|
-
// <path d="M119.83,56A52,52,0,0,0,76,32a51.92,51.92,0,0,0-3.49,44.7A49.28,49.28,0,0,0,64,104v8a48,48,0,0,0,48,48h48a48,48,0,0,0,48-48v-8a49.28,49.28,0,0,0-8.51-27.3A51.92,51.92,0,0,0,196,32a52,52,0,0,0-43.83,24Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
58
|
-
// <path d="M104,232V192a32,32,0,0,1,32-32h0a32,32,0,0,1,32,32v40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
59
|
-
// <path d="M104,208H72a32,32,0,0,1-32-32A32,32,0,0,0,8,144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
60
|
-
regular: [
|
|
61
|
-
{
|
|
62
|
-
d: 'M119.83,56A52,52,0,0,0,76,32a51.92,51.92,0,0,0-3.49,44.7A49.28,49.28,0,0,0,64,104v8a48,48,0,0,0,48,48h48a48,48,0,0,0,48-48v-8a49.28,49.28,0,0,0-8.51-27.3A51.92,51.92,0,0,0,196,32a52,52,0,0,0-43.83,24Z',
|
|
63
|
-
fill: 'none',
|
|
64
|
-
stroke: 'currentColor',
|
|
65
|
-
strokeLinecap: 'round',
|
|
66
|
-
strokeLinejoin: 'round',
|
|
67
|
-
strokeWidth: '16',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
d: 'M104,232V192a32,32,0,0,1,32-32h0a32,32,0,0,1,32,32v40',
|
|
71
|
-
fill: 'none',
|
|
72
|
-
stroke: 'currentColor',
|
|
73
|
-
strokeLinecap: 'round',
|
|
74
|
-
strokeLinejoin: 'round',
|
|
75
|
-
strokeWidth: '16',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
d: 'M104,208H72a32,32,0,0,1-32-32A32,32,0,0,0,8,144',
|
|
79
|
-
fill: 'none',
|
|
80
|
-
stroke: 'currentColor',
|
|
81
|
-
strokeLinecap: 'round',
|
|
82
|
-
strokeLinejoin: 'round',
|
|
83
|
-
strokeWidth: '16',
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<div className='flex gap-4 p-8 ring'>
|
|
91
|
-
<CustomIcon weight={'regular'} className={mx(getSize(8))} />
|
|
92
|
-
<GithubLogo weight={'regular'} className={mx(getSize(8))} />
|
|
93
|
-
</div>
|
|
94
|
-
);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const Default = {};
|
|
98
|
-
|
|
99
|
-
const meta: Meta = {
|
|
100
|
-
title: 'plugins/plugin-registry/Icon',
|
|
101
|
-
render: DefaultStory,
|
|
102
|
-
parameters: {
|
|
103
|
-
layout: 'centered',
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export default meta;
|