@timmo001/groundwork-tokens 0.9.38 → 0.9.39
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/package.json +1 -1
- package/src/page.ts +23 -15
package/package.json
CHANGED
package/src/page.ts
CHANGED
|
@@ -101,11 +101,11 @@ export const coreThemeChoices: readonly ThemeChoice[] = [
|
|
|
101
101
|
].map(({ id, name }) => ({ id, name }));
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* The optional themes
|
|
105
|
-
*
|
|
106
|
-
*
|
|
104
|
+
* The optional themes' documents, by family and then from light to dark.
|
|
105
|
+
* They're bundled with the module, so an app compiled to one binary has them
|
|
106
|
+
* without reading `node_modules`. Decode one with the `MappedTheme` Schema.
|
|
107
107
|
*/
|
|
108
|
-
export const
|
|
108
|
+
export const optionalThemeDocuments = [
|
|
109
109
|
catppuccinLatte,
|
|
110
110
|
catppuccinFrappe,
|
|
111
111
|
catppuccinMacchiato,
|
|
@@ -117,17 +117,25 @@ export const optionalThemeChoices: readonly ThemeChoice[] = [
|
|
|
117
117
|
github,
|
|
118
118
|
githubDimmed,
|
|
119
119
|
githubHighContrast,
|
|
120
|
-
]
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
120
|
+
] as const;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The optional themes, mapped from other palettes, by family and then from
|
|
124
|
+
* light to dark. One with a single mode is offered for that scheme alone;
|
|
125
|
+
* one with both, such as GitHub's, for either.
|
|
126
|
+
*/
|
|
127
|
+
export const optionalThemeChoices: readonly ThemeChoice[] =
|
|
128
|
+
optionalThemeDocuments.map((theme) => ({
|
|
129
|
+
id: theme.id,
|
|
130
|
+
name: theme.name,
|
|
131
|
+
family: theme.family,
|
|
132
|
+
mode:
|
|
133
|
+
"otherPalette" in theme
|
|
134
|
+
? undefined
|
|
135
|
+
: theme.mode === "light"
|
|
136
|
+
? "light"
|
|
137
|
+
: "dark",
|
|
138
|
+
}));
|
|
131
139
|
|
|
132
140
|
export interface PageThemeOptions {
|
|
133
141
|
/** The local storage key prefix, such as `my-site:theme`. */
|