@vectoriox/iox-ui 5.196.0 → 5.197.0
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/composite-core/index.d.ts +3 -0
- package/data-core/index.d.ts +101 -2
- package/design-core/index.d.ts +24 -3
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +15 -8
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-data-core.mjs +192 -2
- package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +41 -3
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +445 -135
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +3 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +30 -0
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +170 -18
- package/harness-core/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/composite-core/slider-runtime.ts +16 -8
- package/src/data-core/placeholder-rows.ts +220 -0
- package/src/data-core/public-api.ts +2 -1
- package/src/design-core/header-behaviour.ts +10 -2
- package/src/design-core/node-links.ts +34 -0
- package/src/generation-core/audit-site.ts +10 -1
- package/src/generation-core/audit-words.ts +5 -0
- package/src/generation-core/check-free.ts +21 -3
- package/src/generation-core/compose-site.ts +32 -9
- package/src/generation-core/free-opening.ts +57 -0
- package/src/generation-core/header-mix.ts +84 -4
- package/src/generation-core/item-fill.ts +42 -0
- package/src/generation-core/nav-shape.ts +45 -16
- package/src/generation-core/node-baselines.generated.ts +1 -0
- package/src/generation-core/opening-mix.ts +10 -0
- package/src/generation-core/public-api.ts +2 -0
- package/src/generation-core/site-build-run.ts +4 -0
- package/src/generation-core/stock-search.ts +106 -18
- package/src/generation-core/type-led.ts +19 -4
- package/src/harness-core/run-compose-context.ts +3 -1
- package/styles/iox-design.css +5 -4
|
@@ -1138,6 +1138,36 @@ function headingHref(props, pageHref = route => route) {
|
|
|
1138
1138
|
return String(props.url ?? '').trim() || null;
|
|
1139
1139
|
return null;
|
|
1140
1140
|
}
|
|
1141
|
+
/** The prop a node's route params are stored under — `routeParam:<name>`, a static value or a binding (both land there). */
|
|
1142
|
+
const ROUTE_PARAM_PREFIX = 'routeParam:';
|
|
1143
|
+
/** A node's route params by name, from its `routeParam:<name>` props (`{ 'routeParam:slug': 'soap' }` → `{ slug: 'soap' }`). */
|
|
1144
|
+
function routeParamValues(props) {
|
|
1145
|
+
const out = {};
|
|
1146
|
+
for (const [key, value] of Object.entries(props ?? {})) {
|
|
1147
|
+
if (key.startsWith(ROUTE_PARAM_PREFIX))
|
|
1148
|
+
out[key.slice(ROUTE_PARAM_PREFIX.length)] = value;
|
|
1149
|
+
}
|
|
1150
|
+
return out;
|
|
1151
|
+
}
|
|
1152
|
+
const ROUTE_PARAM = /:([a-zA-Z_][a-zA-Z0-9_]*)/g;
|
|
1153
|
+
/**
|
|
1154
|
+
* A page route with its `:params` filled: each from `values` (URL-encoded), an unfilled one leaving no gap
|
|
1155
|
+
* (`/shop/:slug/reviews` with no slug → `/shop/reviews`). The engine's `resolvePageHref` substitution, shared so the builder's
|
|
1156
|
+
* Preview links where the live site does — a product card read `/shop/:slug` there (vectoriox/iox-ui#176). The route's
|
|
1157
|
+
* leading slash is kept; the engine makes it base-relative itself.
|
|
1158
|
+
*/
|
|
1159
|
+
function fillRouteParams(route, values) {
|
|
1160
|
+
return String(route ?? '')
|
|
1161
|
+
.replace(ROUTE_PARAM, (_m, name) => {
|
|
1162
|
+
const value = values[name];
|
|
1163
|
+
return value === undefined || value === null || value === '' ? '' : encodeURIComponent(String(value));
|
|
1164
|
+
})
|
|
1165
|
+
.replace(/\/{2,}/g, '/');
|
|
1166
|
+
}
|
|
1167
|
+
/** Does the route still name a `:param` (one nothing filled)? */
|
|
1168
|
+
function routeHasParams(route) {
|
|
1169
|
+
return new RegExp(ROUTE_PARAM.source).test(String(route ?? ''));
|
|
1170
|
+
}
|
|
1141
1171
|
|
|
1142
1172
|
/**
|
|
1143
1173
|
* Directive-host Heading: the real `<h1>`…`<h6>` IS the host — no `app-builder-heading`
|