@vectoriox/iox-ui 5.167.0 → 5.169.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/actions-core/index.d.ts +8 -2
- package/commerce-core/index.d.ts +32 -3
- package/design-core/index.d.ts +55 -4
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +10 -4
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs +52 -1
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +87 -8
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +63 -10
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +42 -7
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +34 -9
- package/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/actions-core/popup-arrival.ts +13 -4
- package/src/commerce-core/shop-display.ts +35 -1
- package/src/commerce-core/variants.ts +25 -0
- package/src/design-core/footer-classes.ts +14 -3
- package/src/design-core/header-behaviour.ts +87 -5
- package/src/generation-core/compose-site.ts +3 -0
- package/src/generation-core/contact-facts.ts +61 -0
- package/src/generation-core/footer-mix.ts +7 -3
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/site-build-run.ts +12 -0
- package/src/generation-core/site-spec.generated.ts +1 -6
- package/styles/iox-design.css +45 -8
|
@@ -6,7 +6,7 @@ import { Subject, fromEvent } from 'rxjs';
|
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import * as i1 from '@angular/common';
|
|
8
8
|
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
9
|
-
import { SPEC_AXES, resolveDesignMotion, FILTER_FUNCTIONS, BACKDROP_FUNCTIONS, decomposeCssFunctions, FieldClass, HeaderAttribute, HeaderBehaviour, HeaderInk, OPENING_ATTRIBUTE, schemeOfClasses, schemeUnderBar, BRAND_NAME_ATTRIBUTE, MENU_ATTRIBUTES, menuDialogAttributes, menuButtonAttributes, headerAttributes, HeaderTrait, BRAND_ROLE, brandNameAttributes, REDUCED_ENTRANCE_MAX_MS, roleClass, preloaderWords, PreloaderKind, preloaderGraphemes, PRELOADER_EXIT_EASE, PRELOADER_CAP_MS, isFirstVisit, PRELOADER_ENTER_EASE, PreloaderExit, PRELOADER_MIN_SHOW_MS, preloaderLeaveAt, preloaderExitMotion, preloaderPercent, inkOnGround, writeFieldError } from '@vectoriox/iox-ui/design-core';
|
|
9
|
+
import { SPEC_AXES, resolveDesignMotion, FILTER_FUNCTIONS, BACKDROP_FUNCTIONS, decomposeCssFunctions, FieldClass, HeaderAttribute, HeaderBehaviour, HeaderInk, OPENING_ATTRIBUTE, schemeOfClasses, schemeUnderBar, BRAND_NAME_ATTRIBUTE, BAR_ATTRIBUTE, BAR_NAME_ATTRIBUTE, MENU_ATTRIBUTES, menuDialogAttributes, menuButtonAttributes, headerAttributes, HeaderTrait, BRAND_ROLE, brandNameAttributes, NAV_ROLE, navBarAttributes, REDUCED_ENTRANCE_MAX_MS, roleClass, preloaderWords, PreloaderKind, preloaderGraphemes, PRELOADER_EXIT_EASE, PRELOADER_CAP_MS, isFirstVisit, PRELOADER_ENTER_EASE, PreloaderExit, PRELOADER_MIN_SHOW_MS, preloaderLeaveAt, preloaderExitMotion, preloaderPercent, inkOnGround, writeFieldError } from '@vectoriox/iox-ui/design-core';
|
|
10
10
|
export * from '@vectoriox/iox-ui/design-core';
|
|
11
11
|
import { setPageScroller, pageScroller, SceneAttribute, SCENE_WAKE_EVENT, SCENE_REVEAL_DEFAULT, SceneRevealFrom, revealClipPath, playTextReveal, textRevealByOf, textRevealLookOf, textRevealStaggerOf, ScrollActionKind, lightMotionWanted, scrubTextReveal, ScrollPlay, gentleFrames, SCENE_PHONE_MAX_WIDTH, normalizeParallaxDepth, normalizeParallaxPhone, parallaxShift, parallaxRest, parallaxFrames, PROGRESS_BAR_FRAMES, ParallaxPhone, outermostNodeOf, normalizeScrollRange, scrollPlayFor, ScrollRange } from '@vectoriox/iox-ui/scene-core';
|
|
12
12
|
import Lenis from 'lenis';
|
|
@@ -17,7 +17,7 @@ import { runExitMotion, isExiting, popoverOpenersSelector, OpenerAttribute, canc
|
|
|
17
17
|
export { SCROLL_PROGRESS_TRIGGER } from '@vectoriox/iox-ui/actions-core';
|
|
18
18
|
import { VideoKind, planVideo, videoRootAttributes, videoInnerHtml, videoWords, VideoAttribute, attachVideoAt, VideoClass } from '@vectoriox/iox-ui/media-core';
|
|
19
19
|
import * as i1$1 from '@angular/platform-browser';
|
|
20
|
-
import { formatMoneyValue, CURRENCY_CODES, SHOP_SLOTS } from '@vectoriox/iox-ui/commerce-core';
|
|
20
|
+
import { listPriceField, formatMoneyValue, CURRENCY_CODES, SHOP_SLOTS } from '@vectoriox/iox-ui/commerce-core';
|
|
21
21
|
import { CUSTOMER_SLOT } from '@vectoriox/iox-ui/identity-core';
|
|
22
22
|
|
|
23
23
|
class ViewPositionDirective {
|
|
@@ -9158,7 +9158,7 @@ var A11yAttribute;
|
|
|
9158
9158
|
const MANAGED_A11Y_ATTRIBUTES = [
|
|
9159
9159
|
A11yAttribute.Label, A11yAttribute.Hidden, A11yAttribute.Current, A11yAttribute.Id,
|
|
9160
9160
|
'aria-haspopup', 'aria-expanded', 'aria-controls', DIALOG_CLOSE_ABOVE_ATTRIBUTE,
|
|
9161
|
-
HeaderAttribute.Behaviour, HeaderAttribute.Edge, BRAND_NAME_ATTRIBUTE, SLIDE_CAPTION_ATTRIBUTE,
|
|
9161
|
+
HeaderAttribute.Behaviour, HeaderAttribute.Edge, BRAND_NAME_ATTRIBUTE, BAR_ATTRIBUTE, BAR_NAME_ATTRIBUTE, SLIDE_CAPTION_ATTRIBUTE,
|
|
9162
9162
|
TOOLTIP_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, ...MARQUEE_NODE_ATTRIBUTES, ...MENU_ATTRIBUTES, ...POPUP_ATTRIBUTES,
|
|
9163
9163
|
];
|
|
9164
9164
|
/** The type of a menu button and of the menu's Close (header-ingredients HI2a: its kind — lines · word · dots). */
|
|
@@ -9233,8 +9233,27 @@ function nodeA11yAttributes(node, ctx = {}) {
|
|
|
9233
9233
|
// vectoriox/iox-ui#98: a header's long name steps down the look's type scale on a phone (the shared CSS reads it).
|
|
9234
9234
|
if (node.role === BRAND_ROLE)
|
|
9235
9235
|
Object.assign(out, brandNameAttributes(brandWords(node)));
|
|
9236
|
+
// vectoriox/iox-ui#143: a phone bar crowded by the menu, the bag and the account packs its controls and steps the name
|
|
9237
|
+
// by the room it is left (the name's own step cannot see its neighbours).
|
|
9238
|
+
if (node.role === NAV_ROLE) {
|
|
9239
|
+
const brand = findBrand(node);
|
|
9240
|
+
Object.assign(out, navBarAttributes(node, brand ? brandWords(brand) : ''));
|
|
9241
|
+
}
|
|
9236
9242
|
return out;
|
|
9237
9243
|
}
|
|
9244
|
+
/** The navigation's brand (its first part carrying `nav.brand`), outside the drawer. */
|
|
9245
|
+
function findBrand(node) {
|
|
9246
|
+
for (const child of (node.children ?? [])) {
|
|
9247
|
+
if (!child || child.type === DIALOG_NODE_TYPE)
|
|
9248
|
+
continue;
|
|
9249
|
+
if (child.role === BRAND_ROLE)
|
|
9250
|
+
return child;
|
|
9251
|
+
const deeper = findBrand(child);
|
|
9252
|
+
if (deeper)
|
|
9253
|
+
return deeper;
|
|
9254
|
+
}
|
|
9255
|
+
return null;
|
|
9256
|
+
}
|
|
9238
9257
|
/** A brand's name: the words of its first Heading or Text (a logo-only brand has none). */
|
|
9239
9258
|
function brandWords(node) {
|
|
9240
9259
|
for (const child of (node.children ?? [])) {
|
|
@@ -11019,7 +11038,10 @@ const PIPE_REGISTRY = {
|
|
|
11019
11038
|
},
|
|
11020
11039
|
// Commerce E1c (shop-aware A-D2, C-D7): a price in the page's language — a Money as it is, a bare number as MAJOR
|
|
11021
11040
|
// units of the binding's currency, else the studio's. commerce-core `formatMoneyValue` is the one formatter.
|
|
11022
|
-
|
|
11041
|
+
// vectoriox/iox-ui#142: a list row's product with options reads its variants' lowest price ("From ₪89.00") — its own
|
|
11042
|
+
// `pricing.price` is empty — through commerce-core `listPriceField`; anything else formats as it always did.
|
|
11043
|
+
money: (v, args, ctx) => listPriceField(ctx.source, ctx.path, ctx.locale, args[0] || ctx.currency)
|
|
11044
|
+
?? formatMoneyValue(v, args[0] || ctx.currency, ctx.locale),
|
|
11023
11045
|
// AW11-D10 (award lists): a colour block's ground and the ink on it, item by item when the page is drawn — design-core
|
|
11024
11046
|
// `inkOnGround` (AA; the ground moved in lightness only when no ink reads). Not a filter an author picks (no
|
|
11025
11047
|
// descriptor): the list composer writes them on `style:` bindings. A value that is no hex colour passes through.
|
|
@@ -11146,7 +11168,10 @@ function resolvePath(obj, path) {
|
|
|
11146
11168
|
*/
|
|
11147
11169
|
function resolveBoundValue(sourceData, binding, ctx = {}) {
|
|
11148
11170
|
const raw = binding.path ? resolvePath(sourceData, binding.path) : sourceData;
|
|
11149
|
-
|
|
11171
|
+
if (!binding.pipes?.length)
|
|
11172
|
+
return raw;
|
|
11173
|
+
// The pipes see what the value was read from (a list row's product — vectoriox/iox-ui#142's `money`).
|
|
11174
|
+
return applyBindingPipes(raw, binding.pipes, { ...ctx, source: sourceData, path: binding.path });
|
|
11150
11175
|
}
|
|
11151
11176
|
|
|
11152
11177
|
/**
|
|
@@ -13666,6 +13691,9 @@ class PopupRuntime {
|
|
|
13666
13691
|
on(this.win, 'keydown', e => { if (SCROLL_KEYS.has(e.key))
|
|
13667
13692
|
input(); this.onKey(e); });
|
|
13668
13693
|
on(this.win, 'scroll', () => this.onScroll(), { passive: true });
|
|
13694
|
+
// PU2b leaving: the mouse goes out through the TOP of the window (towards the tabs or the address bar) — only a
|
|
13695
|
+
// laptop's plan ever reads it (planPopupArrival), so a touch's synthetic mouse events change nothing.
|
|
13696
|
+
on(this.doc, 'mouseout', e => this.onMouseOut(e));
|
|
13669
13697
|
if (this.pending.length)
|
|
13670
13698
|
this.timer = setInterval(() => this.tick(TICK_MS), TICK_MS);
|
|
13671
13699
|
}
|
|
@@ -13676,6 +13704,13 @@ class PopupRuntime {
|
|
|
13676
13704
|
c.scrolledPx = Math.max(c.scrolledPx, Math.abs(this.scrollY() - c.baselineY));
|
|
13677
13705
|
this.tick();
|
|
13678
13706
|
}
|
|
13707
|
+
onMouseOut(e) {
|
|
13708
|
+
const c = this.clock;
|
|
13709
|
+
if (!c || e.relatedTarget || e.clientY > 0 || this.doc.visibilityState === 'hidden')
|
|
13710
|
+
return;
|
|
13711
|
+
c.leftTopAtSeconds = c.visibleMs / 1000;
|
|
13712
|
+
this.tick();
|
|
13713
|
+
}
|
|
13679
13714
|
onKey(e) {
|
|
13680
13715
|
if (e.key !== 'Escape')
|
|
13681
13716
|
return;
|
|
@@ -13710,7 +13745,7 @@ class PopupRuntime {
|
|
|
13710
13745
|
}
|
|
13711
13746
|
if (this.clock?.id !== id) {
|
|
13712
13747
|
// The turn starts NOW: time counts from here, a scroll must come after it.
|
|
13713
|
-
this.clock = { id, baselineY: this.scrollY(), scrolledPx: 0, visibleMs: 0, userInput: false };
|
|
13748
|
+
this.clock = { id, baselineY: this.scrollY(), scrolledPx: 0, visibleMs: 0, userInput: false, leftTopAtSeconds: null };
|
|
13714
13749
|
elapsedMs = 0;
|
|
13715
13750
|
}
|
|
13716
13751
|
if (this.doc.visibilityState !== 'hidden')
|
|
@@ -13719,7 +13754,7 @@ class PopupRuntime {
|
|
|
13719
13754
|
const fired = arrivalFired(p.plan, {
|
|
13720
13755
|
scrolledPx: this.clock.scrolledPx, scrollY: this.scrollY(),
|
|
13721
13756
|
viewportHeight: this.win?.innerHeight ?? 0, pageHeight: this.doc.documentElement.scrollHeight,
|
|
13722
|
-
visibleSeconds: this.clock.visibleMs / 1000,
|
|
13757
|
+
visibleSeconds: this.clock.visibleMs / 1000, leftTopAtSeconds: this.clock.leftTopAtSeconds,
|
|
13723
13758
|
});
|
|
13724
13759
|
if (fired)
|
|
13725
13760
|
this.arrive(p);
|