@scalar/themes
Advanced tools
Comparing version 0.9.4 to 0.9.5
# @scalar/themes | ||
## 0.9.5 | ||
### Patch Changes | ||
- 5e92eab: feat(#doc-1996): themes css exports | ||
## 0.9.4 | ||
@@ -4,0 +10,0 @@ |
@@ -1,8 +0,1 @@ | ||
/** A component to insert the theme styles */ | ||
export { default as ThemeStyles } from './components/ThemeStyles.vue'; | ||
/** A scoped style reset component. */ | ||
export { default as ResetStyles } from './components/ResetStyles.vue'; | ||
/** A scoped scrollbar style component. */ | ||
export { default as ScrollbarStyles } from './components/ScrollbarStyles.vue'; | ||
/** */ | ||
export { migrateThemeVariables } from './utilities/legacy'; | ||
@@ -22,2 +15,6 @@ /** | ||
/** | ||
* Get the CSS for the default Scalar fonts | ||
*/ | ||
export declare const getDefaultFonts: () => string; | ||
/** | ||
* List of available theme IDs. | ||
@@ -28,5 +25,19 @@ */ | ||
/** | ||
* Optional cascade layer to assign the theme styles to | ||
* Whether or not to include the base variables (e.g. typography) | ||
* | ||
* @default true | ||
*/ | ||
layer?: string; | ||
variables?: boolean; | ||
/** | ||
* Whether or not to include the definitions for the default scalar fonts (e.g. Inter) | ||
* | ||
* @default true | ||
*/ | ||
fonts?: boolean; | ||
/** | ||
* Cascade layer to assign the theme styles to | ||
* | ||
* @default 'scalar-theme' | ||
*/ | ||
layer?: string | false; | ||
}; | ||
@@ -36,3 +47,7 @@ /** | ||
*/ | ||
export declare const getThemeById: (themeId?: ThemeId, opts?: GetThemeOpts) => string; | ||
export declare const getThemeById: (themeId?: ThemeId) => string; | ||
/** | ||
* Get the theme and base variables for a given theme | ||
*/ | ||
export declare const getThemeStyles: (themeId?: ThemeId, opts?: GetThemeOpts) => string; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,16 +0,15 @@ | ||
import m from "./presets/alternate.css.js"; | ||
import o from "./presets/bluePlanet.css.js"; | ||
import p from "./presets/deepSpace.css.js"; | ||
import a from "./presets/default.css.js"; | ||
import n from "./presets/kepler.css.js"; | ||
import s from "./presets/mars.css.js"; | ||
import f from "./presets/moon.css.js"; | ||
import u from "./presets/purple.css.js"; | ||
import i from "./presets/saturn.css.js"; | ||
import d from "./presets/solarized.css.js"; | ||
import { default as j } from "./components/ThemeStyles.vue.js"; | ||
import { default as A } from "./components/ResetStyles.vue.js"; | ||
import { default as L } from "./components/ScrollbarStyles.vue.js"; | ||
import { migrateThemeVariables as R } from "./utilities/legacy.js"; | ||
const g = { | ||
import o from "./fonts.css.js"; | ||
import s from "./presets/alternate.css2.js"; | ||
import u from "./presets/bluePlanet.css2.js"; | ||
import i from "./presets/deepSpace.css2.js"; | ||
import a from "./presets/default.css2.js"; | ||
import f from "./presets/kepler.css2.js"; | ||
import h from "./presets/mars.css2.js"; | ||
import c from "./presets/moon.css2.js"; | ||
import T from "./presets/purple.css2.js"; | ||
import d from "./presets/saturn.css2.js"; | ||
import b from "./presets/solarized.css2.js"; | ||
import S from "./variables.css.js"; | ||
import { migrateThemeVariables as w } from "./utilities/legacy.js"; | ||
const $ = { | ||
default: "Default", | ||
@@ -27,28 +26,30 @@ alternate: "Alternate", | ||
none: "" | ||
}, l = { | ||
alternate: m, | ||
}, m = { | ||
alternate: s, | ||
default: a, | ||
moon: f, | ||
purple: u, | ||
solarized: d, | ||
bluePlanet: o, | ||
deepSpace: p, | ||
saturn: i, | ||
kepler: n, | ||
mars: s | ||
}, B = Object.keys(l), D = (r, e) => { | ||
if (r === "none") return ""; | ||
const t = l[r || "default"] ?? a; | ||
return e != null && e.layer ? `@layer ${e.layer} { | ||
moon: c, | ||
purple: T, | ||
solarized: b, | ||
bluePlanet: u, | ||
deepSpace: i, | ||
saturn: d, | ||
kepler: f, | ||
mars: h | ||
}, A = () => o, K = Object.keys(m), y = (e) => e === "none" ? "" : m[e || "default"] ?? a, L = (e, l) => { | ||
const { variables: n = !0, fonts: p = !0, layer: r = "scalar-theme" } = l ?? {}, t = [ | ||
y(e), | ||
n ? S : "", | ||
p ? o : "" | ||
].join(""); | ||
return r ? `@layer ${r} { | ||
${t}}` : t; | ||
}; | ||
export { | ||
A as ResetStyles, | ||
L as ScrollbarStyles, | ||
j as ThemeStyles, | ||
B as availableThemes, | ||
D as getThemeById, | ||
R as migrateThemeVariables, | ||
l as presets, | ||
g as themeLabels | ||
K as availableThemes, | ||
A as getDefaultFonts, | ||
y as getThemeById, | ||
L as getThemeStyles, | ||
w as migrateThemeVariables, | ||
m as presets, | ||
$ as themeLabels | ||
}; |
@@ -0,1 +1,2 @@ | ||
/** Scalar Tailwind Preset */ | ||
declare const _default: { | ||
@@ -2,0 +3,0 @@ darkMode: ["selector", string]; |
@@ -18,3 +18,3 @@ { | ||
], | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"engines": { | ||
@@ -27,11 +27,5 @@ "node": ">=18" | ||
".": "./dist/index.js", | ||
"./base.css": "./dist/base.css", | ||
"./fonts.css": "./dist/fonts.css", | ||
"./tailwind": "./src/tailwind.ts", | ||
"./style.css": "./dist/style.css", | ||
"./presets/alternate.css": "./dist/presets/alternate.css", | ||
"./presets/default.css": "./dist/presets/default.css", | ||
"./presets/moon.css": "./dist/presets/moon.css", | ||
"./presets/purple.css": "./dist/presets/purple.css", | ||
"./presets/solarized.css": "./dist/presets/solarized.css", | ||
"./tailwind": "./src/tailwind.ts" | ||
"./presets/*.css": "./dist/presets/*.css" | ||
}, | ||
@@ -51,3 +45,3 @@ "files": [ | ||
"@vitest/coverage-v8": "^1.6.0", | ||
"tailwindcss": "^3.4.3", | ||
"tailwindcss": "^3.4.4", | ||
"tsc-alias": "^1.8.8", | ||
@@ -54,0 +48,0 @@ "vite": "^5.2.10", |
import pixelPreset from '@rise8/tailwind-pixel-perfect-preset' | ||
import type { Config } from 'tailwindcss' | ||
/** Scalar Tailwind Preset */ | ||
export default { | ||
@@ -5,0 +6,0 @@ darkMode: ['selector', '.dark-mode'], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98591
36
713
1