@uniweb/core 0.29.0 → 0.29.1
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 +3 -3
- package/src/data-paths.js +7 -7
- package/src/detail-url.js +1 -1
- package/src/website.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/core",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"vitest": "^4.1.7"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@uniweb/
|
|
50
|
-
"@uniweb/
|
|
49
|
+
"@uniweb/semantic-parser": "^1.4.0",
|
|
50
|
+
"@uniweb/theming": "^0.1.15"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"test": "vitest run"
|
package/src/data-paths.js
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* (`data-fetcher.js`), core injected the per-record default
|
|
14
14
|
* (`fetch-config.js applyDeferredDetail`), core gated locale-prefixing on it
|
|
15
15
|
* (`fetch-config.js localizeConfig`), the dev server matched it with a regex
|
|
16
|
-
* (`build/src/site/plugin.js`), and kit's `useEntityDetail`
|
|
16
|
+
* (`build/src/site/plugin.js`), and kit's `useEntityDetail` — `useWholeRecord`
|
|
17
|
+
* since 2026-09-14 — requested it.
|
|
17
18
|
*
|
|
18
19
|
* They drifted. `useEntityDetail` was edited to `/_data/` on its own and
|
|
19
20
|
* nothing else followed, so a public documented hook requested a URL that
|
|
@@ -73,12 +74,11 @@ export function queryDataUrl(name) {
|
|
|
73
74
|
* URL of one record's full payload — every field, including deferred ones.
|
|
74
75
|
* Emitted per record only when the query declares `deferred:`.
|
|
75
76
|
*
|
|
76
|
-
* Takes either a concrete slug
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* replaced.
|
|
77
|
+
* Takes either a concrete slug — a caller holding the record — or the literal
|
|
78
|
+
* placeholder `{slug}` (core's `applyDeferredDetail`, which builds a pattern
|
|
79
|
+
* that `substitutePlaceholders` resolves later against the dynamic-route
|
|
80
|
+
* param). Both are plain interpolation; this function does not encode,
|
|
81
|
+
* matching the behavior of the call sites it replaced.
|
|
82
82
|
*
|
|
83
83
|
* @param {string} query - The query name.
|
|
84
84
|
* @param {string} slug - A record slug, or a `{param}` placeholder.
|
package/src/detail-url.js
CHANGED
|
@@ -45,7 +45,7 @@ function paramContext(paramName, paramValue, record) {
|
|
|
45
45
|
// detail URL was `/data/articles/{slug}.json`, a guaranteed 404, on every
|
|
46
46
|
// template page with `deferred:` fields (measured 2026-09-04). When the caller
|
|
47
47
|
// holds the record — the entity store does (it matched it), and so does
|
|
48
|
-
// `
|
|
48
|
+
// kit's `useWholeRecord` — its slug fills the name the FILE was written under. A
|
|
49
49
|
// caller with no record in hand leaves `{slug}` literal rather than guessing
|
|
50
50
|
// the capture is one: a visibly unresolved address beats a plausible wrong one.
|
|
51
51
|
const handle = recordHandle(record)
|
package/src/website.js
CHANGED
|
@@ -908,7 +908,7 @@ export default class Website {
|
|
|
908
908
|
*
|
|
909
909
|
* This is what fills a delivered record's `$route` (`EntityStore`) when its fetch picks
|
|
910
910
|
* no `detailPage`, and how a caller outside a parametric page learns which record field
|
|
911
|
-
* the page's URL is built on: `kit`'s `
|
|
911
|
+
* the page's URL is built on: `kit`'s `useWholeRecord` asks it so a hover card and the
|
|
912
912
|
* page it links to address the record by the SAME field.
|
|
913
913
|
*
|
|
914
914
|
* ⛔ Replaces `detailTemplateFor(name)` (2026-09-14), which matched a binding key OR a
|