@optiaxiom/proteus 0.2.11 → 0.2.12
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/assets/src/proteus-chart/{ProteusChart.css.ts.vanilla-Bhea5BpW.css → ProteusChart.css.ts.vanilla-B_WDPh7C.css} +2 -2
- package/dist/esm/assets/src/proteus-chart/{ProteusChartTooltipContent.css.ts.vanilla-7xvqKrcf.css → ProteusChartTooltipContent.css.ts.vanilla-UZNvVvUU.css} +2 -2
- package/dist/esm/assets/src/proteus-document/{ProteusDocumentShell.css.ts.vanilla-Bil1PxGV.css → ProteusDocumentShell.css.ts.vanilla-N08uRH65.css} +2 -2
- package/dist/esm/assets/src/proteus-image-carousel/{ProteusImageCarousel.css.ts.vanilla-CKWS5NjD.css → ProteusImageCarousel.css.ts.vanilla-DPgPnDmb.css} +2 -2
- package/dist/esm/assets/src/proteus-question/{ProteusQuestion.css.ts.vanilla-B04UzIcJ.css → ProteusQuestion.css.ts.vanilla-BAhvFxEB.css} +2 -2
- package/dist/esm/proteus-chart/ProteusChart-css.js +1 -1
- package/dist/esm/proteus-chart/ProteusChartTooltipContent-css.js +1 -1
- package/dist/esm/proteus-document/ProteusDocumentShell-css.js +1 -1
- package/dist/esm/proteus-document/resolveProteusValue.js +3 -2
- package/dist/esm/proteus-file-upload/ProteusFileUpload.js +77 -46
- package/dist/esm/proteus-image-carousel/ProteusImageCarousel-css.js +1 -1
- package/dist/esm/proteus-question/ProteusQuestion-css.js +1 -1
- package/dist/esm/schema/public-schema.json.js +50 -23
- package/dist/esm/schema/runtime-schema.json.js +50 -23
- package/dist/index.d.ts +26 -11
- package/dist/spec.d.ts +305 -279
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -104,16 +104,22 @@ type ProteusFileUploadProps = {
|
|
|
104
104
|
*/
|
|
105
105
|
accept?: string[];
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
107
|
+
* Maximum number of files allowed. When set to `1` the field is in
|
|
108
|
+
* single-file mode; any other value (or omitted) allows multiple uploads.
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
maxFiles?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Minimum number of files required.
|
|
113
|
+
*/
|
|
114
|
+
minFiles?: number;
|
|
111
115
|
/**
|
|
112
|
-
*
|
|
116
|
+
* The name of the form control element. The resolved metadata array is
|
|
117
|
+
* written at `parentPath/name` in form data once the host's `onUpload`
|
|
118
|
+
* resolves.
|
|
113
119
|
*/
|
|
114
|
-
|
|
120
|
+
name?: string;
|
|
115
121
|
};
|
|
116
|
-
declare function ProteusFileUpload({ accept,
|
|
122
|
+
declare function ProteusFileUpload({ accept, maxFiles, minFiles, name, }: ProteusFileUploadProps): react_jsx_runtime.JSX.Element;
|
|
117
123
|
declare namespace ProteusFileUpload {
|
|
118
124
|
var displayName: string;
|
|
119
125
|
}
|
|
@@ -154,6 +160,11 @@ declare namespace ProteusImage {
|
|
|
154
160
|
|
|
155
161
|
type ProteusMapProps = {
|
|
156
162
|
children?: ReactNode;
|
|
163
|
+
/**
|
|
164
|
+
* When true, flattens the result array by one level. Only used during
|
|
165
|
+
* value resolution (e.g., onClick message); ignored during rendering.
|
|
166
|
+
*/
|
|
167
|
+
flat?: boolean;
|
|
157
168
|
/**
|
|
158
169
|
* JSON pointer path to the source array in the data (e.g., '/results')
|
|
159
170
|
*/
|
|
@@ -254,7 +265,11 @@ type ProteusValueProps = {
|
|
|
254
265
|
path: string;
|
|
255
266
|
};
|
|
256
267
|
|
|
257
|
-
type
|
|
268
|
+
type FileUploadMetadata = {
|
|
269
|
+
link: string;
|
|
270
|
+
name: string;
|
|
271
|
+
};
|
|
272
|
+
type UploadFile<F extends FileUploadMetadata = FileUploadMetadata> = (file: File) => Promise<F>;
|
|
258
273
|
type UseResource = (resource: string) => {
|
|
259
274
|
data: undefined | {
|
|
260
275
|
mimeType: string;
|
|
@@ -302,7 +317,7 @@ type ProteusDocumentShellProps = Pick<ComponentPropsWithoutRef<typeof Disclosure
|
|
|
302
317
|
onTrack?: (event: string, properties: Record<string, string>) => void;
|
|
303
318
|
/**
|
|
304
319
|
* Async upload callback used by FileUpload elements. Receives a File and
|
|
305
|
-
* resolves to a
|
|
320
|
+
* resolves to a metadata object the document writes into form data.
|
|
306
321
|
*/
|
|
307
322
|
onUpload?: UploadFile;
|
|
308
323
|
/**
|
|
@@ -350,8 +365,8 @@ type ProteusEventHandler = {
|
|
|
350
365
|
} | {
|
|
351
366
|
message: string | StructuredMessage;
|
|
352
367
|
};
|
|
353
|
-
type StructuredMessage = {
|
|
354
|
-
files?:
|
|
368
|
+
type StructuredMessage<F extends FileUploadMetadata = FileUploadMetadata> = {
|
|
369
|
+
files?: F[];
|
|
355
370
|
parts: Array<{
|
|
356
371
|
content: string;
|
|
357
372
|
type: "text";
|
|
@@ -420,4 +435,4 @@ declare namespace ProteusTextarea {
|
|
|
420
435
|
declare function useProteusValue(element: ProteusValueProps): any;
|
|
421
436
|
|
|
422
437
|
export { ProteusAction, ProteusBridge, ProteusChart, ProteusDataTable, ProteusDocumentRenderer, ProteusDocumentShell, ProteusFederated, ProteusFileUpload, ProteusImage, ProteusImageCarousel, ProteusInput, ProteusMap, ProteusSelect, ProteusShow, ProteusTextarea, safeParseDocument, useProteusValue };
|
|
423
|
-
export type { ProteusDocumentRendererProps, ProteusDocumentShellProps, ProteusFileUploadProps, StructuredMessage, UploadFile };
|
|
438
|
+
export type { FileUploadMetadata, ProteusDocumentRendererProps, ProteusDocumentShellProps, ProteusFileUploadProps, StructuredMessage, UploadFile };
|