@metamask/snaps-sdk 6.2.1 → 6.4.0
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/CHANGELOG.md +30 -1
- package/dist/error-wrappers.cjs +146 -0
- package/dist/error-wrappers.cjs.map +1 -0
- package/dist/error-wrappers.d.cts +830 -0
- package/dist/error-wrappers.d.cts.map +1 -0
- package/dist/{types/error-wrappers.d.ts → error-wrappers.d.mts} +193 -192
- package/dist/error-wrappers.d.mts.map +1 -0
- package/dist/error-wrappers.mjs +143 -0
- package/dist/error-wrappers.mjs.map +1 -0
- package/dist/errors.cjs +124 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/{types/errors.d.ts → errors.d.cts} +3 -2
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.mts +87 -0
- package/dist/errors.d.mts.map +1 -0
- package/dist/errors.mjs +120 -0
- package/dist/errors.mjs.map +1 -0
- package/dist/images.cjs +91 -0
- package/dist/images.cjs.map +1 -0
- package/dist/{types/images.d.ts → images.d.cts} +2 -1
- package/dist/images.d.cts.map +1 -0
- package/dist/images.d.mts +70 -0
- package/dist/images.d.mts.map +1 -0
- package/dist/images.mjs +86 -0
- package/dist/images.mjs.map +1 -0
- package/dist/index.cjs +36 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +7 -1201
- package/dist/index.mjs.map +1 -1
- package/dist/internals/error-wrappers.cjs +44 -0
- package/dist/internals/error-wrappers.cjs.map +1 -0
- package/dist/internals/error-wrappers.d.cts +60 -0
- package/dist/internals/error-wrappers.d.cts.map +1 -0
- package/dist/{types/internals/error-wrappers.d.ts → internals/error-wrappers.d.mts} +15 -14
- package/dist/internals/error-wrappers.d.mts.map +1 -0
- package/dist/internals/error-wrappers.mjs +40 -0
- package/dist/internals/error-wrappers.mjs.map +1 -0
- package/dist/internals/errors.cjs +80 -0
- package/dist/internals/errors.cjs.map +1 -0
- package/dist/{types/internals/errors.d.ts → internals/errors.d.cts} +1 -0
- package/dist/internals/errors.d.cts.map +1 -0
- package/dist/internals/errors.d.mts +42 -0
- package/dist/internals/errors.d.mts.map +1 -0
- package/dist/internals/errors.mjs +73 -0
- package/dist/internals/errors.mjs.map +1 -0
- package/dist/internals/helpers.cjs +3 -0
- package/dist/internals/helpers.cjs.map +1 -0
- package/dist/{types/internals/helpers.d.ts → internals/helpers.d.cts} +2 -1
- package/dist/internals/helpers.d.cts.map +1 -0
- package/dist/internals/helpers.d.mts +37 -0
- package/dist/internals/helpers.d.mts.map +1 -0
- package/dist/internals/helpers.mjs +2 -0
- package/dist/internals/helpers.mjs.map +1 -0
- package/dist/internals/index.cjs +23 -0
- package/dist/internals/index.cjs.map +1 -0
- package/dist/internals/index.d.cts +7 -0
- package/dist/internals/index.d.cts.map +1 -0
- package/dist/internals/index.d.mts +7 -0
- package/dist/internals/index.d.mts.map +1 -0
- package/dist/internals/index.mjs +7 -0
- package/dist/internals/index.mjs.map +1 -0
- package/dist/internals/jsx.cjs +17 -0
- package/dist/internals/jsx.cjs.map +1 -0
- package/dist/{types/internals/jsx.d.ts → internals/jsx.d.cts} +3 -2
- package/dist/internals/jsx.d.cts.map +1 -0
- package/dist/internals/jsx.d.mts +31 -0
- package/dist/internals/jsx.d.mts.map +1 -0
- package/dist/internals/jsx.mjs +13 -0
- package/dist/internals/jsx.mjs.map +1 -0
- package/dist/internals/structs.cjs +161 -0
- package/dist/internals/structs.cjs.map +1 -0
- package/dist/{types/internals/structs.d.ts → internals/structs.d.cts} +13 -3
- package/dist/internals/structs.d.cts.map +1 -0
- package/dist/internals/structs.d.mts +69 -0
- package/dist/internals/structs.d.mts.map +1 -0
- package/dist/internals/structs.mjs +153 -0
- package/dist/internals/structs.mjs.map +1 -0
- package/dist/internals/svg.cjs +23 -0
- package/dist/internals/svg.cjs.map +1 -0
- package/dist/{types/internals/svg.d.ts → internals/svg.d.cts} +1 -0
- package/dist/internals/svg.d.cts.map +1 -0
- package/dist/internals/svg.d.mts +8 -0
- package/dist/internals/svg.d.mts.map +1 -0
- package/dist/internals/svg.mjs +19 -0
- package/dist/internals/svg.mjs.map +1 -0
- package/dist/jsx/component.cjs +32 -0
- package/dist/jsx/component.cjs.map +1 -0
- package/dist/{types/jsx/component.d.ts → jsx/component.d.cts} +2 -1
- package/dist/jsx/component.d.cts.map +1 -0
- package/dist/jsx/component.d.mts +74 -0
- package/dist/jsx/component.d.mts.map +1 -0
- package/dist/jsx/component.mjs +28 -0
- package/dist/jsx/component.mjs.map +1 -0
- package/dist/jsx/components/Address.cjs +23 -0
- package/dist/jsx/components/Address.cjs.map +1 -0
- package/dist/jsx/components/Address.d.cts +34 -0
- package/dist/jsx/components/Address.d.cts.map +1 -0
- package/dist/jsx/components/Address.d.mts +34 -0
- package/dist/jsx/components/Address.d.mts.map +1 -0
- package/dist/jsx/components/Address.mjs +20 -0
- package/dist/jsx/components/Address.mjs.map +1 -0
- package/dist/jsx/components/Box.cjs +18 -0
- package/dist/jsx/components/Box.cjs.map +1 -0
- package/dist/{types/jsx/components/Box.d.ts → jsx/components/Box.d.cts} +2 -1
- package/dist/jsx/components/Box.d.cts.map +1 -0
- package/dist/jsx/components/Box.d.mts +32 -0
- package/dist/jsx/components/Box.d.mts.map +1 -0
- package/dist/jsx/components/Box.mjs +15 -0
- package/dist/jsx/components/Box.mjs.map +1 -0
- package/dist/jsx/components/Card.cjs +20 -0
- package/dist/jsx/components/Card.cjs.map +1 -0
- package/dist/{types/jsx/components/Card.d.ts → jsx/components/Card.d.cts} +1 -0
- package/dist/jsx/components/Card.d.cts.map +1 -0
- package/dist/jsx/components/Card.d.mts +37 -0
- package/dist/jsx/components/Card.d.mts.map +1 -0
- package/dist/jsx/components/Card.mjs +17 -0
- package/dist/jsx/components/Card.mjs.map +1 -0
- package/dist/jsx/components/Container.cjs +24 -0
- package/dist/jsx/components/Container.cjs.map +1 -0
- package/dist/{types/jsx/components/Container.d.ts → jsx/components/Container.d.cts} +4 -3
- package/dist/jsx/components/Container.d.cts.map +1 -0
- package/dist/jsx/components/Container.d.mts +35 -0
- package/dist/jsx/components/Container.d.mts.map +1 -0
- package/dist/jsx/components/Container.mjs +21 -0
- package/dist/jsx/components/Container.mjs.map +1 -0
- package/dist/jsx/components/Copyable.cjs +20 -0
- package/dist/jsx/components/Copyable.cjs.map +1 -0
- package/dist/{types/jsx/components/Copyable.d.ts → jsx/components/Copyable.d.cts} +1 -0
- package/dist/jsx/components/Copyable.d.cts.map +1 -0
- package/dist/jsx/components/Copyable.d.mts +33 -0
- package/dist/jsx/components/Copyable.d.mts.map +1 -0
- package/dist/jsx/components/Copyable.mjs +17 -0
- package/dist/jsx/components/Copyable.mjs.map +1 -0
- package/dist/jsx/components/Divider.cjs +17 -0
- package/dist/jsx/components/Divider.cjs.map +1 -0
- package/dist/{types/jsx/components/Divider.d.ts → jsx/components/Divider.d.cts} +1 -0
- package/dist/jsx/components/Divider.d.cts.map +1 -0
- package/dist/jsx/components/Divider.d.mts +18 -0
- package/dist/jsx/components/Divider.d.mts.map +1 -0
- package/dist/jsx/components/Divider.mjs +14 -0
- package/dist/jsx/components/Divider.mjs.map +1 -0
- package/dist/jsx/components/Footer.cjs +19 -0
- package/dist/jsx/components/Footer.cjs.map +1 -0
- package/dist/{types/jsx/components/Footer.d.ts → jsx/components/Footer.d.cts} +2 -1
- package/dist/jsx/components/Footer.d.cts.map +1 -0
- package/dist/jsx/components/Footer.d.mts +29 -0
- package/dist/jsx/components/Footer.d.mts.map +1 -0
- package/dist/jsx/components/Footer.mjs +16 -0
- package/dist/jsx/components/Footer.mjs.map +1 -0
- package/dist/jsx/components/Heading.cjs +16 -0
- package/dist/jsx/components/Heading.cjs.map +1 -0
- package/dist/{types/jsx/components/Heading.d.ts → jsx/components/Heading.d.cts} +2 -1
- package/dist/jsx/components/Heading.d.cts.map +1 -0
- package/dist/jsx/components/Heading.d.mts +27 -0
- package/dist/jsx/components/Heading.d.mts.map +1 -0
- package/dist/jsx/components/Heading.mjs +13 -0
- package/dist/jsx/components/Heading.mjs.map +1 -0
- package/dist/jsx/components/Icon.cjs +180 -0
- package/dist/jsx/components/Icon.cjs.map +1 -0
- package/dist/jsx/components/Icon.d.cts +190 -0
- package/dist/jsx/components/Icon.d.cts.map +1 -0
- package/dist/jsx/components/Icon.d.mts +190 -0
- package/dist/jsx/components/Icon.d.mts.map +1 -0
- package/dist/jsx/components/Icon.mjs +177 -0
- package/dist/jsx/components/Icon.mjs.map +1 -0
- package/dist/jsx/components/Image.cjs +22 -0
- package/dist/jsx/components/Image.cjs.map +1 -0
- package/dist/{types/jsx/components/Image.d.ts → jsx/components/Image.d.cts} +1 -0
- package/dist/jsx/components/Image.d.cts.map +1 -0
- package/dist/jsx/components/Image.d.mts +37 -0
- package/dist/jsx/components/Image.d.mts.map +1 -0
- package/dist/jsx/components/Image.mjs +19 -0
- package/dist/jsx/components/Image.mjs.map +1 -0
- package/dist/jsx/components/Link.cjs +18 -0
- package/dist/jsx/components/Link.cjs.map +1 -0
- package/dist/{types/jsx/components/Link.d.ts → jsx/components/Link.d.cts} +3 -2
- package/dist/jsx/components/Link.d.cts.map +1 -0
- package/dist/jsx/components/Link.d.mts +36 -0
- package/dist/jsx/components/Link.d.mts.map +1 -0
- package/dist/jsx/components/Link.mjs +15 -0
- package/dist/jsx/components/Link.mjs.map +1 -0
- package/dist/jsx/components/Row.cjs +22 -0
- package/dist/jsx/components/Row.cjs.map +1 -0
- package/dist/{types/jsx/components/Row.d.ts → jsx/components/Row.d.cts} +5 -4
- package/dist/jsx/components/Row.d.cts.map +1 -0
- package/dist/jsx/components/Row.d.mts +46 -0
- package/dist/jsx/components/Row.d.mts.map +1 -0
- package/dist/jsx/components/Row.mjs +19 -0
- package/dist/jsx/components/Row.mjs.map +1 -0
- package/dist/jsx/components/Section.cjs +26 -0
- package/dist/jsx/components/Section.cjs.map +1 -0
- package/dist/jsx/components/Section.d.cts +38 -0
- package/dist/jsx/components/Section.d.cts.map +1 -0
- package/dist/jsx/components/Section.d.mts +38 -0
- package/dist/jsx/components/Section.d.mts.map +1 -0
- package/dist/jsx/components/Section.mjs +23 -0
- package/dist/jsx/components/Section.mjs.map +1 -0
- package/dist/jsx/components/Spinner.cjs +17 -0
- package/dist/jsx/components/Spinner.cjs.map +1 -0
- package/dist/{types/jsx/components/Spinner.d.ts → jsx/components/Spinner.d.cts} +1 -0
- package/dist/jsx/components/Spinner.d.cts.map +1 -0
- package/dist/jsx/components/Spinner.d.mts +18 -0
- package/dist/jsx/components/Spinner.d.mts.map +1 -0
- package/dist/jsx/components/Spinner.mjs +14 -0
- package/dist/jsx/components/Spinner.mjs.map +1 -0
- package/dist/jsx/components/Text.cjs +22 -0
- package/dist/jsx/components/Text.cjs.map +1 -0
- package/dist/{types/jsx/components/Text.d.ts → jsx/components/Text.d.cts} +11 -4
- package/dist/jsx/components/Text.d.cts.map +1 -0
- package/dist/jsx/components/Text.d.mts +45 -0
- package/dist/jsx/components/Text.d.mts.map +1 -0
- package/dist/jsx/components/Text.mjs +19 -0
- package/dist/jsx/components/Text.mjs.map +1 -0
- package/dist/jsx/components/Tooltip.cjs +23 -0
- package/dist/jsx/components/Tooltip.cjs.map +1 -0
- package/dist/{types/jsx/components/Tooltip.d.ts → jsx/components/Tooltip.d.cts} +8 -6
- package/dist/jsx/components/Tooltip.d.cts.map +1 -0
- package/dist/jsx/components/Tooltip.d.mts +40 -0
- package/dist/jsx/components/Tooltip.d.mts.map +1 -0
- package/dist/jsx/components/Tooltip.mjs +20 -0
- package/dist/jsx/components/Tooltip.mjs.map +1 -0
- package/dist/jsx/components/Value.cjs +21 -0
- package/dist/jsx/components/Value.cjs.map +1 -0
- package/dist/{types/jsx/components/Value.d.ts → jsx/components/Value.d.cts} +1 -0
- package/dist/jsx/components/Value.d.cts.map +1 -0
- package/dist/jsx/components/Value.d.mts +32 -0
- package/dist/jsx/components/Value.d.mts.map +1 -0
- package/dist/jsx/components/Value.mjs +18 -0
- package/dist/jsx/components/Value.mjs.map +1 -0
- package/dist/jsx/components/form/Button.cjs +17 -0
- package/dist/jsx/components/form/Button.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Button.d.ts → jsx/components/form/Button.d.cts} +5 -2
- package/dist/jsx/components/form/Button.d.cts.map +1 -0
- package/dist/jsx/components/form/Button.d.mts +40 -0
- package/dist/jsx/components/form/Button.d.mts.map +1 -0
- package/dist/jsx/components/form/Button.mjs +14 -0
- package/dist/jsx/components/form/Button.mjs.map +1 -0
- package/dist/jsx/components/form/Checkbox.cjs +20 -0
- package/dist/jsx/components/form/Checkbox.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Checkbox.d.ts → jsx/components/form/Checkbox.d.cts} +1 -0
- package/dist/jsx/components/form/Checkbox.d.cts.map +1 -0
- package/dist/jsx/components/form/Checkbox.d.mts +36 -0
- package/dist/jsx/components/form/Checkbox.d.mts.map +1 -0
- package/dist/jsx/components/form/Checkbox.mjs +17 -0
- package/dist/jsx/components/form/Checkbox.mjs.map +1 -0
- package/dist/jsx/components/form/Dropdown.cjs +23 -0
- package/dist/jsx/components/form/Dropdown.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Dropdown.d.ts → jsx/components/form/Dropdown.d.cts} +3 -2
- package/dist/jsx/components/form/Dropdown.d.cts.map +1 -0
- package/dist/jsx/components/form/Dropdown.d.mts +39 -0
- package/dist/jsx/components/form/Dropdown.d.mts.map +1 -0
- package/dist/jsx/components/form/Dropdown.mjs +20 -0
- package/dist/jsx/components/form/Dropdown.mjs.map +1 -0
- package/dist/jsx/components/form/Field.cjs +26 -0
- package/dist/jsx/components/form/Field.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Field.d.ts → jsx/components/form/Field.d.cts} +9 -7
- package/dist/jsx/components/form/Field.d.cts.map +1 -0
- package/dist/jsx/components/form/Field.d.mts +46 -0
- package/dist/jsx/components/form/Field.d.mts.map +1 -0
- package/dist/jsx/components/form/Field.mjs +23 -0
- package/dist/jsx/components/form/Field.mjs.map +1 -0
- package/dist/jsx/components/form/FileInput.cjs +31 -0
- package/dist/jsx/components/form/FileInput.cjs.map +1 -0
- package/dist/{types/jsx/components/form/FileInput.d.ts → jsx/components/form/FileInput.d.cts} +1 -0
- package/dist/jsx/components/form/FileInput.d.cts.map +1 -0
- package/dist/jsx/components/form/FileInput.d.mts +48 -0
- package/dist/jsx/components/form/FileInput.d.mts.map +1 -0
- package/dist/jsx/components/form/FileInput.mjs +28 -0
- package/dist/jsx/components/form/FileInput.mjs.map +1 -0
- package/dist/jsx/components/form/Form.cjs +24 -0
- package/dist/jsx/components/form/Form.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Form.d.ts → jsx/components/form/Form.d.cts} +2 -1
- package/dist/jsx/components/form/Form.d.cts.map +1 -0
- package/dist/jsx/components/form/Form.d.mts +37 -0
- package/dist/jsx/components/form/Form.d.mts.map +1 -0
- package/dist/jsx/components/form/Form.mjs +21 -0
- package/dist/jsx/components/form/Form.mjs.map +1 -0
- package/dist/jsx/components/form/Input.cjs +20 -0
- package/dist/jsx/components/form/Input.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Input.d.ts → jsx/components/form/Input.d.cts} +1 -0
- package/dist/jsx/components/form/Input.d.cts.map +1 -0
- package/dist/jsx/components/form/Input.d.mts +36 -0
- package/dist/jsx/components/form/Input.d.mts.map +1 -0
- package/dist/jsx/components/form/Input.mjs +17 -0
- package/dist/jsx/components/form/Input.mjs.map +1 -0
- package/dist/jsx/components/form/Option.cjs +25 -0
- package/dist/jsx/components/form/Option.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Option.d.ts → jsx/components/form/Option.d.cts} +1 -0
- package/dist/jsx/components/form/Option.d.cts.map +1 -0
- package/dist/jsx/components/form/Option.d.mts +36 -0
- package/dist/jsx/components/form/Option.d.mts.map +1 -0
- package/dist/jsx/components/form/Option.mjs +22 -0
- package/dist/jsx/components/form/Option.mjs.map +1 -0
- package/dist/jsx/components/form/Radio.cjs +23 -0
- package/dist/jsx/components/form/Radio.cjs.map +1 -0
- package/dist/{types/jsx/components/form/Radio.d.ts → jsx/components/form/Radio.d.cts} +1 -0
- package/dist/jsx/components/form/Radio.d.cts.map +1 -0
- package/dist/jsx/components/form/Radio.d.mts +36 -0
- package/dist/jsx/components/form/Radio.d.mts.map +1 -0
- package/dist/jsx/components/form/Radio.mjs +20 -0
- package/dist/jsx/components/form/Radio.mjs.map +1 -0
- package/dist/jsx/components/form/RadioGroup.cjs +14 -0
- package/dist/jsx/components/form/RadioGroup.cjs.map +1 -0
- package/dist/{types/jsx/components/form/RadioGroup.d.ts → jsx/components/form/RadioGroup.d.cts} +3 -2
- package/dist/jsx/components/form/RadioGroup.d.cts.map +1 -0
- package/dist/jsx/components/form/RadioGroup.d.mts +30 -0
- package/dist/jsx/components/form/RadioGroup.d.mts.map +1 -0
- package/dist/jsx/components/form/RadioGroup.mjs +11 -0
- package/dist/jsx/components/form/RadioGroup.mjs.map +1 -0
- package/dist/jsx/components/form/Selector.cjs +24 -0
- package/dist/jsx/components/form/Selector.cjs.map +1 -0
- package/dist/jsx/components/form/Selector.d.cts +42 -0
- package/dist/jsx/components/form/Selector.d.cts.map +1 -0
- package/dist/jsx/components/form/Selector.d.mts +42 -0
- package/dist/jsx/components/form/Selector.d.mts.map +1 -0
- package/dist/jsx/components/form/Selector.mjs +21 -0
- package/dist/jsx/components/form/Selector.mjs.map +1 -0
- package/dist/jsx/components/form/SelectorOption.cjs +23 -0
- package/dist/jsx/components/form/SelectorOption.cjs.map +1 -0
- package/dist/jsx/components/form/SelectorOption.d.cts +36 -0
- package/dist/jsx/components/form/SelectorOption.d.cts.map +1 -0
- package/dist/jsx/components/form/SelectorOption.d.mts +36 -0
- package/dist/jsx/components/form/SelectorOption.d.mts.map +1 -0
- package/dist/jsx/components/form/SelectorOption.mjs +20 -0
- package/dist/jsx/components/form/SelectorOption.mjs.map +1 -0
- package/dist/jsx/components/form/index.cjs +29 -0
- package/dist/jsx/components/form/index.cjs.map +1 -0
- package/dist/jsx/components/form/index.d.cts +26 -0
- package/dist/jsx/components/form/index.d.cts.map +1 -0
- package/dist/jsx/components/form/index.d.mts +26 -0
- package/dist/jsx/components/form/index.d.mts.map +1 -0
- package/dist/jsx/components/form/index.mjs +13 -0
- package/dist/jsx/components/form/index.mjs.map +1 -0
- package/dist/jsx/components/formatting/Bold.cjs +21 -0
- package/dist/jsx/components/formatting/Bold.cjs.map +1 -0
- package/dist/{types/jsx/components/formatting/Bold.d.ts → jsx/components/formatting/Bold.d.cts} +2 -1
- package/dist/jsx/components/formatting/Bold.d.cts.map +1 -0
- package/dist/jsx/components/formatting/Bold.d.mts +33 -0
- package/dist/jsx/components/formatting/Bold.d.mts.map +1 -0
- package/dist/jsx/components/formatting/Bold.mjs +18 -0
- package/dist/jsx/components/formatting/Bold.mjs.map +1 -0
- package/dist/jsx/components/formatting/Italic.cjs +20 -0
- package/dist/jsx/components/formatting/Italic.cjs.map +1 -0
- package/dist/{types/jsx/components/formatting/Italic.d.ts → jsx/components/formatting/Italic.d.cts} +2 -1
- package/dist/jsx/components/formatting/Italic.d.cts.map +1 -0
- package/dist/jsx/components/formatting/Italic.d.mts +35 -0
- package/dist/jsx/components/formatting/Italic.d.mts.map +1 -0
- package/dist/jsx/components/formatting/Italic.mjs +17 -0
- package/dist/jsx/components/formatting/Italic.mjs.map +1 -0
- package/dist/jsx/components/formatting/index.cjs +19 -0
- package/dist/jsx/components/formatting/index.cjs.map +1 -0
- package/dist/jsx/components/formatting/index.d.cts +6 -0
- package/dist/jsx/components/formatting/index.d.cts.map +1 -0
- package/dist/jsx/components/formatting/index.d.mts +6 -0
- package/dist/jsx/components/formatting/index.d.mts.map +1 -0
- package/dist/jsx/components/formatting/index.mjs +3 -0
- package/dist/jsx/components/formatting/index.mjs.map +1 -0
- package/dist/jsx/components/index.cjs +36 -0
- package/dist/jsx/components/index.cjs.map +1 -0
- package/dist/jsx/components/index.d.cts +43 -0
- package/dist/jsx/components/index.d.cts.map +1 -0
- package/dist/jsx/components/index.d.mts +43 -0
- package/dist/jsx/components/index.d.mts.map +1 -0
- package/dist/jsx/components/index.mjs +20 -0
- package/dist/jsx/components/index.mjs.map +1 -0
- package/dist/jsx/index.cjs +31 -0
- package/dist/jsx/index.cjs.map +1 -0
- package/dist/jsx/index.d.cts +6 -0
- package/dist/jsx/index.d.cts.map +1 -0
- package/dist/jsx/index.d.mts +6 -0
- package/dist/jsx/index.d.mts.map +1 -0
- package/dist/jsx/index.mjs +5 -586
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/jsx-dev-runtime.cjs +27 -0
- package/dist/jsx/jsx-dev-runtime.cjs.map +1 -0
- package/dist/{types/jsx/jsx-dev-runtime.d.ts → jsx/jsx-dev-runtime.d.cts} +2 -1
- package/dist/jsx/jsx-dev-runtime.d.cts.map +1 -0
- package/dist/jsx/jsx-dev-runtime.d.mts +18 -0
- package/dist/jsx/jsx-dev-runtime.d.mts.map +1 -0
- package/dist/jsx/jsx-dev-runtime.mjs +21 -414
- package/dist/jsx/jsx-dev-runtime.mjs.map +1 -1
- package/dist/jsx/jsx-runtime.cjs +54 -0
- package/dist/jsx/jsx-runtime.cjs.map +1 -0
- package/dist/{types/jsx/jsx-runtime.d.ts → jsx/jsx-runtime.d.cts} +2 -1
- package/dist/jsx/jsx-runtime.d.cts.map +1 -0
- package/dist/jsx/jsx-runtime.d.mts +36 -0
- package/dist/jsx/jsx-runtime.d.mts.map +1 -0
- package/dist/jsx/jsx-runtime.mjs +46 -21
- package/dist/jsx/jsx-runtime.mjs.map +1 -1
- package/dist/jsx/validation.cjs +577 -0
- package/dist/jsx/validation.cjs.map +1 -0
- package/dist/{types/jsx/validation.d.ts → jsx/validation.d.cts} +55 -38
- package/dist/jsx/validation.d.cts.map +1 -0
- package/dist/jsx/validation.d.mts +247 -0
- package/dist/jsx/validation.d.mts.map +1 -0
- package/dist/jsx/validation.mjs +571 -0
- package/dist/jsx/validation.mjs.map +1 -0
- package/dist/types/caip.cjs +3 -0
- package/dist/types/caip.cjs.map +1 -0
- package/dist/types/{types/caip.d.ts → caip.d.cts} +1 -0
- package/dist/types/caip.d.cts.map +1 -0
- package/dist/types/caip.d.mts +13 -0
- package/dist/types/caip.d.mts.map +1 -0
- package/dist/types/caip.mjs +2 -0
- package/dist/types/caip.mjs.map +1 -0
- package/dist/types/global.cjs +3 -0
- package/dist/types/global.cjs.map +1 -0
- package/dist/types/{types/global.d.ts → global.d.cts} +2 -1
- package/dist/types/global.d.cts.map +1 -0
- package/dist/types/global.d.mts +9 -0
- package/dist/types/global.d.mts.map +1 -0
- package/dist/types/global.mjs +2 -0
- package/dist/types/global.mjs.map +1 -0
- package/dist/types/handlers/cronjob.cjs +3 -0
- package/dist/types/handlers/cronjob.cjs.map +1 -0
- package/dist/types/{types/handlers/cronjob.d.ts → handlers/cronjob.d.cts} +2 -1
- package/dist/types/handlers/cronjob.d.cts.map +1 -0
- package/dist/types/handlers/cronjob.d.mts +15 -0
- package/dist/types/handlers/cronjob.d.mts.map +1 -0
- package/dist/types/handlers/cronjob.mjs +2 -0
- package/dist/types/handlers/cronjob.mjs.map +1 -0
- package/dist/types/handlers/home-page.cjs +3 -0
- package/dist/types/handlers/home-page.cjs.map +1 -0
- package/dist/types/{types/handlers/home-page.d.ts → handlers/home-page.d.cts} +2 -1
- package/dist/types/handlers/home-page.d.cts.map +1 -0
- package/dist/types/handlers/home-page.d.mts +23 -0
- package/dist/types/handlers/home-page.d.mts.map +1 -0
- package/dist/types/handlers/home-page.mjs +2 -0
- package/dist/types/handlers/home-page.mjs.map +1 -0
- package/dist/types/handlers/index.cjs +26 -0
- package/dist/types/handlers/index.cjs.map +1 -0
- package/dist/types/handlers/index.d.cts +10 -0
- package/dist/types/handlers/index.d.cts.map +1 -0
- package/dist/types/handlers/index.d.mts +10 -0
- package/dist/types/handlers/index.d.mts.map +1 -0
- package/dist/types/handlers/index.mjs +10 -0
- package/dist/types/handlers/index.mjs.map +1 -0
- package/dist/types/handlers/keyring.cjs +3 -0
- package/dist/types/handlers/keyring.cjs.map +1 -0
- package/dist/types/{types/handlers/keyring.d.ts → handlers/keyring.d.cts} +2 -1
- package/dist/types/handlers/keyring.d.cts.map +1 -0
- package/dist/types/handlers/keyring.d.mts +21 -0
- package/dist/types/handlers/keyring.d.mts.map +1 -0
- package/dist/types/handlers/keyring.mjs +2 -0
- package/dist/types/handlers/keyring.mjs.map +1 -0
- package/dist/types/handlers/lifecycle.cjs +3 -0
- package/dist/types/handlers/lifecycle.cjs.map +1 -0
- package/dist/types/{types/handlers/lifecycle.d.ts → handlers/lifecycle.d.cts} +1 -0
- package/dist/types/handlers/lifecycle.d.cts.map +1 -0
- package/dist/types/handlers/lifecycle.d.mts +38 -0
- package/dist/types/handlers/lifecycle.d.mts.map +1 -0
- package/dist/types/handlers/lifecycle.mjs +2 -0
- package/dist/types/handlers/lifecycle.mjs.map +1 -0
- package/dist/types/handlers/name-lookup.cjs +3 -0
- package/dist/types/handlers/name-lookup.cjs.map +1 -0
- package/dist/types/{types/handlers/name-lookup.d.ts → handlers/name-lookup.d.cts} +3 -2
- package/dist/types/handlers/name-lookup.d.cts.map +1 -0
- package/dist/types/handlers/name-lookup.d.mts +82 -0
- package/dist/types/handlers/name-lookup.d.mts.map +1 -0
- package/dist/types/handlers/name-lookup.mjs +2 -0
- package/dist/types/handlers/name-lookup.mjs.map +1 -0
- package/dist/types/handlers/rpc-request.cjs +3 -0
- package/dist/types/handlers/rpc-request.cjs.map +1 -0
- package/dist/types/{types/handlers/rpc-request.d.ts → handlers/rpc-request.d.cts} +2 -1
- package/dist/types/handlers/rpc-request.d.cts.map +1 -0
- package/dist/types/handlers/rpc-request.d.mts +22 -0
- package/dist/types/handlers/rpc-request.d.mts.map +1 -0
- package/dist/types/handlers/rpc-request.mjs +2 -0
- package/dist/types/handlers/rpc-request.mjs.map +1 -0
- package/dist/types/handlers/signature.cjs +3 -0
- package/dist/types/handlers/signature.cjs.map +1 -0
- package/dist/types/{types/handlers/signature.d.ts → handlers/signature.d.cts} +4 -3
- package/dist/types/handlers/signature.d.cts.map +1 -0
- package/dist/types/handlers/signature.d.mts +112 -0
- package/dist/types/handlers/signature.d.mts.map +1 -0
- package/dist/types/handlers/signature.mjs +2 -0
- package/dist/types/handlers/signature.mjs.map +1 -0
- package/dist/types/handlers/transaction.cjs +15 -0
- package/dist/types/handlers/transaction.cjs.map +1 -0
- package/dist/types/{types/handlers/transaction.d.ts → handlers/transaction.d.cts} +4 -3
- package/dist/types/handlers/transaction.d.cts.map +1 -0
- package/dist/types/handlers/transaction.d.mts +115 -0
- package/dist/types/handlers/transaction.d.mts.map +1 -0
- package/dist/types/handlers/transaction.mjs +12 -0
- package/dist/types/handlers/transaction.mjs.map +1 -0
- package/dist/types/handlers/user-input.cjs +56 -0
- package/dist/types/handlers/user-input.cjs.map +1 -0
- package/dist/types/{types/handlers/user-input.d.ts → handlers/user-input.d.cts} +11 -10
- package/dist/types/handlers/user-input.d.cts.map +1 -0
- package/dist/types/handlers/user-input.d.mts +196 -0
- package/dist/types/handlers/user-input.d.mts.map +1 -0
- package/dist/types/handlers/user-input.mjs +53 -0
- package/dist/types/handlers/user-input.mjs.map +1 -0
- package/dist/types/images.cjs +2 -0
- package/dist/types/images.cjs.map +1 -0
- package/dist/types/{types/images.d.ts → images.d.cts} +1 -0
- package/dist/types/images.d.cts.map +1 -0
- package/dist/types/images.d.mts +13 -0
- package/dist/types/images.d.mts.map +1 -0
- package/dist/types/images.mjs +2 -0
- package/dist/types/images.mjs.map +1 -0
- package/dist/types/index.cjs +29 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +10 -0
- package/dist/types/index.d.cts.map +1 -0
- package/dist/types/index.d.mts +10 -0
- package/dist/types/index.d.mts.map +1 -0
- package/dist/types/index.mjs +13 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types/interface.cjs +26 -0
- package/dist/types/interface.cjs.map +1 -0
- package/dist/types/{types/interface.d.ts → interface.d.cts} +27 -26
- package/dist/types/interface.d.cts.map +1 -0
- package/dist/types/interface.d.mts +120 -0
- package/dist/types/interface.d.mts.map +1 -0
- package/dist/types/interface.mjs +23 -0
- package/dist/types/interface.mjs.map +1 -0
- package/dist/types/methods/create-interface.cjs +3 -0
- package/dist/types/methods/create-interface.cjs.map +1 -0
- package/dist/types/{types/methods/create-interface.d.ts → methods/create-interface.d.cts} +2 -1
- package/dist/types/methods/create-interface.d.cts.map +1 -0
- package/dist/types/methods/create-interface.d.mts +15 -0
- package/dist/types/methods/create-interface.d.mts.map +1 -0
- package/dist/types/methods/create-interface.mjs +2 -0
- package/dist/types/methods/create-interface.mjs.map +1 -0
- package/dist/types/methods/dialog.cjs +18 -0
- package/dist/types/methods/dialog.cjs.map +1 -0
- package/dist/types/{types/methods/dialog.d.ts → methods/dialog.d.cts} +4 -3
- package/dist/types/methods/dialog.d.cts.map +1 -0
- package/dist/types/methods/dialog.d.mts +88 -0
- package/dist/types/methods/dialog.d.mts.map +1 -0
- package/dist/types/methods/dialog.mjs +15 -0
- package/dist/types/methods/dialog.mjs.map +1 -0
- package/dist/types/methods/get-bip32-entropy.cjs +3 -0
- package/dist/types/methods/get-bip32-entropy.cjs.map +1 -0
- package/dist/types/{types/methods/get-bip32-entropy.d.ts → methods/get-bip32-entropy.d.cts} +3 -2
- package/dist/types/methods/get-bip32-entropy.d.cts.map +1 -0
- package/dist/types/methods/get-bip32-entropy.d.mts +16 -0
- package/dist/types/methods/get-bip32-entropy.d.mts.map +1 -0
- package/dist/types/methods/get-bip32-entropy.mjs +2 -0
- package/dist/types/methods/get-bip32-entropy.mjs.map +1 -0
- package/dist/types/methods/get-bip32-public-key.cjs +3 -0
- package/dist/types/methods/get-bip32-public-key.cjs.map +1 -0
- package/dist/types/{types/methods/get-bip32-public-key.d.ts → methods/get-bip32-public-key.d.cts} +2 -1
- package/dist/types/methods/get-bip32-public-key.d.cts.map +1 -0
- package/dist/types/methods/get-bip32-public-key.d.mts +20 -0
- package/dist/types/methods/get-bip32-public-key.d.mts.map +1 -0
- package/dist/types/methods/get-bip32-public-key.mjs +2 -0
- package/dist/types/methods/get-bip32-public-key.mjs.map +1 -0
- package/dist/types/methods/get-bip44-entropy.cjs +3 -0
- package/dist/types/methods/get-bip44-entropy.cjs.map +1 -0
- package/dist/types/{types/methods/get-bip44-entropy.d.ts → methods/get-bip44-entropy.d.cts} +3 -2
- package/dist/types/methods/get-bip44-entropy.d.cts.map +1 -0
- package/dist/types/methods/get-bip44-entropy.d.mts +15 -0
- package/dist/types/methods/get-bip44-entropy.d.mts.map +1 -0
- package/dist/types/methods/get-bip44-entropy.mjs +2 -0
- package/dist/types/methods/get-bip44-entropy.mjs.map +1 -0
- package/dist/types/methods/get-client-status.cjs +3 -0
- package/dist/types/methods/get-client-status.cjs.map +1 -0
- package/dist/types/{types/methods/get-client-status.d.ts → methods/get-client-status.d.cts} +1 -0
- package/dist/types/methods/get-client-status.d.cts.map +1 -0
- package/dist/types/methods/get-client-status.d.mts +15 -0
- package/dist/types/methods/get-client-status.d.mts.map +1 -0
- package/dist/types/methods/get-client-status.mjs +2 -0
- package/dist/types/methods/get-client-status.mjs.map +1 -0
- package/dist/types/methods/get-entropy.cjs +3 -0
- package/dist/types/methods/get-entropy.cjs.map +1 -0
- package/dist/types/{types/methods/get-entropy.d.ts → methods/get-entropy.d.cts} +2 -1
- package/dist/types/methods/get-entropy.d.cts.map +1 -0
- package/dist/types/methods/get-entropy.d.mts +17 -0
- package/dist/types/methods/get-entropy.d.mts.map +1 -0
- package/dist/types/methods/get-entropy.mjs +2 -0
- package/dist/types/methods/get-entropy.mjs.map +1 -0
- package/dist/types/methods/get-file.cjs +13 -0
- package/dist/types/methods/get-file.cjs.map +1 -0
- package/dist/types/{types/methods/get-file.d.ts → methods/get-file.d.cts} +2 -1
- package/dist/types/methods/get-file.d.cts.map +1 -0
- package/dist/types/methods/get-file.d.mts +24 -0
- package/dist/types/methods/get-file.d.mts.map +1 -0
- package/dist/types/methods/get-file.mjs +10 -0
- package/dist/types/methods/get-file.mjs.map +1 -0
- package/dist/types/methods/get-interface-state.cjs +3 -0
- package/dist/types/methods/get-interface-state.cjs.map +1 -0
- package/dist/types/{types/methods/get-interface-state.d.ts → methods/get-interface-state.d.cts} +2 -1
- package/dist/types/methods/get-interface-state.d.cts.map +1 -0
- package/dist/types/methods/get-interface-state.d.mts +14 -0
- package/dist/types/methods/get-interface-state.d.mts.map +1 -0
- package/dist/types/methods/get-interface-state.mjs +2 -0
- package/dist/types/methods/get-interface-state.mjs.map +1 -0
- package/dist/types/methods/get-locale.cjs +3 -0
- package/dist/types/methods/get-locale.cjs.map +1 -0
- package/dist/types/{types/methods/get-locale.d.ts → methods/get-locale.d.cts} +1 -0
- package/dist/types/methods/get-locale.d.cts.map +1 -0
- package/dist/types/methods/get-locale.d.mts +13 -0
- package/dist/types/methods/get-locale.d.mts.map +1 -0
- package/dist/types/methods/get-locale.mjs +2 -0
- package/dist/types/methods/get-locale.mjs.map +1 -0
- package/dist/types/methods/get-preferences.cjs +3 -0
- package/dist/types/methods/get-preferences.cjs.map +1 -0
- package/dist/types/{types/methods/get-preferences.d.ts → methods/get-preferences.d.cts} +1 -0
- package/dist/types/methods/get-preferences.d.cts.map +1 -0
- package/dist/types/methods/get-preferences.d.mts +16 -0
- package/dist/types/methods/get-preferences.d.mts.map +1 -0
- package/dist/types/methods/get-preferences.mjs +2 -0
- package/dist/types/methods/get-preferences.mjs.map +1 -0
- package/dist/types/methods/get-snaps.cjs +3 -0
- package/dist/types/methods/get-snaps.cjs.map +1 -0
- package/dist/types/{types/methods/get-snaps.d.ts → methods/get-snaps.d.cts} +3 -2
- package/dist/types/methods/get-snaps.d.cts.map +1 -0
- package/dist/types/methods/get-snaps.d.mts +17 -0
- package/dist/types/methods/get-snaps.d.mts.map +1 -0
- package/dist/types/methods/get-snaps.mjs +2 -0
- package/dist/types/methods/get-snaps.mjs.map +1 -0
- package/dist/types/methods/index.cjs +38 -0
- package/dist/types/methods/index.cjs.map +1 -0
- package/dist/types/methods/index.d.cts +22 -0
- package/dist/types/methods/index.d.cts.map +1 -0
- package/dist/types/methods/index.d.mts +22 -0
- package/dist/types/methods/index.d.mts.map +1 -0
- package/dist/types/methods/index.mjs +22 -0
- package/dist/types/methods/index.mjs.map +1 -0
- package/dist/types/methods/invoke-keyring.cjs +3 -0
- package/dist/types/methods/invoke-keyring.cjs.map +1 -0
- package/dist/types/{types/methods/invoke-keyring.d.ts → methods/invoke-keyring.d.cts} +3 -2
- package/dist/types/methods/invoke-keyring.d.cts.map +1 -0
- package/dist/types/methods/invoke-keyring.d.mts +15 -0
- package/dist/types/methods/invoke-keyring.d.mts.map +1 -0
- package/dist/types/methods/invoke-keyring.mjs +2 -0
- package/dist/types/methods/invoke-keyring.mjs.map +1 -0
- package/dist/types/methods/invoke-snap.cjs +3 -0
- package/dist/types/methods/invoke-snap.cjs.map +1 -0
- package/dist/types/{types/methods/invoke-snap.d.ts → methods/invoke-snap.d.cts} +2 -1
- package/dist/types/methods/invoke-snap.d.cts.map +1 -0
- package/dist/types/methods/invoke-snap.d.mts +17 -0
- package/dist/types/methods/invoke-snap.d.mts.map +1 -0
- package/dist/types/methods/invoke-snap.mjs +2 -0
- package/dist/types/methods/invoke-snap.mjs.map +1 -0
- package/dist/types/methods/manage-accounts.cjs +3 -0
- package/dist/types/methods/manage-accounts.cjs.map +1 -0
- package/dist/types/{types/methods/manage-accounts.d.ts → methods/manage-accounts.d.cts} +2 -1
- package/dist/types/methods/manage-accounts.d.cts.map +1 -0
- package/dist/types/methods/manage-accounts.d.mts +19 -0
- package/dist/types/methods/manage-accounts.d.mts.map +1 -0
- package/dist/types/methods/manage-accounts.mjs +2 -0
- package/dist/types/methods/manage-accounts.mjs.map +1 -0
- package/dist/types/methods/manage-state.cjs +13 -0
- package/dist/types/methods/manage-state.cjs.map +1 -0
- package/dist/types/{types/methods/manage-state.d.ts → methods/manage-state.d.cts} +3 -2
- package/dist/types/methods/manage-state.d.cts.map +1 -0
- package/dist/types/methods/manage-state.d.mts +70 -0
- package/dist/types/methods/manage-state.d.mts.map +1 -0
- package/dist/types/methods/manage-state.mjs +10 -0
- package/dist/types/methods/manage-state.mjs.map +1 -0
- package/dist/types/methods/methods.cjs +3 -0
- package/dist/types/methods/methods.cjs.map +1 -0
- package/dist/types/{types/methods/methods.d.ts → methods/methods.d.cts} +22 -21
- package/dist/types/methods/methods.d.cts.map +1 -0
- package/dist/types/methods/methods.d.mts +75 -0
- package/dist/types/methods/methods.d.mts.map +1 -0
- package/dist/types/methods/methods.mjs +2 -0
- package/dist/types/methods/methods.mjs.map +1 -0
- package/dist/types/methods/notify.cjs +15 -0
- package/dist/types/methods/notify.cjs.map +1 -0
- package/dist/types/{types/methods/notify.d.ts → methods/notify.d.cts} +2 -1
- package/dist/types/methods/notify.d.cts.map +1 -0
- package/dist/types/methods/notify.d.mts +28 -0
- package/dist/types/methods/notify.d.mts.map +1 -0
- package/dist/types/methods/notify.mjs +12 -0
- package/dist/types/methods/notify.mjs.map +1 -0
- package/dist/types/methods/request-snaps.cjs +3 -0
- package/dist/types/methods/request-snaps.cjs.map +1 -0
- package/dist/types/{types/methods/request-snaps.d.ts → methods/request-snaps.d.cts} +3 -2
- package/dist/types/methods/request-snaps.d.cts.map +1 -0
- package/dist/types/methods/request-snaps.d.mts +19 -0
- package/dist/types/methods/request-snaps.d.mts.map +1 -0
- package/dist/types/methods/request-snaps.mjs +2 -0
- package/dist/types/methods/request-snaps.mjs.map +1 -0
- package/dist/types/methods/resolve-interface.cjs +3 -0
- package/dist/types/methods/resolve-interface.cjs.map +1 -0
- package/dist/types/{types/methods/resolve-interface.d.ts → methods/resolve-interface.d.cts} +2 -1
- package/dist/types/methods/resolve-interface.d.cts.map +1 -0
- package/dist/types/methods/resolve-interface.d.mts +16 -0
- package/dist/types/methods/resolve-interface.d.mts.map +1 -0
- package/dist/types/methods/resolve-interface.mjs +2 -0
- package/dist/types/methods/resolve-interface.mjs.map +1 -0
- package/dist/types/methods/update-interface.cjs +3 -0
- package/dist/types/methods/update-interface.cjs.map +1 -0
- package/dist/types/{types/methods/update-interface.d.ts → methods/update-interface.d.cts} +2 -1
- package/dist/types/methods/update-interface.d.cts.map +1 -0
- package/dist/types/methods/update-interface.d.mts +16 -0
- package/dist/types/methods/update-interface.d.mts.map +1 -0
- package/dist/types/methods/update-interface.mjs +2 -0
- package/dist/types/methods/update-interface.mjs.map +1 -0
- package/dist/types/permissions.cjs +3 -0
- package/dist/types/permissions.cjs.map +1 -0
- package/dist/types/{types/permissions.d.ts → permissions.d.cts} +4 -3
- package/dist/types/permissions.d.cts.map +1 -0
- package/dist/types/permissions.d.mts +75 -0
- package/dist/types/permissions.d.mts.map +1 -0
- package/dist/types/permissions.mjs +2 -0
- package/dist/types/permissions.mjs.map +1 -0
- package/dist/types/provider.cjs +3 -0
- package/dist/types/provider.cjs.map +1 -0
- package/dist/types/{types/provider.d.ts → provider.d.cts} +3 -2
- package/dist/types/provider.d.cts.map +1 -0
- package/dist/types/provider.d.mts +15 -0
- package/dist/types/provider.d.mts.map +1 -0
- package/dist/types/provider.mjs +2 -0
- package/dist/types/provider.mjs.map +1 -0
- package/dist/types/snap.cjs +3 -0
- package/dist/types/snap.cjs.map +1 -0
- package/dist/types/{types/snap.d.ts → snap.d.cts} +3 -2
- package/dist/types/snap.d.cts.map +1 -0
- package/dist/types/snap.d.mts +13 -0
- package/dist/types/snap.d.mts.map +1 -0
- package/dist/types/snap.mjs +2 -0
- package/dist/types/snap.mjs.map +1 -0
- package/dist/ui/builder.cjs +49 -0
- package/dist/ui/builder.cjs.map +1 -0
- package/dist/{types/ui/builder.d.ts → ui/builder.d.cts} +4 -3
- package/dist/ui/builder.d.cts.map +1 -0
- package/dist/ui/builder.d.mts +43 -0
- package/dist/ui/builder.d.mts.map +1 -0
- package/dist/ui/builder.mjs +45 -0
- package/dist/ui/builder.mjs.map +1 -0
- package/dist/ui/component.cjs +29 -0
- package/dist/ui/component.cjs.map +1 -0
- package/dist/{types/ui/component.d.ts → ui/component.d.cts} +2 -1
- package/dist/ui/component.d.cts.map +1 -0
- package/dist/ui/component.d.mts +18 -0
- package/dist/ui/component.d.mts.map +1 -0
- package/dist/ui/component.mjs +24 -0
- package/dist/ui/component.mjs.map +1 -0
- package/dist/ui/components/address.cjs +28 -0
- package/dist/ui/components/address.cjs.map +1 -0
- package/dist/{types/ui/components/address.d.ts → ui/components/address.d.cts} +6 -5
- package/dist/ui/components/address.d.cts.map +1 -0
- package/dist/ui/components/address.d.mts +37 -0
- package/dist/ui/components/address.d.mts.map +1 -0
- package/dist/ui/components/address.mjs +25 -0
- package/dist/ui/components/address.mjs.map +1 -0
- package/dist/ui/components/button.cjs +52 -0
- package/dist/ui/components/button.cjs.map +1 -0
- package/dist/{types/ui/components/button.d.ts → ui/components/button.d.cts} +9 -8
- package/dist/ui/components/button.d.cts.map +1 -0
- package/dist/ui/components/button.d.mts +65 -0
- package/dist/ui/components/button.d.mts.map +1 -0
- package/dist/ui/components/button.mjs +49 -0
- package/dist/ui/components/button.mjs.map +1 -0
- package/dist/ui/components/copyable.cjs +32 -0
- package/dist/ui/components/copyable.cjs.map +1 -0
- package/dist/{types/ui/components/copyable.d.ts → ui/components/copyable.d.cts} +6 -5
- package/dist/ui/components/copyable.d.cts.map +1 -0
- package/dist/ui/components/copyable.d.mts +49 -0
- package/dist/ui/components/copyable.d.mts.map +1 -0
- package/dist/ui/components/copyable.mjs +29 -0
- package/dist/ui/components/copyable.mjs.map +1 -0
- package/dist/ui/components/divider.cjs +20 -0
- package/dist/ui/components/divider.cjs.map +1 -0
- package/dist/{types/ui/components/divider.d.ts → ui/components/divider.d.cts} +3 -2
- package/dist/ui/components/divider.d.cts.map +1 -0
- package/dist/ui/components/divider.d.mts +24 -0
- package/dist/ui/components/divider.d.mts.map +1 -0
- package/dist/ui/components/divider.mjs +17 -0
- package/dist/ui/components/divider.mjs.map +1 -0
- package/dist/ui/components/form.cjs +41 -0
- package/dist/ui/components/form.cjs.map +1 -0
- package/dist/{types/ui/components/form.d.ts → ui/components/form.d.cts} +31 -30
- package/dist/ui/components/form.d.cts.map +1 -0
- package/dist/ui/components/form.d.mts +154 -0
- package/dist/ui/components/form.d.mts.map +1 -0
- package/dist/ui/components/form.mjs +38 -0
- package/dist/ui/components/form.mjs.map +1 -0
- package/dist/ui/components/heading.cjs +27 -0
- package/dist/ui/components/heading.cjs.map +1 -0
- package/dist/{types/ui/components/heading.d.ts → ui/components/heading.d.cts} +6 -5
- package/dist/ui/components/heading.d.cts.map +1 -0
- package/dist/ui/components/heading.d.mts +39 -0
- package/dist/ui/components/heading.d.mts.map +1 -0
- package/dist/ui/components/heading.mjs +24 -0
- package/dist/ui/components/heading.mjs.map +1 -0
- package/dist/ui/components/image.cjs +27 -0
- package/dist/ui/components/image.cjs.map +1 -0
- package/dist/{types/ui/components/image.d.ts → ui/components/image.d.cts} +6 -5
- package/dist/ui/components/image.d.cts.map +1 -0
- package/dist/ui/components/image.d.mts +38 -0
- package/dist/ui/components/image.d.mts.map +1 -0
- package/dist/ui/components/image.mjs +24 -0
- package/dist/ui/components/image.mjs.map +1 -0
- package/dist/ui/components/index.cjs +35 -0
- package/dist/ui/components/index.cjs.map +1 -0
- package/dist/ui/components/index.d.cts +15 -0
- package/dist/ui/components/index.d.cts.map +1 -0
- package/dist/ui/components/index.d.mts +15 -0
- package/dist/ui/components/index.d.mts.map +1 -0
- package/dist/ui/components/index.mjs +13 -0
- package/dist/ui/components/index.mjs.map +1 -0
- package/dist/ui/components/input.cjs +60 -0
- package/dist/ui/components/input.cjs.map +1 -0
- package/dist/{types/ui/components/input.d.ts → ui/components/input.d.cts} +9 -8
- package/dist/ui/components/input.d.cts.map +1 -0
- package/dist/ui/components/input.d.mts +78 -0
- package/dist/ui/components/input.d.mts.map +1 -0
- package/dist/ui/components/input.mjs +57 -0
- package/dist/ui/components/input.mjs.map +1 -0
- package/dist/ui/components/panel.cjs +72 -0
- package/dist/ui/components/panel.cjs.map +1 -0
- package/dist/{types/ui/components/panel.d.ts → ui/components/panel.d.cts} +88 -87
- package/dist/ui/components/panel.d.cts.map +1 -0
- package/dist/ui/components/panel.d.mts +406 -0
- package/dist/ui/components/panel.d.mts.map +1 -0
- package/dist/ui/components/panel.mjs +69 -0
- package/dist/ui/components/panel.mjs.map +1 -0
- package/dist/ui/components/row.cjs +51 -0
- package/dist/ui/components/row.cjs.map +1 -0
- package/dist/{types/ui/components/row.d.ts → ui/components/row.d.cts} +21 -20
- package/dist/ui/components/row.d.cts.map +1 -0
- package/dist/ui/components/row.d.mts +107 -0
- package/dist/ui/components/row.d.mts.map +1 -0
- package/dist/ui/components/row.mjs +48 -0
- package/dist/ui/components/row.mjs.map +1 -0
- package/dist/ui/components/spinner.cjs +20 -0
- package/dist/ui/components/spinner.cjs.map +1 -0
- package/dist/{types/ui/components/spinner.d.ts → ui/components/spinner.d.cts} +3 -2
- package/dist/ui/components/spinner.d.cts.map +1 -0
- package/dist/ui/components/spinner.d.mts +25 -0
- package/dist/ui/components/spinner.d.mts.map +1 -0
- package/dist/ui/components/spinner.mjs +17 -0
- package/dist/ui/components/spinner.mjs.map +1 -0
- package/dist/ui/components/text.cjs +34 -0
- package/dist/ui/components/text.cjs.map +1 -0
- package/dist/{types/ui/components/text.d.ts → ui/components/text.d.cts} +6 -5
- package/dist/ui/components/text.d.cts.map +1 -0
- package/dist/ui/components/text.d.mts +49 -0
- package/dist/ui/components/text.d.mts.map +1 -0
- package/dist/ui/components/text.mjs +31 -0
- package/dist/ui/components/text.mjs.map +1 -0
- package/dist/ui/index.cjs +22 -0
- package/dist/ui/index.cjs.map +1 -0
- package/dist/ui/index.d.cts +4 -0
- package/dist/ui/index.d.cts.map +1 -0
- package/dist/ui/index.d.mts +4 -0
- package/dist/ui/index.d.mts.map +1 -0
- package/dist/ui/index.mjs +4 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/ui/nodes.cjs +38 -0
- package/dist/ui/nodes.cjs.map +1 -0
- package/dist/{types/ui/nodes.d.ts → ui/nodes.d.cts} +3 -2
- package/dist/ui/nodes.d.cts.map +1 -0
- package/dist/ui/nodes.d.mts +57 -0
- package/dist/ui/nodes.d.mts.map +1 -0
- package/dist/ui/nodes.mjs +35 -0
- package/dist/ui/nodes.mjs.map +1 -0
- package/jsx-dev-runtime.d.ts +3 -1
- package/jsx-dev-runtime.js +1 -1
- package/jsx-runtime.d.ts +3 -1
- package/jsx-runtime.js +1 -1
- package/jsx.d.ts +3 -1
- package/jsx.js +1 -1
- package/package.json +42 -27
- package/dist/index.js +0 -1142
- package/dist/index.js.map +0 -1
- package/dist/jsx/index.js +0 -587
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/jsx-dev-runtime.js +0 -416
- package/dist/jsx/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -45
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/types/index.d.ts +0 -9
- package/dist/types/internals/index.d.ts +0 -6
- package/dist/types/jsx/components/Address.d.ts +0 -28
- package/dist/types/jsx/components/form/index.d.ts +0 -21
- package/dist/types/jsx/components/formatting/index.d.ts +0 -5
- package/dist/types/jsx/components/index.d.ts +0 -38
- package/dist/types/jsx/index.d.ts +0 -5
- package/dist/types/types/handlers/index.d.ts +0 -9
- package/dist/types/types/index.d.ts +0 -9
- package/dist/types/types/methods/index.d.ts +0 -21
- package/dist/types/ui/components/index.d.ts +0 -14
- package/dist/types/ui/index.d.ts +0 -3
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import type { Infer, Struct } from "@metamask/superstruct";
|
|
2
|
+
import { NodeType } from "../nodes.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const ParentStruct: Struct<{
|
|
7
|
+
type: string;
|
|
8
|
+
children: ({
|
|
9
|
+
type: NodeType.Copyable;
|
|
10
|
+
value: string;
|
|
11
|
+
sensitive?: boolean | undefined;
|
|
12
|
+
} | {
|
|
13
|
+
type: NodeType.Divider;
|
|
14
|
+
} | {
|
|
15
|
+
type: NodeType.Heading;
|
|
16
|
+
value: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: NodeType.Image;
|
|
19
|
+
value: string;
|
|
20
|
+
} | Panel | {
|
|
21
|
+
type: NodeType.Spinner;
|
|
22
|
+
} | {
|
|
23
|
+
type: NodeType.Text;
|
|
24
|
+
value: string;
|
|
25
|
+
markdown?: boolean | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
type: NodeType.Address;
|
|
28
|
+
value: `0x${string}`;
|
|
29
|
+
} | {
|
|
30
|
+
type: NodeType.Row;
|
|
31
|
+
value: {
|
|
32
|
+
type: NodeType.Image;
|
|
33
|
+
value: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: NodeType.Text;
|
|
36
|
+
value: string;
|
|
37
|
+
markdown?: boolean | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
type: NodeType.Address;
|
|
40
|
+
value: `0x${string}`;
|
|
41
|
+
};
|
|
42
|
+
label: string;
|
|
43
|
+
variant?: "default" | "warning" | "critical" | undefined;
|
|
44
|
+
} | {
|
|
45
|
+
type: NodeType.Input;
|
|
46
|
+
name: string;
|
|
47
|
+
error?: string | undefined;
|
|
48
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
49
|
+
value?: string | undefined;
|
|
50
|
+
label?: string | undefined;
|
|
51
|
+
placeholder?: string | undefined;
|
|
52
|
+
} | {
|
|
53
|
+
type: NodeType.Button;
|
|
54
|
+
value: string;
|
|
55
|
+
variant?: "primary" | "secondary" | undefined;
|
|
56
|
+
name?: string | undefined;
|
|
57
|
+
buttonType?: "button" | "submit" | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
type: NodeType.Form;
|
|
60
|
+
name: string;
|
|
61
|
+
children: ({
|
|
62
|
+
type: NodeType.Input;
|
|
63
|
+
name: string;
|
|
64
|
+
error?: string | undefined;
|
|
65
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
66
|
+
value?: string | undefined;
|
|
67
|
+
label?: string | undefined;
|
|
68
|
+
placeholder?: string | undefined;
|
|
69
|
+
} | {
|
|
70
|
+
type: NodeType.Button;
|
|
71
|
+
value: string;
|
|
72
|
+
variant?: "primary" | "secondary" | undefined;
|
|
73
|
+
name?: string | undefined;
|
|
74
|
+
buttonType?: "button" | "submit" | undefined;
|
|
75
|
+
})[];
|
|
76
|
+
})[];
|
|
77
|
+
}, {
|
|
78
|
+
children: Struct<({
|
|
79
|
+
type: NodeType.Copyable;
|
|
80
|
+
value: string;
|
|
81
|
+
sensitive?: boolean | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
type: NodeType.Divider;
|
|
84
|
+
} | {
|
|
85
|
+
type: NodeType.Heading;
|
|
86
|
+
value: string;
|
|
87
|
+
} | {
|
|
88
|
+
type: NodeType.Image;
|
|
89
|
+
value: string;
|
|
90
|
+
} | Panel | {
|
|
91
|
+
type: NodeType.Spinner;
|
|
92
|
+
} | {
|
|
93
|
+
type: NodeType.Text;
|
|
94
|
+
value: string;
|
|
95
|
+
markdown?: boolean | undefined;
|
|
96
|
+
} | {
|
|
97
|
+
type: NodeType.Address;
|
|
98
|
+
value: `0x${string}`;
|
|
99
|
+
} | {
|
|
100
|
+
type: NodeType.Row;
|
|
101
|
+
value: {
|
|
102
|
+
type: NodeType.Image;
|
|
103
|
+
value: string;
|
|
104
|
+
} | {
|
|
105
|
+
type: NodeType.Text;
|
|
106
|
+
value: string;
|
|
107
|
+
markdown?: boolean | undefined;
|
|
108
|
+
} | {
|
|
109
|
+
type: NodeType.Address;
|
|
110
|
+
value: `0x${string}`;
|
|
111
|
+
};
|
|
112
|
+
label: string;
|
|
113
|
+
variant?: "default" | "warning" | "critical" | undefined;
|
|
114
|
+
} | {
|
|
115
|
+
type: NodeType.Input;
|
|
116
|
+
name: string;
|
|
117
|
+
error?: string | undefined;
|
|
118
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
119
|
+
value?: string | undefined;
|
|
120
|
+
label?: string | undefined;
|
|
121
|
+
placeholder?: string | undefined;
|
|
122
|
+
} | {
|
|
123
|
+
type: NodeType.Button;
|
|
124
|
+
value: string;
|
|
125
|
+
variant?: "primary" | "secondary" | undefined;
|
|
126
|
+
name?: string | undefined;
|
|
127
|
+
buttonType?: "button" | "submit" | undefined;
|
|
128
|
+
} | {
|
|
129
|
+
type: NodeType.Form;
|
|
130
|
+
name: string;
|
|
131
|
+
children: ({
|
|
132
|
+
type: NodeType.Input;
|
|
133
|
+
name: string;
|
|
134
|
+
error?: string | undefined;
|
|
135
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
136
|
+
value?: string | undefined;
|
|
137
|
+
label?: string | undefined;
|
|
138
|
+
placeholder?: string | undefined;
|
|
139
|
+
} | {
|
|
140
|
+
type: NodeType.Button;
|
|
141
|
+
value: string;
|
|
142
|
+
variant?: "primary" | "secondary" | undefined;
|
|
143
|
+
name?: string | undefined;
|
|
144
|
+
buttonType?: "button" | "submit" | undefined;
|
|
145
|
+
})[];
|
|
146
|
+
})[], Struct<{
|
|
147
|
+
type: NodeType.Copyable;
|
|
148
|
+
value: string;
|
|
149
|
+
sensitive?: boolean | undefined;
|
|
150
|
+
} | {
|
|
151
|
+
type: NodeType.Divider;
|
|
152
|
+
} | {
|
|
153
|
+
type: NodeType.Heading;
|
|
154
|
+
value: string;
|
|
155
|
+
} | {
|
|
156
|
+
type: NodeType.Image;
|
|
157
|
+
value: string;
|
|
158
|
+
} | Panel | {
|
|
159
|
+
type: NodeType.Spinner;
|
|
160
|
+
} | {
|
|
161
|
+
type: NodeType.Text;
|
|
162
|
+
value: string;
|
|
163
|
+
markdown?: boolean | undefined;
|
|
164
|
+
} | {
|
|
165
|
+
type: NodeType.Address;
|
|
166
|
+
value: `0x${string}`;
|
|
167
|
+
} | {
|
|
168
|
+
type: NodeType.Row;
|
|
169
|
+
value: {
|
|
170
|
+
type: NodeType.Image;
|
|
171
|
+
value: string;
|
|
172
|
+
} | {
|
|
173
|
+
type: NodeType.Text;
|
|
174
|
+
value: string;
|
|
175
|
+
markdown?: boolean | undefined;
|
|
176
|
+
} | {
|
|
177
|
+
type: NodeType.Address;
|
|
178
|
+
value: `0x${string}`;
|
|
179
|
+
};
|
|
180
|
+
label: string;
|
|
181
|
+
variant?: "default" | "warning" | "critical" | undefined;
|
|
182
|
+
} | {
|
|
183
|
+
type: NodeType.Input;
|
|
184
|
+
name: string;
|
|
185
|
+
error?: string | undefined;
|
|
186
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
187
|
+
value?: string | undefined;
|
|
188
|
+
label?: string | undefined;
|
|
189
|
+
placeholder?: string | undefined;
|
|
190
|
+
} | {
|
|
191
|
+
type: NodeType.Button;
|
|
192
|
+
value: string;
|
|
193
|
+
variant?: "primary" | "secondary" | undefined;
|
|
194
|
+
name?: string | undefined;
|
|
195
|
+
buttonType?: "button" | "submit" | undefined;
|
|
196
|
+
} | {
|
|
197
|
+
type: NodeType.Form;
|
|
198
|
+
name: string;
|
|
199
|
+
children: ({
|
|
200
|
+
type: NodeType.Input;
|
|
201
|
+
name: string;
|
|
202
|
+
error?: string | undefined;
|
|
203
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
204
|
+
value?: string | undefined;
|
|
205
|
+
label?: string | undefined;
|
|
206
|
+
placeholder?: string | undefined;
|
|
207
|
+
} | {
|
|
208
|
+
type: NodeType.Button;
|
|
209
|
+
value: string;
|
|
210
|
+
variant?: "primary" | "secondary" | undefined;
|
|
211
|
+
name?: string | undefined;
|
|
212
|
+
buttonType?: "button" | "submit" | undefined;
|
|
213
|
+
})[];
|
|
214
|
+
}, null>>;
|
|
215
|
+
type: Struct<string, null>;
|
|
216
|
+
}>;
|
|
217
|
+
/**
|
|
218
|
+
* A node which supports child nodes. This is used for nodes that render their
|
|
219
|
+
* children, such as {@link Panel}.
|
|
220
|
+
*
|
|
221
|
+
* @property type - The type of the node.
|
|
222
|
+
* @property children - The children of the node
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
export type Parent = Infer<typeof ParentStruct>;
|
|
226
|
+
/**
|
|
227
|
+
* @internal
|
|
228
|
+
*/
|
|
229
|
+
export declare const PanelStruct: Struct<Panel>;
|
|
230
|
+
/**
|
|
231
|
+
* A panel node, which renders its children.
|
|
232
|
+
*
|
|
233
|
+
* @property type - The type of the node, must be the string 'text'.
|
|
234
|
+
* @property value - The text content of the node, either as plain text, or as a
|
|
235
|
+
* markdown string.
|
|
236
|
+
*/
|
|
237
|
+
export type Panel = {
|
|
238
|
+
type: NodeType.Panel;
|
|
239
|
+
children: Component[];
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Create a {@link Panel} node.
|
|
243
|
+
*
|
|
244
|
+
* @param args - The node arguments. This can be either an array of children, or
|
|
245
|
+
* an object with a `children` property.
|
|
246
|
+
* @param args.children - The child nodes of the panel. This can be any valid
|
|
247
|
+
* {@link Component}.
|
|
248
|
+
* @returns The panel node as object.
|
|
249
|
+
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
250
|
+
* components. This function will be removed in a future release.
|
|
251
|
+
* @example
|
|
252
|
+
* const node = panel({
|
|
253
|
+
* children: [
|
|
254
|
+
* heading({ text: 'Hello, world!' }),
|
|
255
|
+
* text({ text: 'This is a panel.' }),
|
|
256
|
+
* ],
|
|
257
|
+
* });
|
|
258
|
+
*
|
|
259
|
+
* const node = panel([
|
|
260
|
+
* heading('Hello, world!'),
|
|
261
|
+
* text('This is a panel.'),
|
|
262
|
+
* ]);
|
|
263
|
+
*/
|
|
264
|
+
export declare const panel: (...args: [Omit<Panel, "type">] | ({
|
|
265
|
+
type: NodeType.Copyable;
|
|
266
|
+
value: string;
|
|
267
|
+
sensitive?: boolean | undefined;
|
|
268
|
+
} | {
|
|
269
|
+
type: NodeType.Divider;
|
|
270
|
+
} | {
|
|
271
|
+
type: NodeType.Heading;
|
|
272
|
+
value: string;
|
|
273
|
+
} | {
|
|
274
|
+
type: NodeType.Image;
|
|
275
|
+
value: string;
|
|
276
|
+
} | Panel | {
|
|
277
|
+
type: NodeType.Spinner;
|
|
278
|
+
} | {
|
|
279
|
+
type: NodeType.Text;
|
|
280
|
+
value: string;
|
|
281
|
+
markdown?: boolean | undefined;
|
|
282
|
+
} | {
|
|
283
|
+
type: NodeType.Address;
|
|
284
|
+
value: `0x${string}`;
|
|
285
|
+
} | {
|
|
286
|
+
type: NodeType.Row;
|
|
287
|
+
value: {
|
|
288
|
+
type: NodeType.Image;
|
|
289
|
+
value: string;
|
|
290
|
+
} | {
|
|
291
|
+
type: NodeType.Text;
|
|
292
|
+
value: string;
|
|
293
|
+
markdown?: boolean | undefined;
|
|
294
|
+
} | {
|
|
295
|
+
type: NodeType.Address;
|
|
296
|
+
value: `0x${string}`;
|
|
297
|
+
};
|
|
298
|
+
label: string;
|
|
299
|
+
variant?: "default" | "warning" | "critical" | undefined;
|
|
300
|
+
} | {
|
|
301
|
+
type: NodeType.Input;
|
|
302
|
+
name: string;
|
|
303
|
+
error?: string | undefined;
|
|
304
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
305
|
+
value?: string | undefined;
|
|
306
|
+
label?: string | undefined;
|
|
307
|
+
placeholder?: string | undefined;
|
|
308
|
+
} | {
|
|
309
|
+
type: NodeType.Button;
|
|
310
|
+
value: string;
|
|
311
|
+
variant?: "primary" | "secondary" | undefined;
|
|
312
|
+
name?: string | undefined;
|
|
313
|
+
buttonType?: "button" | "submit" | undefined;
|
|
314
|
+
} | {
|
|
315
|
+
type: NodeType.Form;
|
|
316
|
+
name: string;
|
|
317
|
+
children: ({
|
|
318
|
+
type: NodeType.Input;
|
|
319
|
+
name: string;
|
|
320
|
+
error?: string | undefined;
|
|
321
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
322
|
+
value?: string | undefined;
|
|
323
|
+
label?: string | undefined;
|
|
324
|
+
placeholder?: string | undefined;
|
|
325
|
+
} | {
|
|
326
|
+
type: NodeType.Button;
|
|
327
|
+
value: string;
|
|
328
|
+
variant?: "primary" | "secondary" | undefined;
|
|
329
|
+
name?: string | undefined;
|
|
330
|
+
buttonType?: "button" | "submit" | undefined;
|
|
331
|
+
})[];
|
|
332
|
+
})[][]) => Panel;
|
|
333
|
+
export declare const ComponentStruct: Struct<{
|
|
334
|
+
type: NodeType.Copyable;
|
|
335
|
+
value: string;
|
|
336
|
+
sensitive?: boolean | undefined;
|
|
337
|
+
} | {
|
|
338
|
+
type: NodeType.Divider;
|
|
339
|
+
} | {
|
|
340
|
+
type: NodeType.Heading;
|
|
341
|
+
value: string;
|
|
342
|
+
} | {
|
|
343
|
+
type: NodeType.Image;
|
|
344
|
+
value: string;
|
|
345
|
+
} | Panel | {
|
|
346
|
+
type: NodeType.Spinner;
|
|
347
|
+
} | {
|
|
348
|
+
type: NodeType.Text;
|
|
349
|
+
value: string;
|
|
350
|
+
markdown?: boolean | undefined;
|
|
351
|
+
} | {
|
|
352
|
+
type: NodeType.Address;
|
|
353
|
+
value: `0x${string}`;
|
|
354
|
+
} | {
|
|
355
|
+
type: NodeType.Row;
|
|
356
|
+
value: {
|
|
357
|
+
type: NodeType.Image;
|
|
358
|
+
value: string;
|
|
359
|
+
} | {
|
|
360
|
+
type: NodeType.Text;
|
|
361
|
+
value: string;
|
|
362
|
+
markdown?: boolean | undefined;
|
|
363
|
+
} | {
|
|
364
|
+
type: NodeType.Address;
|
|
365
|
+
value: `0x${string}`;
|
|
366
|
+
};
|
|
367
|
+
label: string;
|
|
368
|
+
variant?: "default" | "warning" | "critical" | undefined;
|
|
369
|
+
} | {
|
|
370
|
+
type: NodeType.Input;
|
|
371
|
+
name: string;
|
|
372
|
+
error?: string | undefined;
|
|
373
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
374
|
+
value?: string | undefined;
|
|
375
|
+
label?: string | undefined;
|
|
376
|
+
placeholder?: string | undefined;
|
|
377
|
+
} | {
|
|
378
|
+
type: NodeType.Button;
|
|
379
|
+
value: string;
|
|
380
|
+
variant?: "primary" | "secondary" | undefined;
|
|
381
|
+
name?: string | undefined;
|
|
382
|
+
buttonType?: "button" | "submit" | undefined;
|
|
383
|
+
} | {
|
|
384
|
+
type: NodeType.Form;
|
|
385
|
+
name: string;
|
|
386
|
+
children: ({
|
|
387
|
+
type: NodeType.Input;
|
|
388
|
+
name: string;
|
|
389
|
+
error?: string | undefined;
|
|
390
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
391
|
+
value?: string | undefined;
|
|
392
|
+
label?: string | undefined;
|
|
393
|
+
placeholder?: string | undefined;
|
|
394
|
+
} | {
|
|
395
|
+
type: NodeType.Button;
|
|
396
|
+
value: string;
|
|
397
|
+
variant?: "primary" | "secondary" | undefined;
|
|
398
|
+
name?: string | undefined;
|
|
399
|
+
buttonType?: "button" | "submit" | undefined;
|
|
400
|
+
})[];
|
|
401
|
+
}, null>;
|
|
402
|
+
/**
|
|
403
|
+
* All supported component types.
|
|
404
|
+
*/
|
|
405
|
+
export type Component = Infer<typeof ComponentStruct>;
|
|
406
|
+
//# sourceMappingURL=panel.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.mts","sourceRoot":"","sources":["../../../src/ui/components/panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAK3D,OAAO,EAAc,QAAQ,EAAE,qBAAiB;AAahD;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,KAAK,CAKrC,CAAC;AAEF;;;;;;GAMG;AAEH,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC;IACrB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAA2D,CAAC;AAG9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAa1B,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { array, assign, lazy, literal, object } from "@metamask/superstruct";
|
|
2
|
+
import { typedUnion } from "../../internals/index.mjs";
|
|
3
|
+
import { createBuilder } from "../builder.mjs";
|
|
4
|
+
import { NodeStruct, NodeType } from "../nodes.mjs";
|
|
5
|
+
import { AddressStruct } from "./address.mjs";
|
|
6
|
+
import { ButtonStruct } from "./button.mjs";
|
|
7
|
+
import { CopyableStruct } from "./copyable.mjs";
|
|
8
|
+
import { DividerStruct } from "./divider.mjs";
|
|
9
|
+
import { FormStruct } from "./form.mjs";
|
|
10
|
+
import { HeadingStruct } from "./heading.mjs";
|
|
11
|
+
import { ImageStruct } from "./image.mjs";
|
|
12
|
+
import { InputStruct } from "./input.mjs";
|
|
13
|
+
import { RowStruct } from "./row.mjs";
|
|
14
|
+
import { SpinnerStruct } from "./spinner.mjs";
|
|
15
|
+
import { TextStruct } from "./text.mjs";
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export const ParentStruct = assign(NodeStruct, object({
|
|
20
|
+
// This node references itself indirectly, so we need to use `lazy()`.
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
22
|
+
children: array(lazy(() => ComponentStruct)),
|
|
23
|
+
}));
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export const PanelStruct = assign(ParentStruct, object({
|
|
28
|
+
type: literal(NodeType.Panel),
|
|
29
|
+
}));
|
|
30
|
+
/**
|
|
31
|
+
* Create a {@link Panel} node.
|
|
32
|
+
*
|
|
33
|
+
* @param args - The node arguments. This can be either an array of children, or
|
|
34
|
+
* an object with a `children` property.
|
|
35
|
+
* @param args.children - The child nodes of the panel. This can be any valid
|
|
36
|
+
* {@link Component}.
|
|
37
|
+
* @returns The panel node as object.
|
|
38
|
+
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
39
|
+
* components. This function will be removed in a future release.
|
|
40
|
+
* @example
|
|
41
|
+
* const node = panel({
|
|
42
|
+
* children: [
|
|
43
|
+
* heading({ text: 'Hello, world!' }),
|
|
44
|
+
* text({ text: 'This is a panel.' }),
|
|
45
|
+
* ],
|
|
46
|
+
* });
|
|
47
|
+
*
|
|
48
|
+
* const node = panel([
|
|
49
|
+
* heading('Hello, world!'),
|
|
50
|
+
* text('This is a panel.'),
|
|
51
|
+
* ]);
|
|
52
|
+
*/
|
|
53
|
+
export const panel = createBuilder(NodeType.Panel, PanelStruct, ['children']);
|
|
54
|
+
// This is defined separately from `Component` to avoid circular dependencies.
|
|
55
|
+
export const ComponentStruct = typedUnion([
|
|
56
|
+
CopyableStruct,
|
|
57
|
+
DividerStruct,
|
|
58
|
+
HeadingStruct,
|
|
59
|
+
ImageStruct,
|
|
60
|
+
PanelStruct,
|
|
61
|
+
SpinnerStruct,
|
|
62
|
+
TextStruct,
|
|
63
|
+
RowStruct,
|
|
64
|
+
AddressStruct,
|
|
65
|
+
InputStruct,
|
|
66
|
+
FormStruct,
|
|
67
|
+
ButtonStruct,
|
|
68
|
+
]);
|
|
69
|
+
//# sourceMappingURL=panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.mjs","sourceRoot":"","sources":["../../../src/ui/components/panel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,8BAA8B;AAE7E,OAAO,EAAE,UAAU,EAAE,kCAAwB;AAC7C,OAAO,EAAE,aAAa,EAAE,uBAAmB;AAC3C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,qBAAiB;AAChD,OAAO,EAAE,aAAa,EAAE,sBAAkB;AAC1C,OAAO,EAAE,YAAY,EAAE,qBAAiB;AACxC,OAAO,EAAE,cAAc,EAAE,uBAAmB;AAC5C,OAAO,EAAE,aAAa,EAAE,sBAAkB;AAC1C,OAAO,EAAE,UAAU,EAAE,mBAAe;AACpC,OAAO,EAAE,aAAa,EAAE,sBAAkB;AAC1C,OAAO,EAAE,WAAW,EAAE,oBAAgB;AACtC,OAAO,EAAE,WAAW,EAAE,oBAAgB;AACtC,OAAO,EAAE,SAAS,EAAE,kBAAc;AAClC,OAAO,EAAE,aAAa,EAAE,sBAAkB;AAC1C,OAAO,EAAE,UAAU,EAAE,mBAAe;AAEpC;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAChC,UAAU,EACV,MAAM,CAAC;IACL,sEAAsE;IACtE,mEAAmE;IACnE,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;CAC7C,CAAC,CACH,CAAC;AAYF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB,MAAM,CAC9C,YAAY,EACZ,MAAM,CAAC;IACL,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;CAC9B,CAAC,CACH,CAAC;AAeF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AAE9E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACxC,cAAc;IACd,aAAa;IACb,aAAa;IACb,WAAW;IACX,WAAW;IACX,aAAa;IACb,UAAU;IACV,SAAS;IACT,aAAa;IACb,WAAW;IACX,UAAU;IACV,YAAY;CACb,CAAC,CAAC","sourcesContent":["import type { Infer, Struct } from '@metamask/superstruct';\nimport { array, assign, lazy, literal, object } from '@metamask/superstruct';\n\nimport { typedUnion } from '../../internals';\nimport { createBuilder } from '../builder';\nimport { NodeStruct, NodeType } from '../nodes';\nimport { AddressStruct } from './address';\nimport { ButtonStruct } from './button';\nimport { CopyableStruct } from './copyable';\nimport { DividerStruct } from './divider';\nimport { FormStruct } from './form';\nimport { HeadingStruct } from './heading';\nimport { ImageStruct } from './image';\nimport { InputStruct } from './input';\nimport { RowStruct } from './row';\nimport { SpinnerStruct } from './spinner';\nimport { TextStruct } from './text';\n\n/**\n * @internal\n */\nexport const ParentStruct = assign(\n NodeStruct,\n object({\n // This node references itself indirectly, so we need to use `lazy()`.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n children: array(lazy(() => ComponentStruct)),\n }),\n);\n\n/**\n * A node which supports child nodes. This is used for nodes that render their\n * children, such as {@link Panel}.\n *\n * @property type - The type of the node.\n * @property children - The children of the node\n * @internal\n */\nexport type Parent = Infer<typeof ParentStruct>;\n\n/**\n * @internal\n */\nexport const PanelStruct: Struct<Panel> = assign(\n ParentStruct,\n object({\n type: literal(NodeType.Panel),\n }),\n);\n\n/**\n * A panel node, which renders its children.\n *\n * @property type - The type of the node, must be the string 'text'.\n * @property value - The text content of the node, either as plain text, or as a\n * markdown string.\n */\n// This node references itself indirectly, so it cannot be inferred.\nexport type Panel = {\n type: NodeType.Panel;\n children: Component[];\n};\n\n/**\n * Create a {@link Panel} node.\n *\n * @param args - The node arguments. This can be either an array of children, or\n * an object with a `children` property.\n * @param args.children - The child nodes of the panel. This can be any valid\n * {@link Component}.\n * @returns The panel node as object.\n * @deprecated Snaps component functions are deprecated, in favor of the new JSX\n * components. This function will be removed in a future release.\n * @example\n * const node = panel({\n * children: [\n * heading({ text: 'Hello, world!' }),\n * text({ text: 'This is a panel.' }),\n * ],\n * });\n *\n * const node = panel([\n * heading('Hello, world!'),\n * text('This is a panel.'),\n * ]);\n */\nexport const panel = createBuilder(NodeType.Panel, PanelStruct, ['children']);\n\n// This is defined separately from `Component` to avoid circular dependencies.\nexport const ComponentStruct = typedUnion([\n CopyableStruct,\n DividerStruct,\n HeadingStruct,\n ImageStruct,\n PanelStruct,\n SpinnerStruct,\n TextStruct,\n RowStruct,\n AddressStruct,\n InputStruct,\n FormStruct,\n ButtonStruct,\n]);\n\n/**\n * All supported component types.\n */\nexport type Component = Infer<typeof ComponentStruct>;\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.row = exports.RowStruct = exports.RowVariant = void 0;
|
|
4
|
+
const superstruct_1 = require("@metamask/superstruct");
|
|
5
|
+
const internals_1 = require("../../internals/index.cjs");
|
|
6
|
+
const builder_1 = require("../builder.cjs");
|
|
7
|
+
const nodes_1 = require("../nodes.cjs");
|
|
8
|
+
const address_1 = require("./address.cjs");
|
|
9
|
+
const image_1 = require("./image.cjs");
|
|
10
|
+
const text_1 = require("./text.cjs");
|
|
11
|
+
var RowVariant;
|
|
12
|
+
(function (RowVariant) {
|
|
13
|
+
RowVariant["Default"] = "default";
|
|
14
|
+
RowVariant["Critical"] = "critical";
|
|
15
|
+
RowVariant["Warning"] = "warning";
|
|
16
|
+
})(RowVariant || (exports.RowVariant = RowVariant = {}));
|
|
17
|
+
// A subset of components made available to the row
|
|
18
|
+
const RowComponentStruct = (0, superstruct_1.union)([image_1.ImageStruct, text_1.TextStruct, address_1.AddressStruct]);
|
|
19
|
+
exports.RowStruct = (0, superstruct_1.assign)(nodes_1.LiteralStruct, (0, superstruct_1.object)({
|
|
20
|
+
type: (0, superstruct_1.literal)(nodes_1.NodeType.Row),
|
|
21
|
+
variant: (0, superstruct_1.optional)((0, superstruct_1.union)([
|
|
22
|
+
(0, internals_1.enumValue)(RowVariant.Default),
|
|
23
|
+
(0, internals_1.enumValue)(RowVariant.Critical),
|
|
24
|
+
(0, internals_1.enumValue)(RowVariant.Warning),
|
|
25
|
+
])),
|
|
26
|
+
label: (0, superstruct_1.string)(),
|
|
27
|
+
value: RowComponentStruct,
|
|
28
|
+
}));
|
|
29
|
+
/**
|
|
30
|
+
* Create a {@link Row} node.
|
|
31
|
+
*
|
|
32
|
+
* @param args - The node arguments. This can either be a string, a component and an optional variant or an object
|
|
33
|
+
* with the properties: `label`, `value` and `variant`.
|
|
34
|
+
* @param args.label - The label for the row.
|
|
35
|
+
* @param args.value - Another component, is currently limited to `image`, `text` and `address`.
|
|
36
|
+
* @param args.variant - An optional variant, either `default`, `warning` or `critical`.
|
|
37
|
+
* @returns The row node as an object.
|
|
38
|
+
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
39
|
+
* components. This function will be removed in a future release.
|
|
40
|
+
* @example
|
|
41
|
+
* const node = row({ label: 'Address', value: address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520') });
|
|
42
|
+
* const node = row({ label: 'Address', value: address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520'), variant: RowVariant.Warning });
|
|
43
|
+
* const node = row('Address', address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520'));
|
|
44
|
+
* const node = row('Address', address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520'), RowVariant.Warning);
|
|
45
|
+
*/
|
|
46
|
+
exports.row = (0, builder_1.createBuilder)(nodes_1.NodeType.Row, exports.RowStruct, [
|
|
47
|
+
'label',
|
|
48
|
+
'value',
|
|
49
|
+
'variant',
|
|
50
|
+
]);
|
|
51
|
+
//# sourceMappingURL=row.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.cjs","sourceRoot":"","sources":["../../../src/ui/components/row.ts"],"names":[],"mappings":";;;AACA,uDAO+B;AAE/B,yDAA4C;AAC5C,4CAA2C;AAC3C,wCAAmD;AACnD,2CAA0C;AAC1C,uCAAsC;AACtC,qCAAoC;AAEpC,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;IACrB,iCAAmB,CAAA;AACrB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,mDAAmD;AACnD,MAAM,kBAAkB,GAAG,IAAA,mBAAK,EAAC,CAAC,mBAAW,EAAE,iBAAU,EAAE,uBAAa,CAAC,CAAC,CAAC;AAE9D,QAAA,SAAS,GAAG,IAAA,oBAAM,EAC7B,qBAAa,EACb,IAAA,oBAAM,EAAC;IACL,IAAI,EAAE,IAAA,qBAAO,EAAC,gBAAQ,CAAC,GAAG,CAAC;IAC3B,OAAO,EAAE,IAAA,sBAAQ,EACf,IAAA,mBAAK,EAAC;QACJ,IAAA,qBAAS,EAAC,UAAU,CAAC,OAAO,CAAC;QAC7B,IAAA,qBAAS,EAAC,UAAU,CAAC,QAAQ,CAAC;QAC9B,IAAA,qBAAS,EAAC,UAAU,CAAC,OAAO,CAAC;KAC9B,CAAC,CACH;IACD,KAAK,EAAE,IAAA,oBAAM,GAAE;IACf,KAAK,EAAE,kBAAkB;CAC1B,CAAC,CACH,CAAC;AAaF;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,GAAG,GAAG,IAAA,uBAAa,EAAC,gBAAQ,CAAC,GAAG,EAAE,iBAAS,EAAE;IACxD,OAAO;IACP,OAAO;IACP,SAAS;CACV,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport {\n assign,\n literal,\n object,\n string,\n optional,\n union,\n} from '@metamask/superstruct';\n\nimport { enumValue } from '../../internals';\nimport { createBuilder } from '../builder';\nimport { LiteralStruct, NodeType } from '../nodes';\nimport { AddressStruct } from './address';\nimport { ImageStruct } from './image';\nimport { TextStruct } from './text';\n\nexport enum RowVariant {\n Default = 'default',\n Critical = 'critical',\n Warning = 'warning',\n}\n\n// A subset of components made available to the row\nconst RowComponentStruct = union([ImageStruct, TextStruct, AddressStruct]);\n\nexport const RowStruct = assign(\n LiteralStruct,\n object({\n type: literal(NodeType.Row),\n variant: optional(\n union([\n enumValue(RowVariant.Default),\n enumValue(RowVariant.Critical),\n enumValue(RowVariant.Warning),\n ]),\n ),\n label: string(),\n value: RowComponentStruct,\n }),\n);\n\n/**\n * A row node, that renders a row with a label and a value.\n *\n * @property type - The type of the node. Must be the string `row`.\n * @property label - The label for the row.\n * @property value - A sub component to be rendered\n * on one side of the row.\n * @property variant - Optional variant for styling.\n */\nexport type Row = Infer<typeof RowStruct>;\n\n/**\n * Create a {@link Row} node.\n *\n * @param args - The node arguments. This can either be a string, a component and an optional variant or an object\n * with the properties: `label`, `value` and `variant`.\n * @param args.label - The label for the row.\n * @param args.value - Another component, is currently limited to `image`, `text` and `address`.\n * @param args.variant - An optional variant, either `default`, `warning` or `critical`.\n * @returns The row node as an object.\n * @deprecated Snaps component functions are deprecated, in favor of the new JSX\n * components. This function will be removed in a future release.\n * @example\n * const node = row({ label: 'Address', value: address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520') });\n * const node = row({ label: 'Address', value: address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520'), variant: RowVariant.Warning });\n * const node = row('Address', address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520'));\n * const node = row('Address', address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520'), RowVariant.Warning);\n */\nexport const row = createBuilder(NodeType.Row, RowStruct, [\n 'label',\n 'value',\n 'variant',\n]);\n"]}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type { Infer } from
|
|
2
|
-
import { NodeType } from
|
|
1
|
+
import type { Infer } from "@metamask/superstruct";
|
|
2
|
+
import { NodeType } from "../nodes.cjs";
|
|
3
3
|
export declare enum RowVariant {
|
|
4
4
|
Default = "default",
|
|
5
5
|
Critical = "critical",
|
|
6
6
|
Warning = "warning"
|
|
7
7
|
}
|
|
8
8
|
export declare const RowStruct: import("@metamask/superstruct").Struct<{
|
|
9
|
+
type: NodeType.Row;
|
|
9
10
|
value: {
|
|
10
|
-
value: string;
|
|
11
11
|
type: NodeType.Image;
|
|
12
|
-
} | {
|
|
13
12
|
value: string;
|
|
13
|
+
} | {
|
|
14
14
|
type: NodeType.Text;
|
|
15
|
+
value: string;
|
|
15
16
|
markdown?: boolean | undefined;
|
|
16
17
|
} | {
|
|
17
|
-
value: `0x${string}`;
|
|
18
18
|
type: NodeType.Address;
|
|
19
|
+
value: `0x${string}`;
|
|
19
20
|
};
|
|
20
|
-
type: NodeType.Row;
|
|
21
21
|
label: string;
|
|
22
22
|
variant?: "default" | "warning" | "critical" | undefined;
|
|
23
23
|
}, {
|
|
@@ -25,15 +25,15 @@ export declare const RowStruct: import("@metamask/superstruct").Struct<{
|
|
|
25
25
|
variant: import("@metamask/superstruct").Struct<"default" | "warning" | "critical" | undefined, null>;
|
|
26
26
|
label: import("@metamask/superstruct").Struct<string, null>;
|
|
27
27
|
value: import("@metamask/superstruct").Struct<{
|
|
28
|
-
value: string;
|
|
29
28
|
type: NodeType.Image;
|
|
30
|
-
} | {
|
|
31
29
|
value: string;
|
|
30
|
+
} | {
|
|
32
31
|
type: NodeType.Text;
|
|
32
|
+
value: string;
|
|
33
33
|
markdown?: boolean | undefined;
|
|
34
34
|
} | {
|
|
35
|
-
value: `0x${string}`;
|
|
36
35
|
type: NodeType.Address;
|
|
36
|
+
value: `0x${string}`;
|
|
37
37
|
}, null>;
|
|
38
38
|
}>;
|
|
39
39
|
/**
|
|
@@ -64,43 +64,44 @@ export type Row = Infer<typeof RowStruct>;
|
|
|
64
64
|
* const node = row('Address', address('0x4bbeeb066ed09b7aed07bf39eee0460dfa261520'), RowVariant.Warning);
|
|
65
65
|
*/
|
|
66
66
|
export declare const row: (...args: [Omit<{
|
|
67
|
+
type: NodeType.Row;
|
|
67
68
|
value: {
|
|
68
|
-
value: string;
|
|
69
69
|
type: NodeType.Image;
|
|
70
|
-
} | {
|
|
71
70
|
value: string;
|
|
71
|
+
} | {
|
|
72
72
|
type: NodeType.Text;
|
|
73
|
+
value: string;
|
|
73
74
|
markdown?: boolean | undefined;
|
|
74
75
|
} | {
|
|
75
|
-
value: `0x${string}`;
|
|
76
76
|
type: NodeType.Address;
|
|
77
|
+
value: `0x${string}`;
|
|
77
78
|
};
|
|
78
|
-
type: NodeType.Row;
|
|
79
79
|
label: string;
|
|
80
80
|
variant?: "default" | "warning" | "critical" | undefined;
|
|
81
81
|
}, "type">] | (string | {
|
|
82
|
-
value: string;
|
|
83
82
|
type: NodeType.Image;
|
|
84
|
-
} | {
|
|
85
83
|
value: string;
|
|
84
|
+
} | {
|
|
86
85
|
type: NodeType.Text;
|
|
86
|
+
value: string;
|
|
87
87
|
markdown?: boolean | undefined;
|
|
88
88
|
} | {
|
|
89
|
-
value: `0x${string}`;
|
|
90
89
|
type: NodeType.Address;
|
|
90
|
+
value: `0x${string}`;
|
|
91
91
|
} | undefined)[]) => {
|
|
92
|
+
type: NodeType.Row;
|
|
92
93
|
value: {
|
|
93
|
-
value: string;
|
|
94
94
|
type: NodeType.Image;
|
|
95
|
-
} | {
|
|
96
95
|
value: string;
|
|
96
|
+
} | {
|
|
97
97
|
type: NodeType.Text;
|
|
98
|
+
value: string;
|
|
98
99
|
markdown?: boolean | undefined;
|
|
99
100
|
} | {
|
|
100
|
-
value: `0x${string}`;
|
|
101
101
|
type: NodeType.Address;
|
|
102
|
+
value: `0x${string}`;
|
|
102
103
|
};
|
|
103
|
-
type: NodeType.Row;
|
|
104
104
|
label: string;
|
|
105
105
|
variant?: "default" | "warning" | "critical" | undefined;
|
|
106
106
|
};
|
|
107
|
+
//# sourceMappingURL=row.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.d.cts","sourceRoot":"","sources":["../../../src/ui/components/row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAYnD,OAAO,EAAiB,QAAQ,EAAE,qBAAiB;AAKnD,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAKD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcrB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAId,CAAC"}
|