@panomc/theme-core 1.0.0-dev.52 → 1.0.0-dev.53

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panomc/theme-core",
3
- "version": "1.0.0-dev.52",
3
+ "version": "1.0.0-dev.53",
4
4
  "description": "The Pano theme engine: hooks factories, plugin engine, headless page controllers, default views and the theme CLI. Themes depend on this package instead of forking vanilla-theme.",
5
5
  "author": "PanoMC",
6
6
  "license": "MIT",
@@ -1,5 +1,10 @@
1
- import { default as Default } from "@panomc/sdk/core/js/api.util";
2
-
1
+ // `export { default } from` (not `import` + `export default Default`) because this
2
+ // shim sits inside an import cycle: kit/hooks-server.js → lib/services/auth.js → here
3
+ // → @panomc/sdk/core/js/api.util → $lib/Store.js → (a consumer's own api.util shim).
4
+ // `export default <identifier>` is an expression evaluated once while this module's
5
+ // body runs, not a live binding, so under a different entry order it would snapshot an
6
+ // uninitialized binding and publish `undefined` forever. A re-export is an indirect
7
+ // binding resolved at link time and read on access, so it survives the cycle. This is
8
+ // also the form bin/sync.js generates into themes.
3
9
  export * from "@panomc/sdk/core/js/api.util";
4
-
5
- export default Default;
10
+ export { default } from "@panomc/sdk/core/js/api.util";
package/src/lib/csrf.js CHANGED
@@ -1,5 +1,5 @@
1
- import { default as Default } from "@panomc/sdk/core/js/csrf.js";
2
-
1
+ // Re-export rather than `import` + `export default Default` — see api.util.js: the
2
+ // snapshot form publishes `undefined` if the SDK module is still in-flight because of
3
+ // an import cycle.
3
4
  export * from "@panomc/sdk/core/js/csrf.js";
4
-
5
- export default Default;
5
+ export { default } from "@panomc/sdk/core/js/csrf.js";
@@ -1,5 +1,5 @@
1
- import { default as Default } from "@panomc/sdk/core/js/tooltip.util";
2
-
1
+ // Re-export rather than `import` + `export default Default` — see api.util.js: the
2
+ // snapshot form publishes `undefined` if the SDK module is still in-flight because of
3
+ // an import cycle.
3
4
  export * from "@panomc/sdk/core/js/tooltip.util";
4
-
5
- export default Default;
5
+ export { default } from "@panomc/sdk/core/js/tooltip.util";