@molecule/app-theme 1.0.1 → 1.0.3

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 CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-08-04T01:52:55.409Z
6
+ Generated: 2026-09-13T23:39:57.945Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-theme
@@ -182,6 +182,16 @@ interface ThemeProvider {
182
182
  * support multiple themes.
183
183
  */
184
184
  getThemes?(): Theme[]
185
+
186
+ /**
187
+ * Returns the theme a render WITHOUT a browser produces — a server or
188
+ * build-time render, which has no storage and no `prefers-color-scheme`
189
+ * to read. A hydrating client renders this theme first, so its markup
190
+ * matches what the server sent, and switches to `getTheme()` right
191
+ * after. Optional — a provider whose theme cannot differ between the two
192
+ * need not implement it.
193
+ */
194
+ getServerTheme?(): Theme
185
195
  }
186
196
  ```
187
197
 
@@ -41,6 +41,15 @@ export interface ThemeProvider {
41
41
  * support multiple themes.
42
42
  */
43
43
  getThemes?(): Theme[];
44
+ /**
45
+ * Returns the theme a render WITHOUT a browser produces — a server or
46
+ * build-time render, which has no storage and no `prefers-color-scheme`
47
+ * to read. A hydrating client renders this theme first, so its markup
48
+ * matches what the server sent, and switches to `getTheme()` right
49
+ * after. Optional — a provider whose theme cannot differ between the two
50
+ * need not implement it.
51
+ */
52
+ getServerTheme?(): Theme;
44
53
  }
45
54
  /**
46
55
  * Registers a theme provider as the active singleton.
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAA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;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,aAAa,GAAG,IAAiD,CAAA;AAEhG;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,OAA8B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AA0CnE,MAAM,SAAS,GAAG,OAAO,CAAA;AAEzB;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAuB,EAAQ,EAAE;IAC3D,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;AAC3B,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAyB,EAAE,CAAC,OAAO,CAAgB,SAAS,CAAC,IAAI,IAAI,CAAA;AAEhG;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAY,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA"}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAoDnE,MAAM,SAAS,GAAG,OAAO,CAAA;AAEzB;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAuB,EAAQ,EAAE;IAC3D,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;AAC3B,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAyB,EAAE,CAAC,OAAO,CAAgB,SAAS,CAAC,IAAI,IAAI,CAAA;AAEhG;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAY,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-theme",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Theme interface and utilities for molecule.dev",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,17 +31,17 @@
31
31
  "@molecule/app-bond": "^1.0.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@molecule/app-bond": "1.0.1",
34
+ "@molecule/app-bond": "1.0.2",
35
35
  "@types/node": "26.1.2",
36
36
  "typescript": "6.0.3",
37
- "vitest": "4.1.10"
37
+ "vitest": "4.1.11"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",
41
41
  "url": "https://github.com/molecule-dev/molecule.git",
42
42
  "directory": "packages/app/core/theme"
43
43
  },
44
- "homepage": "https://github.com/molecule-dev/molecule/tree/main/packages/app/core/theme",
44
+ "homepage": "https://www.molecule.dev/packages/app-theme",
45
45
  "bugs": "https://github.com/molecule-dev/molecule/issues",
46
46
  "publishConfig": {
47
47
  "access": "public"