@metamask/snaps-sdk 10.4.0 → 11.0.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 +17 -1
- package/dist/error-wrappers.d.cts +192 -192
- package/dist/error-wrappers.d.mts +192 -192
- package/dist/errors.cjs +27 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +14 -0
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.mts +14 -0
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +25 -1
- package/dist/errors.mjs.map +1 -1
- package/dist/images.cjs +1 -41
- package/dist/images.cjs.map +1 -1
- package/dist/images.d.cts +0 -49
- package/dist/images.d.cts.map +1 -1
- package/dist/images.d.mts +0 -49
- package/dist/images.d.mts.map +1 -1
- package/dist/images.mjs +0 -39
- package/dist/images.mjs.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +8 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/dist/internals/error-wrappers.d.cts +12 -12
- package/dist/internals/error-wrappers.d.mts +12 -12
- package/dist/jsx/components/Address.cjs +1 -0
- package/dist/jsx/components/Address.cjs.map +1 -1
- package/dist/jsx/components/Address.d.cts +4 -1
- package/dist/jsx/components/Address.d.cts.map +1 -1
- package/dist/jsx/components/Address.d.mts +4 -1
- package/dist/jsx/components/Address.d.mts.map +1 -1
- package/dist/jsx/components/Address.mjs +1 -0
- package/dist/jsx/components/Address.mjs.map +1 -1
- package/dist/jsx/components/Avatar.cjs +1 -0
- package/dist/jsx/components/Avatar.cjs.map +1 -1
- package/dist/jsx/components/Avatar.d.cts +4 -1
- package/dist/jsx/components/Avatar.d.cts.map +1 -1
- package/dist/jsx/components/Avatar.d.mts +4 -1
- package/dist/jsx/components/Avatar.d.mts.map +1 -1
- package/dist/jsx/components/Avatar.mjs +1 -0
- package/dist/jsx/components/Avatar.mjs.map +1 -1
- package/dist/jsx/components/Banner.cjs +1 -0
- package/dist/jsx/components/Banner.cjs.map +1 -1
- package/dist/jsx/components/Banner.d.cts +4 -1
- package/dist/jsx/components/Banner.d.cts.map +1 -1
- package/dist/jsx/components/Banner.d.mts +4 -1
- package/dist/jsx/components/Banner.d.mts.map +1 -1
- package/dist/jsx/components/Banner.mjs +1 -0
- package/dist/jsx/components/Banner.mjs.map +1 -1
- package/dist/jsx/components/Box.cjs +1 -0
- package/dist/jsx/components/Box.cjs.map +1 -1
- package/dist/jsx/components/Box.d.cts +4 -1
- package/dist/jsx/components/Box.d.cts.map +1 -1
- package/dist/jsx/components/Box.d.mts +4 -1
- package/dist/jsx/components/Box.d.mts.map +1 -1
- package/dist/jsx/components/Box.mjs +1 -0
- package/dist/jsx/components/Box.mjs.map +1 -1
- package/dist/jsx/components/Card.cjs +1 -0
- package/dist/jsx/components/Card.cjs.map +1 -1
- package/dist/jsx/components/Card.d.cts +4 -1
- package/dist/jsx/components/Card.d.cts.map +1 -1
- package/dist/jsx/components/Card.d.mts +4 -1
- package/dist/jsx/components/Card.d.mts.map +1 -1
- package/dist/jsx/components/Card.mjs +1 -0
- package/dist/jsx/components/Card.mjs.map +1 -1
- package/dist/jsx/components/Container.cjs +1 -0
- package/dist/jsx/components/Container.cjs.map +1 -1
- package/dist/jsx/components/Container.d.cts +4 -1
- package/dist/jsx/components/Container.d.cts.map +1 -1
- package/dist/jsx/components/Container.d.mts +4 -1
- package/dist/jsx/components/Container.d.mts.map +1 -1
- package/dist/jsx/components/Container.mjs +1 -0
- package/dist/jsx/components/Container.mjs.map +1 -1
- package/dist/jsx/components/Copyable.cjs +1 -0
- package/dist/jsx/components/Copyable.cjs.map +1 -1
- package/dist/jsx/components/Copyable.d.cts +4 -1
- package/dist/jsx/components/Copyable.d.cts.map +1 -1
- package/dist/jsx/components/Copyable.d.mts +4 -1
- package/dist/jsx/components/Copyable.d.mts.map +1 -1
- package/dist/jsx/components/Copyable.mjs +1 -0
- package/dist/jsx/components/Copyable.mjs.map +1 -1
- package/dist/jsx/components/Divider.cjs +1 -0
- package/dist/jsx/components/Divider.cjs.map +1 -1
- package/dist/jsx/components/Divider.d.cts +3 -1
- package/dist/jsx/components/Divider.d.cts.map +1 -1
- package/dist/jsx/components/Divider.d.mts +3 -1
- package/dist/jsx/components/Divider.d.mts.map +1 -1
- package/dist/jsx/components/Divider.mjs +1 -0
- package/dist/jsx/components/Divider.mjs.map +1 -1
- package/dist/jsx/components/Footer.cjs +1 -0
- package/dist/jsx/components/Footer.cjs.map +1 -1
- package/dist/jsx/components/Footer.d.cts +4 -1
- package/dist/jsx/components/Footer.d.cts.map +1 -1
- package/dist/jsx/components/Footer.d.mts +4 -1
- package/dist/jsx/components/Footer.d.mts.map +1 -1
- package/dist/jsx/components/Footer.mjs +1 -0
- package/dist/jsx/components/Footer.mjs.map +1 -1
- package/dist/jsx/components/Heading.cjs +1 -0
- package/dist/jsx/components/Heading.cjs.map +1 -1
- package/dist/jsx/components/Heading.d.cts +4 -1
- package/dist/jsx/components/Heading.d.cts.map +1 -1
- package/dist/jsx/components/Heading.d.mts +4 -1
- package/dist/jsx/components/Heading.d.mts.map +1 -1
- package/dist/jsx/components/Heading.mjs +1 -0
- package/dist/jsx/components/Heading.mjs.map +1 -1
- package/dist/jsx/components/Icon.cjs +1 -0
- package/dist/jsx/components/Icon.cjs.map +1 -1
- package/dist/jsx/components/Icon.d.cts +9 -2
- package/dist/jsx/components/Icon.d.cts.map +1 -1
- package/dist/jsx/components/Icon.d.mts +9 -2
- package/dist/jsx/components/Icon.d.mts.map +1 -1
- package/dist/jsx/components/Icon.mjs +1 -0
- package/dist/jsx/components/Icon.mjs.map +1 -1
- package/dist/jsx/components/Image.cjs +1 -0
- package/dist/jsx/components/Image.cjs.map +1 -1
- package/dist/jsx/components/Image.d.cts +4 -1
- package/dist/jsx/components/Image.d.cts.map +1 -1
- package/dist/jsx/components/Image.d.mts +4 -1
- package/dist/jsx/components/Image.d.mts.map +1 -1
- package/dist/jsx/components/Image.mjs +1 -0
- package/dist/jsx/components/Image.mjs.map +1 -1
- package/dist/jsx/components/Link.cjs +1 -0
- package/dist/jsx/components/Link.cjs.map +1 -1
- package/dist/jsx/components/Link.d.cts +4 -1
- package/dist/jsx/components/Link.d.cts.map +1 -1
- package/dist/jsx/components/Link.d.mts +4 -1
- package/dist/jsx/components/Link.d.mts.map +1 -1
- package/dist/jsx/components/Link.mjs +1 -0
- package/dist/jsx/components/Link.mjs.map +1 -1
- package/dist/jsx/components/Row.cjs +1 -0
- package/dist/jsx/components/Row.cjs.map +1 -1
- package/dist/jsx/components/Row.d.cts +4 -1
- package/dist/jsx/components/Row.d.cts.map +1 -1
- package/dist/jsx/components/Row.d.mts +4 -1
- package/dist/jsx/components/Row.d.mts.map +1 -1
- package/dist/jsx/components/Row.mjs +1 -0
- package/dist/jsx/components/Row.mjs.map +1 -1
- package/dist/jsx/components/Section.cjs +1 -0
- package/dist/jsx/components/Section.cjs.map +1 -1
- package/dist/jsx/components/Section.d.cts +4 -1
- package/dist/jsx/components/Section.d.cts.map +1 -1
- package/dist/jsx/components/Section.d.mts +4 -1
- package/dist/jsx/components/Section.d.mts.map +1 -1
- package/dist/jsx/components/Section.mjs +1 -0
- package/dist/jsx/components/Section.mjs.map +1 -1
- package/dist/jsx/components/Skeleton.cjs +1 -0
- package/dist/jsx/components/Skeleton.cjs.map +1 -1
- package/dist/jsx/components/Skeleton.d.cts +4 -1
- package/dist/jsx/components/Skeleton.d.cts.map +1 -1
- package/dist/jsx/components/Skeleton.d.mts +4 -1
- package/dist/jsx/components/Skeleton.d.mts.map +1 -1
- package/dist/jsx/components/Skeleton.mjs +1 -0
- package/dist/jsx/components/Skeleton.mjs.map +1 -1
- package/dist/jsx/components/Spinner.cjs +1 -0
- package/dist/jsx/components/Spinner.cjs.map +1 -1
- package/dist/jsx/components/Spinner.d.cts +3 -1
- package/dist/jsx/components/Spinner.d.cts.map +1 -1
- package/dist/jsx/components/Spinner.d.mts +3 -1
- package/dist/jsx/components/Spinner.d.mts.map +1 -1
- package/dist/jsx/components/Spinner.mjs +1 -0
- package/dist/jsx/components/Spinner.mjs.map +1 -1
- package/dist/jsx/components/Text.cjs +1 -0
- package/dist/jsx/components/Text.cjs.map +1 -1
- package/dist/jsx/components/Text.d.cts +4 -1
- package/dist/jsx/components/Text.d.cts.map +1 -1
- package/dist/jsx/components/Text.d.mts +4 -1
- package/dist/jsx/components/Text.d.mts.map +1 -1
- package/dist/jsx/components/Text.mjs +1 -0
- package/dist/jsx/components/Text.mjs.map +1 -1
- package/dist/jsx/components/Tooltip.cjs +1 -0
- package/dist/jsx/components/Tooltip.cjs.map +1 -1
- package/dist/jsx/components/Tooltip.d.cts +4 -1
- package/dist/jsx/components/Tooltip.d.cts.map +1 -1
- package/dist/jsx/components/Tooltip.d.mts +4 -1
- package/dist/jsx/components/Tooltip.d.mts.map +1 -1
- package/dist/jsx/components/Tooltip.mjs +1 -0
- package/dist/jsx/components/Tooltip.mjs.map +1 -1
- package/dist/jsx/components/Value.cjs +1 -0
- package/dist/jsx/components/Value.cjs.map +1 -1
- package/dist/jsx/components/Value.d.cts +4 -1
- package/dist/jsx/components/Value.d.cts.map +1 -1
- package/dist/jsx/components/Value.d.mts +4 -1
- package/dist/jsx/components/Value.d.mts.map +1 -1
- package/dist/jsx/components/Value.mjs +1 -0
- package/dist/jsx/components/Value.mjs.map +1 -1
- package/dist/jsx/components/form/AccountSelector.cjs +1 -0
- package/dist/jsx/components/form/AccountSelector.cjs.map +1 -1
- package/dist/jsx/components/form/AccountSelector.d.cts +4 -1
- package/dist/jsx/components/form/AccountSelector.d.cts.map +1 -1
- package/dist/jsx/components/form/AccountSelector.d.mts +4 -1
- package/dist/jsx/components/form/AccountSelector.d.mts.map +1 -1
- package/dist/jsx/components/form/AccountSelector.mjs +1 -0
- package/dist/jsx/components/form/AccountSelector.mjs.map +1 -1
- package/dist/jsx/components/form/AddressInput.cjs +1 -0
- package/dist/jsx/components/form/AddressInput.cjs.map +1 -1
- package/dist/jsx/components/form/AddressInput.d.cts +18 -0
- package/dist/jsx/components/form/AddressInput.d.cts.map +1 -1
- package/dist/jsx/components/form/AddressInput.d.mts +18 -0
- package/dist/jsx/components/form/AddressInput.d.mts.map +1 -1
- package/dist/jsx/components/form/AddressInput.mjs +1 -0
- package/dist/jsx/components/form/AddressInput.mjs.map +1 -1
- package/dist/jsx/components/form/AssetSelector.cjs +1 -0
- package/dist/jsx/components/form/AssetSelector.cjs.map +1 -1
- package/dist/jsx/components/form/AssetSelector.d.cts +8 -0
- package/dist/jsx/components/form/AssetSelector.d.cts.map +1 -1
- package/dist/jsx/components/form/AssetSelector.d.mts +8 -0
- package/dist/jsx/components/form/AssetSelector.d.mts.map +1 -1
- package/dist/jsx/components/form/AssetSelector.mjs +1 -0
- package/dist/jsx/components/form/AssetSelector.mjs.map +1 -1
- package/dist/jsx/components/form/Button.cjs +1 -0
- package/dist/jsx/components/form/Button.cjs.map +1 -1
- package/dist/jsx/components/form/Button.d.cts +4 -1
- package/dist/jsx/components/form/Button.d.cts.map +1 -1
- package/dist/jsx/components/form/Button.d.mts +4 -1
- package/dist/jsx/components/form/Button.d.mts.map +1 -1
- package/dist/jsx/components/form/Button.mjs +1 -0
- package/dist/jsx/components/form/Button.mjs.map +1 -1
- package/dist/jsx/components/form/Checkbox.cjs +1 -0
- package/dist/jsx/components/form/Checkbox.cjs.map +1 -1
- package/dist/jsx/components/form/Checkbox.d.cts +4 -1
- package/dist/jsx/components/form/Checkbox.d.cts.map +1 -1
- package/dist/jsx/components/form/Checkbox.d.mts +4 -1
- package/dist/jsx/components/form/Checkbox.d.mts.map +1 -1
- package/dist/jsx/components/form/Checkbox.mjs +1 -0
- package/dist/jsx/components/form/Checkbox.mjs.map +1 -1
- package/dist/jsx/components/form/DateTimePicker.cjs +1 -0
- package/dist/jsx/components/form/DateTimePicker.cjs.map +1 -1
- package/dist/jsx/components/form/DateTimePicker.d.cts +4 -1
- package/dist/jsx/components/form/DateTimePicker.d.cts.map +1 -1
- package/dist/jsx/components/form/DateTimePicker.d.mts +4 -1
- package/dist/jsx/components/form/DateTimePicker.d.mts.map +1 -1
- package/dist/jsx/components/form/DateTimePicker.mjs +1 -0
- package/dist/jsx/components/form/DateTimePicker.mjs.map +1 -1
- package/dist/jsx/components/form/Dropdown.cjs +1 -0
- package/dist/jsx/components/form/Dropdown.cjs.map +1 -1
- package/dist/jsx/components/form/Dropdown.d.cts +4 -1
- package/dist/jsx/components/form/Dropdown.d.cts.map +1 -1
- package/dist/jsx/components/form/Dropdown.d.mts +4 -1
- package/dist/jsx/components/form/Dropdown.d.mts.map +1 -1
- package/dist/jsx/components/form/Dropdown.mjs +1 -0
- package/dist/jsx/components/form/Dropdown.mjs.map +1 -1
- package/dist/jsx/components/form/Field.cjs +1 -0
- package/dist/jsx/components/form/Field.cjs.map +1 -1
- package/dist/jsx/components/form/Field.d.cts +4 -1
- package/dist/jsx/components/form/Field.d.cts.map +1 -1
- package/dist/jsx/components/form/Field.d.mts +4 -1
- package/dist/jsx/components/form/Field.d.mts.map +1 -1
- package/dist/jsx/components/form/Field.mjs +1 -0
- package/dist/jsx/components/form/Field.mjs.map +1 -1
- package/dist/jsx/components/form/FileInput.cjs +1 -0
- package/dist/jsx/components/form/FileInput.cjs.map +1 -1
- package/dist/jsx/components/form/FileInput.d.cts +4 -1
- package/dist/jsx/components/form/FileInput.d.cts.map +1 -1
- package/dist/jsx/components/form/FileInput.d.mts +4 -1
- package/dist/jsx/components/form/FileInput.d.mts.map +1 -1
- package/dist/jsx/components/form/FileInput.mjs +1 -0
- package/dist/jsx/components/form/FileInput.mjs.map +1 -1
- package/dist/jsx/components/form/Form.cjs +1 -0
- package/dist/jsx/components/form/Form.cjs.map +1 -1
- package/dist/jsx/components/form/Form.d.cts +4 -1
- package/dist/jsx/components/form/Form.d.cts.map +1 -1
- package/dist/jsx/components/form/Form.d.mts +4 -1
- package/dist/jsx/components/form/Form.d.mts.map +1 -1
- package/dist/jsx/components/form/Form.mjs +1 -0
- package/dist/jsx/components/form/Form.mjs.map +1 -1
- package/dist/jsx/components/form/Input.cjs +1 -0
- package/dist/jsx/components/form/Input.cjs.map +1 -1
- package/dist/jsx/components/form/Input.d.cts +16 -1
- package/dist/jsx/components/form/Input.d.cts.map +1 -1
- package/dist/jsx/components/form/Input.d.mts +16 -1
- package/dist/jsx/components/form/Input.d.mts.map +1 -1
- package/dist/jsx/components/form/Input.mjs +1 -0
- package/dist/jsx/components/form/Input.mjs.map +1 -1
- package/dist/jsx/components/form/Option.cjs +1 -0
- package/dist/jsx/components/form/Option.cjs.map +1 -1
- package/dist/jsx/components/form/Option.d.cts +4 -1
- package/dist/jsx/components/form/Option.d.cts.map +1 -1
- package/dist/jsx/components/form/Option.d.mts +4 -1
- package/dist/jsx/components/form/Option.d.mts.map +1 -1
- package/dist/jsx/components/form/Option.mjs +1 -0
- package/dist/jsx/components/form/Option.mjs.map +1 -1
- package/dist/jsx/components/form/Radio.cjs +1 -0
- package/dist/jsx/components/form/Radio.cjs.map +1 -1
- package/dist/jsx/components/form/Radio.d.cts +4 -1
- package/dist/jsx/components/form/Radio.d.cts.map +1 -1
- package/dist/jsx/components/form/Radio.d.mts +4 -1
- package/dist/jsx/components/form/Radio.d.mts.map +1 -1
- package/dist/jsx/components/form/Radio.mjs +1 -0
- package/dist/jsx/components/form/Radio.mjs.map +1 -1
- package/dist/jsx/components/form/RadioGroup.cjs +1 -0
- package/dist/jsx/components/form/RadioGroup.cjs.map +1 -1
- package/dist/jsx/components/form/RadioGroup.d.cts +4 -1
- package/dist/jsx/components/form/RadioGroup.d.cts.map +1 -1
- package/dist/jsx/components/form/RadioGroup.d.mts +4 -1
- package/dist/jsx/components/form/RadioGroup.d.mts.map +1 -1
- package/dist/jsx/components/form/RadioGroup.mjs +1 -0
- package/dist/jsx/components/form/RadioGroup.mjs.map +1 -1
- package/dist/jsx/components/form/Selector.cjs +1 -0
- package/dist/jsx/components/form/Selector.cjs.map +1 -1
- package/dist/jsx/components/form/Selector.d.cts +4 -1
- package/dist/jsx/components/form/Selector.d.cts.map +1 -1
- package/dist/jsx/components/form/Selector.d.mts +4 -1
- package/dist/jsx/components/form/Selector.d.mts.map +1 -1
- package/dist/jsx/components/form/Selector.mjs +1 -0
- package/dist/jsx/components/form/Selector.mjs.map +1 -1
- package/dist/jsx/components/form/SelectorOption.cjs +1 -0
- package/dist/jsx/components/form/SelectorOption.cjs.map +1 -1
- package/dist/jsx/components/form/SelectorOption.d.cts +4 -1
- package/dist/jsx/components/form/SelectorOption.d.cts.map +1 -1
- package/dist/jsx/components/form/SelectorOption.d.mts +4 -1
- package/dist/jsx/components/form/SelectorOption.d.mts.map +1 -1
- package/dist/jsx/components/form/SelectorOption.mjs +1 -0
- package/dist/jsx/components/form/SelectorOption.mjs.map +1 -1
- package/dist/jsx/components/formatting/Bold.cjs +1 -0
- package/dist/jsx/components/formatting/Bold.cjs.map +1 -1
- package/dist/jsx/components/formatting/Bold.d.cts +4 -1
- package/dist/jsx/components/formatting/Bold.d.cts.map +1 -1
- package/dist/jsx/components/formatting/Bold.d.mts +4 -1
- package/dist/jsx/components/formatting/Bold.d.mts.map +1 -1
- package/dist/jsx/components/formatting/Bold.mjs +1 -0
- package/dist/jsx/components/formatting/Bold.mjs.map +1 -1
- package/dist/jsx/components/formatting/Italic.cjs +1 -0
- package/dist/jsx/components/formatting/Italic.cjs.map +1 -1
- package/dist/jsx/components/formatting/Italic.d.cts +4 -1
- package/dist/jsx/components/formatting/Italic.d.cts.map +1 -1
- package/dist/jsx/components/formatting/Italic.d.mts +4 -1
- package/dist/jsx/components/formatting/Italic.d.mts.map +1 -1
- package/dist/jsx/components/formatting/Italic.mjs +1 -0
- package/dist/jsx/components/formatting/Italic.mjs.map +1 -1
- package/dist/jsx/index.cjs +22 -0
- package/dist/jsx/index.cjs.map +1 -1
- package/dist/jsx/index.d.cts +22 -0
- package/dist/jsx/index.d.cts.map +1 -1
- package/dist/jsx/index.d.mts +22 -0
- package/dist/jsx/index.d.mts.map +1 -1
- package/dist/jsx/index.mjs +22 -0
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/validation.cjs +8 -1
- package/dist/jsx/validation.cjs.map +1 -1
- package/dist/jsx/validation.d.cts.map +1 -1
- package/dist/jsx/validation.d.mts.map +1 -1
- package/dist/jsx/validation.mjs +8 -1
- package/dist/jsx/validation.mjs.map +1 -1
- package/dist/types/methods/cancel-background-event.cjs.map +1 -1
- package/dist/types/methods/cancel-background-event.d.cts +6 -6
- package/dist/types/methods/cancel-background-event.d.cts.map +1 -1
- package/dist/types/methods/cancel-background-event.d.mts +6 -6
- package/dist/types/methods/cancel-background-event.d.mts.map +1 -1
- package/dist/types/methods/cancel-background-event.mjs.map +1 -1
- package/dist/types/methods/clear-state.cjs.map +1 -1
- package/dist/types/methods/clear-state.d.cts +8 -4
- package/dist/types/methods/clear-state.d.cts.map +1 -1
- package/dist/types/methods/clear-state.d.mts +8 -4
- package/dist/types/methods/clear-state.d.mts.map +1 -1
- package/dist/types/methods/clear-state.mjs.map +1 -1
- package/dist/types/methods/close-web-socket.cjs.map +1 -1
- package/dist/types/methods/close-web-socket.d.cts +3 -3
- package/dist/types/methods/close-web-socket.d.mts +3 -3
- package/dist/types/methods/close-web-socket.mjs.map +1 -1
- package/dist/types/methods/create-interface.cjs.map +1 -1
- package/dist/types/methods/create-interface.d.cts +14 -4
- package/dist/types/methods/create-interface.d.cts.map +1 -1
- package/dist/types/methods/create-interface.d.mts +14 -4
- package/dist/types/methods/create-interface.d.mts.map +1 -1
- package/dist/types/methods/create-interface.mjs.map +1 -1
- package/dist/types/methods/dialog.cjs.map +1 -1
- package/dist/types/methods/dialog.d.cts +49 -18
- package/dist/types/methods/dialog.d.cts.map +1 -1
- package/dist/types/methods/dialog.d.mts +49 -18
- package/dist/types/methods/dialog.d.mts.map +1 -1
- package/dist/types/methods/dialog.mjs.map +1 -1
- package/dist/types/methods/get-background-events.cjs.map +1 -1
- package/dist/types/methods/get-background-events.d.cts +17 -8
- package/dist/types/methods/get-background-events.d.cts.map +1 -1
- package/dist/types/methods/get-background-events.d.mts +17 -8
- package/dist/types/methods/get-background-events.d.mts.map +1 -1
- package/dist/types/methods/get-background-events.mjs.map +1 -1
- package/dist/types/methods/get-bip32-entropy.cjs.map +1 -1
- package/dist/types/methods/get-bip32-entropy.d.cts +2 -4
- package/dist/types/methods/get-bip32-entropy.d.cts.map +1 -1
- package/dist/types/methods/get-bip32-entropy.d.mts +2 -4
- package/dist/types/methods/get-bip32-entropy.d.mts.map +1 -1
- package/dist/types/methods/get-bip32-entropy.mjs.map +1 -1
- package/dist/types/methods/get-bip32-public-key.cjs.map +1 -1
- package/dist/types/methods/get-bip32-public-key.d.cts +3 -5
- package/dist/types/methods/get-bip32-public-key.d.cts.map +1 -1
- package/dist/types/methods/get-bip32-public-key.d.mts +3 -5
- package/dist/types/methods/get-bip32-public-key.d.mts.map +1 -1
- package/dist/types/methods/get-bip32-public-key.mjs.map +1 -1
- package/dist/types/methods/get-bip44-entropy.cjs.map +1 -1
- package/dist/types/methods/get-bip44-entropy.d.cts +3 -4
- package/dist/types/methods/get-bip44-entropy.d.cts.map +1 -1
- package/dist/types/methods/get-bip44-entropy.d.mts +3 -4
- package/dist/types/methods/get-bip44-entropy.d.mts.map +1 -1
- package/dist/types/methods/get-bip44-entropy.mjs.map +1 -1
- package/dist/types/methods/get-client-status.cjs.map +1 -1
- package/dist/types/methods/get-client-status.d.cts +5 -7
- package/dist/types/methods/get-client-status.d.cts.map +1 -1
- package/dist/types/methods/get-client-status.d.mts +5 -7
- package/dist/types/methods/get-client-status.d.mts.map +1 -1
- package/dist/types/methods/get-client-status.mjs.map +1 -1
- package/dist/types/methods/get-entropy.cjs.map +1 -1
- package/dist/types/methods/get-entropy.d.cts +6 -5
- package/dist/types/methods/get-entropy.d.cts.map +1 -1
- package/dist/types/methods/get-entropy.d.mts +6 -5
- package/dist/types/methods/get-entropy.d.mts.map +1 -1
- package/dist/types/methods/get-entropy.mjs.map +1 -1
- package/dist/types/methods/get-file.cjs.map +1 -1
- package/dist/types/methods/get-file.d.cts +9 -5
- package/dist/types/methods/get-file.d.cts.map +1 -1
- package/dist/types/methods/get-file.d.mts +9 -5
- package/dist/types/methods/get-file.d.mts.map +1 -1
- package/dist/types/methods/get-file.mjs.map +1 -1
- package/dist/types/methods/get-interface-context.cjs.map +1 -1
- package/dist/types/methods/get-interface-context.d.cts +5 -3
- package/dist/types/methods/get-interface-context.d.cts.map +1 -1
- package/dist/types/methods/get-interface-context.d.mts +5 -3
- package/dist/types/methods/get-interface-context.d.mts.map +1 -1
- package/dist/types/methods/get-interface-context.mjs.map +1 -1
- package/dist/types/methods/get-interface-state.cjs.map +1 -1
- package/dist/types/methods/get-interface-state.d.cts +10 -3
- package/dist/types/methods/get-interface-state.d.cts.map +1 -1
- package/dist/types/methods/get-interface-state.d.mts +10 -3
- package/dist/types/methods/get-interface-state.d.mts.map +1 -1
- package/dist/types/methods/get-interface-state.mjs.map +1 -1
- package/dist/types/methods/get-locale.cjs.map +1 -1
- package/dist/types/methods/get-locale.d.cts +1 -5
- package/dist/types/methods/get-locale.d.cts.map +1 -1
- package/dist/types/methods/get-locale.d.mts +1 -5
- package/dist/types/methods/get-locale.d.mts.map +1 -1
- package/dist/types/methods/get-locale.mjs.map +1 -1
- package/dist/types/methods/get-preferences.cjs.map +1 -1
- package/dist/types/methods/get-preferences.d.cts +39 -17
- package/dist/types/methods/get-preferences.d.cts.map +1 -1
- package/dist/types/methods/get-preferences.d.mts +39 -17
- package/dist/types/methods/get-preferences.d.mts.map +1 -1
- package/dist/types/methods/get-preferences.mjs.map +1 -1
- package/dist/types/methods/get-snaps.cjs.map +1 -1
- package/dist/types/methods/get-snaps.d.cts +1 -5
- package/dist/types/methods/get-snaps.d.cts.map +1 -1
- package/dist/types/methods/get-snaps.d.mts +1 -5
- package/dist/types/methods/get-snaps.d.mts.map +1 -1
- package/dist/types/methods/get-snaps.mjs.map +1 -1
- package/dist/types/methods/get-state.cjs.map +1 -1
- package/dist/types/methods/get-state.d.cts +8 -3
- package/dist/types/methods/get-state.d.cts.map +1 -1
- package/dist/types/methods/get-state.d.mts +8 -3
- package/dist/types/methods/get-state.d.mts.map +1 -1
- package/dist/types/methods/get-state.mjs.map +1 -1
- package/dist/types/methods/get-web-sockets.cjs.map +1 -1
- package/dist/types/methods/get-web-sockets.d.cts +10 -3
- package/dist/types/methods/get-web-sockets.d.cts.map +1 -1
- package/dist/types/methods/get-web-sockets.d.mts +10 -3
- package/dist/types/methods/get-web-sockets.d.mts.map +1 -1
- package/dist/types/methods/get-web-sockets.mjs.map +1 -1
- package/dist/types/methods/index.cjs.map +1 -1
- package/dist/types/methods/index.d.cts +0 -2
- package/dist/types/methods/index.d.cts.map +1 -1
- package/dist/types/methods/index.d.mts +0 -2
- package/dist/types/methods/index.d.mts.map +1 -1
- package/dist/types/methods/index.mjs.map +1 -1
- package/dist/types/methods/invoke-keyring.cjs.map +1 -1
- package/dist/types/methods/invoke-keyring.d.cts +5 -4
- package/dist/types/methods/invoke-keyring.d.cts.map +1 -1
- package/dist/types/methods/invoke-keyring.d.mts +5 -4
- package/dist/types/methods/invoke-keyring.d.mts.map +1 -1
- package/dist/types/methods/invoke-keyring.mjs.map +1 -1
- package/dist/types/methods/invoke-snap.cjs.map +1 -1
- package/dist/types/methods/invoke-snap.d.cts +10 -6
- package/dist/types/methods/invoke-snap.d.cts.map +1 -1
- package/dist/types/methods/invoke-snap.d.mts +10 -6
- package/dist/types/methods/invoke-snap.d.mts.map +1 -1
- package/dist/types/methods/invoke-snap.mjs.map +1 -1
- package/dist/types/methods/list-entropy-sources.cjs.map +1 -1
- package/dist/types/methods/list-entropy-sources.d.cts +2 -2
- package/dist/types/methods/list-entropy-sources.d.mts +2 -2
- package/dist/types/methods/list-entropy-sources.mjs.map +1 -1
- package/dist/types/methods/manage-accounts.cjs.map +1 -1
- package/dist/types/methods/manage-accounts.d.cts +10 -9
- package/dist/types/methods/manage-accounts.d.cts.map +1 -1
- package/dist/types/methods/manage-accounts.d.mts +10 -9
- package/dist/types/methods/manage-accounts.d.mts.map +1 -1
- package/dist/types/methods/manage-accounts.mjs.map +1 -1
- package/dist/types/methods/manage-state.cjs.map +1 -1
- package/dist/types/methods/manage-state.d.cts +35 -32
- package/dist/types/methods/manage-state.d.cts.map +1 -1
- package/dist/types/methods/manage-state.d.mts +35 -32
- package/dist/types/methods/manage-state.d.mts.map +1 -1
- package/dist/types/methods/manage-state.mjs.map +1 -1
- package/dist/types/methods/methods.cjs.map +1 -1
- package/dist/types/methods/methods.d.cts +0 -2
- package/dist/types/methods/methods.d.cts.map +1 -1
- package/dist/types/methods/methods.d.mts +0 -2
- package/dist/types/methods/methods.d.mts.map +1 -1
- package/dist/types/methods/methods.mjs.map +1 -1
- package/dist/types/methods/notify.cjs.map +1 -1
- package/dist/types/methods/notify.d.cts +39 -7
- package/dist/types/methods/notify.d.cts.map +1 -1
- package/dist/types/methods/notify.d.mts +39 -7
- package/dist/types/methods/notify.d.mts.map +1 -1
- package/dist/types/methods/notify.mjs.map +1 -1
- package/dist/types/methods/open-web-socket.cjs.map +1 -1
- package/dist/types/methods/open-web-socket.d.cts +6 -3
- package/dist/types/methods/open-web-socket.d.cts.map +1 -1
- package/dist/types/methods/open-web-socket.d.mts +6 -3
- package/dist/types/methods/open-web-socket.d.mts.map +1 -1
- package/dist/types/methods/open-web-socket.mjs.map +1 -1
- package/dist/types/methods/request-snaps.cjs.map +1 -1
- package/dist/types/methods/request-snaps.d.cts +5 -6
- package/dist/types/methods/request-snaps.d.cts.map +1 -1
- package/dist/types/methods/request-snaps.d.mts +5 -6
- package/dist/types/methods/request-snaps.d.mts.map +1 -1
- package/dist/types/methods/request-snaps.mjs.map +1 -1
- package/dist/types/methods/resolve-interface.cjs.map +1 -1
- package/dist/types/methods/resolve-interface.d.cts +1 -1
- package/dist/types/methods/resolve-interface.d.mts +1 -1
- package/dist/types/methods/resolve-interface.mjs.map +1 -1
- package/dist/types/methods/schedule-background-event.cjs.map +1 -1
- package/dist/types/methods/schedule-background-event.d.cts +18 -8
- package/dist/types/methods/schedule-background-event.d.cts.map +1 -1
- package/dist/types/methods/schedule-background-event.d.mts +18 -8
- package/dist/types/methods/schedule-background-event.d.mts.map +1 -1
- package/dist/types/methods/schedule-background-event.mjs.map +1 -1
- package/dist/types/methods/send-web-socket-message.cjs.map +1 -1
- package/dist/types/methods/send-web-socket-message.d.cts +9 -5
- package/dist/types/methods/send-web-socket-message.d.cts.map +1 -1
- package/dist/types/methods/send-web-socket-message.d.mts +9 -5
- package/dist/types/methods/send-web-socket-message.d.mts.map +1 -1
- package/dist/types/methods/send-web-socket-message.mjs.map +1 -1
- package/dist/types/methods/set-state.cjs.map +1 -1
- package/dist/types/methods/set-state.d.cts +6 -2
- package/dist/types/methods/set-state.d.cts.map +1 -1
- package/dist/types/methods/set-state.d.mts +6 -2
- package/dist/types/methods/set-state.d.mts.map +1 -1
- package/dist/types/methods/set-state.mjs.map +1 -1
- package/dist/types/methods/update-interface.cjs.map +1 -1
- package/dist/types/methods/update-interface.d.cts +13 -5
- package/dist/types/methods/update-interface.d.cts.map +1 -1
- package/dist/types/methods/update-interface.d.mts +13 -5
- package/dist/types/methods/update-interface.d.mts.map +1 -1
- package/dist/types/methods/update-interface.mjs.map +1 -1
- package/dist/types/permissions.cjs.map +1 -1
- package/dist/types/permissions.d.cts +32 -2
- package/dist/types/permissions.d.cts.map +1 -1
- package/dist/types/permissions.d.mts +32 -2
- package/dist/types/permissions.d.mts.map +1 -1
- package/dist/types/permissions.mjs.map +1 -1
- package/dist/ui/components/address.cjs +1 -18
- package/dist/ui/components/address.cjs.map +1 -1
- package/dist/ui/components/address.d.cts +0 -28
- package/dist/ui/components/address.d.cts.map +1 -1
- package/dist/ui/components/address.d.mts +0 -28
- package/dist/ui/components/address.d.mts.map +1 -1
- package/dist/ui/components/address.mjs +0 -17
- package/dist/ui/components/address.mjs.map +1 -1
- package/dist/ui/components/button.cjs +1 -26
- package/dist/ui/components/button.cjs.map +1 -1
- package/dist/ui/components/button.d.cts +0 -42
- package/dist/ui/components/button.d.cts.map +1 -1
- package/dist/ui/components/button.d.mts +0 -42
- package/dist/ui/components/button.d.mts.map +1 -1
- package/dist/ui/components/button.mjs +0 -25
- package/dist/ui/components/button.mjs.map +1 -1
- package/dist/ui/components/copyable.cjs +1 -22
- package/dist/ui/components/copyable.cjs.map +1 -1
- package/dist/ui/components/copyable.d.cts +0 -38
- package/dist/ui/components/copyable.d.cts.map +1 -1
- package/dist/ui/components/copyable.d.mts +0 -38
- package/dist/ui/components/copyable.d.mts.map +1 -1
- package/dist/ui/components/copyable.mjs +0 -21
- package/dist/ui/components/copyable.mjs.map +1 -1
- package/dist/ui/components/divider.cjs +1 -12
- package/dist/ui/components/divider.cjs.map +1 -1
- package/dist/ui/components/divider.d.cts +0 -17
- package/dist/ui/components/divider.d.cts.map +1 -1
- package/dist/ui/components/divider.d.mts +0 -17
- package/dist/ui/components/divider.d.mts.map +1 -1
- package/dist/ui/components/divider.mjs +0 -11
- package/dist/ui/components/divider.mjs.map +1 -1
- package/dist/ui/components/form.cjs +1 -28
- package/dist/ui/components/form.cjs.map +1 -1
- package/dist/ui/components/form.d.cts +0 -86
- package/dist/ui/components/form.d.cts.map +1 -1
- package/dist/ui/components/form.d.mts +0 -86
- package/dist/ui/components/form.d.mts.map +1 -1
- package/dist/ui/components/form.mjs +0 -27
- package/dist/ui/components/form.mjs.map +1 -1
- package/dist/ui/components/heading.cjs +1 -18
- package/dist/ui/components/heading.cjs.map +1 -1
- package/dist/ui/components/heading.d.cts +0 -30
- package/dist/ui/components/heading.d.cts.map +1 -1
- package/dist/ui/components/heading.d.mts +0 -30
- package/dist/ui/components/heading.d.mts.map +1 -1
- package/dist/ui/components/heading.mjs +0 -17
- package/dist/ui/components/heading.mjs.map +1 -1
- package/dist/ui/components/image.cjs +1 -17
- package/dist/ui/components/image.cjs.map +1 -1
- package/dist/ui/components/image.d.cts +0 -29
- package/dist/ui/components/image.d.cts.map +1 -1
- package/dist/ui/components/image.d.mts +0 -29
- package/dist/ui/components/image.d.mts.map +1 -1
- package/dist/ui/components/image.mjs +0 -16
- package/dist/ui/components/image.mjs.map +1 -1
- package/dist/ui/components/index.cjs +2 -5
- package/dist/ui/components/index.cjs.map +1 -1
- package/dist/ui/components/index.d.cts +2 -3
- package/dist/ui/components/index.d.cts.map +1 -1
- package/dist/ui/components/index.d.mts +2 -3
- package/dist/ui/components/index.d.mts.map +1 -1
- package/dist/ui/components/index.mjs +2 -2
- package/dist/ui/components/index.mjs.map +1 -1
- package/dist/ui/components/input.cjs +1 -29
- package/dist/ui/components/input.cjs.map +1 -1
- package/dist/ui/components/input.d.cts +0 -50
- package/dist/ui/components/input.d.cts.map +1 -1
- package/dist/ui/components/input.d.mts +0 -50
- package/dist/ui/components/input.d.mts.map +1 -1
- package/dist/ui/components/input.mjs +0 -28
- package/dist/ui/components/input.mjs.map +1 -1
- package/dist/ui/components/panel.cjs +5 -27
- package/dist/ui/components/panel.cjs.map +1 -1
- package/dist/ui/components/panel.d.cts +0 -108
- package/dist/ui/components/panel.d.cts.map +1 -1
- package/dist/ui/components/panel.d.mts +0 -108
- package/dist/ui/components/panel.d.mts.map +1 -1
- package/dist/ui/components/panel.mjs +4 -26
- package/dist/ui/components/panel.mjs.map +1 -1
- package/dist/ui/components/row.cjs +1 -24
- package/dist/ui/components/row.cjs.map +1 -1
- package/dist/ui/components/row.d.cts +0 -69
- package/dist/ui/components/row.d.cts.map +1 -1
- package/dist/ui/components/row.d.mts +0 -69
- package/dist/ui/components/row.d.mts.map +1 -1
- package/dist/ui/components/row.mjs +0 -23
- package/dist/ui/components/row.mjs.map +1 -1
- package/dist/ui/components/spinner.cjs +1 -12
- package/dist/ui/components/spinner.cjs.map +1 -1
- package/dist/ui/components/spinner.d.cts +0 -18
- package/dist/ui/components/spinner.d.cts.map +1 -1
- package/dist/ui/components/spinner.d.mts +0 -18
- package/dist/ui/components/spinner.d.mts.map +1 -1
- package/dist/ui/components/spinner.mjs +0 -11
- package/dist/ui/components/spinner.mjs.map +1 -1
- package/dist/ui/components/text.cjs +1 -24
- package/dist/ui/components/text.cjs.map +1 -1
- package/dist/ui/components/text.d.cts +0 -38
- package/dist/ui/components/text.d.cts.map +1 -1
- package/dist/ui/components/text.d.mts +0 -38
- package/dist/ui/components/text.d.mts.map +1 -1
- package/dist/ui/components/text.mjs +0 -23
- package/dist/ui/components/text.mjs.map +1 -1
- package/dist/ui/index.cjs +0 -1
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +0 -1
- package/dist/ui/index.d.cts.map +1 -1
- package/dist/ui/index.d.mts +0 -1
- package/dist/ui/index.d.mts.map +1 -1
- package/dist/ui/index.mjs +0 -1
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +7 -4
- package/dist/types/methods/get-currency-rate.cjs +0 -3
- package/dist/types/methods/get-currency-rate.cjs.map +0 -1
- package/dist/types/methods/get-currency-rate.d.cts +0 -29
- package/dist/types/methods/get-currency-rate.d.cts.map +0 -1
- package/dist/types/methods/get-currency-rate.d.mts +0 -29
- package/dist/types/methods/get-currency-rate.d.mts.map +0 -1
- package/dist/types/methods/get-currency-rate.mjs +0 -2
- package/dist/types/methods/get-currency-rate.mjs.map +0 -1
- package/dist/types/methods/provider-request.cjs +0 -3
- package/dist/types/methods/provider-request.cjs.map +0 -1
- package/dist/types/methods/provider-request.d.cts +0 -25
- package/dist/types/methods/provider-request.d.cts.map +0 -1
- package/dist/types/methods/provider-request.d.mts +0 -25
- package/dist/types/methods/provider-request.d.mts.map +0 -1
- package/dist/types/methods/provider-request.mjs +0 -2
- package/dist/types/methods/provider-request.mjs.map +0 -1
- package/dist/ui/builder.cjs +0 -49
- package/dist/ui/builder.cjs.map +0 -1
- package/dist/ui/builder.d.cts +0 -43
- package/dist/ui/builder.d.cts.map +0 -1
- package/dist/ui/builder.d.mts +0 -43
- package/dist/ui/builder.d.mts.map +0 -1
- package/dist/ui/builder.mjs +0 -45
- package/dist/ui/builder.mjs.map +0 -1
- package/dist/ui/component.cjs +0 -29
- package/dist/ui/component.cjs.map +0 -1
- package/dist/ui/component.d.cts +0 -18
- package/dist/ui/component.d.cts.map +0 -1
- package/dist/ui/component.d.mts +0 -18
- package/dist/ui/component.d.mts.map +0 -1
- package/dist/ui/component.mjs +0 -24
- package/dist/ui/component.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.mjs","sourceRoot":"","sources":["../../../src/ui/components/image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.mjs","sourceRoot":"","sources":["../../../src/ui/components/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAEvD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,kCAAwB;AAC/C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,qBAAiB;AAEhD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAC/B,UAAU,EACV,MAAM,CAAC;IACL,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC7B,KAAK,EAAE,GAAG,EAAE;CACb,CAAC,CACH,CAAC","sourcesContent":["import { assign, object } from '@metamask/superstruct';\n\nimport { svg, literal } from '../../internals';\nimport { NodeStruct, NodeType } from '../nodes';\n\nexport const ImageStruct = assign(\n NodeStruct,\n object({\n type: literal(NodeType.Image),\n value: svg(),\n }),\n);\n"]}
|
|
@@ -14,17 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.PanelStruct = exports.
|
|
17
|
+
exports.PanelStruct = exports.ComponentStruct = void 0;
|
|
18
18
|
__exportStar(require("./address.cjs"), exports);
|
|
19
19
|
__exportStar(require("./copyable.cjs"), exports);
|
|
20
20
|
__exportStar(require("./divider.cjs"), exports);
|
|
21
21
|
__exportStar(require("./heading.cjs"), exports);
|
|
22
|
-
|
|
23
|
-
Object.defineProperty(exports, "image", { enumerable: true, get: function () { return image_1.image; } });
|
|
24
|
-
Object.defineProperty(exports, "ImageStruct", { enumerable: true, get: function () { return image_1.ImageStruct; } });
|
|
22
|
+
__exportStar(require("./image.cjs"), exports);
|
|
25
23
|
var panel_1 = require("./panel.cjs");
|
|
26
24
|
Object.defineProperty(exports, "ComponentStruct", { enumerable: true, get: function () { return panel_1.ComponentStruct; } });
|
|
27
|
-
Object.defineProperty(exports, "panel", { enumerable: true, get: function () { return panel_1.panel; } });
|
|
28
25
|
Object.defineProperty(exports, "PanelStruct", { enumerable: true, get: function () { return panel_1.PanelStruct; } });
|
|
29
26
|
__exportStar(require("./spinner.cjs"), exports);
|
|
30
27
|
__exportStar(require("./text.cjs"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,iDAA2B;AAC3B,gDAA0B;AAC1B,gDAA0B;
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,iDAA2B;AAC3B,gDAA0B;AAC1B,gDAA0B;AAC1B,8CAAwB;AAExB,qCAAuD;AAA9C,wGAAA,eAAe,OAAA;AAAE,oGAAA,WAAW,OAAA;AACrC,gDAA0B;AAC1B,6CAAuB;AACvB,4CAAsB;AACtB,+CAAyB;AACzB,8CAAwB;AACxB,6CAAuB","sourcesContent":["export * from './address';\nexport * from './copyable';\nexport * from './divider';\nexport * from './heading';\nexport * from './image';\nexport type { Component, Panel } from './panel';\nexport { ComponentStruct, PanelStruct } from './panel';\nexport * from './spinner';\nexport * from './text';\nexport * from './row';\nexport * from './button';\nexport * from './input';\nexport * from './form';\n"]}
|
|
@@ -2,10 +2,9 @@ export * from "./address.cjs";
|
|
|
2
2
|
export * from "./copyable.cjs";
|
|
3
3
|
export * from "./divider.cjs";
|
|
4
4
|
export * from "./heading.cjs";
|
|
5
|
-
export
|
|
6
|
-
export { image, ImageStruct } from "./image.cjs";
|
|
5
|
+
export * from "./image.cjs";
|
|
7
6
|
export type { Component, Panel } from "./panel.cjs";
|
|
8
|
-
export { ComponentStruct,
|
|
7
|
+
export { ComponentStruct, PanelStruct } from "./panel.cjs";
|
|
9
8
|
export * from "./spinner.cjs";
|
|
10
9
|
export * from "./text.cjs";
|
|
11
10
|
export * from "./row.cjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,+BAA2B;AAC3B,8BAA0B;AAC1B,8BAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,+BAA2B;AAC3B,8BAA0B;AAC1B,8BAA0B;AAC1B,4BAAwB;AACxB,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAgB;AAChD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAgB;AACvD,8BAA0B;AAC1B,2BAAuB;AACvB,0BAAsB;AACtB,6BAAyB;AACzB,4BAAwB;AACxB,2BAAuB"}
|
|
@@ -2,10 +2,9 @@ export * from "./address.mjs";
|
|
|
2
2
|
export * from "./copyable.mjs";
|
|
3
3
|
export * from "./divider.mjs";
|
|
4
4
|
export * from "./heading.mjs";
|
|
5
|
-
export
|
|
6
|
-
export { image, ImageStruct } from "./image.mjs";
|
|
5
|
+
export * from "./image.mjs";
|
|
7
6
|
export type { Component, Panel } from "./panel.mjs";
|
|
8
|
-
export { ComponentStruct,
|
|
7
|
+
export { ComponentStruct, PanelStruct } from "./panel.mjs";
|
|
9
8
|
export * from "./spinner.mjs";
|
|
10
9
|
export * from "./text.mjs";
|
|
11
10
|
export * from "./row.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,+BAA2B;AAC3B,8BAA0B;AAC1B,8BAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,+BAA2B;AAC3B,8BAA0B;AAC1B,8BAA0B;AAC1B,4BAAwB;AACxB,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAgB;AAChD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAgB;AACvD,8BAA0B;AAC1B,2BAAuB;AACvB,0BAAsB;AACtB,6BAAyB;AACzB,4BAAwB;AACxB,2BAAuB"}
|
|
@@ -2,8 +2,8 @@ export * from "./address.mjs";
|
|
|
2
2
|
export * from "./copyable.mjs";
|
|
3
3
|
export * from "./divider.mjs";
|
|
4
4
|
export * from "./heading.mjs";
|
|
5
|
-
export
|
|
6
|
-
export { ComponentStruct,
|
|
5
|
+
export * from "./image.mjs";
|
|
6
|
+
export { ComponentStruct, PanelStruct } from "./panel.mjs";
|
|
7
7
|
export * from "./spinner.mjs";
|
|
8
8
|
export * from "./text.mjs";
|
|
9
9
|
export * from "./row.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,+BAA2B;AAC3B,8BAA0B;AAC1B,8BAA0B;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,+BAA2B;AAC3B,8BAA0B;AAC1B,8BAA0B;AAC1B,4BAAwB;AAExB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAgB;AACvD,8BAA0B;AAC1B,2BAAuB;AACvB,0BAAsB;AACtB,6BAAyB;AACzB,4BAAwB;AACxB,2BAAuB","sourcesContent":["export * from './address';\nexport * from './copyable';\nexport * from './divider';\nexport * from './heading';\nexport * from './image';\nexport type { Component, Panel } from './panel';\nexport { ComponentStruct, PanelStruct } from './panel';\nexport * from './spinner';\nexport * from './text';\nexport * from './row';\nexport * from './button';\nexport * from './input';\nexport * from './form';\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.InputStruct = exports.InputType = void 0;
|
|
4
4
|
const superstruct_1 = require("@metamask/superstruct");
|
|
5
5
|
const internals_1 = require("../../internals/index.cjs");
|
|
6
|
-
const builder_1 = require("../builder.cjs");
|
|
7
6
|
const nodes_1 = require("../nodes.cjs");
|
|
8
7
|
/**
|
|
9
8
|
* This replicates the available input types from the metamask extension.
|
|
@@ -28,31 +27,4 @@ exports.InputStruct = (0, superstruct_1.assign)(nodes_1.LiteralStruct, (0, super
|
|
|
28
27
|
label: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
29
28
|
error: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
30
29
|
}));
|
|
31
|
-
/**
|
|
32
|
-
* Create a {@link Input} node.
|
|
33
|
-
*
|
|
34
|
-
* @param args - The node arguments. This can either be a name and an optional variant, value and placeholder or an object
|
|
35
|
-
* with the properties: `inputType`, `value`, `variant`, `placeholder` and `name`.
|
|
36
|
-
* @param args.name - The name for the input.
|
|
37
|
-
* @param args.value - The value of the input.
|
|
38
|
-
* @param args.inputType - An optional type, either `text`, `password` or `number`.
|
|
39
|
-
* @param args.placeholder - An optional input placeholder.
|
|
40
|
-
* @param args.label - An optional input label.
|
|
41
|
-
* @param args.error - An optional error text.
|
|
42
|
-
* @returns The input node as an object.
|
|
43
|
-
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
44
|
-
* components. This function will be removed in a future release.
|
|
45
|
-
* @example
|
|
46
|
-
* const node = input('myInput');
|
|
47
|
-
* const node = input('myInput', InputType.Text, 'my placeholder', 'myValue', 'myLabel');
|
|
48
|
-
* const node = input({ name: 'myInput' });
|
|
49
|
-
* const node = input({name: 'myInput', value: 'myValue', inputType: InputType.Password, placeholder: 'placeholder'})
|
|
50
|
-
*/
|
|
51
|
-
exports.input = (0, builder_1.createBuilder)(nodes_1.NodeType.Input, exports.InputStruct, [
|
|
52
|
-
'name',
|
|
53
|
-
'inputType',
|
|
54
|
-
'placeholder',
|
|
55
|
-
'value',
|
|
56
|
-
'label',
|
|
57
|
-
]);
|
|
58
30
|
//# sourceMappingURL=input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"input.cjs","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":";;;AAAA,uDAAgF;AAEhF,yDAAqD;AACrD,wCAAmD;AAEnD;;;GAGG;AACH,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;AACvB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAEY,QAAA,WAAW,GAAG,IAAA,oBAAM,EAC/B,qBAAa,EACb,IAAA,oBAAM,EAAC;IACL,IAAI,EAAE,IAAA,mBAAO,EAAC,gBAAQ,CAAC,KAAK,CAAC;IAC7B,KAAK,EAAE,IAAA,sBAAQ,EAAC,IAAA,oBAAM,GAAE,CAAC;IACzB,IAAI,EAAE,IAAA,oBAAM,GAAE;IACd,SAAS,EAAE,IAAA,sBAAQ,EACjB,IAAA,mBAAK,EAAC;QACJ,IAAA,qBAAS,EAAC,SAAS,CAAC,IAAI,CAAC;QACzB,IAAA,qBAAS,EAAC,SAAS,CAAC,QAAQ,CAAC;QAC7B,IAAA,qBAAS,EAAC,SAAS,CAAC,MAAM,CAAC;KAC5B,CAAC,CACH;IACD,WAAW,EAAE,IAAA,sBAAQ,EAAC,IAAA,oBAAM,GAAE,CAAC;IAC/B,KAAK,EAAE,IAAA,sBAAQ,EAAC,IAAA,oBAAM,GAAE,CAAC;IACzB,KAAK,EAAE,IAAA,sBAAQ,EAAC,IAAA,oBAAM,GAAE,CAAC;CAC1B,CAAC,CACH,CAAC","sourcesContent":["import { assign, object, optional, string, union } from '@metamask/superstruct';\n\nimport { enumValue, literal } from '../../internals';\nimport { LiteralStruct, NodeType } from '../nodes';\n\n/**\n * This replicates the available input types from the metamask extension.\n * https://github.com/MetaMask/metamask-extension/main/ui/components/component-library/input/input.constants.js\n */\nexport enum InputType {\n Text = 'text',\n Number = 'number',\n Password = 'password',\n}\n\nexport const InputStruct = assign(\n LiteralStruct,\n object({\n type: literal(NodeType.Input),\n value: optional(string()),\n name: string(),\n inputType: optional(\n union([\n enumValue(InputType.Text),\n enumValue(InputType.Password),\n enumValue(InputType.Number),\n ]),\n ),\n placeholder: optional(string()),\n label: optional(string()),\n error: optional(string()),\n }),\n);\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Infer } from "@metamask/superstruct";
|
|
2
1
|
import { NodeType } from "../nodes.cjs";
|
|
3
2
|
/**
|
|
4
3
|
* This replicates the available input types from the metamask extension.
|
|
@@ -26,53 +25,4 @@ export declare const InputStruct: import("@metamask/superstruct").Struct<{
|
|
|
26
25
|
label: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
27
26
|
error: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
28
27
|
}>;
|
|
29
|
-
/**
|
|
30
|
-
* An input node, that renders an input.
|
|
31
|
-
*
|
|
32
|
-
* @property type - The type of the node, must be the string 'input'.
|
|
33
|
-
* @property name - The name for the input.
|
|
34
|
-
* @property value - The value of the input.
|
|
35
|
-
* @property inputType - An optional type, either `text`, `password` or `number`.
|
|
36
|
-
* @property placeholder - An optional input placeholder.
|
|
37
|
-
* @property label - An optional input label.
|
|
38
|
-
* @property error - An optional error text.
|
|
39
|
-
*/
|
|
40
|
-
export type Input = Infer<typeof InputStruct>;
|
|
41
|
-
/**
|
|
42
|
-
* Create a {@link Input} node.
|
|
43
|
-
*
|
|
44
|
-
* @param args - The node arguments. This can either be a name and an optional variant, value and placeholder or an object
|
|
45
|
-
* with the properties: `inputType`, `value`, `variant`, `placeholder` and `name`.
|
|
46
|
-
* @param args.name - The name for the input.
|
|
47
|
-
* @param args.value - The value of the input.
|
|
48
|
-
* @param args.inputType - An optional type, either `text`, `password` or `number`.
|
|
49
|
-
* @param args.placeholder - An optional input placeholder.
|
|
50
|
-
* @param args.label - An optional input label.
|
|
51
|
-
* @param args.error - An optional error text.
|
|
52
|
-
* @returns The input node as an object.
|
|
53
|
-
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
54
|
-
* components. This function will be removed in a future release.
|
|
55
|
-
* @example
|
|
56
|
-
* const node = input('myInput');
|
|
57
|
-
* const node = input('myInput', InputType.Text, 'my placeholder', 'myValue', 'myLabel');
|
|
58
|
-
* const node = input({ name: 'myInput' });
|
|
59
|
-
* const node = input({name: 'myInput', value: 'myValue', inputType: InputType.Password, placeholder: 'placeholder'})
|
|
60
|
-
*/
|
|
61
|
-
export declare const input: (...args: (string | undefined)[] | [Omit<{
|
|
62
|
-
type: NodeType.Input;
|
|
63
|
-
name: string;
|
|
64
|
-
value?: string | undefined;
|
|
65
|
-
label?: string | undefined;
|
|
66
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
67
|
-
placeholder?: string | undefined;
|
|
68
|
-
error?: string | undefined;
|
|
69
|
-
}, "type">]) => {
|
|
70
|
-
type: NodeType.Input;
|
|
71
|
-
name: string;
|
|
72
|
-
value?: string | undefined;
|
|
73
|
-
label?: string | undefined;
|
|
74
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
75
|
-
placeholder?: string | undefined;
|
|
76
|
-
error?: string | undefined;
|
|
77
|
-
};
|
|
78
28
|
//# sourceMappingURL=input.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.cts","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.d.cts","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,QAAQ,EAAE,qBAAiB;AAEnD;;;GAGG;AACH,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAiBvB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Infer } from "@metamask/superstruct";
|
|
2
1
|
import { NodeType } from "../nodes.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* This replicates the available input types from the metamask extension.
|
|
@@ -26,53 +25,4 @@ export declare const InputStruct: import("@metamask/superstruct").Struct<{
|
|
|
26
25
|
label: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
27
26
|
error: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
28
27
|
}>;
|
|
29
|
-
/**
|
|
30
|
-
* An input node, that renders an input.
|
|
31
|
-
*
|
|
32
|
-
* @property type - The type of the node, must be the string 'input'.
|
|
33
|
-
* @property name - The name for the input.
|
|
34
|
-
* @property value - The value of the input.
|
|
35
|
-
* @property inputType - An optional type, either `text`, `password` or `number`.
|
|
36
|
-
* @property placeholder - An optional input placeholder.
|
|
37
|
-
* @property label - An optional input label.
|
|
38
|
-
* @property error - An optional error text.
|
|
39
|
-
*/
|
|
40
|
-
export type Input = Infer<typeof InputStruct>;
|
|
41
|
-
/**
|
|
42
|
-
* Create a {@link Input} node.
|
|
43
|
-
*
|
|
44
|
-
* @param args - The node arguments. This can either be a name and an optional variant, value and placeholder or an object
|
|
45
|
-
* with the properties: `inputType`, `value`, `variant`, `placeholder` and `name`.
|
|
46
|
-
* @param args.name - The name for the input.
|
|
47
|
-
* @param args.value - The value of the input.
|
|
48
|
-
* @param args.inputType - An optional type, either `text`, `password` or `number`.
|
|
49
|
-
* @param args.placeholder - An optional input placeholder.
|
|
50
|
-
* @param args.label - An optional input label.
|
|
51
|
-
* @param args.error - An optional error text.
|
|
52
|
-
* @returns The input node as an object.
|
|
53
|
-
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
54
|
-
* components. This function will be removed in a future release.
|
|
55
|
-
* @example
|
|
56
|
-
* const node = input('myInput');
|
|
57
|
-
* const node = input('myInput', InputType.Text, 'my placeholder', 'myValue', 'myLabel');
|
|
58
|
-
* const node = input({ name: 'myInput' });
|
|
59
|
-
* const node = input({name: 'myInput', value: 'myValue', inputType: InputType.Password, placeholder: 'placeholder'})
|
|
60
|
-
*/
|
|
61
|
-
export declare const input: (...args: (string | undefined)[] | [Omit<{
|
|
62
|
-
type: NodeType.Input;
|
|
63
|
-
name: string;
|
|
64
|
-
value?: string | undefined;
|
|
65
|
-
label?: string | undefined;
|
|
66
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
67
|
-
placeholder?: string | undefined;
|
|
68
|
-
error?: string | undefined;
|
|
69
|
-
}, "type">]) => {
|
|
70
|
-
type: NodeType.Input;
|
|
71
|
-
name: string;
|
|
72
|
-
value?: string | undefined;
|
|
73
|
-
label?: string | undefined;
|
|
74
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
75
|
-
placeholder?: string | undefined;
|
|
76
|
-
error?: string | undefined;
|
|
77
|
-
};
|
|
78
28
|
//# sourceMappingURL=input.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.mts","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.d.mts","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,QAAQ,EAAE,qBAAiB;AAEnD;;;GAGG;AACH,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAiBvB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { assign, object, optional, string, union } from "@metamask/superstruct";
|
|
2
2
|
import { enumValue, literal } from "../../internals/index.mjs";
|
|
3
|
-
import { createBuilder } from "../builder.mjs";
|
|
4
3
|
import { LiteralStruct, NodeType } from "../nodes.mjs";
|
|
5
4
|
/**
|
|
6
5
|
* This replicates the available input types from the metamask extension.
|
|
@@ -25,31 +24,4 @@ export const InputStruct = assign(LiteralStruct, object({
|
|
|
25
24
|
label: optional(string()),
|
|
26
25
|
error: optional(string()),
|
|
27
26
|
}));
|
|
28
|
-
/**
|
|
29
|
-
* Create a {@link Input} node.
|
|
30
|
-
*
|
|
31
|
-
* @param args - The node arguments. This can either be a name and an optional variant, value and placeholder or an object
|
|
32
|
-
* with the properties: `inputType`, `value`, `variant`, `placeholder` and `name`.
|
|
33
|
-
* @param args.name - The name for the input.
|
|
34
|
-
* @param args.value - The value of the input.
|
|
35
|
-
* @param args.inputType - An optional type, either `text`, `password` or `number`.
|
|
36
|
-
* @param args.placeholder - An optional input placeholder.
|
|
37
|
-
* @param args.label - An optional input label.
|
|
38
|
-
* @param args.error - An optional error text.
|
|
39
|
-
* @returns The input node as an object.
|
|
40
|
-
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
41
|
-
* components. This function will be removed in a future release.
|
|
42
|
-
* @example
|
|
43
|
-
* const node = input('myInput');
|
|
44
|
-
* const node = input('myInput', InputType.Text, 'my placeholder', 'myValue', 'myLabel');
|
|
45
|
-
* const node = input({ name: 'myInput' });
|
|
46
|
-
* const node = input({name: 'myInput', value: 'myValue', inputType: InputType.Password, placeholder: 'placeholder'})
|
|
47
|
-
*/
|
|
48
|
-
export const input = createBuilder(NodeType.Input, InputStruct, [
|
|
49
|
-
'name',
|
|
50
|
-
'inputType',
|
|
51
|
-
'placeholder',
|
|
52
|
-
'value',
|
|
53
|
-
'label',
|
|
54
|
-
]);
|
|
55
27
|
//# sourceMappingURL=input.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.mjs","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.mjs","sourceRoot":"","sources":["../../../src/ui/components/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,8BAA8B;AAEhF,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kCAAwB;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,qBAAiB;AAEnD;;;GAGG;AACH,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;AACvB,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAC/B,aAAa,EACb,MAAM,CAAC;IACL,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC7B,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,EAAE;IACd,SAAS,EAAE,QAAQ,CACjB,KAAK,CAAC;QACJ,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC;QACzB,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7B,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;KAC5B,CAAC,CACH;IACD,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC/B,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;CAC1B,CAAC,CACH,CAAC","sourcesContent":["import { assign, object, optional, string, union } from '@metamask/superstruct';\n\nimport { enumValue, literal } from '../../internals';\nimport { LiteralStruct, NodeType } from '../nodes';\n\n/**\n * This replicates the available input types from the metamask extension.\n * https://github.com/MetaMask/metamask-extension/main/ui/components/component-library/input/input.constants.js\n */\nexport enum InputType {\n Text = 'text',\n Number = 'number',\n Password = 'password',\n}\n\nexport const InputStruct = assign(\n LiteralStruct,\n object({\n type: literal(NodeType.Input),\n value: optional(string()),\n name: string(),\n inputType: optional(\n union([\n enumValue(InputType.Text),\n enumValue(InputType.Password),\n enumValue(InputType.Number),\n ]),\n ),\n placeholder: optional(string()),\n label: optional(string()),\n error: optional(string()),\n }),\n);\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComponentStruct = exports.
|
|
3
|
+
exports.ComponentStruct = exports.PanelStruct = exports.ParentStruct = void 0;
|
|
4
4
|
const superstruct_1 = require("@metamask/superstruct");
|
|
5
5
|
const address_1 = require("./address.cjs");
|
|
6
6
|
const button_1 = require("./button.cjs");
|
|
@@ -14,15 +14,17 @@ const row_1 = require("./row.cjs");
|
|
|
14
14
|
const spinner_1 = require("./spinner.cjs");
|
|
15
15
|
const text_1 = require("./text.cjs");
|
|
16
16
|
const internals_1 = require("../../internals/index.cjs");
|
|
17
|
-
const builder_1 = require("../builder.cjs");
|
|
18
17
|
const nodes_1 = require("../nodes.cjs");
|
|
19
18
|
/**
|
|
20
19
|
* @internal
|
|
21
20
|
*/
|
|
22
21
|
exports.ParentStruct = (0, superstruct_1.assign)(nodes_1.NodeStruct, (0, superstruct_1.object)({
|
|
23
22
|
// This node references itself indirectly, so we need to use `lazy()`.
|
|
23
|
+
children: (0, superstruct_1.array)((0, superstruct_1.lazy)(
|
|
24
|
+
/* istanbul ignore next */
|
|
25
|
+
() =>
|
|
24
26
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
25
|
-
|
|
27
|
+
exports.ComponentStruct)),
|
|
26
28
|
}));
|
|
27
29
|
/**
|
|
28
30
|
* @internal
|
|
@@ -30,30 +32,6 @@ exports.ParentStruct = (0, superstruct_1.assign)(nodes_1.NodeStruct, (0, superst
|
|
|
30
32
|
exports.PanelStruct = (0, superstruct_1.assign)(exports.ParentStruct, (0, superstruct_1.object)({
|
|
31
33
|
type: (0, internals_1.literal)(nodes_1.NodeType.Panel),
|
|
32
34
|
}));
|
|
33
|
-
/**
|
|
34
|
-
* Create a {@link Panel} node.
|
|
35
|
-
*
|
|
36
|
-
* @param args - The node arguments. This can be either an array of children, or
|
|
37
|
-
* an object with a `children` property.
|
|
38
|
-
* @param args.children - The child nodes of the panel. This can be any valid
|
|
39
|
-
* {@link Component}.
|
|
40
|
-
* @returns The panel node as object.
|
|
41
|
-
* @deprecated Snaps component functions are deprecated, in favor of the new JSX
|
|
42
|
-
* components. This function will be removed in a future release.
|
|
43
|
-
* @example
|
|
44
|
-
* const node = panel({
|
|
45
|
-
* children: [
|
|
46
|
-
* heading({ text: 'Hello, world!' }),
|
|
47
|
-
* text({ text: 'This is a panel.' }),
|
|
48
|
-
* ],
|
|
49
|
-
* });
|
|
50
|
-
*
|
|
51
|
-
* const node = panel([
|
|
52
|
-
* heading('Hello, world!'),
|
|
53
|
-
* text('This is a panel.'),
|
|
54
|
-
* ]);
|
|
55
|
-
*/
|
|
56
|
-
exports.panel = (0, builder_1.createBuilder)(nodes_1.NodeType.Panel, exports.PanelStruct, ['children']);
|
|
57
35
|
// This is defined separately from `Component` to avoid circular dependencies.
|
|
58
36
|
exports.ComponentStruct = (0, internals_1.typedUnion)([
|
|
59
37
|
copyable_1.CopyableStruct,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.cjs","sourceRoot":"","sources":["../../../src/ui/components/panel.ts"],"names":[],"mappings":";;;AACA,uDAAoE;AAEpE,2CAA0C;AAC1C,yCAAwC;AACxC,6CAA4C;AAC5C,2CAA0C;AAC1C,qCAAoC;AACpC,2CAA0C;AAC1C,uCAAsC;AACtC,uCAAsC;AACtC,mCAAkC;AAClC,2CAA0C;AAC1C,qCAAoC;AACpC,yDAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"panel.cjs","sourceRoot":"","sources":["../../../src/ui/components/panel.ts"],"names":[],"mappings":";;;AACA,uDAAoE;AAEpE,2CAA0C;AAC1C,yCAAwC;AACxC,6CAA4C;AAC5C,2CAA0C;AAC1C,qCAAoC;AACpC,2CAA0C;AAC1C,uCAAsC;AACtC,uCAAsC;AACtC,mCAAkC;AAClC,2CAA0C;AAC1C,qCAAoC;AACpC,yDAAsD;AACtD,wCAAgD;AAEhD;;GAEG;AACU,QAAA,YAAY,GAAG,IAAA,oBAAM,EAChC,kBAAU,EACV,IAAA,oBAAM,EAAC;IACL,sEAAsE;IACtE,QAAQ,EAAE,IAAA,mBAAK,EACb,IAAA,kBAAI;IACF,0BAA0B;IAC1B,GAAG,EAAE;IACH,mEAAmE;IACnE,uBAAe,CAClB,CACF;CACF,CAAC,CACH,CAAC;AAEF;;GAEG;AACU,QAAA,WAAW,GAAkB,IAAA,oBAAM,EAC9C,oBAAY,EACZ,IAAA,oBAAM,EAAC;IACL,IAAI,EAAE,IAAA,mBAAO,EAAC,gBAAQ,CAAC,KAAK,CAAC;CAC9B,CAAC,CACH,CAAC;AAQF,8EAA8E;AACjE,QAAA,eAAe,GAAG,IAAA,sBAAU,EAAC;IACxC,yBAAc;IACd,uBAAa;IACb,uBAAa;IACb,mBAAW;IACX,mBAAW;IACX,uBAAa;IACb,iBAAU;IACV,eAAS;IACT,uBAAa;IACb,mBAAW;IACX,iBAAU;IACV,qBAAY;CACb,CAAC,CAAC","sourcesContent":["import type { Infer, Struct } from '@metamask/superstruct';\nimport { array, assign, lazy, object } from '@metamask/superstruct';\n\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';\nimport { typedUnion, literal } from '../../internals';\nimport { NodeStruct, NodeType } from '../nodes';\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 children: array(\n lazy(\n /* istanbul ignore next */\n () =>\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n ComponentStruct,\n ),\n ),\n }),\n);\n\n/**\n * @internal\n */\nexport const PanelStruct: Struct<Panel> = assign(\n ParentStruct,\n object({\n type: literal(NodeType.Panel),\n }),\n);\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// 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"]}
|
|
@@ -214,122 +214,14 @@ export declare const ParentStruct: Struct<{
|
|
|
214
214
|
}, null>>;
|
|
215
215
|
type: Struct<string, null>;
|
|
216
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
217
|
/**
|
|
227
218
|
* @internal
|
|
228
219
|
*/
|
|
229
220
|
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
221
|
export type Panel = {
|
|
238
222
|
type: NodeType.Panel;
|
|
239
223
|
children: Component[];
|
|
240
224
|
};
|
|
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
|
-
value: string;
|
|
266
|
-
type: NodeType.Copyable;
|
|
267
|
-
sensitive?: boolean | undefined;
|
|
268
|
-
} | {
|
|
269
|
-
type: NodeType.Divider;
|
|
270
|
-
} | {
|
|
271
|
-
value: string;
|
|
272
|
-
type: NodeType.Heading;
|
|
273
|
-
} | {
|
|
274
|
-
value: string;
|
|
275
|
-
type: NodeType.Image;
|
|
276
|
-
} | Panel | {
|
|
277
|
-
type: NodeType.Spinner;
|
|
278
|
-
} | {
|
|
279
|
-
value: string;
|
|
280
|
-
type: NodeType.Text;
|
|
281
|
-
markdown?: boolean | undefined;
|
|
282
|
-
} | {
|
|
283
|
-
value: `0x${string}`;
|
|
284
|
-
type: NodeType.Address;
|
|
285
|
-
} | {
|
|
286
|
-
value: {
|
|
287
|
-
value: string;
|
|
288
|
-
type: NodeType.Image;
|
|
289
|
-
} | {
|
|
290
|
-
value: string;
|
|
291
|
-
type: NodeType.Text;
|
|
292
|
-
markdown?: boolean | undefined;
|
|
293
|
-
} | {
|
|
294
|
-
value: `0x${string}`;
|
|
295
|
-
type: NodeType.Address;
|
|
296
|
-
};
|
|
297
|
-
type: NodeType.Row;
|
|
298
|
-
label: string;
|
|
299
|
-
variant?: "default" | "critical" | "warning" | undefined;
|
|
300
|
-
} | {
|
|
301
|
-
type: NodeType.Input;
|
|
302
|
-
name: string;
|
|
303
|
-
value?: string | undefined;
|
|
304
|
-
label?: string | undefined;
|
|
305
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
306
|
-
placeholder?: string | undefined;
|
|
307
|
-
error?: string | undefined;
|
|
308
|
-
} | {
|
|
309
|
-
value: string;
|
|
310
|
-
type: NodeType.Button;
|
|
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
|
-
value?: string | undefined;
|
|
321
|
-
label?: string | undefined;
|
|
322
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
323
|
-
placeholder?: string | undefined;
|
|
324
|
-
error?: string | undefined;
|
|
325
|
-
} | {
|
|
326
|
-
value: string;
|
|
327
|
-
type: NodeType.Button;
|
|
328
|
-
variant?: "primary" | "secondary" | undefined;
|
|
329
|
-
name?: string | undefined;
|
|
330
|
-
buttonType?: "button" | "submit" | undefined;
|
|
331
|
-
})[];
|
|
332
|
-
})[][]) => Panel;
|
|
333
225
|
export declare const ComponentStruct: Struct<{
|
|
334
226
|
value: string;
|
|
335
227
|
type: NodeType.Copyable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.cts","sourceRoot":"","sources":["../../../src/ui/components/panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;
|
|
1
|
+
{"version":3,"file":"panel.d.cts","sourceRoot":"","sources":["../../../src/ui/components/panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAe3D,OAAO,EAAc,QAAQ,EAAE,qBAAiB;AAEhD;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,KAAK,CAKrC,CAAC;AAGF,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC;IACrB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAa1B,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|