@vectoriox/iox-builder 4.28.1 → 4.29.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.
|
@@ -10080,6 +10080,111 @@ function buildConsentPreset(createConfig) {
|
|
|
10080
10080
|
return { banner, preferences, withdrawal };
|
|
10081
10081
|
}
|
|
10082
10082
|
|
|
10083
|
+
/**
|
|
10084
|
+
* THE FLAVOR SAMPLER (flavors plan §7, F2) — the fixed tree the picker renders through the REAL
|
|
10085
|
+
* builder pipeline with candidate tokens applied. Never a screenshot, never a second renderer:
|
|
10086
|
+
* `render-parity.md` is the record of what a convenience renderer costs.
|
|
10087
|
+
*
|
|
10088
|
+
* Every colour in it is a token REFERENCE with a Swiss-neutral fallback — so before a brand is
|
|
10089
|
+
* chosen the sampler is the monochrome study the F1 board shows, and the moment candidate tokens
|
|
10090
|
+
* are upserted it recolours live (the F2 board), proving the exact mechanism a later re-theme
|
|
10091
|
+
* uses on a built site: nothing moves, only tokens change.
|
|
10092
|
+
*/
|
|
10093
|
+
const BRAND = (step, fallback) => `var(--iox-brand-${step}, ${fallback})`;
|
|
10094
|
+
const TOKEN = (name, fallback) => `var(--iox-${name}, ${fallback})`;
|
|
10095
|
+
function styled(node, styles) {
|
|
10096
|
+
if (!node)
|
|
10097
|
+
return null;
|
|
10098
|
+
for (const [prop, value] of Object.entries(styles))
|
|
10099
|
+
setStyleTrait(node, prop, value);
|
|
10100
|
+
return node;
|
|
10101
|
+
}
|
|
10102
|
+
function text(content, styles, createConfig) {
|
|
10103
|
+
return styled(textNode(content, createConfig), styles);
|
|
10104
|
+
}
|
|
10105
|
+
function sampleCard(title, meta, createConfig) {
|
|
10106
|
+
const card = createConfig('Card');
|
|
10107
|
+
if (!card)
|
|
10108
|
+
return null;
|
|
10109
|
+
styled(card, {
|
|
10110
|
+
backgroundColor: TOKEN('surface', '#ffffff'),
|
|
10111
|
+
borderWidth: '1px', borderStyle: 'solid', borderColor: TOKEN('line', '#949494'),
|
|
10112
|
+
padding: '10px', display: 'flex', flexDirection: 'column', gap: '8px', width: '150px',
|
|
10113
|
+
});
|
|
10114
|
+
const media = styled(createConfig('Container'), {
|
|
10115
|
+
height: '48px', width: '100%', backgroundColor: BRAND(50, '#ebe8e5'),
|
|
10116
|
+
});
|
|
10117
|
+
const name = text(title, { fontSize: '12px', fontWeight: '600', color: TOKEN('ink', '#1f1d1b') }, createConfig);
|
|
10118
|
+
const sub = text(meta, { fontSize: '11px', color: TOKEN('inkMuted', '#6b6560') }, createConfig);
|
|
10119
|
+
if (!media || !name || !sub)
|
|
10120
|
+
return null;
|
|
10121
|
+
card.children = [media, name, sub];
|
|
10122
|
+
return card;
|
|
10123
|
+
}
|
|
10124
|
+
/**
|
|
10125
|
+
* Build the sampler tree (the F1/F2 boards' hero + two cards). Null when a type is missing —
|
|
10126
|
+
* a picker that previews half a sampler would be lying about the flavor.
|
|
10127
|
+
*/
|
|
10128
|
+
function buildFlavorSampler(createConfig) {
|
|
10129
|
+
const root = styled(createConfig('Container'), {
|
|
10130
|
+
display: 'flex', gap: '20px', alignItems: 'stretch', width: '100%',
|
|
10131
|
+
padding: '18px 22px', backgroundColor: TOKEN('surface', '#ffffff'),
|
|
10132
|
+
});
|
|
10133
|
+
if (!root)
|
|
10134
|
+
return null;
|
|
10135
|
+
root.label = 'Flavor sampler';
|
|
10136
|
+
const hero = styled(createConfig('Container'), {
|
|
10137
|
+
display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: '10px', flexGrow: '1',
|
|
10138
|
+
});
|
|
10139
|
+
// Rendered already-uppercase: textTransform is not in the style-trait vocabulary, and the
|
|
10140
|
+
// sampler only uses traits that LAND (asserted in the spec — setStyleTrait no-ops silently).
|
|
10141
|
+
const badge = text('STUDIO', {
|
|
10142
|
+
fontSize: '10px', letterSpacing: '0.14em',
|
|
10143
|
+
fontWeight: '600', color: BRAND(600, '#6b6560'),
|
|
10144
|
+
}, createConfig);
|
|
10145
|
+
const heading = text('Interiors, measured twice.', {
|
|
10146
|
+
fontSize: '30px', fontWeight: '600', lineHeight: '1.05', letterSpacing: '-0.02em',
|
|
10147
|
+
maxWidth: '320px', color: TOKEN('ink', '#1f1d1b'),
|
|
10148
|
+
}, createConfig);
|
|
10149
|
+
const button = (label, styles) => {
|
|
10150
|
+
const btn = createConfig('ButtonBlock');
|
|
10151
|
+
const inner = text(label, { fontSize: '12px', fontWeight: '600', color: 'inherit' }, createConfig);
|
|
10152
|
+
if (!btn || !inner)
|
|
10153
|
+
return null;
|
|
10154
|
+
setTrait(btn, 'tag', 'button');
|
|
10155
|
+
styled(btn, styles);
|
|
10156
|
+
btn.children = [inner];
|
|
10157
|
+
return btn;
|
|
10158
|
+
};
|
|
10159
|
+
const primary = button('Book a visit', {
|
|
10160
|
+
backgroundColor: BRAND(500, '#1f1d1b'), color: TOKEN('brandInk', '#ffffff'),
|
|
10161
|
+
});
|
|
10162
|
+
const secondary = button('Our work', {
|
|
10163
|
+
backgroundColor: 'transparent', color: TOKEN('ink', '#1f1d1b'),
|
|
10164
|
+
borderWidth: '1px', borderStyle: 'solid', borderColor: TOKEN('ink', '#1f1d1b'),
|
|
10165
|
+
});
|
|
10166
|
+
const buttonsRow = styled(createConfig('Container'), { display: 'flex', gap: '8px' });
|
|
10167
|
+
if (!badge || !heading || !primary || !secondary || !buttonsRow || !hero)
|
|
10168
|
+
return null;
|
|
10169
|
+
buttonsRow.children = [primary, secondary];
|
|
10170
|
+
hero.children = [badge, heading, buttonsRow];
|
|
10171
|
+
// The F1 board's hero/cards separator — a 1px Container, because the border-inline traits
|
|
10172
|
+
// do not exist in the vocabulary and a physical border side would break RTL anyway.
|
|
10173
|
+
const divider = styled(createConfig('Container'), {
|
|
10174
|
+
width: '1px', backgroundColor: TOKEN('line', '#e6e3e1'),
|
|
10175
|
+
});
|
|
10176
|
+
const cards = styled(createConfig('Container'), {
|
|
10177
|
+
display: 'grid', gridTemplateColumns: 'repeat(2, 150px)', gap: '12px', alignContent: 'center',
|
|
10178
|
+
});
|
|
10179
|
+
const cardA = sampleCard('Kitchen, Jaffa', '2025', createConfig);
|
|
10180
|
+
const cardB = sampleCard('Loft, Florentin', '2024', createConfig);
|
|
10181
|
+
if (!divider || !cards || !cardA || !cardB)
|
|
10182
|
+
return null;
|
|
10183
|
+
cards.children = [cardA, cardB];
|
|
10184
|
+
root.children = [hero, divider, cards];
|
|
10185
|
+
return root;
|
|
10186
|
+
}
|
|
10187
|
+
|
|
10083
10188
|
/**
|
|
10084
10189
|
* Dialog (actions plan A1b) — an ordinary container whose children are normal nodes, rendered
|
|
10085
10190
|
* on the live site as a real `<dialog>` (top layer, free focus trap/Esc) and in the CANVAS as a
|
|
@@ -10930,5 +11035,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
|
|
|
10930
11035
|
* Generated bundle index. Do not edit.
|
|
10931
11036
|
*/
|
|
10932
11037
|
|
|
10933
|
-
export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BODY_CRUMB_LABEL, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BUILDER_CHROME_EN, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDialogComponent, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEFAULT_ESSENTIAL_TRAITS, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DialogComponentConfig, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, FIELD_PARTS, FORM_PRESETS, FORM_TYPE, FieldComponentConfig, FieldGroupComponentConfig, FormComponentConfig, FormErrorComponentConfig, FormStateService, FormSuccessComponentConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_BUILDER_LABELS, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LAYOUT_PRESETS, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SubmitButtonComponentConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VALIDATION_STATES, VALIDATION_STATE_CLASS, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, buildConsentPreset, buildFormPreset, buildFullStyleTraits, buildLayoutPreset, buildPresetStyleTraits, canFluidise, collapseColumnsProps, columnCountOf, defaultBuilderLabels, defaultPageSettings, dropTargetLabel, essentialTraitsFor, findNodeLocation, findParentOf, flattenSchemaFields, fluidiseProps, generateNodeId, isHiddenAt, matchesControlSearch, nearestFormNode, nodeAncestorPath, nodeAncestorPathInEither, reorderProps, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, setStyleTrait, setTrait, stackChildrenProps, summarise, textNode, visibilityProps, wrapNode };
|
|
11038
|
+
export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BODY_CRUMB_LABEL, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BUILDER_CHROME_EN, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDialogComponent, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEFAULT_ESSENTIAL_TRAITS, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DialogComponentConfig, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, FIELD_PARTS, FORM_PRESETS, FORM_TYPE, FieldComponentConfig, FieldGroupComponentConfig, FormComponentConfig, FormErrorComponentConfig, FormStateService, FormSuccessComponentConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_BUILDER_LABELS, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LAYOUT_PRESETS, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SubmitButtonComponentConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VALIDATION_STATES, VALIDATION_STATE_CLASS, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, buildConsentPreset, buildFlavorSampler, buildFormPreset, buildFullStyleTraits, buildLayoutPreset, buildPresetStyleTraits, canFluidise, collapseColumnsProps, columnCountOf, defaultBuilderLabels, defaultPageSettings, dropTargetLabel, essentialTraitsFor, findNodeLocation, findParentOf, flattenSchemaFields, fluidiseProps, generateNodeId, isHiddenAt, matchesControlSearch, nearestFormNode, nodeAncestorPath, nodeAncestorPathInEither, reorderProps, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, setStyleTrait, setTrait, stackChildrenProps, summarise, textNode, visibilityProps, wrapNode };
|
|
10934
11039
|
//# sourceMappingURL=vectoriox-iox-builder.mjs.map
|