@gluhar/core 3.0.0 → 4.1.5
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 +94 -0
- package/package.json +2 -2
- package/dist/module.cjs +0 -5
- package/dist/module.d.mts +0 -7
- package/dist/module.d.ts +0 -7
- package/dist/module.json +0 -9
- package/dist/module.mjs +0 -18
- package/dist/runtime/composables/useClientOnly.d.ts +0 -3
- package/dist/runtime/composables/useClientOnly.js +0 -8
- package/dist/runtime/composables/useResponsive.d.ts +0 -17
- package/dist/runtime/composables/useResponsive.js +0 -8
- package/dist/runtime/types/index.d.ts +0 -3
- package/dist/runtime/types/index.js +0 -0
- package/dist/runtime/utils/common.d.ts +0 -10
- package/dist/runtime/utils/common.js +0 -6
- package/dist/runtime/utils/fs.d.ts +0 -4
- package/dist/runtime/utils/fs.js +0 -13
- package/dist/runtime/utils/generators.d.ts +0 -6
- package/dist/runtime/utils/generators.js +0 -5
- package/dist/runtime/utils/index.d.ts +0 -2
- package/dist/runtime/utils/index.js +0 -2
- package/dist/types.d.mts +0 -7
- package/dist/types.d.ts +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,100 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.1.5](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.1.4...@gluhar/core@4.1.5) (2026-03-23)
|
|
7
|
+
|
|
8
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.1.4](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.1.3...@gluhar/core@4.1.4) (2026-03-23)
|
|
15
|
+
|
|
16
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [4.1.3](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.1.2...@gluhar/core@4.1.3) (2026-03-23)
|
|
23
|
+
|
|
24
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [4.1.2](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.1.1...@gluhar/core@4.1.2) (2026-03-23)
|
|
31
|
+
|
|
32
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [4.1.1](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.1.0...@gluhar/core@4.1.1) (2026-03-23)
|
|
39
|
+
|
|
40
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# [4.1.0](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.0.3...@gluhar/core@4.1.0) (2026-03-23)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### 🚀 Enhancements
|
|
50
|
+
|
|
51
|
+
- Fix ai mess ([6fc7d6b](https://github.com/gluharco/gluhar/commit/6fc7d6bfcffda89fb061389f1eea930deb509e9a))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## [4.0.3](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.0.2...@gluhar/core@4.0.3) (2026-03-23)
|
|
58
|
+
|
|
59
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## [4.0.2](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.0.1...@gluhar/core@4.0.2) (2026-03-23)
|
|
66
|
+
|
|
67
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## [4.0.1](https://github.com/gluharco/gluhar/compare/@gluhar/core@4.0.0...@gluhar/core@4.0.1) (2026-03-23)
|
|
74
|
+
|
|
75
|
+
**📝 Note:** Version bump only for package @gluhar/core
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# [4.0.0](https://github.com/gluharco/gluhar/compare/@gluhar/core@3.0.0...@gluhar/core@4.0.0) (2026-03-13)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
- Feat(core)!: replace useResponsive with full breakpoint implementation ([887729a](https://github.com/gluharco/gluhar/commit/887729af8659b6b6529ac8463a382e8d1825d885))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### BREAKING CHANGES
|
|
88
|
+
|
|
89
|
+
- UseResponsive now returns { mobile, tablet, tabletExact, desktop, desktopExact, wide, touch }
|
|
90
|
+
instead of { isMobile, breakpoints }.
|
|
91
|
+
|
|
92
|
+
Supersedes the project-level useMobile composable used across all projects.
|
|
93
|
+
Breakpoints: tablet 768, desktop 1200, wide 2000 (hardcoded for now — will derive from Tailwind config in future).
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
6
100
|
# [3.0.0](https://github.com/gluharry/gluhar/compare/@gluhar/core@2.0.0...@gluhar/core@3.0.0) (2025-05-13)
|
|
7
101
|
|
|
8
102
|
**📝 Note:** Version bump only for package @gluhar/core
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gluhar/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.5",
|
|
4
4
|
"description": "Gluhar Core packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"nuxt": "^3.13.1",
|
|
54
54
|
"vitest": "^2.0.5"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a60bf29f338bc3af3212a3a8ed647f75c69a2c4a"
|
|
57
57
|
}
|
package/dist/module.cjs
DELETED
package/dist/module.d.mts
DELETED
package/dist/module.d.ts
DELETED
package/dist/module.json
DELETED
package/dist/module.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, installModule, addImportsDir } from '@nuxt/kit';
|
|
2
|
-
|
|
3
|
-
const module = defineNuxtModule({
|
|
4
|
-
meta: {
|
|
5
|
-
name: "@gluhar/core",
|
|
6
|
-
configKey: "gluharCore"
|
|
7
|
-
},
|
|
8
|
-
// Default configuration options of the Nuxt module
|
|
9
|
-
defaults: {},
|
|
10
|
-
setup(options, nuxt) {
|
|
11
|
-
const { resolve } = createResolver(import.meta.url);
|
|
12
|
-
installModule("@nuxtjs/device");
|
|
13
|
-
addImportsDir(resolve("runtime/composables"));
|
|
14
|
-
addImportsDir(resolve("runtime/utils"));
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export { module as default };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const useResponsive: () => {
|
|
2
|
-
isMobile: import("vue").Ref<boolean, boolean>;
|
|
3
|
-
breakpoints: Record<"sm" | "md" | "lg" | "xl" | "2xl", import("vue").Ref<boolean, boolean>> & {
|
|
4
|
-
greaterOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">) => import("vue").Ref<boolean>;
|
|
5
|
-
smallerOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">) => import("vue").Ref<boolean>;
|
|
6
|
-
greater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): import("vue").Ref<boolean>;
|
|
7
|
-
smaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): import("vue").Ref<boolean>;
|
|
8
|
-
between(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): import("vue").Ref<boolean>;
|
|
9
|
-
isGreater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
10
|
-
isGreaterOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
11
|
-
isSmaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
12
|
-
isSmallerOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
13
|
-
isInBetween(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
14
|
-
current: () => import("vue").ComputedRef<string[]>;
|
|
15
|
-
active(): import("vue").ComputedRef<string | undefined>;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { useBreakpoints, breakpointsTailwind } from "@vueuse/core";
|
|
2
|
-
import { useDevice } from "#imports";
|
|
3
|
-
export const useResponsive = () => {
|
|
4
|
-
const breakpoints = useBreakpoints(breakpointsTailwind);
|
|
5
|
-
const { isMobile } = useDevice();
|
|
6
|
-
const mobile = breakpoints.smaller("sm") || isMobile;
|
|
7
|
-
return { isMobile: mobile, breakpoints };
|
|
8
|
-
};
|
|
File without changes
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const capitalize: (s: string) => string;
|
|
2
|
-
export declare const envMode: () => "dev" | "prod";
|
|
3
|
-
/**
|
|
4
|
-
* Returns the base URL based on the environment mode.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} baseUrl - The base URL to be used.
|
|
7
|
-
* @returns {string | undefined} - The base URL if the environment mode is "prod", otherwise undefined.
|
|
8
|
-
*/
|
|
9
|
-
export declare const useBaseUrl: (baseUrl: string) => string | undefined;
|
|
10
|
-
export declare const asyncTimeout: (ms: number) => Promise<unknown>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export const capitalize = (s) => s && s[0].toUpperCase() + s.slice(1);
|
|
2
|
-
export const envMode = () => process.env.NODE_ENV === "development" ? "dev" : "prod";
|
|
3
|
-
export const useBaseUrl = (baseUrl) => {
|
|
4
|
-
return envMode() === "prod" ? baseUrl : void 0;
|
|
5
|
-
};
|
|
6
|
-
export const asyncTimeout = (ms) => new Promise((res) => setTimeout(res, ms));
|
package/dist/runtime/utils/fs.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "fs";
|
|
2
|
-
import { join } from "path";
|
|
3
|
-
import { evalModule } from "mlly";
|
|
4
|
-
export const readModule = async (path, options = { cwd: true }) => {
|
|
5
|
-
if (!path) throw new Error("[@gluhar/core] readModule | No path provided.");
|
|
6
|
-
const p = options?.cwd ? join(process.cwd(), path) : path;
|
|
7
|
-
const file = readFileSync(p)?.toString();
|
|
8
|
-
if (!file)
|
|
9
|
-
throw new Error("[@gluhar/core] readModule | File not found on path: " + p);
|
|
10
|
-
const sanitizedFile = file.replaceAll(" as const", "");
|
|
11
|
-
const module = await evalModule(sanitizedFile);
|
|
12
|
-
return options?.default ? module.default : module;
|
|
13
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NonNegativeInteger } from "../types.js";
|
|
2
|
-
export declare const getRandomInt: (max?: number) => number;
|
|
3
|
-
export declare const getRandomBetween: (min: number, max: number) => number;
|
|
4
|
-
export declare const getRandomDigits: <N extends number>(count: NonNegativeInteger<N>) => number;
|
|
5
|
-
export declare const getRandomHex: <N extends number>(count?: NonNegativeInteger<N>) => string;
|
|
6
|
-
export declare const getUuid: () => string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const getRandomInt = (max = 100) => Math.floor(Math.random() * max);
|
|
2
|
-
export const getRandomBetween = (min, max) => getRandomInt(max - min + 1) + min;
|
|
3
|
-
export const getRandomDigits = (count) => getRandomBetween(9 * 10 ** (count - 1), 10 ** (count - 1));
|
|
4
|
-
export const getRandomHex = (count) => [...Array(count || 6)].map(() => getRandomBetween(0, 15).toString(16)).join("");
|
|
5
|
-
export const getUuid = () => `huuid-${getRandomHex()}-${getRandomHex()}-${getRandomHex()}`;
|
package/dist/types.d.mts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module.js'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
|
-
export { type GluharCoreOptions, default } from './module.js'
|
package/dist/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
|
-
export { type GluharCoreOptions, default } from './module'
|