@vectoriox/iox-ui 5.47.0 → 5.48.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/design-core/index.d.ts +5 -3
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +7 -4
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +128 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +71 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +29 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +109 -3
- package/harness-core/index.d.ts +21 -2
- package/index.d.ts +22 -3
- package/package.json +1 -1
- package/src/design-core/design-apply.ts +8 -4
- package/src/generation-core/entrances.ts +110 -0
- package/src/generation-core/plan-data.ts +71 -0
- package/src/generation-core/public-api.ts +2 -0
- package/src/harness-core/intake.ts +85 -0
- package/src/harness-core/public-api.ts +1 -0
|
@@ -9705,6 +9705,133 @@ function composeSection(patternId, input, options) {
|
|
|
9705
9705
|
return { section, placeholders, issues };
|
|
9706
9706
|
}
|
|
9707
9707
|
|
|
9708
|
+
/**
|
|
9709
|
+
* How animated (AI plan rev 3.1 §3p) — the ONE reading of the contract's `axes.animations` (what each level
|
|
9710
|
+
* moves, how) and `axes.animationFamilies` (which parts a section family lets move). The pieces every stamper
|
|
9711
|
+
* shares: the Design step's business specimen (H4-4) today, `planEntrances` in the composer (M1-6b) next. Pure.
|
|
9712
|
+
*
|
|
9713
|
+
* A level with `content` moves a section's content together, once; otherwise it names parts (heading, items,
|
|
9714
|
+
* media…) and each part enters on its own, items one after another. Navigation, footers and globals are a family
|
|
9715
|
+
* with no parts, so nothing there ever moves.
|
|
9716
|
+
*/
|
|
9717
|
+
var EntrancePart;
|
|
9718
|
+
(function (EntrancePart) {
|
|
9719
|
+
EntrancePart["Content"] = "content";
|
|
9720
|
+
EntrancePart["Heading"] = "heading";
|
|
9721
|
+
EntrancePart["Items"] = "items";
|
|
9722
|
+
EntrancePart["Media"] = "media";
|
|
9723
|
+
EntrancePart["RowMedia"] = "rowMedia";
|
|
9724
|
+
EntrancePart["HeroText"] = "heroText";
|
|
9725
|
+
})(EntrancePart || (EntrancePart = {}));
|
|
9726
|
+
/** What an entrance stamp is marked with — a later restamp touches only what the look made (H4-5). */
|
|
9727
|
+
const ENTRANCE_ORIGIN_LOOK = 'look';
|
|
9728
|
+
/** The trigger every entrance plays on. */
|
|
9729
|
+
const ENTRANCE_TRIGGER = 'viewportEnter';
|
|
9730
|
+
/** The easing every entrance plays with (only `opacity` and `transform` move). */
|
|
9731
|
+
const ENTRANCE_EASING = 'ease-out';
|
|
9732
|
+
const LEVELS = SPEC_AXES.animations;
|
|
9733
|
+
const FAMILIES = SPEC_AXES.animationFamilies;
|
|
9734
|
+
const NOTHING = { content: null, parts: {} };
|
|
9735
|
+
/** What a section of `family` moves at `level` — nothing for an unknown level or family. */
|
|
9736
|
+
function sectionEntrances(level, family) {
|
|
9737
|
+
const lv = level ? LEVELS[level] : undefined;
|
|
9738
|
+
const allow = FAMILIES[family] ?? [];
|
|
9739
|
+
if (!lv || !allow.length)
|
|
9740
|
+
return NOTHING;
|
|
9741
|
+
if (lv.parts.content && allow.includes(EntrancePart.Content))
|
|
9742
|
+
return { content: lv.parts.content, parts: {} };
|
|
9743
|
+
const parts = {};
|
|
9744
|
+
for (const part of allow) {
|
|
9745
|
+
if (part === EntrancePart.Content)
|
|
9746
|
+
continue;
|
|
9747
|
+
// A level without its own side-by-side entrance gives a row's picture the plain picture one.
|
|
9748
|
+
const spec = lv.parts[part] ?? (part === EntrancePart.RowMedia ? lv.parts.media : undefined);
|
|
9749
|
+
if (spec)
|
|
9750
|
+
parts[part] = spec;
|
|
9751
|
+
}
|
|
9752
|
+
return { content: null, parts };
|
|
9753
|
+
}
|
|
9754
|
+
/** The literal delay of the `index`-th item: `stagger` ms each, the last `cap` waiting no longer than the one before. */
|
|
9755
|
+
function staggerDelay(spec, index = 0) {
|
|
9756
|
+
if (!spec.stagger)
|
|
9757
|
+
return 0;
|
|
9758
|
+
const cap = Math.max(1, spec.cap ?? 1);
|
|
9759
|
+
return Math.min(Math.max(0, index), cap - 1) * spec.stagger;
|
|
9760
|
+
}
|
|
9761
|
+
/** The action a node plays: the spec's type (mirrored on a right-to-left page), its distance and its delay. */
|
|
9762
|
+
function entranceAction(spec, opts = {}) {
|
|
9763
|
+
return {
|
|
9764
|
+
type: opts.rtl && spec.mirror ? spec.mirror : spec.type,
|
|
9765
|
+
target: 'self',
|
|
9766
|
+
duration: spec.duration,
|
|
9767
|
+
delay: staggerDelay(spec, opts.index),
|
|
9768
|
+
easing: ENTRANCE_EASING,
|
|
9769
|
+
once: true,
|
|
9770
|
+
...(spec.distance ? { params: { distance: spec.distance } } : {}),
|
|
9771
|
+
};
|
|
9772
|
+
}
|
|
9773
|
+
/** The stamp on a node: `viewportEnter`, once, on itself (a duplicated node needs no remap), from the look. */
|
|
9774
|
+
function entranceInteraction(nodeId, action) {
|
|
9775
|
+
return { id: `${nodeId}-enter`, trigger: ENTRANCE_TRIGGER, actions: [action], origin: ENTRANCE_ORIGIN_LOOK };
|
|
9776
|
+
}
|
|
9777
|
+
|
|
9778
|
+
/**
|
|
9779
|
+
* What each page of a plan shows and where its data comes from (AI plan rev 3 §3d, `describePlanData`) — the
|
|
9780
|
+
* Plan step's data lines, in the vocabulary the builder already uses. Pure and STRUCTURED: the screen words
|
|
9781
|
+
* each kind in its own language ("Lists every Project", "One Project, found by its address /work/:slug").
|
|
9782
|
+
*/
|
|
9783
|
+
var PageDataKind;
|
|
9784
|
+
(function (PageDataKind) {
|
|
9785
|
+
/** A section repeats every item of a content type. */
|
|
9786
|
+
PageDataKind["List"] = "list";
|
|
9787
|
+
/** A section repeats the newest `count` items. */
|
|
9788
|
+
PageDataKind["Latest"] = "latest";
|
|
9789
|
+
/** A template page: one item, found by its address — one page per item. */
|
|
9790
|
+
PageDataKind["One"] = "one";
|
|
9791
|
+
/** The next (or previous) item beside the page's own. */
|
|
9792
|
+
PageDataKind["Siblings"] = "siblings";
|
|
9793
|
+
/** A form: what it sends, to the studio's inbox (+ an email when Email is connected). */
|
|
9794
|
+
PageDataKind["Form"] = "form";
|
|
9795
|
+
/** Words and pictures, no data. */
|
|
9796
|
+
PageDataKind["Static"] = "static";
|
|
9797
|
+
})(PageDataKind || (PageDataKind = {}));
|
|
9798
|
+
const sameLine = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
9799
|
+
function sourceLine(source, label) {
|
|
9800
|
+
if (!source || source.type !== PlanDataSourceType.Cms)
|
|
9801
|
+
return null;
|
|
9802
|
+
const cms = source;
|
|
9803
|
+
if (cms.mode !== PlanDataSourceMode.Query)
|
|
9804
|
+
return null;
|
|
9805
|
+
return cms.limit
|
|
9806
|
+
? { kind: PageDataKind.Latest, contentType: label(cms.contentType), count: cms.limit }
|
|
9807
|
+
: { kind: PageDataKind.List, contentType: label(cms.contentType) };
|
|
9808
|
+
}
|
|
9809
|
+
function pageLines(page, plan, label) {
|
|
9810
|
+
const lines = [];
|
|
9811
|
+
const add = (line) => { if (line && !lines.some(l => sameLine(l, line)))
|
|
9812
|
+
lines.push(line); };
|
|
9813
|
+
if (page.template)
|
|
9814
|
+
add({ kind: PageDataKind.One, contentType: label(page.template), route: page.route });
|
|
9815
|
+
for (const section of page.sections) {
|
|
9816
|
+
const pattern = patternById(section.pattern);
|
|
9817
|
+
if (!pattern)
|
|
9818
|
+
continue;
|
|
9819
|
+
if (section.binding)
|
|
9820
|
+
add(sourceLine(plan.dataSources.find(d => d.alias === section.binding), label));
|
|
9821
|
+
if (page.template && patternScopes(pattern).has(BindScope.Next))
|
|
9822
|
+
add({ kind: PageDataKind.Siblings, contentType: label(page.template) });
|
|
9823
|
+
for (const node of patternNodes(pattern))
|
|
9824
|
+
if (node.preset)
|
|
9825
|
+
add({ kind: PageDataKind.Form, form: node.preset });
|
|
9826
|
+
}
|
|
9827
|
+
return lines.length ? lines : [{ kind: PageDataKind.Static }];
|
|
9828
|
+
}
|
|
9829
|
+
/** One entry per page of the plan, in plan order. */
|
|
9830
|
+
function describePlanData(plan) {
|
|
9831
|
+
const label = (name) => plan.contentTypes.find(t => t.name === name)?.label ?? name;
|
|
9832
|
+
return plan.pages.map(page => ({ pageKey: page.key, lines: pageLines(page, plan, label) }));
|
|
9833
|
+
}
|
|
9834
|
+
|
|
9708
9835
|
/**
|
|
9709
9836
|
* @vectoriox/iox-ui/generation-core — the shared, FRAMEWORK-FREE site-plan core (design-system plan
|
|
9710
9837
|
* §6b, W1): the Site Plan shape + its validator, the pattern library and the Studio template (both
|
|
@@ -9721,5 +9848,5 @@ function composeSection(patternId, input, options) {
|
|
|
9721
9848
|
* Generated bundle index. Do not edit.
|
|
9722
9849
|
*/
|
|
9723
9850
|
|
|
9724
|
-
export { BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BaselineRole, BindScope, CardBindTarget, ComposeError, ComposeIssueCode, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, FACT_KEYS, GlobalSlot, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavPagesSource, NavRole, NavShape, NavShapeError, PRICING_PATTERN, PUBLISH_BLOCKING_PLACEHOLDERS, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_LIBRARY, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, blocksPublish, composeNavHeader, composeSection, composeSite, createSerializedNode, findNavRoot, isNonEmptyString, isPlainObject, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, pathAt, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, patternTakesBinding, phoneMenuPages, planFromTemplate, planNavShape, releasedLayoutDefaults, removeBarItem, requiredShapeKeys, routeParams, sampleImageRef, setStyleProps, shapeKeys, siteNavPages, validateSitePlan, walkSerialized };
|
|
9851
|
+
export { BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BaselineRole, BindScope, CardBindTarget, ComposeError, ComposeIssueCode, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, FACT_KEYS, GlobalSlot, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavPagesSource, NavRole, NavShape, NavShapeError, PRICING_PATTERN, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_LIBRARY, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, blocksPublish, composeNavHeader, composeSection, composeSite, createSerializedNode, describePlanData, entranceAction, entranceInteraction, findNavRoot, isNonEmptyString, isPlainObject, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, pathAt, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, patternTakesBinding, phoneMenuPages, planFromTemplate, planNavShape, releasedLayoutDefaults, removeBarItem, requiredShapeKeys, routeParams, sampleImageRef, sectionEntrances, setStyleProps, shapeKeys, siteNavPages, staggerDelay, validateSitePlan, walkSerialized };
|
|
9725
9852
|
//# sourceMappingURL=vectoriox-iox-ui-generation-core.mjs.map
|