@tenstorrent/vesper 0.1.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/LICENSE +21 -0
- package/README.md +167 -0
- package/dist/components/accordion/accordion.css +1 -0
- package/dist/components/accordion/accordion.d.ts +33 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +30 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/admonition/admonition.css +1 -0
- package/dist/components/admonition/admonition.d.ts +49 -0
- package/dist/components/admonition/admonition.d.ts.map +1 -0
- package/dist/components/admonition/admonition.js +47 -0
- package/dist/components/admonition/admonition.js.map +1 -0
- package/dist/components/avatar/avatar.css +1 -0
- package/dist/components/avatar/avatar.d.ts +30 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +24 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar-group/avatar-group.css +1 -0
- package/dist/components/avatar-group/avatar-group.d.ts +36 -0
- package/dist/components/avatar-group/avatar-group.d.ts.map +1 -0
- package/dist/components/avatar-group/avatar-group.js +30 -0
- package/dist/components/avatar-group/avatar-group.js.map +1 -0
- package/dist/components/badge/badge.css +1 -0
- package/dist/components/badge/badge.d.ts +42 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +49 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/button/button.css +1 -0
- package/dist/components/button/button.d.ts +51 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +49 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/checkbox/checkbox.css +1 -0
- package/dist/components/checkbox/checkbox.d.ts +53 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +65 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/chip/chip.css +1 -0
- package/dist/components/chip/chip.d.ts +53 -0
- package/dist/components/chip/chip.d.ts.map +1 -0
- package/dist/components/chip/chip.js +51 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/choicebox/choicebox.css +1 -0
- package/dist/components/choicebox/choicebox.d.ts +90 -0
- package/dist/components/choicebox/choicebox.d.ts.map +1 -0
- package/dist/components/choicebox/choicebox.js +131 -0
- package/dist/components/choicebox/choicebox.js.map +1 -0
- package/dist/components/code/code.css +1 -0
- package/dist/components/code/code.d.ts +23 -0
- package/dist/components/code/code.d.ts.map +1 -0
- package/dist/components/code/code.js +23 -0
- package/dist/components/code/code.js.map +1 -0
- package/dist/components/code-block/code-block.css +1 -0
- package/dist/components/code-block/code-block.d.ts +48 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +36 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/components.d.ts +4 -0
- package/dist/components/code-block/components.d.ts.map +1 -0
- package/dist/components/code-block/components.js +27 -0
- package/dist/components/code-block/components.js.map +1 -0
- package/dist/components/code-block/fixtures.d.ts +12 -0
- package/dist/components/code-block/fixtures.d.ts.map +1 -0
- package/dist/components/code-block/fixtures.js +491 -0
- package/dist/components/code-block/fixtures.js.map +1 -0
- package/dist/components/code-block/streaming-code-block.d.ts +5 -0
- package/dist/components/code-block/streaming-code-block.d.ts.map +1 -0
- package/dist/components/code-block/streaming-code-block.js +92 -0
- package/dist/components/code-block/streaming-code-block.js.map +1 -0
- package/dist/components/code-block/themes.d.ts +16 -0
- package/dist/components/code-block/themes.d.ts.map +1 -0
- package/dist/components/code-block/themes.js +2836 -0
- package/dist/components/code-block/themes.js.map +1 -0
- package/dist/components/code-block/utils.d.ts +7 -0
- package/dist/components/code-block/utils.d.ts.map +1 -0
- package/dist/components/code-block/utils.js +42 -0
- package/dist/components/code-block/utils.js.map +1 -0
- package/dist/components/combobox/combobox.css +1 -0
- package/dist/components/combobox/combobox.d.ts +106 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.js +93 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/form-input-message/form-input-message.css +1 -0
- package/dist/components/form-input-message/form-input-message.d.ts +35 -0
- package/dist/components/form-input-message/form-input-message.d.ts.map +1 -0
- package/dist/components/form-input-message/form-input-message.js +38 -0
- package/dist/components/form-input-message/form-input-message.js.map +1 -0
- package/dist/components/icon-button/icon-button.css +1 -0
- package/dist/components/icon-button/icon-button.d.ts +38 -0
- package/dist/components/icon-button/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button/icon-button.js +31 -0
- package/dist/components/icon-button/icon-button.js.map +1 -0
- package/dist/components/icons/add.d.ts +3 -0
- package/dist/components/icons/add.d.ts.map +1 -0
- package/dist/components/icons/add.js +5 -0
- package/dist/components/icons/add.js.map +1 -0
- package/dist/components/icons/ai-agent-solid.d.ts +3 -0
- package/dist/components/icons/ai-agent-solid.d.ts.map +1 -0
- package/dist/components/icons/ai-agent-solid.js +5 -0
- package/dist/components/icons/ai-agent-solid.js.map +1 -0
- package/dist/components/icons/ai-agent.d.ts +3 -0
- package/dist/components/icons/ai-agent.d.ts.map +1 -0
- package/dist/components/icons/ai-agent.js +5 -0
- package/dist/components/icons/ai-agent.js.map +1 -0
- package/dist/components/icons/ai-data.d.ts +3 -0
- package/dist/components/icons/ai-data.d.ts.map +1 -0
- package/dist/components/icons/ai-data.js +5 -0
- package/dist/components/icons/ai-data.js.map +1 -0
- package/dist/components/icons/ai-model.d.ts +3 -0
- package/dist/components/icons/ai-model.d.ts.map +1 -0
- package/dist/components/icons/ai-model.js +5 -0
- package/dist/components/icons/ai-model.js.map +1 -0
- package/dist/components/icons/ai-task.d.ts +3 -0
- package/dist/components/icons/ai-task.d.ts.map +1 -0
- package/dist/components/icons/ai-task.js +5 -0
- package/dist/components/icons/ai-task.js.map +1 -0
- package/dist/components/icons/ai-video-gen.d.ts +3 -0
- package/dist/components/icons/ai-video-gen.d.ts.map +1 -0
- package/dist/components/icons/ai-video-gen.js +5 -0
- package/dist/components/icons/ai-video-gen.js.map +1 -0
- package/dist/components/icons/ai.d.ts +3 -0
- package/dist/components/icons/ai.d.ts.map +1 -0
- package/dist/components/icons/ai.js +5 -0
- package/dist/components/icons/ai.js.map +1 -0
- package/dist/components/icons/arrow-down.d.ts +3 -0
- package/dist/components/icons/arrow-down.d.ts.map +1 -0
- package/dist/components/icons/arrow-down.js +5 -0
- package/dist/components/icons/arrow-down.js.map +1 -0
- package/dist/components/icons/arrow-left.d.ts +3 -0
- package/dist/components/icons/arrow-left.d.ts.map +1 -0
- package/dist/components/icons/arrow-left.js +5 -0
- package/dist/components/icons/arrow-left.js.map +1 -0
- package/dist/components/icons/arrow-right.d.ts +3 -0
- package/dist/components/icons/arrow-right.d.ts.map +1 -0
- package/dist/components/icons/arrow-right.js +5 -0
- package/dist/components/icons/arrow-right.js.map +1 -0
- package/dist/components/icons/arrow-up-left.d.ts +3 -0
- package/dist/components/icons/arrow-up-left.d.ts.map +1 -0
- package/dist/components/icons/arrow-up-left.js +5 -0
- package/dist/components/icons/arrow-up-left.js.map +1 -0
- package/dist/components/icons/arrow-up-right.d.ts +3 -0
- package/dist/components/icons/arrow-up-right.d.ts.map +1 -0
- package/dist/components/icons/arrow-up-right.js +5 -0
- package/dist/components/icons/arrow-up-right.js.map +1 -0
- package/dist/components/icons/arrow-up.d.ts +3 -0
- package/dist/components/icons/arrow-up.d.ts.map +1 -0
- package/dist/components/icons/arrow-up.js +5 -0
- package/dist/components/icons/arrow-up.js.map +1 -0
- package/dist/components/icons/auto.d.ts +3 -0
- package/dist/components/icons/auto.d.ts.map +1 -0
- package/dist/components/icons/auto.js +5 -0
- package/dist/components/icons/auto.js.map +1 -0
- package/dist/components/icons/blackhole.d.ts +3 -0
- package/dist/components/icons/blackhole.d.ts.map +1 -0
- package/dist/components/icons/blackhole.js +5 -0
- package/dist/components/icons/blackhole.js.map +1 -0
- package/dist/components/icons/board.d.ts +3 -0
- package/dist/components/icons/board.d.ts.map +1 -0
- package/dist/components/icons/board.js +5 -0
- package/dist/components/icons/board.js.map +1 -0
- package/dist/components/icons/bolt.d.ts +3 -0
- package/dist/components/icons/bolt.d.ts.map +1 -0
- package/dist/components/icons/bolt.js +5 -0
- package/dist/components/icons/bolt.js.map +1 -0
- package/dist/components/icons/bug.d.ts +3 -0
- package/dist/components/icons/bug.d.ts.map +1 -0
- package/dist/components/icons/bug.js +5 -0
- package/dist/components/icons/bug.js.map +1 -0
- package/dist/components/icons/caret-down.d.ts +3 -0
- package/dist/components/icons/caret-down.d.ts.map +1 -0
- package/dist/components/icons/caret-down.js +5 -0
- package/dist/components/icons/caret-down.js.map +1 -0
- package/dist/components/icons/caret-left.d.ts +3 -0
- package/dist/components/icons/caret-left.d.ts.map +1 -0
- package/dist/components/icons/caret-left.js +5 -0
- package/dist/components/icons/caret-left.js.map +1 -0
- package/dist/components/icons/caret-right.d.ts +3 -0
- package/dist/components/icons/caret-right.d.ts.map +1 -0
- package/dist/components/icons/caret-right.js +5 -0
- package/dist/components/icons/caret-right.js.map +1 -0
- package/dist/components/icons/caret-up.d.ts +3 -0
- package/dist/components/icons/caret-up.d.ts.map +1 -0
- package/dist/components/icons/caret-up.js +5 -0
- package/dist/components/icons/caret-up.js.map +1 -0
- package/dist/components/icons/cart.d.ts +3 -0
- package/dist/components/icons/cart.d.ts.map +1 -0
- package/dist/components/icons/cart.js +5 -0
- package/dist/components/icons/cart.js.map +1 -0
- package/dist/components/icons/chat-solid.d.ts +3 -0
- package/dist/components/icons/chat-solid.d.ts.map +1 -0
- package/dist/components/icons/chat-solid.js +5 -0
- package/dist/components/icons/chat-solid.js.map +1 -0
- package/dist/components/icons/chat.d.ts +3 -0
- package/dist/components/icons/chat.d.ts.map +1 -0
- package/dist/components/icons/chat.js +5 -0
- package/dist/components/icons/chat.js.map +1 -0
- package/dist/components/icons/checkmark.d.ts +3 -0
- package/dist/components/icons/checkmark.d.ts.map +1 -0
- package/dist/components/icons/checkmark.js +5 -0
- package/dist/components/icons/checkmark.js.map +1 -0
- package/dist/components/icons/chip.d.ts +3 -0
- package/dist/components/icons/chip.d.ts.map +1 -0
- package/dist/components/icons/chip.js +5 -0
- package/dist/components/icons/chip.js.map +1 -0
- package/dist/components/icons/circle-add-solid.d.ts +3 -0
- package/dist/components/icons/circle-add-solid.d.ts.map +1 -0
- package/dist/components/icons/circle-add-solid.js +5 -0
- package/dist/components/icons/circle-add-solid.js.map +1 -0
- package/dist/components/icons/circle-add.d.ts +3 -0
- package/dist/components/icons/circle-add.d.ts.map +1 -0
- package/dist/components/icons/circle-add.js +5 -0
- package/dist/components/icons/circle-add.js.map +1 -0
- package/dist/components/icons/circle-x-solid.d.ts +3 -0
- package/dist/components/icons/circle-x-solid.d.ts.map +1 -0
- package/dist/components/icons/circle-x-solid.js +5 -0
- package/dist/components/icons/circle-x-solid.js.map +1 -0
- package/dist/components/icons/circle-x.d.ts +3 -0
- package/dist/components/icons/circle-x.d.ts.map +1 -0
- package/dist/components/icons/circle-x.js +5 -0
- package/dist/components/icons/circle-x.js.map +1 -0
- package/dist/components/icons/clock-countdown.d.ts +3 -0
- package/dist/components/icons/clock-countdown.d.ts.map +1 -0
- package/dist/components/icons/clock-countdown.js +5 -0
- package/dist/components/icons/clock-countdown.js.map +1 -0
- package/dist/components/icons/clock-counter-clockwise.d.ts +3 -0
- package/dist/components/icons/clock-counter-clockwise.d.ts.map +1 -0
- package/dist/components/icons/clock-counter-clockwise.js +5 -0
- package/dist/components/icons/clock-counter-clockwise.js.map +1 -0
- package/dist/components/icons/clock.d.ts +3 -0
- package/dist/components/icons/clock.d.ts.map +1 -0
- package/dist/components/icons/clock.js +5 -0
- package/dist/components/icons/clock.js.map +1 -0
- package/dist/components/icons/close-panel.d.ts +3 -0
- package/dist/components/icons/close-panel.d.ts.map +1 -0
- package/dist/components/icons/close-panel.js +5 -0
- package/dist/components/icons/close-panel.js.map +1 -0
- package/dist/components/icons/close.d.ts +3 -0
- package/dist/components/icons/close.d.ts.map +1 -0
- package/dist/components/icons/close.js +5 -0
- package/dist/components/icons/close.js.map +1 -0
- package/dist/components/icons/cloud-server-solid.d.ts +3 -0
- package/dist/components/icons/cloud-server-solid.d.ts.map +1 -0
- package/dist/components/icons/cloud-server-solid.js +5 -0
- package/dist/components/icons/cloud-server-solid.js.map +1 -0
- package/dist/components/icons/cloud-server.d.ts +3 -0
- package/dist/components/icons/cloud-server.d.ts.map +1 -0
- package/dist/components/icons/cloud-server.js +5 -0
- package/dist/components/icons/cloud-server.js.map +1 -0
- package/dist/components/icons/constants.d.ts +3 -0
- package/dist/components/icons/constants.d.ts.map +1 -0
- package/dist/components/icons/constants.js +137 -0
- package/dist/components/icons/constants.js.map +1 -0
- package/dist/components/icons/copy.d.ts +3 -0
- package/dist/components/icons/copy.d.ts.map +1 -0
- package/dist/components/icons/copy.js +5 -0
- package/dist/components/icons/copy.js.map +1 -0
- package/dist/components/icons/document-solid.d.ts +3 -0
- package/dist/components/icons/document-solid.d.ts.map +1 -0
- package/dist/components/icons/document-solid.js +5 -0
- package/dist/components/icons/document-solid.js.map +1 -0
- package/dist/components/icons/document.d.ts +3 -0
- package/dist/components/icons/document.d.ts.map +1 -0
- package/dist/components/icons/document.js +5 -0
- package/dist/components/icons/document.js.map +1 -0
- package/dist/components/icons/download.d.ts +3 -0
- package/dist/components/icons/download.d.ts.map +1 -0
- package/dist/components/icons/download.js +5 -0
- package/dist/components/icons/download.js.map +1 -0
- package/dist/components/icons/ellipses.d.ts +3 -0
- package/dist/components/icons/ellipses.d.ts.map +1 -0
- package/dist/components/icons/ellipses.js +5 -0
- package/dist/components/icons/ellipses.js.map +1 -0
- package/dist/components/icons/error-solid.d.ts +3 -0
- package/dist/components/icons/error-solid.d.ts.map +1 -0
- package/dist/components/icons/error-solid.js +5 -0
- package/dist/components/icons/error-solid.js.map +1 -0
- package/dist/components/icons/error.d.ts +3 -0
- package/dist/components/icons/error.d.ts.map +1 -0
- package/dist/components/icons/error.js +5 -0
- package/dist/components/icons/error.js.map +1 -0
- package/dist/components/icons/eye-slash.d.ts +3 -0
- package/dist/components/icons/eye-slash.d.ts.map +1 -0
- package/dist/components/icons/eye-slash.js +5 -0
- package/dist/components/icons/eye-slash.js.map +1 -0
- package/dist/components/icons/eye.d.ts +3 -0
- package/dist/components/icons/eye.d.ts.map +1 -0
- package/dist/components/icons/eye.js +5 -0
- package/dist/components/icons/eye.js.map +1 -0
- package/dist/components/icons/folder.d.ts +3 -0
- package/dist/components/icons/folder.d.ts.map +1 -0
- package/dist/components/icons/folder.js +5 -0
- package/dist/components/icons/folder.js.map +1 -0
- package/dist/components/icons/galaxy-rack.d.ts +3 -0
- package/dist/components/icons/galaxy-rack.d.ts.map +1 -0
- package/dist/components/icons/galaxy-rack.js +5 -0
- package/dist/components/icons/galaxy-rack.js.map +1 -0
- package/dist/components/icons/galaxy.d.ts +3 -0
- package/dist/components/icons/galaxy.d.ts.map +1 -0
- package/dist/components/icons/galaxy.js +5 -0
- package/dist/components/icons/galaxy.js.map +1 -0
- package/dist/components/icons/gear-solid.d.ts +3 -0
- package/dist/components/icons/gear-solid.d.ts.map +1 -0
- package/dist/components/icons/gear-solid.js +5 -0
- package/dist/components/icons/gear-solid.js.map +1 -0
- package/dist/components/icons/gear.d.ts +3 -0
- package/dist/components/icons/gear.d.ts.map +1 -0
- package/dist/components/icons/gear.js +5 -0
- package/dist/components/icons/gear.js.map +1 -0
- package/dist/components/icons/globe.d.ts +3 -0
- package/dist/components/icons/globe.d.ts.map +1 -0
- package/dist/components/icons/globe.js +5 -0
- package/dist/components/icons/globe.js.map +1 -0
- package/dist/components/icons/grid.d.ts +3 -0
- package/dist/components/icons/grid.d.ts.map +1 -0
- package/dist/components/icons/grid.js +5 -0
- package/dist/components/icons/grid.js.map +1 -0
- package/dist/components/icons/icon.d.ts +7 -0
- package/dist/components/icons/icon.d.ts.map +1 -0
- package/dist/components/icons/icon.js +9 -0
- package/dist/components/icons/icon.js.map +1 -0
- package/dist/components/icons/icons.d.ts +131 -0
- package/dist/components/icons/icons.d.ts.map +1 -0
- package/dist/components/icons/icons.js +137 -0
- package/dist/components/icons/icons.js.map +1 -0
- package/dist/components/icons/info-solid.d.ts +3 -0
- package/dist/components/icons/info-solid.d.ts.map +1 -0
- package/dist/components/icons/info-solid.js +5 -0
- package/dist/components/icons/info-solid.js.map +1 -0
- package/dist/components/icons/info.d.ts +3 -0
- package/dist/components/icons/info.d.ts.map +1 -0
- package/dist/components/icons/info.js +5 -0
- package/dist/components/icons/info.js.map +1 -0
- package/dist/components/icons/link.d.ts +3 -0
- package/dist/components/icons/link.d.ts.map +1 -0
- package/dist/components/icons/link.js +5 -0
- package/dist/components/icons/link.js.map +1 -0
- package/dist/components/icons/list.d.ts +3 -0
- package/dist/components/icons/list.d.ts.map +1 -0
- package/dist/components/icons/list.js +5 -0
- package/dist/components/icons/list.js.map +1 -0
- package/dist/components/icons/location.d.ts +3 -0
- package/dist/components/icons/location.d.ts.map +1 -0
- package/dist/components/icons/location.js +5 -0
- package/dist/components/icons/location.js.map +1 -0
- package/dist/components/icons/lock-fill.d.ts +3 -0
- package/dist/components/icons/lock-fill.d.ts.map +1 -0
- package/dist/components/icons/lock-fill.js +5 -0
- package/dist/components/icons/lock-fill.js.map +1 -0
- package/dist/components/icons/lock.d.ts +3 -0
- package/dist/components/icons/lock.d.ts.map +1 -0
- package/dist/components/icons/lock.js +5 -0
- package/dist/components/icons/lock.js.map +1 -0
- package/dist/components/icons/loudbox.d.ts +3 -0
- package/dist/components/icons/loudbox.d.ts.map +1 -0
- package/dist/components/icons/loudbox.js +5 -0
- package/dist/components/icons/loudbox.js.map +1 -0
- package/dist/components/icons/menu.d.ts +3 -0
- package/dist/components/icons/menu.d.ts.map +1 -0
- package/dist/components/icons/menu.js +5 -0
- package/dist/components/icons/menu.js.map +1 -0
- package/dist/components/icons/microphone.d.ts +3 -0
- package/dist/components/icons/microphone.d.ts.map +1 -0
- package/dist/components/icons/microphone.js +5 -0
- package/dist/components/icons/microphone.js.map +1 -0
- package/dist/components/icons/minus.d.ts +3 -0
- package/dist/components/icons/minus.d.ts.map +1 -0
- package/dist/components/icons/minus.js +5 -0
- package/dist/components/icons/minus.js.map +1 -0
- package/dist/components/icons/mode-dark.d.ts +3 -0
- package/dist/components/icons/mode-dark.d.ts.map +1 -0
- package/dist/components/icons/mode-dark.js +5 -0
- package/dist/components/icons/mode-dark.js.map +1 -0
- package/dist/components/icons/mode-light.d.ts +3 -0
- package/dist/components/icons/mode-light.d.ts.map +1 -0
- package/dist/components/icons/mode-light.js +5 -0
- package/dist/components/icons/mode-light.js.map +1 -0
- package/dist/components/icons/mode-system.d.ts +3 -0
- package/dist/components/icons/mode-system.d.ts.map +1 -0
- package/dist/components/icons/mode-system.js +5 -0
- package/dist/components/icons/mode-system.js.map +1 -0
- package/dist/components/icons/model-deepseek-color.d.ts +3 -0
- package/dist/components/icons/model-deepseek-color.d.ts.map +1 -0
- package/dist/components/icons/model-deepseek-color.js +5 -0
- package/dist/components/icons/model-deepseek-color.js.map +1 -0
- package/dist/components/icons/model-deepseek.d.ts +3 -0
- package/dist/components/icons/model-deepseek.d.ts.map +1 -0
- package/dist/components/icons/model-deepseek.js +5 -0
- package/dist/components/icons/model-deepseek.js.map +1 -0
- package/dist/components/icons/model-falcon-color.d.ts +3 -0
- package/dist/components/icons/model-falcon-color.d.ts.map +1 -0
- package/dist/components/icons/model-falcon-color.js +5 -0
- package/dist/components/icons/model-falcon-color.js.map +1 -0
- package/dist/components/icons/model-falcon.d.ts +3 -0
- package/dist/components/icons/model-falcon.d.ts.map +1 -0
- package/dist/components/icons/model-falcon.js +5 -0
- package/dist/components/icons/model-falcon.js.map +1 -0
- package/dist/components/icons/model-google-color.d.ts +3 -0
- package/dist/components/icons/model-google-color.d.ts.map +1 -0
- package/dist/components/icons/model-google-color.js +5 -0
- package/dist/components/icons/model-google-color.js.map +1 -0
- package/dist/components/icons/model-google.d.ts +3 -0
- package/dist/components/icons/model-google.d.ts.map +1 -0
- package/dist/components/icons/model-google.js +5 -0
- package/dist/components/icons/model-google.js.map +1 -0
- package/dist/components/icons/model-llama-color.d.ts +3 -0
- package/dist/components/icons/model-llama-color.d.ts.map +1 -0
- package/dist/components/icons/model-llama-color.js +5 -0
- package/dist/components/icons/model-llama-color.js.map +1 -0
- package/dist/components/icons/model-llama.d.ts +3 -0
- package/dist/components/icons/model-llama.d.ts.map +1 -0
- package/dist/components/icons/model-llama.js +5 -0
- package/dist/components/icons/model-llama.js.map +1 -0
- package/dist/components/icons/model-openai.d.ts +3 -0
- package/dist/components/icons/model-openai.d.ts.map +1 -0
- package/dist/components/icons/model-openai.js +5 -0
- package/dist/components/icons/model-openai.js.map +1 -0
- package/dist/components/icons/model-qwen-color.d.ts +3 -0
- package/dist/components/icons/model-qwen-color.d.ts.map +1 -0
- package/dist/components/icons/model-qwen-color.js +5 -0
- package/dist/components/icons/model-qwen-color.js.map +1 -0
- package/dist/components/icons/model-qwen.d.ts +3 -0
- package/dist/components/icons/model-qwen.d.ts.map +1 -0
- package/dist/components/icons/model-qwen.js +5 -0
- package/dist/components/icons/model-qwen.js.map +1 -0
- package/dist/components/icons/monitor.d.ts +3 -0
- package/dist/components/icons/monitor.d.ts.map +1 -0
- package/dist/components/icons/monitor.js +5 -0
- package/dist/components/icons/monitor.js.map +1 -0
- package/dist/components/icons/open-panel.d.ts +3 -0
- package/dist/components/icons/open-panel.d.ts.map +1 -0
- package/dist/components/icons/open-panel.js +5 -0
- package/dist/components/icons/open-panel.js.map +1 -0
- package/dist/components/icons/org-developer.d.ts +3 -0
- package/dist/components/icons/org-developer.d.ts.map +1 -0
- package/dist/components/icons/org-developer.js +5 -0
- package/dist/components/icons/org-developer.js.map +1 -0
- package/dist/components/icons/org-experience.d.ts +3 -0
- package/dist/components/icons/org-experience.d.ts.map +1 -0
- package/dist/components/icons/org-experience.js +5 -0
- package/dist/components/icons/org-experience.js.map +1 -0
- package/dist/components/icons/org-operations.d.ts +3 -0
- package/dist/components/icons/org-operations.d.ts.map +1 -0
- package/dist/components/icons/org-operations.js +5 -0
- package/dist/components/icons/org-operations.js.map +1 -0
- package/dist/components/icons/org-systems.d.ts +3 -0
- package/dist/components/icons/org-systems.d.ts.map +1 -0
- package/dist/components/icons/org-systems.js +5 -0
- package/dist/components/icons/org-systems.js.map +1 -0
- package/dist/components/icons/org-university.d.ts +3 -0
- package/dist/components/icons/org-university.d.ts.map +1 -0
- package/dist/components/icons/org-university.js +5 -0
- package/dist/components/icons/org-university.js.map +1 -0
- package/dist/components/icons/phone.d.ts +3 -0
- package/dist/components/icons/phone.d.ts.map +1 -0
- package/dist/components/icons/phone.js +5 -0
- package/dist/components/icons/phone.js.map +1 -0
- package/dist/components/icons/quasar.d.ts +3 -0
- package/dist/components/icons/quasar.d.ts.map +1 -0
- package/dist/components/icons/quasar.js +5 -0
- package/dist/components/icons/quasar.js.map +1 -0
- package/dist/components/icons/quietbox.d.ts +3 -0
- package/dist/components/icons/quietbox.d.ts.map +1 -0
- package/dist/components/icons/quietbox.js +5 -0
- package/dist/components/icons/quietbox.js.map +1 -0
- package/dist/components/icons/registry.d.ts +6 -0
- package/dist/components/icons/registry.d.ts.map +1 -0
- package/dist/components/icons/registry.js +264 -0
- package/dist/components/icons/registry.js.map +1 -0
- package/dist/components/icons/reset.d.ts +3 -0
- package/dist/components/icons/reset.d.ts.map +1 -0
- package/dist/components/icons/reset.js +5 -0
- package/dist/components/icons/reset.js.map +1 -0
- package/dist/components/icons/search.d.ts +3 -0
- package/dist/components/icons/search.d.ts.map +1 -0
- package/dist/components/icons/search.js +5 -0
- package/dist/components/icons/search.js.map +1 -0
- package/dist/components/icons/server-solid.d.ts +3 -0
- package/dist/components/icons/server-solid.d.ts.map +1 -0
- package/dist/components/icons/server-solid.js +5 -0
- package/dist/components/icons/server-solid.js.map +1 -0
- package/dist/components/icons/server.d.ts +3 -0
- package/dist/components/icons/server.d.ts.map +1 -0
- package/dist/components/icons/server.js +5 -0
- package/dist/components/icons/server.js.map +1 -0
- package/dist/components/icons/shield-solid.d.ts +3 -0
- package/dist/components/icons/shield-solid.d.ts.map +1 -0
- package/dist/components/icons/shield-solid.js +5 -0
- package/dist/components/icons/shield-solid.js.map +1 -0
- package/dist/components/icons/shield.d.ts +3 -0
- package/dist/components/icons/shield.d.ts.map +1 -0
- package/dist/components/icons/shield.js +5 -0
- package/dist/components/icons/shield.js.map +1 -0
- package/dist/components/icons/sidebar.d.ts +3 -0
- package/dist/components/icons/sidebar.d.ts.map +1 -0
- package/dist/components/icons/sidebar.js +5 -0
- package/dist/components/icons/sidebar.js.map +1 -0
- package/dist/components/icons/size.d.ts +3 -0
- package/dist/components/icons/size.d.ts.map +1 -0
- package/dist/components/icons/size.js +5 -0
- package/dist/components/icons/size.js.map +1 -0
- package/dist/components/icons/social-discord.d.ts +3 -0
- package/dist/components/icons/social-discord.d.ts.map +1 -0
- package/dist/components/icons/social-discord.js +5 -0
- package/dist/components/icons/social-discord.js.map +1 -0
- package/dist/components/icons/social-facebook.d.ts +3 -0
- package/dist/components/icons/social-facebook.d.ts.map +1 -0
- package/dist/components/icons/social-facebook.js +5 -0
- package/dist/components/icons/social-facebook.js.map +1 -0
- package/dist/components/icons/social-github.d.ts +3 -0
- package/dist/components/icons/social-github.d.ts.map +1 -0
- package/dist/components/icons/social-github.js +5 -0
- package/dist/components/icons/social-github.js.map +1 -0
- package/dist/components/icons/social-linkedin.d.ts +3 -0
- package/dist/components/icons/social-linkedin.d.ts.map +1 -0
- package/dist/components/icons/social-linkedin.js +5 -0
- package/dist/components/icons/social-linkedin.js.map +1 -0
- package/dist/components/icons/social-x.d.ts +3 -0
- package/dist/components/icons/social-x.d.ts.map +1 -0
- package/dist/components/icons/social-x.js +5 -0
- package/dist/components/icons/social-x.js.map +1 -0
- package/dist/components/icons/social-youtube.d.ts +3 -0
- package/dist/components/icons/social-youtube.d.ts.map +1 -0
- package/dist/components/icons/social-youtube.js +5 -0
- package/dist/components/icons/social-youtube.js.map +1 -0
- package/dist/components/icons/spinner.d.ts +3 -0
- package/dist/components/icons/spinner.d.ts.map +1 -0
- package/dist/components/icons/spinner.js +5 -0
- package/dist/components/icons/spinner.js.map +1 -0
- package/dist/components/icons/success-solid.d.ts +3 -0
- package/dist/components/icons/success-solid.d.ts.map +1 -0
- package/dist/components/icons/success-solid.js +5 -0
- package/dist/components/icons/success-solid.js.map +1 -0
- package/dist/components/icons/success.d.ts +3 -0
- package/dist/components/icons/success.d.ts.map +1 -0
- package/dist/components/icons/success.js +5 -0
- package/dist/components/icons/success.js.map +1 -0
- package/dist/components/icons/tensix.d.ts +3 -0
- package/dist/components/icons/tensix.d.ts.map +1 -0
- package/dist/components/icons/tensix.js +5 -0
- package/dist/components/icons/tensix.js.map +1 -0
- package/dist/components/icons/tenstorrent.d.ts +3 -0
- package/dist/components/icons/tenstorrent.d.ts.map +1 -0
- package/dist/components/icons/tenstorrent.js +5 -0
- package/dist/components/icons/tenstorrent.js.map +1 -0
- package/dist/components/icons/trash-solid.d.ts +3 -0
- package/dist/components/icons/trash-solid.d.ts.map +1 -0
- package/dist/components/icons/trash-solid.js +5 -0
- package/dist/components/icons/trash-solid.js.map +1 -0
- package/dist/components/icons/trash.d.ts +3 -0
- package/dist/components/icons/trash.d.ts.map +1 -0
- package/dist/components/icons/trash.js +5 -0
- package/dist/components/icons/trash.js.map +1 -0
- package/dist/components/icons/tt-forge-fe.d.ts +3 -0
- package/dist/components/icons/tt-forge-fe.d.ts.map +1 -0
- package/dist/components/icons/tt-forge-fe.js +5 -0
- package/dist/components/icons/tt-forge-fe.js.map +1 -0
- package/dist/components/icons/tt-forge.d.ts +3 -0
- package/dist/components/icons/tt-forge.d.ts.map +1 -0
- package/dist/components/icons/tt-forge.js +5 -0
- package/dist/components/icons/tt-forge.js.map +1 -0
- package/dist/components/icons/tt-lang.d.ts +3 -0
- package/dist/components/icons/tt-lang.d.ts.map +1 -0
- package/dist/components/icons/tt-lang.js +5 -0
- package/dist/components/icons/tt-lang.js.map +1 -0
- package/dist/components/icons/tt-llk.d.ts +3 -0
- package/dist/components/icons/tt-llk.d.ts.map +1 -0
- package/dist/components/icons/tt-llk.js +5 -0
- package/dist/components/icons/tt-llk.js.map +1 -0
- package/dist/components/icons/tt-metalium.d.ts +3 -0
- package/dist/components/icons/tt-metalium.d.ts.map +1 -0
- package/dist/components/icons/tt-metalium.js +5 -0
- package/dist/components/icons/tt-metalium.js.map +1 -0
- package/dist/components/icons/tt-nn.d.ts +3 -0
- package/dist/components/icons/tt-nn.d.ts.map +1 -0
- package/dist/components/icons/tt-nn.js +5 -0
- package/dist/components/icons/tt-nn.js.map +1 -0
- package/dist/components/icons/tt-torch.d.ts +3 -0
- package/dist/components/icons/tt-torch.d.ts.map +1 -0
- package/dist/components/icons/tt-torch.js +5 -0
- package/dist/components/icons/tt-torch.js.map +1 -0
- package/dist/components/icons/tt-xla.d.ts +3 -0
- package/dist/components/icons/tt-xla.d.ts.map +1 -0
- package/dist/components/icons/tt-xla.js +5 -0
- package/dist/components/icons/tt-xla.js.map +1 -0
- package/dist/components/icons/types.d.ts +2 -0
- package/dist/components/icons/types.d.ts.map +1 -0
- package/dist/components/icons/types.js +9 -0
- package/dist/components/icons/types.js.map +1 -0
- package/dist/components/icons/upload.d.ts +3 -0
- package/dist/components/icons/upload.d.ts.map +1 -0
- package/dist/components/icons/upload.js +5 -0
- package/dist/components/icons/upload.js.map +1 -0
- package/dist/components/icons/user-multiple-solid.d.ts +3 -0
- package/dist/components/icons/user-multiple-solid.d.ts.map +1 -0
- package/dist/components/icons/user-multiple-solid.js +5 -0
- package/dist/components/icons/user-multiple-solid.js.map +1 -0
- package/dist/components/icons/user-multiple.d.ts +3 -0
- package/dist/components/icons/user-multiple.d.ts.map +1 -0
- package/dist/components/icons/user-multiple.js +5 -0
- package/dist/components/icons/user-multiple.js.map +1 -0
- package/dist/components/icons/user-solid.d.ts +3 -0
- package/dist/components/icons/user-solid.d.ts.map +1 -0
- package/dist/components/icons/user-solid.js +5 -0
- package/dist/components/icons/user-solid.js.map +1 -0
- package/dist/components/icons/user.d.ts +3 -0
- package/dist/components/icons/user.d.ts.map +1 -0
- package/dist/components/icons/user.js +5 -0
- package/dist/components/icons/user.js.map +1 -0
- package/dist/components/icons/warning-solid.d.ts +3 -0
- package/dist/components/icons/warning-solid.d.ts.map +1 -0
- package/dist/components/icons/warning-solid.js +5 -0
- package/dist/components/icons/warning-solid.js.map +1 -0
- package/dist/components/icons/warning.d.ts +3 -0
- package/dist/components/icons/warning.d.ts.map +1 -0
- package/dist/components/icons/warning.js +5 -0
- package/dist/components/icons/warning.js.map +1 -0
- package/dist/components/icons/wormhole.d.ts +3 -0
- package/dist/components/icons/wormhole.d.ts.map +1 -0
- package/dist/components/icons/wormhole.js +5 -0
- package/dist/components/icons/wormhole.js.map +1 -0
- package/dist/components/masked-input/getMaskitoOptions.d.ts +4 -0
- package/dist/components/masked-input/getMaskitoOptions.d.ts.map +1 -0
- package/dist/components/masked-input/getMaskitoOptions.js +27 -0
- package/dist/components/masked-input/getMaskitoOptions.js.map +1 -0
- package/dist/components/masked-input/masked-input.d.ts +68 -0
- package/dist/components/masked-input/masked-input.d.ts.map +1 -0
- package/dist/components/masked-input/masked-input.js +68 -0
- package/dist/components/masked-input/masked-input.js.map +1 -0
- package/dist/components/material/material.css +1 -0
- package/dist/components/material/material.d.ts +43 -0
- package/dist/components/material/material.d.ts.map +1 -0
- package/dist/components/material/material.js +43 -0
- package/dist/components/material/material.js.map +1 -0
- package/dist/components/menu/menu.css +1 -0
- package/dist/components/menu/menu.d.ts +75 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/menu/menu.js +56 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/modal/modal.d.ts +83 -0
- package/dist/components/modal/modal.d.ts.map +1 -0
- package/dist/components/modal/modal.js +118 -0
- package/dist/components/modal/modal.js.map +1 -0
- package/dist/components/progress-bar/progress-bar.css +1 -0
- package/dist/components/progress-bar/progress-bar.d.ts +38 -0
- package/dist/components/progress-bar/progress-bar.d.ts.map +1 -0
- package/dist/components/progress-bar/progress-bar.js +39 -0
- package/dist/components/progress-bar/progress-bar.js.map +1 -0
- package/dist/components/radio-group/radio-group.css +1 -0
- package/dist/components/radio-group/radio-group.d.ts +70 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.js +61 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/range/range.css +1 -0
- package/dist/components/range/range.d.ts +86 -0
- package/dist/components/range/range.d.ts.map +1 -0
- package/dist/components/range/range.js +87 -0
- package/dist/components/range/range.js.map +1 -0
- package/dist/components/select/select.css +1 -0
- package/dist/components/select/select.d.ts +82 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +79 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/sheet/sheet.css +1 -0
- package/dist/components/sheet/sheet.d.ts +71 -0
- package/dist/components/sheet/sheet.d.ts.map +1 -0
- package/dist/components/sheet/sheet.js +116 -0
- package/dist/components/sheet/sheet.js.map +1 -0
- package/dist/components/show-more/show-more.css +1 -0
- package/dist/components/show-more/show-more.d.ts +28 -0
- package/dist/components/show-more/show-more.d.ts.map +1 -0
- package/dist/components/show-more/show-more.js +26 -0
- package/dist/components/show-more/show-more.js.map +1 -0
- package/dist/components/skeleton/skeleton.css +1 -0
- package/dist/components/skeleton/skeleton.d.ts +39 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.js +36 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/slider.d.ts +69 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.js +61 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/snippet/snippet.css +1 -0
- package/dist/components/snippet/snippet.d.ts +28 -0
- package/dist/components/snippet/snippet.d.ts.map +1 -0
- package/dist/components/snippet/snippet.js +44 -0
- package/dist/components/snippet/snippet.js.map +1 -0
- package/dist/components/split-button/split-button.css +1 -0
- package/dist/components/split-button/split-button.d.ts +78 -0
- package/dist/components/split-button/split-button.d.ts.map +1 -0
- package/dist/components/split-button/split-button.js +65 -0
- package/dist/components/split-button/split-button.js.map +1 -0
- package/dist/components/status-indicator/status-indicator.css +1 -0
- package/dist/components/status-indicator/status-indicator.d.ts +35 -0
- package/dist/components/status-indicator/status-indicator.d.ts.map +1 -0
- package/dist/components/status-indicator/status-indicator.js +33 -0
- package/dist/components/status-indicator/status-indicator.js.map +1 -0
- package/dist/components/switch/switch.css +1 -0
- package/dist/components/switch/switch.d.ts +41 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.js +46 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/tabs/tabs.css +1 -0
- package/dist/components/tabs/tabs.d.ts +60 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +51 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tag/tag.css +1 -0
- package/dist/components/tag/tag.d.ts +42 -0
- package/dist/components/tag/tag.d.ts.map +1 -0
- package/dist/components/tag/tag.js +48 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/text-area/text-area.css +1 -0
- package/dist/components/text-area/text-area.d.ts +35 -0
- package/dist/components/text-area/text-area.d.ts.map +1 -0
- package/dist/components/text-area/text-area.js +47 -0
- package/dist/components/text-area/text-area.js.map +1 -0
- package/dist/components/text-button/text-button.css +1 -0
- package/dist/components/text-button/text-button.d.ts +46 -0
- package/dist/components/text-button/text-button.d.ts.map +1 -0
- package/dist/components/text-button/text-button.js +46 -0
- package/dist/components/text-button/text-button.js.map +1 -0
- package/dist/components/text-input/text-input.css +1 -0
- package/dist/components/text-input/text-input.d.ts +57 -0
- package/dist/components/text-input/text-input.d.ts.map +1 -0
- package/dist/components/text-input/text-input.js +54 -0
- package/dist/components/text-input/text-input.js.map +1 -0
- package/dist/components/theme-switcher/theme-switcher.css +1 -0
- package/dist/components/theme-switcher/theme-switcher.d.ts +23 -0
- package/dist/components/theme-switcher/theme-switcher.d.ts.map +1 -0
- package/dist/components/theme-switcher/theme-switcher.js +24 -0
- package/dist/components/theme-switcher/theme-switcher.js.map +1 -0
- package/dist/components/toast/animations.d.ts +3 -0
- package/dist/components/toast/animations.d.ts.map +1 -0
- package/dist/components/toast/animations.js +28 -0
- package/dist/components/toast/animations.js.map +1 -0
- package/dist/components/toast/store.d.ts +77 -0
- package/dist/components/toast/store.d.ts.map +1 -0
- package/dist/components/toast/store.js +94 -0
- package/dist/components/toast/store.js.map +1 -0
- package/dist/components/toast/toast.css +1 -0
- package/dist/components/toast/toast.d.ts +32 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/toast/toast.js +202 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toast/utils.d.ts +10 -0
- package/dist/components/toast/utils.d.ts.map +1 -0
- package/dist/components/toast/utils.js +26 -0
- package/dist/components/toast/utils.js.map +1 -0
- package/dist/components/toggle/toggle.css +1 -0
- package/dist/components/toggle/toggle.d.ts +82 -0
- package/dist/components/toggle/toggle.d.ts.map +1 -0
- package/dist/components/toggle/toggle.js +129 -0
- package/dist/components/toggle/toggle.js.map +1 -0
- package/dist/components/tooltip/tooltip.css +1 -0
- package/dist/components/tooltip/tooltip.d.ts +58 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +52 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/typography/typography.css +1 -0
- package/dist/components/typography/typography.d.ts +33 -0
- package/dist/components/typography/typography.d.ts.map +1 -0
- package/dist/components/typography/typography.js +63 -0
- package/dist/components/typography/typography.js.map +1 -0
- package/dist/styles/animation.css +1 -0
- package/dist/styles/backgrounds.css +1 -0
- package/dist/styles/colors.css +1 -0
- package/dist/styles/fonts.css +1 -0
- package/dist/styles/globals.css +1 -0
- package/dist/styles/leading.css +1 -0
- package/dist/styles/radius.css +1 -0
- package/dist/styles/shadows.css +1 -0
- package/dist/styles/spacing.css +1 -0
- package/dist/styles/strokes.css +1 -0
- package/dist/styles/styles.css +1 -0
- package/dist/styles/tailwind-utilities.css +1 -0
- package/dist/styles/tailwind.css +1 -0
- package/dist/styles/tracking.css +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +2 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/generateId.d.ts +5 -0
- package/dist/utils/generateId.d.ts.map +1 -0
- package/dist/utils/generateId.js +21 -0
- package/dist/utils/generateId.js.map +1 -0
- package/dist/utils/getDisabledProps.d.ts +42 -0
- package/dist/utils/getDisabledProps.d.ts.map +1 -0
- package/dist/utils/getDisabledProps.js +36 -0
- package/dist/utils/getDisabledProps.js.map +1 -0
- package/dist/utils/getPortalContainer.d.ts +27 -0
- package/dist/utils/getPortalContainer.d.ts.map +1 -0
- package/dist/utils/getPortalContainer.js +21 -0
- package/dist/utils/getPortalContainer.js.map +1 -0
- package/dist/utils/hooks/useBaseRemSize.d.ts +9 -0
- package/dist/utils/hooks/useBaseRemSize.d.ts.map +1 -0
- package/dist/utils/hooks/useBaseRemSize.js +55 -0
- package/dist/utils/hooks/useBaseRemSize.js.map +1 -0
- package/dist/utils/hooks/useMergedRefs.d.ts +11 -0
- package/dist/utils/hooks/useMergedRefs.d.ts.map +1 -0
- package/dist/utils/hooks/useMergedRefs.js +96 -0
- package/dist/utils/hooks/useMergedRefs.js.map +1 -0
- package/dist/utils/isSingleReactElement.d.ts +3 -0
- package/dist/utils/isSingleReactElement.d.ts.map +1 -0
- package/dist/utils/isSingleReactElement.js +5 -0
- package/dist/utils/isSingleReactElement.js.map +1 -0
- package/dist/utils/polymorphic.d.ts +43 -0
- package/dist/utils/polymorphic.d.ts.map +1 -0
- package/dist/utils/polymorphic.js +2 -0
- package/dist/utils/polymorphic.js.map +1 -0
- package/dist/utils/splitFormInputProps.d.ts +119 -0
- package/dist/utils/splitFormInputProps.d.ts.map +1 -0
- package/dist/utils/splitFormInputProps.js +277 -0
- package/dist/utils/splitFormInputProps.js.map +1 -0
- package/package.json +266 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useRef, } from "react";
|
|
4
|
+
import { Checkmark } from "../icons/icons.js";
|
|
5
|
+
import { Typography } from "../typography/typography.js";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
import { useMergedRefs } from "../../utils/hooks/useMergedRefs.js";
|
|
8
|
+
/**
|
|
9
|
+
* A selection group component that supports both single-select (radio) and multi-select (checkbox) modes with card-style options.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} props.name - The name attribute shared by all inputs, used for form submission
|
|
12
|
+
* @param {ChoiceboxItem[]} props.options - The list of options to render
|
|
13
|
+
* @param {boolean} [props.multiselect] - (optional) When `true`, enables multi-select (checkbox) mode. @default false
|
|
14
|
+
* @param {boolean} [props.disabled] - (optional) Disables all options in the group. @default false
|
|
15
|
+
* @param {string} [props.value] - (optional) The currently selected value (single-select, controlled)
|
|
16
|
+
* @param {string} [props.defaultValue] - (optional) The initially selected value (single-select, uncontrolled)
|
|
17
|
+
* @param {(value: string) => void} [props.onChange] - (optional) Callback fired on selection change (single-select)
|
|
18
|
+
* @param {string[]} [props.values] - (optional) The currently selected values (multi-select, controlled)
|
|
19
|
+
* @param {(values: string[]) => void} [props.onChange] - (optional) Callback fired with all selected values (multi-select)
|
|
20
|
+
*
|
|
21
|
+
* You may also pass any additional props to the underlying `fieldset` element
|
|
22
|
+
|
|
23
|
+
* @example
|
|
24
|
+
* <Choicebox
|
|
25
|
+
* name="plan"
|
|
26
|
+
* options={[
|
|
27
|
+
* { value: "free", label: "Free", description: "Basic features" },
|
|
28
|
+
* { value: "pro", label: "Pro", description: "Advanced features" },
|
|
29
|
+
* ]}
|
|
30
|
+
* value={selectedPlan}
|
|
31
|
+
* onChange={setSelectedPlan}
|
|
32
|
+
* />
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <Choicebox
|
|
36
|
+
* multiselect
|
|
37
|
+
* name="features"
|
|
38
|
+
* options={[
|
|
39
|
+
* { value: "dark-mode", label: "Dark Mode" },
|
|
40
|
+
* { value: "notifications", label: "Notifications" },
|
|
41
|
+
* ]}
|
|
42
|
+
* min={1}
|
|
43
|
+
* max={3}
|
|
44
|
+
* onChange={(values) => console.log(values)}
|
|
45
|
+
* />
|
|
46
|
+
*/
|
|
47
|
+
export function Choicebox(props) {
|
|
48
|
+
if (props.multiselect)
|
|
49
|
+
return _jsx(ChoiceboxMultiSelect, { ...props });
|
|
50
|
+
return _jsx(ChoiceboxSingleSelect, { ...props });
|
|
51
|
+
}
|
|
52
|
+
function ChoiceboxSingleSelect({ className, value, defaultValue, onChange, options, name, disabled, required,
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
54
|
+
multiselect, ...props }) {
|
|
55
|
+
return (_jsx("fieldset", { className: cn("vesper-choicebox", className), ...props, children: options.map((option) => {
|
|
56
|
+
const checkedProps = value !== undefined
|
|
57
|
+
? { checked: value === option.value }
|
|
58
|
+
: { defaultChecked: defaultValue === option.value };
|
|
59
|
+
return (_jsx(ChoiceboxItem, { option: option, required: required, disabled: disabled, name: name, onChange: (e) => {
|
|
60
|
+
if (!onChange)
|
|
61
|
+
return;
|
|
62
|
+
if (e.target.checked)
|
|
63
|
+
onChange(option.value);
|
|
64
|
+
}, ...checkedProps }, option.value));
|
|
65
|
+
}) }));
|
|
66
|
+
}
|
|
67
|
+
function ChoiceboxMultiSelect({ className, values, defaultValues, onChange, options, disabled, name, ref, min = 0, max = Infinity,
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
69
|
+
multiselect, ...props }) {
|
|
70
|
+
const innerRef = useRef(null);
|
|
71
|
+
const mergedRef = useMergedRefs(ref, innerRef);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (!innerRef.current)
|
|
74
|
+
return;
|
|
75
|
+
setMinMaxValidity(getCheckboxes(innerRef.current), min, max);
|
|
76
|
+
}, [min, max]);
|
|
77
|
+
/**
|
|
78
|
+
* Mimic the keyboard accessibility of single-select (group of radio inputs)
|
|
79
|
+
* - ArrowLeft/ArrowDown moves focus forwards to the next input
|
|
80
|
+
* - ArrowRight/ArrowUp moves focus back to the previous input
|
|
81
|
+
* - disabled inputs are skipped
|
|
82
|
+
* - moving back/forward at the first/last inputs loops around
|
|
83
|
+
*/
|
|
84
|
+
const handleKeyDown = useCallback((e) => {
|
|
85
|
+
if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(e.key)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const inputs = Array.from(innerRef.current.querySelectorAll(".vesper-choicebox-input:not(:disabled)"));
|
|
89
|
+
const currentIndex = inputs.indexOf(e.target);
|
|
90
|
+
if (currentIndex === -1)
|
|
91
|
+
return;
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
const direction = ["ArrowDown", "ArrowRight"].includes(e.key) ? 1 : -1;
|
|
94
|
+
const nextIndex = (currentIndex + direction + inputs.length) % inputs.length;
|
|
95
|
+
inputs[nextIndex]?.focus();
|
|
96
|
+
}, []);
|
|
97
|
+
return (_jsx("fieldset", { ref: mergedRef, className: cn("vesper-choicebox", className), onKeyDown: handleKeyDown, ...props, children: options.map((option) => {
|
|
98
|
+
const checkedProps = values !== undefined
|
|
99
|
+
? { checked: values.includes(option.value) }
|
|
100
|
+
: { defaultChecked: defaultValues?.includes(option.value) };
|
|
101
|
+
return (_jsx(ChoiceboxItem, { multiselect: true, option: option, disabled: disabled, name: name, onChange: () => {
|
|
102
|
+
const checkboxes = getCheckboxes(innerRef.current);
|
|
103
|
+
setMinMaxValidity(checkboxes, min, max);
|
|
104
|
+
if (!onChange)
|
|
105
|
+
return;
|
|
106
|
+
onChange(checkboxes.filter((v) => v.checked).map((v) => v.value));
|
|
107
|
+
}, ...checkedProps }, option.value));
|
|
108
|
+
}) }));
|
|
109
|
+
}
|
|
110
|
+
function ChoiceboxItem({ option, multiselect, disabled, required, name, checked, defaultChecked, onChange, }) {
|
|
111
|
+
const isDisabled = option.disabled || disabled;
|
|
112
|
+
return (_jsxs("label", { htmlFor: option.id, className: cn("vesper-choicebox-item", !option.description && "vesper-choicebox-item-compact"), children: [_jsxs("div", { children: [_jsx(Typography, { variant: "copy-sm-bold", className: "vesper-choicebox-item-label", children: option.label }), option.description && (_jsx(Typography, { variant: "copy-xs", className: "vesper-choicebox-item-description", children: option.description }))] }), _jsx("input", { type: multiselect ? "checkbox" : "radio", className: "vesper-choicebox-input", id: option.id, name: name, value: option.value, required: required, disabled: isDisabled, onChange: onChange, checked: checked, defaultChecked: defaultChecked }), multiselect ? (_jsx("div", { className: "vesper-choicebox-input-multi-indicator", children: _jsx(Checkmark, {}) })) : (_jsx("div", { className: "vesper-choicebox-input-single-indicator" }))] }, option.value));
|
|
113
|
+
}
|
|
114
|
+
function getCheckboxes(ref) {
|
|
115
|
+
return Array.from(ref.querySelectorAll(".vesper-choicebox-input"));
|
|
116
|
+
}
|
|
117
|
+
function setMinMaxValidity(checkboxes, min, max) {
|
|
118
|
+
if (checkboxes.length === 0)
|
|
119
|
+
return;
|
|
120
|
+
const numChecked = checkboxes.filter((c) => c.checked).length;
|
|
121
|
+
if (numChecked < min) {
|
|
122
|
+
checkboxes[0].setCustomValidity(`Please select at least ${min} ${min === 1 ? "item" : "items"}`);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (numChecked > max) {
|
|
126
|
+
checkboxes[0].setCustomValidity(`Please select ${max} or fewer items`);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
checkboxes[0].setCustomValidity("");
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=choicebox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choicebox.js","sourceRoot":"","sources":["../../../src/components/choicebox/choicebox.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-code{padding:var(--vesper-spacing-half) var(--vesper-spacing-1);border-radius:var(--vesper-radius-1);font-size:.8125em}.vesper-code-default{background:var(--vesper-tint-neutral-100);color:var(--vesper-text-primary);border:var(--vesper-stroke-base) solid var(--vesper-border-tertiary)}.vesper-code-contrast{background:var(--vesper-background-inverse-primary);color:var(--vesper-text-inverse-primary);border:var(--vesper-stroke-base) solid var(--vesper-border-strong)}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export declare const CODE_VARIANTS: readonly ["default", "contrast"];
|
|
3
|
+
export type CodeVariant = (typeof CODE_VARIANTS)[number];
|
|
4
|
+
export interface CodeProps extends ComponentProps<"code"> {
|
|
5
|
+
/** The visual style variant to render. @default default */
|
|
6
|
+
variant?: CodeVariant;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* An inline code element with consistent monospace typography and visual styling.
|
|
10
|
+
*
|
|
11
|
+
* @param {CodeVariant} [props.variant] - (optional) The visual style variant. @default default`
|
|
12
|
+
* @param {string} [props.className] - (optional) Additional CSS class names to apply
|
|
13
|
+
*
|
|
14
|
+
* You may also pass any additional props to the underlying `<code>` element
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <Code>npm install vesper</Code>
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <Code variant="contrast">const x = 42</Code>
|
|
21
|
+
*/
|
|
22
|
+
export declare function Code(props: CodeProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/components/code/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAM5C,eAAO,MAAM,aAAa,kCAAmC,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,MAAM,CAAC;IACvD,2DAA2D;IAC3D,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAWpC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Typography } from "../typography/typography.js";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
export const CODE_VARIANTS = ["default", "contrast"];
|
|
5
|
+
/**
|
|
6
|
+
* An inline code element with consistent monospace typography and visual styling.
|
|
7
|
+
*
|
|
8
|
+
* @param {CodeVariant} [props.variant] - (optional) The visual style variant. @default default`
|
|
9
|
+
* @param {string} [props.className] - (optional) Additional CSS class names to apply
|
|
10
|
+
*
|
|
11
|
+
* You may also pass any additional props to the underlying `<code>` element
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <Code>npm install vesper</Code>
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <Code variant="contrast">const x = 42</Code>
|
|
18
|
+
*/
|
|
19
|
+
export function Code(props) {
|
|
20
|
+
const { className, variant = "default", ...rest } = props;
|
|
21
|
+
return (_jsx(Typography, { as: "code", variant: "copy-xs-mono", className: cn("vesper-code", `vesper-code-${variant}`, className), ...rest }));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.js","sourceRoot":"","sources":["../../../src/components/code/code.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAEhC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,CAAU,CAAC;AAS9D;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAE1D,OAAO,CACL,KAAC,UAAU,IACT,EAAE,EAAC,MAAM,EACT,OAAO,EAAC,cAAc,EACtB,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,eAAe,OAAO,EAAE,EAAE,SAAS,CAAC,KAC7D,IAAI,GACR,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-code-block{border-radius:var(--vesper-radius-2);border:var(--vesper-stroke-base) solid var(--vesper-stone-200);background:var(--vesper-alpha-stone-0);box-shadow:var(--vesper-shadow-inset-100);flex-direction:column;display:flex;position:relative;overflow:hidden}.vesper-code-block .vesper-icon-button{top:min(calc(50% - 1rem), var(--vesper-spacing-5));right:var(--vesper-spacing-5);position:absolute}@media (hover:hover){.vesper-code-block[data-copy-on-hover=true] .vesper-icon-button:not(:focus-visible){opacity:0}.vesper-code-block[data-copy-on-hover=true]:hover .vesper-icon-button{opacity:1}}@media (forced-colors:active){.vesper-code-block:has(.vesper-code-block-pre-wrapper:focus-visible){outline:var(--vesper-stroke-strong) solid CanvasText}}@media not (forced-colors:active){.vesper-code-block:has(.vesper-code-block-pre-wrapper:focus-visible){box-shadow:var(--vesper-shadow-focus-ring)}}@media (forced-colors:active){.vesper-code-block-pre-wrapper:focus-visible{outline:none}}@media not (forced-colors:active){.vesper-code-block-pre-wrapper:focus-visible{box-shadow:none}}.vesper-code-block-pre-wrapper{border-radius:var(--vesper-radius-2);width:100%;overflow:auto}.vesper-code-block-pre-wrapper pre.shiki{min-width:max-content;padding:var(--vesper-spacing-5) 0;outline:none;margin:0;line-height:1.3875rem}.vesper-code-block-pre-wrapper pre.shiki code{font-family:var(--vesper-font-mono);flex-direction:column;display:flex}.vesper-code-block-pre-wrapper pre.shiki .line{padding:0 var(--vesper-spacing-5);width:calc(100% - var(--vesper-spacing-10))}.vesper-code-block-pre-wrapper pre.shiki .line:before{content:"";-webkit-user-select:none;-ms-user-select:none;user-select:none;display:inline-block}.vesper-code-block-pre-wrapper[data-line-numbers=true] pre.shiki{counter-reset:line;counter-increment:line 0}.vesper-code-block-pre-wrapper[data-line-numbers=true] pre.shiki .line:before{content:counter(line);counter-increment:line;width:var(--vesper-spacing-12);color:var(--vesper-stone-500)}@media (prefers-color-scheme:dark){html:not([data-vesper-theme=light]) .vesper-code-block .shiki{color:var(--shiki-dark)!important;background-color:var(--shiki-dark-bg,transparent)!important;font-style:var(--shiki-dark-font-style,normal)!important;font-weight:var(--shiki-dark-font-weight,normal)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration,none)!important;text-decoration:var(--shiki-dark-text-decoration,none)!important}html:not([data-vesper-theme=light]) .vesper-code-block .shiki span{color:var(--shiki-dark)!important;background-color:var(--shiki-dark-bg,transparent)!important;font-style:var(--shiki-dark-font-style,normal)!important;font-weight:var(--shiki-dark-font-weight,normal)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration,none)!important;text-decoration:var(--shiki-dark-text-decoration,none)!important}}html[data-vesper-theme=dark] .vesper-code-block .shiki{color:var(--shiki-dark)!important;background-color:var(--shiki-dark-bg,transparent)!important;font-style:var(--shiki-dark-font-style,normal)!important;font-weight:var(--shiki-dark-font-weight,normal)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration,none)!important;text-decoration:var(--shiki-dark-text-decoration,none)!important}html[data-vesper-theme=dark] .vesper-code-block .shiki span{color:var(--shiki-dark)!important;background-color:var(--shiki-dark-bg,transparent)!important;font-style:var(--shiki-dark-font-style,normal)!important;font-weight:var(--shiki-dark-font-weight,normal)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration,none)!important;text-decoration:var(--shiki-dark-text-decoration,none)!important}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import type { LanguageRegistration } from "@shikijs/core";
|
|
3
|
+
export interface CodeBlockProps extends Omit<ComponentProps<"div">, "children" | "dangerouslySetInnerHTML" | "lang"> {
|
|
4
|
+
/**
|
|
5
|
+
* The code to render. Can be a `string`, or a factory `() => ReadableStream<string>` if you wish to stream something like build logs, output from an LLM, etc.
|
|
6
|
+
*
|
|
7
|
+
* A factory is used instead of a raw `ReadableStream` because streams are single-use — once piped they are locked and cannot be re-read. Passing a factory allows the component to create a fresh stream whenever it needs one (e.g. on React Strict Mode remounts or language changes).
|
|
8
|
+
*
|
|
9
|
+
* The factory may be asynchronous, returning a `Promise<ReadableStream<string>>`, which is useful when the stream source itself requires an async setup step (e.g. making a network request).
|
|
10
|
+
*/
|
|
11
|
+
children?: string | (() => ReadableStream<string> | Promise<ReadableStream<string>>);
|
|
12
|
+
/**
|
|
13
|
+
* The language syntax of the supplied code. Omitting this prop will render supplied code as plain text with no syntax highlighting.
|
|
14
|
+
*
|
|
15
|
+
* For `plaintext` and `ansi` you do not need to supply your own grammars; they are baked into shiki and can be passed in as strings. Other language grammars should be provided as plain objects, most of which can be imported from the `@shikijs/langs` library.
|
|
16
|
+
*
|
|
17
|
+
* @see https://shiki.style/languages for a list of available languages along with their `id`s
|
|
18
|
+
* */
|
|
19
|
+
lang?: LanguageRegistration[] | "text" | "ansi";
|
|
20
|
+
/** Whether or not to show line numbers on the left-hand side of the code block. @default false */
|
|
21
|
+
showLineNumbers?: boolean;
|
|
22
|
+
/** Hide the copy-to-clipboard button until CodeBlock is hovered. @default false */
|
|
23
|
+
copyOnHover?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A syntax-highlighted code block with support for static code, streaming content, and line numbers.
|
|
27
|
+
*
|
|
28
|
+
* @param {string | (() => ReadableStream<string> | Promise<ReadableStream<string>>)} [props.children] - (optional) The code to render, either as a string or a stream factory
|
|
29
|
+
* @param {LanguageRegistration[] | "text" | "ansi"} [props.lang] - (optional) The language syntax for highlighting. @default text
|
|
30
|
+
* @param {boolean} [props.showLineNumbers] - (optional) Whether to display line numbers. @default false
|
|
31
|
+
* @param {boolean} [props.copyOnHover] - (optional) Hide the copy button until the code block is hovered. @default false
|
|
32
|
+
*
|
|
33
|
+
* You may also pass any additional props to the underlying `div` element
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* import javascript from "@shikijs/langs/javascript";
|
|
37
|
+
*
|
|
38
|
+
* <CodeBlock lang={javascript} showLineNumbers>
|
|
39
|
+
* {`const greeting = "Hello, world!";\nconsole.log(greeting);`}
|
|
40
|
+
* </CodeBlock>
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <CodeBlock lang="ansi">
|
|
44
|
+
* {buildLogs}
|
|
45
|
+
* </CodeBlock>
|
|
46
|
+
*/
|
|
47
|
+
export declare function CodeBlock(props: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=code-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/code-block.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAQ1D,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,yBAAyB,GAAG,MAAM,CAChD;IACC;;;;;;OAMG;IACH,QAAQ,CAAC,EACP,MAAM,GAAG,CAAC,MAAM,cAAc,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5E;;;;;;SAMK;IACL,IAAI,CAAC,EAAE,oBAAoB,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;IAChD,kGAAkG;IAClG,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mFAAmF;IACnF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAsC9C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { CodeBlockPreWrapper, CopyToClipboardButton } from "./components.js";
|
|
4
|
+
import { StreamingCodeBlock } from "./streaming-code-block.js";
|
|
5
|
+
import { codeToJsx, handleLanguageRegistration } from "./utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* A syntax-highlighted code block with support for static code, streaming content, and line numbers.
|
|
8
|
+
*
|
|
9
|
+
* @param {string | (() => ReadableStream<string> | Promise<ReadableStream<string>>)} [props.children] - (optional) The code to render, either as a string or a stream factory
|
|
10
|
+
* @param {LanguageRegistration[] | "text" | "ansi"} [props.lang] - (optional) The language syntax for highlighting. @default text
|
|
11
|
+
* @param {boolean} [props.showLineNumbers] - (optional) Whether to display line numbers. @default false
|
|
12
|
+
* @param {boolean} [props.copyOnHover] - (optional) Hide the copy button until the code block is hovered. @default false
|
|
13
|
+
*
|
|
14
|
+
* You may also pass any additional props to the underlying `div` element
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* import javascript from "@shikijs/langs/javascript";
|
|
18
|
+
*
|
|
19
|
+
* <CodeBlock lang={javascript} showLineNumbers>
|
|
20
|
+
* {`const greeting = "Hello, world!";\nconsole.log(greeting);`}
|
|
21
|
+
* </CodeBlock>
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <CodeBlock lang="ansi">
|
|
25
|
+
* {buildLogs}
|
|
26
|
+
* </CodeBlock>
|
|
27
|
+
*/
|
|
28
|
+
export function CodeBlock(props) {
|
|
29
|
+
const { className, children: code = "", lang = "text", showLineNumbers = false, copyOnHover = false, ...rest } = props;
|
|
30
|
+
handleLanguageRegistration(lang);
|
|
31
|
+
if (typeof code === "function") {
|
|
32
|
+
return (_jsx(StreamingCodeBlock, { className: className, lang: lang, copyOnHover: copyOnHover, showLineNumbers: showLineNumbers, ...rest, children: code }));
|
|
33
|
+
}
|
|
34
|
+
return (_jsxs("div", { className: cn("vesper-code-block", className), "data-copy-on-hover": copyOnHover, ...rest, children: [_jsx(CodeBlockPreWrapper, { "data-line-numbers": showLineNumbers, children: codeToJsx(code, lang) }), _jsx(CopyToClipboardButton, {})] }));
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=code-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.js","sourceRoot":"","sources":["../../../src/components/code-block/code-block.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AA6BhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,EACJ,SAAS,EACT,QAAQ,EAAE,IAAI,GAAG,EAAE,EACnB,IAAI,GAAG,MAAM,EACb,eAAe,GAAG,KAAK,EACvB,WAAW,GAAG,KAAK,EACnB,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,0BAA0B,CAAC,IAAI,CAAC,CAAC;IAEjC,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,OAAO,CACL,KAAC,kBAAkB,IACjB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,KAC5B,IAAI,YAEP,IAAI,GACc,CACtB,CAAC;IACJ,CAAC;IAED,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CAAC,mBAAmB,EAAE,SAAS,CAAC,wBACzB,WAAW,KAC3B,IAAI,aAER,KAAC,mBAAmB,yBAAoB,eAAe,YACpD,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,GACF,EACtB,KAAC,qBAAqB,KAAG,IACrB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export declare function CodeBlockPreWrapper({ children, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function CopyToClipboardButton(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/components.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAMjE,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,2CAWvB;AAED,wBAAgB,qBAAqB,4CA6BpC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { IconButton } from "../icon-button/icon-button.js";
|
|
5
|
+
import { Checkmark, Copy } from "../icons/icons.js";
|
|
6
|
+
import { Typography } from "../typography/typography.js";
|
|
7
|
+
export function CodeBlockPreWrapper({ children, ...props }) {
|
|
8
|
+
return (_jsx(Typography, { as: "div", variant: "copy-xs-mono", className: "vesper-code-block-pre-wrapper", ...props, children: children }));
|
|
9
|
+
}
|
|
10
|
+
export function CopyToClipboardButton() {
|
|
11
|
+
const [copied, setCopied] = useState(false);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!copied)
|
|
14
|
+
return;
|
|
15
|
+
const id = setTimeout(() => setCopied(false), 2000);
|
|
16
|
+
return () => clearTimeout(id);
|
|
17
|
+
}, [copied]);
|
|
18
|
+
return (_jsx(IconButton, { variant: "tertiary", icon: copied ? _jsx(Checkmark, {}) : _jsx(Copy, {}), "aria-label": "Copy code", size: "sm", type: "button", onClick: (e) => {
|
|
19
|
+
const pre = e.currentTarget.parentElement?.querySelector(".vesper-code-block-pre-wrapper");
|
|
20
|
+
const content = pre?.textContent || "";
|
|
21
|
+
navigator.clipboard
|
|
22
|
+
?.writeText(content)
|
|
23
|
+
.then(() => setCopied(true))
|
|
24
|
+
.catch(() => { });
|
|
25
|
+
} }));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/components/code-block/components.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAuB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,UAAU,mBAAmB,CAAC,EAClC,QAAQ,EACR,GAAG,KAAK,EACc;IACtB,OAAO,CACL,KAAC,UAAU,IACT,EAAE,EAAC,KAAK,EACR,OAAO,EAAC,cAAc,EACtB,SAAS,EAAC,+BAA+B,KACrC,KAAK,YAER,QAAQ,GACE,CACd,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;QACpD,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAChC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAC,UAAU,EAClB,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAC,SAAS,KAAG,CAAC,CAAC,CAAC,KAAC,IAAI,KAAG,gBAC5B,WAAW,EACtB,IAAI,EAAC,IAAI,EACT,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,MAAM,GAAG,GACP,CAAC,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAC1C,gCAAgC,CACjC,CAAC;YAEJ,MAAM,OAAO,GAAG,GAAG,EAAE,WAAW,IAAI,EAAE,CAAC;YACvC,SAAS,CAAC,SAAS;gBACjB,EAAE,SAAS,CAAC,OAAO,CAAC;iBACnB,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;iBAC3B,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACrB,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SAMPLE_CODE_TYPESCRIPT = "/**\n * @module ComponentSystem\n * A comprehensive component system with state management.\n * Demonstrates various TypeScript language features.\n */\n\n// Enum members, numeric constants\nenum Status {\n Idle = 0,\n Loading = 1,\n Success = 2,\n Error = 0xff,\n}\n\n// Interface with generics, readonly, optional, mapped types\ninterface EventMap {\n readonly id: string;\n status: Status;\n timestamp?: number;\n}\n\n// Conditional types, infer, mapped types, template literal types\ntype ExtractKeys<T> = T extends Record<infer K, unknown> ? K : never;\ntype Nullable<T> = { [P in keyof T]: T[P] | null };\ntype EventName = `on${\"Change\" | \"Reset\"}`;\n\n// Constants with various literal types\nconst MAX_RETRIES = 3;\nconst PI = 3.14159;\nconst HEX_MASK = 0x1f;\nconst BINARY_FLAG = 0b1010;\nconst OCTAL_VAL = 0o755; // [!code --]\nconst SCIENTIFIC = 1.5e10; // [!code --]\nconst GREETING = \"Hello, world!\"; // [!code --]\nconst TEMPLATE = `Status: ${Status.Loading} at ${Date.now()}`;\nconst REGEX_PATTERN = /^[a-z]+\\d{2,4}$/gi; // [!code ++]\n\n// Abstract class with decorator-style pattern\nabstract class BaseComponent<T extends EventMap> {\n protected state: Nullable<T> | null = null;\n private static instanceCount = 0;\n\n constructor(readonly name: string) {\n BaseComponent.instanceCount++;\n }\n\n abstract render(): string;\n\n // Method with overloads\n emit(event: \"change\", data: T): void;\n emit(event: \"reset\"): void;\n emit(event: string, data?: T): void {\n if (typeof data !== \"undefined\") {\n console.log(`[${this.name}] ${event}:`, data);\n }\n }\n}\n\n// Class extending abstract, implements pattern\nclass StateManager<S extends Record<string, unknown>>\n extends BaseComponent<EventMap>\n{\n #internal: Map<string, S> = new Map();\n\n render(): string {\n return `<StateManager instances=${this.#internal.size} />`;\n }\n\n async fetchState(url: string): Promise<S | null> {\n try {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}`);\n }\n const data: S = await response.json();\n return data;\n } catch (error: unknown) {\n if (error instanceof Error) {\n console.error(error.message);\n }\n return null;\n }\n }\n\n *entries(): Generator<[string, S], void, undefined> {\n for (const [key, value] of this.#internal) {\n yield [key, value];\n }\n }\n}\n\n// Arrow functions, destructuring, spread, rest params\nconst createHandler = <T,>(\n ...middleware: Array<(ctx: T) => T>\n): ((initial: T) => T) => {\n return (initial: T): T => {\n let result = initial;\n for (const fn of middleware) {\n result = fn(result);\n }\n return result;\n };\n};\n\n// Switch, type guards, type assertions\nfunction processStatus(input: unknown): string {\n if (input === null || input === undefined) {\n return \"empty\";\n }\n\n switch (true) {\n case typeof input === \"number\":\n return (input as number) > 0 ? \"positive\" : \"non-positive\";\n case typeof input === \"boolean\":\n return input ? \"truthy\" : \"falsy\";\n case Array.isArray(input):\n return `array[${(input as unknown[]).length}]`;\n default:\n return String(input);\n }\n}\n\n// Async generator, for-await-of\nasync function* streamEvents(\n count: number,\n): AsyncGenerator<EventMap, void, unknown> {\n let i = 0;\n while (i < count) {\n await new Promise((resolve) => setTimeout(resolve, 100));\n yield { id: `evt_${i}`, status: Status.Success, timestamp: Date.now() };\n i++;\n }\n}\n\n// Usage with instanceof, delete, void, in operator\nexport async function main(): Promise<void> {\n const manager = new StateManager<{ value: number }>(\"app\");\n\n if (manager instanceof BaseComponent) {\n manager.emit(\"change\", {\n id: \"init\",\n status: Status.Idle,\n timestamp: Date.now(),\n });\n }\n\n for await (const event of streamEvents(MAX_RETRIES)) {\n if (\"timestamp\" in event && event.timestamp !== undefined) {\n void processStatus(event.status);\n }\n }\n\n const handler = createHandler<{ count: number }>(\n (ctx) => ({ ...ctx, count: ctx.count + 1 }),\n (ctx) => ({ ...ctx, count: ctx.count * 2 }),\n );\n\n const { count } = handler({ count: 0 });\n delete (manager as Record<string, unknown>)[\"temp\"];\n console.log(`Final count: ${count}`);\n}";
|
|
2
|
+
export declare const SAMPLE_CODE_CSS = "/* CSS Component Styles */\n:root {\n --primary-color: #4eb3d4;\n --spacing-unit: 0.5rem;\n --font-stack: \"Inter\", system-ui, sans-serif;\n --shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n margin: 0;\n}\n\nbody {\n font-family: var(--font-stack);\n font-size: 16px;\n line-height: 1.6;\n color: oklch(0.9 0.01 180);\n background-color: hsl(170, 30%, 5%);\n}\n\n/* Class and ID selectors */\n.container {\n max-width: 1200px;\n margin-inline: auto;\n padding: calc(var(--spacing-unit) * 4);\n}\n\n#main-header {\n position: sticky;\n top: 0;\n z-index: 100;\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n}\n\n/* Pseudo-classes and pseudo-elements */\na:hover,\na:focus-visible {\n color: var(--primary-color);\n text-decoration-thickness: 2px;\n}\n\nbutton:not(:disabled):active {\n transform: scale(0.98);\n}\n\n.tooltip::after {\n content: attr(data-tip);\n position: absolute;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n}\n\n/* Nesting, has(), media queries */\n.card {\n border-radius: 8px;\n box-shadow: var(--shadow);\n\n &:has(img) {\n overflow: hidden;\n }\n\n & > .card-title {\n font-weight: 700;\n font-size: clamp(1rem, 2vw + 0.5rem, 1.5rem);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n * {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n@keyframes fade-in {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@layer components {\n .btn-primary {\n background: linear-gradient(135deg, #4eb3d4, #39c6ac);\n border: none;\n padding: 0.75em 1.5em;\n border-radius: 9999px;\n color: white;\n cursor: pointer;\n }\n}";
|
|
3
|
+
export declare const SAMPLE_CODE_JSON = "{\n \"name\": \"@vesper/design-system\",\n \"version\": \"2.4.0\",\n \"private\": true,\n \"description\": \"A modern design system with accessible components\",\n \"keywords\": [\"react\", \"components\", \"design-system\", \"accessibility\"],\n \"author\": {\n \"name\": \"Vesper Team\",\n \"email\": \"team@vesper.dev\",\n \"url\": \"https://vesper.dev\"\n },\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=20.0.0\"\n },\n \"config\": {\n \"port\": 5173,\n \"debug\": false,\n \"verbose\": true,\n \"timeout\": null,\n \"retries\": 3,\n \"ratio\": 1.618,\n \"features\": {\n \"darkMode\": true,\n \"animations\": true,\n \"ssr\": false\n }\n },\n \"dependencies\": {\n \"react\": \"^19.0.0\",\n \"react-dom\": \"^19.0.0\"\n }\n}";
|
|
4
|
+
export declare const SAMPLE_CODE_MARKDOWN = "# Design System Documentation\n\n## Getting Started\n\nInstall the package using your preferred **package manager**:\n\n```bash\nyarn add @vesper/design-system\n```\n\n### Basic Usage\n\nImport components _directly_ from the package. Each component supports\n~~legacy props~~ the new **slot-based** API.\n\n> **Note:** All components are fully accessible and follow\n> WAI-ARIA guidelines for keyboard navigation.\n\n## Components\n\n| Component | Status | Version |\n|-----------|--------|---------|\n| Button | Stable | 2.0.0 |\n| Dialog | Beta | 1.9.0 |\n| Tooltip | Alpha | 0.5.0 |\n\n### Features\n\n- [x] Fully typed with TypeScript\n- [x] Tree-shakeable exports\n- [ ] CSS-in-JS support\n- [ ] React Server Components\n\n1. Install dependencies\n2. Configure your theme\n3. Import and use components\n\n---\n\nFor more details, visit [the docs](https://vesper.dev/docs) or check the\n on GitHub.\n\nUse inline code like `<Button variant=\"primary\" />` in your JSX files.";
|
|
5
|
+
export declare const SAMPLE_CODE_BASH = "#!/usr/bin/env bash\n# Build and deploy script for the design system\n\nset -euo pipefail\n\n# Variables and string interpolation\nPROJECT_ROOT=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\nBUILD_DIR=\"${PROJECT_ROOT}/dist\"\nVERSION=$(node -p \"require('./package.json').version\")\nTIMESTAMP=$(date +%Y%m%d_%H%M%S)\n\n# Function definition\nbuild_package() {\n local package_name=\"$1\"\n local outdir=\"${BUILD_DIR}/${package_name}\"\n\n echo \"Building ${package_name} v${VERSION}...\"\n\n if [[ -d \"$outdir\" ]]; then\n rm -rf \"$outdir\"\n fi\n\n mkdir -p \"$outdir\"\n\n # Pipe and redirect\n npx tsc --project \"./packages/${package_name}/tsconfig.json\" \\\n 2>&1 | tee \"${BUILD_DIR}/build_${TIMESTAMP}.log\"\n\n local exit_code=$?\n if (( exit_code != 0 )); then\n echo \"Error: Build failed with exit code ${exit_code}\" >&2\n return 1\n fi\n\n # Array and glob\n local -a files=(\"${outdir}\"/*.js)\n echo \"Generated ${#files[@]} files\"\n}\n\n# Conditional and loop\ndeploy() {\n local env=\"${1:-staging}\"\n\n case \"$env\" in\n production)\n echo \"Deploying to production...\"\n ;;\n staging|dev)\n echo \"Deploying to ${env}...\"\n ;;\n *)\n echo \"Unknown environment: $env\" >&2\n exit 1\n ;;\n esac\n\n for pkg in packages/*/; do\n [[ -f \"${pkg}package.json\" ]] || continue\n build_package \"$(basename \"$pkg\")\"\n done\n\n # Command substitution and arithmetic\n local total_size=$(du -sh \"$BUILD_DIR\" | cut -f1)\n local file_count=$(($(find \"$BUILD_DIR\" -type f | wc -l)))\n\n cat <<EOF\nDeploy Summary\n==============\nEnvironment: $env\nTotal Size: $total_size\nFile Count: $file_count\nEOF\n}\n\n# Main execution\ndeploy \"${1:-staging}\"";
|
|
6
|
+
export declare const SAMPLE_CODE_ANSI: string;
|
|
7
|
+
export declare const SAMPLE_CODE_PYTHON = "x_dfb = ttl.make_dataflow_buffer_like(x,\n shape = (2, 2),\n block_count = 2)\n\n@ttl.datamovement()\ndef some_read():\n with x_dfb.reserve() as x_blk:\n # produce data into x_blk ...\n # implicit x_dfb.push() at the end of the scope\n\n@ttl.compute()\ndef some_compute():\n x_blk = x_dfb.wait()\n # consume data in x_blk ...\n x_blk.pop() # explicit";
|
|
8
|
+
/**
|
|
9
|
+
* Simulate an incoming text stream
|
|
10
|
+
*/
|
|
11
|
+
export declare function createTextStream(code: string): ReadableStream<any>;
|
|
12
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/fixtures.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,+2IAgKjC,CAAC;AAKH,eAAO,MAAM,eAAe,oyDAkG1B,CAAC;AAGH,eAAO,MAAM,gBAAgB,izBAgC3B,CAAC;AAIH,eAAO,MAAM,oBAAoB,miCA0CwC,CAAC;AAI1E,eAAO,MAAM,gBAAgB,gvDA2EL,CAAC;AAMzB,eAAO,MAAM,gBAAgB,QA0BjB,CAAC;AAEb,eAAO,MAAM,kBAAkB,mYAcJ,CAAC;AAE5B;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,uBAkB5C"}
|