@maas/vue-equipment 0.7.4 → 0.7.6

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "configKey": "vueEquipment",
4
- "version": "0.7.3"
4
+ "version": "0.7.5"
5
5
  }
@@ -5,7 +5,7 @@ export type useModalApiOptions = Pick<Options, 'scrollLock'> & {
5
5
  focusTarget: MaybeElementRef;
6
6
  };
7
7
  export declare function useModalApi(id?: MaybeRef<string>, options?: useModalApiOptions): {
8
- id: import("vue").ComputedRef<string>;
8
+ id: import("vue").ComputedRef<any>;
9
9
  isActive: import("vue").ComputedRef<boolean>;
10
10
  open: () => void;
11
11
  close: () => void;
@@ -1,3 +1,4 @@
1
+ import { crypto } from "@maas/vue-equipment/utils";
1
2
  import { ref, computed, toValue } from "vue";
2
3
  import { defu } from "defu";
3
4
  import { useScrollLock } from "@vueuse/core";
@@ -43,8 +43,9 @@
43
43
  </template>
44
44
 
45
45
  <script setup lang="ts">
46
+ import { crypto } from '@maas/vue-equipment/utils'
46
47
  import { defu } from 'defu'
47
- import { toValue, ref, computed, watch, type MaybeRef } from 'vue'
48
+ import { toValue, ref, watch, type MaybeRef } from 'vue'
48
49
  import { onClickOutside, type MaybeElement } from '@vueuse/core'
49
50
  import { defaultOptions } from './../utils/defaultOptions'
50
51
  import { useToastApi } from './../composables/useToastApi'
@@ -1,4 +1,4 @@
1
1
  import type { ToastInstance, AddArgs } from './../../types.js';
2
2
  export declare function useToastInternalApi(): {
3
- addToast: (args: AddArgs, ctx: ToastInstance) => `${string}-${string}-${string}-${string}-${string}`;
3
+ addToast: (args: AddArgs, ctx: ToastInstance) => any;
4
4
  };
@@ -1,3 +1,4 @@
1
+ import { crypto } from "@maas/vue-equipment/utils";
1
2
  export function useToastInternalApi() {
2
3
  function removeToastAfterTimeout(id, duration, ctx) {
3
4
  if (duration > 0) {
@@ -1,3 +1,4 @@
1
+ import { crypto } from "@maas/vue-equipment/utils";
1
2
  import {
2
3
  computed,
3
4
  onUnmounted,
@@ -4,4 +4,6 @@ declare function isIOS(): boolean;
4
4
 
5
5
  declare function mapValue(value: number, inMin: number, inMax: number, outMin: number, outMax: number): number;
6
6
 
7
- export { clampValue, isIOS, mapValue };
7
+ declare const crypto: any;
8
+
9
+ export { clampValue, crypto, isIOS, mapValue };
@@ -4,4 +4,6 @@ declare function isIOS(): boolean;
4
4
 
5
5
  declare function mapValue(value: number, inMin: number, inMax: number, outMin: number, outMax: number): number;
6
6
 
7
- export { clampValue, isIOS, mapValue };
7
+ declare const crypto: any;
8
+
9
+ export { clampValue, crypto, isIOS, mapValue };
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var utils_exports = {};
22
22
  __export(utils_exports, {
23
23
  clampValue: () => clampValue,
24
+ crypto: () => crypto,
24
25
  isIOS: () => isIOS,
25
26
  mapValue: () => mapValue
26
27
  });
@@ -42,9 +43,13 @@ function isIOS() {
42
43
  function mapValue(value, inMin, inMax, outMin, outMax) {
43
44
  return (value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
44
45
  }
46
+
47
+ // src/functions/crypto.ts
48
+ var crypto = typeof window === "undefined" ? require("crypto") : window.crypto;
45
49
  // Annotate the CommonJS export names for ESM import in node:
46
50
  0 && (module.exports = {
47
51
  clampValue,
52
+ crypto,
48
53
  isIOS,
49
54
  mapValue
50
55
  });
@@ -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"],"sourcesContent":["export * from './src/functions/clampValue'\nexport * from './src/functions/isIOS'\nexport * from './src/functions/mapValue'\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"],"mappings":";;;;;;;;;;;;;;;;;;;;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,WAAW,SAAS;AACrD;;;ACHO,SAAS,SACd,OACA,OACA,OACA,QACA,QACA;AACA,UAAS,QAAQ,UAAU,SAAS,WAAY,QAAQ,SAAS;AACnE;","names":[]}
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/crypto.ts"],"sourcesContent":["export * from './src/functions/clampValue'\nexport * from './src/functions/isIOS'\nexport * from './src/functions/mapValue'\nexport * from './src/functions/crypto'\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","export const crypto =\n typeof window === 'undefined' ? require('crypto') : window.crypto\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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,WAAW,SAAS;AACrD;;;ACHO,SAAS,SACd,OACA,OACA,OACA,QACA,QACA;AACA,UAAS,QAAQ,UAAU,SAAS,WAAY,QAAQ,SAAS;AACnE;;;ACRO,IAAM,SACX,OAAO,WAAW,cAAc,QAAQ,QAAQ,IAAI,OAAO;","names":[]}
@@ -1,3 +1,11 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined")
5
+ return require.apply(this, arguments);
6
+ throw Error('Dynamic require of "' + x + '" is not supported');
7
+ });
8
+
1
9
  // src/functions/clampValue.ts
2
10
  function clampValue(value, min, max) {
3
11
  return value <= min ? min : value >= max ? max : value;
@@ -14,8 +22,12 @@ function isIOS() {
14
22
  function mapValue(value, inMin, inMax, outMin, outMax) {
15
23
  return (value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
16
24
  }
25
+
26
+ // src/functions/crypto.ts
27
+ var crypto = typeof window === "undefined" ? __require("crypto") : window.crypto;
17
28
  export {
18
29
  clampValue,
30
+ crypto,
19
31
  isIOS,
20
32
  mapValue
21
33
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/isIOS.ts","../../packages/utils/src/functions/mapValue.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"],"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,WAAW,SAAS;AACrD;;;ACHO,SAAS,SACd,OACA,OACA,OACA,QACA,QACA;AACA,UAAS,QAAQ,UAAU,SAAS,WAAY,QAAQ,SAAS;AACnE;","names":[]}
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/crypto.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","export const crypto =\n typeof window === 'undefined' ? require('crypto') : window.crypto\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,WAAW,SAAS;AACrD;;;ACHO,SAAS,SACd,OACA,OACA,OACA,QACA,QACA;AACA,UAAS,QAAQ,UAAU,SAAS,WAAY,QAAQ,SAAS;AACnE;;;ACRO,IAAM,SACX,OAAO,WAAW,cAAc,UAAQ,QAAQ,IAAI,OAAO;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "A magic collection of Vue composables, plugins, components and directives",
4
- "version": "0.7.4",
4
+ "version": "0.7.6",
5
5
  "author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
6
6
  "devDependencies": {
7
7
  "@antfu/ni": "^0.21.5",
@@ -1,4 +0,0 @@
1
- type PickPartial<T, K extends keyof T> = {
2
- [P in K]: Partial<T[P]>;
3
- };
4
- export type { PickPartial };