@vectoriox/iox-ui 5.163.0 → 5.164.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 +10 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +9 -0
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +400 -22
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +3 -0
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +6 -3
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +41 -7
- package/index.d.ts +4 -1
- package/package.json +1 -1
- package/scene-core/index.d.ts +1 -1
- package/src/composite-core/composite-kinds.ts +9 -0
- package/src/generation-core/check-layout.ts +34 -4
- package/src/generation-core/compose-layout.ts +211 -10
- package/src/generation-core/compose-site.ts +2 -0
- package/src/generation-core/layout-drawers.ts +106 -0
- package/src/generation-core/layout-fingerprint.ts +3 -0
- package/src/generation-core/layout-language.ts +4 -0
- package/src/generation-core/layout-space.ts +3 -2
- package/src/generation-core/layout-wire.ts +15 -3
- package/src/generation-core/patterns.ts +4 -0
- package/src/generation-core/site-spec.generated.ts +57 -5
- package/src/scene-core/scene.ts +3 -0
- package/styles/iox-design.css +20 -0
|
@@ -468,6 +468,10 @@ declare const SPEC_SITE_PATTERNS: {
|
|
|
468
468
|
readonly prop: "clip";
|
|
469
469
|
readonly from: "bottom";
|
|
470
470
|
readonly keys: readonly [readonly [0, 38], readonly [0.42, 100]];
|
|
471
|
+
}, {
|
|
472
|
+
readonly prop: "y";
|
|
473
|
+
readonly range: "exit";
|
|
474
|
+
readonly keys: readonly [readonly [0, 0], readonly [1, 30]];
|
|
471
475
|
}];
|
|
472
476
|
}, {
|
|
473
477
|
readonly t: "Container";
|
|
@@ -5642,7 +5646,7 @@ declare const SPEC_SITE_LAYOUT: {
|
|
|
5642
5646
|
readonly bleeds: readonly ["none", "start", "end", "both"];
|
|
5643
5647
|
readonly trackProps: readonly ["x", "y", "scale", "opacity", "rotate", "clip", "blur"];
|
|
5644
5648
|
readonly photoShapes: readonly ["wide", "landscape", "square", "portrait", "tall"];
|
|
5645
|
-
readonly sectionKinds: readonly ["content", "inhale", "signature"];
|
|
5649
|
+
readonly sectionKinds: readonly ["content", "inhale", "signature", "drawers"];
|
|
5646
5650
|
readonly buttonVariants: readonly ["primary", "secondary", "ghost"];
|
|
5647
5651
|
readonly galleryEffects: readonly ["slide", "fade", "cube", "flip", "coverflow", "cards", "creative"];
|
|
5648
5652
|
readonly formPresets: readonly ["lead", "contact", "booking", "newsletter"];
|
|
@@ -5724,6 +5728,7 @@ declare const SPEC_SITE_LAYOUT: {
|
|
|
5724
5728
|
readonly bandColumns: 10;
|
|
5725
5729
|
readonly composedPages: 2;
|
|
5726
5730
|
readonly repairs: 1;
|
|
5731
|
+
readonly drawerSteps: readonly [3, 5];
|
|
5727
5732
|
};
|
|
5728
5733
|
readonly sameness: {
|
|
5729
5734
|
readonly sequence: 0.8;
|
|
@@ -5738,7 +5743,7 @@ declare const SPEC_SITE_LAYOUT: {
|
|
|
5738
5743
|
}, {
|
|
5739
5744
|
readonly id: "photo-unveiled";
|
|
5740
5745
|
readonly label: "a photo unveiled";
|
|
5741
|
-
readonly how: "a clip track opening a photo from a
|
|
5746
|
+
readonly how: "a clip track opening a photo to the full screen — drawn from a framed 60% with the ground around it, sinking as the next band rises (AW9)";
|
|
5742
5747
|
readonly tier: "all";
|
|
5743
5748
|
}, {
|
|
5744
5749
|
readonly id: "zoom-through";
|
|
@@ -5770,6 +5775,11 @@ declare const SPEC_SITE_LAYOUT: {
|
|
|
5770
5775
|
readonly label: "an object turning";
|
|
5771
5776
|
readonly how: "rotate + opacity tracks while its words change";
|
|
5772
5777
|
readonly tier: "all";
|
|
5778
|
+
}, {
|
|
5779
|
+
readonly id: "drawers";
|
|
5780
|
+
readonly label: "drawers";
|
|
5781
|
+
readonly how: "a held section whose 3–5 steps (one heading each, words and buttons only) slide in from the end and stack, each keeping its titled spine, the grounds deepening to the brand";
|
|
5782
|
+
readonly tier: "pro";
|
|
5773
5783
|
}, {
|
|
5774
5784
|
readonly id: "held-screen";
|
|
5775
5785
|
readonly label: "a held screen";
|
|
@@ -9204,8 +9214,8 @@ declare const SPEC_SITE_LAYOUT: {
|
|
|
9204
9214
|
readonly where: "an entrance plays once (viewportEnter, once), or by the scroll (AW10: scrollProgress, until 0.5)";
|
|
9205
9215
|
};
|
|
9206
9216
|
readonly phoneWalk: {
|
|
9207
|
-
readonly built: readonly [];
|
|
9208
|
-
readonly where: "
|
|
9217
|
+
readonly built: readonly ["swipe"];
|
|
9218
|
+
readonly where: "generation-core composeLayout (AW9, RT-D4): on a phone a sideways walk is a row you swipe, one screen of it per card — every tier";
|
|
9209
9219
|
};
|
|
9210
9220
|
readonly phoneBar: {
|
|
9211
9221
|
readonly built: readonly ["pages"];
|
|
@@ -9322,6 +9332,16 @@ declare const SPEC_SITE_LAYOUT: {
|
|
|
9322
9332
|
readonly meaning: "an out-of-season card with notify me";
|
|
9323
9333
|
}];
|
|
9324
9334
|
};
|
|
9335
|
+
readonly drawers: {
|
|
9336
|
+
readonly spine: 4.5;
|
|
9337
|
+
readonly slide: 1;
|
|
9338
|
+
readonly rest: 0.5;
|
|
9339
|
+
readonly ramp: {
|
|
9340
|
+
readonly "3": readonly ["subtle", "muted", "accent"];
|
|
9341
|
+
readonly "4": readonly ["default", "subtle", "muted", "accent"];
|
|
9342
|
+
readonly "5": readonly ["default", "subtle", "muted", "inverse", "accent"];
|
|
9343
|
+
};
|
|
9344
|
+
};
|
|
9325
9345
|
};
|
|
9326
9346
|
|
|
9327
9347
|
/** What an untouched node of one registered type saves as (`NODE_BASELINES`, generated from the live
|
|
@@ -9854,7 +9874,11 @@ declare enum LayoutPhotoShape {
|
|
|
9854
9874
|
declare const LAYOUT_PHOTO_ASPECT: Readonly<Record<LayoutPhotoShape, string>>;
|
|
9855
9875
|
declare enum LayoutSectionKind {
|
|
9856
9876
|
Content = "content",
|
|
9857
|
-
Inhale = "inhale"
|
|
9877
|
+
Inhale = "inhale",
|
|
9878
|
+
/** AW9 (award plan "Reddottours" S4): the drawers signature — a held section whose steps (a heading each, then its words
|
|
9879
|
+
* and buttons) slide in from the inline end and stack, each keeping its titled spine. Award tier only; it is the page's
|
|
9880
|
+
* signature (`signature: true`), its length is its steps' (`drawersOf`). */
|
|
9881
|
+
Drawers = "drawers"
|
|
9858
9882
|
}
|
|
9859
9883
|
declare enum LayoutButtonVariant {
|
|
9860
9884
|
Primary = "primary",
|
|
@@ -11023,6 +11047,10 @@ interface PatternTrack {
|
|
|
11023
11047
|
readonly prop: string;
|
|
11024
11048
|
readonly keys: ReadonlyArray<readonly [number, number | string]>;
|
|
11025
11049
|
readonly from?: string;
|
|
11050
|
+
/** How it runs between keys when not its property's own (`linear` · `smooth`, AW9 RT-D1). */
|
|
11051
|
+
readonly ease?: string;
|
|
11052
|
+
/** What its progress is measured over when not the hold (`exit` · `cross-inline` · `cross-block`, AW9). */
|
|
11053
|
+
readonly range?: string;
|
|
11026
11054
|
}
|
|
11027
11055
|
/** The composite-core recipes a pattern may stamp (`recipe`). */
|
|
11028
11056
|
declare enum PatternRecipe {
|
|
@@ -13197,6 +13225,8 @@ declare enum LayoutSignatureId {
|
|
|
13197
13225
|
HalvesApart = "halves-apart",
|
|
13198
13226
|
SidewaysWalk = "sideways-walk",
|
|
13199
13227
|
ObjectTurning = "object-turning",
|
|
13228
|
+
/** AW9: steps sliding in from the end and stacking by their spines (the award tier's). */
|
|
13229
|
+
Drawers = "drawers",
|
|
13200
13230
|
HeldScreen = "held-screen"
|
|
13201
13231
|
}
|
|
13202
13232
|
interface LayoutFingerprint {
|
|
@@ -13536,7 +13566,10 @@ declare enum LayoutGapCode {
|
|
|
13536
13566
|
ListUnbound = "list-unbound",
|
|
13537
13567
|
/** AW10: a layer saying `scrub` that the look's By the scroll does not take, or in the first screen — it plays once
|
|
13538
13568
|
* (`checkLayout` mends it before; a stored layout is composed as is and said). */
|
|
13539
|
-
Scrub = "scrub"
|
|
13569
|
+
Scrub = "scrub",
|
|
13570
|
+
/** AW10: a drawers step's words stand still as the step slides in — their arrival when it lands is AW10's (an entrance
|
|
13571
|
+
* played at a key). The layout's entrance on them is dropped. */
|
|
13572
|
+
DrawerWords = "drawer-words"
|
|
13540
13573
|
}
|
|
13541
13574
|
interface LayoutGap {
|
|
13542
13575
|
code: LayoutGapCode;
|
|
@@ -18438,7 +18471,8 @@ declare function layoutRuleEdge(s: LayoutSection, li: number): 'start' | 'end' |
|
|
|
18438
18471
|
* a picture, or it moves (tracks, a depth). Anything else is an empty box on the page.
|
|
18439
18472
|
*/
|
|
18440
18473
|
declare function layoutShapeHasPurpose(s: LayoutSection, li: number): boolean;
|
|
18441
|
-
/** A held section where nothing moves by the scroll: no track, no kinetic line, no gallery the scroll turns.
|
|
18474
|
+
/** A held section where nothing moves by the scroll: no track, no kinetic line, no gallery the scroll turns. Drawers
|
|
18475
|
+
* (AW9) are never still: their steps slide. */
|
|
18442
18476
|
declare function layoutHeldStill(s: LayoutSection): boolean;
|
|
18443
18477
|
/**
|
|
18444
18478
|
* The line a still hold can light word by word: a word, heading or text of 2 to the kinetic words, never over a picture —
|
package/index.d.ts
CHANGED
|
@@ -2609,6 +2609,9 @@ declare const CURRENT_LINK_TYPES: ReadonlyArray<string>;
|
|
|
2609
2609
|
*/
|
|
2610
2610
|
/** The types that are pure decoration to assistive technology (an Icon has no name of its own). */
|
|
2611
2611
|
declare const DECORATIVE_TYPES: ReadonlyArray<string>;
|
|
2612
|
+
/** The parts that are decoration to assistive technology by their role: a drawer's spine repeats its step's own heading
|
|
2613
|
+
* (AW9 `drawers`), so it is read once. */
|
|
2614
|
+
declare const DECORATIVE_ROLES: ReadonlyArray<string>;
|
|
2612
2615
|
declare const DIALOG_NODE_TYPE = "Dialog";
|
|
2613
2616
|
/** A Segmented control's root (CC4b) is a radio group that must be named (board 10: an empty name is an audit
|
|
2614
2617
|
* finding). The main entry does not import composite-core, so the role is spelled here — a11y spec pins it. */
|
|
@@ -5057,5 +5060,5 @@ declare function formToastsOnSend(form: Element | null | undefined): boolean;
|
|
|
5057
5060
|
/** Raise the form's Sent toast (from the form — its scope and its look). */
|
|
5058
5061
|
declare function raiseFormToast(form: Element): ToastHandle | null;
|
|
5059
5062
|
|
|
5060
|
-
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BLUR_IN_START_PX, BOUND_STYLE_PREFIX, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CALENDAR_CLOSING_ATTRIBUTE, CALENDAR_DESIGN_ATTRIBUTE, CALENDAR_INSTANT_ATTRIBUTE, CALENDAR_SHEET_QUERY, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, COUNT_ATTRIBUTE, COUNT_DEFAULT_MS, COUNT_MAX_MS, COUNT_UP_ACTION, CURRENT_LINK_TYPES, CalendarClass, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, CoverPaint, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_INTERACTION_EASING, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DEPTH_CLIP_ATTRIBUTE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DatePickerRuntime, DeclarationContext, EASING_KEYWORDS, EASING_TOKENS, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, EasingKeyword, EasingToken, FLOATING_GAP, FLOATING_LAYER_CLASS, FLOATING_MARGIN, FLOATING_SHEET_QUERY, FloatingAlign, FloatingSide, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HEADER_SCROLL_HYSTERESIS_PX, HOVER_DEFAULT_TRANSITION_TRAITS, HOVER_MEDIA_QUERY, HOVER_STATES, HeaderInkRuntime, HeaderRuntime, INTERACTION_ANIMATION_ID, INTERACTION_HIDDEN_ATTRIBUTE, INTERACTION_MARKER_ATTRIBUTES, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, InlineEditEvent, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxPopoverComponent, IoxSubmitButtonComponent, IoxUiModule, IoxVideoComponent, LAST_EMITTED_STATES, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION_TRAITS, LEGACY_SWIPER_CONTROLS, LIST_GROUND_PIPE, LIST_INK_PIPE, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, NAMED_GROUP_ROLES, NO_PAGE_TRANSITION, ON_STATE_ROLES, OUTER_STYLE_PROPS, PAGE_LEAVE_RATIO, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PART_PAGINATION_MODIFIER, PHONE_TRANSITION_QUERY, PIPE_DESCRIPTORS, PIPE_REGISTRY, POPOVER_SELECTOR, POPUP_ANNOUNCE_ATTRIBUTE, POPUP_SCALE_PROPERTY, POPUP_SELECTOR, POPUP_STILL_ATTRIBUTE, PRELOADER_AT_ATTRIBUTE, PRELOADER_CLASS, PRELOADER_CSS, PRELOADER_END_EVENT, PRELOADER_RUN_ATTRIBUTE, PRELOADING_ATTRIBUTE, PROGRESS_ATTRIBUTE, PageScrollProvider, PageStyleField, PageStyleSource, PausableTimer, PauseReason, PointerKind, PopoverAttribute, PopupRuntime, REDUCED_ENTRANCE_FRAMES, REDUCED_MOTION_QUERY, REDUCED_PAGE_LEAVE, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLLBARS_TAKE_WIDTH_CLASS, SCROLLED_ATTRIBUTE, SCROLLED_STATE_ROLE, SCROLLED_THRESHOLD_PX, SCROLL_ANIMATION_ID, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SHAKE_DURATION_MS, SHAKE_EASING, SHAKE_KEYFRAMES, SLIDER_CARDS, SLIDER_FAN, SLIDER_FEEL, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, SLIDER_PHONE_BREAKPOINT, SLIDER_RUNWAY_CLASS, SLIDER_STEPS_PROPERTY, SLIDE_CAPTION_ATTRIBUTE, STATE_PSEUDO_CLASS, STRUCTURAL_STATES, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, ScrollActionType, ScrollEasing, SectionComponent, SettleMode, SliderCreativePreset, StringFormRuntime, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TOAST_CLOSE_WORDS, TOAST_DESIGN_ATTRIBUTE, TOAST_EDGE_ATTRIBUTE, TOAST_FIRST_LANDS_MS, TOAST_MAX_MS, TOAST_MAX_VISIBLE, TOAST_MIN_MS, TOAST_MS_PER_CHAR, TOOLTIP_ATTRIBUTE, TOOLTIP_FIRST_DELAY_MS, TOOLTIP_HIDE_GRACE_MS, TOOLTIP_INSTANT_ATTRIBUTE, TOOLTIP_PINNED_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, TOOLTIP_SIDE_ATTRIBUTE, TOOLTIP_TYPES, TOOLTIP_WARM_MS, TRANSITION_FEELS, TRANSITION_PROPERTY_KEY, TextAlign, TextBlockComponent, ToastClass, ToastEdge, TooltipClass, TooltipRuntime, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, afterPreloader, animateAction, applyBindingPipes, applyBoundStyle, applyBoundStyles, applyFeel, armCountUp, armInteractionCounts, attachDatePicker, attachDatePickers, attachScrollProgress, attachStringForm, attachTooltips, bootSlider, boundStyleCss, boundStyleEntries, boundStyleOf, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildPreloaderLayer, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, canPopover, cascadeChain, clearInputOverride, clearOverride, clearToasts, closeAboveMediaQuery, closeAllPopovers, closePopover, collectContextSlotKeys, commitInlineEdit, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countDuration, countIsReadable, countLocaleOf, countOverrides, countValueAt, coverPanelStyle, createCoverPanel, datePickerOf, declaredInputNames, decomposeBackdropFilter, defaultHoverTransitionTraits, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, directionalFrames, domHasSliderParts, durationMs, effectiveActionType, effectiveTransitionId, ensurePreloaderStyles, entrancePreStateStyle, entranceStartsHidden, fanMiddle, feelFor, fieldLanguage, finalKeyframe, firstScreenReadiness, floatingLayer, floatingScope, formSentWords, formToastsOnSend, formatCount, framesFromLiveValue, gateHoverRule, getSeoValue, hasCounted, hasHoverState, hasOwnPageTransition, hasOwnTransition, headerShouldHide, hideFromTopLayer, hidingHeadersIn, initialSlotValues, inkFollowingHeadersIn, interactionMarkerAttributes, isActionEnabled, isBoundProp, isBoundStyleProp, isContextAction, isCubicBezier, isCurrentLink, isEasingToken, isExternalOrFragment, isGradientPaint, isHoverPointer, isHoverState, isInputOverriddenAt, isInteractionEasing, isLastEmittedStateKey, isOpenPopover, isOperated, isOverriddenAt, isPopoverOpen, isPreloading, isPressFeedback, isScrolled, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, layerFrame, legacyEnterToTransition, lookEaseOf, markScrollbarsTakeWidth, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, mountPreloader, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, openPopover, openingPictureOf, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseCount, parseUrlList, partClassName, placeFloating, placePopover, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playCountUp, playDualLayerTransition, playInteraction, playPreloaderPreview, playsOnScroll, popoverPanelAttributes, popoverSide, popupAttributeGetter, popupIdOf, prefersReducedMotion, preloaderContentOf, preloaderHeadScript, raiseFloatingLayer, raiseFormToast, rectInLayer, reducedEntranceFades, reducedEntranceRun, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolveInteractionEasing, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, restoreCountUp, rewriteViewportUnits, runPreloader, safeSetInput, scrollActionKind, scrollMotionEnv, scrollbarsTakeWidthScript, scrubUntilOf, serializeA11yAttributes, setDateFieldValue, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, shakeElement, showCalendarDesign, showInTopLayer, showToast, showToastDesign, sliderControlElements, sliderInputsFromProps, sliderInputsOf, sliderRunwayHtml, splitOuterProps, splitPressFeedback, stateNamesIn, statePseudoClass, stateSelectorSuffix, stateTransitionProperties, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncInteractionMarkers, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, toLayerRect, toastCloseWord, toastDuration, toastEdge, toastsToEvict, togglePopover, tooltipSide, tooltipTiming, tooltipWords, tooltipsOf, transitionPropertyList, translateYOf, viewportTransitionContext, watchHeaderInk, watchHeaders, watchScrolled, withContextSlots, withPhoneDefaults, withStateTransitions, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
5063
|
+
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BLUR_IN_START_PX, BOUND_STYLE_PREFIX, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CALENDAR_CLOSING_ATTRIBUTE, CALENDAR_DESIGN_ATTRIBUTE, CALENDAR_INSTANT_ATTRIBUTE, CALENDAR_SHEET_QUERY, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, COUNT_ATTRIBUTE, COUNT_DEFAULT_MS, COUNT_MAX_MS, COUNT_UP_ACTION, CURRENT_LINK_TYPES, CalendarClass, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, CoverPaint, DECORATIVE_ROLES, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_INTERACTION_EASING, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DEPTH_CLIP_ATTRIBUTE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DatePickerRuntime, DeclarationContext, EASING_KEYWORDS, EASING_TOKENS, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, EasingKeyword, EasingToken, FLOATING_GAP, FLOATING_LAYER_CLASS, FLOATING_MARGIN, FLOATING_SHEET_QUERY, FloatingAlign, FloatingSide, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HEADER_SCROLL_HYSTERESIS_PX, HOVER_DEFAULT_TRANSITION_TRAITS, HOVER_MEDIA_QUERY, HOVER_STATES, HeaderInkRuntime, HeaderRuntime, INTERACTION_ANIMATION_ID, INTERACTION_HIDDEN_ATTRIBUTE, INTERACTION_MARKER_ATTRIBUTES, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, InlineEditEvent, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxPopoverComponent, IoxSubmitButtonComponent, IoxUiModule, IoxVideoComponent, LAST_EMITTED_STATES, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION_TRAITS, LEGACY_SWIPER_CONTROLS, LIST_GROUND_PIPE, LIST_INK_PIPE, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, NAMED_GROUP_ROLES, NO_PAGE_TRANSITION, ON_STATE_ROLES, OUTER_STYLE_PROPS, PAGE_LEAVE_RATIO, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PART_PAGINATION_MODIFIER, PHONE_TRANSITION_QUERY, PIPE_DESCRIPTORS, PIPE_REGISTRY, POPOVER_SELECTOR, POPUP_ANNOUNCE_ATTRIBUTE, POPUP_SCALE_PROPERTY, POPUP_SELECTOR, POPUP_STILL_ATTRIBUTE, PRELOADER_AT_ATTRIBUTE, PRELOADER_CLASS, PRELOADER_CSS, PRELOADER_END_EVENT, PRELOADER_RUN_ATTRIBUTE, PRELOADING_ATTRIBUTE, PROGRESS_ATTRIBUTE, PageScrollProvider, PageStyleField, PageStyleSource, PausableTimer, PauseReason, PointerKind, PopoverAttribute, PopupRuntime, REDUCED_ENTRANCE_FRAMES, REDUCED_MOTION_QUERY, REDUCED_PAGE_LEAVE, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLLBARS_TAKE_WIDTH_CLASS, SCROLLED_ATTRIBUTE, SCROLLED_STATE_ROLE, SCROLLED_THRESHOLD_PX, SCROLL_ANIMATION_ID, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SHAKE_DURATION_MS, SHAKE_EASING, SHAKE_KEYFRAMES, SLIDER_CARDS, SLIDER_FAN, SLIDER_FEEL, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, SLIDER_PHONE_BREAKPOINT, SLIDER_RUNWAY_CLASS, SLIDER_STEPS_PROPERTY, SLIDE_CAPTION_ATTRIBUTE, STATE_PSEUDO_CLASS, STRUCTURAL_STATES, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, ScrollActionType, ScrollEasing, SectionComponent, SettleMode, SliderCreativePreset, StringFormRuntime, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TOAST_CLOSE_WORDS, TOAST_DESIGN_ATTRIBUTE, TOAST_EDGE_ATTRIBUTE, TOAST_FIRST_LANDS_MS, TOAST_MAX_MS, TOAST_MAX_VISIBLE, TOAST_MIN_MS, TOAST_MS_PER_CHAR, TOOLTIP_ATTRIBUTE, TOOLTIP_FIRST_DELAY_MS, TOOLTIP_HIDE_GRACE_MS, TOOLTIP_INSTANT_ATTRIBUTE, TOOLTIP_PINNED_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, TOOLTIP_SIDE_ATTRIBUTE, TOOLTIP_TYPES, TOOLTIP_WARM_MS, TRANSITION_FEELS, TRANSITION_PROPERTY_KEY, TextAlign, TextBlockComponent, ToastClass, ToastEdge, TooltipClass, TooltipRuntime, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, afterPreloader, animateAction, applyBindingPipes, applyBoundStyle, applyBoundStyles, applyFeel, armCountUp, armInteractionCounts, attachDatePicker, attachDatePickers, attachScrollProgress, attachStringForm, attachTooltips, bootSlider, boundStyleCss, boundStyleEntries, boundStyleOf, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildPreloaderLayer, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, canPopover, cascadeChain, clearInputOverride, clearOverride, clearToasts, closeAboveMediaQuery, closeAllPopovers, closePopover, collectContextSlotKeys, commitInlineEdit, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countDuration, countIsReadable, countLocaleOf, countOverrides, countValueAt, coverPanelStyle, createCoverPanel, datePickerOf, declaredInputNames, decomposeBackdropFilter, defaultHoverTransitionTraits, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, directionalFrames, domHasSliderParts, durationMs, effectiveActionType, effectiveTransitionId, ensurePreloaderStyles, entrancePreStateStyle, entranceStartsHidden, fanMiddle, feelFor, fieldLanguage, finalKeyframe, firstScreenReadiness, floatingLayer, floatingScope, formSentWords, formToastsOnSend, formatCount, framesFromLiveValue, gateHoverRule, getSeoValue, hasCounted, hasHoverState, hasOwnPageTransition, hasOwnTransition, headerShouldHide, hideFromTopLayer, hidingHeadersIn, initialSlotValues, inkFollowingHeadersIn, interactionMarkerAttributes, isActionEnabled, isBoundProp, isBoundStyleProp, isContextAction, isCubicBezier, isCurrentLink, isEasingToken, isExternalOrFragment, isGradientPaint, isHoverPointer, isHoverState, isInputOverriddenAt, isInteractionEasing, isLastEmittedStateKey, isOpenPopover, isOperated, isOverriddenAt, isPopoverOpen, isPreloading, isPressFeedback, isScrolled, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, layerFrame, legacyEnterToTransition, lookEaseOf, markScrollbarsTakeWidth, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, mountPreloader, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, openPopover, openingPictureOf, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseCount, parseUrlList, partClassName, placeFloating, placePopover, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playCountUp, playDualLayerTransition, playInteraction, playPreloaderPreview, playsOnScroll, popoverPanelAttributes, popoverSide, popupAttributeGetter, popupIdOf, prefersReducedMotion, preloaderContentOf, preloaderHeadScript, raiseFloatingLayer, raiseFormToast, rectInLayer, reducedEntranceFades, reducedEntranceRun, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolveInteractionEasing, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, restoreCountUp, rewriteViewportUnits, runPreloader, safeSetInput, scrollActionKind, scrollMotionEnv, scrollbarsTakeWidthScript, scrubUntilOf, serializeA11yAttributes, setDateFieldValue, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, shakeElement, showCalendarDesign, showInTopLayer, showToast, showToastDesign, sliderControlElements, sliderInputsFromProps, sliderInputsOf, sliderRunwayHtml, splitOuterProps, splitPressFeedback, stateNamesIn, statePseudoClass, stateSelectorSuffix, stateTransitionProperties, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncInteractionMarkers, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, toLayerRect, toastCloseWord, toastDuration, toastEdge, toastsToEvict, togglePopover, tooltipSide, tooltipTiming, tooltipWords, tooltipsOf, transitionPropertyList, translateYOf, viewportTransitionContext, watchHeaderInk, watchHeaders, watchScrolled, withContextSlots, withPhoneDefaults, withStateTransitions, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
5061
5064
|
export type { A11yNodeSource, AnimateActionOptions, BoundStyleTarget, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CountTarget, CoverPanelContext, CurrentLinkOptions, DatePickerOptions, FloatingLayerOptions, FloatingOptions, FloatingPlacement, FloatingRect, FloatingSize, FloatingViewport, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, HeaderRuntimeOptions, IBuilderEventEmitter, InlineEditableNode, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, LayerFrame, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageCoverSpec, PageScrollStart, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionContext, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, PlannedPageTransition, PopoverCloseOptions, PopoverOpenOptions, PopupOverlayState, PopupRuntimeOptions, PreloaderContent, PreloaderPreviewOptions, PreloaderRunOptions, PressAction, RegisteredField, ResolvedPageCover, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteAnimationLike, ScrollPlanContext, ScrollProgressAction, ScrollProgressHost, ScrollProgressInteraction, ScrollSource, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SettleOptions, SliderBootOptions, SliderControlElements, SliderInputs, StateRulePlan, StateScope, StateStyleMap, StringFormOptions, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, SwiperPlan, SwiperPlanContext, ToastHandle, ToastOptions, ToggleableAction, TooltipRuntimeOptions, TooltipTimingState, TransitionFeel, TransitionPhase, TransitionPreviewLayers, TransitionTimelineInput, TransitionViewport, ValueSource, VirtualTraitGroup };
|
package/package.json
CHANGED
package/scene-core/index.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ declare function applySceneFirstFrame(el: HTMLElement | null | undefined, node:
|
|
|
196
196
|
*/
|
|
197
197
|
declare const SCENE_FLOW_RULES: string;
|
|
198
198
|
/** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */
|
|
199
|
-
declare const SCENE_REDUCED_MOTION_CSS = "@media (prefers-reduced-motion: reduce){.iox-role-scene{height:auto!important}.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important;display:flex!important;flex-direction:column!important;gap:clamp(40px,8vw,72px)!important;padding:clamp(72px,10vw,96px) clamp(16px,4vw,32px)!important;isolation:isolate}.iox-role-scene-stage>*{position:relative!important;inset:auto!important;max-width:100%!important}.iox-role-scene-stage>[class*=\"iox-outer-\"]>[class*=\"iox-node-\"]{position:relative!important;inset:auto!important}[data-iox-tracks]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}[data-iox-tracks]{max-width:100%!important;flex-wrap:wrap!important}[data-iox-video-frames]{height:auto!important}iox-video:has(>[data-iox-video-frames]){display:contents!important}[data-iox-video-frames]>.iox-video__poster,[data-iox-video-frames]>picture>.iox-video__poster{position:static!important;height:auto!important}}";
|
|
199
|
+
declare const SCENE_REDUCED_MOTION_CSS = "@media (prefers-reduced-motion: reduce){.iox-role-scene{height:auto!important}.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important;display:flex!important;flex-direction:column!important;gap:clamp(40px,8vw,72px)!important;padding:clamp(72px,10vw,96px) clamp(16px,4vw,32px)!important;isolation:isolate}.iox-role-scene-stage>*{position:relative!important;inset:auto!important;max-width:100%!important}.iox-role-scene-stage>[class*=\"iox-outer-\"]>[class*=\"iox-node-\"]{position:relative!important;inset:auto!important}[data-iox-tracks]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}[data-iox-tracks]{max-width:100%!important;flex-wrap:wrap!important}.iox-role-scene-drawer{width:100%!important;height:auto!important;flex-direction:column!important}.iox-role-scene-drawer-spine{writing-mode:horizontal-tb!important;rotate:none!important;width:auto!important;height:auto!important}[data-iox-video-frames]{height:auto!important}iox-video:has(>[data-iox-video-frames]){display:contents!important}[data-iox-video-frames]>.iox-video__poster,[data-iox-video-frames]>picture>.iox-video__poster{position:static!important;height:auto!important}}";
|
|
200
200
|
|
|
201
201
|
declare function sceneKeyPosition(p: number): number;
|
|
202
202
|
interface SceneTrackDef {
|
|
@@ -73,6 +73,15 @@ export enum SegmentedRole {
|
|
|
73
73
|
export enum SceneRole {
|
|
74
74
|
Scene = 'scene',
|
|
75
75
|
Stage = 'scene.stage',
|
|
76
|
+
/** AW9 (RT-D4): a sideways walk's wide row — on a phone, a row the visitor swipes. */
|
|
77
|
+
Walk = 'scene.walk',
|
|
78
|
+
/** One screen of a walk: laid out on the wide row's grid (`display: contents`), on a phone a card the row snaps to. */
|
|
79
|
+
WalkScreen = 'scene.walk-screen',
|
|
80
|
+
/** AW9 `drawers`: one step — a panel that slides in from the inline end and stops one spine after the one before. */
|
|
81
|
+
Drawer = 'scene.drawer',
|
|
82
|
+
/** A drawer's spine: its number and heading, standing on end (on a phone, a label above the step). Decorative to
|
|
83
|
+
* assistive technology — the step's own heading says it. */
|
|
84
|
+
DrawerSpine = 'scene.drawer-spine',
|
|
76
85
|
}
|
|
77
86
|
|
|
78
87
|
interface RoleLike { role?: string | null }
|
|
@@ -11,6 +11,7 @@ import { layoutColumnsOffered } from './layout-wire';
|
|
|
11
11
|
import { layoutColumnWord, layoutJudgeColumnPx } from './layout-column';
|
|
12
12
|
import { DriftBox, driftOverlap, layoutGlideDepth } from './layout-drift';
|
|
13
13
|
import { layoutLookOf } from './layout-look';
|
|
14
|
+
import { DRAWER_KINDS, DRAWER_STEPS, drawerStepCount, isDrawers, layoutSignatureOffered } from './layout-drawers';
|
|
14
15
|
import { patternById, SCENE_LEVEL } from './patterns';
|
|
15
16
|
import { layoutDesignOf, screenWordMisfit } from './layout-type';
|
|
16
17
|
import { sectionEntrances } from './entrances';
|
|
@@ -296,6 +297,32 @@ interface LayoutTally {
|
|
|
296
297
|
|
|
297
298
|
const NOTHING_CARRIED: LayoutTally = { signatures: 0, galleries: 0, swappable: 0, layered: 0, bleeds: 0, screenWords: 0, wordsOnPhoto: 0, holds: 0 };
|
|
298
299
|
|
|
300
|
+
/**
|
|
301
|
+
* AW9 `drawers` (award plan "Reddottours" S4): the award tier's signature, held and never sideways, its 3–5 steps each
|
|
302
|
+
* opened by a heading and holding words and buttons only (a step paints its own ground from the look's schemes — never on
|
|
303
|
+
* a photo); a step's words ride their step, so they carry no tracks or depth of their own.
|
|
304
|
+
*/
|
|
305
|
+
function drawersIssues(
|
|
306
|
+
s: LayoutSection, at: string, track: number, groundPhoto: boolean, tier: string | null | undefined,
|
|
307
|
+
add: (code: LayoutIssueCode, path: string, message: string) => void,
|
|
308
|
+
): void {
|
|
309
|
+
const layers = Array.isArray(s.layers) ? s.layers : [];
|
|
310
|
+
if (!layoutSignatureOffered(LayoutSectionKind.Drawers, tier)) add(LayoutIssueCode.Value, `${at}.kind`, 'drawers is an award signature — content | inhale | signature');
|
|
311
|
+
if (!s.signature) add(LayoutIssueCode.Structure, at, "drawers is the page's signature");
|
|
312
|
+
if (!s.pin || track > 1) add(LayoutIssueCode.Structure, `${at}.hold`, 'drawers is held (hold 1) and never carried sideways');
|
|
313
|
+
if (groundPhoto) add(LayoutIssueCode.Structure, `${at}.ground`, 'each step paints its own ground — a colour, never a photo');
|
|
314
|
+
const n = drawerStepCount(layers);
|
|
315
|
+
if (n < DRAWER_STEPS[0] || n > DRAWER_STEPS[1]) {
|
|
316
|
+
add(LayoutIssueCode.Structure, `${at}.layers`, `${n} step${n === 1 ? '' : 's'} — drawers hold ${DRAWER_STEPS[0]} to ${DRAWER_STEPS[1]}, each opened by a heading`);
|
|
317
|
+
}
|
|
318
|
+
if (layers.length && layers[0].kind !== LayoutLayerKind.Heading) add(LayoutIssueCode.Structure, `${at}.layers[0]`, 'the first step opens with its heading');
|
|
319
|
+
layers.forEach((l, j) => {
|
|
320
|
+
const lp = `${at}.layers[${j}]`;
|
|
321
|
+
if (!DRAWER_KINDS.has(l.kind)) add(LayoutIssueCode.Structure, `${lp}.kind`, 'a step holds words and buttons — no photo, gallery, form, marquee or shape');
|
|
322
|
+
if (l.motion?.length) add(LayoutIssueCode.Motion, `${lp}.motion`, "a step's words ride their step — no tracks of their own");
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
|
|
299
326
|
/** The model's page in its own order: the sections as they stand, the dropped ones back at their places. */
|
|
300
327
|
function originalOrder(sections: ReadonlyArray<LayoutSection>, given: ReadonlyArray<LayoutGivenAway>): LayoutSection[] {
|
|
301
328
|
const kept = new Set(sections.map(s => s.id));
|
|
@@ -409,9 +436,10 @@ function examineLayout(page: LayoutPage, ctx: CheckLayoutContext, carried: Layou
|
|
|
409
436
|
const at = `sections[${i}]`;
|
|
410
437
|
const track = trackOf(s);
|
|
411
438
|
const kind = s.kind ?? LayoutSectionKind.Content;
|
|
412
|
-
const
|
|
439
|
+
const drawers = isDrawers(s);
|
|
440
|
+
const content = kind === LayoutSectionKind.Content || drawers;
|
|
413
441
|
if (!String(s.id ?? '').trim()) add(LayoutIssueCode.Structure, `${at}.id`, 'a short slug');
|
|
414
|
-
if (!inList([LayoutSectionKind.Content, LayoutSectionKind.Inhale], kind)) add(LayoutIssueCode.Value, `${at}.kind`, 'content | inhale (a signature is a content section)');
|
|
442
|
+
if (!inList([LayoutSectionKind.Content, LayoutSectionKind.Inhale, LayoutSectionKind.Drawers], kind)) add(LayoutIssueCode.Value, `${at}.kind`, 'content | inhale (a signature is a content section)');
|
|
415
443
|
if (!(s.screens >= LIM.screens[0] && s.screens <= LIM.screens[1])) add(LayoutIssueCode.Value, `${at}.screens`, `${LIM.screens[0]}..${LIM.screens[1]}`);
|
|
416
444
|
if (!(Number.isInteger(s.rows) && s.rows >= LIM.rows[0] && s.rows <= LIM.rows[1])) add(LayoutIssueCode.Value, `${at}.rows`, `a whole number ${LIM.rows[0]}..${LIM.rows[1]}`);
|
|
417
445
|
if (!(Number.isInteger(track) && track >= 1 && track <= LIM.hold[1])) add(LayoutIssueCode.Value, `${at}.track`, `1..${LIM.hold[1]}`);
|
|
@@ -441,6 +469,7 @@ function examineLayout(page: LayoutPage, ctx: CheckLayoutContext, carried: Layou
|
|
|
441
469
|
if (layers.some(isPictured) || groundPhoto) add(LayoutIssueCode.Structure, at, 'an inhale has no photo and no gallery');
|
|
442
470
|
if (s.screens > LIM.inhaleScreens) add(LayoutIssueCode.Structure, `${at}.screens`, `an inhale is 1–${LIM.inhaleScreens} screens`);
|
|
443
471
|
}
|
|
472
|
+
if (drawers) drawersIssues(s, at, track, !!groundPhoto, ctx.tier, add);
|
|
444
473
|
const leads = layers.filter(l => l.role === LayoutRole.Lead).length;
|
|
445
474
|
if (content && leads !== 1) add(LayoutIssueCode.Structure, `${at}.layers`, `${leads} leads — exactly one layer is the lead`);
|
|
446
475
|
if (!content && leads > 1) add(LayoutIssueCode.Structure, `${at}.layers`, 'an inhale has at most one lead');
|
|
@@ -463,8 +492,9 @@ function examineLayout(page: LayoutPage, ctx: CheckLayoutContext, carried: Layou
|
|
|
463
492
|
const entering = layers.filter(l => l.enter && l.enter !== LayoutEnter.None && l.enter !== LayoutEnter.Fade);
|
|
464
493
|
if (entering.length) sectionsWithEnters++;
|
|
465
494
|
const recipes = new Set(entering.filter(l => l.role !== LayoutRole.Lead).map(l => l.enter));
|
|
466
|
-
|
|
467
|
-
if (
|
|
495
|
+
// A drawers section's words stand on their step (their arrival as it lands is AW10): the composer drops entrances there.
|
|
496
|
+
if (recipes.size > 1 && !drawers) add(LayoutIssueCode.Motion, `${at}.layers`, `the supporting layers enter in ${recipes.size} ways — one entrance per section besides the lead's`);
|
|
497
|
+
if (entering.length > LIM.enteringPerSection && !drawers) add(LayoutIssueCode.Motion, `${at}.layers`, `${entering.length} layers enter — at most ${LIM.enteringPerSection}; let the rest simply be there`);
|
|
468
498
|
|
|
469
499
|
let rotated = 0;
|
|
470
500
|
layers.forEach((l, j) => {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from '@vectoriox/iox-ui/composite-core';
|
|
6
6
|
|
|
7
7
|
import { ColorScheme, DesignChoices, LIST_MIX_PROP, LinkType, scrubOfChoices, setColorScheme, SPEC_AXES } from '@vectoriox/iox-ui/design-core';
|
|
8
|
-
import { SCENE_TRACK_EASE, SceneEase, SceneProp, TextRevealBy } from '@vectoriox/iox-ui/scene-core';
|
|
8
|
+
import { SCENE_TRACK_EASE, SceneEase, SceneProp, SceneRange, SceneRevealFrom, TextRevealBy } from '@vectoriox/iox-ui/scene-core';
|
|
9
9
|
import { FORM_AFTER_SEND_TRAIT, FormAfterSend, FormPresetId } from '@vectoriox/iox-ui/forms-core';
|
|
10
10
|
import { composeNavHeader, composePresetForm } from './compose-site';
|
|
11
11
|
import { drawnHeaderMix, headerMixOfNavKind } from './header-mix';
|
|
@@ -21,6 +21,8 @@ import {
|
|
|
21
21
|
screenFontSize,
|
|
22
22
|
} from './layout-language';
|
|
23
23
|
import { layoutGlideDepth } from './layout-drift';
|
|
24
|
+
import { DRAWER_SPINE, drawerRamp, drawerRestX, drawersTiming, drawerSteps, drawerWidth, isDrawers } from './layout-drawers';
|
|
25
|
+
import { LayoutSignatureId, signatureOf } from './layout-fingerprint';
|
|
24
26
|
import {
|
|
25
27
|
LAYOUT_BLEED_END_LINE, LAYOUT_BLEED_START_LINE, LAYOUT_INSET, layoutBledBarInset, layoutColumnPx, layoutColumnStart, layoutColumnWord, layoutGapPx,
|
|
26
28
|
layoutGridColumns, layoutGridLine, layoutGridPx,
|
|
@@ -82,6 +84,9 @@ export enum LayoutGapCode {
|
|
|
82
84
|
/** AW10: a layer saying `scrub` that the look's By the scroll does not take, or in the first screen — it plays once
|
|
83
85
|
* (`checkLayout` mends it before; a stored layout is composed as is and said). */
|
|
84
86
|
Scrub = 'scrub',
|
|
87
|
+
/** AW10: a drawers step's words stand still as the step slides in — their arrival when it lands is AW10's (an entrance
|
|
88
|
+
* played at a key). The layout's entrance on them is dropped. */
|
|
89
|
+
DrawerWords = 'drawer-words',
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
export interface LayoutGap {
|
|
@@ -521,7 +526,39 @@ function depthInteraction(nodeId: string, depth: string): unknown {
|
|
|
521
526
|
|
|
522
527
|
const TRACK_REST: Readonly<Record<string, number>> = { x: 0, y: 0, scale: 1, rotate: 0, opacity: 1, clip: 100, words: 100 };
|
|
523
528
|
|
|
524
|
-
interface SceneTrackOut { prop: string; keys: Array<[number, number]>; from?: string; ease?: SceneEase }
|
|
529
|
+
interface SceneTrackOut { prop: string; keys: Array<[number, number]>; from?: string; ease?: SceneEase; range?: SceneRange }
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* AW9 gap 4 (award plan "Reddottours" S1, the window that opens): a held picture that opens by its clip opens from a
|
|
533
|
+
* FRAME — 60% showing from the centre, the section's ground around it (theirs: `inset(20%)`) — never from a slit.
|
|
534
|
+
*/
|
|
535
|
+
const FRAMED_SHOWING = 60;
|
|
536
|
+
/** …and sinks as the Scene leaves: 30% of the stage over the root's leaving, so the next band rises over it (theirs:
|
|
537
|
+
* `yPercent 30`). Measured over the exit range, after the hold. */
|
|
538
|
+
const WINDOW_SINK: Readonly<SceneTrackOut> = { prop: SceneProp.Y, range: SceneRange.Exit, keys: [[0, 0], [1, 30]] };
|
|
539
|
+
/** Reddottours S3: a walk's picture is over-scaled ×1.2 inside its frame and drifts against the row while it crosses the
|
|
540
|
+
* screen (theirs: `xPercent 0 → 20` over its own crossing). The drift's reach, as a share of the frame's width, keeps
|
|
541
|
+
* inside the over-scale's slack on both sides (0.08 × 1.2 < 0.1). */
|
|
542
|
+
const WALK_DRIFT_SCALE = 0.2;
|
|
543
|
+
const WALK_DRIFT_SHARE = 0.08;
|
|
544
|
+
|
|
545
|
+
/** The framed window: a held picture's opening clip, from the centre and from a frame, never from less. */
|
|
546
|
+
function framedWindow(track: SceneTrackOut): SceneTrackOut {
|
|
547
|
+
const keys = track.keys.map(([at, v], i): [number, number] => [at, i === 0 ? Math.max(FRAMED_SHOWING, v) : v]);
|
|
548
|
+
return { ...track, from: SceneRevealFrom.Centre, keys };
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/** Does this held layer open the section's window (`photo-unveiled`): a picture whose clip grows to showing it whole? */
|
|
552
|
+
function opensWindow(l: LayoutLayer, lc: LayerCtx): boolean {
|
|
553
|
+
if (l.kind !== LayoutLayerKind.Photo || lc.track > 1 || signatureOf(lc.section) !== LayoutSignatureId.PhotoUnveiled) return false;
|
|
554
|
+
return (l.motion ?? []).some(t => t.prop === LayoutTrackProp.Clip && Number(t.to) >= 100 && Number(t.to) > Number(t.from));
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/** A walk's picture drifting inside its frame as it crosses the screen: ± its share of the frame's width, in cqw. */
|
|
558
|
+
function walkDrift(l: LayoutLayer): SceneTrackOut {
|
|
559
|
+
const reach = Math.round(((l.col[1] - l.col[0]) / GRID_COLUMNS) * 100 * WALK_DRIFT_SHARE * 100) / 100;
|
|
560
|
+
return { prop: SceneProp.X, range: SceneRange.CrossInline, keys: [[0, -reach], [1, reach]] };
|
|
561
|
+
}
|
|
525
562
|
|
|
526
563
|
/** The layout's eases the product's tracks can run (RT-D1); anything else is drawn as the property's own. */
|
|
527
564
|
const TRACK_EASE: Readonly<Partial<Record<LayoutEase, SceneEase>>> = { [LayoutEase.Linear]: SceneEase.Linear, [LayoutEase.InOut]: SceneEase.Smooth };
|
|
@@ -669,7 +706,7 @@ function listLayer(id: string, l: LayoutLayer, ctx: Ctx): SerializedNode {
|
|
|
669
706
|
return frame;
|
|
670
707
|
}
|
|
671
708
|
|
|
672
|
-
function photoLayer(id: string, l: LayoutLayer, ctx: Ctx, path: string): { frame: SerializedNode; image: SerializedNode } {
|
|
709
|
+
function photoLayer(id: string, l: LayoutLayer, ctx: Ctx, path: string, walking = false): { frame: SerializedNode; image: SerializedNode } {
|
|
673
710
|
const photoId = l.photo?.id ?? '';
|
|
674
711
|
const frame = create(id, T.Container, {}, NO_ELEMENT_STYLE);
|
|
675
712
|
// Its cell gives it both sides (the shape is ignored there); where it stacks, its width and its shape give it a height.
|
|
@@ -683,7 +720,8 @@ function photoLayer(id: string, l: LayoutLayer, ctx: Ctx, path: string): { frame
|
|
|
683
720
|
// A picture with room to drift is over-scaled inside its frame (M8-G5: the drift itself has no speed of its own). The
|
|
684
721
|
// scale sits on a box between them: an Image's own size is capped at its frame (vectoriox/iox-ui#8), and its
|
|
685
722
|
// transform belongs to its entrance (zoomOut).
|
|
686
|
-
const
|
|
723
|
+
const inner = INNER_SCALE * Math.max(0, Math.min(3, l.inner ?? 0));
|
|
724
|
+
const k = walking ? Math.max(inner, WALK_DRIFT_SCALE) : inner;
|
|
687
725
|
if (!k) {
|
|
688
726
|
frame.children = [image];
|
|
689
727
|
return { frame, image };
|
|
@@ -692,7 +730,11 @@ function photoLayer(id: string, l: LayoutLayer, ctx: Ctx, path: string): { frame
|
|
|
692
730
|
const scale = String(Math.round((1 + k) * 1000) / 1000);
|
|
693
731
|
setStyleProps(drift, { width: FULL, height: FULL, scaleX: scale, scaleY: scale });
|
|
694
732
|
drift.children = [image];
|
|
695
|
-
|
|
733
|
+
if (walking) {
|
|
734
|
+
// On a phone the walk is a row the visitor swipes (RT-D4): the picture rests in its frame there.
|
|
735
|
+
image.sceneTracks = [walkDrift(l)];
|
|
736
|
+
image.scenePhoneTracks = restingTracks(image.sceneTracks as SceneTrackOut[]);
|
|
737
|
+
} else gap(ctx, LayoutGapCode.DepthSpeed, path, `inner ${l.inner}: over-scaled ×${(1 + k).toFixed(2)}, no drift`);
|
|
696
738
|
frame.children = [drift];
|
|
697
739
|
return { frame, image };
|
|
698
740
|
}
|
|
@@ -1473,7 +1515,7 @@ function composeLayer(l: LayoutLayer, lc: LayerCtx, ctx: Ctx): SerializedNode {
|
|
|
1473
1515
|
ctx.keptArrangement.push(part.handle);
|
|
1474
1516
|
} else switch (l.kind) {
|
|
1475
1517
|
case LayoutLayerKind.Photo: {
|
|
1476
|
-
const made = photoLayer(id, l, ctx, lc.path);
|
|
1518
|
+
const made = photoLayer(id, l, ctx, lc.path, lc.held && lc.track > 1 && l.role !== LayoutRole.Decoration);
|
|
1477
1519
|
outer = entering = made.frame;
|
|
1478
1520
|
image = made.image;
|
|
1479
1521
|
break;
|
|
@@ -1500,10 +1542,12 @@ function composeLayer(l: LayoutLayer, lc: LayerCtx, ctx: Ctx): SerializedNode {
|
|
|
1500
1542
|
// Held: the layer moves by tracks; a kinetic heading lights word by word as the section is read.
|
|
1501
1543
|
const tracks: SceneTrackOut[] = [];
|
|
1502
1544
|
if (lc.held) {
|
|
1545
|
+
const framed = opensWindow(l, lc);
|
|
1503
1546
|
for (const t of l.motion ?? []) {
|
|
1504
1547
|
const track = sceneTrackOf(t, l, lc.section.rows, ctx, lc.path);
|
|
1505
|
-
if (track) tracks.push(track);
|
|
1548
|
+
if (track) tracks.push(framed && track.prop === SceneProp.Clip ? framedWindow(track) : track);
|
|
1506
1549
|
}
|
|
1550
|
+
if (framed) tracks.push({ ...WINDOW_SINK, keys: WINDOW_SINK.keys.map(([at, v]): [number, number] => [at, v]) });
|
|
1507
1551
|
if (l.kinetic && textual) tracks.push({ prop: 'words', keys: [[0, 0], [KINETIC_ALL_LIT, 100]] });
|
|
1508
1552
|
if (tracks.length) {
|
|
1509
1553
|
outer.sceneTracks = tracks;
|
|
@@ -1520,7 +1564,7 @@ function composeLayer(l: LayoutLayer, lc: LayerCtx, ctx: Ctx): SerializedNode {
|
|
|
1520
1564
|
if (!(lc.held && l.kinetic && textual) && !itemsArrive) {
|
|
1521
1565
|
const enter = enterInteraction(entering.id, l, ctx, lc.path, textual, 1, lc.si === 0);
|
|
1522
1566
|
if (enter) entering.interactions = [...entering.interactions, enter];
|
|
1523
|
-
if (image && l.enter === LayoutEnter.ClipReveal && l.role !== LayoutRole.Decoration) image.interactions = [...image.interactions, zoomInteraction(image.id, l, ctx)];
|
|
1567
|
+
if (image && !image.sceneTracks?.length && l.enter === LayoutEnter.ClipReveal && l.role !== LayoutRole.Decoration) image.interactions = [...image.interactions, zoomInteraction(image.id, l, ctx)];
|
|
1524
1568
|
}
|
|
1525
1569
|
const depth = layoutGlideDepth(lc.section, l);
|
|
1526
1570
|
if (depth) {
|
|
@@ -1583,6 +1627,7 @@ function composeSection(s: LayoutSection, si: number, prevGround: string | null,
|
|
|
1583
1627
|
const track = Math.max(1, s.track ?? 1);
|
|
1584
1628
|
const ground = String(s.ground ?? LayoutColour.Ground);
|
|
1585
1629
|
ctx.sections[s.id] = id;
|
|
1630
|
+
if (isDrawers(s)) return composeDrawers(s, si, ctx);
|
|
1586
1631
|
if (track > 1 && !held) gap(ctx, LayoutGapCode.UnheldMotion, `sections[${si}]`, 'a sideways section that is not held cannot travel');
|
|
1587
1632
|
|
|
1588
1633
|
const order = Array.isArray(s.phone) && s.phone.length ? s.phone : s.layers.map((_, i) => i);
|
|
@@ -1649,11 +1694,12 @@ function composeSection(s: LayoutSection, si: number, prevGround: string | null,
|
|
|
1649
1694
|
phone(root, { height: 'auto' });
|
|
1650
1695
|
const wide = create(`${id}-track`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
1651
1696
|
wide.label = `${s.id} · ${track} screens wide`;
|
|
1697
|
+
wide.role = SceneRole.Walk;
|
|
1652
1698
|
setStyleProps(wide, { ...gridLayout(s.rows, track), width: `${track * 100}%`, height: FULL, minHeight: ZERO });
|
|
1653
|
-
phone(wide,
|
|
1699
|
+
phone(wide, walkSwipe(si === 0));
|
|
1654
1700
|
wide.sceneTracks = [{ prop: 'x', keys: [[0, 0], [1, -(track - 1) * 100]] }];
|
|
1655
1701
|
wide.scenePhoneTracks = [{ prop: 'x', keys: [[0, 0]] }];
|
|
1656
|
-
wide.children = layers;
|
|
1702
|
+
wide.children = walkScreens(s, layers, track, id);
|
|
1657
1703
|
stage.children = [wide];
|
|
1658
1704
|
}
|
|
1659
1705
|
if (transition) {
|
|
@@ -1667,6 +1713,161 @@ function composeSection(s: LayoutSection, si: number, prevGround: string | null,
|
|
|
1667
1713
|
return root;
|
|
1668
1714
|
}
|
|
1669
1715
|
|
|
1716
|
+
// ── The sideways walk on a phone (AW9, RT-D4) ───────────────────────────────────────────────────────────
|
|
1717
|
+
|
|
1718
|
+
/** A walk card's share of the phone's width: the next one peeks, so the row says it swipes. */
|
|
1719
|
+
const WALK_CARD_SHARE = '85%';
|
|
1720
|
+
const WALK_CARD_GAP = '16px';
|
|
1721
|
+
|
|
1722
|
+
/** The wide row on a phone: a row the visitor swipes, one screen of the walk to a card (`phoneWalk.swipe`) — never a
|
|
1723
|
+
* stack, which turned a walk into a long plain column (award plan "Reddottours" S3: theirs swaps to a card carousel). The
|
|
1724
|
+
* snapping is shared CSS (`.iox-role-scene-walk`): a node has no style for it. */
|
|
1725
|
+
function walkSwipe(first: boolean): Record<string, string> {
|
|
1726
|
+
return {
|
|
1727
|
+
width: FULL,
|
|
1728
|
+
height: 'auto',
|
|
1729
|
+
display: 'flex',
|
|
1730
|
+
flexDirection: 'row',
|
|
1731
|
+
alignItems: 'stretch',
|
|
1732
|
+
overflow: 'auto',
|
|
1733
|
+
gap: WALK_CARD_GAP,
|
|
1734
|
+
padding: `${first ? PHONE_FIRST_TOP : LAYOUT_PHONE_PADDING} ${LAYOUT_INSET} ${LAYOUT_PHONE_PADDING} ${LAYOUT_INSET}`,
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
/** The screen of a walk a layer stands on (from its first column). */
|
|
1739
|
+
const walkScreenOf = (l: LayoutLayer, track: number): number => Math.max(0, Math.min(track - 1, Math.floor((l.col[0] - 1) / GRID_COLUMNS)));
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* A walk's layers, one holder per screen they stand on. On the wide layout a holder draws no box (`display: contents`), so
|
|
1743
|
+
* every layer keeps its place on the wide grid and its own crossing; on a phone it is a card of the swiped row, its
|
|
1744
|
+
* layers in the section's phone order. A screen with no layer gets no card.
|
|
1745
|
+
*/
|
|
1746
|
+
function walkScreens(s: LayoutSection, layers: SerializedNode[], track: number, id: string): SerializedNode[] {
|
|
1747
|
+
const by = new Map<number, SerializedNode[]>();
|
|
1748
|
+
s.layers.forEach((l, li) => {
|
|
1749
|
+
const at = walkScreenOf(l, track);
|
|
1750
|
+
by.set(at, [...(by.get(at) ?? []), layers[li]]);
|
|
1751
|
+
});
|
|
1752
|
+
return [...by.keys()].sort((a, b) => a - b).map(at => {
|
|
1753
|
+
const card = create(`${id}-w${at}`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
1754
|
+
card.role = SceneRole.WalkScreen;
|
|
1755
|
+
card.label = `${s.id} · screen ${at + 1}`;
|
|
1756
|
+
setStyleProps(card, { display: 'contents' });
|
|
1757
|
+
phone(card, { display: 'flex', flexDirection: 'column', flexGrow: '0', flexShrink: '0', flexBasis: WALK_CARD_SHARE, minWidth: ZERO, gap: ZERO });
|
|
1758
|
+
card.children = by.get(at) ?? [];
|
|
1759
|
+
return card;
|
|
1760
|
+
});
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
// ── Drawers (AW9) ───────────────────────────────────────────────────────────────────────────────────────
|
|
1764
|
+
|
|
1765
|
+
/** The longest heading a spine stands on end whole; a longer one is cut at a word with an ellipsis. */
|
|
1766
|
+
const SPINE_MAX_LETTERS = 40;
|
|
1767
|
+
const SPINE_PADDING = '24px';
|
|
1768
|
+
|
|
1769
|
+
/** A spine's words: the step's number and its heading, cut to what stands on the stage's height. */
|
|
1770
|
+
function spineWords(i: number, heading: string | undefined): string {
|
|
1771
|
+
const number = String(i + 1).padStart(2, '0');
|
|
1772
|
+
const words = (heading ?? '').replace(/\s+/g, ' ').trim();
|
|
1773
|
+
if (!words) return number;
|
|
1774
|
+
if (words.length <= SPINE_MAX_LETTERS) return `${number} · ${words}`;
|
|
1775
|
+
const cut = words.slice(0, SPINE_MAX_LETTERS);
|
|
1776
|
+
const at = cut.lastIndexOf(' ');
|
|
1777
|
+
return `${number} · ${(at > SPINE_MAX_LETTERS / 2 ? cut.slice(0, at) : cut).trim()}…`;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/** A drawer's ground: its scheme's section fill — the page's own ground on Default, whose section fill is transparent and
|
|
1781
|
+
* would show the step under it. */
|
|
1782
|
+
const drawerPaint = (scheme: ColorScheme): string => scheme === ColorScheme.Default ? 'var(--iox-bg)' : 'var(--iox-section-bg)';
|
|
1783
|
+
|
|
1784
|
+
/**
|
|
1785
|
+
* AW9 `drawers` (award plan "Reddottours" S4): a held section whose steps slide in from the inline end, one after another,
|
|
1786
|
+
* straight with the scroll (RT-D1), each stopping one spine after the step before — the stack builds a row of titled
|
|
1787
|
+
* spines — while their grounds deepen through the look's schemes to the brand (`drawerRamp`, AA-gated as schemes are).
|
|
1788
|
+
* A step is a panel on the stage: its spine (number and heading, decorative — the step's heading is read) and its body
|
|
1789
|
+
* (the step's layers on the section's grid, still). On a phone it stacks, each spine a label above its step. A step's
|
|
1790
|
+
* words arriving as it lands is AW10 (an entrance at a key): the layout's entrances on them are dropped and said.
|
|
1791
|
+
*/
|
|
1792
|
+
function composeDrawers(s: LayoutSection, si: number, ctx: Ctx): SerializedNode {
|
|
1793
|
+
const id = `${ctx.p}-s${si}`;
|
|
1794
|
+
const steps = drawerSteps(s.layers);
|
|
1795
|
+
const n = steps.length;
|
|
1796
|
+
const timing = drawersTiming(n);
|
|
1797
|
+
// Outside 3–5 `checkLayout` refuses it; a stored layout is composed as is, the ramp's deepest schemes last.
|
|
1798
|
+
const ramp = drawerRamp(Math.max(3, Math.min(5, n))) ?? [ColorScheme.Accent];
|
|
1799
|
+
const schemeOf = (i: number): ColorScheme => ramp[Math.max(0, Math.min(ramp.length - 1, ramp.length - n + i))];
|
|
1800
|
+
const side = ctx.rtl ? 'right' : 'left';
|
|
1801
|
+
|
|
1802
|
+
const root = create(id, T.Section, {}, NO_ELEMENT_STYLE);
|
|
1803
|
+
root.role = SceneRole.Scene;
|
|
1804
|
+
root.label = `${s.id} · drawers`;
|
|
1805
|
+
setStyleProps(root, {
|
|
1806
|
+
position: 'relative', width: FULL, minHeight: ZERO, height: `${timing.screens * 100}svh`, display: 'block', padding: ZERO, margin: ZERO,
|
|
1807
|
+
backgroundColor: groundPaint(String(s.ground ?? LayoutColour.Ground)), color: 'var(--iox-text)', ...(ctx.rtl ? { textDirection: 'rtl' } : {}),
|
|
1808
|
+
});
|
|
1809
|
+
phone(root, { height: 'auto' });
|
|
1810
|
+
const stage = create(`${id}-stage`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
1811
|
+
stage.role = SceneRole.Stage;
|
|
1812
|
+
stage.label = `${s.id} · stage`;
|
|
1813
|
+
setStyleProps(stage, { position: 'sticky', top: ZERO, width: FULL, height: '100svh', minHeight: ZERO, overflow: 'hidden', zIndex: '1', display: 'block' });
|
|
1814
|
+
phone(stage, { display: 'contents' });
|
|
1815
|
+
|
|
1816
|
+
stage.children = steps.map((indices, i) => {
|
|
1817
|
+
const scheme = schemeOf(i);
|
|
1818
|
+
const panel = create(`${id}-d${i}`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
1819
|
+
panel.role = SceneRole.Drawer;
|
|
1820
|
+
panel.label = `${s.id} · step ${i + 1}`;
|
|
1821
|
+
setColorScheme(panel, scheme);
|
|
1822
|
+
setStyleProps(panel, {
|
|
1823
|
+
position: 'absolute', top: ZERO, [side]: ZERO, width: i ? `${drawerWidth(n)}%` : FULL, height: FULL, minHeight: ZERO,
|
|
1824
|
+
display: 'flex', flexDirection: 'row', backgroundColor: drawerPaint(scheme), color: 'var(--iox-text)', zIndex: String(i + 1), overflow: 'hidden',
|
|
1825
|
+
});
|
|
1826
|
+
phone(panel, { position: 'relative', top: 'auto', [side]: 'auto', width: FULL, height: 'auto', flexDirection: 'column' });
|
|
1827
|
+
const slide = timing.windows[i];
|
|
1828
|
+
if (slide) {
|
|
1829
|
+
// Waits off the stage at its inline end, slides in over its screen, rests a spine past the one before.
|
|
1830
|
+
panel.sceneTracks = [{ prop: SceneProp.X, keys: [[0, 100], [slide[0], 100], [slide[1], drawerRestX(i)]] }];
|
|
1831
|
+
panel.scenePhoneTracks = [{ prop: SceneProp.X, keys: [[0, 0]] }];
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
const spine = create(`${id}-d${i}-spine`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
1835
|
+
spine.role = SceneRole.DrawerSpine;
|
|
1836
|
+
setStyleProps(spine, {
|
|
1837
|
+
width: `${DRAWER_SPINE}cqw`, flexShrink: '0', height: FULL, minHeight: ZERO, display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
1838
|
+
padding: `${SPINE_PADDING} ${ZERO}`, overflow: 'hidden',
|
|
1839
|
+
});
|
|
1840
|
+
phone(spine, {
|
|
1841
|
+
width: FULL, height: 'auto', justifyContent: 'flex-start',
|
|
1842
|
+
padding: `${i === 0 && si === 0 ? PHONE_FIRST_TOP : LAYOUT_PHONE_PADDING} ${LAYOUT_INSET} ${ZERO} ${LAYOUT_INSET}`,
|
|
1843
|
+
});
|
|
1844
|
+
const head = s.layers[indices[0]];
|
|
1845
|
+
const title = create(`${id}-d${i}-spine-t`, T.Text, { content: spineWords(i, head?.kind === LayoutLayerKind.Heading ? head.text : undefined), tag: 'span' }, 'eyebrow');
|
|
1846
|
+
setStyleProps(title, { color: 'inherit', margin: ZERO });
|
|
1847
|
+
spine.children = [title];
|
|
1848
|
+
|
|
1849
|
+
const body = create(`${id}-d${i}-body`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
1850
|
+
setStyleProps(body, { position: 'relative', flexGrow: '1', minWidth: ZERO, height: FULL, minHeight: ZERO, ...gridLayout(s.rows, 1) });
|
|
1851
|
+
phone(body, { ...phoneStack(false), padding: `${SPINE_PADDING} ${LAYOUT_INSET} ${LAYOUT_PHONE_PADDING} ${LAYOUT_INSET}` });
|
|
1852
|
+
const phoneAlign = indices.every(li => s.layers[li].align === 'center') ? 'center' : 'start';
|
|
1853
|
+
body.children = indices.map((li, at) => {
|
|
1854
|
+
const l = s.layers[li];
|
|
1855
|
+
if (l.enter && l.enter !== LayoutEnter.None) gap(ctx, LayoutGapCode.DrawerWords, `sections[${si}].layers[${li}]`, 'stands still as its step slides in (arriving on landing is AW10)');
|
|
1856
|
+
const still: LayoutLayer = { ...l, enter: LayoutEnter.None, motion: undefined, kinetic: undefined, depth: undefined, scrub: undefined };
|
|
1857
|
+
const prev = at > 0 ? s.layers[indices[at - 1]] : null;
|
|
1858
|
+
const lc: LayerCtx = {
|
|
1859
|
+
section: s, si, li, path: `sections[${si}].layers[${li}]`, held: true, track: 1,
|
|
1860
|
+
order: at, phoneGap: phoneGapBefore(prev, l), phoneAlign,
|
|
1861
|
+
};
|
|
1862
|
+
return composeLayer(still, lc, ctx);
|
|
1863
|
+
});
|
|
1864
|
+
panel.children = [spine, body];
|
|
1865
|
+
return panel;
|
|
1866
|
+
});
|
|
1867
|
+
root.children = [stage];
|
|
1868
|
+
return root;
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1670
1871
|
// ── The header ──────────────────────────────────────────────────────────────────────────────────────────
|
|
1671
1872
|
|
|
1672
1873
|
const NAV_ROUTE = '/';
|
|
@@ -1501,6 +1501,8 @@ const cloneTrack = (track: PatternTrack): Record<string, unknown> => ({
|
|
|
1501
1501
|
prop: track.prop,
|
|
1502
1502
|
keys: track.keys.map(([at, value]) => [at, value]),
|
|
1503
1503
|
...(track.from ? { from: track.from } : {}),
|
|
1504
|
+
...(track.ease ? { ease: track.ease } : {}),
|
|
1505
|
+
...(track.range ? { range: track.range } : {}),
|
|
1504
1506
|
});
|
|
1505
1507
|
|
|
1506
1508
|
interface SectionMotion {
|