@vuetify/v0 0.0.2-beta.3 → 0.0.2

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,3 @@
1
+ import "../index-LBy5OPMu.js";
2
+ import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "../index-BozA2pze.js";
3
+ export { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run };
@@ -0,0 +1,3 @@
1
+ import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "../utilities-D9rWEgQK.js";
2
+
3
+ export { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run };
@@ -0,0 +1,86 @@
1
+ //#region src/utilities/helpers.ts
2
+ /* @__NO_SIDE_EFFECTS__ */
3
+ function isFunction(item) {
4
+ return typeof item === "function";
5
+ }
6
+ /* @__NO_SIDE_EFFECTS__ */
7
+ function isString(item) {
8
+ return typeof item === "string";
9
+ }
10
+ /* @__NO_SIDE_EFFECTS__ */
11
+ function isNumber(item) {
12
+ return typeof item === "number";
13
+ }
14
+ /* @__NO_SIDE_EFFECTS__ */
15
+ function isBoolean(item) {
16
+ return typeof item === "boolean";
17
+ }
18
+ /* @__NO_SIDE_EFFECTS__ */
19
+ function isObject(item) {
20
+ return typeof item === "object" && item !== null && !Array.isArray(item);
21
+ }
22
+ /* @__NO_SIDE_EFFECTS__ */
23
+ function isArray(item) {
24
+ return Array.isArray(item);
25
+ }
26
+ /* @__NO_SIDE_EFFECTS__ */
27
+ function isNullOrUndefined(item) {
28
+ return item == null;
29
+ }
30
+ /* @__NO_SIDE_EFFECTS__ */
31
+ function isPrimitive(item) {
32
+ return typeof item === "string" || typeof item === "number" || typeof item === "boolean";
33
+ }
34
+ /* @__NO_SIDE_EFFECTS__ */
35
+ function mergeDeep(target, ...sources) {
36
+ if (sources.length === 0) return target;
37
+ const source = sources.shift();
38
+ if (/* @__PURE__ */ isObject(target) && /* @__PURE__ */ isObject(source)) {
39
+ for (const key in source) if (Object.prototype.hasOwnProperty.call(source, key)) {
40
+ const sourceValue = source[key];
41
+ const targetValue = target[key];
42
+ if (/* @__PURE__ */ isObject(sourceValue)) {
43
+ if (!/* @__PURE__ */ isObject(targetValue)) Object.assign(target, { [key]: {} });
44
+ } else Object.assign(target, { [key]: sourceValue });
45
+ }
46
+ }
47
+ return /* @__PURE__ */ mergeDeep(target, ...sources);
48
+ }
49
+ /* @__NO_SIDE_EFFECTS__ */
50
+ function genId() {
51
+ return Math.random().toString(36).slice(2, 9);
52
+ }
53
+
54
+ //#endregion
55
+ //#region src/utilities/benchmark.ts
56
+ function now() {
57
+ if (typeof performance !== "undefined") return performance.now();
58
+ return Date.now();
59
+ }
60
+ async function run(name, fn, samples = 100) {
61
+ if (!(process.env.NODE_ENV !== "production")) {
62
+ fn();
63
+ return {
64
+ name,
65
+ duration: 0,
66
+ ops: Infinity
67
+ };
68
+ }
69
+ const times = [];
70
+ for (let i = 0; i < 5; i++) fn();
71
+ for (let i = 0; i < samples; i++) {
72
+ const start = now();
73
+ fn();
74
+ times.push(now() - start);
75
+ }
76
+ const duration = times.reduce((a, b) => a + b, 0) / times.length;
77
+ const ops = Math.round(1e3 / duration);
78
+ return {
79
+ name,
80
+ duration,
81
+ ops
82
+ };
83
+ }
84
+
85
+ //#endregion
86
+ export { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run };
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "0.0.2-beta.3",
3
+ "version": "0.0.2",
4
4
  "description": "Vuetify0",
5
5
  "license": "MIT",
6
- "main": "./dist/index.mjs",
7
- "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.mts",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "type": "module",
9
10
  "files": [
10
11
  "dist"
11
12
  ],
@@ -17,26 +18,73 @@
17
18
  "exports": {
18
19
  ".": {
19
20
  "types": "./dist/index.d.ts",
20
- "import": "./dist/index.mjs",
21
- "require": "./dist/index.mjs"
21
+ "import": "./dist/index.js"
22
+ },
23
+ "./browser": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/browser/index.js"
26
+ },
27
+ "./components": {
28
+ "types": "./dist/components/index.d.ts",
29
+ "import": "./dist/components/index.js"
30
+ },
31
+ "./composables": {
32
+ "types": "./dist/composables/index.d.ts",
33
+ "import": "./dist/composables/index.js"
34
+ },
35
+ "./factories": {
36
+ "types": "./dist/factories/index.d.ts",
37
+ "import": "./dist/factories/index.js"
38
+ },
39
+ "./transformers": {
40
+ "types": "./dist/transformers/index.d.ts",
41
+ "import": "./dist/transformers/index.js"
42
+ },
43
+ "./constants": {
44
+ "types": "./dist/constants/index.d.ts",
45
+ "import": "./dist/constants/index.js"
46
+ },
47
+ "./types": {
48
+ "types": "./dist/types/index.d.ts",
49
+ "import": "./dist/types/index.js"
50
+ },
51
+ "./utilities": {
52
+ "types": "./dist/utilities/index.d.ts",
53
+ "import": "./dist/utilities/index.js"
22
54
  }
23
55
  },
24
56
  "peerDependencies": {
25
- "vue": ">=3.3.0"
26
- },
27
- "devDependencies": {
28
- "@vue/test-utils": "^2.4.6",
29
57
  "markdown": "^0.5.0",
30
58
  "markdown-it": "^14.1.0",
31
59
  "marked": "^16.1.1",
32
60
  "micromark": "^4.0.2",
33
- "tsdown": "^0.13.3",
34
- "typescript": "^5.8.3",
61
+ "vue": ">=3.3.0"
62
+ },
63
+ "peerDependenciesMeta": {
64
+ "markdown": {
65
+ "optional": true
66
+ },
67
+ "markdown-it": {
68
+ "optional": true
69
+ },
70
+ "marked": {
71
+ "optional": true
72
+ },
73
+ "micromark": {
74
+ "optional": true
75
+ }
76
+ },
77
+ "devDependencies": {
78
+ "@vue/test-utils": "^2.4.6",
79
+ "tsdown": "^0.14.2",
80
+ "typescript": "5.8.3",
35
81
  "unplugin-vue": "^6.2.0",
36
82
  "vue": "^3.5.17"
37
83
  },
38
84
  "scripts": {
39
- "build": "tsdown",
40
- "build:watch": "tsdown --watch"
85
+ "build": "pnpm build:bundler && pnpm build:browser",
86
+ "build:bundler": "tsdown --config build/tsdown.bundler.config.ts",
87
+ "build:browser": "tsdown --config build/tsdown.browser.config.ts",
88
+ "typecheck": "vue-tsc --noEmit --incremental"
41
89
  }
42
90
  }