@r2digisolutions/components 0.21.20 → 0.21.22

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.
@@ -78,6 +78,15 @@
78
78
  children
79
79
  }: AppShellProps = $props();
80
80
 
81
+ // Context must be set during component init — never inside $derived (async SSR
82
+ // re-entry / first read would call setContext outside init → 500).
83
+ const sharedChrome = getSharedAppChrome();
84
+ try {
85
+ getAppChrome();
86
+ } catch {
87
+ setAppChrome(sharedChrome);
88
+ }
89
+
81
90
  // Resolve via singleton inside deriveds so HMR / duplicate graphs stay aligned.
82
91
  const propContextual = $derived.by((): AppShellContextual | null => {
83
92
  if (contextualGroups.length === 0) return null;
@@ -91,14 +100,8 @@
91
100
  });
92
101
 
93
102
  const resolvedContextual = $derived.by(() => {
94
- const chrome = getSharedAppChrome();
95
- try {
96
- getAppChrome();
97
- } catch {
98
- setAppChrome(chrome);
99
- }
100
103
  void getAppChromeEpoch();
101
- return chrome.source?.() ?? propContextual;
104
+ return getSharedAppChrome().source?.() ?? propContextual;
102
105
  });
103
106
  const contextualKey = $derived(
104
107
  resolvedContextual
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.21.20",
3
+ "version": "0.21.22",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",
@@ -80,7 +80,7 @@
80
80
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
81
81
  "@tailwindcss/vite": "^4.3.3",
82
82
  "@types/node": "^26.5.1",
83
- "@vitest/browser-playwright": "^5.0.0",
83
+ "@vitest/browser-playwright": "^5.0.1",
84
84
  "bumpp": "~12.3.0",
85
85
  "eslint": "^10.10.0",
86
86
  "eslint-config-prettier": "^10.1.8",
@@ -88,7 +88,7 @@
88
88
  "globals": "^17.12.0",
89
89
  "mdsvex": "^0.12.8",
90
90
  "playwright": "^1.63.0",
91
- "prettier": "^3.9.6",
91
+ "prettier": "^3.9.7",
92
92
  "prettier-plugin-svelte": "^4.1.1",
93
93
  "prettier-plugin-tailwindcss": "^0.8.1",
94
94
  "publint": "^0.3.24",
@@ -99,7 +99,7 @@
99
99
  "typescript": "6.0.3",
100
100
  "typescript-eslint": "^8.70.0",
101
101
  "vite": "^8.3.0",
102
- "vitest": "^5.0.0",
102
+ "vitest": "^5.0.1",
103
103
  "vitest-browser-svelte": "^3.1.0"
104
104
  },
105
105
  "keywords": [