@maas/vue-equipment 0.12.1 → 0.13.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.
- package/dist/composables/index.d.mts +2 -2
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +5 -6
- package/dist/composables/index.js.map +1 -1
- package/dist/composables/index.mjs +0 -1
- package/dist/composables/index.mjs.map +1 -1
- package/dist/nuxt/module.json +2 -2
- package/dist/nuxt/module.mjs +15 -28
- package/dist/plugins/MagicConsent/nuxt.mjs +1 -1
- package/dist/plugins/MagicConsent/src/components/MagicConsent.vue +2 -189
- package/dist/plugins/MagicConsent/src/components/MagicConsent.vue.d.ts +26 -19
- package/dist/plugins/MagicMarquee/nuxt.mjs +1 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +2 -54
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +29 -20
- package/dist/plugins/MagicModal/nuxt.mjs +1 -3
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +4 -101
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +31 -37
- package/dist/plugins/MagicModal/src/composables/useModalApi.d.ts +1 -1
- package/dist/plugins/MagicModal/src/utils/defaultOptions.d.ts +1 -1
- package/dist/plugins/MagicNoise/nuxt.mjs +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +4 -42
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +26 -19
- package/dist/plugins/MagicNoise/src/utils/defaultOptions.d.ts +1 -1
- package/dist/plugins/MagicPlayer/nuxt.mjs +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue +2 -25
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue.d.ts +30 -53
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue +3 -132
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue.d.ts +13 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +2 -14
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +13 -18
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +2 -38
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +13 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +2 -101
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +12 -10
- package/dist/plugins/MagicPlayer/src/components/icons/Waiting.vue +1 -23
- package/dist/plugins/MagicPlayer/src/composables/private/useControlsApi.d.ts +1 -1
- package/dist/plugins/MagicScroll/nuxt.mjs +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +13 -11
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +31 -29
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +26 -17
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +2 -2
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +29 -25
- package/dist/plugins/MagicScroll/src/components/MagicScrollTransform.vue.d.ts +46 -67
- package/dist/plugins/MagicScroll/src/composables/useScrollApi.d.ts +1 -1
- package/dist/plugins/MagicToast/demo/DemoToast.vue.d.ts +14 -12
- package/dist/plugins/MagicToast/nuxt.mjs +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToast.vue +9 -117
- package/dist/plugins/MagicToast/src/components/MagicToast.vue.d.ts +19 -24
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue +2 -41
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue.d.ts +17 -36
- package/dist/plugins/MagicToast/src/composables/private/useToastInternalApi.d.ts +1 -1
- package/dist/plugins/MagicToast/src/composables/private/useToastStore.d.ts +2 -2
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/utils/defaultOptions.d.ts +1 -1
- package/dist/utils/index.d.mts +9 -1
- package/dist/utils/index.d.ts +9 -1
- package/dist/utils/index.js +3 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -3
- package/dist/utils/index.mjs.map +1 -1
- package/dist/utils/types/index.ts +2 -0
- package/package.json +16 -37
|
@@ -1,46 +1,27 @@
|
|
|
1
1
|
import { type ActiveElement } from './../types';
|
|
2
|
-
|
|
3
|
-
index:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
required: true;
|
|
10
|
-
};
|
|
11
|
-
id: {
|
|
12
|
-
type: import("vue").PropType<string>;
|
|
13
|
-
required: true;
|
|
14
|
-
};
|
|
15
|
-
siblings: {
|
|
16
|
-
type: import("vue").PropType<ActiveElement[]>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
interface Props {
|
|
3
|
+
index: number;
|
|
4
|
+
total: number;
|
|
5
|
+
id: string;
|
|
6
|
+
siblings: ActiveElement[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
9
|
mouseenter: (event: Event) => void;
|
|
21
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
index: {
|
|
23
|
-
type: import("vue").PropType<number>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
total: {
|
|
27
|
-
type: import("vue").PropType<number>;
|
|
28
|
-
required: true;
|
|
29
|
-
};
|
|
30
|
-
id: {
|
|
31
|
-
type: import("vue").PropType<string>;
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
siblings: {
|
|
35
|
-
type: import("vue").PropType<ActiveElement[]>;
|
|
36
|
-
required: true;
|
|
37
|
-
};
|
|
38
|
-
}>> & {
|
|
10
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
|
|
39
11
|
onMouseenter?: ((event: Event) => any) | undefined;
|
|
40
12
|
}, {}, {}>, {
|
|
41
13
|
default?(_: {}): any;
|
|
42
14
|
}>;
|
|
43
15
|
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: import('vue').PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
44
25
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
26
|
new (): {
|
|
46
27
|
$slots: S;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ToastInstance } from '../../types.js';
|
|
1
|
+
import type { ToastInstance, AddArgs } from '../../types.js';
|
|
2
2
|
export declare function useToastStore(): {
|
|
3
3
|
toastStore: import("vue").Ref<{
|
|
4
4
|
id: string;
|
|
@@ -8,7 +8,7 @@ export declare function useToastStore(): {
|
|
|
8
8
|
props?: Record<string, any> | undefined;
|
|
9
9
|
remove: Function;
|
|
10
10
|
}[];
|
|
11
|
-
add: (args:
|
|
11
|
+
add: (args: AddArgs) => string;
|
|
12
12
|
remove: (id: string) => void;
|
|
13
13
|
}[]>;
|
|
14
14
|
findInstance: (id: string) => ToastInstance | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ToastOptions } from '../types/index.js';
|
|
2
|
-
import type { RequireAll } from '@maas/vue-equipment/utils
|
|
2
|
+
import type { RequireAll } from '@maas/vue-equipment/utils';
|
|
3
3
|
declare const defaultOptions: RequireAll<ToastOptions>;
|
|
4
4
|
export { defaultOptions };
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -17,4 +17,12 @@ interface SlugifyOptions {
|
|
|
17
17
|
}
|
|
18
18
|
declare function slugify(string: string, options?: SlugifyOptions): string;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
type PickPartial<T, K extends keyof T> = {
|
|
21
|
+
[P in K]: Partial<T[P]>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type RequireAll<T> = {
|
|
25
|
+
[P in keyof T]-?: T[P];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { type PickPartial, type RequireAll, type SlugifyOptions, clampValue, isIOS, mapValue, slugify, uniq, uuid };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -17,4 +17,12 @@ interface SlugifyOptions {
|
|
|
17
17
|
}
|
|
18
18
|
declare function slugify(string: string, options?: SlugifyOptions): string;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
type PickPartial<T, K extends keyof T> = {
|
|
21
|
+
[P in K]: Partial<T[P]>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type RequireAll<T> = {
|
|
25
|
+
[P in keyof T]-?: T[P];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { type PickPartial, type RequireAll, type SlugifyOptions, clampValue, isIOS, mapValue, slugify, uniq, uuid };
|
package/dist/utils/index.js
CHANGED
|
@@ -38,7 +38,7 @@ function clampValue(value, min, max) {
|
|
|
38
38
|
function isIOS() {
|
|
39
39
|
if (typeof window === "undefined")
|
|
40
40
|
return false;
|
|
41
|
-
return /iPad|iPhone|iPod/.test(navigator
|
|
41
|
+
return /iPad|iPhone|iPod/.test(navigator == null ? void 0 : navigator.userAgent);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// src/functions/mapValue.ts
|
|
@@ -77,9 +77,9 @@ function slugify(string, options) {
|
|
|
77
77
|
let appendChar = charMap[ch];
|
|
78
78
|
if (appendChar === void 0)
|
|
79
79
|
appendChar = ch;
|
|
80
|
-
if (appendChar === _options
|
|
80
|
+
if (appendChar === (_options == null ? void 0 : _options.separator))
|
|
81
81
|
appendChar = " ";
|
|
82
|
-
return result + appendChar.replace(_options
|
|
82
|
+
return result + appendChar.replace((_options == null ? void 0 : _options.remove) || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
|
|
83
83
|
}, "");
|
|
84
84
|
if (_options.strict) {
|
|
85
85
|
slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../packages/utils/index.ts","../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/isIOS.ts","../../packages/utils/src/functions/mapValue.ts","../../packages/utils/src/functions/uuid.ts","../../packages/utils/src/functions/uniq.ts","../../packages/utils/src/functions/slugify.ts"],"sourcesContent":["export * from './src/functions/clampValue'\nexport * from './src/functions/isIOS'\nexport * from './src/functions/mapValue'\nexport * from './src/functions/uuid'\nexport * from './src/functions/uniq'\nexport * from './src/functions/slugify'\n","export function clampValue(value: number, min: number, max: number) {\n return value <= min ? min : value >= max ? max : value\n}\n","export function isIOS() {\n if (typeof window === 'undefined') return false\n return /iPad|iPhone|iPod/.test(navigator?.userAgent)\n}\n","export function mapValue(\n value: number,\n inMin: number,\n inMax: number,\n outMin: number,\n outMax: number,\n) {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin\n}\n","// This implementation is meant for internal use only.\n// It is only used to generate a unique IDs for the `key` props.\n// It should not replace crypto.randomUUID() or window.crypto.randomUUID().\n\nexport function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\n .split('')\n .reduce(\n (c, i) =>\n c +\n (i === 'x'\n ? Math.floor(Math.random() * 0xf).toString(16)\n : i === 'y'\n ? Math.floor(Math.random() * 4 + 8).toString(16)\n : i),\n '',\n )\n}\n","export function uniq<T extends any[]>(a: T) {\n return Array.from(new Set(a))\n}\n","export interface SlugifyOptions {\n separator?: string\n trim?: boolean\n remove?: RegExp\n strict?: boolean\n lowercase?: boolean\n}\n\nconst defaultOptions: SlugifyOptions = {\n separator: '-',\n trim: true,\n remove: undefined,\n strict: true,\n lowercase: true,\n}\n\nexport function slugify(string: string, options?: SlugifyOptions): string {\n if (typeof string !== 'string') {\n throw new Error('slugify: string argument expected')\n }\n\n // Merge provided options with default options\n const _options = { ...defaultOptions, ...options }\n\n const charMap: { [key: string]: string } = {}\n\n let slug = string\n .normalize()\n .split('')\n .reduce(function (result, ch) {\n let appendChar = charMap[ch]\n if (appendChar === undefined) appendChar = ch\n if (appendChar === _options?.separator) appendChar = ' '\n return (\n result +\n appendChar.replace(_options?.remove || /[^\\w\\s$*_+~.()'\"!\\-:@]+/g, '')\n )\n }, '')\n\n if (_options.strict) {\n slug = slug.replace(/[^A-Za-z0-9\\s]/g, '')\n }\n\n if (_options.trim) {\n slug = slug.trim()\n }\n\n if (_options.separator) {\n slug = slug.replace(/ +/g, _options.separator)\n }\n\n if (_options.lowercase) {\n slug = slug.toLocaleLowerCase()\n }\n\n return slug\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,SAAS,WAAW,OAAe,KAAa,KAAa;AAClE,SAAO,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM;AACnD;;;ACFO,SAAS,QAAQ;AACtB,MAAI,OAAO,WAAW;AAAa,WAAO;AAC1C,SAAO,mBAAmB,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../packages/utils/index.ts","../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/isIOS.ts","../../packages/utils/src/functions/mapValue.ts","../../packages/utils/src/functions/uuid.ts","../../packages/utils/src/functions/uniq.ts","../../packages/utils/src/functions/slugify.ts"],"sourcesContent":["export * from './src/functions/clampValue'\nexport * from './src/functions/isIOS'\nexport * from './src/functions/mapValue'\nexport * from './src/functions/uuid'\nexport * from './src/functions/uniq'\nexport * from './src/functions/slugify'\n\nexport type * from './src/types'\n","export function clampValue(value: number, min: number, max: number) {\n return value <= min ? min : value >= max ? max : value\n}\n","export function isIOS() {\n if (typeof window === 'undefined') return false\n return /iPad|iPhone|iPod/.test(navigator?.userAgent)\n}\n","export function mapValue(\n value: number,\n inMin: number,\n inMax: number,\n outMin: number,\n outMax: number,\n) {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin\n}\n","// This implementation is meant for internal use only.\n// It is only used to generate a unique IDs for the `key` props.\n// It should not replace crypto.randomUUID() or window.crypto.randomUUID().\n\nexport function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\n .split('')\n .reduce(\n (c, i) =>\n c +\n (i === 'x'\n ? Math.floor(Math.random() * 0xf).toString(16)\n : i === 'y'\n ? Math.floor(Math.random() * 4 + 8).toString(16)\n : i),\n '',\n )\n}\n","export function uniq<T extends any[]>(a: T) {\n return Array.from(new Set(a))\n}\n","export interface SlugifyOptions {\n separator?: string\n trim?: boolean\n remove?: RegExp\n strict?: boolean\n lowercase?: boolean\n}\n\nconst defaultOptions: SlugifyOptions = {\n separator: '-',\n trim: true,\n remove: undefined,\n strict: true,\n lowercase: true,\n}\n\nexport function slugify(string: string, options?: SlugifyOptions): string {\n if (typeof string !== 'string') {\n throw new Error('slugify: string argument expected')\n }\n\n // Merge provided options with default options\n const _options = { ...defaultOptions, ...options }\n\n const charMap: { [key: string]: string } = {}\n\n let slug = string\n .normalize()\n .split('')\n .reduce(function (result, ch) {\n let appendChar = charMap[ch]\n if (appendChar === undefined) appendChar = ch\n if (appendChar === _options?.separator) appendChar = ' '\n return (\n result +\n appendChar.replace(_options?.remove || /[^\\w\\s$*_+~.()'\"!\\-:@]+/g, '')\n )\n }, '')\n\n if (_options.strict) {\n slug = slug.replace(/[^A-Za-z0-9\\s]/g, '')\n }\n\n if (_options.trim) {\n slug = slug.trim()\n }\n\n if (_options.separator) {\n slug = slug.replace(/ +/g, _options.separator)\n }\n\n if (_options.lowercase) {\n slug = slug.toLocaleLowerCase()\n }\n\n return slug\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,SAAS,WAAW,OAAe,KAAa,KAAa;AAClE,SAAO,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM;AACnD;;;ACFO,SAAS,QAAQ;AACtB,MAAI,OAAO,WAAW;AAAa,WAAO;AAC1C,SAAO,mBAAmB,KAAK,uCAAW,SAAS;AACrD;;;ACHO,SAAS,SACd,OACA,OACA,OACA,QACA,QACA;AACA,UAAS,QAAQ,UAAU,SAAS,WAAY,QAAQ,SAAS;AACnE;;;ACJO,SAAS,OAAO;AACrB,SAAO,uCACJ,MAAM,EAAE,EACR;AAAA,IACC,CAAC,GAAG,MACF,KACC,MAAM,MACH,KAAK,MAAM,KAAK,OAAO,IAAI,EAAG,EAAE,SAAS,EAAE,IAC3C,MAAM,MACN,KAAK,MAAM,KAAK,OAAO,IAAI,IAAI,CAAC,EAAE,SAAS,EAAE,IAC7C;AAAA,IACN;AAAA,EACF;AACJ;;;ACjBO,SAAS,KAAsB,GAAM;AAC1C,SAAO,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;AAC9B;;;ACMA,IAAM,iBAAiC;AAAA,EACrC,WAAW;AAAA,EACX,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AACb;AAEO,SAAS,QAAQ,QAAgB,SAAkC;AACxE,MAAI,OAAO,WAAW,UAAU;AAC9B,UAAM,IAAI,MAAM,mCAAmC;AAAA,EACrD;AAGA,QAAM,WAAW,EAAE,GAAG,gBAAgB,GAAG,QAAQ;AAEjD,QAAM,UAAqC,CAAC;AAE5C,MAAI,OAAO,OACR,UAAU,EACV,MAAM,EAAE,EACR,OAAO,SAAU,QAAQ,IAAI;AAC5B,QAAI,aAAa,QAAQ,EAAE;AAC3B,QAAI,eAAe;AAAW,mBAAa;AAC3C,QAAI,gBAAe,qCAAU;AAAW,mBAAa;AACrD,WACE,SACA,WAAW,SAAQ,qCAAU,WAAU,4BAA4B,EAAE;AAAA,EAEzE,GAAG,EAAE;AAEP,MAAI,SAAS,QAAQ;AACnB,WAAO,KAAK,QAAQ,mBAAmB,EAAE;AAAA,EAC3C;AAEA,MAAI,SAAS,MAAM;AACjB,WAAO,KAAK,KAAK;AAAA,EACnB;AAEA,MAAI,SAAS,WAAW;AACtB,WAAO,KAAK,QAAQ,OAAO,SAAS,SAAS;AAAA,EAC/C;AAEA,MAAI,SAAS,WAAW;AACtB,WAAO,KAAK,kBAAkB;AAAA,EAChC;AAEA,SAAO;AACT;","names":[]}
|
package/dist/utils/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ function clampValue(value, min, max) {
|
|
|
7
7
|
function isIOS() {
|
|
8
8
|
if (typeof window === "undefined")
|
|
9
9
|
return false;
|
|
10
|
-
return /iPad|iPhone|iPod/.test(navigator
|
|
10
|
+
return /iPad|iPhone|iPod/.test(navigator == null ? void 0 : navigator.userAgent);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// src/functions/mapValue.ts
|
|
@@ -46,9 +46,9 @@ function slugify(string, options) {
|
|
|
46
46
|
let appendChar = charMap[ch];
|
|
47
47
|
if (appendChar === void 0)
|
|
48
48
|
appendChar = ch;
|
|
49
|
-
if (appendChar === _options
|
|
49
|
+
if (appendChar === (_options == null ? void 0 : _options.separator))
|
|
50
50
|
appendChar = " ";
|
|
51
|
-
return result + appendChar.replace(_options
|
|
51
|
+
return result + appendChar.replace((_options == null ? void 0 : _options.remove) || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
|
|
52
52
|
}, "");
|
|
53
53
|
if (_options.strict) {
|
|
54
54
|
slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
|
package/dist/utils/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/isIOS.ts","../../packages/utils/src/functions/mapValue.ts","../../packages/utils/src/functions/uuid.ts","../../packages/utils/src/functions/uniq.ts","../../packages/utils/src/functions/slugify.ts"],"sourcesContent":["export function clampValue(value: number, min: number, max: number) {\n return value <= min ? min : value >= max ? max : value\n}\n","export function isIOS() {\n if (typeof window === 'undefined') return false\n return /iPad|iPhone|iPod/.test(navigator?.userAgent)\n}\n","export function mapValue(\n value: number,\n inMin: number,\n inMax: number,\n outMin: number,\n outMax: number,\n) {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin\n}\n","// This implementation is meant for internal use only.\n// It is only used to generate a unique IDs for the `key` props.\n// It should not replace crypto.randomUUID() or window.crypto.randomUUID().\n\nexport function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\n .split('')\n .reduce(\n (c, i) =>\n c +\n (i === 'x'\n ? Math.floor(Math.random() * 0xf).toString(16)\n : i === 'y'\n ? Math.floor(Math.random() * 4 + 8).toString(16)\n : i),\n '',\n )\n}\n","export function uniq<T extends any[]>(a: T) {\n return Array.from(new Set(a))\n}\n","export interface SlugifyOptions {\n separator?: string\n trim?: boolean\n remove?: RegExp\n strict?: boolean\n lowercase?: boolean\n}\n\nconst defaultOptions: SlugifyOptions = {\n separator: '-',\n trim: true,\n remove: undefined,\n strict: true,\n lowercase: true,\n}\n\nexport function slugify(string: string, options?: SlugifyOptions): string {\n if (typeof string !== 'string') {\n throw new Error('slugify: string argument expected')\n }\n\n // Merge provided options with default options\n const _options = { ...defaultOptions, ...options }\n\n const charMap: { [key: string]: string } = {}\n\n let slug = string\n .normalize()\n .split('')\n .reduce(function (result, ch) {\n let appendChar = charMap[ch]\n if (appendChar === undefined) appendChar = ch\n if (appendChar === _options?.separator) appendChar = ' '\n return (\n result +\n appendChar.replace(_options?.remove || /[^\\w\\s$*_+~.()'\"!\\-:@]+/g, '')\n )\n }, '')\n\n if (_options.strict) {\n slug = slug.replace(/[^A-Za-z0-9\\s]/g, '')\n }\n\n if (_options.trim) {\n slug = slug.trim()\n }\n\n if (_options.separator) {\n slug = slug.replace(/ +/g, _options.separator)\n }\n\n if (_options.lowercase) {\n slug = slug.toLocaleLowerCase()\n }\n\n return slug\n}\n"],"mappings":";AAAO,SAAS,WAAW,OAAe,KAAa,KAAa;AAClE,SAAO,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM;AACnD;;;ACFO,SAAS,QAAQ;AACtB,MAAI,OAAO,WAAW;AAAa,WAAO;AAC1C,SAAO,mBAAmB,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/isIOS.ts","../../packages/utils/src/functions/mapValue.ts","../../packages/utils/src/functions/uuid.ts","../../packages/utils/src/functions/uniq.ts","../../packages/utils/src/functions/slugify.ts"],"sourcesContent":["export function clampValue(value: number, min: number, max: number) {\n return value <= min ? min : value >= max ? max : value\n}\n","export function isIOS() {\n if (typeof window === 'undefined') return false\n return /iPad|iPhone|iPod/.test(navigator?.userAgent)\n}\n","export function mapValue(\n value: number,\n inMin: number,\n inMax: number,\n outMin: number,\n outMax: number,\n) {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin\n}\n","// This implementation is meant for internal use only.\n// It is only used to generate a unique IDs for the `key` props.\n// It should not replace crypto.randomUUID() or window.crypto.randomUUID().\n\nexport function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\n .split('')\n .reduce(\n (c, i) =>\n c +\n (i === 'x'\n ? Math.floor(Math.random() * 0xf).toString(16)\n : i === 'y'\n ? Math.floor(Math.random() * 4 + 8).toString(16)\n : i),\n '',\n )\n}\n","export function uniq<T extends any[]>(a: T) {\n return Array.from(new Set(a))\n}\n","export interface SlugifyOptions {\n separator?: string\n trim?: boolean\n remove?: RegExp\n strict?: boolean\n lowercase?: boolean\n}\n\nconst defaultOptions: SlugifyOptions = {\n separator: '-',\n trim: true,\n remove: undefined,\n strict: true,\n lowercase: true,\n}\n\nexport function slugify(string: string, options?: SlugifyOptions): string {\n if (typeof string !== 'string') {\n throw new Error('slugify: string argument expected')\n }\n\n // Merge provided options with default options\n const _options = { ...defaultOptions, ...options }\n\n const charMap: { [key: string]: string } = {}\n\n let slug = string\n .normalize()\n .split('')\n .reduce(function (result, ch) {\n let appendChar = charMap[ch]\n if (appendChar === undefined) appendChar = ch\n if (appendChar === _options?.separator) appendChar = ' '\n return (\n result +\n appendChar.replace(_options?.remove || /[^\\w\\s$*_+~.()'\"!\\-:@]+/g, '')\n )\n }, '')\n\n if (_options.strict) {\n slug = slug.replace(/[^A-Za-z0-9\\s]/g, '')\n }\n\n if (_options.trim) {\n slug = slug.trim()\n }\n\n if (_options.separator) {\n slug = slug.replace(/ +/g, _options.separator)\n }\n\n if (_options.lowercase) {\n slug = slug.toLocaleLowerCase()\n }\n\n return slug\n}\n"],"mappings":";AAAO,SAAS,WAAW,OAAe,KAAa,KAAa;AAClE,SAAO,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM;AACnD;;;ACFO,SAAS,QAAQ;AACtB,MAAI,OAAO,WAAW;AAAa,WAAO;AAC1C,SAAO,mBAAmB,KAAK,uCAAW,SAAS;AACrD;;;ACHO,SAAS,SACd,OACA,OACA,OACA,QACA,QACA;AACA,UAAS,QAAQ,UAAU,SAAS,WAAY,QAAQ,SAAS;AACnE;;;ACJO,SAAS,OAAO;AACrB,SAAO,uCACJ,MAAM,EAAE,EACR;AAAA,IACC,CAAC,GAAG,MACF,KACC,MAAM,MACH,KAAK,MAAM,KAAK,OAAO,IAAI,EAAG,EAAE,SAAS,EAAE,IAC3C,MAAM,MACN,KAAK,MAAM,KAAK,OAAO,IAAI,IAAI,CAAC,EAAE,SAAS,EAAE,IAC7C;AAAA,IACN;AAAA,EACF;AACJ;;;ACjBO,SAAS,KAAsB,GAAM;AAC1C,SAAO,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;AAC9B;;;ACMA,IAAM,iBAAiC;AAAA,EACrC,WAAW;AAAA,EACX,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AACb;AAEO,SAAS,QAAQ,QAAgB,SAAkC;AACxE,MAAI,OAAO,WAAW,UAAU;AAC9B,UAAM,IAAI,MAAM,mCAAmC;AAAA,EACrD;AAGA,QAAM,WAAW,EAAE,GAAG,gBAAgB,GAAG,QAAQ;AAEjD,QAAM,UAAqC,CAAC;AAE5C,MAAI,OAAO,OACR,UAAU,EACV,MAAM,EAAE,EACR,OAAO,SAAU,QAAQ,IAAI;AAC5B,QAAI,aAAa,QAAQ,EAAE;AAC3B,QAAI,eAAe;AAAW,mBAAa;AAC3C,QAAI,gBAAe,qCAAU;AAAW,mBAAa;AACrD,WACE,SACA,WAAW,SAAQ,qCAAU,WAAU,4BAA4B,EAAE;AAAA,EAEzE,GAAG,EAAE;AAEP,MAAI,SAAS,QAAQ;AACnB,WAAO,KAAK,QAAQ,mBAAmB,EAAE;AAAA,EAC3C;AAEA,MAAI,SAAS,MAAM;AACjB,WAAO,KAAK,KAAK;AAAA,EACnB;AAEA,MAAI,SAAS,WAAW;AACtB,WAAO,KAAK,QAAQ,OAAO,SAAS,SAAS;AAAA,EAC/C;AAEA,MAAI,SAAS,WAAW;AACtB,WAAO,KAAK,kBAAkB;AAAA,EAChC;AAEA,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,38 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "A magic collection of Vue composables, plugins, components and directives",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@antfu/ni": "^0.21.
|
|
8
|
-
"@
|
|
9
|
-
"@
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"@types/node": "^20.4.5",
|
|
13
|
-
"@vitejs/plugin-vue": "^4.2.3",
|
|
14
|
-
"@vue/compiler-sfc": "^3.3.4",
|
|
15
|
-
"@vue/tsconfig": "^0.4.0",
|
|
16
|
-
"composables": "workspace:*",
|
|
17
|
-
"eslint": "^8.46.0",
|
|
18
|
-
"esno": "^0.17.0",
|
|
19
|
-
"fs-extra": "^11.1.1",
|
|
20
|
-
"metadata": "workspace:*",
|
|
21
|
-
"plugins": "workspace:*",
|
|
22
|
-
"prettier": "^3.0.0",
|
|
23
|
-
"release-it": "^16.1.3",
|
|
24
|
-
"turbo": "^1.10.12",
|
|
25
|
-
"typescript": "^5.1.6",
|
|
26
|
-
"unocss": "^0.54.1",
|
|
27
|
-
"unplugin-icons": "^0.16.5",
|
|
28
|
-
"unplugin-vue": "4.2.5",
|
|
29
|
-
"unplugin-vue-components": "^0.25.1",
|
|
30
|
-
"vite": "^4.4.8",
|
|
31
|
-
"vitepress": "1.0.0-beta.7",
|
|
32
|
-
"vue": "^3.3.4"
|
|
7
|
+
"@antfu/ni": "^0.21.12",
|
|
8
|
+
"@release-it/bumper": "^6.0.1",
|
|
9
|
+
"@types/node": "^20.10.4",
|
|
10
|
+
"release-it": "^17.0.1",
|
|
11
|
+
"turbo": "^1.11.2"
|
|
33
12
|
},
|
|
34
13
|
"exports": {
|
|
35
|
-
"
|
|
14
|
+
"./nuxt": {
|
|
36
15
|
"types": "./dist/nuxt/types.d.ts",
|
|
37
16
|
"require": "./dist/nuxt/module.cjs",
|
|
38
17
|
"import": "./dist/nuxt/module.mjs"
|
|
@@ -61,7 +40,6 @@
|
|
|
61
40
|
],
|
|
62
41
|
"keywords": [],
|
|
63
42
|
"license": "MIT",
|
|
64
|
-
"main": "./dist/nuxt/module.cjs",
|
|
65
43
|
"peerDependencies": {
|
|
66
44
|
"@maas/magic-timer": "^1.0.0",
|
|
67
45
|
"@vueuse/core": "^10.3.0",
|
|
@@ -72,7 +50,7 @@
|
|
|
72
50
|
"mitt": "^3.0.1",
|
|
73
51
|
"motion": "^10.16.2",
|
|
74
52
|
"nuxt": "^3.5.1",
|
|
75
|
-
"universal-cookie": "
|
|
53
|
+
"universal-cookie": "4.0.4"
|
|
76
54
|
},
|
|
77
55
|
"peerDependenciesMeta": {
|
|
78
56
|
"@maas/magic-timer": {
|
|
@@ -104,19 +82,19 @@
|
|
|
104
82
|
}
|
|
105
83
|
},
|
|
106
84
|
"scripts": {
|
|
107
|
-
"dev": "
|
|
108
|
-
"dev:docs": "turbo run
|
|
85
|
+
"dev": "turbo run dev",
|
|
86
|
+
"dev:docs": "turbo run dev --filter=docs",
|
|
109
87
|
"dev:nuxt": "turbo run dev --filter=nuxt",
|
|
110
88
|
"build": "turbo run build",
|
|
111
89
|
"build:types": "turbo run build:types",
|
|
112
|
-
"docs
|
|
113
|
-
"docs
|
|
114
|
-
"metadata
|
|
90
|
+
"build:docs": "turbo run build --filter=docs",
|
|
91
|
+
"preview:docs": "turbo run preview --filter=docs",
|
|
92
|
+
"update:metadata": "nr -C packages/metadata update",
|
|
115
93
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
94
|
+
"lint": "turbo run lint",
|
|
116
95
|
"uninstall": "nlx rimraf --glob ./**/node_modules --glob ./**/pnpm-lock.yaml",
|
|
117
96
|
"release": "turbo run t:release && release-it"
|
|
118
97
|
},
|
|
119
|
-
"types": "./dist/nuxt/types.d.ts",
|
|
120
98
|
"volta": {
|
|
121
99
|
"node": "18.16.1"
|
|
122
100
|
},
|
|
@@ -132,7 +110,8 @@
|
|
|
132
110
|
"in": "package.json",
|
|
133
111
|
"out": [
|
|
134
112
|
"package.json",
|
|
135
|
-
"packages/*/package.json"
|
|
113
|
+
"packages/*/package.json",
|
|
114
|
+
"apps/*/package.json"
|
|
136
115
|
]
|
|
137
116
|
}
|
|
138
117
|
}
|