@voicenter-team/voicenter-ui-plus 3.0.13 → 3.1.1

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.
@@ -0,0 +1,92 @@
1
+ interface ICodeBlockProps {
2
+ /**
3
+ * @description Source code to display. Leading blank lines and trailing
4
+ * whitespace are stripped.
5
+ */
6
+ code?: string;
7
+ /**
8
+ * @description highlight.js language name or alias (e.g. 'ts', 'html',
9
+ * 'bash'). Case-insensitive. Unknown or empty values fall back to
10
+ * auto-detection.
11
+ */
12
+ language?: string;
13
+ /**
14
+ * @description Optional label rendered in a header bar above the code
15
+ * (commonly a file name). Without it the copy button and language label
16
+ * float over the code and appear on hover.
17
+ */
18
+ title?: string;
19
+ /**
20
+ * @description Show the resolved language label.
21
+ */
22
+ showLanguageLabel?: boolean;
23
+ /**
24
+ * @description Show the copy-to-clipboard button.
25
+ */
26
+ copyable?: boolean;
27
+ /**
28
+ * @description Render a line-number gutter. Disables soft wrapping to
29
+ * keep numbers aligned to lines.
30
+ */
31
+ lineNumbers?: boolean;
32
+ /**
33
+ * @description Soft-wrap long lines instead of horizontal scrolling.
34
+ * Ignored when `lineNumbers` is enabled.
35
+ */
36
+ wrap?: boolean;
37
+ /**
38
+ * @description Max height of the code area (number of px or any CSS
39
+ * size). Content beyond it scrolls vertically.
40
+ */
41
+ maxHeight?: string | number;
42
+ }
43
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ICodeBlockProps>, {
44
+ code: string;
45
+ language: string;
46
+ title: string;
47
+ showLanguageLabel: boolean;
48
+ copyable: boolean;
49
+ lineNumbers: boolean;
50
+ wrap: boolean;
51
+ maxHeight: string;
52
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
+ copy: (code: string) => void;
54
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ICodeBlockProps>, {
55
+ code: string;
56
+ language: string;
57
+ title: string;
58
+ showLanguageLabel: boolean;
59
+ copyable: boolean;
60
+ lineNumbers: boolean;
61
+ wrap: boolean;
62
+ maxHeight: string;
63
+ }>>> & Readonly<{
64
+ onCopy?: ((code: string) => any) | undefined;
65
+ }>, {
66
+ code: string;
67
+ title: string;
68
+ maxHeight: string | number;
69
+ language: string;
70
+ showLanguageLabel: boolean;
71
+ copyable: boolean;
72
+ lineNumbers: boolean;
73
+ wrap: boolean;
74
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
75
+ export default _default;
76
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
77
+ type __VLS_TypePropsToRuntimeProps<T> = {
78
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
79
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
80
+ } : {
81
+ type: import('vue').PropType<T[K]>;
82
+ required: true;
83
+ };
84
+ };
85
+ type __VLS_WithDefaults<P, D> = {
86
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
87
+ default: D[K];
88
+ }> : P[K];
89
+ };
90
+ type __VLS_Prettify<T> = {
91
+ [K in keyof T]: T[K];
92
+ } & {};
@@ -1,4 +1,4 @@
1
- import { ConfigOptionType, ExtractValueType, NavigationPositionType, OptionValueType } from '../../../types';
1
+ import { ConfigOptionType, ExtractValueType, NavigationPositionType, OptionMappedType, OptionValueType } from '../../../types';
2
2
  declare const _default: <Option extends OptionValueType, Config extends ConfigOptionType<Option>, Model extends ExtractValueType<Option, Config>>(__VLS_props: {
3
3
  options?: Option[] | undefined;
4
4
  activeTab: Model;
@@ -11,7 +11,12 @@ declare const _default: <Option extends OptionValueType, Config extends ConfigOp
11
11
  borderPosition?: "top" | "bottom" | undefined;
12
12
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
13
13
  attrs: any;
14
- slots: {};
14
+ slots: {
15
+ "tab-item"?(_: {
16
+ option: OptionMappedType<Option, Config>;
17
+ index: number;
18
+ }): any;
19
+ };
15
20
  emit: (e: 'tab-click', option: Option, index: number) => void;
16
21
  } | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
17
22
  props: {
@@ -27,7 +32,12 @@ declare const _default: <Option extends OptionValueType, Config extends ConfigOp
27
32
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
28
33
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
29
34
  attrs: any;
30
- slots: {};
35
+ slots: {
36
+ "tab-item"?(_: {
37
+ option: OptionMappedType<Option, Config>;
38
+ index: number;
39
+ }): any;
40
+ };
31
41
  emit: (e: 'tab-click', option: Option, index: number) => void;
32
42
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
33
43
  [key: string]: any;
@@ -46,7 +56,12 @@ declare const _default: <Option extends OptionValueType, Config extends ConfigOp
46
56
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
47
57
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
48
58
  attrs: any;
49
- slots: {};
59
+ slots: {
60
+ "tab-item"?(_: {
61
+ option: OptionMappedType<Option, Config>;
62
+ index: number;
63
+ }): any;
64
+ };
50
65
  emit: (e: 'tab-click', option: Option, index: number) => void;
51
66
  } | undefined;
52
67
  };
@@ -30,6 +30,7 @@ import VcTagInput from './VcTagInput/VcTagInput.vue';
30
30
  import VcOtpInput from './VcOtpInput/VcOtpInput.vue';
31
31
  import VcFileUploader from './VcFileUploader/VcFileUploader.vue';
32
32
  import VcCard from './VcCard/VcCard.vue';
33
+ import VcCodeBlock from './VcCodeBlock/VcCodeBlock.vue';
33
34
  import VcModal from './VcModal/VcModal.vue';
34
35
  import VcConfirmModal from './VcModal/VcConfirmModal.vue';
35
36
  import VcPopover from './VcPopover/VcPopover.vue';
@@ -79,7 +80,7 @@ import VcExcelFileUploader from './VcExcelUploader/VcExcelFileUploader.vue';
79
80
  import VcImageUploader from './VcImageUploader/VcImageUploader.vue';
80
81
  import VcTour from './VcTour/VcTour.vue';
81
82
  import VcSipFlow from './VcSipFlow/VcSipFlow.vue';
82
- export { VcButton, VcButtonIcon, VcToggleButton, VcInput, VcInputNumber, VcInputError, VcInputLabel, VcSelect, VcSelectGrouped, VcSelectOption, VcInfiniteScrollSelect, VcAutocomplete, VcCheckbox, VcCheckboxGroup, VcCheckboxButton, VcCheckboxButtonGroup, VcRadio, VcRadioGroup, VcRadioButtonsGroup, VcSwitch, VcSlider, VcColorPicker, VcDatePicker, VcDatePickerPanel, VcDatetimeRangePicker, VcExtendedDatetimeRangePicker, VcTimeInput, VcPhoneInput, VcTagInput, VcOtpInput, VcFileUploader, VcCard, VcModal, VcConfirmModal, VcPopover, VcConfirmPopover, VcSelectPopover, VcTabs, VcTabNav, VcTabPane, VcVerticalTabs, VcRadioTabs, VcRadioTabsNav, VcCollapse, VcCollapseItem, VcWizard, VcDropdown, VcDropdownItem, VcTable, VcPagination, VcTree, VcTreeSelect, VcTransfer, VcTag, VcDelimitedList, VcSparkline, VcViewSwitcher, VcSegmented, VcLoading, VcProgress, VcProgressCircular, VcSkeletonLoader, VcNotification, VcForm, VcFormItem, VcSplitButton, VcHyperLink, VcIcon, VcIconPicker, VcMeterGroup, VcMeterGroupLabel, VcMdEditor, VcSystemUserPrompt, VcSoundPlayer, VcJsonSchema, VcHtmlEditor, VcPdfDocument, VcExcelFileUploader, VcImageUploader, VcTour, VcSipFlow, };
83
+ export { VcButton, VcButtonIcon, VcToggleButton, VcInput, VcInputNumber, VcInputError, VcInputLabel, VcSelect, VcSelectGrouped, VcSelectOption, VcInfiniteScrollSelect, VcAutocomplete, VcCheckbox, VcCheckboxGroup, VcCheckboxButton, VcCheckboxButtonGroup, VcRadio, VcRadioGroup, VcRadioButtonsGroup, VcSwitch, VcSlider, VcColorPicker, VcDatePicker, VcDatePickerPanel, VcDatetimeRangePicker, VcExtendedDatetimeRangePicker, VcTimeInput, VcPhoneInput, VcTagInput, VcOtpInput, VcFileUploader, VcCard, VcCodeBlock, VcModal, VcConfirmModal, VcPopover, VcConfirmPopover, VcSelectPopover, VcTabs, VcTabNav, VcTabPane, VcVerticalTabs, VcRadioTabs, VcRadioTabsNav, VcCollapse, VcCollapseItem, VcWizard, VcDropdown, VcDropdownItem, VcTable, VcPagination, VcTree, VcTreeSelect, VcTransfer, VcTag, VcDelimitedList, VcSparkline, VcViewSwitcher, VcSegmented, VcLoading, VcProgress, VcProgressCircular, VcSkeletonLoader, VcNotification, VcForm, VcFormItem, VcSplitButton, VcHyperLink, VcIcon, VcIconPicker, VcMeterGroup, VcMeterGroupLabel, VcMdEditor, VcSystemUserPrompt, VcSoundPlayer, VcJsonSchema, VcHtmlEditor, VcPdfDocument, VcExcelFileUploader, VcImageUploader, VcTour, VcSipFlow, };
83
84
  declare module '@vue/runtime-core' {
84
85
  interface GlobalComponents {
85
86
  VcButton: typeof VcButton;
@@ -114,6 +115,7 @@ declare module '@vue/runtime-core' {
114
115
  VcOtpInput: typeof VcOtpInput;
115
116
  VcFileUploader: typeof VcFileUploader;
116
117
  VcCard: typeof VcCard;
118
+ VcCodeBlock: typeof VcCodeBlock;
117
119
  VcModal: typeof VcModal;
118
120
  VcConfirmModal: typeof VcConfirmModal;
119
121
  VcPopover: typeof VcPopover;
@@ -1,2 +1,9 @@
1
1
  import { ClickOutside } from 'element-plus';
2
+ /**
3
+ * Detect clicks outside an element. Re-exported from Element Plus.
4
+ *
5
+ * @directive v-click-outside
6
+ * @usage <div v-click-outside="handleClickOutside">...</div>
7
+ * @option handler - Function to call when clicking outside
8
+ */
2
9
  export default ClickOutside;
@@ -1,2 +1,10 @@
1
1
  import { vMaska } from 'maska/vue';
2
+ /**
3
+ * Input masking directive using Maska library. Supports phone numbers, dates, credit cards, etc.
4
+ *
5
+ * @directive v-input-mask
6
+ * @usage <input v-input-mask data-maska="#-###-###-####" />
7
+ * @option data-maska - Mask pattern (# = digit, @ = letter, * = any)
8
+ * @option data-maska-tokens - Custom token definitions
9
+ */
2
10
  export default vMaska;
@@ -2,6 +2,14 @@ interface ValueObjType {
2
2
  repeat?: boolean;
3
3
  functionToCall: () => unknown;
4
4
  }
5
+ /**
6
+ * Detect long press (300ms) on an element. Supports repeat mode for continuous triggers.
7
+ *
8
+ * @directive v-long-press
9
+ * @usage <button v-long-press="{ functionToCall: handler, repeat: true }">Hold me</button>
10
+ * @option functionToCall - Function to execute on long press
11
+ * @option repeat - Boolean - if true, continues calling every 100ms while held
12
+ */
5
13
  export declare const longPress: {
6
14
  beforeMount(el: HTMLElement, { value }: {
7
15
  value: ValueObjType;
@@ -1,4 +1,14 @@
1
1
  import { DirectiveBinding, RendererNode } from 'vue';
2
+ /**
3
+ * Observe element resize using ResizeObserver. Supports debounce/throttle modes.
4
+ *
5
+ * @directive v-resize
6
+ * @usage <div v-resize:debounce="{ event: handleResize, delay: 200 }">...</div>
7
+ * @option :debounce - Use debounced resize (default)
8
+ * @option :throttle - Use throttled resize
9
+ * @option event - Handler function receiving { detail: { width, height } }
10
+ * @option delay - Debounce/throttle delay in ms (default: 100)
11
+ */
2
12
  export declare const resize: {
3
13
  mounted(el: HTMLElement, binding: DirectiveBinding, vNode: RendererNode): void;
4
14
  beforeUnmount(el: HTMLElement): void;
@@ -28,6 +28,7 @@ export { default as VcTagInput } from './components/VcTagInput/VcTagInput.vue';
28
28
  export { default as VcOtpInput } from './components/VcOtpInput/VcOtpInput.vue';
29
29
  export { default as VcFileUploader } from './components/VcFileUploader/VcFileUploader.vue';
30
30
  export { default as VcCard } from './components/VcCard/VcCard.vue';
31
+ export { default as VcCodeBlock } from './components/VcCodeBlock/VcCodeBlock.vue';
31
32
  export { default as VcModal } from './components/VcModal/VcModal.vue';
32
33
  export { default as VcConfirmModal } from './components/VcModal/VcConfirmModal.vue';
33
34
  export { default as VcPopover } from './components/VcPopover/VcPopover.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voicenter-team/voicenter-ui-plus",
3
- "version": "3.0.13",
3
+ "version": "3.1.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",
@@ -54,10 +54,12 @@
54
54
  "default": "./library/theme/index.mjs"
55
55
  },
56
56
  "./style.css": "./library/style.css",
57
+ "./base.css": "./library/assets/assets/sass/main.css",
57
58
  "./src/theme/*": "./src/theme/*",
58
59
  "./src/theme/tailwindScheme": "./src/theme/tailwindScheme.js",
59
60
  "./src/theme/themes.json": "./src/theme/themes.json",
60
- "./tailwind.config": "./tailwind.config.js"
61
+ "./tailwind.config": "./tailwind.config.js",
62
+ "./library/types/*": "./library/types/*.d.ts"
61
63
  },
62
64
  "files": [
63
65
  "library",
@@ -82,6 +84,7 @@
82
84
  "codemirror": "^6.0.1",
83
85
  "dayjs": "^1.11.19",
84
86
  "element-plus": "^2.11.3",
87
+ "highlight.js": "^11.6.0",
85
88
  "libphonenumber-js": "^1.10.13",
86
89
  "lodash-es": "^4.17.21",
87
90
  "maska": "^3.2.0",