@optiaxiom/proteus 0.2.13 → 0.2.14

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.
Files changed (19) hide show
  1. package/dist/esm/assets/src/proteus-chart/{ProteusChart.css.ts.vanilla-B_WDPh7C.css → ProteusChart.css.ts.vanilla-CfYErTvq.css} +2 -2
  2. package/dist/esm/assets/src/proteus-chart/{ProteusChartTooltipContent.css.ts.vanilla-UZNvVvUU.css → ProteusChartTooltipContent.css.ts.vanilla-CFiMPH60.css} +2 -2
  3. package/dist/esm/assets/src/proteus-document/{ProteusDocumentShell.css.ts.vanilla-N08uRH65.css → ProteusDocumentShell.css.ts.vanilla-C6b32Qx3.css} +2 -2
  4. package/dist/esm/assets/src/proteus-image-carousel/{ProteusImageCarousel.css.ts.vanilla-DPgPnDmb.css → ProteusImageCarousel.css.ts.vanilla-Dvvb8Qx5.css} +2 -2
  5. package/dist/esm/assets/src/proteus-question/{ProteusQuestion.css.ts.vanilla-BAhvFxEB.css → ProteusQuestion.css.ts.vanilla-BTVHkw1E.css} +2 -2
  6. package/dist/esm/proteus-card-link/ProteusCardLink.js +41 -0
  7. package/dist/esm/proteus-chart/ProteusChart-css.js +1 -1
  8. package/dist/esm/proteus-chart/ProteusChartTooltipContent-css.js +1 -1
  9. package/dist/esm/proteus-document/ProteusDocumentShell-css.js +1 -1
  10. package/dist/esm/proteus-document/ProteusDocumentShell.js +9 -5
  11. package/dist/esm/proteus-element/ProteusElement.js +6 -2
  12. package/dist/esm/proteus-file-icon/ProteusFileIcon.js +46 -0
  13. package/dist/esm/proteus-image-carousel/ProteusImageCarousel-css.js +1 -1
  14. package/dist/esm/proteus-question/ProteusQuestion-css.js +1 -1
  15. package/dist/esm/schema/public-schema.json.js +240 -0
  16. package/dist/esm/schema/runtime-schema.json.js +238 -0
  17. package/dist/index.d.ts +9 -1
  18. package/dist/spec.d.ts +2768 -2409
  19. package/package.json +3 -3
@@ -2734,6 +2734,9 @@ var definitions = {
2734
2734
  {
2735
2735
  $ref: "#/definitions/ProteusField"
2736
2736
  },
2737
+ {
2738
+ $ref: "#/definitions/ProteusFileIcon"
2739
+ },
2737
2740
  {
2738
2741
  $ref: "#/definitions/ProteusFileUpload"
2739
2742
  },
@@ -2898,6 +2901,35 @@ var definitions = {
2898
2901
  "url"
2899
2902
  ],
2900
2903
  type: "object"
2904
+ },
2905
+ {
2906
+ description: "Client-side component action - for previewing a file inline",
2907
+ properties: {
2908
+ action: {
2909
+ "const": "preview",
2910
+ description: "The action type",
2911
+ type: "string"
2912
+ },
2913
+ file: {
2914
+ anyOf: [
2915
+ {
2916
+ $ref: "#/definitions/ProteusExpression"
2917
+ },
2918
+ {
2919
+ type: "object"
2920
+ },
2921
+ {
2922
+ type: "string"
2923
+ }
2924
+ ],
2925
+ description: "The file object to preview"
2926
+ }
2927
+ },
2928
+ required: [
2929
+ "action",
2930
+ "file"
2931
+ ],
2932
+ type: "object"
2901
2933
  }
2902
2934
  ],
2903
2935
  description: "Handler for user interactions - a server-side interaction call, client-side message, or client-side component action"
@@ -4640,6 +4672,10 @@ var definitions = {
4640
4672
  objectFit: {
4641
4673
  $ref: "#/definitions/SprinkleProp_objectFit"
4642
4674
  },
4675
+ onClick: {
4676
+ $ref: "#/definitions/ProteusEventHandler",
4677
+ description: "Action triggered when link is clicked"
4678
+ },
4643
4679
  overflow: {
4644
4680
  $ref: "#/definitions/SprinkleProp_overflow"
4645
4681
  },
@@ -5191,6 +5227,208 @@ var definitions = {
5191
5227
  ],
5192
5228
  type: "object"
5193
5229
  },
5230
+ ProteusFileIcon: {
5231
+ examples: [
5232
+ {
5233
+ $type: "FileIcon",
5234
+ mimeType: "application/pdf"
5235
+ }
5236
+ ],
5237
+ properties: {
5238
+ $type: {
5239
+ "const": "FileIcon"
5240
+ },
5241
+ alignItems: {
5242
+ $ref: "#/definitions/SprinkleProp_alignItems"
5243
+ },
5244
+ alignSelf: {
5245
+ $ref: "#/definitions/SprinkleProp_alignSelf"
5246
+ },
5247
+ animation: {
5248
+ $ref: "#/definitions/SprinkleProp_animation"
5249
+ },
5250
+ backgroundImage: {
5251
+ $ref: "#/definitions/SprinkleProp_backgroundImage"
5252
+ },
5253
+ bg: {
5254
+ $ref: "#/definitions/SprinkleProp_bg"
5255
+ },
5256
+ border: {
5257
+ $ref: "#/definitions/SprinkleProp_border"
5258
+ },
5259
+ borderB: {
5260
+ $ref: "#/definitions/SprinkleProp_borderB"
5261
+ },
5262
+ borderColor: {
5263
+ $ref: "#/definitions/SprinkleProp_borderColor"
5264
+ },
5265
+ borderL: {
5266
+ $ref: "#/definitions/SprinkleProp_borderL"
5267
+ },
5268
+ borderR: {
5269
+ $ref: "#/definitions/SprinkleProp_borderR"
5270
+ },
5271
+ borderT: {
5272
+ $ref: "#/definitions/SprinkleProp_borderT"
5273
+ },
5274
+ color: {
5275
+ $ref: "#/definitions/SprinkleProp_color"
5276
+ },
5277
+ cursor: {
5278
+ $ref: "#/definitions/SprinkleProp_cursor"
5279
+ },
5280
+ display: {
5281
+ $ref: "#/definitions/SprinkleProp_display"
5282
+ },
5283
+ flex: {
5284
+ $ref: "#/definitions/SprinkleProp_flex"
5285
+ },
5286
+ flexDirection: {
5287
+ $ref: "#/definitions/SprinkleProp_flexDirection"
5288
+ },
5289
+ flexWrap: {
5290
+ $ref: "#/definitions/SprinkleProp_flexWrap"
5291
+ },
5292
+ fontFamily: {
5293
+ $ref: "#/definitions/SprinkleProp_fontFamily"
5294
+ },
5295
+ fontSize: {
5296
+ $ref: "#/definitions/SprinkleProp_fontSize"
5297
+ },
5298
+ fontWeight: {
5299
+ $ref: "#/definitions/SprinkleProp_fontWeight"
5300
+ },
5301
+ gap: {
5302
+ $ref: "#/definitions/SprinkleProp_gap"
5303
+ },
5304
+ gridAutoRows: {
5305
+ $ref: "#/definitions/SprinkleProp_gridAutoRows"
5306
+ },
5307
+ gridColumn: {
5308
+ $ref: "#/definitions/SprinkleProp_gridColumn"
5309
+ },
5310
+ gridTemplateColumns: {
5311
+ $ref: "#/definitions/SprinkleProp_gridTemplateColumns"
5312
+ },
5313
+ h: {
5314
+ $ref: "#/definitions/SprinkleProp_h"
5315
+ },
5316
+ justifyContent: {
5317
+ $ref: "#/definitions/SprinkleProp_justifyContent"
5318
+ },
5319
+ justifyItems: {
5320
+ $ref: "#/definitions/SprinkleProp_justifyItems"
5321
+ },
5322
+ m: {
5323
+ $ref: "#/definitions/SprinkleProp_m"
5324
+ },
5325
+ maxH: {
5326
+ $ref: "#/definitions/SprinkleProp_maxH"
5327
+ },
5328
+ maxW: {
5329
+ $ref: "#/definitions/SprinkleProp_maxW"
5330
+ },
5331
+ mb: {
5332
+ $ref: "#/definitions/SprinkleProp_mb"
5333
+ },
5334
+ ml: {
5335
+ $ref: "#/definitions/SprinkleProp_ml"
5336
+ },
5337
+ mr: {
5338
+ $ref: "#/definitions/SprinkleProp_mr"
5339
+ },
5340
+ mt: {
5341
+ $ref: "#/definitions/SprinkleProp_mt"
5342
+ },
5343
+ mx: {
5344
+ $ref: "#/definitions/SprinkleProp_mx"
5345
+ },
5346
+ my: {
5347
+ $ref: "#/definitions/SprinkleProp_my"
5348
+ },
5349
+ objectFit: {
5350
+ $ref: "#/definitions/SprinkleProp_objectFit"
5351
+ },
5352
+ overflow: {
5353
+ $ref: "#/definitions/SprinkleProp_overflow"
5354
+ },
5355
+ overflowX: {
5356
+ $ref: "#/definitions/SprinkleProp_overflowX"
5357
+ },
5358
+ overflowY: {
5359
+ $ref: "#/definitions/SprinkleProp_overflowY"
5360
+ },
5361
+ p: {
5362
+ $ref: "#/definitions/SprinkleProp_p"
5363
+ },
5364
+ pb: {
5365
+ $ref: "#/definitions/SprinkleProp_pb"
5366
+ },
5367
+ pl: {
5368
+ $ref: "#/definitions/SprinkleProp_pl"
5369
+ },
5370
+ placeItems: {
5371
+ $ref: "#/definitions/SprinkleProp_placeItems"
5372
+ },
5373
+ pointerEvents: {
5374
+ $ref: "#/definitions/SprinkleProp_pointerEvents"
5375
+ },
5376
+ pr: {
5377
+ $ref: "#/definitions/SprinkleProp_pr"
5378
+ },
5379
+ pt: {
5380
+ $ref: "#/definitions/SprinkleProp_pt"
5381
+ },
5382
+ px: {
5383
+ $ref: "#/definitions/SprinkleProp_px"
5384
+ },
5385
+ py: {
5386
+ $ref: "#/definitions/SprinkleProp_py"
5387
+ },
5388
+ rounded: {
5389
+ $ref: "#/definitions/SprinkleProp_rounded"
5390
+ },
5391
+ shadow: {
5392
+ $ref: "#/definitions/SprinkleProp_shadow"
5393
+ },
5394
+ size: {
5395
+ $ref: "#/definitions/SprinkleProp_size"
5396
+ },
5397
+ textAlign: {
5398
+ $ref: "#/definitions/SprinkleProp_textAlign"
5399
+ },
5400
+ textTransform: {
5401
+ $ref: "#/definitions/SprinkleProp_textTransform"
5402
+ },
5403
+ transition: {
5404
+ $ref: "#/definitions/SprinkleProp_transition"
5405
+ },
5406
+ w: {
5407
+ $ref: "#/definitions/SprinkleProp_w"
5408
+ },
5409
+ whiteSpace: {
5410
+ $ref: "#/definitions/SprinkleProp_whiteSpace"
5411
+ },
5412
+ z: {
5413
+ $ref: "#/definitions/SprinkleProp_z"
5414
+ },
5415
+ mimeType: {
5416
+ anyOf: [
5417
+ {
5418
+ type: "string"
5419
+ },
5420
+ {
5421
+ $ref: "#/definitions/ProteusExpression"
5422
+ }
5423
+ ],
5424
+ description: "MIME type of the file to determine which icon to display"
5425
+ }
5426
+ },
5427
+ required: [
5428
+ "$type"
5429
+ ],
5430
+ type: "object"
5431
+ },
5194
5432
  ProteusFileUpload: {
5195
5433
  examples: [
5196
5434
  {
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
  */
@@ -344,7 +349,7 @@ type ProteusDocument$2 = {
344
349
  title?: ReactNode;
345
350
  titleIcon?: string;
346
351
  };
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;
352
+ 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
353
  declare namespace ProteusDocumentShell {
349
354
  var displayName: string;
350
355
  }
@@ -359,6 +364,9 @@ type ProteusEventHandler = {
359
364
  url: (ProteusValueProps & {
360
365
  $type: "Value";
361
366
  }) | string;
367
+ } | {
368
+ action: "preview";
369
+ file: unknown;
362
370
  } | {
363
371
  interaction: string;
364
372
  params?: Record<string, unknown>;