@gluhar/theme 6.0.0-next.1 → 6.0.0-next.10
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 +64 -0
- package/dist/module.d.mts +14 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +79 -0
- package/dist/runtime/fonts/object-sans/PPObjectSans-Heavy.otf +0 -0
- package/dist/runtime/fonts/object-sans/PPObjectSans-HeavySlanted.otf +0 -0
- package/dist/runtime/fonts/object-sans/PPObjectSans-Regular.otf +0 -0
- package/dist/runtime/fonts/object-sans/PPObjectSans-Slanted.otf +0 -0
- package/dist/runtime/fonts/object-sans/stylesheet.css +1 -0
- package/dist/runtime/theme.css +1 -0
- package/dist/types.d.mts +9 -0
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,70 @@
|
|
|
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
|
+
# [6.0.0-next.10](https://github.com/gluharco/gluhar/compare/v6.0.0-next.9...v6.0.0-next.10) (2026-11-13)
|
|
7
|
+
|
|
8
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [6.0.0-next.9](https://github.com/gluharco/gluhar/compare/v6.0.0-next.8...v6.0.0-next.9) (2026-11-12)
|
|
15
|
+
|
|
16
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [6.0.0-next.8](https://github.com/gluharco/gluhar/compare/v6.0.0-next.7...v6.0.0-next.8) (2026-11-10)
|
|
23
|
+
|
|
24
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [6.0.0-next.7](https://github.com/gluharco/gluhar/compare/v6.0.0-next.6...v6.0.0-next.7) (2026-10-21)
|
|
31
|
+
|
|
32
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [6.0.0-next.6](https://github.com/gluharco/gluhar/compare/v6.0.0-next.5...v6.0.0-next.6) (2026-10-21)
|
|
39
|
+
|
|
40
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# [6.0.0-next.5](https://github.com/gluharco/gluhar/compare/v6.0.0-next.4...v6.0.0-next.5) (2026-10-21)
|
|
47
|
+
|
|
48
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# [6.0.0-next.4](https://github.com/gluharco/gluhar/compare/v6.0.0-next.3...v6.0.0-next.4) (2026-10-21)
|
|
55
|
+
|
|
56
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# [6.0.0-next.3](https://github.com/gluharco/gluhar/compare/v6.0.0-next.2...v6.0.0-next.3) (2026-10-21)
|
|
63
|
+
|
|
64
|
+
**📝 Note:** Version bump only for package @gluhar/theme
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
6
70
|
# [6.0.0-next.1](https://github.com/gluharco/gluhar/compare/v6.0.0-next.0...v6.0.0-next.1) (2026-10-20)
|
|
7
71
|
|
|
8
72
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface GluharThemeOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The project's main stylesheet, relative to the root dir. Added to
|
|
6
|
+
* `nuxt.options.css` if it isn't there yet, and scanned for
|
|
7
|
+
* `--breakpoint-*`. `false` to manage CSS entirely yourself.
|
|
8
|
+
*/
|
|
9
|
+
css?: string | false;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: _nuxt_schema.NuxtModule<GluharThemeOptions, GluharThemeOptions, false>;
|
|
12
|
+
|
|
13
|
+
export { _default as default };
|
|
14
|
+
export type { GluharThemeOptions };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'fs';
|
|
2
|
+
import { resolve, dirname } from 'path';
|
|
3
|
+
import { useLogger, defineNuxtModule, createResolver, addVitePlugin } from '@nuxt/kit';
|
|
4
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
5
|
+
import { defu } from 'defu';
|
|
6
|
+
|
|
7
|
+
const REM = 16;
|
|
8
|
+
const readBreakpoints = (file, into = {}, seen = /* @__PURE__ */ new Set()) => {
|
|
9
|
+
if (seen.has(file) || !existsSync(file)) return into;
|
|
10
|
+
seen.add(file);
|
|
11
|
+
const css = readFileSync(file, "utf8").replace(/\/\*[\s\S]*?\*\//g, "");
|
|
12
|
+
const pattern = /@import\s+["'](\.{1,2}\/[^"']+)["']|--breakpoint-(\*|[\w-]+)\s*:\s*([^;]+);/g;
|
|
13
|
+
for (const [, imported, name, value] of css.matchAll(pattern)) {
|
|
14
|
+
if (imported) {
|
|
15
|
+
readBreakpoints(resolve(dirname(file), imported), into, seen);
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (name === "*") {
|
|
19
|
+
if (value?.trim() === "initial")
|
|
20
|
+
for (const key of Object.keys(into)) delete into[key];
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const match = value?.trim().match(/^([\d.]+)(rem|em|px)?$/);
|
|
24
|
+
if (!match) continue;
|
|
25
|
+
const [, amount, unit] = match;
|
|
26
|
+
into[name] = unit === "px" ? Number(amount) : Number(amount) * REM;
|
|
27
|
+
}
|
|
28
|
+
return into;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const logger = useLogger("@gluhar/theme");
|
|
32
|
+
const module$1 = defineNuxtModule({
|
|
33
|
+
meta: {
|
|
34
|
+
name: "@gluhar/theme",
|
|
35
|
+
configKey: "gluharTheme"
|
|
36
|
+
},
|
|
37
|
+
defaults: {
|
|
38
|
+
css: "assets/styles/main.css"
|
|
39
|
+
},
|
|
40
|
+
setup(options, nuxt) {
|
|
41
|
+
const { resolve: resolveRuntime } = createResolver(import.meta.url);
|
|
42
|
+
addVitePlugin(tailwindcss());
|
|
43
|
+
const css = options.css ? resolve(nuxt.options.rootDir, options.css) : void 0;
|
|
44
|
+
if (css && !existsSync(css)) {
|
|
45
|
+
logger.warn(
|
|
46
|
+
`No stylesheet at ${options.css}. Create it with:
|
|
47
|
+
@import "tailwindcss";
|
|
48
|
+
@import "@gluhar/theme/theme.css";`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
if (css && existsSync(css)) {
|
|
52
|
+
const listed = nuxt.options.css.some(
|
|
53
|
+
(entry) => typeof entry === "string" && resolve(nuxt.options.rootDir, entry.replace(/^[~@]\//, "")) === css
|
|
54
|
+
);
|
|
55
|
+
if (!listed) nuxt.options.css.push(css);
|
|
56
|
+
}
|
|
57
|
+
const readAll = () => {
|
|
58
|
+
const breakpoints = readBreakpoints(resolveRuntime("runtime/theme.css"));
|
|
59
|
+
if (css) readBreakpoints(css, breakpoints);
|
|
60
|
+
return breakpoints;
|
|
61
|
+
};
|
|
62
|
+
nuxt.options.appConfig.gluhar = defu(
|
|
63
|
+
{ breakpoints: readAll() },
|
|
64
|
+
nuxt.options.appConfig.gluhar
|
|
65
|
+
);
|
|
66
|
+
if (css && nuxt.options.dev) {
|
|
67
|
+
const initial = JSON.stringify(nuxt.options.appConfig.gluhar.breakpoints);
|
|
68
|
+
nuxt.hook("builder:watch", async (_event, path) => {
|
|
69
|
+
if (!path.endsWith(".css")) return;
|
|
70
|
+
if (JSON.stringify(readAll()) !== initial) {
|
|
71
|
+
logger.info("Breakpoints changed \u2014 restarting.");
|
|
72
|
+
await nuxt.callHook("restart");
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export { module$1 as default };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{ascent-override:85%;font-family:Object Sans;font-style:normal;font-weight:400;src:url(PPObjectSans-Regular.otf) format("opentype")}@font-face{font-family:Object Sans;font-style:italic;font-weight:400;src:url(PPObjectSans-Slanted.otf) format("opentype")}@font-face{font-family:Object Sans;font-style:normal;font-weight:700;src:url(PPObjectSans-Heavy.otf) format("opentype")}@font-face{font-family:Object Sans;font-style:italic;font-weight:700;src:url(PPObjectSans-HeavySlanted.otf) format("opentype")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@source "../../../app/dist/runtime/components";@source "../../../sanity/dist/runtime/components";@custom-variant dark (&:where(.dark, .dark *));@theme{--breakpoint-tablet:48rem;--breakpoint-desktop:75rem;--breakpoint-wide:125rem;--color-primary-light:#333;--color-primary-base:#222;--color-primary-dark:#111;--color-secondary-base:#f9f9f9;--color-accent-base:#faf;--color-white-base:#fff;--tracking-tightest:-0.075em;--leading-tighter:1.18;--leading-tightest:1.1;--ease-in-out-expo:cubic-bezier(0.87,0,0.13,1)}@utility h-screen-s{height:100svh}@utility h-screen-l{height:100lvh}@utility h-screen-d{height:100dvh}@utility flex-0-auto{flex:1 0 auto}html.lenis,html.lenis body{height:auto}.lenis.lenis-smooth{scroll-behavior:auto!important}.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}.lenis.lenis-stopped{overflow:hidden}.lenis.lenis-scrolling iframe{pointer-events:none}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
7
|
+
export { default } from './module.mjs'
|
|
8
|
+
|
|
9
|
+
export { type GluharThemeOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gluhar/theme",
|
|
3
|
-
"version": "6.0.0-next.
|
|
3
|
+
"version": "6.0.0-next.10",
|
|
4
4
|
"description": "Gluhar Theme package. Sets up Tailwind CSS v4, ships shared tokens (theme.css) and fonts, and feeds the CSS breakpoints to useResponsive.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,24 +35,23 @@
|
|
|
35
35
|
"test:watch": "vitest watch"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nuxt/kit": "^4.
|
|
38
|
+
"@nuxt/kit": "^4.6.2",
|
|
39
39
|
"@tailwindcss/vite": "^4.3.0",
|
|
40
40
|
"defu": "^6.1.4"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@nuxt/devtools": "latest",
|
|
44
43
|
"@nuxt/eslint-config": "^1.9.0",
|
|
45
44
|
"@nuxt/module-builder": "^1.0.3",
|
|
46
|
-
"@nuxt/schema": "^4.
|
|
47
|
-
"@nuxt/test-utils": "^3.
|
|
45
|
+
"@nuxt/schema": "^4.6.2",
|
|
46
|
+
"@nuxt/test-utils": "^4.3.4",
|
|
48
47
|
"@types/node": "^22.5.4",
|
|
49
48
|
"changelogen": "^0.5.5",
|
|
50
49
|
"eslint": "^9.10.0",
|
|
51
|
-
"nuxt": "^4.
|
|
52
|
-
"vitest": "^
|
|
50
|
+
"nuxt": "^4.6.2",
|
|
51
|
+
"vitest": "^5.0.5"
|
|
53
52
|
},
|
|
54
53
|
"peerDependencies": {
|
|
55
|
-
"nuxt": "^4.
|
|
54
|
+
"nuxt": "^4.6.2",
|
|
56
55
|
"tailwindcss": "^4.3.0"
|
|
57
56
|
}
|
|
58
57
|
}
|