@stackone/malachite 2.107.0 → 2.108.1

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.
@@ -1,35 +1,29 @@
1
- import m from "./vendor/@fontsource/inter/files/inter-latin-400-normal.woff2.js";
2
- import f from "./vendor/@fontsource/inter/files/inter-latin-500-normal.woff2.js";
1
+ import c from "./vendor/@fontsource/inter/files/inter-latin-400-normal.woff2.js";
2
+ import m from "./vendor/@fontsource/inter/files/inter-latin-500-normal.woff2.js";
3
3
  import s from "./vendor/@fontsource/inter/files/inter-latin-600-normal.woff2.js";
4
- import F from "./vendor/@fontsource/inter/files/inter-latin-700-normal.woff2.js";
5
- import g from "./vendor/@fontsource/inter/files/inter-latin-ext-400-normal.woff2.js";
6
- import E from "./vendor/@fontsource/inter/files/inter-latin-ext-500-normal.woff2.js";
7
- import d from "./vendor/@fontsource/inter/files/inter-latin-ext-600-normal.woff2.js";
8
- import p from "./vendor/@fontsource/inter/files/inter-latin-ext-700-normal.woff2.js";
9
- const t = "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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD", e = "U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF", C = [
10
- { weight: 400, src: m, range: t },
11
- { weight: 500, src: f, range: t },
4
+ import f from "./vendor/@fontsource/inter/files/inter-latin-700-normal.woff2.js";
5
+ import F from "./vendor/@fontsource/inter/files/inter-latin-ext-400-normal.woff2.js";
6
+ import g from "./vendor/@fontsource/inter/files/inter-latin-ext-500-normal.woff2.js";
7
+ import E from "./vendor/@fontsource/inter/files/inter-latin-ext-600-normal.woff2.js";
8
+ import d from "./vendor/@fontsource/inter/files/inter-latin-ext-700-normal.woff2.js";
9
+ const t = "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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD", e = "U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF", p = [
10
+ { weight: 400, src: c, range: t },
11
+ { weight: 500, src: m, range: t },
12
12
  { weight: 600, src: s, range: t },
13
- { weight: 700, src: F, range: t },
14
- { weight: 400, src: g, range: e },
15
- { weight: 500, src: E, range: e },
16
- { weight: 600, src: d, range: e },
17
- { weight: 700, src: p, range: e }
18
- ], i = "malachite-inter-font-face";
19
- let r = !1;
20
- const y = () => {
21
- if (r || typeof document > "u" || !document.head)
13
+ { weight: 700, src: f, range: t },
14
+ { weight: 400, src: F, range: e },
15
+ { weight: 500, src: g, range: e },
16
+ { weight: 600, src: E, range: e },
17
+ { weight: 700, src: d, range: e }
18
+ ], r = "malachite-inter-font-face", B = () => {
19
+ if (typeof document > "u" || !document.head || document.getElementById(r))
22
20
  return;
23
- if (document.getElementById(i)) {
24
- r = !0;
25
- return;
26
- }
27
- const o = C.map(
28
- ({ weight: U, src: a, range: c }) => `@font-face{font-family:'Inter';font-style:normal;font-weight:${U};font-display:swap;src:url('${a}') format('woff2');unicode-range:${c};}`
21
+ const i = p.map(
22
+ ({ weight: o, src: U, range: a }) => `@font-face{font-family:'Inter';font-style:normal;font-weight:${o};font-display:swap;src:url('${U}') format('woff2');unicode-range:${a};}`
29
23
  ).join(""), n = document.createElement("style");
30
- n.id = i, n.textContent = o, document.head.appendChild(n), r = !0;
24
+ n.id = r, n.textContent = i, document.head.appendChild(n);
31
25
  };
32
26
  export {
33
- y as ensureInterFontFace
27
+ B as ensureInterFontFace
34
28
  };
35
29
  //# sourceMappingURL=inter-font.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inter-font.js","sources":["../src/inter-font.ts"],"sourcesContent":["// Self-hosted Inter webfont for Malachite.\n//\n// Malachite renders inside a shadow root and injects its Tailwind sheet there, but\n// @font-face rules don't load fonts from inside a shadow root — they have to live in\n// the document. So we bundle the Inter woff2 files (via @fontsource/inter) and inject\n// the @font-face declarations into document.head once, the first time a Malachite\n// context mounts. The --font-sans theme token (see tailwind.css) then resolves to it.\nimport interLatin400 from '@fontsource/inter/files/inter-latin-400-normal.woff2';\nimport interLatin500 from '@fontsource/inter/files/inter-latin-500-normal.woff2';\nimport interLatin600 from '@fontsource/inter/files/inter-latin-600-normal.woff2';\nimport interLatin700 from '@fontsource/inter/files/inter-latin-700-normal.woff2';\nimport interLatinExt400 from '@fontsource/inter/files/inter-latin-ext-400-normal.woff2';\nimport interLatinExt500 from '@fontsource/inter/files/inter-latin-ext-500-normal.woff2';\nimport interLatinExt600 from '@fontsource/inter/files/inter-latin-ext-600-normal.woff2';\nimport interLatinExt700 from '@fontsource/inter/files/inter-latin-ext-700-normal.woff2';\n\nconst LATIN_RANGE =\n '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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD';\nconst LATIN_EXT_RANGE =\n 'U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF';\n\nconst FACES: ReadonlyArray<{ weight: number; src: string; range: string }> = [\n { weight: 400, src: interLatin400, range: LATIN_RANGE },\n { weight: 500, src: interLatin500, range: LATIN_RANGE },\n { weight: 600, src: interLatin600, range: LATIN_RANGE },\n { weight: 700, src: interLatin700, range: LATIN_RANGE },\n { weight: 400, src: interLatinExt400, range: LATIN_EXT_RANGE },\n { weight: 500, src: interLatinExt500, range: LATIN_EXT_RANGE },\n { weight: 600, src: interLatinExt600, range: LATIN_EXT_RANGE },\n { weight: 700, src: interLatinExt700, range: LATIN_EXT_RANGE },\n];\n\nconst STYLE_ID = 'malachite-inter-font-face';\n\nlet injected = false;\n\nexport const ensureInterFontFace = (): void => {\n if (injected || typeof document === 'undefined' || !document.head) {\n return;\n }\n if (document.getElementById(STYLE_ID)) {\n injected = true;\n return;\n }\n const css = FACES.map(\n ({ weight, src, range }) =>\n `@font-face{font-family:'Inter';font-style:normal;font-weight:${weight};font-display:swap;src:url('${src}') format('woff2');unicode-range:${range};}`,\n ).join('');\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = css;\n document.head.appendChild(style);\n injected = true;\n};\n"],"names":["LATIN_RANGE","LATIN_EXT_RANGE","FACES","interLatin400","interLatin500","interLatin600","interLatin700","interLatinExt400","interLatinExt500","interLatinExt600","interLatinExt700","STYLE_ID","injected","ensureInterFontFace","css","weight","src","range","style"],"mappings":";;;;;;;;AAgBA,MAAMA,IACF,4JACEC,IACF,sLAEEC,IAAuE;AAAA,EACzE,EAAE,QAAQ,KAAK,KAAKC,GAAe,OAAOH,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKI,GAAe,OAAOJ,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKK,GAAe,OAAOL,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKM,GAAe,OAAON,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKO,GAAkB,OAAON,EAAA;AAAA,EAC7C,EAAE,QAAQ,KAAK,KAAKO,GAAkB,OAAOP,EAAA;AAAA,EAC7C,EAAE,QAAQ,KAAK,KAAKQ,GAAkB,OAAOR,EAAA;AAAA,EAC7C,EAAE,QAAQ,KAAK,KAAKS,GAAkB,OAAOT,EAAA;AACjD,GAEMU,IAAW;AAEjB,IAAIC,IAAW;AAER,MAAMC,IAAsB,MAAY;AAC3C,MAAID,KAAY,OAAO,WAAa,OAAe,CAAC,SAAS;AACzD;AAEJ,MAAI,SAAS,eAAeD,CAAQ,GAAG;AACnC,IAAAC,IAAW;AACX;AAAA,EACJ;AACA,QAAME,IAAMZ,EAAM;AAAA,IACd,CAAC,EAAE,QAAAa,GAAQ,KAAAC,GAAK,OAAAC,EAAA,MACZ,gEAAgEF,CAAM,+BAA+BC,CAAG,oCAAoCC,CAAK;AAAA,EAAA,EACvJ,KAAK,EAAE,GACHC,IAAQ,SAAS,cAAc,OAAO;AAC5C,EAAAA,EAAM,KAAKP,GACXO,EAAM,cAAcJ,GACpB,SAAS,KAAK,YAAYI,CAAK,GAC/BN,IAAW;AACf;"}
1
+ {"version":3,"file":"inter-font.js","sources":["../src/inter-font.ts"],"sourcesContent":["// Self-hosted Inter webfont for Malachite.\n//\n// Malachite renders inside a shadow root and injects its Tailwind sheet there, but\n// @font-face rules don't load fonts from inside a shadow root — they have to live in\n// the document. So we bundle the Inter woff2 files (via @fontsource/inter) and inject\n// the @font-face declarations into document.head once, the first time a Malachite\n// context mounts. The --font-sans theme token (see tailwind.css) then resolves to it.\nimport interLatin400 from '@fontsource/inter/files/inter-latin-400-normal.woff2';\nimport interLatin500 from '@fontsource/inter/files/inter-latin-500-normal.woff2';\nimport interLatin600 from '@fontsource/inter/files/inter-latin-600-normal.woff2';\nimport interLatin700 from '@fontsource/inter/files/inter-latin-700-normal.woff2';\nimport interLatinExt400 from '@fontsource/inter/files/inter-latin-ext-400-normal.woff2';\nimport interLatinExt500 from '@fontsource/inter/files/inter-latin-ext-500-normal.woff2';\nimport interLatinExt600 from '@fontsource/inter/files/inter-latin-ext-600-normal.woff2';\nimport interLatinExt700 from '@fontsource/inter/files/inter-latin-ext-700-normal.woff2';\n\nconst LATIN_RANGE =\n '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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD';\nconst LATIN_EXT_RANGE =\n 'U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF';\n\nconst FACES: ReadonlyArray<{ weight: number; src: string; range: string }> = [\n { weight: 400, src: interLatin400, range: LATIN_RANGE },\n { weight: 500, src: interLatin500, range: LATIN_RANGE },\n { weight: 600, src: interLatin600, range: LATIN_RANGE },\n { weight: 700, src: interLatin700, range: LATIN_RANGE },\n { weight: 400, src: interLatinExt400, range: LATIN_EXT_RANGE },\n { weight: 500, src: interLatinExt500, range: LATIN_EXT_RANGE },\n { weight: 600, src: interLatinExt600, range: LATIN_EXT_RANGE },\n { weight: 700, src: interLatinExt700, range: LATIN_EXT_RANGE },\n];\n\nconst STYLE_ID = 'malachite-inter-font-face';\n\nexport const ensureInterFontFace = (): void => {\n if (typeof document === 'undefined' || !document.head || document.getElementById(STYLE_ID)) {\n return;\n }\n const css = FACES.map(\n ({ weight, src, range }) =>\n `@font-face{font-family:'Inter';font-style:normal;font-weight:${weight};font-display:swap;src:url('${src}') format('woff2');unicode-range:${range};}`,\n ).join('');\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = css;\n document.head.appendChild(style);\n};\n"],"names":["LATIN_RANGE","LATIN_EXT_RANGE","FACES","interLatin400","interLatin500","interLatin600","interLatin700","interLatinExt400","interLatinExt500","interLatinExt600","interLatinExt700","STYLE_ID","ensureInterFontFace","css","weight","src","range","style"],"mappings":";;;;;;;;AAgBA,MAAMA,IACF,4JACEC,IACF,sLAEEC,IAAuE;AAAA,EACzE,EAAE,QAAQ,KAAK,KAAKC,GAAe,OAAOH,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKI,GAAe,OAAOJ,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKK,GAAe,OAAOL,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKM,GAAe,OAAON,EAAA;AAAA,EAC1C,EAAE,QAAQ,KAAK,KAAKO,GAAkB,OAAON,EAAA;AAAA,EAC7C,EAAE,QAAQ,KAAK,KAAKO,GAAkB,OAAOP,EAAA;AAAA,EAC7C,EAAE,QAAQ,KAAK,KAAKQ,GAAkB,OAAOR,EAAA;AAAA,EAC7C,EAAE,QAAQ,KAAK,KAAKS,GAAkB,OAAOT,EAAA;AACjD,GAEMU,IAAW,6BAEJC,IAAsB,MAAY;AAC3C,MAAI,OAAO,WAAa,OAAe,CAAC,SAAS,QAAQ,SAAS,eAAeD,CAAQ;AACrF;AAEJ,QAAME,IAAMX,EAAM;AAAA,IACd,CAAC,EAAE,QAAAY,GAAQ,KAAAC,GAAK,OAAAC,EAAA,MACZ,gEAAgEF,CAAM,+BAA+BC,CAAG,oCAAoCC,CAAK;AAAA,EAAA,EACvJ,KAAK,EAAE,GACHC,IAAQ,SAAS,cAAc,OAAO;AAC5C,EAAAA,EAAM,KAAKN,GACXM,EAAM,cAAcJ,GACpB,SAAS,KAAK,YAAYI,CAAK;AACnC;"}
@@ -1,17 +1,11 @@
1
- import a from "./vendor/@fontsource-variable/stack-sans-text/files/stack-sans-text-latin-wght-normal.woff2.js";
2
- const n = "malachite-stack-sans-font-face";
3
- let e = !1;
4
- const c = () => {
5
- if (e || typeof document > "u" || !document.head)
1
+ import n from "./vendor/@fontsource-variable/stack-sans-text/files/stack-sans-text-latin-wght-normal.woff2.js";
2
+ const e = "malachite-stack-sans-font-face", o = () => {
3
+ if (typeof document > "u" || !document.head || document.getElementById(e))
6
4
  return;
7
- if (document.getElementById(n)) {
8
- e = !0;
9
- return;
10
- }
11
5
  const t = document.createElement("style");
12
- t.id = n, t.textContent = `@font-face{font-family:'Stack Sans Text';font-style:normal;font-weight:100 900;font-display:swap;src:url('${a}') format('woff2');}`, document.head.appendChild(t), e = !0;
6
+ t.id = e, t.textContent = `@font-face{font-family:'Stack Sans Text';font-style:normal;font-weight:100 900;font-display:swap;src:url('${n}') format('woff2');}`, document.head.appendChild(t);
13
7
  };
14
8
  export {
15
- c as ensureStackSansFontFace
9
+ o as ensureStackSansFontFace
16
10
  };
17
11
  //# sourceMappingURL=stack-sans-font.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-sans-font.js","sources":["../src/stack-sans-font.ts"],"sourcesContent":["// Stack Sans Text (the --font-heading typeface) from @fontsource, like Inter/Geist. The\n// @font-face is injected into the document, not the shadow root, because shadow roots can't\n// load fonts. One face with a weight range covers the whole variable (wght) axis.\nimport stackSansVariable from '@fontsource-variable/stack-sans-text/files/stack-sans-text-latin-wght-normal.woff2';\n\nconst STYLE_ID = 'malachite-stack-sans-font-face';\n\nlet injected = false;\n\nexport const ensureStackSansFontFace = (): void => {\n if (injected || typeof document === 'undefined' || !document.head) {\n return;\n }\n if (document.getElementById(STYLE_ID)) {\n injected = true;\n return;\n }\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = `@font-face{font-family:'Stack Sans Text';font-style:normal;font-weight:100 900;font-display:swap;src:url('${stackSansVariable}') format('woff2');}`;\n document.head.appendChild(style);\n injected = true;\n};\n"],"names":["STYLE_ID","injected","ensureStackSansFontFace","style","stackSansVariable"],"mappings":";AAKA,MAAMA,IAAW;AAEjB,IAAIC,IAAW;AAER,MAAMC,IAA0B,MAAY;AAC/C,MAAID,KAAY,OAAO,WAAa,OAAe,CAAC,SAAS;AACzD;AAEJ,MAAI,SAAS,eAAeD,CAAQ,GAAG;AACnC,IAAAC,IAAW;AACX;AAAA,EACJ;AACA,QAAME,IAAQ,SAAS,cAAc,OAAO;AAC5C,EAAAA,EAAM,KAAKH,GACXG,EAAM,cAAc,6GAA6GC,CAAiB,wBAClJ,SAAS,KAAK,YAAYD,CAAK,GAC/BF,IAAW;AACf;"}
1
+ {"version":3,"file":"stack-sans-font.js","sources":["../src/stack-sans-font.ts"],"sourcesContent":["// Stack Sans Text (the --font-heading typeface) from @fontsource, like Inter/Geist. The\n// @font-face is injected into the document, not the shadow root, because shadow roots can't\n// load fonts. It is injected the first time a component that uses it renders. One face with a weight range covers the whole variable (wght) axis.\nimport stackSansVariable from '@fontsource-variable/stack-sans-text/files/stack-sans-text-latin-wght-normal.woff2';\n\nconst STYLE_ID = 'malachite-stack-sans-font-face';\n\nexport const ensureStackSansFontFace = (): void => {\n if (typeof document === 'undefined' || !document.head || document.getElementById(STYLE_ID)) {\n return;\n }\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = `@font-face{font-family:'Stack Sans Text';font-style:normal;font-weight:100 900;font-display:swap;src:url('${stackSansVariable}') format('woff2');}`;\n document.head.appendChild(style);\n};\n"],"names":["STYLE_ID","ensureStackSansFontFace","style","stackSansVariable"],"mappings":";AAKA,MAAMA,IAAW,kCAEJC,IAA0B,MAAY;AAC/C,MAAI,OAAO,WAAa,OAAe,CAAC,SAAS,QAAQ,SAAS,eAAeD,CAAQ;AACrF;AAEJ,QAAME,IAAQ,SAAS,cAAc,OAAO;AAC5C,EAAAA,EAAM,KAAKF,GACXE,EAAM,cAAc,6GAA6GC,CAAiB,wBAClJ,SAAS,KAAK,YAAYD,CAAK;AACnC;"}