@abreen/tada 1.16.1 → 1.16.2
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/README.md +15 -0
- package/assets/material-symbols/celebration_24px.svg +1 -1
- package/assets/material-symbols/close_24px.svg +1 -1
- package/assets/material-symbols/contrast_20px.svg +1 -0
- package/assets/material-symbols/contrast_rtl_off_20px.svg +1 -0
- package/assets/material-symbols/info_20px.svg +1 -0
- package/assets/material-symbols/info_40px.svg +1 -0
- package/assets/material-symbols/menu_24px.svg +1 -1
- package/assets/material-symbols/open_in_new_20px.svg +1 -0
- package/assets/material-symbols/search_20px.svg +1 -0
- package/assets/material-symbols/smart_display_24px.svg +1 -0
- package/assets/material-symbols/south_east_20px.svg +1 -0
- package/assets/material-symbols/warning_20px.svg +1 -0
- package/assets/material-symbols/warning_40px.svg +1 -0
- package/build/bundle.ts +23 -4
- package/build/custom-fonts.ts +300 -0
- package/build/generate-fonts.ts +29 -3
- package/build/material-symbols.ts +58 -20
- package/build/pipeline.ts +1 -1
- package/build/types.d.ts +27 -0
- package/build/utils/render.ts +13 -5
- package/build/watch/build-full.ts +1 -1
- package/build/watch/build-incremental.ts +1 -1
- package/build/watch/validation.ts +18 -7
- package/package.json +1 -1
- package/schema/site.schema.json +67 -0
- package/src/_alerts.scss +17 -12
- package/src/_layout.scss +2 -2
- package/src/anchor/index.ts +2 -35
- package/src/anchor/style.scss +4 -28
- package/src/appearance-picker/index.ts +18 -5
- package/src/appearance-picker/style.scss +0 -13
- package/src/header/_base.scss +10 -6
- package/src/material-symbols.scss +16 -3
- package/src/navigate/runtime.ts +13 -0
- package/src/question/style.scss +1 -2
- package/src/search/style.scss +5 -3
- package/src/style.scss +11 -5
- package/src/toc/style.scss +14 -10
- package/templates/_theme.scss +14 -4
- package/templates/_top.html +23 -11
- package/templates/code.html +1 -1
- package/assets/material-symbols/contrast_24px.svg +0 -1
- package/assets/material-symbols/contrast_rtl_off_24px.svg +0 -1
- package/assets/material-symbols/info_24px.svg +0 -1
- package/assets/material-symbols/north_east_24px.svg +0 -1
- package/assets/material-symbols/search_24px.svg +0 -1
- package/assets/material-symbols/south_east_24px.svg +0 -1
- package/assets/material-symbols/tag_24px.svg +0 -1
- package/assets/material-symbols/warning_24px.svg +0 -1
package/templates/_theme.scss
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
@mixin custom-font-faces {
|
|
2
|
+
/* Site-configured font faces are inserted below. */
|
|
3
|
+
/* TADA_CUSTOM_FONT_FACES */
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@mixin custom-font-tuning {
|
|
7
|
+
/* Site-configured font tuning is inserted below. */
|
|
8
|
+
/* TADA_CUSTOM_FONT_TUNING */
|
|
9
|
+
}
|
|
10
|
+
|
|
1
11
|
:root {
|
|
2
12
|
--theme-color: <%= themeColorLight %>;
|
|
3
13
|
--theme-color-text: <%= themeColorTextLight %>;
|
|
@@ -41,14 +51,14 @@
|
|
|
41
51
|
'Helvetica', 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
|
42
52
|
'Segoe UI Symbol';
|
|
43
53
|
--sans-mono-font: 'Google Sans Code', 'Consolas', 'Courier', monospace;
|
|
44
|
-
--serif-font:
|
|
54
|
+
--serif-font: <%= serifFontStack %>;
|
|
45
55
|
--serif-preview-font: 'Times New Roman', 'Times', serif;
|
|
46
|
-
--serif-mono-font:
|
|
56
|
+
--serif-mono-font: <%= serifMonoFontStack %>;
|
|
47
57
|
--sans-font-feature-settings:
|
|
48
58
|
'liga', 'calt', 'ss07', 'ss08', 'cv01', 'cv08', 'cv10';
|
|
49
59
|
--sans-mono-font-feature-settings: normal;
|
|
50
|
-
--serif-font-feature-settings:
|
|
51
|
-
--serif-mono-font-feature-settings:
|
|
60
|
+
--serif-font-feature-settings: <%= serifFontFeatureSettings %>;
|
|
61
|
+
--serif-mono-font-feature-settings: <%= serifMonoFontFeatureSettings %>;
|
|
52
62
|
--font: var(--sans-font);
|
|
53
63
|
--heading-font: var(--font);
|
|
54
64
|
--heading-line-height: 1.3;
|
package/templates/_top.html
CHANGED
|
@@ -54,21 +54,33 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
} catch {}
|
|
57
|
+
let contrastPreference;
|
|
57
58
|
try {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
contrastPreference = window.localStorage.getItem('contrastPreference');
|
|
60
|
+
} catch {}
|
|
61
|
+
const configuredContrast =
|
|
62
|
+
document.documentElement.dataset.defaultContrastPreference;
|
|
63
|
+
if (
|
|
64
|
+
contrastPreference !== 'high' &&
|
|
65
|
+
contrastPreference !== 'standard'
|
|
66
|
+
) {
|
|
67
|
+
contrastPreference = configuredContrast;
|
|
61
68
|
if (
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
configuredContrast !== 'high' &&
|
|
70
|
+
typeof window.matchMedia === 'function'
|
|
64
71
|
) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
72
|
+
try {
|
|
73
|
+
if (window.matchMedia('(prefers-contrast: more)').matches) {
|
|
74
|
+
contrastPreference = 'high';
|
|
75
|
+
}
|
|
76
|
+
} catch {}
|
|
70
77
|
}
|
|
71
|
-
}
|
|
78
|
+
}
|
|
79
|
+
if (contrastPreference === 'high') {
|
|
80
|
+
document.documentElement.dataset.contrastPreference = 'high';
|
|
81
|
+
} else {
|
|
82
|
+
delete document.documentElement.dataset.contrastPreference;
|
|
83
|
+
}
|
|
72
84
|
</script>
|
|
73
85
|
<% if (!isWatchMode) { %>
|
|
74
86
|
<script type="speculationrules">
|
package/templates/code.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="main-content">
|
|
4
4
|
<main class="body" data-pagefind-body>
|
|
5
5
|
<div class="file-header">
|
|
6
|
-
<h1 data-pagefind-weight="10" data-pagefind-meta="title_html[data-title-html]" data-title-html="<%- page.titleHtml %>"><%= page.titleHtml %></h1>
|
|
6
|
+
<h1 class="file-title" data-pagefind-weight="10" data-pagefind-meta="title_html[data-title-html]" data-title-html="<%- page.titleHtml %>"><%= page.titleHtml %></h1>
|
|
7
7
|
<%= render('_download.html') %>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="code-body">
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm40-83q119-15 199.5-104.5T800-480q0-123-80.5-212.5T520-797v634Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M819-28 701-146q-48 32-103.5 49T480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-62 17-117.5T146-701L27-820l57-57L876-85l-57 57ZM480-160q45 0 85.5-12t76.5-33L480-367v207Zm335-100-59-59q21-35 32.5-75.5T800-480q0-133-93.5-226.5T480-800v205L260-815q48-31 103.5-48T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 61-17 116.5T815-260Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m216-160-56-56 464-464H360v-80h400v400h-80v-264L216-160Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M360-200v-80h264L160-744l56-56 464 464v-264h80v400H360Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m240-160 40-160H120l20-80h160l40-160H180l20-80h160l40-160h80l-40 160h160l40-160h80l-40 160h160l-20 80H660l-40 160h160l-20 80H600l-40 160h-80l40-160H360l-40 160h-80Zm140-240h160l40-160H420l-40 160Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z"/></svg>
|