Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@scalar/themes

Package Overview
Dependencies
Maintainers
8
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scalar/themes - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

6

CHANGELOG.md
# @scalar/themes
## 0.8.1
### Patch Changes
- db7864a: feat: self host fonts on scalar cdn
## 0.8.0

@@ -4,0 +10,0 @@

260

dist/index.js

@@ -1,3 +0,3 @@

import { defineComponent as l, openBlock as o, createBlock as d, resolveDynamicComponent as b, unref as e, createElementBlock as h, Fragment as v, createCommentVNode as t, withCtx as x, createTextVNode as _, toDisplayString as w, onMounted as y, useCssModule as i, renderSlot as g } from "vue";
const S = `/* basic theme */
import { defineComponent as e, openBlock as c, createBlock as d, resolveDynamicComponent as b, unref as l, createElementBlock as h, Fragment as v, createCommentVNode as t, withCtx as x, createTextVNode as w, toDisplayString as U, onMounted as _, useCssModule as i, renderSlot as g } from "vue";
const y = `/* basic theme */
:root {

@@ -105,3 +105,3 @@ --scalar-text-decoration: underline;

}
`, C = `/* basic theme */
`, F = `/* basic theme */
:root {

@@ -289,3 +289,3 @@ --scalar-text-decoration: underline;

}
`, D = `/* basic theme */
`, C = `/* basic theme */
:root {

@@ -552,3 +552,3 @@ --scalar-text-decoration: underline;

}
`, T = `/* basic theme */
`, A = `/* basic theme */
.light-mode {

@@ -703,3 +703,3 @@ --scalar-color-1: #2a2f45;

}
`, M = `/* basic theme */
`, S = `/* basic theme */
:root {

@@ -829,3 +829,3 @@ --scalar-text-decoration: underline;

}
`, z = `.light-mode {
`, D = `.light-mode {
color-scheme: light;

@@ -924,3 +924,3 @@ --scalar-color-1: #000000;

}
`, P = `/* basic theme */
`, B = `/* basic theme */
.light-mode {

@@ -998,3 +998,3 @@ --scalar-background-1: #fff;

}
`, $ = `/* basic theme */
`, E = `/* basic theme */
.light-mode {

@@ -1088,3 +1088,3 @@ --scalar-background-1: #f3f3ee;

}
`, I = `.light-mode {
`, T = `.light-mode {
color-scheme: light;

@@ -1183,13 +1183,135 @@ --scalar-color-1: #584c27;

}
`, B = `
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900');
@import url('https://fonts.googleapis.com/css?family=JetBrains%20Mono');
/* Inter (--scalar-font) */
`, M = `/* Inter (--scalar-font) */
/* cyrillic-ext */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url(https://fonts.scalar.com/inter-cyrillic-ext.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url(https://fonts.scalar.com/inter-cyrillic.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url(https://fonts.scalar.com/inter-greek-ext.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url(https://fonts.scalar.com/inter-greek.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url(https://fonts.scalar.com/inter-vietnamese.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url(https://fonts.scalar.com/inter-latin-ext.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url(https://fonts.scalar.com/inter-latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono (--scalar-font-code) */
`, F = /* @__PURE__ */ l({
/* cyrillic-ext */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
src: url(https://fonts.scalar.com/mono-cyrillic-ext.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
src: url(https://fonts.scalar.com/mono-cyrillic.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
src: url(https://fonts.scalar.com/mono-greek.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
src: url(https://fonts.scalar.com/mono-vietnamese.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
src: url(https://fonts.scalar.com/mono-latin-ext.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
src: url(https://fonts.scalar.com/mono-latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
`, I = /* @__PURE__ */ e({
__name: "DefaultFonts",
setup(c) {
return (a, r) => (o(), d(b("style"), { innerHTML: e(B) }, null, 8, ["innerHTML"]));
setup(n) {
return (a, r) => (c(), d(b("style"), { innerHTML: l(M) }, null, 8, ["innerHTML"]));
}
}), X = /* @__PURE__ */ l({
}), q = /* @__PURE__ */ e({
__name: "ThemeStyles",

@@ -1200,8 +1322,8 @@ props: {

},
setup(c) {
return (a, r) => (o(), h(v, null, [
a.withDefaultFonts ? (o(), d(F, { key: 0 })) : t("", !0),
a.id !== "none" ? (o(), d(b("style"), { key: 1 }, {
setup(n) {
return (a, r) => (c(), h(v, null, [
a.withDefaultFonts ? (c(), d(I, { key: 0 })) : t("", !0),
a.id !== "none" ? (c(), d(b("style"), { key: 1 }, {
default: x(() => [
_(w(e(q)(a.id, { layer: "scalar-theme" })), 1)
w(U(l(G)(a.id, { layer: "scalar-theme" })), 1)
]),

@@ -1213,48 +1335,48 @@ _: 1

});
function k(c, a) {
y(() => {
function f(n, a) {
_(() => {
if (!document.body)
return;
const r = document.querySelector(c);
const r = document.querySelector(n);
r == null || r.classList.add(a);
});
}
const A = /* @__PURE__ */ l({
const z = /* @__PURE__ */ e({
__name: "ResetStyles",
setup(c) {
setup(n) {
const { reset: a } = i();
return k("#headlessui-portal-root", a), (r, n) => g(r.$slots, "default", { styles: e(a) });
return f("#headlessui-portal-root", a), (r, o) => g(r.$slots, "default", { styles: l(a) });
}
}), E = "_reset_1w0av_3", L = {
reset: E
}, m = (c, a) => {
const r = c.__vccOpts || c;
for (const [n, s] of a)
r[n] = s;
}), P = "_reset_1w0av_3", $ = {
reset: P
}, k = (n, a) => {
const r = n.__vccOpts || n;
for (const [o, s] of a)
r[o] = s;
return r;
}, R = {
$style: L
}, j = /* @__PURE__ */ m(A, [["__cssModules", R]]), H = /* @__PURE__ */ l({
}, J = {
$style: $
}, X = /* @__PURE__ */ k(z, [["__cssModules", J]]), L = /* @__PURE__ */ e({
__name: "ScrollbarStyles",
setup(c) {
setup(n) {
const { scrollbars: a } = i();
return k("#headlessui-portal-root", a), (r, n) => g(r.$slots, "default", { styles: e(a) });
return f("#headlessui-portal-root", a), (r, o) => g(r.$slots, "default", { styles: l(a) });
}
}), N = "_scrollbars_3tunk_3", O = {
scrollbars: N,
}), R = "_scrollbars_3tunk_3", H = {
scrollbars: R,
"cm-scroller": "_cm-scroller_3tunk_4",
"custom-scroll": "_custom-scroll_3tunk_5",
"custom-scroll-self-contain-overflow": "_custom-scroll-self-contain-overflow_3tunk_11"
}, G = {
$style: O
}, K = /* @__PURE__ */ m(H, [["__cssModules", G]]), f = [
}, N = {
$style: H
}, j = /* @__PURE__ */ k(L, [["__cssModules", N]]), m = [
["--theme-", "--scalar-"],
["--sidebar-", "--scalar-sidebar-"]
], V = f.map(([c]) => c);
function W(c) {
return V.some((r) => c.includes(r)) ? (console.warn(
], O = m.map(([n]) => n);
function K(n) {
return O.some((r) => n.includes(r)) ? (console.warn(
"DEPRECATION WARNING: It looks like you're using legacy CSS variables in your custom CSS string. Please migrate them to use the updated prefixes. See https://github.com/scalar/scalar#theme-prefix-changes"
), f.reduce((r, [n, s]) => r.replaceAll(n, s), c)) : c;
), m.reduce((r, [o, s]) => r.replaceAll(o, s), n)) : n;
}
const Y = {
const W = {
default: "Default",

@@ -1272,16 +1394,16 @@ alternate: "Alternate",

}, p = {
alternate: S,
alternate: y,
default: u,
moon: z,
purple: P,
solarized: I,
bluePlanet: C,
deepSpace: D,
saturn: $,
kepler: T,
mars: M
}, Q = Object.keys(p), q = (c, a) => {
if (c === "none")
moon: D,
purple: B,
solarized: T,
bluePlanet: F,
deepSpace: C,
saturn: E,
kepler: A,
mars: S
}, Y = Object.keys(p), G = (n, a) => {
if (n === "none")
return "";
const r = p[c || "default"] ?? u;
const r = p[n || "default"] ?? u;
return a != null && a.layer ? `@layer ${a.layer} {

@@ -1291,10 +1413,10 @@ ${r}}` : r;

export {
j as ResetStyles,
K as ScrollbarStyles,
X as ThemeStyles,
Q as availableThemes,
q as getThemeById,
W as migrateThemeVariables,
X as ResetStyles,
j as ScrollbarStyles,
q as ThemeStyles,
Y as availableThemes,
G as getThemeById,
K as migrateThemeVariables,
p as presets,
Y as themeLabels
W as themeLabels
};

@@ -18,3 +18,3 @@ {

],
"version": "0.8.0",
"version": "0.8.1",
"engines": {

@@ -21,0 +21,0 @@ "node": ">=18"

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc