@metamask/snaps-sdk 6.0.0 → 6.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/index.js +138 -60
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +170 -57
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/jsx/index.js +143 -47
  7. package/dist/jsx/index.js.map +1 -1
  8. package/dist/jsx/index.mjs +149 -52
  9. package/dist/jsx/index.mjs.map +1 -1
  10. package/dist/jsx/jsx-dev-runtime.js +104 -25
  11. package/dist/jsx/jsx-dev-runtime.js.map +1 -1
  12. package/dist/jsx/jsx-dev-runtime.mjs +110 -30
  13. package/dist/jsx/jsx-dev-runtime.mjs.map +1 -1
  14. package/dist/tsconfig.build.tsbuildinfo +1 -1
  15. package/dist/types/internals/jsx.d.ts +1 -2
  16. package/dist/types/internals/structs.d.ts +12 -3
  17. package/dist/types/internals/svg.d.ts +1 -1
  18. package/dist/types/jsx/components/Card.d.ts +36 -0
  19. package/dist/types/jsx/components/Container.d.ts +34 -0
  20. package/dist/types/jsx/components/Footer.d.ts +28 -0
  21. package/dist/types/jsx/components/index.d.ts +7 -1
  22. package/dist/types/jsx/index.d.ts +1 -1
  23. package/dist/types/jsx/validation.d.ts +37 -5
  24. package/dist/types/types/handlers/user-input.d.ts +29 -29
  25. package/dist/types/types/interface.d.ts +7 -7
  26. package/dist/types/types/methods/dialog.d.ts +8 -2
  27. package/dist/types/types/methods/index.d.ts +1 -0
  28. package/dist/types/types/methods/methods.d.ts +2 -0
  29. package/dist/types/types/methods/resolve-interface.d.ts +15 -0
  30. package/dist/types/ui/builder.d.ts +1 -1
  31. package/dist/types/ui/components/address.d.ts +4 -4
  32. package/dist/types/ui/components/button.d.ts +7 -7
  33. package/dist/types/ui/components/copyable.d.ts +5 -5
  34. package/dist/types/ui/components/divider.d.ts +3 -3
  35. package/dist/types/ui/components/form.d.ts +7 -7
  36. package/dist/types/ui/components/heading.d.ts +4 -4
  37. package/dist/types/ui/components/image.d.ts +4 -4
  38. package/dist/types/ui/components/input.d.ts +9 -9
  39. package/dist/types/ui/components/panel.d.ts +1 -1
  40. package/dist/types/ui/components/row.d.ts +6 -6
  41. package/dist/types/ui/components/spinner.d.ts +3 -3
  42. package/dist/types/ui/components/text.d.ts +5 -5
  43. package/dist/types/ui/nodes.d.ts +6 -6
  44. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -6,6 +6,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [6.1.1]
10
+ ### Changed
11
+ - Bump `@metamask/providers` from `17.0.0` to `^17.1.2` ([#2598](https://github.com/metamask/snaps/pull/2598))
12
+
13
+ ## [6.1.0]
14
+ ### Added
15
+ - Add non-restricted RPC method `snap_resolveInterface` ([#2509](https://github.com/metamask/snaps/pull/2509))
16
+ - This method allows a Snap to resolve a given user interface bound to a `snap_dialog` with a custom value.
17
+ - Add new types `ResolveInterfaceParams`, `ResolveInterfaceResult`.
18
+ - Add `Card` component ([#2480](https://github.com/metamask/snaps/pull/2480))
19
+ - Add `BoxChildStruct`, `FormChildStruct`, `FieldChildUnionStruct` ([#2409](https://github.com/metamask/snaps/pull/2409))
20
+ - Add `Container` and `Footer` components ([#2517](https://github.com/metamask/snaps/pull/2517))
21
+
22
+ ### Changed
23
+ - Update `RootJSXElement` to allow `Container` or `Box` at the root ([#2526](https://github.com/metamask/snaps/pull/2526))
24
+ - Bump `@metamask/key-tree` from `^9.1.1` to `^9.1.2` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
25
+ - Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
26
+ - Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
27
+
28
+ ### Fixed
29
+ - Replace `superstruct` with ESM-compatible `@metamask/superstruct` `^3.1.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
30
+ - This fixes the issue of this package being unusable by any TypeScript project that uses `Node16` or `NodeNext` as its `moduleResolution` option.
31
+ - Set `@metamask/providers` from `^17.0.0` to `17.0.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
32
+ - `17.1.0` and `17.1.1` introduce regressions.
33
+
9
34
  ## [6.0.0]
10
35
  ### Added
11
36
  - **BREAKING:** Add `FileInput` component ([#2469](https://github.com/MetaMask/snaps/pull/2469), [#2504](https://github.com/MetaMask/snaps/pull/2504))
@@ -181,7 +206,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
181
206
  ### Added
182
207
  - Initial release of this package.
183
208
 
184
- [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.0.0...HEAD
209
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.1.1...HEAD
210
+ [6.1.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.1.0...@metamask/snaps-sdk@6.1.1
211
+ [6.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.0.0...@metamask/snaps-sdk@6.1.0
185
212
  [6.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@5.0.0...@metamask/snaps-sdk@6.0.0
186
213
  [5.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@4.4.2...@metamask/snaps-sdk@5.0.0
187
214
  [4.4.2]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@4.4.1...@metamask/snaps-sdk@4.4.2
package/dist/index.js CHANGED
@@ -95,7 +95,7 @@ __export(src_exports, {
95
95
  UserInputEventType: () => UserInputEventType,
96
96
  UserRejectedRequestError: () => UserRejectedRequestError,
97
97
  address: () => address,
98
- assert: () => import_utils8.assert,
98
+ assert: () => import_utils9.assert,
99
99
  assertIsComponent: () => assertIsComponent,
100
100
  button: () => button,
101
101
  copyable: () => copyable,
@@ -287,7 +287,8 @@ function getErrorData(error) {
287
287
  }
288
288
 
289
289
  // src/internals/structs.ts
290
- var import_superstruct = require("superstruct");
290
+ var import_superstruct = require("@metamask/superstruct");
291
+ var import_utils2 = require("@metamask/utils");
291
292
  function literal(value) {
292
293
  return (0, import_superstruct.define)(
293
294
  JSON.stringify(value),
@@ -307,6 +308,41 @@ function union([
307
308
  function enumValue(constant) {
308
309
  return literal(constant);
309
310
  }
311
+ function typedUnion(structs) {
312
+ return new import_superstruct.Struct({
313
+ type: "union",
314
+ schema: null,
315
+ *entries(value, context) {
316
+ if (!(0, import_utils2.isPlainObject)(value) || !(0, import_utils2.hasProperty)(value, "type")) {
317
+ return;
318
+ }
319
+ const { type } = value;
320
+ const struct = structs.find(({ schema }) => (0, import_superstruct.is)(type, schema.type));
321
+ if (!struct) {
322
+ return;
323
+ }
324
+ for (const entry of struct.entries(value, context)) {
325
+ yield entry;
326
+ }
327
+ },
328
+ validator(value, context) {
329
+ const types = structs.map(({ schema }) => schema.type.type);
330
+ if (!(0, import_utils2.isPlainObject)(value) || !(0, import_utils2.hasProperty)(value, "type") || typeof value.type !== "string") {
331
+ return `Expected type to be one of: ${types.join(
332
+ ", "
333
+ )}, but received: undefined`;
334
+ }
335
+ const { type } = value;
336
+ const struct = structs.find(({ schema }) => (0, import_superstruct.is)(type, schema.type));
337
+ if (struct) {
338
+ return struct.validator(value, context);
339
+ }
340
+ return `Expected type to be one of: ${types.join(
341
+ ", "
342
+ )}, but received: "${type}"`;
343
+ }
344
+ });
345
+ }
310
346
 
311
347
  // src/internals/jsx.ts
312
348
  function nullUnion(structs) {
@@ -314,7 +350,7 @@ function nullUnion(structs) {
314
350
  }
315
351
 
316
352
  // src/internals/svg.ts
317
- var import_superstruct2 = require("superstruct");
353
+ var import_superstruct2 = require("@metamask/superstruct");
318
354
  function svg() {
319
355
  return (0, import_superstruct2.refine)((0, import_superstruct2.string)(), "SVG", (value) => {
320
356
  if (!value.includes("<svg")) {
@@ -325,7 +361,7 @@ function svg() {
325
361
  }
326
362
 
327
363
  // src/index.ts
328
- var import_utils8 = require("@metamask/utils");
364
+ var import_utils9 = require("@metamask/utils");
329
365
 
330
366
  // src/error-wrappers.ts
331
367
  var import_rpc_errors = require("@metamask/rpc-errors");
@@ -361,19 +397,19 @@ var UserRejectedRequestError = createSnapError(
361
397
  );
362
398
 
363
399
  // src/images.ts
364
- var import_utils5 = require("@metamask/utils");
400
+ var import_utils6 = require("@metamask/utils");
365
401
 
366
402
  // src/ui/components/address.ts
367
- var import_utils3 = require("@metamask/utils");
368
- var import_superstruct4 = require("superstruct");
403
+ var import_superstruct4 = require("@metamask/superstruct");
404
+ var import_utils4 = require("@metamask/utils");
369
405
 
370
406
  // src/ui/builder.ts
371
- var import_utils2 = require("@metamask/utils");
407
+ var import_utils3 = require("@metamask/utils");
372
408
  function createBuilder(type, struct, keys = []) {
373
409
  return (...args) => {
374
- if (args.length === 1 && (0, import_utils2.isPlainObject)(args[0])) {
410
+ if (args.length === 1 && (0, import_utils3.isPlainObject)(args[0])) {
375
411
  const node2 = { ...args[0], type };
376
- (0, import_utils2.assertStruct)(node2, struct, `Invalid ${type} component`);
412
+ (0, import_utils3.assertStruct)(node2, struct, `Invalid ${type} component`);
377
413
  return node2;
378
414
  }
379
415
  const node = keys.reduce(
@@ -388,13 +424,13 @@ function createBuilder(type, struct, keys = []) {
388
424
  },
389
425
  { type }
390
426
  );
391
- (0, import_utils2.assertStruct)(node, struct, `Invalid ${type} component`);
427
+ (0, import_utils3.assertStruct)(node, struct, `Invalid ${type} component`);
392
428
  return node;
393
429
  };
394
430
  }
395
431
 
396
432
  // src/ui/nodes.ts
397
- var import_superstruct3 = require("superstruct");
433
+ var import_superstruct3 = require("@metamask/superstruct");
398
434
  var NodeType = /* @__PURE__ */ ((NodeType2) => {
399
435
  NodeType2["Copyable"] = "copyable";
400
436
  NodeType2["Divider"] = "divider";
@@ -425,7 +461,7 @@ var AddressStruct = (0, import_superstruct4.assign)(
425
461
  LiteralStruct,
426
462
  (0, import_superstruct4.object)({
427
463
  type: (0, import_superstruct4.literal)("address" /* Address */),
428
- value: import_utils3.HexChecksumAddressStruct
464
+ value: import_utils4.HexChecksumAddressStruct
429
465
  })
430
466
  );
431
467
  var address = createBuilder("address" /* Address */, AddressStruct, [
@@ -433,7 +469,7 @@ var address = createBuilder("address" /* Address */, AddressStruct, [
433
469
  ]);
434
470
 
435
471
  // src/ui/components/copyable.ts
436
- var import_superstruct5 = require("superstruct");
472
+ var import_superstruct5 = require("@metamask/superstruct");
437
473
  var CopyableStruct = (0, import_superstruct5.assign)(
438
474
  LiteralStruct,
439
475
  (0, import_superstruct5.object)({
@@ -448,7 +484,7 @@ var copyable = createBuilder("copyable" /* Copyable */, CopyableStruct, [
448
484
  ]);
449
485
 
450
486
  // src/ui/components/divider.ts
451
- var import_superstruct6 = require("superstruct");
487
+ var import_superstruct6 = require("@metamask/superstruct");
452
488
  var DividerStruct = (0, import_superstruct6.assign)(
453
489
  NodeStruct,
454
490
  (0, import_superstruct6.object)({
@@ -458,7 +494,7 @@ var DividerStruct = (0, import_superstruct6.assign)(
458
494
  var divider = createBuilder("divider" /* Divider */, DividerStruct);
459
495
 
460
496
  // src/ui/components/heading.ts
461
- var import_superstruct7 = require("superstruct");
497
+ var import_superstruct7 = require("@metamask/superstruct");
462
498
  var HeadingStruct = (0, import_superstruct7.assign)(
463
499
  LiteralStruct,
464
500
  (0, import_superstruct7.object)({
@@ -471,7 +507,7 @@ var heading = createBuilder("heading" /* Heading */, HeadingStruct, [
471
507
  ]);
472
508
 
473
509
  // src/ui/components/image.ts
474
- var import_superstruct8 = require("superstruct");
510
+ var import_superstruct8 = require("@metamask/superstruct");
475
511
  var ImageStruct = (0, import_superstruct8.assign)(
476
512
  NodeStruct,
477
513
  (0, import_superstruct8.object)({
@@ -482,10 +518,10 @@ var ImageStruct = (0, import_superstruct8.assign)(
482
518
  var image = createBuilder("image" /* Image */, ImageStruct, ["value"]);
483
519
 
484
520
  // src/ui/components/panel.ts
485
- var import_superstruct15 = require("superstruct");
521
+ var import_superstruct15 = require("@metamask/superstruct");
486
522
 
487
523
  // src/ui/components/button.ts
488
- var import_superstruct9 = require("superstruct");
524
+ var import_superstruct9 = require("@metamask/superstruct");
489
525
  var ButtonVariant = /* @__PURE__ */ ((ButtonVariant2) => {
490
526
  ButtonVariant2["Primary"] = "primary";
491
527
  ButtonVariant2["Secondary"] = "secondary";
@@ -521,10 +557,10 @@ var button = createBuilder("button" /* Button */, ButtonStruct, [
521
557
  ]);
522
558
 
523
559
  // src/ui/components/form.ts
524
- var import_superstruct11 = require("superstruct");
560
+ var import_superstruct11 = require("@metamask/superstruct");
525
561
 
526
562
  // src/ui/components/input.ts
527
- var import_superstruct10 = require("superstruct");
563
+ var import_superstruct10 = require("@metamask/superstruct");
528
564
  var InputType = /* @__PURE__ */ ((InputType2) => {
529
565
  InputType2["Text"] = "text";
530
566
  InputType2["Number"] = "number";
@@ -573,10 +609,10 @@ var form = createBuilder("form" /* Form */, FormStruct, [
573
609
  ]);
574
610
 
575
611
  // src/ui/components/row.ts
576
- var import_superstruct13 = require("superstruct");
612
+ var import_superstruct13 = require("@metamask/superstruct");
577
613
 
578
614
  // src/ui/components/text.ts
579
- var import_superstruct12 = require("superstruct");
615
+ var import_superstruct12 = require("@metamask/superstruct");
580
616
  var TextStruct = (0, import_superstruct12.assign)(
581
617
  LiteralStruct,
582
618
  (0, import_superstruct12.object)({
@@ -620,7 +656,7 @@ var row = createBuilder("row" /* Row */, RowStruct, [
620
656
  ]);
621
657
 
622
658
  // src/ui/components/spinner.ts
623
- var import_superstruct14 = require("superstruct");
659
+ var import_superstruct14 = require("@metamask/superstruct");
624
660
  var SpinnerStruct = (0, import_superstruct14.assign)(
625
661
  NodeStruct,
626
662
  (0, import_superstruct14.object)({
@@ -645,7 +681,7 @@ var PanelStruct = (0, import_superstruct15.assign)(
645
681
  })
646
682
  );
647
683
  var panel = createBuilder("panel" /* Panel */, PanelStruct, ["children"]);
648
- var ComponentStruct = (0, import_superstruct15.union)([
684
+ var ComponentStruct = typedUnion([
649
685
  CopyableStruct,
650
686
  DividerStruct,
651
687
  HeadingStruct,
@@ -661,13 +697,13 @@ var ComponentStruct = (0, import_superstruct15.union)([
661
697
  ]);
662
698
 
663
699
  // src/ui/component.ts
664
- var import_utils4 = require("@metamask/utils");
665
- var import_superstruct16 = require("superstruct");
700
+ var import_superstruct16 = require("@metamask/superstruct");
701
+ var import_utils5 = require("@metamask/utils");
666
702
  function isComponent(value) {
667
703
  return (0, import_superstruct16.is)(value, ComponentStruct);
668
704
  }
669
705
  function assertIsComponent(value) {
670
- (0, import_utils4.assertStruct)(value, ComponentStruct, "Invalid component");
706
+ (0, import_utils5.assertStruct)(value, ComponentStruct, "Invalid component");
671
707
  }
672
708
 
673
709
  // src/images.ts
@@ -684,7 +720,7 @@ async function getRawImageData(url, options) {
684
720
  );
685
721
  }
686
722
  const blob = await response.blob();
687
- (0, import_utils5.assert)(
723
+ (0, import_utils6.assert)(
688
724
  blob.type === "image/jpeg" || blob.type === "image/png",
689
725
  "Expected image data to be a JPEG or PNG image."
690
726
  );
@@ -694,14 +730,14 @@ async function getRawImageData(url, options) {
694
730
  async function getImageData(url, options) {
695
731
  const blob = await getRawImageData(url, options);
696
732
  const bytes = new Uint8Array(await blob.arrayBuffer());
697
- return `data:${blob.type};base64,${(0, import_utils5.bytesToBase64)(bytes)}`;
733
+ return `data:${blob.type};base64,${(0, import_utils6.bytesToBase64)(bytes)}`;
698
734
  }
699
735
  async function getImageComponent(url, { width, height = width, request }) {
700
- (0, import_utils5.assert)(
736
+ (0, import_utils6.assert)(
701
737
  typeof width === "number" && width > 0,
702
738
  "Expected width to be a number greater than 0."
703
739
  );
704
- (0, import_utils5.assert)(
740
+ (0, import_utils6.assert)(
705
741
  typeof height === "number" && height > 0,
706
742
  "Expected height to be a number greater than 0."
707
743
  );
@@ -719,7 +755,7 @@ var SeverityLevel = /* @__PURE__ */ ((SeverityLevel2) => {
719
755
  })(SeverityLevel || {});
720
756
 
721
757
  // src/types/handlers/user-input.ts
722
- var import_superstruct17 = require("superstruct");
758
+ var import_superstruct17 = require("@metamask/superstruct");
723
759
  var UserInputEventType = /* @__PURE__ */ ((UserInputEventType2) => {
724
760
  UserInputEventType2["ButtonClickEvent"] = "ButtonClickEvent";
725
761
  UserInputEventType2["FormSubmitEvent"] = "FormSubmitEvent";
@@ -807,19 +843,19 @@ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
807
843
  })(NotificationType || {});
808
844
 
809
845
  // src/types/interface.ts
810
- var import_utils7 = require("@metamask/utils");
811
- var import_superstruct19 = require("superstruct");
846
+ var import_superstruct19 = require("@metamask/superstruct");
847
+ var import_utils8 = require("@metamask/utils");
812
848
 
813
849
  // src/jsx/validation.ts
814
- var import_utils6 = require("@metamask/utils");
815
- var import_superstruct18 = require("superstruct");
850
+ var import_superstruct18 = require("@metamask/superstruct");
851
+ var import_utils7 = require("@metamask/utils");
816
852
  var KeyStruct = nullUnion([(0, import_superstruct18.string)(), (0, import_superstruct18.number)()]);
817
853
  var StringElementStruct = children([
818
854
  (0, import_superstruct18.string)()
819
855
  ]);
820
856
  var ElementStruct = (0, import_superstruct18.object)({
821
857
  type: (0, import_superstruct18.string)(),
822
- props: (0, import_superstruct18.record)((0, import_superstruct18.string)(), import_utils6.JsonStruct),
858
+ props: (0, import_superstruct18.record)((0, import_superstruct18.string)(), import_utils7.JsonStruct),
823
859
  key: (0, import_superstruct18.nullable)(KeyStruct)
824
860
  });
825
861
  function nestable(struct) {
@@ -877,22 +913,32 @@ var FileInputStruct = element(
877
913
  compact: (0, import_superstruct18.optional)((0, import_superstruct18.boolean)())
878
914
  }
879
915
  );
916
+ var BUTTON_INPUT = [InputStruct2, ButtonStruct2];
917
+ var FIELD_CHILDREN_ARRAY = [
918
+ InputStruct2,
919
+ DropdownStruct,
920
+ FileInputStruct,
921
+ CheckboxStruct
922
+ ];
923
+ var FieldChildUnionStruct = nullUnion([
924
+ ...FIELD_CHILDREN_ARRAY,
925
+ ...BUTTON_INPUT
926
+ ]);
927
+ var FieldChildStruct = nullUnion([
928
+ (0, import_superstruct18.tuple)(BUTTON_INPUT),
929
+ ...FIELD_CHILDREN_ARRAY
930
+ ]);
880
931
  var FieldStruct = element("Field", {
881
932
  label: (0, import_superstruct18.optional)((0, import_superstruct18.string)()),
882
933
  error: (0, import_superstruct18.optional)((0, import_superstruct18.string)()),
883
- children: nullUnion([
884
- (0, import_superstruct18.tuple)([InputStruct2, ButtonStruct2]),
885
- DropdownStruct,
886
- FileInputStruct,
887
- InputStruct2,
888
- CheckboxStruct
889
- ])
934
+ children: FieldChildStruct
890
935
  });
936
+ var FormChildStruct = children(
937
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
938
+ [FieldStruct, (0, import_superstruct18.lazy)(() => BoxChildStruct)]
939
+ );
891
940
  var FormStruct2 = element("Form", {
892
- children: children(
893
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
894
- [FieldStruct, (0, import_superstruct18.lazy)(() => BoxChildStruct)]
895
- ),
941
+ children: FormChildStruct,
896
942
  name: (0, import_superstruct18.string)()
897
943
  });
898
944
  var BoldStruct = element("Bold", {
@@ -914,13 +960,14 @@ var FormattingStruct = nullUnion([
914
960
  ItalicStruct
915
961
  ]);
916
962
  var AddressStruct2 = element("Address", {
917
- address: import_utils6.HexChecksumAddressStruct
963
+ address: import_utils7.HexChecksumAddressStruct
918
964
  });
965
+ var BoxChildrenStruct = children(
966
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
967
+ [(0, import_superstruct18.lazy)(() => BoxChildStruct)]
968
+ );
919
969
  var BoxStruct = element("Box", {
920
- children: children(
921
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
922
- [(0, import_superstruct18.lazy)(() => BoxChildStruct)]
923
- ),
970
+ children: BoxChildrenStruct,
924
971
  direction: (0, import_superstruct18.optional)(nullUnion([literal("horizontal"), literal("vertical")])),
925
972
  alignment: (0, import_superstruct18.optional)(
926
973
  nullUnion([
@@ -932,6 +979,23 @@ var BoxStruct = element("Box", {
932
979
  ])
933
980
  )
934
981
  });
982
+ var FooterChildStruct = nullUnion([
983
+ (0, import_superstruct18.tuple)([ButtonStruct2, ButtonStruct2]),
984
+ ButtonStruct2
985
+ ]);
986
+ var FooterStruct = element("Footer", {
987
+ children: FooterChildStruct
988
+ });
989
+ var ContainerChildStruct = nullUnion([
990
+ (0, import_superstruct18.tuple)([BoxStruct, FooterStruct]),
991
+ BoxStruct
992
+ ]);
993
+ var ContainerStruct = element(
994
+ "Container",
995
+ {
996
+ children: ContainerChildStruct
997
+ }
998
+ );
935
999
  var CopyableStruct2 = element("Copyable", {
936
1000
  value: (0, import_superstruct18.string)(),
937
1001
  sensitive: (0, import_superstruct18.optional)((0, import_superstruct18.boolean)())
@@ -941,6 +1005,13 @@ var ValueStruct = element("Value", {
941
1005
  value: (0, import_superstruct18.string)(),
942
1006
  extra: (0, import_superstruct18.string)()
943
1007
  });
1008
+ var CardStruct = element("Card", {
1009
+ image: (0, import_superstruct18.optional)((0, import_superstruct18.string)()),
1010
+ title: (0, import_superstruct18.string)(),
1011
+ description: (0, import_superstruct18.optional)((0, import_superstruct18.string)()),
1012
+ value: (0, import_superstruct18.string)(),
1013
+ extra: (0, import_superstruct18.optional)((0, import_superstruct18.string)())
1014
+ });
944
1015
  var HeadingStruct2 = element("Heading", {
945
1016
  children: StringElementStruct
946
1017
  });
@@ -986,7 +1057,7 @@ var RowStruct2 = element("Row", {
986
1057
  tooltip: (0, import_superstruct18.optional)((0, import_superstruct18.string)())
987
1058
  });
988
1059
  var SpinnerStruct2 = element("Spinner");
989
- var BoxChildStruct = nullUnion([
1060
+ var BoxChildStruct = typedUnion([
990
1061
  AddressStruct2,
991
1062
  BoldStruct,
992
1063
  BoxStruct,
@@ -1005,10 +1076,14 @@ var BoxChildStruct = nullUnion([
1005
1076
  SpinnerStruct2,
1006
1077
  TextStruct2,
1007
1078
  TooltipStruct,
1008
- CheckboxStruct
1079
+ CheckboxStruct,
1080
+ CardStruct
1081
+ ]);
1082
+ var RootJSXElementStruct = nullUnion([
1083
+ BoxChildStruct,
1084
+ ContainerStruct
1009
1085
  ]);
1010
- var RootJSXElementStruct = BoxChildStruct;
1011
- var JSXElementStruct = nullUnion([
1086
+ var JSXElementStruct = typedUnion([
1012
1087
  ButtonStruct2,
1013
1088
  InputStruct2,
1014
1089
  FileInputStruct,
@@ -1030,7 +1105,10 @@ var JSXElementStruct = nullUnion([
1030
1105
  OptionStruct,
1031
1106
  ValueStruct,
1032
1107
  TooltipStruct,
1033
- CheckboxStruct
1108
+ CheckboxStruct,
1109
+ FooterStruct,
1110
+ ContainerStruct,
1111
+ CardStruct
1034
1112
  ]);
1035
1113
 
1036
1114
  // src/types/interface.ts
@@ -1044,5 +1122,5 @@ var ComponentOrElementStruct = (0, import_superstruct19.union)([
1044
1122
  ComponentStruct,
1045
1123
  RootJSXElementStruct
1046
1124
  ]);
1047
- var InterfaceContextStruct = (0, import_superstruct19.record)((0, import_superstruct19.string)(), import_utils7.JsonStruct);
1125
+ var InterfaceContextStruct = (0, import_superstruct19.record)((0, import_superstruct19.string)(), import_utils8.JsonStruct);
1048
1126
  //# sourceMappingURL=index.js.map