@uniweb/core 0.24.1 → 0.24.2

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": "@uniweb/core",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
5
5
  "type": "module",
6
6
  "exports": {
@@ -43,8 +43,8 @@
43
43
  "vitest": "^4.1.7"
44
44
  },
45
45
  "dependencies": {
46
- "@uniweb/theming": "^0.1.15",
47
- "@uniweb/semantic-parser": "^1.4.0"
46
+ "@uniweb/semantic-parser": "^1.4.0",
47
+ "@uniweb/theming": "^0.1.15"
48
48
  },
49
49
  "scripts": {
50
50
  "test": "vitest run"
package/src/base-path.js CHANGED
@@ -14,6 +14,28 @@
14
14
  * diverged), it moved down to the layer both sides already depend on. Kit
15
15
  * re-exports it, so no existing call site moved.
16
16
  *
17
+ * ## ⛔ WHO MAY IMPORT THIS SUBPATH — the leaf is not for everyone
18
+ *
19
+ * ⭐ **The leaf exists for consumers that must NOT pull core's index**: the
20
+ * runtime (`wire-foundation.js`, `script-loader.js`), which resolves a service
21
+ * address and cannot reach kit at all, and anything keeping its import graph
22
+ * small on purpose — `@uniweb/projections` imports leaves to stay Worker-safe.
23
+ *
24
+ * ⛔ **A package that a foundation BUNDLES must import the bare `@uniweb/core`
25
+ * instead — kit and api.** A foundation build externalizes `@uniweb/core`, and
26
+ * Rollup's `external` list is matched by **string equality**: the bare specifier
27
+ * is dropped from the bundle and `@uniweb/core/services` is not. So a leaf import
28
+ * from kit compiles a second copy of this file into every foundation that uses
29
+ * it, beside the real core the runtime loads — the same class of trap that put
30
+ * `react-dom/server` on that list separately.
31
+ *
32
+ * ⚠️ **Measured 2026-09-07 and now guarded:** `services.js` (9,898 B) and this file (2,316 B) were inside a built foundation with `@uniweb/core`
33
+ * externalized the whole time, because kit re-exported from the subpath. Both are
34
+ * pure functions, so the symptom was weight — `@uniweb/core/datastore` is not.
35
+ *
36
+ * ⇒ **Foundations import from `@uniweb/kit`; kit imports the bare `@uniweb/core`.**
37
+ * Anything kit needs belongs on core's index, not only behind a subpath.
38
+ *
17
39
  * Kept separate from `resolveRoute` deliberately: React Router supplies the
18
40
  * base itself through its `basename`, so a Router-rendered link must not have
19
41
  * it applied twice.
package/src/services.js CHANGED
@@ -45,7 +45,28 @@ import { applyBasePath } from './base-path.js'
45
45
  * with the same job, which is the defect `@uniweb/core/route-match` exists to
46
46
  * prevent.
47
47
  *
48
- * ⇒ **Foundations import from `@uniweb/kit`.** This path is the framework's own.
48
+ * ## ⛔ WHO MAY IMPORT THIS SUBPATH — the leaf is not for everyone
49
+ *
50
+ * ⭐ **The leaf exists for consumers that must NOT pull core's index**: the
51
+ * runtime (`wire-foundation.js`, `script-loader.js`), which resolves a service
52
+ * address and cannot reach kit at all, and anything keeping its import graph
53
+ * small on purpose — `@uniweb/projections` imports leaves to stay Worker-safe.
54
+ *
55
+ * ⛔ **A package that a foundation BUNDLES must import the bare `@uniweb/core`
56
+ * instead — kit and api.** A foundation build externalizes `@uniweb/core`, and
57
+ * Rollup's `external` list is matched by **string equality**: the bare specifier
58
+ * is dropped from the bundle and `@uniweb/core/services` is not. So a leaf import
59
+ * from kit compiles a second copy of this file into every foundation that uses
60
+ * it, beside the real core the runtime loads — the same class of trap that put
61
+ * `react-dom/server` on that list separately.
62
+ *
63
+ * ⚠️ **Measured 2026-09-07 and now guarded:** this file (9,898 B) and
64
+ * `base-path.js` (2,316 B) were inside a built foundation with `@uniweb/core`
65
+ * externalized the whole time, because kit re-exported from the subpath. Both are
66
+ * pure functions, so the symptom was weight — `@uniweb/core/datastore` is not.
67
+ *
68
+ * ⇒ **Foundations import from `@uniweb/kit`; kit imports the bare `@uniweb/core`.**
69
+ * Anything kit needs belongs on core's index, not only behind a subpath.
49
70
  *
50
71
  * ## What this deliberately does not model
51
72
  *