@optiaxiom/proteus 1.0.0 → 1.1.1
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/esm/_virtual/_openai-shim-script.js +3 -2
- package/dist/esm/assets/src/proteus-chart/{ProteusChart.css.ts.vanilla-BeRNNwBj.css → ProteusChart.css.ts.vanilla-BxkAs8DI.css} +2 -2
- package/dist/esm/assets/src/proteus-chart/{ProteusChartTooltipContent.css.ts.vanilla-Df_IhL_i.css → ProteusChartTooltipContent.css.ts.vanilla-D-SePpAZ.css} +2 -2
- package/dist/esm/assets/src/proteus-document/{ProteusDocumentShell.css.ts.vanilla-CyMtrn1n.css → ProteusDocumentShell.css.ts.vanilla-ED0xFm5G.css} +2 -2
- package/dist/esm/assets/src/proteus-image-carousel/{ProteusImageCarousel.css.ts.vanilla-Dbf7yRF1.css → ProteusImageCarousel.css.ts.vanilla-wUNZklfd.css} +2 -2
- package/dist/esm/assets/src/proteus-question/{ProteusQuestion.css.ts.vanilla-cmHZWqNR.css → ProteusQuestion.css.ts.vanilla-DJDdM2PO.css} +2 -2
- package/dist/esm/hooks/useEffectEvent.js +11 -10
- package/dist/esm/hooks/useObserveValue.js +24 -30
- package/dist/esm/icons/IconAngleLeft.js +13 -19
- package/dist/esm/icons/IconAngleRight.js +13 -19
- package/dist/esm/icons/IconX.js +10 -18
- package/dist/esm/icons/withIcon.js +17 -28
- package/dist/esm/index.js +22 -17
- package/dist/esm/proteus-action/ProteusAction.js +44 -39
- package/dist/esm/proteus-bridge/ProteusBridge.js +71 -85
- package/dist/esm/proteus-card-link/ProteusCardLink.js +24 -37
- package/dist/esm/proteus-chart/ProteusChart-css.js +14 -5
- package/dist/esm/proteus-chart/ProteusChart.js +86 -84
- package/dist/esm/proteus-chart/ProteusChartContext.js +3 -3
- package/dist/esm/proteus-chart/ProteusChartTooltipContent-css.js +23 -6
- package/dist/esm/proteus-chart/ProteusChartTooltipContent.js +52 -66
- package/dist/esm/proteus-data-table/ProteusDataTable.js +28 -29
- package/dist/esm/proteus-date-input/ProteusDateInput.js +23 -0
- package/dist/esm/proteus-document/ProteusDocumentContext.js +4 -3
- package/dist/esm/proteus-document/ProteusDocumentPathContext.js +6 -5
- package/dist/esm/proteus-document/ProteusDocumentRenderer.js +25 -33
- package/dist/esm/proteus-document/ProteusDocumentShell-css.js +32 -6
- package/dist/esm/proteus-document/ProteusDocumentShell.js +226 -219
- package/dist/esm/proteus-document/getProteusValue.js +28 -42
- package/dist/esm/proteus-document/resolveProteusProp.js +31 -49
- package/dist/esm/proteus-document/resolveProteusValue.js +73 -136
- package/dist/esm/proteus-document/schemas.js +42 -45
- package/dist/esm/proteus-document/useResolveProteusValues.js +10 -16
- package/dist/esm/proteus-element/ProteusElement.js +114 -180
- package/dist/esm/proteus-federated/ProteusFederated.js +70 -52
- package/dist/esm/proteus-file-icon/ProteusFileIcon.js +29 -38
- package/dist/esm/proteus-file-upload/ProteusFileUpload.js +107 -133
- package/dist/esm/proteus-image/ProteusImage.js +99 -106
- package/dist/esm/proteus-image/downloadFile.js +3 -2
- package/dist/esm/proteus-image-carousel/ProteusImageCarousel-css.js +49 -11
- package/dist/esm/proteus-image-carousel/ProteusImageCarousel.js +151 -163
- package/dist/esm/proteus-input/ProteusInput.js +19 -27
- package/dist/esm/proteus-length/ProteusLength.js +10 -0
- package/dist/esm/proteus-map/ProteusMap.js +18 -31
- package/dist/esm/proteus-map-index/ProteusMapIndex.js +11 -0
- package/dist/esm/proteus-pill-menu/ProteusPillMenu.js +65 -0
- package/dist/esm/proteus-pill-menu/useInputValueChangeInteraction.js +36 -0
- package/dist/esm/proteus-question/ProteusQuestion-css.js +40 -8
- package/dist/esm/proteus-question/ProteusQuestion.js +324 -400
- package/dist/esm/proteus-select/ProteusSelect.js +25 -40
- package/dist/esm/proteus-show/ProteusShow.js +10 -18
- package/dist/esm/proteus-switch/ProteusSwitch.js +33 -36
- package/dist/esm/proteus-textarea/ProteusTextarea.js +18 -27
- package/dist/esm/proteus-value/ProteusValue.js +4 -4
- package/dist/esm/schema/public-schema.js +4537 -0
- package/dist/esm/schema/runtime-schema.js +4460 -0
- package/dist/esm/spec.js +5 -1
- package/dist/esm/use-proteus-value/useProteusValue.js +8 -12
- package/dist/index.d.ts +517 -347
- package/dist/spec.d.ts +5 -9952
- package/package.json +5 -5
- package/dist/esm/icons/IconCalendar.js +0 -20
- package/dist/esm/schema/public-schema.json.js +0 -9026
- package/dist/esm/schema/runtime-schema.json.js +0 -8959
package/dist/index.d.ts
CHANGED
|
@@ -1,448 +1,618 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { BoxProps, ButtonProps, DateInputProps, Disclosure, InputProps, SelectProps, TextareaProps } from "@optiaxiom/react";
|
|
2
|
+
import { ComponentPropsWithoutRef, ComponentType, ReactNode } from "react";
|
|
3
|
+
import * as ReactJsxRuntime from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
+
//#region src/proteus-bridge/ProteusBridge.d.ts
|
|
5
6
|
type ProteusBridgeProps = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Content rendered on platforms without iframe support
|
|
9
|
+
*/
|
|
10
|
+
fallback?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Height of the iframe in pixels
|
|
13
|
+
*/
|
|
14
|
+
height?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Resource URI identifying the MCP app to render
|
|
17
|
+
*/
|
|
18
|
+
resource: string;
|
|
18
19
|
};
|
|
19
|
-
declare function ProteusBridge({
|
|
20
|
+
declare function ProteusBridge({
|
|
21
|
+
height,
|
|
22
|
+
resource
|
|
23
|
+
}: ProteusBridgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
24
|
declare namespace ProteusBridge {
|
|
21
|
-
|
|
25
|
+
var displayName: string;
|
|
22
26
|
}
|
|
23
|
-
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/proteus-chart/ProteusChart.d.ts
|
|
24
29
|
type Series = {
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
dataKey: string;
|
|
31
|
+
name?: string;
|
|
27
32
|
};
|
|
28
33
|
type ProteusChartProps = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Chart data records, either inline, a ProteusValue reference, or a
|
|
36
|
+
* ProteusZip transformation
|
|
37
|
+
*/
|
|
38
|
+
data: Record<string, unknown>[];
|
|
39
|
+
/**
|
|
40
|
+
* Chart layout direction
|
|
41
|
+
*/
|
|
42
|
+
layout?: "horizontal" | "vertical";
|
|
43
|
+
/**
|
|
44
|
+
* Data series configuration
|
|
45
|
+
*/
|
|
46
|
+
series?: Series[];
|
|
47
|
+
/**
|
|
48
|
+
* Chart type
|
|
49
|
+
*/
|
|
50
|
+
type: "bar" | "line";
|
|
51
|
+
/**
|
|
52
|
+
* Key in data records for x-axis labels
|
|
53
|
+
*/
|
|
54
|
+
xAxisKey?: string;
|
|
50
55
|
};
|
|
51
|
-
declare
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
declare function ProteusChart({
|
|
57
|
+
data,
|
|
58
|
+
layout,
|
|
59
|
+
series,
|
|
60
|
+
type,
|
|
61
|
+
xAxisKey
|
|
62
|
+
}: ProteusChartProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
declare namespace ProteusChart {
|
|
64
|
+
var displayName: string;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/proteus-data-table/ProteusDataTable.d.ts
|
|
56
68
|
type ProteusDataTableProps = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Column definitions
|
|
71
|
+
*/
|
|
72
|
+
columns?: ColumnDef[];
|
|
73
|
+
/**
|
|
74
|
+
* Column data
|
|
75
|
+
*/
|
|
76
|
+
data?: Record<string, unknown>[];
|
|
65
77
|
};
|
|
66
78
|
type ColumnDef = {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
declare const ProteusDataTable: {
|
|
76
|
-
({ columns, data }: ProteusDataTableProps): react_jsx_runtime.JSX.Element;
|
|
77
|
-
displayName: string;
|
|
79
|
+
accessorKey: string;
|
|
80
|
+
format?: string | {
|
|
81
|
+
options?: Record<string, unknown>;
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
header: string;
|
|
85
|
+
size?: number;
|
|
78
86
|
};
|
|
79
|
-
|
|
87
|
+
declare function ProteusDataTable({
|
|
88
|
+
columns,
|
|
89
|
+
data
|
|
90
|
+
}: ProteusDataTableProps): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
declare namespace ProteusDataTable {
|
|
92
|
+
var displayName: string;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/proteus-federated/ProteusFederated.d.ts
|
|
80
96
|
type ProteusFederatedProps = {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
/**
|
|
98
|
+
* URL to the remote's remoteEntry.js or mf-manifest.json
|
|
99
|
+
*/
|
|
100
|
+
entry: string;
|
|
101
|
+
/**
|
|
102
|
+
* The key from the remote's ModuleFederationPlugin exposes config (e.g. './App'). Defaults to '.' (root export)
|
|
103
|
+
*/
|
|
104
|
+
exposeKey?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Content rendered when the federated component fails to load
|
|
107
|
+
*/
|
|
108
|
+
fallback?: ReactNode;
|
|
93
109
|
};
|
|
94
|
-
declare function ProteusFederated({
|
|
110
|
+
declare function ProteusFederated({
|
|
111
|
+
entry,
|
|
112
|
+
exposeKey,
|
|
113
|
+
fallback
|
|
114
|
+
}: ProteusFederatedProps): ReactJsxRuntime.JSX.Element | null;
|
|
95
115
|
declare namespace ProteusFederated {
|
|
96
|
-
|
|
116
|
+
var displayName: string;
|
|
97
117
|
}
|
|
98
|
-
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/proteus-file-upload/ProteusFileUpload.d.ts
|
|
99
120
|
type ProteusFileUploadProps = {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
/**
|
|
122
|
+
* File types to accept; array of MIME types or extensions.
|
|
123
|
+
*
|
|
124
|
+
* @example ["image/*", ".pdf"]
|
|
125
|
+
*/
|
|
126
|
+
accept?: string[];
|
|
127
|
+
/**
|
|
128
|
+
* Maximum number of files allowed. When set to `1` the field is in
|
|
129
|
+
* single-file mode; any other value (or omitted) allows multiple uploads.
|
|
130
|
+
*/
|
|
131
|
+
maxFiles?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Minimum number of files required.
|
|
134
|
+
*/
|
|
135
|
+
minFiles?: number;
|
|
136
|
+
/**
|
|
137
|
+
* The name of the form control element. The resolved metadata array is
|
|
138
|
+
* written at `parentPath/name` in form data once the host's `onUpload`
|
|
139
|
+
* resolves.
|
|
140
|
+
*/
|
|
141
|
+
name?: string;
|
|
121
142
|
};
|
|
122
|
-
declare function ProteusFileUpload({
|
|
143
|
+
declare function ProteusFileUpload({
|
|
144
|
+
accept,
|
|
145
|
+
maxFiles,
|
|
146
|
+
minFiles,
|
|
147
|
+
name
|
|
148
|
+
}: ProteusFileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
123
149
|
declare namespace ProteusFileUpload {
|
|
124
|
-
|
|
150
|
+
var displayName: string;
|
|
125
151
|
}
|
|
126
|
-
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/proteus-image-carousel/ProteusImageCarousel.d.ts
|
|
127
154
|
type ProteusImageCarouselProps = {
|
|
155
|
+
/**
|
|
156
|
+
* Array of image data to display in the carousel.
|
|
157
|
+
*/
|
|
158
|
+
images: Array<{
|
|
159
|
+
/**
|
|
160
|
+
* Alternative text for the image.
|
|
161
|
+
*/
|
|
162
|
+
alt?: string;
|
|
128
163
|
/**
|
|
129
|
-
*
|
|
164
|
+
* The URL to the full image.
|
|
130
165
|
*/
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Alternative text for the image.
|
|
134
|
-
*/
|
|
135
|
-
alt?: string;
|
|
136
|
-
/**
|
|
137
|
-
* The URL to the full image.
|
|
138
|
-
*/
|
|
139
|
-
src: string;
|
|
140
|
-
/**
|
|
141
|
-
* The URL to the image thumbnail.
|
|
142
|
-
*/
|
|
143
|
-
thumb?: string;
|
|
144
|
-
}>;
|
|
166
|
+
src: string;
|
|
145
167
|
/**
|
|
146
|
-
*
|
|
168
|
+
* The URL to the image thumbnail.
|
|
147
169
|
*/
|
|
148
|
-
|
|
170
|
+
thumb?: string;
|
|
171
|
+
}>;
|
|
172
|
+
/**
|
|
173
|
+
* Accessible label for the carousel region.
|
|
174
|
+
*/
|
|
175
|
+
title?: string;
|
|
149
176
|
};
|
|
150
|
-
declare function ProteusImageCarousel({
|
|
177
|
+
declare function ProteusImageCarousel({
|
|
178
|
+
images,
|
|
179
|
+
title
|
|
180
|
+
}: ProteusImageCarouselProps): import("react/jsx-runtime").JSX.Element | null;
|
|
151
181
|
declare namespace ProteusImageCarousel {
|
|
152
|
-
|
|
182
|
+
var displayName: string;
|
|
153
183
|
}
|
|
154
|
-
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region src/proteus-image/ProteusImage.d.ts
|
|
155
186
|
type ProteusImageProps = BoxProps<"img">;
|
|
156
|
-
declare function ProteusImage(props: ProteusImageProps):
|
|
187
|
+
declare function ProteusImage(props: ProteusImageProps): import("react/jsx-runtime").JSX.Element;
|
|
157
188
|
declare namespace ProteusImage {
|
|
158
|
-
|
|
189
|
+
var displayName: string;
|
|
159
190
|
}
|
|
160
|
-
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/proteus-length/ProteusLength.d.ts
|
|
193
|
+
type ProteusLengthProps = {
|
|
194
|
+
/**
|
|
195
|
+
* JSON pointer path to the array whose length should be returned (e.g.
|
|
196
|
+
* '/urls'). Resolves to 0 when the value is missing or not an array.
|
|
197
|
+
*/
|
|
198
|
+
path: string;
|
|
199
|
+
};
|
|
200
|
+
declare function ProteusLength({
|
|
201
|
+
path
|
|
202
|
+
}: ProteusLengthProps): number;
|
|
203
|
+
declare namespace ProteusLength {
|
|
204
|
+
var displayName: string;
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/proteus-map-index/ProteusMapIndex.d.ts
|
|
208
|
+
declare function ProteusMapIndex(): number | null;
|
|
209
|
+
declare namespace ProteusMapIndex {
|
|
210
|
+
var displayName: string;
|
|
211
|
+
}
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/proteus-map/ProteusMap.d.ts
|
|
161
214
|
type ProteusMapProps = {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
215
|
+
children?: ReactNode;
|
|
216
|
+
/**
|
|
217
|
+
* When true, flattens the result array by one level. Only used during
|
|
218
|
+
* value resolution (e.g., onClick message); ignored during rendering.
|
|
219
|
+
*/
|
|
220
|
+
flat?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* JSON pointer path to the source array in the data (e.g., '/results')
|
|
223
|
+
*/
|
|
224
|
+
path: string;
|
|
225
|
+
/**
|
|
226
|
+
* Optional separator to render between items. Can be a string or a
|
|
227
|
+
* ReactNode for more complex separators.
|
|
228
|
+
*/
|
|
229
|
+
separator?: ReactNode;
|
|
177
230
|
};
|
|
178
|
-
declare function ProteusMap({
|
|
231
|
+
declare function ProteusMap({
|
|
232
|
+
children,
|
|
233
|
+
path,
|
|
234
|
+
separator
|
|
235
|
+
}: ProteusMapProps): import("react/jsx-runtime").JSX.Element | null;
|
|
179
236
|
declare namespace ProteusMap {
|
|
180
|
-
|
|
237
|
+
var displayName: string;
|
|
181
238
|
}
|
|
182
|
-
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/proteus-pill-menu/ProteusPillMenu.d.ts
|
|
241
|
+
type ProteusPillMenuProps = {
|
|
242
|
+
/**
|
|
243
|
+
* The data binding name for the search input value.
|
|
244
|
+
*/
|
|
245
|
+
inputName?: string;
|
|
246
|
+
/**
|
|
247
|
+
* The data binding name for this pill menu's selected values.
|
|
248
|
+
*/
|
|
249
|
+
name?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Event handler triggered when the search input value changes.
|
|
252
|
+
*/
|
|
253
|
+
onInputValueChange?: ProteusEventHandler;
|
|
254
|
+
/**
|
|
255
|
+
* The available options to select from.
|
|
256
|
+
*/
|
|
257
|
+
options?: Array<{
|
|
258
|
+
/**
|
|
259
|
+
* Display label for the option
|
|
260
|
+
*/
|
|
261
|
+
label: string;
|
|
262
|
+
/**
|
|
263
|
+
* Unique value for the option
|
|
264
|
+
*/
|
|
265
|
+
value: string;
|
|
266
|
+
}>;
|
|
267
|
+
};
|
|
268
|
+
declare function ProteusPillMenu({
|
|
269
|
+
inputName,
|
|
270
|
+
name,
|
|
271
|
+
onInputValueChange,
|
|
272
|
+
options
|
|
273
|
+
}: ProteusPillMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
274
|
+
declare namespace ProteusPillMenu {
|
|
275
|
+
var displayName: string;
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/proteus-select/ProteusSelect.d.ts
|
|
183
279
|
type ProteusSelectProps = Omit<SelectProps, "options"> & {
|
|
280
|
+
/**
|
|
281
|
+
* The select items/options we want to render.
|
|
282
|
+
*/
|
|
283
|
+
options?: Array<{
|
|
184
284
|
/**
|
|
185
|
-
*
|
|
285
|
+
* String representation of items
|
|
186
286
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
* Return a unique key for each item
|
|
194
|
-
*/
|
|
195
|
-
value: string;
|
|
196
|
-
}>;
|
|
287
|
+
label: string;
|
|
288
|
+
/**
|
|
289
|
+
* Return a unique key for each item
|
|
290
|
+
*/
|
|
291
|
+
value: string;
|
|
292
|
+
}>;
|
|
197
293
|
};
|
|
198
|
-
declare function ProteusSelect({
|
|
294
|
+
declare function ProteusSelect({
|
|
295
|
+
children,
|
|
296
|
+
options,
|
|
297
|
+
...props
|
|
298
|
+
}: ProteusSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
199
299
|
declare namespace ProteusSelect {
|
|
200
|
-
|
|
300
|
+
var displayName: string;
|
|
201
301
|
}
|
|
202
|
-
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/proteus-document/resolveProteusValue.d.ts
|
|
203
304
|
type ProteusCondition = {
|
|
204
|
-
|
|
305
|
+
"!!": ComparisonValue;
|
|
205
306
|
} | {
|
|
206
|
-
|
|
307
|
+
"!": ComparisonValue;
|
|
207
308
|
} | {
|
|
208
|
-
|
|
309
|
+
"!=": ComparisonValue[];
|
|
209
310
|
} | {
|
|
210
|
-
|
|
311
|
+
"<": ComparisonValue[];
|
|
211
312
|
} | {
|
|
212
|
-
|
|
313
|
+
"<=": ComparisonValue[];
|
|
213
314
|
} | {
|
|
214
|
-
|
|
315
|
+
"==": ComparisonValue[];
|
|
215
316
|
} | {
|
|
216
|
-
|
|
317
|
+
">": ComparisonValue[];
|
|
217
318
|
} | {
|
|
218
|
-
|
|
319
|
+
">=": ComparisonValue[];
|
|
219
320
|
} | {
|
|
220
|
-
|
|
321
|
+
and: ProteusCondition[];
|
|
221
322
|
} | {
|
|
222
|
-
|
|
323
|
+
or: ProteusCondition[];
|
|
223
324
|
};
|
|
224
325
|
type ComparisonValue = boolean | null | number | string | {
|
|
225
|
-
|
|
326
|
+
$type: "Length";
|
|
327
|
+
path: string;
|
|
226
328
|
} | {
|
|
227
|
-
|
|
228
|
-
|
|
329
|
+
$type: "MapIndex";
|
|
330
|
+
} | {
|
|
331
|
+
$type: "Value";
|
|
332
|
+
path: string;
|
|
229
333
|
};
|
|
230
|
-
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/proteus-show/ProteusShow.d.ts
|
|
231
336
|
type ProteusShowProps = {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
337
|
+
children?: ReactNode;
|
|
338
|
+
/**
|
|
339
|
+
* Single condition or array of conditions (AND logic). Each condition is an
|
|
340
|
+
* object with one operator key.
|
|
341
|
+
*/
|
|
342
|
+
when: ProteusCondition;
|
|
238
343
|
};
|
|
239
|
-
declare function ProteusShow({
|
|
344
|
+
declare function ProteusShow({
|
|
345
|
+
children,
|
|
346
|
+
when
|
|
347
|
+
}: ProteusShowProps): import("react/jsx-runtime").JSX.Element | null;
|
|
240
348
|
declare namespace ProteusShow {
|
|
241
|
-
|
|
349
|
+
var displayName: string;
|
|
242
350
|
}
|
|
243
|
-
|
|
351
|
+
//#endregion
|
|
352
|
+
//#region src/proteus-value/ProteusValue.d.ts
|
|
244
353
|
type ProteusValueProps = {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
354
|
+
/**
|
|
355
|
+
* Format to apply to cell values (e.g. 'Number', 'DateTime')
|
|
356
|
+
*/
|
|
357
|
+
formatter?: "DateTime" | "Number" | {
|
|
358
|
+
/**
|
|
359
|
+
* Options passed to the Intl formatter constructor (e.g.,
|
|
360
|
+
* Intl.DateTimeFormatOptions or Intl.NumberFormatOptions)
|
|
361
|
+
*/
|
|
362
|
+
options?: Record<string, unknown>;
|
|
363
|
+
/**
|
|
364
|
+
* Formatter type
|
|
365
|
+
*/
|
|
366
|
+
type: "DateTime" | "Number";
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Path to a value in the data. Absolute paths start with '/' and resolve from
|
|
370
|
+
* the root (e.g., '/title', '/options/0/label'). Inside a Map template, paths
|
|
371
|
+
* without a leading '/' are relative to the current item (e.g., 'title'
|
|
372
|
+
* resolves to each item's 'title' field).
|
|
373
|
+
*/
|
|
374
|
+
path: string;
|
|
266
375
|
};
|
|
267
|
-
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/proteus-document/ProteusDocumentContext.d.ts
|
|
268
378
|
type FileUploadMetadata = {
|
|
269
|
-
|
|
270
|
-
|
|
379
|
+
link: string;
|
|
380
|
+
name: string;
|
|
271
381
|
};
|
|
382
|
+
type ProteusIconMap = Record<string, ComponentType<{
|
|
383
|
+
filled?: boolean;
|
|
384
|
+
}>>;
|
|
272
385
|
type UploadFile<F extends FileUploadMetadata = FileUploadMetadata> = (file: File) => Promise<F>;
|
|
273
386
|
type UseResource = (resource: string) => {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
387
|
+
data: undefined | {
|
|
388
|
+
mimeType: string;
|
|
389
|
+
text: string;
|
|
390
|
+
};
|
|
391
|
+
isError: boolean;
|
|
279
392
|
};
|
|
280
|
-
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region src/proteus-document/ProteusDocumentShell.d.ts
|
|
281
395
|
type ProteusDocumentShellProps = Pick<ComponentPropsWithoutRef<typeof Disclosure>, "defaultOpen" | "onOpenChange" | "open"> & {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
396
|
+
/**
|
|
397
|
+
* Whether block is collapsible
|
|
398
|
+
*/
|
|
399
|
+
collapsible?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* Current form data
|
|
402
|
+
*/
|
|
403
|
+
data?: Record<string, unknown>;
|
|
404
|
+
/**
|
|
405
|
+
* The Proteus document to render
|
|
406
|
+
*/
|
|
407
|
+
element: ProteusDocument$2;
|
|
408
|
+
/**
|
|
409
|
+
* Map of icon name to React component. Referenced by `{ $type: "Icon", name }` elements.
|
|
410
|
+
*/
|
|
411
|
+
icons?: ProteusIconMap;
|
|
412
|
+
/**
|
|
413
|
+
* Callback when form fields change. Receives a functional updater
|
|
414
|
+
* `(prev) => next` (the same shape React's `setState` accepts) so that
|
|
415
|
+
* rapid successive mutations compose without losing writes. Pass a
|
|
416
|
+
* `useState` setter directly, e.g. `onDataChange={setData}`.
|
|
417
|
+
*/
|
|
418
|
+
onDataChange?: (updater: (prev: Record<string, unknown>) => Record<string, unknown>) => void;
|
|
419
|
+
/**
|
|
420
|
+
* Callback when user triggers a download action; receives the resolved URL(s).
|
|
421
|
+
* When provided, the host is responsible for the actual download/zip.
|
|
422
|
+
* Falls back to built-in window.open behaviour when absent.
|
|
423
|
+
*/
|
|
424
|
+
onDownload?: (urls: string[]) => Promise<void> | void;
|
|
425
|
+
/**
|
|
426
|
+
* Callback when user clicks a Action button with interaction handler
|
|
427
|
+
*/
|
|
428
|
+
onInteraction?: (name: string, params?: Record<string, unknown>) => Promise<unknown> | unknown;
|
|
429
|
+
/**
|
|
430
|
+
* Callback when user sends a message action. The payload may be a plain
|
|
431
|
+
* string or a structured object (parts + optional files), depending on
|
|
432
|
+
* what the document declares for `Action.onClick.message`.
|
|
433
|
+
*/
|
|
434
|
+
onMessage?: (message: string | StructuredMessage) => Promise<void> | void;
|
|
435
|
+
/**
|
|
436
|
+
* Callback when user triggers a preview action.
|
|
437
|
+
* Receives the file object to preview.
|
|
438
|
+
*/
|
|
439
|
+
onPreview?: (file: unknown) => Promise<void> | void;
|
|
440
|
+
/**
|
|
441
|
+
* Callback when an analytics event is fired
|
|
442
|
+
*/
|
|
443
|
+
onTrack?: (event: string, properties: Record<string, string>) => void;
|
|
444
|
+
/**
|
|
445
|
+
* Async upload callback used by FileUpload elements. Receives a File and
|
|
446
|
+
* resolves to a metadata object the document writes into form data.
|
|
447
|
+
*/
|
|
448
|
+
onUpload?: UploadFile;
|
|
449
|
+
/**
|
|
450
|
+
* Whether form is readonly
|
|
451
|
+
*/
|
|
452
|
+
readOnly?: boolean;
|
|
453
|
+
/**
|
|
454
|
+
* If true, the renderer will throw an error if the provided document is invalid. Otherwise, it will fail silently and render nothing.
|
|
455
|
+
*/
|
|
456
|
+
strict?: boolean;
|
|
457
|
+
/**
|
|
458
|
+
* Hook to resolve a resource URI to HTML content for Bridge elements
|
|
459
|
+
*/
|
|
460
|
+
useResource?: UseResource;
|
|
340
461
|
};
|
|
341
462
|
type ProteusDocument$2 = {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
463
|
+
actions?: ReactNode;
|
|
464
|
+
appearance?: "default" | "inline" | Record<string, unknown>;
|
|
465
|
+
appIcon?: string;
|
|
466
|
+
appName?: string;
|
|
467
|
+
blocking?: boolean;
|
|
468
|
+
body: ReactNode;
|
|
469
|
+
compact?: boolean;
|
|
470
|
+
subtitle?: ReactNode;
|
|
471
|
+
title?: ReactNode;
|
|
472
|
+
titleIcon?: string;
|
|
352
473
|
};
|
|
353
|
-
declare function ProteusDocumentShell({
|
|
474
|
+
declare function ProteusDocumentShell({
|
|
475
|
+
collapsible: collapsibleProp,
|
|
476
|
+
data,
|
|
477
|
+
defaultOpen,
|
|
478
|
+
element,
|
|
479
|
+
icons,
|
|
480
|
+
onDataChange,
|
|
481
|
+
onDownload,
|
|
482
|
+
onInteraction,
|
|
483
|
+
onMessage,
|
|
484
|
+
onOpenChange,
|
|
485
|
+
onPreview,
|
|
486
|
+
onTrack,
|
|
487
|
+
onUpload,
|
|
488
|
+
open: openProp,
|
|
489
|
+
readOnly,
|
|
490
|
+
strict,
|
|
491
|
+
useResource
|
|
492
|
+
}: ProteusDocumentShellProps): import("react/jsx-runtime").JSX.Element;
|
|
354
493
|
declare namespace ProteusDocumentShell {
|
|
355
|
-
|
|
494
|
+
var displayName: string;
|
|
356
495
|
}
|
|
357
|
-
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/proteus-document/schemas.d.ts
|
|
358
498
|
type ProteusEventHandler = {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
499
|
+
action: "download";
|
|
500
|
+
url: (ProteusValueProps & {
|
|
501
|
+
$type: "Value";
|
|
502
|
+
}) | string | string[];
|
|
503
|
+
} | {
|
|
504
|
+
action: "openLink";
|
|
505
|
+
url: (ProteusValueProps & {
|
|
506
|
+
$type: "Value";
|
|
507
|
+
}) | string;
|
|
363
508
|
} | {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
$type: "Value";
|
|
367
|
-
}) | string;
|
|
509
|
+
action: "preview";
|
|
510
|
+
file: unknown;
|
|
368
511
|
} | {
|
|
369
|
-
|
|
370
|
-
|
|
512
|
+
action: "pushValue";
|
|
513
|
+
path: string;
|
|
514
|
+
value?: unknown;
|
|
371
515
|
} | {
|
|
372
|
-
|
|
373
|
-
|
|
516
|
+
action: "removeValue";
|
|
517
|
+
path: string;
|
|
374
518
|
} | {
|
|
375
|
-
|
|
519
|
+
interaction: string;
|
|
520
|
+
params?: Record<string, unknown>;
|
|
521
|
+
} | {
|
|
522
|
+
message: string | StructuredMessage;
|
|
376
523
|
};
|
|
377
524
|
type StructuredMessage<F extends FileUploadMetadata = FileUploadMetadata> = {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
525
|
+
files?: F[];
|
|
526
|
+
parts: Array<{
|
|
527
|
+
content: string;
|
|
528
|
+
type: "text";
|
|
529
|
+
}>;
|
|
383
530
|
};
|
|
384
531
|
type ProteusDocument$1 = ProteusDocumentShellProps["element"] & {
|
|
385
|
-
|
|
532
|
+
$type: "Document";
|
|
386
533
|
};
|
|
387
534
|
type SafeParseResult<T> = {
|
|
388
|
-
|
|
389
|
-
|
|
535
|
+
data: T;
|
|
536
|
+
success: true;
|
|
390
537
|
} | {
|
|
391
|
-
|
|
392
|
-
|
|
538
|
+
error: string[];
|
|
539
|
+
success: false;
|
|
393
540
|
};
|
|
394
|
-
declare function safeParseDocument({
|
|
395
|
-
|
|
541
|
+
declare function safeParseDocument({
|
|
542
|
+
actions,
|
|
543
|
+
body,
|
|
544
|
+
...data
|
|
545
|
+
}: Record<string, unknown>): SafeParseResult<ProteusDocument$1>;
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region src/proteus-action/ProteusAction.d.ts
|
|
396
548
|
type ProteusActionProps = Omit<ButtonProps, "onClick"> & {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
549
|
+
/**
|
|
550
|
+
* Action triggered when button is clicked
|
|
551
|
+
*/
|
|
552
|
+
onClick?: ProteusEventHandler;
|
|
401
553
|
};
|
|
402
|
-
declare function ProteusAction({
|
|
554
|
+
declare function ProteusAction({
|
|
555
|
+
children,
|
|
556
|
+
onClick,
|
|
557
|
+
type,
|
|
558
|
+
...props
|
|
559
|
+
}: ProteusActionProps): import("react/jsx-runtime").JSX.Element;
|
|
403
560
|
declare namespace ProteusAction {
|
|
404
|
-
|
|
561
|
+
var displayName: string;
|
|
405
562
|
}
|
|
406
|
-
|
|
563
|
+
//#endregion
|
|
564
|
+
//#region src/proteus-date-input/ProteusDateInput.d.ts
|
|
565
|
+
declare function ProteusDateInput(props: DateInputProps): import("react/jsx-runtime").JSX.Element;
|
|
566
|
+
declare namespace ProteusDateInput {
|
|
567
|
+
var displayName: string;
|
|
568
|
+
}
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/proteus-document/ProteusDocumentRenderer.d.ts
|
|
407
571
|
type ProteusDocumentRendererProps = Omit<ComponentPropsWithoutRef<typeof ProteusDocumentShell>, "element"> & {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
572
|
+
/**
|
|
573
|
+
* The Proteus document to render
|
|
574
|
+
*/
|
|
575
|
+
element: ProteusDocument;
|
|
576
|
+
/**
|
|
577
|
+
* If true, the renderer will throw an error if the provided document is invalid. Otherwise, it will fail silently and render nothing.
|
|
578
|
+
*/
|
|
579
|
+
strict?: boolean;
|
|
416
580
|
};
|
|
417
581
|
type ProteusDocument = {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
582
|
+
$type: "Document";
|
|
583
|
+
actions?: unknown;
|
|
584
|
+
appearance?: "default" | "inline" | Record<string, unknown>;
|
|
585
|
+
appIcon?: string;
|
|
586
|
+
appName?: string;
|
|
587
|
+
blocking?: boolean;
|
|
588
|
+
body: unknown;
|
|
589
|
+
compact?: boolean;
|
|
590
|
+
subtitle?: unknown;
|
|
591
|
+
title?: unknown;
|
|
592
|
+
titleIcon?: string;
|
|
429
593
|
};
|
|
430
|
-
declare function ProteusDocumentRenderer({
|
|
594
|
+
declare function ProteusDocumentRenderer({
|
|
595
|
+
element: elementProp,
|
|
596
|
+
strict,
|
|
597
|
+
...props
|
|
598
|
+
}: ProteusDocumentRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
431
599
|
declare namespace ProteusDocumentRenderer {
|
|
432
|
-
|
|
600
|
+
var displayName: string;
|
|
433
601
|
}
|
|
434
|
-
|
|
435
|
-
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/proteus-input/ProteusInput.d.ts
|
|
604
|
+
declare function ProteusInput(props: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
436
605
|
declare namespace ProteusInput {
|
|
437
|
-
|
|
606
|
+
var displayName: string;
|
|
438
607
|
}
|
|
439
|
-
|
|
440
|
-
|
|
608
|
+
//#endregion
|
|
609
|
+
//#region src/proteus-textarea/ProteusTextarea.d.ts
|
|
610
|
+
declare function ProteusTextarea(props: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
441
611
|
declare namespace ProteusTextarea {
|
|
442
|
-
|
|
612
|
+
var displayName: string;
|
|
443
613
|
}
|
|
444
|
-
|
|
614
|
+
//#endregion
|
|
615
|
+
//#region src/use-proteus-value/useProteusValue.d.ts
|
|
445
616
|
declare function useProteusValue(element: ProteusValueProps): any;
|
|
446
|
-
|
|
447
|
-
export { ProteusAction, ProteusBridge, ProteusChart, ProteusDataTable, ProteusDocumentRenderer, ProteusDocumentShell, ProteusFederated, ProteusFileUpload, ProteusImage, ProteusImageCarousel, ProteusInput, ProteusMap, ProteusSelect, ProteusShow, ProteusTextarea, safeParseDocument, useProteusValue };
|
|
448
|
-
export type { FileUploadMetadata, ProteusDocumentRendererProps, ProteusDocumentShellProps, ProteusFileUploadProps, StructuredMessage, UploadFile };
|
|
617
|
+
//#endregion
|
|
618
|
+
export { type FileUploadMetadata, ProteusAction, ProteusBridge, ProteusChart, ProteusDataTable, ProteusDateInput, ProteusDocumentRenderer, ProteusDocumentRendererProps, ProteusDocumentShell, ProteusDocumentShellProps, ProteusFederated, ProteusFileUpload, ProteusFileUploadProps, ProteusImage, ProteusImageCarousel, ProteusInput, ProteusLength, ProteusMap, ProteusMapIndex, ProteusPillMenu, ProteusPillMenuProps, ProteusSelect, ProteusShow, ProteusTextarea, type StructuredMessage, type UploadFile, safeParseDocument, useProteusValue };
|