@xyo-network/react-embed 6.1.4 → 7.0.0
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/browser/index.d.ts +4 -194
- package/package.json +25 -21
- package/src/global.d.ts +1 -1
- package/typedoc.json +0 -5
- package/xy.config.ts +0 -10
package/dist/browser/index.d.ts
CHANGED
@@ -1,194 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import react__default, { PropsWithChildren, Dispatch, SetStateAction } from 'react';
|
6
|
-
import * as _xyo_network_payload_model from '@xyo-network/payload-model';
|
7
|
-
import { ModuleError, Payload } from '@xyo-network/payload-model';
|
8
|
-
import * as _xyo_network_react_payload_plugin from '@xyo-network/react-payload-plugin';
|
9
|
-
import { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin';
|
10
|
-
import { ListMode } from '@xyo-network/react-shared';
|
11
|
-
|
12
|
-
interface BusyCardProps extends CardProps {
|
13
|
-
busy?: boolean;
|
14
|
-
busyMinimum?: number;
|
15
|
-
busyVariant?: BusyVariant;
|
16
|
-
busyVariantProps?: BusyCircularProgressProps | BusyLinearProgressProps;
|
17
|
-
}
|
18
|
-
declare const BusyCard: react__default.FC<PropsWithChildren<BusyCardProps>>;
|
19
|
-
|
20
|
-
declare const EmbedCardHeader: react__default.FC<CardHeaderProps>;
|
21
|
-
|
22
|
-
declare const EmbedPluginCard: react__default.FC<BusyCardProps>;
|
23
|
-
|
24
|
-
interface EmbedPluginVisibilityConfig {
|
25
|
-
hideAvatar?: boolean;
|
26
|
-
hideCardActions?: boolean;
|
27
|
-
hideCardHeader?: boolean;
|
28
|
-
hideErrorDetails?: boolean;
|
29
|
-
hideRefreshButton?: boolean;
|
30
|
-
hideTimestamp?: boolean;
|
31
|
-
hideTitle?: boolean;
|
32
|
-
}
|
33
|
-
/**
|
34
|
-
* Extend for custom plugin configuration
|
35
|
-
*/
|
36
|
-
interface PluginConfig {
|
37
|
-
listMode?: ListMode;
|
38
|
-
}
|
39
|
-
interface EmbedPluginBase {
|
40
|
-
/** EmbedPlugin component configuration */
|
41
|
-
embedPluginConfig?: PluginConfig;
|
42
|
-
hideElementsConfig?: EmbedPluginVisibilityConfig;
|
43
|
-
/** @deprecated use huriPayload */
|
44
|
-
huri?: string;
|
45
|
-
plugins?: PayloadRenderPlugin[];
|
46
|
-
refreshTitle?: string;
|
47
|
-
timestampLabel?: string;
|
48
|
-
}
|
49
|
-
type EmbedPluginState = ContextExState<EmbedPluginBase & {
|
50
|
-
activePlugin?: PayloadRenderPlugin;
|
51
|
-
setActivePlugin?: Dispatch<SetStateAction<PayloadRenderPlugin | undefined>>;
|
52
|
-
}>;
|
53
|
-
|
54
|
-
declare const EmbedPluginContext: react.Context<(EmbedPluginBase & {
|
55
|
-
activePlugin?: _xyo_network_react_payload_plugin.PayloadRenderPlugin;
|
56
|
-
setActivePlugin?: react.Dispatch<react.SetStateAction<_xyo_network_react_payload_plugin.PayloadRenderPlugin | undefined>>;
|
57
|
-
} & {
|
58
|
-
provided: true;
|
59
|
-
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.ProvidedContextExState<EmbedPluginBase & {
|
60
|
-
activePlugin?: _xyo_network_react_payload_plugin.PayloadRenderPlugin;
|
61
|
-
setActivePlugin?: react.Dispatch<react.SetStateAction<_xyo_network_react_payload_plugin.PayloadRenderPlugin | undefined>>;
|
62
|
-
}>, never> & {
|
63
|
-
provided: false;
|
64
|
-
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.NotProvidedContextExState<EmbedPluginBase & {
|
65
|
-
activePlugin?: _xyo_network_react_payload_plugin.PayloadRenderPlugin;
|
66
|
-
setActivePlugin?: react.Dispatch<react.SetStateAction<_xyo_network_react_payload_plugin.PayloadRenderPlugin | undefined>>;
|
67
|
-
}>, never> & {
|
68
|
-
provided: false;
|
69
|
-
})>;
|
70
|
-
|
71
|
-
type EmbedPluginProviderProps = EmbedPluginBase;
|
72
|
-
/** Expose passed embed plugin props via context */
|
73
|
-
declare const EmbedPluginProvider: react__default.FC<PropsWithChildren<EmbedPluginProviderProps>>;
|
74
|
-
|
75
|
-
declare const useEmbedPluginState: () => Omit<EmbedPluginBase & {
|
76
|
-
activePlugin?: _xyo_network_react_payload_plugin.PayloadRenderPlugin;
|
77
|
-
setActivePlugin?: react.Dispatch<react.SetStateAction<_xyo_network_react_payload_plugin.PayloadRenderPlugin | undefined>>;
|
78
|
-
} & {
|
79
|
-
provided: true;
|
80
|
-
}, "provided"> | Omit<_xylabs_react_shared.NotProvidedContextExState<EmbedPluginState>, "provided">;
|
81
|
-
|
82
|
-
interface RefreshPayloadProps {
|
83
|
-
onRefresh?: () => void;
|
84
|
-
refreshPayload?: boolean;
|
85
|
-
}
|
86
|
-
declare const RefreshPayloadProvider: react__default.FC<PropsWithChildren<RefreshPayloadProps>>;
|
87
|
-
|
88
|
-
type RefreshPayloadState = ContextExState<{
|
89
|
-
onRefresh?: () => void;
|
90
|
-
refreshPayload?: boolean;
|
91
|
-
setRefreshPayload?: Dispatch<SetStateAction<boolean | undefined>>;
|
92
|
-
}>;
|
93
|
-
|
94
|
-
declare const useRefreshPayload: () => Omit<{
|
95
|
-
onRefresh?: () => void;
|
96
|
-
refreshPayload?: boolean;
|
97
|
-
setRefreshPayload?: react.Dispatch<react.SetStateAction<boolean | undefined>>;
|
98
|
-
} & {
|
99
|
-
provided: true;
|
100
|
-
}, "provided"> | Omit<_xylabs_react_shared.NotProvidedContextExState<RefreshPayloadState>, "provided">;
|
101
|
-
|
102
|
-
declare const ResolvePayloadContext: react.Context<({
|
103
|
-
huri?: string;
|
104
|
-
huriError?: _xyo_network_payload_model.ModuleError;
|
105
|
-
huriPayload?: string | _xyo_network_payload_model.Payload;
|
106
|
-
notFound?: boolean;
|
107
|
-
payload?: _xyo_network_payload_model.Payload;
|
108
|
-
refreshHuri?: () => void;
|
109
|
-
setPayload?: react.Dispatch<react.SetStateAction<_xyo_network_payload_model.Payload | undefined>>;
|
110
|
-
} & {
|
111
|
-
provided: true;
|
112
|
-
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.ProvidedContextExState<{
|
113
|
-
huri?: string;
|
114
|
-
huriError?: _xyo_network_payload_model.ModuleError;
|
115
|
-
huriPayload?: string | _xyo_network_payload_model.Payload;
|
116
|
-
notFound?: boolean;
|
117
|
-
payload?: _xyo_network_payload_model.Payload;
|
118
|
-
refreshHuri?: () => void;
|
119
|
-
setPayload?: react.Dispatch<react.SetStateAction<_xyo_network_payload_model.Payload | undefined>>;
|
120
|
-
}>, never> & {
|
121
|
-
provided: false;
|
122
|
-
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.NotProvidedContextExState<{
|
123
|
-
huri?: string;
|
124
|
-
huriError?: _xyo_network_payload_model.ModuleError;
|
125
|
-
huriPayload?: string | _xyo_network_payload_model.Payload;
|
126
|
-
notFound?: boolean;
|
127
|
-
payload?: _xyo_network_payload_model.Payload;
|
128
|
-
refreshHuri?: () => void;
|
129
|
-
setPayload?: react.Dispatch<react.SetStateAction<_xyo_network_payload_model.Payload | undefined>>;
|
130
|
-
}>, never> & {
|
131
|
-
provided: false;
|
132
|
-
})>;
|
133
|
-
|
134
|
-
type ResolvePayloadState = ContextExState<{
|
135
|
-
huri?: string;
|
136
|
-
huriError?: ModuleError;
|
137
|
-
huriPayload?: string | Payload;
|
138
|
-
notFound?: boolean;
|
139
|
-
payload?: Payload;
|
140
|
-
refreshHuri?: () => void;
|
141
|
-
setPayload?: Dispatch<SetStateAction<Payload | undefined>>;
|
142
|
-
}>;
|
143
|
-
|
144
|
-
type ResolvePayloadProviderProps = Omit<ResolvePayloadState, 'provided'>;
|
145
|
-
declare const ResolvePayloadProvider: react__default.FC<PropsWithChildren<ResolvePayloadProviderProps>>;
|
146
|
-
|
147
|
-
declare const useResolvePayload: () => Omit<{
|
148
|
-
huri?: string;
|
149
|
-
huriError?: _xyo_network_payload_model.ModuleError;
|
150
|
-
huriPayload?: string | _xyo_network_payload_model.Payload;
|
151
|
-
notFound?: boolean;
|
152
|
-
payload?: _xyo_network_payload_model.Payload;
|
153
|
-
refreshHuri?: () => void;
|
154
|
-
setPayload?: react.Dispatch<react.SetStateAction<_xyo_network_payload_model.Payload | undefined>>;
|
155
|
-
} & {
|
156
|
-
provided: true;
|
157
|
-
}, "provided"> | Omit<_xylabs_react_shared.NotProvidedContextExState<ResolvePayloadState>, "provided">;
|
158
|
-
|
159
|
-
interface ValidatePayloadProviderProps {
|
160
|
-
enabled?: boolean;
|
161
|
-
}
|
162
|
-
declare const ValidatePayloadProvider: react__default.FC<PropsWithChildren<ValidatePayloadProviderProps>>;
|
163
|
-
|
164
|
-
type ValidatePayloadState = ContextExState<{
|
165
|
-
enabled?: boolean;
|
166
|
-
schema?: string;
|
167
|
-
validPayload?: boolean;
|
168
|
-
}>;
|
169
|
-
|
170
|
-
declare const useValidatePayload: () => Omit<{
|
171
|
-
enabled?: boolean;
|
172
|
-
schema?: string;
|
173
|
-
validPayload?: boolean;
|
174
|
-
} & {
|
175
|
-
provided: true;
|
176
|
-
}, "provided"> | Omit<_xylabs_react_shared.NotProvidedContextExState<ValidatePayloadState>, "provided">;
|
177
|
-
|
178
|
-
interface EmbedPluginProps extends EmbedPluginBase {
|
179
|
-
hideElementsConfig?: EmbedPluginVisibilityConfig;
|
180
|
-
huriPayload?: string | Payload;
|
181
|
-
/** string for huri to resolve and payload for bypassing huri resolution */
|
182
|
-
onRefresh?: () => void;
|
183
|
-
validateSchema?: boolean;
|
184
|
-
}
|
185
|
-
|
186
|
-
interface EmbedPluginCardProps extends PropsWithChildren, EmbedPluginProps, BusyCardProps {
|
187
|
-
}
|
188
|
-
declare const ApiEmbedPluginCard: react__default.FC<EmbedPluginCardProps>;
|
189
|
-
declare const EmbedPluginCardInner: react__default.FC<BusyCardProps>;
|
190
|
-
|
191
|
-
declare const EmbedPluginInner: react__default.FC<PropsWithChildren<EmbedPluginProps>>;
|
192
|
-
|
193
|
-
export { ApiEmbedPluginCard, BusyCard, EmbedCardHeader, EmbedPluginCard as EmbedPlugin, EmbedPluginCard, EmbedPluginCardInner, EmbedPluginContext, EmbedPluginInner, EmbedPluginProvider, RefreshPayloadProvider, ResolvePayloadContext, ResolvePayloadProvider, ValidatePayloadProvider, useEmbedPluginState, useRefreshPayload, useResolvePayload, useValidatePayload };
|
194
|
-
export type { BusyCardProps, EmbedPluginBase, EmbedPluginCardProps, EmbedPluginProps, EmbedPluginProviderProps, EmbedPluginState, EmbedPluginVisibilityConfig, PluginConfig, RefreshPayloadProps, RefreshPayloadState, ResolvePayloadProviderProps, ResolvePayloadState, ValidatePayloadProviderProps, ValidatePayloadState };
|
1
|
+
export * from './components/index.ts';
|
2
|
+
export * from './contexts/index.ts';
|
3
|
+
export * from './types/index.ts';
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xyo-network/react-embed",
|
3
|
-
"version": "
|
3
|
+
"version": "7.0.0",
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
5
5
|
"keywords": [
|
6
6
|
"xyo",
|
@@ -38,19 +38,23 @@
|
|
38
38
|
},
|
39
39
|
"module": "dist/browser/index.mjs",
|
40
40
|
"types": "dist/browser/index.d.ts",
|
41
|
+
"files": [
|
42
|
+
"dist",
|
43
|
+
"src"
|
44
|
+
],
|
41
45
|
"dependencies": {
|
42
|
-
"@xylabs/delay": "^
|
43
|
-
"@xylabs/react-async-effect": "^
|
44
|
-
"@xylabs/react-error": "^
|
45
|
-
"@xylabs/react-flexbox": "^
|
46
|
-
"@xylabs/react-hooks": "^
|
47
|
-
"@xylabs/react-select": "^
|
48
|
-
"@xylabs/react-shared": "^
|
49
|
-
"@xyo-network/huri": "^
|
50
|
-
"@xyo-network/payload-model": "^
|
51
|
-
"@xyo-network/react-payload-plugin": "^
|
52
|
-
"@xyo-network/react-shared": "^
|
53
|
-
"@xyo-network/schema-cache": "^
|
46
|
+
"@xylabs/delay": "^5.0.0",
|
47
|
+
"@xylabs/react-async-effect": "^7.0.0",
|
48
|
+
"@xylabs/react-error": "^7.0.0",
|
49
|
+
"@xylabs/react-flexbox": "^7.0.0",
|
50
|
+
"@xylabs/react-hooks": "^7.0.0",
|
51
|
+
"@xylabs/react-select": "^7.0.0",
|
52
|
+
"@xylabs/react-shared": "^7.0.0",
|
53
|
+
"@xyo-network/huri": "^5.0.0",
|
54
|
+
"@xyo-network/payload-model": "^5.0.0",
|
55
|
+
"@xyo-network/react-payload-plugin": "^7.0.0",
|
56
|
+
"@xyo-network/react-shared": "^7.0.0",
|
57
|
+
"@xyo-network/schema-cache": "^5.0.0"
|
54
58
|
},
|
55
59
|
"devDependencies": {
|
56
60
|
"@emotion/react": "^11.14.0",
|
@@ -58,14 +62,14 @@
|
|
58
62
|
"@mui/icons-material": "^7.2.0",
|
59
63
|
"@mui/material": "^7.2.0",
|
60
64
|
"@storybook/react-vite": "^9.0.18",
|
61
|
-
"@types/react": "^19.1.
|
62
|
-
"@xylabs/ts-scripts-yarn3": "
|
63
|
-
"@xylabs/tsconfig-react": "
|
64
|
-
"@xyo-network/react-aggregate-price-plugin": "^
|
65
|
-
"@xyo-network/react-crypto-market-uniswap-plugin": "^
|
66
|
-
"react": "^19.1.
|
67
|
-
"react-dom": "^19.1.
|
68
|
-
"react-router-dom": "^7.7.
|
65
|
+
"@types/react": "^19.1.9",
|
66
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.2",
|
67
|
+
"@xylabs/tsconfig-react": "^7.0.2",
|
68
|
+
"@xyo-network/react-aggregate-price-plugin": "^7.0.0",
|
69
|
+
"@xyo-network/react-crypto-market-uniswap-plugin": "^7.0.0",
|
70
|
+
"react": "^19.1.1",
|
71
|
+
"react-dom": "^19.1.1",
|
72
|
+
"react-router-dom": "^7.7.1",
|
69
73
|
"storybook": "^9.0.18",
|
70
74
|
"typescript": "^5.8.3"
|
71
75
|
},
|
package/src/global.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import '@mui/material/themeCssVarsAugmentation'
|
package/typedoc.json
DELETED