dynim-react 1.0.69 → 1.0.71

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.
@@ -415,18 +415,18 @@ export function DynimProvider({ children, config = {}, }) {
415
415
  const saveCode = useCallback(async () => {
416
416
  await codeClientRef.current?.saveCode();
417
417
  await loadSavedBundle();
418
- // Force reload CSS with cache bust since saved CSS has changed
418
+ // Invalidate browser cache and reload fresh CSS
419
419
  const cssUrl = buildCSSUrl(false);
420
420
  if (cssUrl)
421
- getCSSLoader().loadWithCacheBust(cssUrl);
421
+ await getCSSLoader().invalidateAndReload(cssUrl);
422
422
  }, [loadSavedBundle, getCSSLoader, buildCSSUrl]);
423
423
  const abandonCode = useCallback(async () => {
424
424
  await codeClientRef.current?.abandonCode();
425
425
  await loadSavedBundle();
426
- // Reload saved CSS (may have been showing temp CSS)
426
+ // Invalidate browser cache and reload saved CSS
427
427
  const cssUrl = buildCSSUrl(false);
428
428
  if (cssUrl)
429
- getCSSLoader().loadWithCacheBust(cssUrl);
429
+ await getCSSLoader().invalidateAndReload(cssUrl);
430
430
  }, [loadSavedBundle, getCSSLoader, buildCSSUrl]);
431
431
  const getCheckpoints = useCallback(async () => {
432
432
  return codeClientRef.current?.getCheckpoints() ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynim-react",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "dev": "tsc --watch"
28
28
  },
29
29
  "dependencies": {
30
- "dynim-core": "^1.0.43"
30
+ "dynim-core": "^1.0.45"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=17.0.0",