origam 2.2.1 → 2.3.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 +224 -0
- package/README.md +22 -0
- package/dist/src/assets/css/tokens/dark.css +318 -0
- package/dist/src/assets/css/tokens/light.css +159 -0
- package/dist/src/assets/locales/index.js +2 -2
- package/dist/src/assets/scss/tokens/_dark.scss +159 -0
- package/dist/src/assets/scss/tokens/_light.scss +159 -0
- package/dist/src/components/Bracket/OrigamBracket.vue +530 -0
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +210 -0
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +288 -0
- package/dist/src/components/Bracket/OrigamBracketRound.vue +150 -0
- package/dist/src/components/Bracket/index.cjs +34 -0
- package/dist/src/components/Bracket/index.d.ts +4 -0
- package/dist/src/components/Bracket/index.js +4 -0
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +28 -0
- package/dist/src/components/ClientOnly/index.cjs +13 -0
- package/dist/src/components/ClientOnly/index.d.ts +1 -0
- package/dist/src/components/ClientOnly/index.js +1 -0
- package/dist/src/components/Code/OrigamCode.vue +449 -0
- package/dist/src/components/Code/index.cjs +13 -0
- package/dist/src/components/Code/index.d.ts +1 -0
- package/dist/src/components/Code/index.js +1 -0
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1 -0
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +614 -0
- package/dist/src/components/CommandPalette/index.cjs +13 -0
- package/dist/src/components/CommandPalette/index.d.ts +1 -0
- package/dist/src/components/CommandPalette/index.js +1 -0
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1 -0
- package/dist/src/components/Parallax/OrigamParallax.vue +65 -34
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +119 -0
- package/dist/src/components/Parallax/index.cjs +7 -0
- package/dist/src/components/Parallax/index.d.ts +1 -0
- package/dist/src/components/Parallax/index.js +1 -0
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +1 -0
- package/dist/src/components/Select/OrigamSelect.vue +1 -0
- package/dist/src/components/SnackbarStack/OrigamSnackbarStack.vue +457 -0
- package/dist/src/components/SnackbarStack/index.cjs +13 -0
- package/dist/src/components/SnackbarStack/index.d.ts +1 -0
- package/dist/src/components/SnackbarStack/index.js +1 -0
- package/dist/src/components/Tabs/OrigamTab.vue +263 -0
- package/dist/src/components/Tabs/OrigamTabPanel.vue +112 -0
- package/dist/src/components/Tabs/OrigamTabPanels.vue +139 -0
- package/dist/src/components/Tabs/OrigamTabs.vue +242 -0
- package/dist/src/components/Tabs/index.cjs +34 -0
- package/dist/src/components/Tabs/index.d.ts +4 -0
- package/dist/src/components/Tabs/index.js +4 -0
- package/dist/src/components/TextField/OrigamTextField.vue +75 -5
- package/dist/src/components/TextareaField/OrigamRichToolbar.vue +284 -0
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +192 -5
- package/dist/src/components/TextareaField/index.cjs +7 -0
- package/dist/src/components/TextareaField/index.d.ts +1 -0
- package/dist/src/components/TextareaField/index.js +1 -0
- package/dist/src/components/index.cjs +66 -0
- package/dist/src/components/index.d.ts +6 -0
- package/dist/src/components/index.js +6 -0
- package/dist/src/composables/Code/code.composable.cjs +98 -0
- package/dist/src/composables/Code/code.composable.d.ts +10 -0
- package/dist/src/composables/Code/code.composable.js +82 -0
- package/dist/src/composables/CommandPalette/command.composable.cjs +53 -0
- package/dist/src/composables/CommandPalette/command.composable.d.ts +37 -0
- package/dist/src/composables/CommandPalette/command.composable.js +46 -0
- package/dist/src/composables/Commons/virtual.composable.cjs +1 -0
- package/dist/src/composables/Commons/virtual.composable.js +1 -0
- package/dist/src/composables/CssSupport/cssSupport.composable.cjs +12 -0
- package/dist/src/composables/CssSupport/cssSupport.composable.d.ts +25 -0
- package/dist/src/composables/CssSupport/cssSupport.composable.js +10 -1
- package/dist/src/composables/DataTable/headers.composable.d.ts +36 -36
- package/dist/src/composables/Mask/index.cjs +16 -0
- package/dist/src/composables/Mask/index.d.ts +1 -0
- package/dist/src/composables/Mask/index.js +1 -0
- package/dist/src/composables/Mask/mask.composable.cjs +57 -0
- package/dist/src/composables/Mask/mask.composable.d.ts +39 -0
- package/dist/src/composables/Mask/mask.composable.js +51 -0
- package/dist/src/composables/Parallax/parallax.composable.cjs +232 -0
- package/dist/src/composables/Parallax/parallax.composable.d.ts +60 -0
- package/dist/src/composables/Parallax/parallax.composable.js +219 -0
- package/dist/src/composables/Responsive/aspect.composable.cjs +6 -1
- package/dist/src/composables/Responsive/aspect.composable.d.ts +10 -0
- package/dist/src/composables/Responsive/aspect.composable.js +6 -1
- package/dist/src/composables/SnackbarStack/snackbar-stack.composable.cjs +102 -0
- package/dist/src/composables/SnackbarStack/snackbar-stack.composable.d.ts +58 -0
- package/dist/src/composables/SnackbarStack/snackbar-stack.composable.js +92 -0
- package/dist/src/composables/Textarea/textarea-rich.composable.cjs +263 -0
- package/dist/src/composables/Textarea/textarea-rich.composable.d.ts +41 -0
- package/dist/src/composables/Textarea/textarea-rich.composable.js +257 -0
- package/dist/src/composables/index.cjs +66 -0
- package/dist/src/composables/index.d.ts +6 -0
- package/dist/src/composables/index.js +6 -0
- package/dist/src/consts/Bracket/bracket.const.cjs +12 -0
- package/dist/src/consts/Bracket/bracket.const.d.ts +34 -0
- package/dist/src/consts/Bracket/bracket.const.js +15 -0
- package/dist/src/consts/Code/code.const.cjs +26 -0
- package/dist/src/consts/Code/code.const.d.ts +40 -0
- package/dist/src/consts/Code/code.const.js +35 -0
- package/dist/src/consts/CommandPalette/command-palette.const.cjs +10 -0
- package/dist/src/consts/CommandPalette/command-palette.const.d.ts +16 -0
- package/dist/src/consts/CommandPalette/command-palette.const.js +7 -0
- package/dist/src/consts/Mask/built-in-patterns.const.cjs +66 -0
- package/dist/src/consts/Mask/built-in-patterns.const.d.ts +20 -0
- package/dist/src/consts/Mask/built-in-patterns.const.js +60 -0
- package/dist/src/consts/Parallax/parallax-layer.const.cjs +7 -0
- package/dist/src/consts/Parallax/parallax-layer.const.d.ts +3 -0
- package/dist/src/consts/Parallax/parallax-layer.const.js +1 -0
- package/dist/src/consts/SnackbarStack/snackbar-stack.const.cjs +12 -0
- package/dist/src/consts/SnackbarStack/snackbar-stack.const.d.ts +33 -0
- package/dist/src/consts/SnackbarStack/snackbar-stack.const.js +18 -0
- package/dist/src/consts/Tabs/tabs.const.cjs +9 -0
- package/dist/src/consts/Tabs/tabs.const.d.ts +23 -0
- package/dist/src/consts/Tabs/tabs.const.js +3 -0
- package/dist/src/consts/Textarea/textarea.const.cjs +28 -0
- package/dist/src/consts/Textarea/textarea.const.d.ts +38 -0
- package/dist/src/consts/Textarea/textarea.const.js +65 -0
- package/dist/src/consts/Theme/theme.const.cjs +15 -0
- package/dist/src/consts/Theme/theme.const.d.ts +9 -0
- package/dist/src/consts/Theme/theme.const.js +9 -0
- package/dist/src/consts/index.cjs +99 -0
- package/dist/src/consts/index.d.ts +9 -0
- package/dist/src/consts/index.js +9 -0
- package/dist/src/enums/Bracket/bracket-match-status.enum.cjs +13 -0
- package/dist/src/enums/Bracket/bracket-match-status.enum.d.ts +6 -0
- package/dist/src/enums/Bracket/bracket-match-status.enum.js +7 -0
- package/dist/src/enums/Bracket/bracket-variant.enum.cjs +12 -0
- package/dist/src/enums/Bracket/bracket-variant.enum.d.ts +5 -0
- package/dist/src/enums/Bracket/bracket-variant.enum.js +6 -0
- package/dist/src/enums/Code/code-lang.enum.cjs +23 -0
- package/dist/src/enums/Code/code-lang.enum.d.ts +25 -0
- package/dist/src/enums/Code/code-lang.enum.js +17 -0
- package/dist/src/enums/Code/code-theme.enum.cjs +12 -0
- package/dist/src/enums/Code/code-theme.enum.d.ts +12 -0
- package/dist/src/enums/Code/code-theme.enum.js +6 -0
- package/dist/src/enums/Mask/mask.enum.cjs +28 -0
- package/dist/src/enums/Mask/mask.enum.d.ts +36 -0
- package/dist/src/enums/Mask/mask.enum.js +22 -0
- package/dist/src/enums/Parallax/parallax-direction.enum.cjs +12 -0
- package/dist/src/enums/Parallax/parallax-direction.enum.d.ts +5 -0
- package/dist/src/enums/Parallax/parallax-direction.enum.js +6 -0
- package/dist/src/enums/Parallax/parallax-easing.enum.cjs +12 -0
- package/dist/src/enums/Parallax/parallax-easing.enum.d.ts +5 -0
- package/dist/src/enums/Parallax/parallax-easing.enum.js +6 -0
- package/dist/src/enums/Tabs/tab-variant.enum.cjs +12 -0
- package/dist/src/enums/Tabs/tab-variant.enum.d.ts +5 -0
- package/dist/src/enums/Tabs/tab-variant.enum.js +6 -0
- package/dist/src/enums/Textarea/textarea-mode.enum.cjs +11 -0
- package/dist/src/enums/Textarea/textarea-mode.enum.d.ts +13 -0
- package/dist/src/enums/Textarea/textarea-mode.enum.js +5 -0
- package/dist/src/enums/Textarea/textarea-output.enum.cjs +11 -0
- package/dist/src/enums/Textarea/textarea-output.enum.d.ts +14 -0
- package/dist/src/enums/Textarea/textarea-output.enum.js +5 -0
- package/dist/src/enums/Textarea/textarea-toolbar-command.enum.cjs +21 -0
- package/dist/src/enums/Textarea/textarea-toolbar-command.enum.d.ts +20 -0
- package/dist/src/enums/Textarea/textarea-toolbar-command.enum.js +15 -0
- package/dist/src/enums/Textarea/textarea-toolbar-position.enum.cjs +12 -0
- package/dist/src/enums/Textarea/textarea-toolbar-position.enum.d.ts +10 -0
- package/dist/src/enums/Textarea/textarea-toolbar-position.enum.js +6 -0
- package/dist/src/enums/index.cjs +132 -0
- package/dist/src/enums/index.d.ts +12 -0
- package/dist/src/enums/index.js +12 -0
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.d.ts +53 -0
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-competitor.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-competitor.interface.d.ts +25 -0
- package/dist/src/interfaces/Bracket/bracket-competitor.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.d.ts +45 -0
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-match.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-match.interface.d.ts +51 -0
- package/dist/src/interfaces/Bracket/bracket-match.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.d.ts +26 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-round.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-round.interface.d.ts +27 -0
- package/dist/src/interfaces/Bracket/bracket-round.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket.interface.d.ts +71 -0
- package/dist/src/interfaces/Bracket/bracket.interface.js +0 -0
- package/dist/src/interfaces/Code/code.interface.cjs +1 -0
- package/dist/src/interfaces/Code/code.interface.d.ts +99 -0
- package/dist/src/interfaces/Code/code.interface.js +0 -0
- package/dist/src/interfaces/CommandPalette/command-palette.interface.cjs +1 -0
- package/dist/src/interfaces/CommandPalette/command-palette.interface.d.ts +57 -0
- package/dist/src/interfaces/CommandPalette/command-palette.interface.js +0 -0
- package/dist/src/interfaces/CommandPalette/command.interface.cjs +1 -0
- package/dist/src/interfaces/CommandPalette/command.interface.d.ts +51 -0
- package/dist/src/interfaces/CommandPalette/command.interface.js +0 -0
- package/dist/src/interfaces/Mask/mask-options.interface.cjs +1 -0
- package/dist/src/interfaces/Mask/mask-options.interface.d.ts +48 -0
- package/dist/src/interfaces/Mask/mask-options.interface.js +0 -0
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.cjs +1 -0
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.d.ts +73 -0
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.js +0 -0
- package/dist/src/interfaces/Parallax/parallax-layer.interface.cjs +1 -0
- package/dist/src/interfaces/Parallax/parallax-layer.interface.d.ts +39 -0
- package/dist/src/interfaces/Parallax/parallax-layer.interface.js +0 -0
- package/dist/src/interfaces/Parallax/parallax.interface.d.ts +83 -3
- package/dist/src/interfaces/SnackbarStack/snackbar-stack-item.interface.cjs +1 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack-item.interface.d.ts +60 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack-item.interface.js +0 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack.interface.cjs +1 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack.interface.d.ts +60 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tab-panel.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tab-panel.interface.d.ts +12 -0
- package/dist/src/interfaces/Tabs/tab-panel.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tab-panels.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tab-panels.interface.d.ts +28 -0
- package/dist/src/interfaces/Tabs/tab-panels.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tab.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tab.interface.d.ts +18 -0
- package/dist/src/interfaces/Tabs/tab.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tabs.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tabs.interface.d.ts +26 -0
- package/dist/src/interfaces/Tabs/tabs.interface.js +0 -0
- package/dist/src/interfaces/TextField/text-field.interface.d.ts +21 -1
- package/dist/src/interfaces/Textarea/textarea-rich.interface.cjs +1 -0
- package/dist/src/interfaces/Textarea/textarea-rich.interface.d.ts +41 -0
- package/dist/src/interfaces/Textarea/textarea-rich.interface.js +0 -0
- package/dist/src/interfaces/Textarea/textarea-toolbar.interface.cjs +1 -0
- package/dist/src/interfaces/Textarea/textarea-toolbar.interface.d.ts +31 -0
- package/dist/src/interfaces/Textarea/textarea-toolbar.interface.js +0 -0
- package/dist/src/interfaces/TextareaField/textarea-field.interface.d.ts +38 -1
- package/dist/src/interfaces/index.cjs +231 -0
- package/dist/src/interfaces/index.d.ts +21 -0
- package/dist/src/interfaces/index.js +21 -0
- package/dist/src/nuxt/index.cjs +13 -0
- package/dist/src/nuxt/index.d.ts +2 -0
- package/dist/src/nuxt/index.js +1 -0
- package/dist/src/nuxt/module.cjs +74 -0
- package/dist/src/nuxt/module.d.ts +31 -0
- package/dist/src/nuxt/module.js +68 -0
- package/dist/src/nuxt/plugin.client.cjs +44 -0
- package/dist/src/nuxt/plugin.client.d.ts +2 -0
- package/dist/src/nuxt/plugin.client.js +36 -0
- package/dist/src/nuxt/plugin.server.cjs +51 -0
- package/dist/src/nuxt/plugin.server.d.ts +2 -0
- package/dist/src/nuxt/plugin.server.js +45 -0
- package/dist/src/types/Bracket/bracket-direction.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-direction.type.d.ts +13 -0
- package/dist/src/types/Bracket/bracket-direction.type.js +0 -0
- package/dist/src/types/Bracket/bracket-match-status.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-match-status.type.d.ts +2 -0
- package/dist/src/types/Bracket/bracket-match-status.type.js +0 -0
- package/dist/src/types/Bracket/bracket-round-side.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-round-side.type.d.ts +12 -0
- package/dist/src/types/Bracket/bracket-round-side.type.js +0 -0
- package/dist/src/types/Bracket/bracket-variant.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-variant.type.d.ts +2 -0
- package/dist/src/types/Bracket/bracket-variant.type.js +0 -0
- package/dist/src/types/Code/code-lang.type.cjs +1 -0
- package/dist/src/types/Code/code-lang.type.d.ts +2 -0
- package/dist/src/types/Code/code-lang.type.js +0 -0
- package/dist/src/types/Code/code-theme.type.cjs +1 -0
- package/dist/src/types/Code/code-theme.type.d.ts +2 -0
- package/dist/src/types/Code/code-theme.type.js +0 -0
- package/dist/src/types/CommandPalette/command-palette-hotkey.type.cjs +1 -0
- package/dist/src/types/CommandPalette/command-palette-hotkey.type.d.ts +5 -0
- package/dist/src/types/CommandPalette/command-palette-hotkey.type.js +0 -0
- package/dist/src/types/Mask/built-in-pattern.type.cjs +1 -0
- package/dist/src/types/Mask/built-in-pattern.type.d.ts +7 -0
- package/dist/src/types/Mask/built-in-pattern.type.js +0 -0
- package/dist/src/types/Mask/mask.type.cjs +1 -0
- package/dist/src/types/Mask/mask.type.d.ts +19 -0
- package/dist/src/types/Mask/mask.type.js +0 -0
- package/dist/src/types/Mask/pattern-validator.type.cjs +1 -0
- package/dist/src/types/Mask/pattern-validator.type.d.ts +16 -0
- package/dist/src/types/Mask/pattern-validator.type.js +0 -0
- package/dist/src/types/Parallax/parallax-direction.type.cjs +1 -0
- package/dist/src/types/Parallax/parallax-direction.type.d.ts +2 -0
- package/dist/src/types/Parallax/parallax-direction.type.js +0 -0
- package/dist/src/types/Parallax/parallax-easing.type.cjs +1 -0
- package/dist/src/types/Parallax/parallax-easing.type.d.ts +2 -0
- package/dist/src/types/Parallax/parallax-easing.type.js +0 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-direction.type.cjs +1 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-direction.type.d.ts +11 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-direction.type.js +0 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-location.type.cjs +1 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-location.type.d.ts +9 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-location.type.js +0 -0
- package/dist/src/types/SnackbarStack/snackbar-stack.type.cjs +1 -0
- package/dist/src/types/SnackbarStack/snackbar-stack.type.d.ts +2 -0
- package/dist/src/types/SnackbarStack/snackbar-stack.type.js +0 -0
- package/dist/src/types/Tabs/tab-panel.type.cjs +1 -0
- package/dist/src/types/Tabs/tab-panel.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab-panel.type.js +0 -0
- package/dist/src/types/Tabs/tab-panels.type.cjs +1 -0
- package/dist/src/types/Tabs/tab-panels.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab-panels.type.js +0 -0
- package/dist/src/types/Tabs/tab-variant.type.cjs +1 -0
- package/dist/src/types/Tabs/tab-variant.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab-variant.type.js +0 -0
- package/dist/src/types/Tabs/tab.type.cjs +1 -0
- package/dist/src/types/Tabs/tab.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab.type.js +0 -0
- package/dist/src/types/Tabs/tabs.type.cjs +1 -0
- package/dist/src/types/Tabs/tabs.type.d.ts +2 -0
- package/dist/src/types/Tabs/tabs.type.js +0 -0
- package/dist/src/types/Textarea/textarea-mode.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-mode.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-mode.type.js +0 -0
- package/dist/src/types/Textarea/textarea-output.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-output.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-output.type.js +0 -0
- package/dist/src/types/Textarea/textarea-toolbar-command.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-toolbar-command.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-toolbar-command.type.js +0 -0
- package/dist/src/types/Textarea/textarea-toolbar-position.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-toolbar-position.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-toolbar-position.type.js +0 -0
- package/dist/src/types/index.cjs +264 -0
- package/dist/src/types/index.d.ts +24 -0
- package/dist/src/types/index.js +24 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Code/parse-highlight-lines.util.cjs +34 -0
- package/dist/src/utils/Code/parse-highlight-lines.util.d.ts +24 -0
- package/dist/src/utils/Code/parse-highlight-lines.util.js +28 -0
- package/dist/src/utils/CommandPalette/fuzzy-match.util.cjs +84 -0
- package/dist/src/utils/CommandPalette/fuzzy-match.util.d.ts +51 -0
- package/dist/src/utils/CommandPalette/fuzzy-match.util.js +62 -0
- package/dist/src/utils/Mask/apply-mask.util.cjs +120 -0
- package/dist/src/utils/Mask/apply-mask.util.d.ts +13 -0
- package/dist/src/utils/Mask/apply-mask.util.js +91 -0
- package/dist/src/utils/Mask/index.cjs +38 -0
- package/dist/src/utils/Mask/index.d.ts +3 -0
- package/dist/src/utils/Mask/index.js +3 -0
- package/dist/src/utils/Mask/resolve-mask-config.util.cjs +31 -0
- package/dist/src/utils/Mask/resolve-mask-config.util.d.ts +15 -0
- package/dist/src/utils/Mask/resolve-mask-config.util.js +21 -0
- package/dist/src/utils/Mask/validate-pattern.util.cjs +92 -0
- package/dist/src/utils/Mask/validate-pattern.util.d.ts +41 -0
- package/dist/src/utils/Mask/validate-pattern.util.js +81 -0
- package/dist/src/utils/Textarea/html-to-markdown.util.cjs +85 -0
- package/dist/src/utils/Textarea/html-to-markdown.util.d.ts +21 -0
- package/dist/src/utils/Textarea/html-to-markdown.util.js +78 -0
- package/dist/src/utils/Textarea/sanitize-html.util.cjs +82 -0
- package/dist/src/utils/Textarea/sanitize-html.util.d.ts +17 -0
- package/dist/src/utils/Textarea/sanitize-html.util.js +83 -0
- package/dist/src/utils/index.cjs +77 -0
- package/dist/src/utils/index.d.ts +7 -0
- package/dist/src/utils/index.js +7 -0
- package/package.json +13 -3
- package/dist/src/globals.d.ts +0 -172
- package/dist/src/shims.d.ts +0 -36
- package/dist/src/vite-env.d.ts +0 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { IBorderProps, ICommonsComponentProps, IElevationProps, IMarginProps, IPaddingProps, IRoundedProps, ITagProps } from '../index';
|
|
2
|
+
import type { TCodeLang, TCodeTheme } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for `<OrigamCode>` — a shiki-powered code block with line numbers,
|
|
5
|
+
* line highlighting, copy button and theme awareness.
|
|
6
|
+
*
|
|
7
|
+
* Backward-compat note: the v2.x `<OrigamCode>` was a thin `<pre>` wrapper
|
|
8
|
+
* with a `code` prop only. Every new prop below is optional with a
|
|
9
|
+
* conservative default so existing call sites keep their behaviour
|
|
10
|
+
* (plain-text, no line numbers, copy button visible).
|
|
11
|
+
*/
|
|
12
|
+
export interface ICodeProps extends ICommonsComponentProps, ITagProps, IBorderProps, IRoundedProps, IElevationProps, IPaddingProps, IMarginProps {
|
|
13
|
+
/**
|
|
14
|
+
* The code to highlight. When omitted, the default slot is used as the
|
|
15
|
+
* source — useful for multi-line snippets that are nicer to read in
|
|
16
|
+
* the template than as a JS string literal. When both are provided,
|
|
17
|
+
* the prop wins.
|
|
18
|
+
*/
|
|
19
|
+
code?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Language grammar to apply. One of the values in `SUPPORTED_LANGS`.
|
|
22
|
+
* Unknown values fall back to `plaintext` (with a one-shot console
|
|
23
|
+
* warning).
|
|
24
|
+
*/
|
|
25
|
+
lang?: TCodeLang;
|
|
26
|
+
/**
|
|
27
|
+
* Show a left gutter with line numbers. Pure CSS — uses a CSS counter
|
|
28
|
+
* incremented per `.origam-code__row`, no JS layout work.
|
|
29
|
+
*/
|
|
30
|
+
lineNumbers?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Lines to highlight. Accepts either a pre-computed array of 1-based
|
|
33
|
+
* line numbers (`[2, 5, 6, 7]`) or a comma/range string (`'2,5-7'`)
|
|
34
|
+
* that the component parses via `parseHighlightLines()`. `null` /
|
|
35
|
+
* empty disables the feature.
|
|
36
|
+
*/
|
|
37
|
+
highlightLines?: number[] | string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Show the copy-to-clipboard button in the top-right corner. Defaults
|
|
40
|
+
* to `true` — most code blocks benefit from it.
|
|
41
|
+
*/
|
|
42
|
+
copyable?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Cap the rendered block at this height and enable vertical scroll
|
|
45
|
+
* past it. `null` (default) lets the block grow to fit its content.
|
|
46
|
+
*/
|
|
47
|
+
maxHeight?: number | string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Theme override. `'auto'` (default) follows the document theme,
|
|
50
|
+
* `'light'` / `'dark'` force a specific shiki theme.
|
|
51
|
+
*/
|
|
52
|
+
theme?: TCodeTheme;
|
|
53
|
+
/**
|
|
54
|
+
* Auto-format the code before highlighting. Reserved for v3 — prettier
|
|
55
|
+
* is intentionally NOT bundled at runtime to keep the tarball small.
|
|
56
|
+
* Currently a no-op; passing `true` warns once in dev and pre-formats
|
|
57
|
+
* via a best-effort whitespace trim only.
|
|
58
|
+
*/
|
|
59
|
+
format?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Wrap long lines instead of scrolling horizontally. Off by default so
|
|
62
|
+
* the visual column matches the source file.
|
|
63
|
+
*/
|
|
64
|
+
wrap?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Optional filename rendered in the header bar (e.g. `'App.vue'`).
|
|
67
|
+
* When provided AND `copyable` is true, the header also hosts the copy
|
|
68
|
+
* button; otherwise the copy button is absolutely positioned in the
|
|
69
|
+
* top-right corner of the code surface.
|
|
70
|
+
*/
|
|
71
|
+
filename?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Public surface of the `useCode` composable. Lazily instantiates a shiki
|
|
75
|
+
* highlighter on first call and reuses it across every `OrigamCode`
|
|
76
|
+
* instance for the lifetime of the page.
|
|
77
|
+
*/
|
|
78
|
+
export interface IUseCodeReturn {
|
|
79
|
+
/**
|
|
80
|
+
* Render `code` to a pre-tokenised HTML string. Resolves once the
|
|
81
|
+
* underlying shiki highlighter has loaded the requested language /
|
|
82
|
+
* theme (lazy; ~200 ms cold, instant on subsequent calls).
|
|
83
|
+
*/
|
|
84
|
+
highlight(code: string, lang: TCodeLang, themeName: 'light' | 'dark'): Promise<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Force the highlighter to load. Useful for stories / tests that want
|
|
87
|
+
* to warm the cache before mounting consumers.
|
|
88
|
+
*/
|
|
89
|
+
prime(): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the singleton highlighter is ready. `false` on first paint,
|
|
92
|
+
* flips to `true` once the dynamic import finishes.
|
|
93
|
+
*/
|
|
94
|
+
isReady(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Wipe the LRU cache. Test-only — production code never needs this.
|
|
97
|
+
*/
|
|
98
|
+
resetCacheForTesting(): void;
|
|
99
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ICommand } from './command.interface';
|
|
2
|
+
import type { ICommonsComponentProps } from '../Commons/commons.interface';
|
|
3
|
+
/**
|
|
4
|
+
* A hotkey is either a single combination (`['meta', 'k']`) or an
|
|
5
|
+
* array of alternatives — every entry being a list of normalised key
|
|
6
|
+
* tokens compatible with `useHotkey` (e.g. `[['meta', 'k'], ['ctrl', 'k']]`).
|
|
7
|
+
*
|
|
8
|
+
* The component normalises a single-combination input (`['meta', 'k']`)
|
|
9
|
+
* to the multi-combination shape (`[['meta', 'k']]`) before installing
|
|
10
|
+
* the listeners so consumers can pass either form interchangeably.
|
|
11
|
+
*/
|
|
12
|
+
export type TCommandPaletteHotkey = ReadonlyArray<string> | ReadonlyArray<ReadonlyArray<string>>;
|
|
13
|
+
export interface ICommandPaletteProps extends ICommonsComponentProps {
|
|
14
|
+
/** v-model — whether the palette is open. */
|
|
15
|
+
modelValue?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Global hotkey(s) that toggle the palette open. Defaults to
|
|
18
|
+
* `[['meta', 'k'], ['ctrl', 'k']]` (⌘K / Ctrl+K). Pass `null`
|
|
19
|
+
* to disable the global listener entirely.
|
|
20
|
+
*/
|
|
21
|
+
hotkey?: TCommandPaletteHotkey | null;
|
|
22
|
+
/**
|
|
23
|
+
* Static command list. When omitted, the palette renders commands
|
|
24
|
+
* registered via the `useCommand()` global registry instead.
|
|
25
|
+
*/
|
|
26
|
+
commands?: ReadonlyArray<ICommand>;
|
|
27
|
+
/** Placeholder of the search input (already-translated string). */
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/** Empty-state message when no command matches the query. */
|
|
30
|
+
emptyText?: string;
|
|
31
|
+
/** Max height of the result list. Number → px. */
|
|
32
|
+
maxHeight?: number | string;
|
|
33
|
+
/** Width of the palette dialog. Number → px. */
|
|
34
|
+
width?: number | string;
|
|
35
|
+
/** Display a loader inside the result list (use during async fetches). */
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
/** Close the palette automatically when a command is selected. */
|
|
38
|
+
closeOnSelect?: boolean;
|
|
39
|
+
/** Close when the user presses Escape. */
|
|
40
|
+
closeOnEscape?: boolean;
|
|
41
|
+
/** Close when the user clicks the backdrop. */
|
|
42
|
+
closeOnBackdrop?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface ICommandPaletteEmits {
|
|
45
|
+
(e: 'update:modelValue', value: boolean): void;
|
|
46
|
+
(e: 'select', command: ICommand): void;
|
|
47
|
+
(e: 'query', text: string): void;
|
|
48
|
+
}
|
|
49
|
+
export interface ICommandPaletteSlotProps {
|
|
50
|
+
command: ICommand;
|
|
51
|
+
isActive: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface ICommandPaletteSlots {
|
|
54
|
+
item?: (props: ICommandPaletteSlotProps) => any;
|
|
55
|
+
empty?: () => any;
|
|
56
|
+
footer?: () => any;
|
|
57
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { TIcon } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* A single command/action exposed by `OrigamCommandPalette`.
|
|
4
|
+
*
|
|
5
|
+
* Commands are registered either declaratively through the
|
|
6
|
+
* `commands` prop on `<OrigamCommandPalette>` OR programmatically
|
|
7
|
+
* via the `useCommand().register(cmd)` composable. The composable
|
|
8
|
+
* route is preferred when commands need to spawn from feature code
|
|
9
|
+
* that owns the side-effect (router push, store mutation, …).
|
|
10
|
+
*/
|
|
11
|
+
export interface ICommand {
|
|
12
|
+
/**
|
|
13
|
+
* Stable identifier. Used as the v-for key, the ARIA
|
|
14
|
+
* `aria-activedescendant` target and as the dedup key in the
|
|
15
|
+
* registry — registering twice with the same `id` overwrites
|
|
16
|
+
* the previous entry instead of duplicating it.
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/** Visible primary label. Drives the default fuzzy-match input. */
|
|
20
|
+
label: string;
|
|
21
|
+
/** Secondary line shown under the label (optional). */
|
|
22
|
+
description?: string;
|
|
23
|
+
/** Optional prepend icon. */
|
|
24
|
+
icon?: TIcon;
|
|
25
|
+
/**
|
|
26
|
+
* Keyboard shortcut hint rendered through `<OrigamKbd>` next to
|
|
27
|
+
* the action. Display-only — it does NOT bind a global listener.
|
|
28
|
+
* (To bind a shortcut globally, use the `hotkey` prop on the
|
|
29
|
+
* palette OR the `useHotkey` composable on the call site.)
|
|
30
|
+
*/
|
|
31
|
+
kbd?: ReadonlyArray<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Group label (e.g. "Navigation", "Settings"). Commands sharing
|
|
34
|
+
* the same group render under the same subheader. Commands
|
|
35
|
+
* without a group fall back to a default bucket rendered first.
|
|
36
|
+
*/
|
|
37
|
+
group?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Extra search terms that should match the command (e.g.
|
|
40
|
+
* `['preferences', 'config']` for a "Settings" entry).
|
|
41
|
+
*/
|
|
42
|
+
keywords?: ReadonlyArray<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Handler invoked when the command is selected. May be async — the
|
|
45
|
+
* palette awaits the returned promise before closing (when
|
|
46
|
+
* `closeOnSelect` is `true`).
|
|
47
|
+
*/
|
|
48
|
+
perform: () => void | Promise<void>;
|
|
49
|
+
/** Disabled commands stay visible but cannot be selected. */
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { TPatternValidator } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration object accepted by `useMask` / the
|
|
4
|
+
* `OrigamTextField.mask` prop in its long form.
|
|
5
|
+
*
|
|
6
|
+
* - `pattern` — token-walker template. `#` = digit,
|
|
7
|
+
* `A` = letter, `*` = any char, anything
|
|
8
|
+
* else is a literal preserved verbatim.
|
|
9
|
+
* - `validator` — optional secondary check on the UNMASKED
|
|
10
|
+
* value (e.g. Luhn for credit cards).
|
|
11
|
+
* - `required` — when `true`, `isValid` is `false` until
|
|
12
|
+
* every consumer token is filled.
|
|
13
|
+
*/
|
|
14
|
+
export interface IMaskOptions {
|
|
15
|
+
pattern: string;
|
|
16
|
+
validator?: TPatternValidator | null;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Resolved config returned by `resolveMaskConfig` after
|
|
21
|
+
* normalising a string / preset key / IMaskOptions input.
|
|
22
|
+
* `pattern` is always a raw template string at this layer.
|
|
23
|
+
*/
|
|
24
|
+
export interface IResolvedMaskConfig {
|
|
25
|
+
pattern: string;
|
|
26
|
+
validator: TPatternValidator | null;
|
|
27
|
+
required: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Output shape of `applyMask`. `masked` is the formatted
|
|
31
|
+
* display string (literals interleaved); `unmasked` is the
|
|
32
|
+
* raw user-provided characters (consumer slots only).
|
|
33
|
+
*/
|
|
34
|
+
export interface IMaskApplyResult {
|
|
35
|
+
masked: string;
|
|
36
|
+
unmasked: string;
|
|
37
|
+
complete: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Token emitted by the pattern parser. `consumer` flags
|
|
41
|
+
* whether the token consumes one character from the input
|
|
42
|
+
* (`#`, `A`, `*`) or is a literal kept verbatim.
|
|
43
|
+
*/
|
|
44
|
+
export interface IMaskToken {
|
|
45
|
+
kind: 'digit' | 'letter' | 'any' | 'literal';
|
|
46
|
+
char: string;
|
|
47
|
+
consumer: boolean;
|
|
48
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options passed by a consumer in `nuxt.config.ts` under the `origam` key.
|
|
3
|
+
*
|
|
4
|
+
* All fields are optional — the module applies sensible defaults (see
|
|
5
|
+
* `DEFAULTS` in `src/nuxt/module.ts`). Themes are auto-injected as CSS
|
|
6
|
+
* imports; the active theme is resolved SSR-side via cookie and the
|
|
7
|
+
* `Sec-CH-Prefers-Color-Scheme` client hint to avoid FOUC and hydration
|
|
8
|
+
* mismatches.
|
|
9
|
+
*/
|
|
10
|
+
export interface IOrigamNuxtModuleOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Theme names whose CSS file must be loaded. Each name must match a
|
|
13
|
+
* generated `dist/src/assets/css/tokens/{theme}.css` exposed via
|
|
14
|
+
* `origam/tokens/css/{theme}`.
|
|
15
|
+
*
|
|
16
|
+
* @default ['light', 'dark']
|
|
17
|
+
*/
|
|
18
|
+
themes?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* Theme applied when no cookie is set and no usable
|
|
21
|
+
* `Sec-CH-Prefers-Color-Scheme` hint is sent. Use `'auto'` to let the
|
|
22
|
+
* server fall back to the client hint (or `'light'` if absent).
|
|
23
|
+
*
|
|
24
|
+
* @default 'auto'
|
|
25
|
+
*/
|
|
26
|
+
defaultTheme?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Cookie name used to persist the user's chosen theme across sessions.
|
|
29
|
+
*
|
|
30
|
+
* @default 'origam-theme'
|
|
31
|
+
*/
|
|
32
|
+
cookieName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Cookie `max-age` in seconds.
|
|
35
|
+
*
|
|
36
|
+
* @default 31_536_000 (1 year)
|
|
37
|
+
*/
|
|
38
|
+
cookieMaxAge?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Register components and composables as Nuxt auto-imports. Disable if
|
|
41
|
+
* you want to opt-out and import everything explicitly (or namespace
|
|
42
|
+
* the imports to avoid conflicts with another design system).
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
autoImport?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Inject the generated utility classes stylesheet (`origam-utilities.css`).
|
|
49
|
+
* Keep it on unless the consumer ships their own utility layer.
|
|
50
|
+
*
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
includeUtilities?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Prefix applied to auto-imported components. Origam ships components
|
|
56
|
+
* already prefixed `Origam*` so the default is an empty prefix — set
|
|
57
|
+
* this to override if you need a custom namespace.
|
|
58
|
+
*
|
|
59
|
+
* @default 'Origam'
|
|
60
|
+
*/
|
|
61
|
+
prefix?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Shape of the public runtime config exposed by the module on
|
|
65
|
+
* `useRuntimeConfig().public.origam`. The plugins read this at boot to
|
|
66
|
+
* resolve the active theme and configure the cookie.
|
|
67
|
+
*/
|
|
68
|
+
export interface IOrigamNuxtRuntimeConfig {
|
|
69
|
+
themes: string[];
|
|
70
|
+
defaultTheme: string;
|
|
71
|
+
cookieName: string;
|
|
72
|
+
cookieMaxAge: number;
|
|
73
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ICommonsComponentProps, ITagProps } from '../../interfaces';
|
|
2
|
+
export interface IParallaxLayerProps extends ICommonsComponentProps, ITagProps {
|
|
3
|
+
/**
|
|
4
|
+
* Parallax speed multiplier for this layer.
|
|
5
|
+
* - `0` → fixed (no movement, sticks to host)
|
|
6
|
+
* - `0.5` → half the scroll speed (background — far)
|
|
7
|
+
* - `1` → moves with the scroll (neutral)
|
|
8
|
+
* - `>1` → faster than the scroll (foreground — near)
|
|
9
|
+
*
|
|
10
|
+
* Negative values reverse the direction.
|
|
11
|
+
*/
|
|
12
|
+
speed?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Static X-axis offset (px) applied on top of the parallax translation.
|
|
15
|
+
* Useful to nudge a layer without changing its speed.
|
|
16
|
+
*/
|
|
17
|
+
offsetX?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Static Y-axis offset (px) applied on top of the parallax translation.
|
|
20
|
+
*/
|
|
21
|
+
offsetY?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Optional `z-index` override. By default layers stack in document order.
|
|
24
|
+
*/
|
|
25
|
+
zIndex?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface IParallaxLayerRegistry {
|
|
28
|
+
/**
|
|
29
|
+
* Internal layer descriptor as registered into the parent OrigamParallax
|
|
30
|
+
* via `provide` / `inject`. The parent reads `speed`, `offsetX`,
|
|
31
|
+
* `offsetY` to compute the per-frame transform, then applies it via the
|
|
32
|
+
* shared `target` HTMLElement.
|
|
33
|
+
*/
|
|
34
|
+
id: symbol;
|
|
35
|
+
speed: number;
|
|
36
|
+
offsetX: number;
|
|
37
|
+
offsetY: number;
|
|
38
|
+
target: HTMLElement;
|
|
39
|
+
}
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IAudioProps, IBorderProps, IBox, IBgColorProps, IColorProps, ICommonsComponentProps, IDimensionProps, IElevationProps, IMarginProps, IPaddingProps, IRoundedProps, ITagProps } from '../../interfaces';
|
|
2
|
-
import type { TParallaxEvent, TPoint } from '../../types';
|
|
1
|
+
import type { IAudioProps, IBorderProps, IBox, IBgColorProps, IColorProps, ICommonsComponentProps, IDimensionProps, IElevationProps, IMarginProps, IPaddingProps, IRoundedProps, ITagProps, IParallaxLayerRegistry } from '../../interfaces';
|
|
2
|
+
import type { TParallaxDirection, TParallaxEasing, TParallaxEvent, TPoint } from '../../types';
|
|
3
3
|
import type { Ref } from 'vue';
|
|
4
4
|
export interface IParallaxProps extends ICommonsComponentProps, ITagProps, IColorProps, IBgColorProps, IPaddingProps, IMarginProps, IBorderProps, IRoundedProps, IElevationProps, IDimensionProps, IAudioProps {
|
|
5
5
|
/**
|
|
@@ -10,11 +10,49 @@ export interface IParallaxProps extends ICommonsComponentProps, ITagProps, IColo
|
|
|
10
10
|
* console warning is emitted at runtime to flag the migration.
|
|
11
11
|
*/
|
|
12
12
|
animationDuration?: number;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Easing curve. Accepts either:
|
|
15
|
+
* - a TParallaxEasing keyword (`'linear' | 'ease-out' | 'spring'`),
|
|
16
|
+
* routed through the scroll-driven multi-layer code path,
|
|
17
|
+
* - or any raw CSS timing-function string (legacy mouse / scroll
|
|
18
|
+
* transition path, e.g. `'cubic-bezier(...)'`).
|
|
19
|
+
*
|
|
20
|
+
* The keyword form is preferred for new code; the raw string form is
|
|
21
|
+
* kept for backwards compatibility with v2.x.
|
|
22
|
+
*/
|
|
23
|
+
easing?: TParallaxEasing | string;
|
|
14
24
|
perspective?: number;
|
|
15
25
|
event?: TParallaxEvent;
|
|
16
26
|
active?: boolean;
|
|
17
27
|
duration?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Direction of the parallax effect.
|
|
30
|
+
* - `'vertical'` (default) → translateY based on vertical scroll progress.
|
|
31
|
+
* - `'horizontal'` → translateX based on vertical scroll progress.
|
|
32
|
+
* - `'both'` → translate on both axes; on `event="move"`
|
|
33
|
+
* this maps to a 2D mouse ratio.
|
|
34
|
+
*/
|
|
35
|
+
direction?: TParallaxDirection;
|
|
36
|
+
/**
|
|
37
|
+
* Global parallax speed multiplier when no `<OrigamParallaxLayer>` is
|
|
38
|
+
* provided (single-layer mode). Equivalent to wrapping the slot in a
|
|
39
|
+
* single layer with this speed. Default `0.5`.
|
|
40
|
+
*/
|
|
41
|
+
speed?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Force the parallax effect OFF (translate stays at 0 regardless of
|
|
44
|
+
* scroll / events). Distinct from `active` which only freezes the
|
|
45
|
+
* mouse-driven mode. Useful for SSR, snapshot tests, or `prefers-
|
|
46
|
+
* reduced-motion` integrations.
|
|
47
|
+
*/
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Proportion (0 → 1) of the host that must enter the viewport before
|
|
51
|
+
* the parallax effect activates. `0` (default) starts the effect the
|
|
52
|
+
* moment the host's top edge crosses the bottom of the viewport;
|
|
53
|
+
* `0.3` waits until 30% of the host is visible.
|
|
54
|
+
*/
|
|
55
|
+
threshold?: number;
|
|
18
56
|
}
|
|
19
57
|
export interface IParallaxProvide {
|
|
20
58
|
audioData: Ref<any>;
|
|
@@ -30,3 +68,45 @@ export interface IParallaxProvide {
|
|
|
30
68
|
easing: Ref<string>;
|
|
31
69
|
shape: Ref<IBox | null>;
|
|
32
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Provide context exposed by the enriched OrigamParallax to its
|
|
73
|
+
* `<OrigamParallaxLayer>` children. Distinct from the legacy
|
|
74
|
+
* `IParallaxProvide` consumed by `<OrigamParallaxElement>` (kept
|
|
75
|
+
* separate to avoid coupling the two APIs).
|
|
76
|
+
*/
|
|
77
|
+
export interface IParallaxLayerProvide {
|
|
78
|
+
direction: Ref<TParallaxDirection>;
|
|
79
|
+
easing: Ref<TParallaxEasing | string>;
|
|
80
|
+
disabled: Ref<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* Live scroll progress, normalised to `[0, 1]`. `0` = host just entered
|
|
83
|
+
* the viewport, `1` = host just left.
|
|
84
|
+
*/
|
|
85
|
+
progress: Ref<number>;
|
|
86
|
+
/**
|
|
87
|
+
* Live mouse-ratio for `direction="both"` on `event="move"` —
|
|
88
|
+
* `{ x: 0..1, y: 0..1 }`. Falls back to `{ x: 0.5, y: 0.5 }` when no
|
|
89
|
+
* mouse data is available.
|
|
90
|
+
*/
|
|
91
|
+
mouseRatio: Ref<{
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the runtime is using the CSS scroll-driven path (true) or the
|
|
97
|
+
* JS rAF fallback (false). Layers may opt out of the JS work when the
|
|
98
|
+
* CSS path is active.
|
|
99
|
+
*/
|
|
100
|
+
cssScrollDriven: Ref<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* Whether `prefers-reduced-motion: reduce` is honoured — layers MUST
|
|
103
|
+
* stay at offset 0 when this is true.
|
|
104
|
+
*/
|
|
105
|
+
reducedMotion: Ref<boolean>;
|
|
106
|
+
/**
|
|
107
|
+
* Register / unregister a layer with the parent. The parent reads the
|
|
108
|
+
* registry to compute and apply per-layer transforms each frame.
|
|
109
|
+
*/
|
|
110
|
+
register: (layer: IParallaxLayerRegistry) => void;
|
|
111
|
+
unregister: (id: symbol) => void;
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { TIcon, TIntent } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Action button descriptor attached to a snackbar stack item.
|
|
4
|
+
*
|
|
5
|
+
* Surfaces in the rendered snackbar as a button — clicking it invokes
|
|
6
|
+
* `handler` and (by default) dismisses the item. Set `keepOpen: true`
|
|
7
|
+
* to keep the snackbar visible after the click (e.g. for a multi-step
|
|
8
|
+
* confirmation).
|
|
9
|
+
*/
|
|
10
|
+
export interface ISnackbarStackItemAction {
|
|
11
|
+
label: string;
|
|
12
|
+
handler: () => void;
|
|
13
|
+
intent?: TIntent;
|
|
14
|
+
keepOpen?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Options accepted by `useSnackbarStack().notify(opts)`.
|
|
18
|
+
*
|
|
19
|
+
* Every field is optional except that the resulting item must surface
|
|
20
|
+
* SOMETHING to the user — either a `title`, a `message`, or both.
|
|
21
|
+
* The composable does not enforce this at runtime; emitting an empty
|
|
22
|
+
* item is a no-op but is allowed for programmatic flexibility.
|
|
23
|
+
*/
|
|
24
|
+
export interface ISnackbarStackItemOptions {
|
|
25
|
+
/** Bold first line. Useful for short labels (e.g. "Saved"). */
|
|
26
|
+
title?: string;
|
|
27
|
+
/** Body text under the title (or sole line when `title` absent). */
|
|
28
|
+
message?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Semantic intent driving icon defaults, `role=status|alert`, and
|
|
31
|
+
* surface coloring. Defaults to `info`.
|
|
32
|
+
*/
|
|
33
|
+
intent?: TIntent;
|
|
34
|
+
/**
|
|
35
|
+
* Auto-dismiss timeout in milliseconds. Overrides the stack-level
|
|
36
|
+
* `defaultDuration`. Pass `0` to make the item sticky (no auto
|
|
37
|
+
* dismiss — user has to dismiss it manually or programmatically).
|
|
38
|
+
*/
|
|
39
|
+
duration?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Prepend icon override. Defaults to the per-intent icon
|
|
42
|
+
* (`mdiCheckCircle` for success, `mdiAlertCircle` for danger, …).
|
|
43
|
+
*/
|
|
44
|
+
icon?: TIcon;
|
|
45
|
+
/** Optional action buttons rendered in the snackbar footer. */
|
|
46
|
+
actions?: ReadonlyArray<ISnackbarStackItemAction>;
|
|
47
|
+
/** Whether to show the close (`X`) button. Default `true`. */
|
|
48
|
+
dismissible?: boolean;
|
|
49
|
+
/** Callback fired once the item leaves the stack. */
|
|
50
|
+
onDismiss?: () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Materialised item held inside the stack store. Adds the auto-generated
|
|
54
|
+
* `id` to the option shape so callers can address the item afterwards
|
|
55
|
+
* (`dismiss(id)`).
|
|
56
|
+
*/
|
|
57
|
+
export interface ISnackbarStackItem extends ISnackbarStackItemOptions {
|
|
58
|
+
id: string;
|
|
59
|
+
createdAt: number;
|
|
60
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ICommonsComponentProps, ITagProps } from '../../interfaces';
|
|
2
|
+
import type { TSnackbarStackDirection, TSnackbarStackLocation } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for `<OrigamSnackbarStack>` — a multi-toast container that
|
|
5
|
+
* orchestrates a queue of `OrigamSnackbar` instances driven through
|
|
6
|
+
* the `useSnackbarStack({ id })` composable.
|
|
7
|
+
*
|
|
8
|
+
* The component itself owns NO local visual state — every notification
|
|
9
|
+
* is added via `notify()` and removed via `dismiss()` or auto-timeout.
|
|
10
|
+
* The component subscribes to its registered stack `id` and re-renders
|
|
11
|
+
* when the underlying `items` ref changes.
|
|
12
|
+
*/
|
|
13
|
+
export interface ISnackbarStackProps extends ICommonsComponentProps, ITagProps {
|
|
14
|
+
/**
|
|
15
|
+
* Identifier of the stack this container renders. Pair with
|
|
16
|
+
* `useSnackbarStack({ id })` to spawn items into the same stack.
|
|
17
|
+
* Multiple stacks can coexist (e.g. a global one + a per-region
|
|
18
|
+
* one) — each one is keyed independently.
|
|
19
|
+
*
|
|
20
|
+
* @default 'default'
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Anchor location on the viewport. Drives both the absolute
|
|
25
|
+
* positioning (top/bottom + left/right/center pinning) and the
|
|
26
|
+
* `direction` default.
|
|
27
|
+
*
|
|
28
|
+
* @default 'bottom-right'
|
|
29
|
+
*/
|
|
30
|
+
location?: TSnackbarStackLocation;
|
|
31
|
+
/**
|
|
32
|
+
* Maximum number of items rendered concurrently. When `notify()`
|
|
33
|
+
* pushes a new item past `max`, the oldest item in the stack is
|
|
34
|
+
* evicted FIFO (its `onDismiss` callback still fires).
|
|
35
|
+
*
|
|
36
|
+
* @default 5
|
|
37
|
+
*/
|
|
38
|
+
max?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Default auto-dismiss timeout (ms) applied to items that do not
|
|
41
|
+
* supply their own `duration`. Pass `0` to make all items sticky
|
|
42
|
+
* by default.
|
|
43
|
+
*
|
|
44
|
+
* @default 5000
|
|
45
|
+
*/
|
|
46
|
+
defaultDuration?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Gap between stacked items (CSS dimension — `'12px'`, `'1rem'`,
|
|
49
|
+
* `8`, …).
|
|
50
|
+
*
|
|
51
|
+
* @default '12px'
|
|
52
|
+
*/
|
|
53
|
+
spacing?: string | number;
|
|
54
|
+
/**
|
|
55
|
+
* Stacking order. When unset, defaults to `'top-down'` for
|
|
56
|
+
* `top-*` locations and `'bottom-up'` for `bottom-*` locations
|
|
57
|
+
* — matching the natural reading direction of fresh items.
|
|
58
|
+
*/
|
|
59
|
+
direction?: TSnackbarStackDirection;
|
|
60
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ICommonsComponentProps, IGroupItemProps, ILazyProps, ITagProps } from '../../interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Props for `<OrigamTabPanel>` — a single tab content panel.
|
|
4
|
+
*
|
|
5
|
+
* - `value` identifier matching the sibling `<OrigamTab>`.
|
|
6
|
+
* - `eager` if `false` (default) the panel content is mounted
|
|
7
|
+
* only when first activated and kept alive afterwards.
|
|
8
|
+
* If `true`, the content is mounted from the start.
|
|
9
|
+
*/
|
|
10
|
+
export interface ITabPanelProps extends ICommonsComponentProps, ITagProps, IGroupItemProps, ILazyProps {
|
|
11
|
+
tag?: string;
|
|
12
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|