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,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BRACKET_VARIANTS = exports.BRACKET_MATCH_STATUSES = exports.BRACKET_DEFAULT_ROUND_GAP = exports.BRACKET_DEFAULT_MATCH_WIDTH = exports.BRACKET_DEFAULT_MATCH_HEIGHT = exports.BRACKET_DEFAULT_MATCH_GAP = void 0;
|
|
7
|
+
const BRACKET_VARIANTS = exports.BRACKET_VARIANTS = ["single-elimination", "double-elimination", "round-robin"];
|
|
8
|
+
const BRACKET_MATCH_STATUSES = exports.BRACKET_MATCH_STATUSES = ["pending", "live", "completed", "forfeited"];
|
|
9
|
+
const BRACKET_DEFAULT_MATCH_WIDTH = exports.BRACKET_DEFAULT_MATCH_WIDTH = 240;
|
|
10
|
+
const BRACKET_DEFAULT_MATCH_HEIGHT = exports.BRACKET_DEFAULT_MATCH_HEIGHT = 72;
|
|
11
|
+
const BRACKET_DEFAULT_MATCH_GAP = exports.BRACKET_DEFAULT_MATCH_GAP = 24;
|
|
12
|
+
const BRACKET_DEFAULT_ROUND_GAP = exports.BRACKET_DEFAULT_ROUND_GAP = 48;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TBracketMatchStatus, TBracketVariant } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Closed list of valid `variant` values for `OrigamBracket`. Exposed so
|
|
4
|
+
* stories / consumers can iterate the matrix (e.g. for a `HstSelect`)
|
|
5
|
+
* without duplicating string literals.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BRACKET_VARIANTS: ReadonlyArray<TBracketVariant>;
|
|
8
|
+
/**
|
|
9
|
+
* Closed list of valid `status` values for `IBracketMatch.status`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BRACKET_MATCH_STATUSES: ReadonlyArray<TBracketMatchStatus>;
|
|
12
|
+
/**
|
|
13
|
+
* Default match card width (in px) used by the layout algorithm when
|
|
14
|
+
* computing connector paths in horizontal mode. Mirrors the token
|
|
15
|
+
* `bracket.match.width` — duplicated in code so the connector pure
|
|
16
|
+
* function stays free of DOM measurement.
|
|
17
|
+
*/
|
|
18
|
+
export declare const BRACKET_DEFAULT_MATCH_WIDTH = 240;
|
|
19
|
+
/**
|
|
20
|
+
* Default match card height (in px) used by the layout algorithm.
|
|
21
|
+
* Mirrors the token `bracket.match.height`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const BRACKET_DEFAULT_MATCH_HEIGHT = 72;
|
|
24
|
+
/**
|
|
25
|
+
* Default vertical gap (in px) between sibling matches in the first
|
|
26
|
+
* round. Subsequent rounds double the gap to produce the classic
|
|
27
|
+
* branching pattern.
|
|
28
|
+
*/
|
|
29
|
+
export declare const BRACKET_DEFAULT_MATCH_GAP = 24;
|
|
30
|
+
/**
|
|
31
|
+
* Default horizontal gap (in px) between rounds. Mirrors the token
|
|
32
|
+
* `bracket.gap-round`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const BRACKET_DEFAULT_ROUND_GAP = 48;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const BRACKET_VARIANTS = [
|
|
2
|
+
"single-elimination",
|
|
3
|
+
"double-elimination",
|
|
4
|
+
"round-robin"
|
|
5
|
+
];
|
|
6
|
+
export const BRACKET_MATCH_STATUSES = [
|
|
7
|
+
"pending",
|
|
8
|
+
"live",
|
|
9
|
+
"completed",
|
|
10
|
+
"forfeited"
|
|
11
|
+
];
|
|
12
|
+
export const BRACKET_DEFAULT_MATCH_WIDTH = 240;
|
|
13
|
+
export const BRACKET_DEFAULT_MATCH_HEIGHT = 72;
|
|
14
|
+
export const BRACKET_DEFAULT_MATCH_GAP = 24;
|
|
15
|
+
export const BRACKET_DEFAULT_ROUND_GAP = 48;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SUPPORTED_LANGS = exports.CODE_SHIKI_THEMES = exports.CODE_DEFAULTS = exports.CODE_CACHE_MAX_ENTRIES = void 0;
|
|
7
|
+
var _enums = require("../../enums/index.cjs");
|
|
8
|
+
const SUPPORTED_LANGS = exports.SUPPORTED_LANGS = Object.freeze([_enums.CODE_LANG.PLAINTEXT, _enums.CODE_LANG.VUE, _enums.CODE_LANG.TS, _enums.CODE_LANG.JS, _enums.CODE_LANG.TSX, _enums.CODE_LANG.JSX, _enums.CODE_LANG.SCSS, _enums.CODE_LANG.CSS, _enums.CODE_LANG.JSON, _enums.CODE_LANG.BASH, _enums.CODE_LANG.HTML, _enums.CODE_LANG.XML, _enums.CODE_LANG.YAML, _enums.CODE_LANG.MD]);
|
|
9
|
+
const CODE_SHIKI_THEMES = exports.CODE_SHIKI_THEMES = Object.freeze({
|
|
10
|
+
light: "github-light",
|
|
11
|
+
dark: "github-dark"
|
|
12
|
+
});
|
|
13
|
+
const CODE_CACHE_MAX_ENTRIES = exports.CODE_CACHE_MAX_ENTRIES = 64;
|
|
14
|
+
const CODE_DEFAULTS = exports.CODE_DEFAULTS = Object.freeze({
|
|
15
|
+
lang: _enums.CODE_LANG.PLAINTEXT,
|
|
16
|
+
theme: _enums.CODE_THEME.AUTO,
|
|
17
|
+
lineNumbers: false,
|
|
18
|
+
copyable: true,
|
|
19
|
+
wrap: false,
|
|
20
|
+
format: false,
|
|
21
|
+
/**
|
|
22
|
+
* Feedback duration for the "Copied!" pill, in ms. Matches the
|
|
23
|
+
* snackbar default so the visual rhythm stays consistent.
|
|
24
|
+
*/
|
|
25
|
+
copyFeedbackDurationMs: 2e3
|
|
26
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CODE_LANG, CODE_THEME } from '../../enums';
|
|
2
|
+
/**
|
|
3
|
+
* Languages bundled with the default shiki highlighter. Keep this list and
|
|
4
|
+
* the `langs` argument of `createHighlighter()` in lockstep — see
|
|
5
|
+
* `code.composable.ts`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SUPPORTED_LANGS: ReadonlyArray<CODE_LANG>;
|
|
8
|
+
/**
|
|
9
|
+
* shiki theme names loaded by the singleton highlighter. We ship the
|
|
10
|
+
* `github-light` / `github-dark` pair which match the origam token palette
|
|
11
|
+
* out of the box (neutral grays, blue keywords, red strings). The
|
|
12
|
+
* component's `theme` prop maps `CODE_THEME.LIGHT`/`DARK`/`AUTO` to these.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CODE_SHIKI_THEMES: Readonly<{
|
|
15
|
+
readonly light: "github-light";
|
|
16
|
+
readonly dark: "github-dark";
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Maximum entries kept by the per-singleton LRU cache. 64 is large enough
|
|
20
|
+
* for a page that renders dozens of small snippets, small enough that the
|
|
21
|
+
* memory footprint stays under ~1 MB of pre-rendered HTML.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CODE_CACHE_MAX_ENTRIES = 64;
|
|
24
|
+
/**
|
|
25
|
+
* Default values used by `OrigamCode`. Centralised so the story / docs /
|
|
26
|
+
* tests pull the same constants and any future drift stays visible.
|
|
27
|
+
*/
|
|
28
|
+
export declare const CODE_DEFAULTS: Readonly<{
|
|
29
|
+
readonly lang: CODE_LANG.PLAINTEXT;
|
|
30
|
+
readonly theme: CODE_THEME.AUTO;
|
|
31
|
+
readonly lineNumbers: false;
|
|
32
|
+
readonly copyable: true;
|
|
33
|
+
readonly wrap: false;
|
|
34
|
+
readonly format: false;
|
|
35
|
+
/**
|
|
36
|
+
* Feedback duration for the "Copied!" pill, in ms. Matches the
|
|
37
|
+
* snackbar default so the visual rhythm stays consistent.
|
|
38
|
+
*/
|
|
39
|
+
readonly copyFeedbackDurationMs: 2000;
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CODE_LANG, CODE_THEME } from "../../enums/index.js";
|
|
2
|
+
export const SUPPORTED_LANGS = Object.freeze([
|
|
3
|
+
CODE_LANG.PLAINTEXT,
|
|
4
|
+
CODE_LANG.VUE,
|
|
5
|
+
CODE_LANG.TS,
|
|
6
|
+
CODE_LANG.JS,
|
|
7
|
+
CODE_LANG.TSX,
|
|
8
|
+
CODE_LANG.JSX,
|
|
9
|
+
CODE_LANG.SCSS,
|
|
10
|
+
CODE_LANG.CSS,
|
|
11
|
+
CODE_LANG.JSON,
|
|
12
|
+
CODE_LANG.BASH,
|
|
13
|
+
CODE_LANG.HTML,
|
|
14
|
+
CODE_LANG.XML,
|
|
15
|
+
CODE_LANG.YAML,
|
|
16
|
+
CODE_LANG.MD
|
|
17
|
+
]);
|
|
18
|
+
export const CODE_SHIKI_THEMES = Object.freeze({
|
|
19
|
+
light: "github-light",
|
|
20
|
+
dark: "github-dark"
|
|
21
|
+
});
|
|
22
|
+
export const CODE_CACHE_MAX_ENTRIES = 64;
|
|
23
|
+
export const CODE_DEFAULTS = Object.freeze({
|
|
24
|
+
lang: CODE_LANG.PLAINTEXT,
|
|
25
|
+
theme: CODE_THEME.AUTO,
|
|
26
|
+
lineNumbers: false,
|
|
27
|
+
copyable: true,
|
|
28
|
+
wrap: false,
|
|
29
|
+
format: false,
|
|
30
|
+
/**
|
|
31
|
+
* Feedback duration for the "Copied!" pill, in ms. Matches the
|
|
32
|
+
* snackbar default so the visual rhythm stays consistent.
|
|
33
|
+
*/
|
|
34
|
+
copyFeedbackDurationMs: 2e3
|
|
35
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.COMMAND_PALETTE_GLOBAL_ID = exports.COMMAND_PALETTE_DEFAULT_WIDTH = exports.COMMAND_PALETTE_DEFAULT_MAX_HEIGHT = exports.COMMAND_PALETTE_DEFAULT_HOTKEY = void 0;
|
|
7
|
+
const COMMAND_PALETTE_DEFAULT_HOTKEY = exports.COMMAND_PALETTE_DEFAULT_HOTKEY = [["meta", "k"], ["ctrl", "k"]];
|
|
8
|
+
const COMMAND_PALETTE_GLOBAL_ID = exports.COMMAND_PALETTE_GLOBAL_ID = "origam-command-palette-global";
|
|
9
|
+
const COMMAND_PALETTE_DEFAULT_MAX_HEIGHT = exports.COMMAND_PALETTE_DEFAULT_MAX_HEIGHT = 480;
|
|
10
|
+
const COMMAND_PALETTE_DEFAULT_WIDTH = exports.COMMAND_PALETTE_DEFAULT_WIDTH = 640;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default global hotkey combinations for `<OrigamCommandPalette>`. We
|
|
3
|
+
* register both `⌘+K` (macOS) and `Ctrl+K` (Windows / Linux) so the
|
|
4
|
+
* same component works cross-platform without consumer branching.
|
|
5
|
+
*
|
|
6
|
+
* The composable `useHotkey` itself normalises `meta` vs `ctrl` per
|
|
7
|
+
* platform, but we still register both because some hardware /
|
|
8
|
+
* input-method combinations on Linux ship `meta` differently.
|
|
9
|
+
*/
|
|
10
|
+
export declare const COMMAND_PALETTE_DEFAULT_HOTKEY: ReadonlyArray<ReadonlyArray<string>>;
|
|
11
|
+
/** Default v-model name of the global palette singleton in `useCommand`. */
|
|
12
|
+
export declare const COMMAND_PALETTE_GLOBAL_ID = "origam-command-palette-global";
|
|
13
|
+
/** Default max-height of the result list (px). */
|
|
14
|
+
export declare const COMMAND_PALETTE_DEFAULT_MAX_HEIGHT = 480;
|
|
15
|
+
/** Default width of the palette dialog (px). */
|
|
16
|
+
export declare const COMMAND_PALETTE_DEFAULT_WIDTH = 640;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const COMMAND_PALETTE_DEFAULT_HOTKEY = [
|
|
2
|
+
["meta", "k"],
|
|
3
|
+
["ctrl", "k"]
|
|
4
|
+
];
|
|
5
|
+
export const COMMAND_PALETTE_GLOBAL_ID = "origam-command-palette-global";
|
|
6
|
+
export const COMMAND_PALETTE_DEFAULT_MAX_HEIGHT = 480;
|
|
7
|
+
export const COMMAND_PALETTE_DEFAULT_WIDTH = 640;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BUILT_IN_PATTERN_KEYS = exports.BUILT_IN_PATTERNS = void 0;
|
|
7
|
+
var _enums = require("../../enums/index.cjs");
|
|
8
|
+
const BUILT_IN_PATTERNS = exports.BUILT_IN_PATTERNS = {
|
|
9
|
+
[_enums.BUILT_IN_PATTERN.PHONE_FR]: {
|
|
10
|
+
pattern: "## ## ## ## ##",
|
|
11
|
+
validator: null
|
|
12
|
+
},
|
|
13
|
+
[_enums.BUILT_IN_PATTERN.PHONE_US]: {
|
|
14
|
+
pattern: "(###) ###-####",
|
|
15
|
+
validator: null
|
|
16
|
+
},
|
|
17
|
+
[_enums.BUILT_IN_PATTERN.PHONE_INTERNATIONAL]: {
|
|
18
|
+
pattern: "+## ## ## ## ## ##",
|
|
19
|
+
validator: null
|
|
20
|
+
},
|
|
21
|
+
[_enums.BUILT_IN_PATTERN.IBAN]: {
|
|
22
|
+
// IBAN max length is 34, FR is 27, EN is 22.
|
|
23
|
+
// Pattern accepts up to 34 alphanumeric chars in
|
|
24
|
+
// 4-char blocks. The `validator` enforces the
|
|
25
|
+
// mod-97 checksum on the unmasked value.
|
|
26
|
+
pattern: "**** **** **** **** **** **** **** **",
|
|
27
|
+
validator: _enums.PATTERN_VALIDATOR.IBAN
|
|
28
|
+
},
|
|
29
|
+
[_enums.BUILT_IN_PATTERN.SIRET]: {
|
|
30
|
+
pattern: "### ### ### #####",
|
|
31
|
+
validator: null
|
|
32
|
+
},
|
|
33
|
+
[_enums.BUILT_IN_PATTERN.CREDIT_CARD]: {
|
|
34
|
+
pattern: "#### #### #### ####",
|
|
35
|
+
validator: _enums.PATTERN_VALIDATOR.LUHN
|
|
36
|
+
},
|
|
37
|
+
[_enums.BUILT_IN_PATTERN.DATE_ISO]: {
|
|
38
|
+
pattern: "####-##-##",
|
|
39
|
+
validator: _enums.PATTERN_VALIDATOR.DATE_ISO
|
|
40
|
+
},
|
|
41
|
+
[_enums.BUILT_IN_PATTERN.DATE_FR]: {
|
|
42
|
+
pattern: "##/##/####",
|
|
43
|
+
validator: _enums.PATTERN_VALIDATOR.DATE_FR
|
|
44
|
+
},
|
|
45
|
+
[_enums.BUILT_IN_PATTERN.DATE_US]: {
|
|
46
|
+
pattern: "##/##/####",
|
|
47
|
+
validator: _enums.PATTERN_VALIDATOR.DATE_US
|
|
48
|
+
},
|
|
49
|
+
[_enums.BUILT_IN_PATTERN.TIME]: {
|
|
50
|
+
pattern: "##:##",
|
|
51
|
+
validator: null
|
|
52
|
+
},
|
|
53
|
+
[_enums.BUILT_IN_PATTERN.TIME_12H]: {
|
|
54
|
+
pattern: "##:## AA",
|
|
55
|
+
validator: null
|
|
56
|
+
},
|
|
57
|
+
[_enums.BUILT_IN_PATTERN.POSTCODE_FR]: {
|
|
58
|
+
pattern: "#####",
|
|
59
|
+
validator: null
|
|
60
|
+
},
|
|
61
|
+
[_enums.BUILT_IN_PATTERN.POSTCODE_US]: {
|
|
62
|
+
pattern: "#####",
|
|
63
|
+
validator: null
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const BUILT_IN_PATTERN_KEYS = exports.BUILT_IN_PATTERN_KEYS = new Set(Object.keys(BUILT_IN_PATTERNS));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IMaskOptions } from '../../interfaces';
|
|
2
|
+
import type { TBuiltInPattern } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Curated mask presets — name → `{ pattern, validator }`.
|
|
5
|
+
*
|
|
6
|
+
* Naming convention: lowercase identifiers (`phone:fr`,
|
|
7
|
+
* `creditcard`, `date:iso`), matching the public string
|
|
8
|
+
* literals exposed via `TBuiltInPattern`.
|
|
9
|
+
*
|
|
10
|
+
* The `pattern` strings use the token-walker syntax:
|
|
11
|
+
* `#` digit · `A` letter · `*` any · everything else
|
|
12
|
+
* is a literal copied verbatim.
|
|
13
|
+
*/
|
|
14
|
+
export declare const BUILT_IN_PATTERNS: Record<TBuiltInPattern, IMaskOptions>;
|
|
15
|
+
/**
|
|
16
|
+
* Set of registered preset keys — used by
|
|
17
|
+
* `resolveMaskConfig` to discriminate string-key vs raw
|
|
18
|
+
* pattern.
|
|
19
|
+
*/
|
|
20
|
+
export declare const BUILT_IN_PATTERN_KEYS: Set<string>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BUILT_IN_PATTERN, PATTERN_VALIDATOR } from "../../enums/index.js";
|
|
2
|
+
export const BUILT_IN_PATTERNS = {
|
|
3
|
+
[BUILT_IN_PATTERN.PHONE_FR]: {
|
|
4
|
+
pattern: "## ## ## ## ##",
|
|
5
|
+
validator: null
|
|
6
|
+
},
|
|
7
|
+
[BUILT_IN_PATTERN.PHONE_US]: {
|
|
8
|
+
pattern: "(###) ###-####",
|
|
9
|
+
validator: null
|
|
10
|
+
},
|
|
11
|
+
[BUILT_IN_PATTERN.PHONE_INTERNATIONAL]: {
|
|
12
|
+
pattern: "+## ## ## ## ## ##",
|
|
13
|
+
validator: null
|
|
14
|
+
},
|
|
15
|
+
[BUILT_IN_PATTERN.IBAN]: {
|
|
16
|
+
// IBAN max length is 34, FR is 27, EN is 22.
|
|
17
|
+
// Pattern accepts up to 34 alphanumeric chars in
|
|
18
|
+
// 4-char blocks. The `validator` enforces the
|
|
19
|
+
// mod-97 checksum on the unmasked value.
|
|
20
|
+
pattern: "**** **** **** **** **** **** **** **",
|
|
21
|
+
validator: PATTERN_VALIDATOR.IBAN
|
|
22
|
+
},
|
|
23
|
+
[BUILT_IN_PATTERN.SIRET]: {
|
|
24
|
+
pattern: "### ### ### #####",
|
|
25
|
+
validator: null
|
|
26
|
+
},
|
|
27
|
+
[BUILT_IN_PATTERN.CREDIT_CARD]: {
|
|
28
|
+
pattern: "#### #### #### ####",
|
|
29
|
+
validator: PATTERN_VALIDATOR.LUHN
|
|
30
|
+
},
|
|
31
|
+
[BUILT_IN_PATTERN.DATE_ISO]: {
|
|
32
|
+
pattern: "####-##-##",
|
|
33
|
+
validator: PATTERN_VALIDATOR.DATE_ISO
|
|
34
|
+
},
|
|
35
|
+
[BUILT_IN_PATTERN.DATE_FR]: {
|
|
36
|
+
pattern: "##/##/####",
|
|
37
|
+
validator: PATTERN_VALIDATOR.DATE_FR
|
|
38
|
+
},
|
|
39
|
+
[BUILT_IN_PATTERN.DATE_US]: {
|
|
40
|
+
pattern: "##/##/####",
|
|
41
|
+
validator: PATTERN_VALIDATOR.DATE_US
|
|
42
|
+
},
|
|
43
|
+
[BUILT_IN_PATTERN.TIME]: {
|
|
44
|
+
pattern: "##:##",
|
|
45
|
+
validator: null
|
|
46
|
+
},
|
|
47
|
+
[BUILT_IN_PATTERN.TIME_12H]: {
|
|
48
|
+
pattern: "##:## AA",
|
|
49
|
+
validator: null
|
|
50
|
+
},
|
|
51
|
+
[BUILT_IN_PATTERN.POSTCODE_FR]: {
|
|
52
|
+
pattern: "#####",
|
|
53
|
+
validator: null
|
|
54
|
+
},
|
|
55
|
+
[BUILT_IN_PATTERN.POSTCODE_US]: {
|
|
56
|
+
pattern: "#####",
|
|
57
|
+
validator: null
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export const BUILT_IN_PATTERN_KEYS = new Set(Object.keys(BUILT_IN_PATTERNS));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ORIGAM_PARALLAX_LAYER_KEY = Symbol.for("origam:parallax-layer");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SNACKBAR_STACK_LOCATIONS = exports.SNACKBAR_STACK_DIRECTIONS = exports.SNACKBAR_STACK_DEFAULT_SPACING = exports.SNACKBAR_STACK_DEFAULT_MAX = exports.SNACKBAR_STACK_DEFAULT_ID = exports.SNACKBAR_STACK_DEFAULT_DURATION = void 0;
|
|
7
|
+
const SNACKBAR_STACK_LOCATIONS = exports.SNACKBAR_STACK_LOCATIONS = ["top-left", "top-right", "top-center", "bottom-left", "bottom-right", "bottom-center", "top", "bottom"];
|
|
8
|
+
const SNACKBAR_STACK_DIRECTIONS = exports.SNACKBAR_STACK_DIRECTIONS = ["top-down", "bottom-up"];
|
|
9
|
+
const SNACKBAR_STACK_DEFAULT_ID = exports.SNACKBAR_STACK_DEFAULT_ID = "default";
|
|
10
|
+
const SNACKBAR_STACK_DEFAULT_DURATION = exports.SNACKBAR_STACK_DEFAULT_DURATION = 5e3;
|
|
11
|
+
const SNACKBAR_STACK_DEFAULT_MAX = exports.SNACKBAR_STACK_DEFAULT_MAX = 5;
|
|
12
|
+
const SNACKBAR_STACK_DEFAULT_SPACING = exports.SNACKBAR_STACK_DEFAULT_SPACING = "12px";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TSnackbarStackDirection, TSnackbarStackLocation } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Closed list of valid `location` values for `OrigamSnackbarStack`.
|
|
4
|
+
* Exposed so stories / consumers can iterate the matrix (e.g. for a
|
|
5
|
+
* `HstSelect`) without duplicating string literals.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SNACKBAR_STACK_LOCATIONS: ReadonlyArray<TSnackbarStackLocation>;
|
|
8
|
+
/**
|
|
9
|
+
* Closed list of valid `direction` values for `OrigamSnackbarStack`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SNACKBAR_STACK_DIRECTIONS: ReadonlyArray<TSnackbarStackDirection>;
|
|
12
|
+
/**
|
|
13
|
+
* Default stack `id` used by `useSnackbarStack` when the consumer
|
|
14
|
+
* does not pass an explicit identifier. Multiple stacks can coexist
|
|
15
|
+
* on the same page — each one is keyed by its own `id` in the
|
|
16
|
+
* composable's internal `Map`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SNACKBAR_STACK_DEFAULT_ID = "default";
|
|
19
|
+
/**
|
|
20
|
+
* Default auto-dismiss timeout (ms) applied when neither the stack
|
|
21
|
+
* nor the per-item options specify one. `0` (sticky) is allowed at
|
|
22
|
+
* the item level.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SNACKBAR_STACK_DEFAULT_DURATION = 5000;
|
|
25
|
+
/**
|
|
26
|
+
* Default maximum number of items rendered concurrently. Excess
|
|
27
|
+
* items are evicted FIFO (oldest first).
|
|
28
|
+
*/
|
|
29
|
+
export declare const SNACKBAR_STACK_DEFAULT_MAX = 5;
|
|
30
|
+
/**
|
|
31
|
+
* Default gap between stacked items (CSS dimension).
|
|
32
|
+
*/
|
|
33
|
+
export declare const SNACKBAR_STACK_DEFAULT_SPACING = "12px";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const SNACKBAR_STACK_LOCATIONS = [
|
|
2
|
+
"top-left",
|
|
3
|
+
"top-right",
|
|
4
|
+
"top-center",
|
|
5
|
+
"bottom-left",
|
|
6
|
+
"bottom-right",
|
|
7
|
+
"bottom-center",
|
|
8
|
+
"top",
|
|
9
|
+
"bottom"
|
|
10
|
+
];
|
|
11
|
+
export const SNACKBAR_STACK_DIRECTIONS = [
|
|
12
|
+
"top-down",
|
|
13
|
+
"bottom-up"
|
|
14
|
+
];
|
|
15
|
+
export const SNACKBAR_STACK_DEFAULT_ID = "default";
|
|
16
|
+
export const SNACKBAR_STACK_DEFAULT_DURATION = 5e3;
|
|
17
|
+
export const SNACKBAR_STACK_DEFAULT_MAX = 5;
|
|
18
|
+
export const SNACKBAR_STACK_DEFAULT_SPACING = "12px";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ORIGAM_TAB_PANELS_KEY = exports.ORIGAM_TAB_PANELS_CTX_KEY = exports.ORIGAM_TABS_KEY = void 0;
|
|
7
|
+
const ORIGAM_TABS_KEY = exports.ORIGAM_TABS_KEY = Symbol.for("origam:tabs");
|
|
8
|
+
const ORIGAM_TAB_PANELS_KEY = exports.ORIGAM_TAB_PANELS_KEY = Symbol.for("origam:tab-panels");
|
|
9
|
+
const ORIGAM_TAB_PANELS_CTX_KEY = exports.ORIGAM_TAB_PANELS_CTX_KEY = Symbol.for("origam:tab-panels-ctx");
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { IGroupProvide, ITabPanelsProvide } from '../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Injection key shared by `<OrigamTabs>` (provider) and `<OrigamTab>`
|
|
5
|
+
* (consumer). Mirrors the `ORIGAM_BTN_TOGGLE_KEY` pattern but reserves
|
|
6
|
+
* its own symbol so that an `<OrigamTabs>` rendered inside an
|
|
7
|
+
* `<OrigamBtnToggle>` (e.g. composing toolbars) does not cross-register
|
|
8
|
+
* its items with the outer group.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ORIGAM_TABS_KEY: InjectionKey<IGroupProvide>;
|
|
11
|
+
/**
|
|
12
|
+
* Injection key shared by `<OrigamTabPanels>` (provider) and
|
|
13
|
+
* `<OrigamTabPanel>` (consumer). The panels group is kept distinct
|
|
14
|
+
* from the tab list so the two can be rendered as siblings under a
|
|
15
|
+
* common ancestor, with `modelValue` sync handled by the consumer.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ORIGAM_TAB_PANELS_KEY: InjectionKey<IGroupProvide>;
|
|
18
|
+
/**
|
|
19
|
+
* Auxiliary context exposed by `<OrigamTabPanels>` so child panels can
|
|
20
|
+
* read transition + swipe settings without re-declaring the same
|
|
21
|
+
* props at every level.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ORIGAM_TAB_PANELS_CTX_KEY: InjectionKey<ITabPanelsProvide>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DEFAULT_TOOLBAR = exports.BLOCKED_TAGS = exports.ALLOWED_URL_SCHEMES = exports.ALLOWED_TAGS = exports.ALLOWED_CLASS_PREFIX = exports.ALLOWED_ATTRIBUTES = void 0;
|
|
7
|
+
var _enums = require("../../enums/index.cjs");
|
|
8
|
+
const DEFAULT_TOOLBAR = exports.DEFAULT_TOOLBAR = [_enums.TEXTAREA_TOOLBAR_COMMAND.BOLD, _enums.TEXTAREA_TOOLBAR_COMMAND.ITALIC, _enums.TEXTAREA_TOOLBAR_COMMAND.UNDERLINE, _enums.TEXTAREA_TOOLBAR_COMMAND.LINK, _enums.TEXTAREA_TOOLBAR_COMMAND.LIST_BULLET, _enums.TEXTAREA_TOOLBAR_COMMAND.LIST_ORDERED, _enums.TEXTAREA_TOOLBAR_COMMAND.HEADING, _enums.TEXTAREA_TOOLBAR_COMMAND.CODE_INLINE, _enums.TEXTAREA_TOOLBAR_COMMAND.CLEAR_FORMAT];
|
|
9
|
+
const ALLOWED_TAGS = exports.ALLOWED_TAGS = ["p", "br", "strong", "b", "em", "i", "u", "a", "ul", "ol", "li", "h1", "h2", "h3", "code"];
|
|
10
|
+
const BLOCKED_TAGS = exports.BLOCKED_TAGS = ["script", "style", "iframe", "object", "embed", "form", "svg", "math", "link", "meta", "base"];
|
|
11
|
+
const ALLOWED_ATTRIBUTES = exports.ALLOWED_ATTRIBUTES = {
|
|
12
|
+
a: ["href", "class"],
|
|
13
|
+
p: ["class"],
|
|
14
|
+
ul: ["class"],
|
|
15
|
+
ol: ["class"],
|
|
16
|
+
li: ["class"],
|
|
17
|
+
h1: ["class"],
|
|
18
|
+
h2: ["class"],
|
|
19
|
+
h3: ["class"],
|
|
20
|
+
code: ["class"],
|
|
21
|
+
strong: ["class"],
|
|
22
|
+
em: ["class"],
|
|
23
|
+
u: ["class"],
|
|
24
|
+
b: ["class"],
|
|
25
|
+
i: ["class"]
|
|
26
|
+
};
|
|
27
|
+
const ALLOWED_URL_SCHEMES = exports.ALLOWED_URL_SCHEMES = ["http:", "https:", "mailto:", "tel:"];
|
|
28
|
+
const ALLOWED_CLASS_PREFIX = exports.ALLOWED_CLASS_PREFIX = "origam-rich--";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TTextareaToolbarCommand } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default set of toolbar buttons surfaced when the consumer enables
|
|
4
|
+
* `mode="rich"` without overriding `toolbar`. Order is meaningful — it
|
|
5
|
+
* drives the visual layout left-to-right.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_TOOLBAR: ReadonlyArray<TTextareaToolbarCommand>;
|
|
8
|
+
/**
|
|
9
|
+
* Tags retained by the HTML sanitiser. Anything outside this allowlist
|
|
10
|
+
* is `unwrap`-ped (children preserved, parent dropped). Scripts and
|
|
11
|
+
* embeddable containers are explicitly *blocked* in
|
|
12
|
+
* `BLOCKED_TAGS` so their text content is also dropped.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ALLOWED_TAGS: ReadonlyArray<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Tags whose subtree is removed wholesale (instead of unwrapped) — the
|
|
17
|
+
* inner text would otherwise leak through. Mirrors the OWASP HTML
|
|
18
|
+
* Sanitizer "blocked content" list.
|
|
19
|
+
*/
|
|
20
|
+
export declare const BLOCKED_TAGS: ReadonlyArray<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Attribute-level allowlist. Each tag declares the attributes it can
|
|
23
|
+
* keep — anything else is stripped. Values still go through URL-scheme
|
|
24
|
+
* and class-name validation downstream.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ALLOWED_ATTRIBUTES: Readonly<Record<string, ReadonlyArray<string>>>;
|
|
27
|
+
/**
|
|
28
|
+
* URL schemes allowed on `<a href>`. Tested against the start of the
|
|
29
|
+
* trimmed, lower-cased value. Anything else (notably `javascript:`,
|
|
30
|
+
* `data:`, `vbscript:`) is stripped.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ALLOWED_URL_SCHEMES: ReadonlyArray<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Whitelist prefix for any `class` attribute that survives sanitisation.
|
|
35
|
+
* Lets a future feature emit semantic class names (e.g. `origam-rich--callout`)
|
|
36
|
+
* without re-opening the door to arbitrary class spraying.
|
|
37
|
+
*/
|
|
38
|
+
export declare const ALLOWED_CLASS_PREFIX = "origam-rich--";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { TEXTAREA_TOOLBAR_COMMAND } from "../../enums/index.js";
|
|
2
|
+
export const DEFAULT_TOOLBAR = [
|
|
3
|
+
TEXTAREA_TOOLBAR_COMMAND.BOLD,
|
|
4
|
+
TEXTAREA_TOOLBAR_COMMAND.ITALIC,
|
|
5
|
+
TEXTAREA_TOOLBAR_COMMAND.UNDERLINE,
|
|
6
|
+
TEXTAREA_TOOLBAR_COMMAND.LINK,
|
|
7
|
+
TEXTAREA_TOOLBAR_COMMAND.LIST_BULLET,
|
|
8
|
+
TEXTAREA_TOOLBAR_COMMAND.LIST_ORDERED,
|
|
9
|
+
TEXTAREA_TOOLBAR_COMMAND.HEADING,
|
|
10
|
+
TEXTAREA_TOOLBAR_COMMAND.CODE_INLINE,
|
|
11
|
+
TEXTAREA_TOOLBAR_COMMAND.CLEAR_FORMAT
|
|
12
|
+
];
|
|
13
|
+
export const ALLOWED_TAGS = [
|
|
14
|
+
"p",
|
|
15
|
+
"br",
|
|
16
|
+
"strong",
|
|
17
|
+
"b",
|
|
18
|
+
"em",
|
|
19
|
+
"i",
|
|
20
|
+
"u",
|
|
21
|
+
"a",
|
|
22
|
+
"ul",
|
|
23
|
+
"ol",
|
|
24
|
+
"li",
|
|
25
|
+
"h1",
|
|
26
|
+
"h2",
|
|
27
|
+
"h3",
|
|
28
|
+
"code"
|
|
29
|
+
];
|
|
30
|
+
export const BLOCKED_TAGS = [
|
|
31
|
+
"script",
|
|
32
|
+
"style",
|
|
33
|
+
"iframe",
|
|
34
|
+
"object",
|
|
35
|
+
"embed",
|
|
36
|
+
"form",
|
|
37
|
+
"svg",
|
|
38
|
+
"math",
|
|
39
|
+
"link",
|
|
40
|
+
"meta",
|
|
41
|
+
"base"
|
|
42
|
+
];
|
|
43
|
+
export const ALLOWED_ATTRIBUTES = {
|
|
44
|
+
a: ["href", "class"],
|
|
45
|
+
p: ["class"],
|
|
46
|
+
ul: ["class"],
|
|
47
|
+
ol: ["class"],
|
|
48
|
+
li: ["class"],
|
|
49
|
+
h1: ["class"],
|
|
50
|
+
h2: ["class"],
|
|
51
|
+
h3: ["class"],
|
|
52
|
+
code: ["class"],
|
|
53
|
+
strong: ["class"],
|
|
54
|
+
em: ["class"],
|
|
55
|
+
u: ["class"],
|
|
56
|
+
b: ["class"],
|
|
57
|
+
i: ["class"]
|
|
58
|
+
};
|
|
59
|
+
export const ALLOWED_URL_SCHEMES = [
|
|
60
|
+
"http:",
|
|
61
|
+
"https:",
|
|
62
|
+
"mailto:",
|
|
63
|
+
"tel:"
|
|
64
|
+
];
|
|
65
|
+
export const ALLOWED_CLASS_PREFIX = "origam-rich--";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ORIGAM_THEME_STORAGE_KEY = exports.ORIGAM_THEME_LIGHT = exports.ORIGAM_THEME_DARK = exports.ORIGAM_THEME_AUTO = exports.ORIGAM_THEME_ATTR = exports.ORIGAM_NUXT_DEFAULT_THEMES = exports.ORIGAM_NUXT_DEFAULT_PREFIX = exports.ORIGAM_NUXT_DEFAULT_COOKIE_NAME = exports.ORIGAM_NUXT_DEFAULT_COOKIE_MAX_AGE = void 0;
|
|
7
|
+
const ORIGAM_THEME_AUTO = exports.ORIGAM_THEME_AUTO = "auto";
|
|
8
|
+
const ORIGAM_THEME_LIGHT = exports.ORIGAM_THEME_LIGHT = "light";
|
|
9
|
+
const ORIGAM_THEME_DARK = exports.ORIGAM_THEME_DARK = "dark";
|
|
10
|
+
const ORIGAM_THEME_STORAGE_KEY = exports.ORIGAM_THEME_STORAGE_KEY = "origam-theme";
|
|
11
|
+
const ORIGAM_THEME_ATTR = exports.ORIGAM_THEME_ATTR = "data-theme";
|
|
12
|
+
const ORIGAM_NUXT_DEFAULT_COOKIE_NAME = exports.ORIGAM_NUXT_DEFAULT_COOKIE_NAME = "origam-theme";
|
|
13
|
+
const ORIGAM_NUXT_DEFAULT_COOKIE_MAX_AGE = exports.ORIGAM_NUXT_DEFAULT_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
|
|
14
|
+
const ORIGAM_NUXT_DEFAULT_THEMES = exports.ORIGAM_NUXT_DEFAULT_THEMES = ["light", "dark"];
|
|
15
|
+
const ORIGAM_NUXT_DEFAULT_PREFIX = exports.ORIGAM_NUXT_DEFAULT_PREFIX = "Origam";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ORIGAM_THEME_AUTO = "auto";
|
|
2
|
+
export declare const ORIGAM_THEME_LIGHT = "light";
|
|
3
|
+
export declare const ORIGAM_THEME_DARK = "dark";
|
|
4
|
+
export declare const ORIGAM_THEME_STORAGE_KEY = "origam-theme";
|
|
5
|
+
export declare const ORIGAM_THEME_ATTR = "data-theme";
|
|
6
|
+
export declare const ORIGAM_NUXT_DEFAULT_COOKIE_NAME = "origam-theme";
|
|
7
|
+
export declare const ORIGAM_NUXT_DEFAULT_COOKIE_MAX_AGE: number;
|
|
8
|
+
export declare const ORIGAM_NUXT_DEFAULT_THEMES: readonly ["light", "dark"];
|
|
9
|
+
export declare const ORIGAM_NUXT_DEFAULT_PREFIX = "Origam";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const ORIGAM_THEME_AUTO = "auto";
|
|
2
|
+
export const ORIGAM_THEME_LIGHT = "light";
|
|
3
|
+
export const ORIGAM_THEME_DARK = "dark";
|
|
4
|
+
export const ORIGAM_THEME_STORAGE_KEY = "origam-theme";
|
|
5
|
+
export const ORIGAM_THEME_ATTR = "data-theme";
|
|
6
|
+
export const ORIGAM_NUXT_DEFAULT_COOKIE_NAME = "origam-theme";
|
|
7
|
+
export const ORIGAM_NUXT_DEFAULT_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
|
|
8
|
+
export const ORIGAM_NUXT_DEFAULT_THEMES = ["light", "dark"];
|
|
9
|
+
export const ORIGAM_NUXT_DEFAULT_PREFIX = "Origam";
|