@optiaxiom/proteus 0.2.13 → 0.2.15
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-B_WDPh7C.css → ProteusChart.css.ts.vanilla-CfYErTvq.css} +2 -2
- package/dist/esm/assets/src/proteus-chart/{ProteusChartTooltipContent.css.ts.vanilla-UZNvVvUU.css → ProteusChartTooltipContent.css.ts.vanilla-CFiMPH60.css} +2 -2
- package/dist/esm/assets/src/proteus-document/{ProteusDocumentShell.css.ts.vanilla-N08uRH65.css → ProteusDocumentShell.css.ts.vanilla-C6b32Qx3.css} +2 -2
- package/dist/esm/assets/src/proteus-image-carousel/{ProteusImageCarousel.css.ts.vanilla-DPgPnDmb.css → ProteusImageCarousel.css.ts.vanilla-Dvvb8Qx5.css} +2 -2
- package/dist/esm/assets/src/proteus-question/{ProteusQuestion.css.ts.vanilla-BAhvFxEB.css → ProteusQuestion.css.ts.vanilla-BTVHkw1E.css} +2 -2
- package/dist/esm/proteus-card-link/ProteusCardLink.js +41 -0
- 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/ProteusDocumentShell.js +11 -5
- package/dist/esm/proteus-element/ProteusElement.js +6 -2
- package/dist/esm/proteus-file-icon/ProteusFileIcon.js +47 -0
- package/dist/esm/proteus-file-upload/ProteusFileUpload.js +17 -5
- 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 +254 -0
- package/dist/esm/schema/runtime-schema.json.js +252 -0
- package/dist/index.d.ts +11 -1
- package/dist/spec.d.ts +2915 -2543
- package/package.json +2 -2
|
@@ -2645,6 +2645,20 @@ var definitions = {
|
|
|
2645
2645
|
$ref: "#/definitions/ProteusNode",
|
|
2646
2646
|
description: "Actions available for this document"
|
|
2647
2647
|
},
|
|
2648
|
+
appearance: {
|
|
2649
|
+
anyOf: [
|
|
2650
|
+
{
|
|
2651
|
+
"const": "default"
|
|
2652
|
+
},
|
|
2653
|
+
{
|
|
2654
|
+
"const": "inline"
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
$ref: "#/definitions/ProteusExpression"
|
|
2658
|
+
}
|
|
2659
|
+
],
|
|
2660
|
+
description: "Visual treatment of the document shell. 'default' renders the document as a card with background, border, and padding. 'inline' strips the surrounding chrome so the document blends into its host container."
|
|
2661
|
+
},
|
|
2648
2662
|
appIcon: {
|
|
2649
2663
|
description: "URL or data URI for the application icon (e.g., 'https://example.com/icon.png' or 'data:image/svg+xml,...'). Rendered as an <img> element.",
|
|
2650
2664
|
type: "string"
|
|
@@ -2734,6 +2748,9 @@ var definitions = {
|
|
|
2734
2748
|
{
|
|
2735
2749
|
$ref: "#/definitions/ProteusField"
|
|
2736
2750
|
},
|
|
2751
|
+
{
|
|
2752
|
+
$ref: "#/definitions/ProteusFileIcon"
|
|
2753
|
+
},
|
|
2737
2754
|
{
|
|
2738
2755
|
$ref: "#/definitions/ProteusFileUpload"
|
|
2739
2756
|
},
|
|
@@ -2898,6 +2915,35 @@ var definitions = {
|
|
|
2898
2915
|
"url"
|
|
2899
2916
|
],
|
|
2900
2917
|
type: "object"
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
description: "Client-side component action - for previewing a file inline",
|
|
2921
|
+
properties: {
|
|
2922
|
+
action: {
|
|
2923
|
+
"const": "preview",
|
|
2924
|
+
description: "The action type",
|
|
2925
|
+
type: "string"
|
|
2926
|
+
},
|
|
2927
|
+
file: {
|
|
2928
|
+
anyOf: [
|
|
2929
|
+
{
|
|
2930
|
+
$ref: "#/definitions/ProteusExpression"
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
type: "object"
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
type: "string"
|
|
2937
|
+
}
|
|
2938
|
+
],
|
|
2939
|
+
description: "The file object to preview"
|
|
2940
|
+
}
|
|
2941
|
+
},
|
|
2942
|
+
required: [
|
|
2943
|
+
"action",
|
|
2944
|
+
"file"
|
|
2945
|
+
],
|
|
2946
|
+
type: "object"
|
|
2901
2947
|
}
|
|
2902
2948
|
],
|
|
2903
2949
|
description: "Handler for user interactions - a server-side interaction call, client-side message, or client-side component action"
|
|
@@ -4640,6 +4686,10 @@ var definitions = {
|
|
|
4640
4686
|
objectFit: {
|
|
4641
4687
|
$ref: "#/definitions/SprinkleProp_objectFit"
|
|
4642
4688
|
},
|
|
4689
|
+
onClick: {
|
|
4690
|
+
$ref: "#/definitions/ProteusEventHandler",
|
|
4691
|
+
description: "Action triggered when link is clicked"
|
|
4692
|
+
},
|
|
4643
4693
|
overflow: {
|
|
4644
4694
|
$ref: "#/definitions/SprinkleProp_overflow"
|
|
4645
4695
|
},
|
|
@@ -5191,6 +5241,208 @@ var definitions = {
|
|
|
5191
5241
|
],
|
|
5192
5242
|
type: "object"
|
|
5193
5243
|
},
|
|
5244
|
+
ProteusFileIcon: {
|
|
5245
|
+
examples: [
|
|
5246
|
+
{
|
|
5247
|
+
$type: "FileIcon",
|
|
5248
|
+
mimeType: "application/pdf"
|
|
5249
|
+
}
|
|
5250
|
+
],
|
|
5251
|
+
properties: {
|
|
5252
|
+
$type: {
|
|
5253
|
+
"const": "FileIcon"
|
|
5254
|
+
},
|
|
5255
|
+
alignItems: {
|
|
5256
|
+
$ref: "#/definitions/SprinkleProp_alignItems"
|
|
5257
|
+
},
|
|
5258
|
+
alignSelf: {
|
|
5259
|
+
$ref: "#/definitions/SprinkleProp_alignSelf"
|
|
5260
|
+
},
|
|
5261
|
+
animation: {
|
|
5262
|
+
$ref: "#/definitions/SprinkleProp_animation"
|
|
5263
|
+
},
|
|
5264
|
+
backgroundImage: {
|
|
5265
|
+
$ref: "#/definitions/SprinkleProp_backgroundImage"
|
|
5266
|
+
},
|
|
5267
|
+
bg: {
|
|
5268
|
+
$ref: "#/definitions/SprinkleProp_bg"
|
|
5269
|
+
},
|
|
5270
|
+
border: {
|
|
5271
|
+
$ref: "#/definitions/SprinkleProp_border"
|
|
5272
|
+
},
|
|
5273
|
+
borderB: {
|
|
5274
|
+
$ref: "#/definitions/SprinkleProp_borderB"
|
|
5275
|
+
},
|
|
5276
|
+
borderColor: {
|
|
5277
|
+
$ref: "#/definitions/SprinkleProp_borderColor"
|
|
5278
|
+
},
|
|
5279
|
+
borderL: {
|
|
5280
|
+
$ref: "#/definitions/SprinkleProp_borderL"
|
|
5281
|
+
},
|
|
5282
|
+
borderR: {
|
|
5283
|
+
$ref: "#/definitions/SprinkleProp_borderR"
|
|
5284
|
+
},
|
|
5285
|
+
borderT: {
|
|
5286
|
+
$ref: "#/definitions/SprinkleProp_borderT"
|
|
5287
|
+
},
|
|
5288
|
+
color: {
|
|
5289
|
+
$ref: "#/definitions/SprinkleProp_color"
|
|
5290
|
+
},
|
|
5291
|
+
cursor: {
|
|
5292
|
+
$ref: "#/definitions/SprinkleProp_cursor"
|
|
5293
|
+
},
|
|
5294
|
+
display: {
|
|
5295
|
+
$ref: "#/definitions/SprinkleProp_display"
|
|
5296
|
+
},
|
|
5297
|
+
flex: {
|
|
5298
|
+
$ref: "#/definitions/SprinkleProp_flex"
|
|
5299
|
+
},
|
|
5300
|
+
flexDirection: {
|
|
5301
|
+
$ref: "#/definitions/SprinkleProp_flexDirection"
|
|
5302
|
+
},
|
|
5303
|
+
flexWrap: {
|
|
5304
|
+
$ref: "#/definitions/SprinkleProp_flexWrap"
|
|
5305
|
+
},
|
|
5306
|
+
fontFamily: {
|
|
5307
|
+
$ref: "#/definitions/SprinkleProp_fontFamily"
|
|
5308
|
+
},
|
|
5309
|
+
fontSize: {
|
|
5310
|
+
$ref: "#/definitions/SprinkleProp_fontSize"
|
|
5311
|
+
},
|
|
5312
|
+
fontWeight: {
|
|
5313
|
+
$ref: "#/definitions/SprinkleProp_fontWeight"
|
|
5314
|
+
},
|
|
5315
|
+
gap: {
|
|
5316
|
+
$ref: "#/definitions/SprinkleProp_gap"
|
|
5317
|
+
},
|
|
5318
|
+
gridAutoRows: {
|
|
5319
|
+
$ref: "#/definitions/SprinkleProp_gridAutoRows"
|
|
5320
|
+
},
|
|
5321
|
+
gridColumn: {
|
|
5322
|
+
$ref: "#/definitions/SprinkleProp_gridColumn"
|
|
5323
|
+
},
|
|
5324
|
+
gridTemplateColumns: {
|
|
5325
|
+
$ref: "#/definitions/SprinkleProp_gridTemplateColumns"
|
|
5326
|
+
},
|
|
5327
|
+
h: {
|
|
5328
|
+
$ref: "#/definitions/SprinkleProp_h"
|
|
5329
|
+
},
|
|
5330
|
+
justifyContent: {
|
|
5331
|
+
$ref: "#/definitions/SprinkleProp_justifyContent"
|
|
5332
|
+
},
|
|
5333
|
+
justifyItems: {
|
|
5334
|
+
$ref: "#/definitions/SprinkleProp_justifyItems"
|
|
5335
|
+
},
|
|
5336
|
+
m: {
|
|
5337
|
+
$ref: "#/definitions/SprinkleProp_m"
|
|
5338
|
+
},
|
|
5339
|
+
maxH: {
|
|
5340
|
+
$ref: "#/definitions/SprinkleProp_maxH"
|
|
5341
|
+
},
|
|
5342
|
+
maxW: {
|
|
5343
|
+
$ref: "#/definitions/SprinkleProp_maxW"
|
|
5344
|
+
},
|
|
5345
|
+
mb: {
|
|
5346
|
+
$ref: "#/definitions/SprinkleProp_mb"
|
|
5347
|
+
},
|
|
5348
|
+
ml: {
|
|
5349
|
+
$ref: "#/definitions/SprinkleProp_ml"
|
|
5350
|
+
},
|
|
5351
|
+
mr: {
|
|
5352
|
+
$ref: "#/definitions/SprinkleProp_mr"
|
|
5353
|
+
},
|
|
5354
|
+
mt: {
|
|
5355
|
+
$ref: "#/definitions/SprinkleProp_mt"
|
|
5356
|
+
},
|
|
5357
|
+
mx: {
|
|
5358
|
+
$ref: "#/definitions/SprinkleProp_mx"
|
|
5359
|
+
},
|
|
5360
|
+
my: {
|
|
5361
|
+
$ref: "#/definitions/SprinkleProp_my"
|
|
5362
|
+
},
|
|
5363
|
+
objectFit: {
|
|
5364
|
+
$ref: "#/definitions/SprinkleProp_objectFit"
|
|
5365
|
+
},
|
|
5366
|
+
overflow: {
|
|
5367
|
+
$ref: "#/definitions/SprinkleProp_overflow"
|
|
5368
|
+
},
|
|
5369
|
+
overflowX: {
|
|
5370
|
+
$ref: "#/definitions/SprinkleProp_overflowX"
|
|
5371
|
+
},
|
|
5372
|
+
overflowY: {
|
|
5373
|
+
$ref: "#/definitions/SprinkleProp_overflowY"
|
|
5374
|
+
},
|
|
5375
|
+
p: {
|
|
5376
|
+
$ref: "#/definitions/SprinkleProp_p"
|
|
5377
|
+
},
|
|
5378
|
+
pb: {
|
|
5379
|
+
$ref: "#/definitions/SprinkleProp_pb"
|
|
5380
|
+
},
|
|
5381
|
+
pl: {
|
|
5382
|
+
$ref: "#/definitions/SprinkleProp_pl"
|
|
5383
|
+
},
|
|
5384
|
+
placeItems: {
|
|
5385
|
+
$ref: "#/definitions/SprinkleProp_placeItems"
|
|
5386
|
+
},
|
|
5387
|
+
pointerEvents: {
|
|
5388
|
+
$ref: "#/definitions/SprinkleProp_pointerEvents"
|
|
5389
|
+
},
|
|
5390
|
+
pr: {
|
|
5391
|
+
$ref: "#/definitions/SprinkleProp_pr"
|
|
5392
|
+
},
|
|
5393
|
+
pt: {
|
|
5394
|
+
$ref: "#/definitions/SprinkleProp_pt"
|
|
5395
|
+
},
|
|
5396
|
+
px: {
|
|
5397
|
+
$ref: "#/definitions/SprinkleProp_px"
|
|
5398
|
+
},
|
|
5399
|
+
py: {
|
|
5400
|
+
$ref: "#/definitions/SprinkleProp_py"
|
|
5401
|
+
},
|
|
5402
|
+
rounded: {
|
|
5403
|
+
$ref: "#/definitions/SprinkleProp_rounded"
|
|
5404
|
+
},
|
|
5405
|
+
shadow: {
|
|
5406
|
+
$ref: "#/definitions/SprinkleProp_shadow"
|
|
5407
|
+
},
|
|
5408
|
+
size: {
|
|
5409
|
+
$ref: "#/definitions/SprinkleProp_size"
|
|
5410
|
+
},
|
|
5411
|
+
textAlign: {
|
|
5412
|
+
$ref: "#/definitions/SprinkleProp_textAlign"
|
|
5413
|
+
},
|
|
5414
|
+
textTransform: {
|
|
5415
|
+
$ref: "#/definitions/SprinkleProp_textTransform"
|
|
5416
|
+
},
|
|
5417
|
+
transition: {
|
|
5418
|
+
$ref: "#/definitions/SprinkleProp_transition"
|
|
5419
|
+
},
|
|
5420
|
+
w: {
|
|
5421
|
+
$ref: "#/definitions/SprinkleProp_w"
|
|
5422
|
+
},
|
|
5423
|
+
whiteSpace: {
|
|
5424
|
+
$ref: "#/definitions/SprinkleProp_whiteSpace"
|
|
5425
|
+
},
|
|
5426
|
+
z: {
|
|
5427
|
+
$ref: "#/definitions/SprinkleProp_z"
|
|
5428
|
+
},
|
|
5429
|
+
mimeType: {
|
|
5430
|
+
anyOf: [
|
|
5431
|
+
{
|
|
5432
|
+
type: "string"
|
|
5433
|
+
},
|
|
5434
|
+
{
|
|
5435
|
+
$ref: "#/definitions/ProteusExpression"
|
|
5436
|
+
}
|
|
5437
|
+
],
|
|
5438
|
+
description: "MIME type of the file to determine which icon to display"
|
|
5439
|
+
}
|
|
5440
|
+
},
|
|
5441
|
+
required: [
|
|
5442
|
+
"$type"
|
|
5443
|
+
],
|
|
5444
|
+
type: "object"
|
|
5445
|
+
},
|
|
5194
5446
|
ProteusFileUpload: {
|
|
5195
5447
|
examples: [
|
|
5196
5448
|
{
|
package/dist/index.d.ts
CHANGED
|
@@ -311,6 +311,11 @@ type ProteusDocumentShellProps = Pick<ComponentPropsWithoutRef<typeof Disclosure
|
|
|
311
311
|
* what the document declares for `Action.onClick.message`.
|
|
312
312
|
*/
|
|
313
313
|
onMessage?: (message: string | StructuredMessage) => Promise<void> | void;
|
|
314
|
+
/**
|
|
315
|
+
* Callback when user triggers a preview action.
|
|
316
|
+
* Receives the file object to preview.
|
|
317
|
+
*/
|
|
318
|
+
onPreview?: (file: unknown) => Promise<void> | void;
|
|
314
319
|
/**
|
|
315
320
|
* Callback when an analytics event is fired
|
|
316
321
|
*/
|
|
@@ -335,6 +340,7 @@ type ProteusDocumentShellProps = Pick<ComponentPropsWithoutRef<typeof Disclosure
|
|
|
335
340
|
};
|
|
336
341
|
type ProteusDocument$2 = {
|
|
337
342
|
actions?: ReactNode;
|
|
343
|
+
appearance?: "default" | "inline" | Record<string, unknown>;
|
|
338
344
|
appIcon?: string;
|
|
339
345
|
appName?: string;
|
|
340
346
|
blocking?: boolean;
|
|
@@ -344,7 +350,7 @@ type ProteusDocument$2 = {
|
|
|
344
350
|
title?: ReactNode;
|
|
345
351
|
titleIcon?: string;
|
|
346
352
|
};
|
|
347
|
-
declare function ProteusDocumentShell({ collapsible: collapsibleProp, data, defaultOpen, element, onDataChange, onDownload, onInteraction, onMessage, onOpenChange, onTrack, onUpload, open: openProp, readOnly, strict, useResource, }: ProteusDocumentShellProps): react_jsx_runtime.JSX.Element;
|
|
353
|
+
declare function ProteusDocumentShell({ collapsible: collapsibleProp, data, defaultOpen, element, onDataChange, onDownload, onInteraction, onMessage, onOpenChange, onPreview, onTrack, onUpload, open: openProp, readOnly, strict, useResource, }: ProteusDocumentShellProps): react_jsx_runtime.JSX.Element;
|
|
348
354
|
declare namespace ProteusDocumentShell {
|
|
349
355
|
var displayName: string;
|
|
350
356
|
}
|
|
@@ -359,6 +365,9 @@ type ProteusEventHandler = {
|
|
|
359
365
|
url: (ProteusValueProps & {
|
|
360
366
|
$type: "Value";
|
|
361
367
|
}) | string;
|
|
368
|
+
} | {
|
|
369
|
+
action: "preview";
|
|
370
|
+
file: unknown;
|
|
362
371
|
} | {
|
|
363
372
|
interaction: string;
|
|
364
373
|
params?: Record<string, unknown>;
|
|
@@ -408,6 +417,7 @@ type ProteusDocumentRendererProps = Omit<ComponentPropsWithoutRef<typeof Proteus
|
|
|
408
417
|
type ProteusDocument = {
|
|
409
418
|
$type: "Document";
|
|
410
419
|
actions?: unknown;
|
|
420
|
+
appearance?: "default" | "inline" | Record<string, unknown>;
|
|
411
421
|
appIcon?: string;
|
|
412
422
|
appName?: string;
|
|
413
423
|
blocking?: boolean;
|