@vectoriox/iox-ui 5.32.1 → 5.34.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 +4 -1
- package/design-core/index.d.ts +59 -5
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +9 -8
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +740 -604
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +25 -51
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +42 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +16 -1
- package/package.json +1 -1
- package/src/composite-core/badge.ts +4 -3
- package/src/composite-core/card.ts +4 -4
- package/src/design-core/contrast-audit.ts +50 -1
- package/src/design-core/flavor-spec.generated.ts +20 -0
- package/src/design-core/node-classes.ts +49 -1
- package/src/design-core/token-css.ts +39 -11
- package/src/generation-core/node-baselines.generated.ts +25 -51
|
@@ -96,6 +96,9 @@ declare function isPillNode(node: {
|
|
|
96
96
|
* tone's look is kept, design-core's switch rule). Nothing else changes — not the icon, not the words.
|
|
97
97
|
*/
|
|
98
98
|
declare function setBadgeTone(node: CompositeNode, tone: BadgeTone, baseline?: Readonly<Record<string, unknown>>): boolean;
|
|
99
|
+
/** The pill's words wear the pill's OWN label style (Card v2.1): its type from the badge tokens, its leading,
|
|
100
|
+
* tracking, case and ink inherited from the pill — never the button's label style. */
|
|
101
|
+
declare const PILL_LABEL_STYLE = "badge-label";
|
|
99
102
|
interface PillOptions {
|
|
100
103
|
text?: string;
|
|
101
104
|
icon?: string;
|
|
@@ -266,5 +269,5 @@ declare function structureRefusal(node: RoleLike | null | undefined, edit: Struc
|
|
|
266
269
|
* composite is always allowed — only its locked parts are refused. */
|
|
267
270
|
declare function isLockedPart(node: RoleLike | null | undefined): boolean;
|
|
268
271
|
|
|
269
|
-
export { BADGE_TONES, BADGE_TONE_ICONS, BadgeTone, CARD_LAYOUTS, CARD_LAYOUT_CUSTOM, CARD_PARTS, CARD_PART_ROLE, CARD_STACK_BREAKPOINT, CARD_WORDS, CHIP_ICON, CHIP_STYLE, COMPOSITE_ROLE_SPECS, CardLayout, CardPart, CardRole, StructureEdit, StructureRefusal, applyCardLayout, badgeStyleId, badgeToneOf, buildBadge, buildCardRecipe, buildChip, cardPartsOf, cardRootOf, cardTitleOf, clearLayerStyles, detectCardLayout, findByRole, isCardLinked, isCardRoot, isLockedPart, isPillNode, parentInComposite, readLayerStyle, readProp, readStyle, removeFromComposite, setBadgeTone, setCardLinked, setCardPart, structureRefusal, walkComposite, writeLayerStyles, writeProp, writeStyles };
|
|
272
|
+
export { BADGE_TONES, BADGE_TONE_ICONS, BadgeTone, CARD_LAYOUTS, CARD_LAYOUT_CUSTOM, CARD_PARTS, CARD_PART_ROLE, CARD_STACK_BREAKPOINT, CARD_WORDS, CHIP_ICON, CHIP_STYLE, COMPOSITE_ROLE_SPECS, CardLayout, CardPart, CardRole, PILL_LABEL_STYLE, StructureEdit, StructureRefusal, applyCardLayout, badgeStyleId, badgeToneOf, buildBadge, buildCardRecipe, buildChip, cardPartsOf, cardRootOf, cardTitleOf, clearLayerStyles, detectCardLayout, findByRole, isCardLinked, isCardRoot, isLockedPart, isPillNode, parentInComposite, readLayerStyle, readProp, readStyle, removeFromComposite, setBadgeTone, setCardLinked, setCardPart, structureRefusal, walkComposite, writeLayerStyles, writeProp, writeStyles };
|
|
270
273
|
export type { BaselineStyles, CardEditOptions, CardLayoutResult, CardLayoutState, CardOptions, CardPartChange, CardWords, CompositeLayer, CompositeNode, CompositeNodeFactory, CompositeNodeSpec, CompositeRoleSpec, CompositeTrait, PillOptions };
|
package/design-core/index.d.ts
CHANGED
|
@@ -1122,6 +1122,7 @@ declare const SPEC_SCHEMES: {
|
|
|
1122
1122
|
readonly set: {
|
|
1123
1123
|
readonly "section-bg": "{{accent}}";
|
|
1124
1124
|
readonly bg: "{{accent}}";
|
|
1125
|
+
readonly "nav-bg": "{{accent}}";
|
|
1125
1126
|
readonly surface: "{{accent-hover}}";
|
|
1126
1127
|
readonly "surface-2": "{{accent-hover}}";
|
|
1127
1128
|
readonly "surface-glass": "{{accent-hover}}";
|
|
@@ -1144,6 +1145,7 @@ declare const SPEC_SCHEMES: {
|
|
|
1144
1145
|
};
|
|
1145
1146
|
};
|
|
1146
1147
|
};
|
|
1148
|
+
declare const SPEC_SCHEME_INK: "var(--iox-text)";
|
|
1147
1149
|
declare const SPEC_A11Y: {
|
|
1148
1150
|
readonly reducedMotion: {
|
|
1149
1151
|
readonly "dur-fast": "0ms";
|
|
@@ -1671,6 +1673,20 @@ declare const SPEC_ELEMENT_STYLES: readonly [{
|
|
|
1671
1673
|
readonly fontSize: "var(--iox-badge-size)";
|
|
1672
1674
|
readonly fontWeight: "var(--iox-weight-label)";
|
|
1673
1675
|
};
|
|
1676
|
+
}, {
|
|
1677
|
+
readonly id: "badge-label";
|
|
1678
|
+
readonly label: "Badge label";
|
|
1679
|
+
readonly group: "Content blocks";
|
|
1680
|
+
readonly appliesTo: readonly ["Text"];
|
|
1681
|
+
readonly base: {
|
|
1682
|
+
readonly fontFamily: "var(--iox-font-label)";
|
|
1683
|
+
readonly fontSize: "var(--iox-badge-size)";
|
|
1684
|
+
readonly fontWeight: "var(--iox-weight-label)";
|
|
1685
|
+
readonly lineHeight: "inherit";
|
|
1686
|
+
readonly letterSpacing: "inherit";
|
|
1687
|
+
readonly textTransform: "inherit";
|
|
1688
|
+
readonly color: "inherit";
|
|
1689
|
+
};
|
|
1674
1690
|
}, {
|
|
1675
1691
|
readonly id: "media-scrim";
|
|
1676
1692
|
readonly label: "Text over image";
|
|
@@ -10540,7 +10556,8 @@ declare function styleKeyToKebab(key: string): string;
|
|
|
10540
10556
|
*
|
|
10541
10557
|
* Block order (design-system plan §3e, T8):
|
|
10542
10558
|
* 1. base `:root { --iox-*: … }`
|
|
10543
|
-
* 2. schemes `.iox-scheme-<id> { overrides; every var()-referencing token re-declared }
|
|
10559
|
+
* 2. schemes `.iox-scheme-<id> { overrides; every var()-referencing token re-declared }`, then the
|
|
10560
|
+
* ONE scheme-ink rule `.iox-scheme-subtle, … { color: var(--iox-text) }` (iox-ui#15)
|
|
10544
10561
|
* 3. reduced motion `@media (prefers-reduced-motion: reduce)`
|
|
10545
10562
|
* 4. reduced transparency `@media (prefers-reduced-transparency: reduce)`
|
|
10546
10563
|
* 5. dark — LAST `@media (prefers-color-scheme: dark)`
|
|
@@ -10602,9 +10619,11 @@ declare function resolveTokenValues(tokens: ReadonlyArray<DesignTokenLike> | nul
|
|
|
10602
10619
|
* Every token's value INSIDE a section wearing `schemeId`, in one mode — what CSS computes there: the
|
|
10603
10620
|
* scheme's overrides (`{{token}}` / `{{~token}}` placeholders substituted from the root), every other
|
|
10604
10621
|
* row as declared, and `var()` references resolved within the section (the §3c re-declaration rule
|
|
10605
|
-
* makes that the section's own resolution). `default` (or an unknown id) is the root.
|
|
10622
|
+
* makes that the section's own resolution). `default` (or an unknown id) is the root. A CHAIN
|
|
10623
|
+
* (`['inverse', 'accent']`, outermost first) is an element wearing the last scheme inside elements wearing
|
|
10624
|
+
* the ones before it: a token the inner scheme does not set is the outer one's (custom properties inherit).
|
|
10606
10625
|
*/
|
|
10607
|
-
declare function resolveSchemeTokenValues(tokens: ReadonlyArray<DesignTokenLike> | null | undefined, mode: ResolvedMode, schemeId: string): Record<string, string>;
|
|
10626
|
+
declare function resolveSchemeTokenValues(tokens: ReadonlyArray<DesignTokenLike> | null | undefined, mode: ResolvedMode, schemeId: string | ReadonlyArray<string>): Record<string, string>;
|
|
10608
10627
|
/**
|
|
10609
10628
|
* `value` with every `var(--iox-…)` replaced by that token's resolved root value in `mode` — what
|
|
10610
10629
|
* the Style panel's Detach writes, so the node keeps exactly what it showed as a literal. An unknown
|
|
@@ -10990,6 +11009,36 @@ declare const BAR_RESERVE_BREAKPOINTS: ReadonlyArray<string>;
|
|
|
10990
11009
|
declare function barReserveClass(node: DesignClassSource | null | undefined): string | null;
|
|
10991
11010
|
/** A node's `colorScheme`, from `props` (serialized) or its trait (builder). */
|
|
10992
11011
|
declare function colorSchemeOf(node: DesignClassSource | null | undefined): string | null;
|
|
11012
|
+
/**
|
|
11013
|
+
* The ink a section colour scheme gives everything inside it (vectoriox/iox-ui#15). A scheme re-declares
|
|
11014
|
+
* tokens only, so without this a Container wearing one kept the colour it INHERITED from the section around
|
|
11015
|
+
* it: a Featured (Brand) card's body text stayed the page's dark ink on the Brand fill, 2.54:1. Two halves,
|
|
11016
|
+
* one rule: `compileSchemeCss` gives every `iox-scheme-*` element `color: var(--iox-text)` (the node rule,
|
|
11017
|
+
* emitted after it at the same specificity, still wins), and {@link withSchemeInk} reads a scheme'd node's
|
|
11018
|
+
* own `inherit` — what the card / box / panel element styles write for "no colour of my own" — as this ink.
|
|
11019
|
+
* The value is the contract's `schemeInk`.
|
|
11020
|
+
*/
|
|
11021
|
+
declare const SCHEME_INK: string;
|
|
11022
|
+
/**
|
|
11023
|
+
* A node's style map as its renderer compiles it under a section colour scheme: a NON-default scheme turns
|
|
11024
|
+
* an inherited `color` into {@link SCHEME_INK}; anything else — no scheme, an author's own colour, a token —
|
|
11025
|
+
* is returned untouched (the same object). Every render path calls it on every rule it compiles for the
|
|
11026
|
+
* node (base, states, breakpoint layers): the builder's StyleRegistryService and both engine paths.
|
|
11027
|
+
*/
|
|
11028
|
+
declare function withSchemeInk<T extends Record<string, unknown>>(styles: T, scheme: unknown): T;
|
|
11029
|
+
/**
|
|
11030
|
+
* Write a node's section colour scheme — THE one writer, so every control that offers Section colours (the
|
|
11031
|
+
* Style panel's Element style block, Card ▸ Card) edits the same setting: the `colorScheme` content trait on
|
|
11032
|
+
* a builder node, `props.colorScheme` on a saved one. False when nothing changed: an unknown id, the value it
|
|
11033
|
+
* already holds, or a builder node with no such trait (a type that offers no scheme).
|
|
11034
|
+
*/
|
|
11035
|
+
declare function setColorScheme(node: {
|
|
11036
|
+
props?: Record<string, unknown> | null;
|
|
11037
|
+
traits?: Array<{
|
|
11038
|
+
name?: string;
|
|
11039
|
+
default?: unknown;
|
|
11040
|
+
}> | null;
|
|
11041
|
+
} | null | undefined, id: string): boolean;
|
|
10993
11042
|
/** True when the node wears a known element style — the marker is on it. */
|
|
10994
11043
|
declare function hasElementStyleMarker(node: {
|
|
10995
11044
|
elementStyle?: string | null;
|
|
@@ -11281,7 +11330,10 @@ declare function preTintAccentGrounds(palette: FlavorPalette): {
|
|
|
11281
11330
|
* its focus ring; the form parts the field baseline paints (`contrastAudit.formParts`); the form's
|
|
11282
11331
|
* Success / Error notices, in every scheme and container;
|
|
11283
11332
|
* - a Badge's or Chip's icon through the same `inkScopes`, and text over an image (Card v2's "Image behind
|
|
11284
|
-
* text"): the block's ink over its scrim composited on the WORST-CASE image (`contrastAudit.scrims`)
|
|
11333
|
+
* text"): the block's ink over its scrim composited on the WORST-CASE image (`contrastAudit.scrims`);
|
|
11334
|
+
* - a container that WEARS a scheme inside a section of any scheme (a Featured card on a plain page): the
|
|
11335
|
+
* text it holds inherits the scheme's ink (`SCHEME_INK`, iox-ui#15) on the inner scheme's fill, composited
|
|
11336
|
+
* over the OUTER section — the pairing the token pairs cannot see.
|
|
11285
11337
|
*
|
|
11286
11338
|
* WCAG 2: 4.5:1 for text, 3:1 for glyphs, UI boundaries and focus indicators (1.4.11), judged on 8-bit
|
|
11287
11339
|
* colours. The same audit gates the contract (`colour.mjs auditContrast`, every flavor × tint × a seed
|
|
@@ -11299,6 +11351,8 @@ interface ContrastFinding {
|
|
|
11299
11351
|
min: number;
|
|
11300
11352
|
pass: boolean;
|
|
11301
11353
|
}
|
|
11354
|
+
/** The element a scheme'd container's running text is reported as (iox-ui#15). */
|
|
11355
|
+
declare const INHERITED_TEXT = "inherited text";
|
|
11302
11356
|
/** Every pair a reader meets, for one set of token rows in one mode. */
|
|
11303
11357
|
declare function auditDesignContrast(rows: ReadonlyArray<DesignTokenLike>, mode: ResolvedMode): ContrastFinding[];
|
|
11304
11358
|
/** The pairs the Design ▸ Colour tab lists for the CURRENT brand (Board 6 + DS9): what a filled button
|
|
@@ -11845,5 +11899,5 @@ interface FontFamilyRemoval {
|
|
|
11845
11899
|
*/
|
|
11846
11900
|
declare function planFontFamilyRemoval(existing: ReadonlyArray<StoredDesignTokenRow>, previous: StoredDesign, family: string): FontFamilyRemoval;
|
|
11847
11901
|
|
|
11848
|
-
export { ACCENT_TOKEN_NAMES, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HELD_CONTRAST, LinkType, MAX_FONT_FILE_BYTES, NEW_NODE_STYLE_DEFAULTS, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_TINT_DEFAULT, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FONTS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SPRINGS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designBaseline, designConfigEntries, designModeOf, designTokenRepairs, designTokenRows, elementStyleById, elementStyleClass, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, ownedTraitStatus, ownedTraitsOf, packDesignChoices, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, resolveDesignChoices, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, styleKeyToKebab, switchElementStyle, syncNodeDesignClasses, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, writeOwnedTrait };
|
|
11902
|
+
export { ACCENT_TOKEN_NAMES, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HELD_CONTRAST, INHERITED_TEXT, LinkType, MAX_FONT_FILE_BYTES, NEW_NODE_STYLE_DEFAULTS, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_TINT_DEFAULT, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, SCHEME_INK, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FONTS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SPRINGS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designBaseline, designConfigEntries, designModeOf, designTokenRepairs, designTokenRows, elementStyleById, elementStyleClass, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, ownedTraitStatus, ownedTraitsOf, packDesignChoices, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, resolveDesignChoices, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, styleKeyToKebab, switchElementStyle, syncNodeDesignClasses, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, writeOwnedTrait };
|
|
11849
11903
|
export type { AccentBackgrounds, AccentGround, AccentTokenName, AdoptContext, AdoptReport, AdoptableNode, AdoptedNode, ApplyElementStyleResult, ButtonBlockLinkProps, ColourCheck, ColourFlavor, ContrastFinding, DensityId, DesignApplyOptions, DesignChoices, DesignClassSource, DesignConfigEntry, DesignMode, DesignTokenGroup, DesignTokenLike, DesignTokenRow, DesignTokenTier, DesignTokenType, ElementStyle, ElementStyleTarget, ElementStyleTraitLike, FlavorColours, FlavorPack, FlavorPackV2, FlavorPalette, FlavorRevertPlan, FlavorRevertSnapshot, FlavorRevertWrite, FlavorSeedOptions, FlavorSeedPlan, FlavorSpecToken, FlavorTintConfig, FlavorTokenDef, FontDescriptor, FontFamilyGroup, FontFamilyRemoval, FontFamilyToken, FontFormat, FontPair, FontRoleToken, FontStyle, FontWeight, FontWeightRange, FontsForTokensOptions, KeptEdit, LinearSpring, MissingFontRole, MotionId, NodeLinkProps, OkLab, OwnedTrait, OwnedTraitStatus, PalettePreset, ResolvedMode, Rgb, Rgba, SchemeId, SeedBaseline, SeedExpectation, ShapeId, SkippedNode, StoredDesign, StoredDesignTokenRow, SupersededStyleValue, SwissMigration, SwitchElementStyleResult, TintId, TintLevel, TokenCssBlocks, TokenCssOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readOwnedTrait, writeOwnedTrait, elementStyleById, switchElementStyle, LinkType } from '@vectoriox/iox-ui/design-core';
|
|
1
|
+
import { readOwnedTrait, writeOwnedTrait, elementStyleById, switchElementStyle, LinkType, setColorScheme, COLOR_SCHEME_TRAIT } from '@vectoriox/iox-ui/design-core';
|
|
2
2
|
|
|
3
3
|
const usesTraits = (node) => Array.isArray(node.traits);
|
|
4
4
|
/** A content trait's value — `traits[].default` on a builder node, `props[name]` on a saved one. */
|
|
@@ -162,14 +162,15 @@ const PILL_BASE = {
|
|
|
162
162
|
};
|
|
163
163
|
const PILL_ICON = { fontSize: '1em' };
|
|
164
164
|
const PILL_WORDS = { width: 'auto', minHeight: 'auto', padding: '0px 0px 0px 0px', margin: '0px 0px 0px 0px' };
|
|
165
|
-
/** The pill's words
|
|
166
|
-
|
|
165
|
+
/** The pill's words wear the pill's OWN label style (Card v2.1): its type from the badge tokens, its leading,
|
|
166
|
+
* tracking, case and ink inherited from the pill — never the button's label style. */
|
|
167
|
+
const PILL_LABEL_STYLE = 'badge-label';
|
|
167
168
|
function buildPill(create, elementStyle, text, icon, key) {
|
|
168
169
|
const pill = create({ key, type: 'Container', elementStyle });
|
|
169
170
|
writeStyles(pill, PILL_BASE);
|
|
170
171
|
const glyph = create({ key: `${key}-icon`, type: 'Icon', props: { iconClass: icon }, elementStyle: 'icon' });
|
|
171
172
|
writeStyles(glyph, PILL_ICON);
|
|
172
|
-
const words = create({ key: `${key}-text`, type: 'Text', props: { content: text, tag: 'span' }, elementStyle:
|
|
173
|
+
const words = create({ key: `${key}-text`, type: 'Text', props: { content: text, tag: 'span' }, elementStyle: PILL_LABEL_STYLE });
|
|
173
174
|
writeStyles(words, PILL_WORDS);
|
|
174
175
|
pill.children = [glyph, words];
|
|
175
176
|
return pill;
|
|
@@ -284,7 +285,6 @@ var Scheme;
|
|
|
284
285
|
Scheme["Default"] = "default";
|
|
285
286
|
Scheme["Inverse"] = "inverse";
|
|
286
287
|
})(Scheme || (Scheme = {}));
|
|
287
|
-
const COLOR_SCHEME = 'colorScheme';
|
|
288
288
|
const LINK_TYPE = 'linkType';
|
|
289
289
|
const SAVE_ICON = 'ph ph-bookmark-simple';
|
|
290
290
|
/** A value an element style writes — read from the contract, never retyped. */
|
|
@@ -459,8 +459,9 @@ function placeBadge(card, badge, onMedia) {
|
|
|
459
459
|
content.children = [badge, ...(content.children ?? [])];
|
|
460
460
|
writeStyles(badge, { position: overMedia ? 'absolute' : 'static' });
|
|
461
461
|
}
|
|
462
|
+
/** Through design-core's ONE scheme writer — the same setting Section colours edits everywhere. */
|
|
462
463
|
function writeScheme(node, scheme) {
|
|
463
|
-
|
|
464
|
+
setColorScheme(node, scheme);
|
|
464
465
|
}
|
|
465
466
|
/** Write one role's layout values from a spec (base + layers). */
|
|
466
467
|
function applyPartLayout(card, spec, part, baseline) {
|
|
@@ -545,7 +546,7 @@ function matches(card, spec) {
|
|
|
545
546
|
if (content) {
|
|
546
547
|
if (content.elementStyle !== spec.contentStyle || !holds(content, spec.content))
|
|
547
548
|
return false;
|
|
548
|
-
if (!same(readProp(content,
|
|
549
|
+
if (!same(readProp(content, COLOR_SCHEME_TRAIT) ?? Scheme.Default, spec.contentScheme))
|
|
549
550
|
return false;
|
|
550
551
|
}
|
|
551
552
|
const title = findByRole(card, CardRole.Title);
|
|
@@ -700,5 +701,5 @@ function isLockedPart(node) {
|
|
|
700
701
|
* Generated bundle index. Do not edit.
|
|
701
702
|
*/
|
|
702
703
|
|
|
703
|
-
export { BADGE_TONES, BADGE_TONE_ICONS, BadgeTone, CARD_LAYOUTS, CARD_LAYOUT_CUSTOM, CARD_PARTS, CARD_PART_ROLE, CARD_STACK_BREAKPOINT, CARD_WORDS, CHIP_ICON, CHIP_STYLE, COMPOSITE_ROLE_SPECS, CardLayout, CardPart, CardRole, StructureEdit, StructureRefusal, applyCardLayout, badgeStyleId, badgeToneOf, buildBadge, buildCardRecipe, buildChip, cardPartsOf, cardRootOf, cardTitleOf, clearLayerStyles, detectCardLayout, findByRole, isCardLinked, isCardRoot, isLockedPart, isPillNode, parentInComposite, readLayerStyle, readProp, readStyle, removeFromComposite, setBadgeTone, setCardLinked, setCardPart, structureRefusal, walkComposite, writeLayerStyles, writeProp, writeStyles };
|
|
704
|
+
export { BADGE_TONES, BADGE_TONE_ICONS, BadgeTone, CARD_LAYOUTS, CARD_LAYOUT_CUSTOM, CARD_PARTS, CARD_PART_ROLE, CARD_STACK_BREAKPOINT, CARD_WORDS, CHIP_ICON, CHIP_STYLE, COMPOSITE_ROLE_SPECS, CardLayout, CardPart, CardRole, PILL_LABEL_STYLE, StructureEdit, StructureRefusal, applyCardLayout, badgeStyleId, badgeToneOf, buildBadge, buildCardRecipe, buildChip, cardPartsOf, cardRootOf, cardTitleOf, clearLayerStyles, detectCardLayout, findByRole, isCardLinked, isCardRoot, isLockedPart, isPillNode, parentInComposite, readLayerStyle, readProp, readStyle, removeFromComposite, setBadgeTone, setCardLinked, setCardPart, structureRefusal, walkComposite, writeLayerStyles, writeProp, writeStyles };
|
|
704
705
|
//# sourceMappingURL=vectoriox-iox-ui-composite-core.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectoriox-iox-ui-composite-core.mjs","sources":["../../../projects/iox-ui/src/composite-core/composite-node.ts","../../../projects/iox-ui/src/composite-core/badge.ts","../../../projects/iox-ui/src/composite-core/card.ts","../../../projects/iox-ui/src/composite-core/structure.ts","../../../projects/iox-ui/src/composite-core/public-api.ts","../../../projects/iox-ui/src/composite-core/vectoriox-iox-ui-composite-core.ts"],"sourcesContent":["import { ElementStyleTarget, readOwnedTrait, writeOwnedTrait } from '@vectoriox/iox-ui/design-core';\n\n/**\n * The node shape composite-core reads and writes — both a builder `ComponentNode` (values in\n * `traits[].default` / `styleTraits`) and a saved layout node (flat `props` / `styleProps`), the same\n * dual shape design-core's element styles already speak. A composite is a tree of ORDINARY nodes\n * (composite-components plan §1): this module only adds the `role` each part carries.\n */\nexport interface CompositeTrait {\n name: string;\n default?: unknown;\n}\n\nexport interface CompositeLayer {\n styleProps?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface CompositeNode extends ElementStyleTarget {\n id?: string;\n /** The part this node plays in its composite (`card.title`). Additive; saved; read by the shared CSS\n * (`iox-role-<role>`), the structure guard and the composite's own editors. */\n role?: string;\n label?: string;\n props?: Record<string, unknown>;\n traits?: CompositeTrait[];\n responsive?: Partial<Record<string, CompositeLayer>>;\n children?: CompositeNode[];\n}\n\n/** What a recipe asks its consumer to create: a NEW node of `type`, the way that consumer creates one\n * (the builder's `createConfig`, generation-core's `createSerializedNode`), with these props and this\n * element style. `key` is stable per recipe node — a consumer that needs deterministic ids builds them\n * from it (generation-core: `<root id>-<key>`). */\nexport interface CompositeNodeSpec {\n key: string;\n type: string;\n props?: Readonly<Record<string, unknown>>;\n elementStyle?: string | null;\n}\n\nexport type CompositeNodeFactory = (spec: CompositeNodeSpec) => CompositeNode;\n\nconst usesTraits = (node: CompositeNode): boolean => Array.isArray(node.traits);\n\n/** A content trait's value — `traits[].default` on a builder node, `props[name]` on a saved one. */\nexport function readProp(node: CompositeNode, name: string): unknown {\n return usesTraits(node) ? node.traits!.find(t => t.name === name)?.default : node.props?.[name];\n}\n\n/** Write a content trait. False when a builder node has no such trait (the value would be dropped). */\nexport function writeProp(node: CompositeNode, name: string, value: unknown): boolean {\n if (usesTraits(node)) {\n const trait = node.traits!.find(t => t.name === name);\n if (!trait) return false;\n trait.default = value;\n return true;\n }\n node.props = { ...(node.props ?? {}), [name]: value };\n return true;\n}\n\n/** A base style value (the node's own, either shape). */\nexport function readStyle(node: CompositeNode, name: string): unknown {\n return readOwnedTrait(node, { trait: name });\n}\n\n/** Write base style values; returns the names the node has no slot for (a builder node drops them). */\nexport function writeStyles(node: CompositeNode, values: Readonly<Record<string, string>>): string[] {\n const missing: string[] = [];\n for (const [name, value] of Object.entries(values)) {\n if (!writeOwnedTrait(node, { trait: name }, value)) missing.push(name);\n }\n return missing;\n}\n\n/** Set style values in one breakpoint layer (`responsive[bp].styleProps`, the shape both renderers'\n * shared `planResponsiveRules` reads). */\nexport function writeLayerStyles(node: CompositeNode, breakpoint: string, values: Readonly<Record<string, string>>): void {\n const responsive = { ...(node.responsive ?? {}) };\n const layer: CompositeLayer = { ...(responsive[breakpoint] ?? {}) };\n layer.styleProps = { ...(layer.styleProps ?? {}), ...values };\n responsive[breakpoint] = layer;\n node.responsive = responsive;\n}\n\n/** Remove style keys from one breakpoint layer; an emptied layer (and an emptied map) is dropped. */\nexport function clearLayerStyles(node: CompositeNode, breakpoint: string, names: ReadonlyArray<string>): void {\n const layer = node.responsive?.[breakpoint];\n if (!layer?.styleProps) return;\n const styleProps = { ...layer.styleProps };\n for (const name of names) delete styleProps[name];\n const next: CompositeLayer = { ...layer };\n if (Object.keys(styleProps).length) next.styleProps = styleProps;\n else delete next.styleProps;\n const responsive = { ...(node.responsive ?? {}) };\n if (Object.keys(next).length) responsive[breakpoint] = next;\n else delete responsive[breakpoint];\n node.responsive = Object.keys(responsive).length ? responsive : undefined;\n}\n\n/** A breakpoint layer's own value for one style key. */\nexport function readLayerStyle(node: CompositeNode, breakpoint: string, name: string): unknown {\n return node.responsive?.[breakpoint]?.styleProps?.[name];\n}\n\n/** Depth-first: `node`, then every descendant. */\nexport function walkComposite(node: CompositeNode, visit: (node: CompositeNode, parent: CompositeNode | null) => void, parent: CompositeNode | null = null): void {\n visit(node, parent);\n for (const child of node.children ?? []) walkComposite(child, visit, node);\n}\n\n/**\n * The first descendant of `root` playing `role`. Never descends into a NESTED composite of the same\n * root role (a card inside a card's content keeps its own parts).\n */\nexport function findByRole(root: CompositeNode, role: string): CompositeNode | undefined {\n for (const child of root.children ?? []) {\n if (child.role === role) return child;\n if (child.role === root.role && root.role) continue;\n const hit = findByRole(child, role);\n if (hit) return hit;\n }\n return undefined;\n}\n\n/** The node's parent inside `root`, or null. */\nexport function parentInComposite(root: CompositeNode, node: CompositeNode): CompositeNode | null {\n for (const child of root.children ?? []) {\n if (child === node) return root;\n const hit = parentInComposite(child, node);\n if (hit) return hit;\n }\n return null;\n}\n\n/** Detach `node` from its parent inside `root`. True when it was found. */\nexport function removeFromComposite(root: CompositeNode, node: CompositeNode): boolean {\n const parent = parentInComposite(root, node);\n if (!parent?.children) return false;\n parent.children.splice(parent.children.indexOf(node), 1);\n return true;\n}\n","import { elementStyleById, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { CompositeNode, CompositeNodeFactory, writeStyles } from './composite-node';\n\n/**\n * BADGE + CHIP (composite T25; complex-components board 8). A Badge is a Container wearing\n * `badge-<tone>` › Icon + Text; its TONE is its element style, so Badge ▸ Tone writes the style and\n * nothing else, and a re-theme restyles every badge. A Chip is the outlined static style only (no\n * behaviour until the K5 Data view). Inside a card the badge plays `card.badge`; anywhere else it is\n * recognised by its style.\n */\n\nexport enum BadgeTone {\n Neutral = 'neutral',\n Success = 'success',\n Warning = 'warning',\n Accent = 'accent',\n}\n\nexport const BADGE_TONES: ReadonlyArray<BadgeTone> = [BadgeTone.Neutral, BadgeTone.Success, BadgeTone.Warning, BadgeTone.Accent];\n\n/** The tone's element style (`badge-<tone>`, the contract's). */\nexport function badgeStyleId(tone: BadgeTone): string {\n return `badge-${tone}`;\n}\n\nexport const CHIP_STYLE = 'chip';\n\n/** The glyph a fresh badge of each tone shows (the board's tone grid). */\nexport const BADGE_TONE_ICONS: Readonly<Record<BadgeTone, string>> = {\n [BadgeTone.Neutral]: 'ph ph-tag',\n [BadgeTone.Success]: 'ph ph-check',\n [BadgeTone.Warning]: 'ph ph-warning',\n [BadgeTone.Accent]: 'ph ph-sparkle',\n};\nexport const CHIP_ICON = 'ph ph-tag';\n\nconst TONE_BY_STYLE = new Map(BADGE_TONES.map(tone => [badgeStyleId(tone), tone]));\n\n/** The badge tone a node wears, or null when it is no badge. */\nexport function badgeToneOf(node: { elementStyle?: string | null } | null | undefined): BadgeTone | null {\n return TONE_BY_STYLE.get(node?.elementStyle ?? '') ?? null;\n}\n\n/** True for a node wearing a badge tone or the chip style — the pills (their Icon reads their ink). */\nexport function isPillNode(node: { elementStyle?: string | null } | null | undefined): boolean {\n return badgeToneOf(node) !== null || node?.elementStyle === CHIP_STYLE;\n}\n\n/**\n * Badge ▸ Tone: move the badge to another tone's element style (an edit the author made to the old\n * tone's look is kept, design-core's switch rule). Nothing else changes — not the icon, not the words.\n */\nexport function setBadgeTone(node: CompositeNode, tone: BadgeTone, baseline: Readonly<Record<string, unknown>> = {}): boolean {\n const current = node.elementStyle ?? null;\n const next = badgeStyleId(tone);\n if (!badgeToneOf(node) || current === next || !elementStyleById(next)) return false;\n const result = switchElementStyle(node, current, next, baseline);\n if (result.applied) node.elementStyle = next;\n return result.applied;\n}\n\n/** A pill's box: hugs its words, never stretches in a column. */\nconst PILL_BASE: Readonly<Record<string, string>> = {\n display: 'inline-flex', alignItems: 'center', gap: '5px', width: 'auto', minHeight: 'auto', alignSelf: 'flex-start', lineHeight: '1.4',\n};\nconst PILL_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\nconst PILL_WORDS: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: '0px 0px 0px 0px', margin: '0px 0px 0px 0px' };\n/** The pill's words inherit the pill's type and ink (the contract's inherit-everything text style). */\nconst PILL_WORDS_STYLE = 'button-label';\n\nexport interface PillOptions {\n text?: string;\n icon?: string;\n /** Key prefix for the consumer's ids (`badge` → `badge`, `badge-icon`, `badge-text`). */\n key?: string;\n}\n\nfunction buildPill(create: CompositeNodeFactory, elementStyle: string, text: string, icon: string, key: string): CompositeNode {\n const pill = create({ key, type: 'Container', elementStyle });\n writeStyles(pill, PILL_BASE);\n const glyph = create({ key: `${key}-icon`, type: 'Icon', props: { iconClass: icon }, elementStyle: 'icon' });\n writeStyles(glyph, PILL_ICON);\n const words = create({ key: `${key}-text`, type: 'Text', props: { content: text, tag: 'span' }, elementStyle: PILL_WORDS_STYLE });\n writeStyles(words, PILL_WORDS);\n pill.children = [glyph, words];\n return pill;\n}\n\n/** A fresh Badge: Container `badge-<tone>` › Icon + Text. */\nexport function buildBadge(create: CompositeNodeFactory, options: PillOptions & { tone?: BadgeTone } = {}): CompositeNode {\n const tone = options.tone ?? BadgeTone.Accent;\n const badge = buildPill(create, badgeStyleId(tone), options.text ?? 'New', options.icon ?? BADGE_TONE_ICONS[tone], options.key ?? 'badge');\n badge.label = 'Badge';\n return badge;\n}\n\n/** A fresh Chip: Container `chip` › Icon + Text (outlined, static). */\nexport function buildChip(create: CompositeNodeFactory, options: PillOptions = {}): CompositeNode {\n const chip = buildPill(create, CHIP_STYLE, options.text ?? 'Chip', options.icon ?? CHIP_ICON, options.key ?? 'chip');\n chip.label = 'Chip';\n return chip;\n}\n","import { elementStyleById, LinkType, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { BadgeTone, buildBadge } from './badge';\nimport {\n clearLayerStyles, CompositeNode, CompositeNodeFactory, findByRole, parentInComposite, readLayerStyle, readProp, readStyle,\n removeFromComposite, writeLayerStyles, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * CARD v2 (composite T23; complex-components board 8, APPROVED 2026-10-20). Not a component: a recipe of\n * ordinary nodes, each part carrying a role, so every part is selectable on the canvas, in the layer tree\n * and the breadcrumb, wears its own element style and is edited on its own (R2). No runtime and no design\n * state — nothing is hidden at rest.\n *\n * Container `card` role card\n * ├─ Container `box` role card.media (optional: Image)\n * │ ├─ Image `media`\n * │ └─ Container `badge-accent` role card.badge (optional) › Icon + Text\n * └─ Container `box` role card.content (locked)\n * ├─ Text `eyebrow` role card.eyebrow (optional)\n * ├─ Heading h3 `h3` role card.title (locked — the card's link when linked)\n * ├─ Text `body` role card.text (optional)\n * └─ Container `box` role card.actions (optional) › ButtonBlock primary + ghost\n *\n * One recipe for every consumer: the builder's palette (its `createConfig`), generation-core's composer\n * (its `createSerializedNode`) and the site build — each passes its own node factory.\n */\n\nexport enum CardRole {\n Card = 'card',\n Media = 'card.media',\n Badge = 'card.badge',\n Content = 'card.content',\n Eyebrow = 'card.eyebrow',\n Title = 'card.title',\n Text = 'card.text',\n Actions = 'card.actions',\n}\n\n/** The optional parts — Card ▸ Parts, one switch each, in the board's order. Title and Content are locked. */\nexport enum CardPart {\n Media = 'media',\n Badge = 'badge',\n Eyebrow = 'eyebrow',\n Text = 'text',\n Actions = 'actions',\n}\n\nexport const CARD_PARTS: ReadonlyArray<CardPart> = [CardPart.Media, CardPart.Badge, CardPart.Eyebrow, CardPart.Text, CardPart.Actions];\n\nexport const CARD_PART_ROLE: Readonly<Record<CardPart, CardRole>> = {\n [CardPart.Media]: CardRole.Media,\n [CardPart.Badge]: CardRole.Badge,\n [CardPart.Eyebrow]: CardRole.Eyebrow,\n [CardPart.Text]: CardRole.Text,\n [CardPart.Actions]: CardRole.Actions,\n};\n\n/** Card ▸ Layout — a preset, never a stored trait: `applyCardLayout` writes the card's layout styles. */\nexport enum CardLayout {\n Top = 'top',\n Side = 'side',\n Overlay = 'overlay',\n Compact = 'compact',\n}\n\nexport const CARD_LAYOUTS: ReadonlyArray<CardLayout> = [CardLayout.Top, CardLayout.Side, CardLayout.Overlay, CardLayout.Compact];\n/** What Card ▸ Layout shows once the author has changed the layout styles by hand. */\nexport const CARD_LAYOUT_CUSTOM = 'custom';\nexport type CardLayoutState = CardLayout | typeof CARD_LAYOUT_CUSTOM;\n\n/** The words a fresh card starts with — the author's to replace (or a bound field's). */\nexport interface CardWords {\n eyebrow: string;\n title: string;\n text: string;\n primary: string;\n secondary: string;\n badge: string;\n}\n\nexport const CARD_WORDS: Readonly<CardWords> = {\n eyebrow: 'Category',\n title: 'Card title',\n text: 'One or two sentences about this item.',\n primary: 'Learn more',\n secondary: 'Save',\n badge: 'New',\n};\n\n/** The breakpoint whose layer stacks an \"Image side\" card (Breakpoint.Mobile, ≤767px). */\nexport const CARD_STACK_BREAKPOINT = 'mobile';\n\nenum Type {\n Container = 'Container',\n Image = 'Image',\n Heading = 'Heading',\n Text = 'Text',\n Icon = 'Icon',\n ButtonBlock = 'ButtonBlock',\n}\n\nenum Style {\n Card = 'card',\n Box = 'box',\n Media = 'media',\n Eyebrow = 'eyebrow',\n Title = 'h3',\n Body = 'body',\n Label = 'button-label',\n Primary = 'button-primary',\n Ghost = 'button-ghost',\n Icon = 'icon',\n Scrim = 'media-scrim',\n}\n\nenum Scheme {\n Default = 'default',\n Inverse = 'inverse',\n}\n\nconst COLOR_SCHEME = 'colorScheme';\nconst LINK_TYPE = 'linkType';\nconst SAVE_ICON = 'ph ph-bookmark-simple';\n\n/** A value an element style writes — read from the contract, never retyped. */\nconst styleValue = (style: string, trait: string): string => String(elementStyleById(style)?.base[trait] ?? '');\nconst CARD_PAD = styleValue(Style.Card, 'padding');\nconst IMAGE_RADIUS = styleValue(Style.Media, 'borderRadius');\nconst TITLE_SIZE = styleValue(Style.Title, 'fontSize');\nconst LEAD_SIZE = 'var(--iox-size-lead)';\nconst ZERO_BOX = '0px 0px 0px 0px';\n\n/** What every card part holds in every layout — the recipe's box. */\nconst CARD_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n // No height: a card is a grid or flex item, and the cell's stretch is what makes a row's cards equal.\n // A percentage height resolved against whatever held the card (a tall section) and grew it to that.\n [CardRole.Card]: { display: 'flex', gap: '14px', width: '100%', minWidth: '0px', overflow: 'hidden', position: 'relative' },\n [CardRole.Media]: { display: 'block', width: '100%', minHeight: 'auto', flexGrow: '0', flexShrink: '0' },\n [CardRole.Content]: { display: 'flex', flexDirection: 'column', gap: '8px', width: '100%', minWidth: '0px', minHeight: 'auto' },\n [CardRole.Eyebrow]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n [CardRole.Title]: { margin: ZERO_BOX },\n [CardRole.Text]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n // Buttons pinned to the bottom (board 8 Q: equal heights + buttons pinned): the content column grows,\n // and the row's auto top margin takes the slack.\n [CardRole.Actions]: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: '8px', margin: 'auto 0px 0px 0px', padding: '6px 0px 0px 0px', width: '100%', minHeight: 'auto' },\n};\nconst IMAGE_BASE: Readonly<Record<string, string>> = { display: 'block', width: '100%', maxWidth: '100%' };\n/** A button's label and a pill's words: inherit the type and ink of what holds them. */\nconst LABEL_BASE: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: ZERO_BOX, margin: ZERO_BOX };\nconst INLINE_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\n\n/** One layout preset: the style values it writes per role (every layout writes the same keys, so\n * switching is clean and detection exact), where the badge sits, and what it switches off. */\ninterface CardLayoutSpec {\n card: Readonly<Record<string, string>>;\n media: Readonly<Record<string, string>>;\n image: Readonly<Record<string, string>>;\n content: Readonly<Record<string, string>>;\n contentStyle: Style;\n contentScheme: Scheme;\n title: Readonly<Record<string, string>>;\n badgeOnMedia: boolean;\n /** The stacking layer (Image side only); every other layout clears these keys from it. */\n stack?: { card: Readonly<Record<string, string>>; media: Readonly<Record<string, string>>; image: Readonly<Record<string, string>> };\n partsOff?: ReadonlyArray<CardPart>;\n}\n\nconst IN_FLOW = { position: 'relative', top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' };\nconst GROWING_CONTENT = { position: 'static', flexGrow: '1', flexShrink: '1', flexBasis: '0%', padding: ZERO_BOX };\n\nconst LAYOUTS: Readonly<Record<CardLayout, CardLayoutSpec>> = {\n [CardLayout.Top]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n },\n [CardLayout.Side]: {\n card: { flexDirection: 'row', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '42%' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: '180px', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n stack: {\n card: { flexDirection: 'column' },\n media: { flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto' },\n },\n },\n [CardLayout.Overlay]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-end', minHeight: '340px', padding: ZERO_BOX },\n media: { position: 'absolute', top: '0px', right: '0px', bottom: '0px', left: '0px', flexBasis: 'auto' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: 'auto', borderRadius: '0px' },\n content: { position: 'relative', flexGrow: '0', flexShrink: '0', flexBasis: 'auto', padding: `72px ${CARD_PAD} ${CARD_PAD} ${CARD_PAD}` },\n contentStyle: Style.Scrim, contentScheme: Scheme.Inverse,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: false,\n },\n [CardLayout.Compact]: {\n card: { flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '72px' },\n image: { aspectRatio: '1 / 1', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: LEAD_SIZE },\n badgeOnMedia: false,\n partsOff: [CardPart.Text, CardPart.Actions],\n },\n};\n\nconst STACK_KEYS = {\n card: Object.keys(LAYOUTS[CardLayout.Side].stack!.card),\n media: Object.keys(LAYOUTS[CardLayout.Side].stack!.media),\n image: Object.keys(LAYOUTS[CardLayout.Side].stack!.image),\n};\n\n/** What a type's UNSTYLED node holds — passed so a style switch (Content ⇄ the scrim) hands the old\n * style's values back to the type, never to `undefined`. */\nexport type BaselineStyles = (type: string) => Readonly<Record<string, unknown>>;\n\nexport interface CardEditOptions {\n baselineStyles?: BaselineStyles;\n}\n\nexport interface CardOptions extends CardEditOptions {\n layout?: CardLayout;\n /** Which optional parts the card starts with (all, by default). */\n parts?: Partial<Record<CardPart, boolean>>;\n words?: Partial<CardWords>;\n badgeTone?: BadgeTone;\n}\n\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: CardRole | null, elementStyle: string | null,\n props: Record<string, unknown> = {}, label?: string): CompositeNode {\n const node = create({ key, type, props, elementStyle });\n if (role) node.role = role;\n if (label) node.label = label;\n writeStyles(node, role ? CARD_BASE[role] ?? {} : {});\n return node;\n}\n\nfunction buttonLabel(create: CompositeNodeFactory, key: string, words: string): CompositeNode {\n const label = make(create, key, Type.Text, null, Style.Label, { content: words, tag: 'span' });\n writeStyles(label, LABEL_BASE);\n return label;\n}\n\n/** Each optional part (and the locked title) as the recipe builds it. */\nconst PART_BUILDERS: Readonly<Record<CardPart, (create: CompositeNodeFactory, words: CardWords, tone: BadgeTone) => CompositeNode>> = {\n [CardPart.Media]: (create) => {\n const media = make(create, 'media', Type.Container, CardRole.Media, Style.Box, {}, 'Media');\n const image = make(create, 'image', Type.Image, null, Style.Media, { src: '', alt: '' });\n writeStyles(image, IMAGE_BASE);\n media.children = [image];\n return media;\n },\n [CardPart.Badge]: (create, words, tone) => {\n const badge = buildBadge(create, { tone, text: words.badge, key: 'badge' });\n badge.role = CardRole.Badge;\n badge.label = 'Badge';\n return badge;\n },\n [CardPart.Eyebrow]: (create, words) => make(create, 'eyebrow', Type.Text, CardRole.Eyebrow, Style.Eyebrow, { content: words.eyebrow, tag: 'p' }, 'Eyebrow'),\n [CardPart.Text]: (create, words) => make(create, 'text', Type.Text, CardRole.Text, Style.Body, { content: words.text, tag: 'p' }, 'Text'),\n [CardPart.Actions]: (create, words) => {\n const actions = make(create, 'actions', Type.Container, CardRole.Actions, Style.Box, {}, 'Buttons');\n const primary = make(create, 'primary', Type.ButtonBlock, null, Style.Primary);\n primary.children = [buttonLabel(create, 'primary-label', words.primary)];\n const ghost = make(create, 'secondary', Type.ButtonBlock, null, Style.Ghost);\n const icon = make(create, 'secondary-icon', Type.Icon, null, Style.Icon, { iconClass: SAVE_ICON });\n writeStyles(icon, INLINE_ICON);\n ghost.children = [icon, buttonLabel(create, 'secondary-label', words.secondary)];\n actions.children = [primary, ghost];\n return actions;\n },\n};\n\nfunction buildTitle(create: CompositeNodeFactory, words: CardWords): CompositeNode {\n return make(create, 'title', Type.Heading, CardRole.Title, Style.Title, { content: words.title, level: 'h3', [LINK_TYPE]: LinkType.None }, 'Title');\n}\n\n/** A fresh Card v2: every part a node with its role and element style, laid out by `options.layout`. */\nexport function buildCardRecipe(create: CompositeNodeFactory, options: CardOptions = {}): CompositeNode {\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const tone = options.badgeTone ?? BadgeTone.Accent;\n const on = (part: CardPart) => options.parts?.[part] !== false;\n const card = make(create, 'card', Type.Container, CardRole.Card, Style.Card, {}, 'Card');\n const content = make(create, 'content', Type.Container, CardRole.Content, Style.Box, {}, 'Content');\n content.children = [\n ...(on(CardPart.Eyebrow) ? [PART_BUILDERS[CardPart.Eyebrow](create, words, tone)] : []),\n buildTitle(create, words),\n ...(on(CardPart.Text) ? [PART_BUILDERS[CardPart.Text](create, words, tone)] : []),\n ...(on(CardPart.Actions) ? [PART_BUILDERS[CardPart.Actions](create, words, tone)] : []),\n ];\n card.children = [...(on(CardPart.Media) ? [PART_BUILDERS[CardPart.Media](create, words, tone)] : []), content];\n if (on(CardPart.Badge)) placeBadge(card, PART_BUILDERS[CardPart.Badge](create, words, tone), true);\n applyCardLayout(card, options.layout ?? CardLayout.Top, options);\n return card;\n}\n\n/** True when `node` is a Card v2 root. */\nexport function isCardRoot(node: CompositeNode | null | undefined): boolean {\n return node?.role === CardRole.Card;\n}\n\n/** The Card a part belongs to: the nearest ancestor (or the node itself) playing `card`. `path` = the\n * node's ancestors, root first. */\nexport function cardRootOf(node: CompositeNode, path: ReadonlyArray<CompositeNode>): CompositeNode | null {\n if (isCardRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isCardRoot(path[i])) return path[i];\n return null;\n}\n\n/** Card ▸ Parts: which optional parts the card holds now. */\nexport function cardPartsOf(card: CompositeNode): Record<CardPart, boolean> {\n return Object.fromEntries(CARD_PARTS.map(part => [part, !!findByRole(card, CARD_PART_ROLE[part])])) as Record<CardPart, boolean>;\n}\n\nconst imageOf = (media: CompositeNode | undefined): CompositeNode | undefined => media?.children?.find(c => c.type === Type.Image);\n\n/** Put the badge where the layout says: the Media's top corner, or the head of the content column\n * (Image behind text, Compact, or no Media at all). The corner's insets are logical, in iox-design.css\n * (mirrored in RTL); `position` is the node's own, because the editing canvas forces every node's\n * position from its style props. */\nfunction placeBadge(card: CompositeNode, badge: CompositeNode, onMedia: boolean): void {\n const media = findByRole(card, CardRole.Media);\n const content = findByRole(card, CardRole.Content);\n removeFromComposite(card, badge);\n const overMedia = onMedia && !!media;\n if (overMedia) media!.children = [...(media!.children ?? []), badge];\n else if (content) content.children = [badge, ...(content.children ?? [])];\n writeStyles(badge, { position: overMedia ? 'absolute' : 'static' });\n}\n\nfunction writeScheme(node: CompositeNode, scheme: Scheme): void {\n writeProp(node, COLOR_SCHEME, scheme);\n}\n\n/** Write one role's layout values from a spec (base + layers). */\nfunction applyPartLayout(card: CompositeNode, spec: CardLayoutSpec, part: CompositeNode, baseline: BaselineStyles): void {\n switch (part.role) {\n case CardRole.Card:\n writeStyles(part, { ...CARD_BASE[CardRole.Card], ...spec.card });\n setStack(part, spec.stack?.card, STACK_KEYS.card);\n return;\n case CardRole.Media: {\n writeStyles(part, { ...CARD_BASE[CardRole.Media], ...spec.media });\n setStack(part, spec.stack?.media, STACK_KEYS.media);\n const image = imageOf(part);\n if (image) {\n writeStyles(image, { ...IMAGE_BASE, ...spec.image });\n setStack(image, spec.stack?.image, STACK_KEYS.image);\n }\n return;\n }\n case CardRole.Content: {\n const current = part.elementStyle;\n if (current !== spec.contentStyle) {\n switchElementStyle(part, current, spec.contentStyle, baseline(part.type));\n part.elementStyle = spec.contentStyle;\n }\n writeStyles(part, { ...CARD_BASE[CardRole.Content], ...spec.content });\n writeScheme(part, spec.contentScheme);\n return;\n }\n case CardRole.Title:\n writeStyles(part, spec.title);\n return;\n default:\n return;\n }\n}\n\nfunction setStack(node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>): void {\n if (values) writeLayerStyles(node, CARD_STACK_BREAKPOINT, values);\n else clearLayerStyles(node, CARD_STACK_BREAKPOINT, keys);\n}\n\nexport interface CardLayoutResult {\n layout: CardLayout;\n /** Parts the preset switched off (Compact: Text and Buttons). */\n removed: CardPart[];\n}\n\n/**\n * Card ▸ Layout. Rewrites the card's LAYOUT styles for `layout` — the card's direction and box, the\n * Media's placement, the Image's aspect, the content block (Image behind text: the `media-scrim` style +\n * the Inverse scheme), the title size (Compact) and, for Image side, a Mobile layer that stacks it — and\n * moves the badge to where the layout puts it. Nothing else on any part. One undo step for the caller.\n */\nexport function applyCardLayout(card: CompositeNode, layout: CardLayout, options: CardEditOptions = {}): CardLayoutResult {\n const spec = LAYOUTS[layout];\n const baseline = options.baselineStyles ?? (() => ({}));\n const removed: CardPart[] = [];\n for (const part of spec.partsOff ?? []) if (setCardPart(card, part, false)) removed.push(part);\n applyPartLayout(card, spec, card, baseline);\n for (const role of [CardRole.Media, CardRole.Content, CardRole.Title]) {\n const part = findByRole(card, role);\n if (part) applyPartLayout(card, spec, part, baseline);\n }\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n return { layout, removed };\n}\n\nconst same = (a: unknown, b: unknown) => String(a ?? '').trim() === String(b ?? '').trim();\nconst holds = (node: CompositeNode, values: Readonly<Record<string, string>>) => Object.entries(values).every(([k, v]) => same(readStyle(node, k), v));\nconst holdsLayer = (node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>) =>\n values ? Object.entries(values).every(([k, v]) => same(readLayerStyle(node, CARD_STACK_BREAKPOINT, k), v))\n : keys.every(k => readLayerStyle(node, CARD_STACK_BREAKPOINT, k) === undefined);\n\nfunction matches(card: CompositeNode, spec: CardLayoutSpec): boolean {\n if (!holds(card, spec.card) || !holdsLayer(card, spec.stack?.card, STACK_KEYS.card)) return false;\n const media = findByRole(card, CardRole.Media);\n if (media) {\n if (!holds(media, spec.media) || !holdsLayer(media, spec.stack?.media, STACK_KEYS.media)) return false;\n const image = imageOf(media);\n if (image && (!holds(image, spec.image) || !holdsLayer(image, spec.stack?.image, STACK_KEYS.image))) return false;\n }\n const content = findByRole(card, CardRole.Content);\n if (content) {\n if (content.elementStyle !== spec.contentStyle || !holds(content, spec.content)) return false;\n if (!same(readProp(content, COLOR_SCHEME) ?? Scheme.Default, spec.contentScheme)) return false;\n }\n const title = findByRole(card, CardRole.Title);\n if (title && !holds(title, spec.title)) return false;\n const badge = findByRole(card, CardRole.Badge);\n if (badge && media) {\n const onMedia = parentInComposite(card, badge) === media;\n if (onMedia !== spec.badgeOnMedia) return false;\n }\n return true;\n}\n\n/** The layout the card's styles hold now, or `custom` once they were changed by hand (Card ▸ Layout). */\nexport function detectCardLayout(card: CompositeNode): CardLayoutState {\n return CARD_LAYOUTS.find(layout => matches(card, LAYOUTS[layout])) ?? CARD_LAYOUT_CUSTOM;\n}\n\nexport interface CardPartChange {\n part: CardPart;\n /** The node removed (off) or stamped (on); null when there was nothing to do. */\n node: CompositeNode | null;\n}\n\n/**\n * Card ▸ Parts. Off removes the part (the badge first moves out of a removed Media); on stamps it back\n * from the recipe into its role's slot, wearing its element style and laid out like the rest of the card\n * (the card's current layout; Image top when it is Custom). Returns the node touched, or null when the\n * card already was that way. Title and Content are not parts: they are locked (structure guard).\n */\nexport function setCardPart(card: CompositeNode, part: CardPart, on: boolean, create?: CompositeNodeFactory, options: CardOptions = {}): CompositeNode | null {\n const role = CARD_PART_ROLE[part];\n const existing = findByRole(card, role);\n if (!on) {\n if (!existing) return null;\n if (part === CardPart.Media) {\n const badge = findByRole(existing, CardRole.Badge);\n if (badge) placeBadge(card, badge, false);\n }\n removeFromComposite(card, existing);\n return existing;\n }\n if (existing || !create) return null;\n const layout = detectCardLayout(card);\n const spec = LAYOUTS[layout === CARD_LAYOUT_CUSTOM ? CardLayout.Top : layout];\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const node = PART_BUILDERS[part](create, words, options.badgeTone ?? BadgeTone.Accent);\n const content = findByRole(card, CardRole.Content);\n switch (part) {\n case CardPart.Media: {\n card.children = [node, ...(card.children ?? [])];\n applyPartLayout(card, spec, node, () => ({}));\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n break;\n }\n case CardPart.Badge:\n placeBadge(card, node, spec.badgeOnMedia);\n break;\n default:\n if (content) insertInContent(content, part, node);\n break;\n }\n return node;\n}\n\n/** The content column's order: [badge], eyebrow, title, text, buttons. */\nconst CONTENT_ORDER: ReadonlyArray<string> = [CardRole.Badge, CardRole.Eyebrow, CardRole.Title, CardRole.Text, CardRole.Actions];\n\nfunction insertInContent(content: CompositeNode, part: CardPart, node: CompositeNode): void {\n const rank = (n: CompositeNode) => { const i = CONTENT_ORDER.indexOf(n.role ?? ''); return i < 0 ? CONTENT_ORDER.length : i; };\n const children = [...(content.children ?? [])];\n const own = rank(node);\n const at = children.findIndex(c => rank(c) > own);\n children.splice(at < 0 ? children.length : at, 0, node);\n content.children = children;\n}\n\n// ── Link the whole card ──────────────────────────────────────────────────────────────────────\n\n/** The card's title — what \"Link the whole card\" makes the link (its words are the link's name). */\nexport function cardTitleOf(card: CompositeNode): CompositeNode | undefined {\n return findByRole(card, CardRole.Title);\n}\n\n/** True when the card links as a whole: its title carries a link (the stretched link renders from it). */\nexport function isCardLinked(card: CompositeNode): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const type = readProp(title, LINK_TYPE);\n return type === LinkType.Page || type === LinkType.External;\n}\n\n/**\n * Card ▸ Link ▸ \"Link the whole card\". On: the title links (to a website page, unless it already pointed\n * at a URL — the target it held is kept); off: the title links nowhere (its target is kept for the next\n * time). The stretched link itself is the shared CSS (iox-design.css), keyed on the title's anchor.\n */\nexport function setCardLinked(card: CompositeNode, on: boolean): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const current = readProp(title, LINK_TYPE);\n const next = on ? (current === LinkType.External ? LinkType.External : LinkType.Page) : LinkType.None;\n return writeProp(title, LINK_TYPE, next);\n}\n","import { CardPart, CardRole } from './card';\n\n/**\n * The structure every composite declares (composite-components plan §3a `RoleSpec`): where a role may\n * live and whether it is LOCKED (a structural part that cannot be deleted or moved out — a card always\n * has its content column and its title). Optional parts carry the Parts switch that re-adds them.\n * The builder's delete paths and its drop/paste rule ask `structureRefusal` — ONE answer for all of them.\n */\nexport interface CompositeRoleSpec {\n /** The role of the part's parent; null for a composite root. */\n readonly parent: string | null;\n readonly locked?: boolean;\n readonly part?: CardPart;\n}\n\nexport const COMPOSITE_ROLE_SPECS: Readonly<Record<string, CompositeRoleSpec>> = {\n [CardRole.Card]: { parent: null },\n [CardRole.Media]: { parent: CardRole.Card, part: CardPart.Media },\n [CardRole.Badge]: { parent: null, part: CardPart.Badge },\n [CardRole.Content]: { parent: CardRole.Card, locked: true },\n [CardRole.Eyebrow]: { parent: CardRole.Content, part: CardPart.Eyebrow },\n [CardRole.Title]: { parent: CardRole.Content, locked: true },\n [CardRole.Text]: { parent: CardRole.Content, part: CardPart.Text },\n [CardRole.Actions]: { parent: CardRole.Content, part: CardPart.Actions },\n};\n\nexport enum StructureEdit {\n Delete = 'delete',\n /** A drop, paste or wrap that would put the node somewhere new. */\n Move = 'move',\n}\n\nexport enum StructureRefusal {\n /** A locked part cannot be deleted (the card's Content and Title). */\n LockedPart = 'locked-part',\n /** A locked part can only live directly inside its own parent role. */\n LockedPlacement = 'locked-placement',\n}\n\ninterface RoleLike { role?: string | null }\n\n/**\n * Why the structure guard refuses `edit` on `node`, or null when it is allowed. `ancestors` (Move only) =\n * the new parent chain, root first, the direct parent last.\n */\nexport function structureRefusal(node: RoleLike | null | undefined, edit: StructureEdit, ancestors: ReadonlyArray<RoleLike> = []): StructureRefusal | null {\n const spec = node?.role ? COMPOSITE_ROLE_SPECS[node.role] : undefined;\n if (!spec?.locked) return null;\n if (edit === StructureEdit.Delete) return StructureRefusal.LockedPart;\n const parent = ancestors[ancestors.length - 1];\n return parent?.role === spec.parent ? null : StructureRefusal.LockedPlacement;\n}\n\n/** True when `node` is a locked part (shown with a lock and no delete in the layer tree). Deleting a whole\n * composite is always allowed — only its locked parts are refused. */\nexport function isLockedPart(node: RoleLike | null | undefined): boolean {\n return !!(node?.role && COMPOSITE_ROLE_SPECS[node.role]?.locked);\n}\n","/**\n * @vectoriox/iox-ui/composite-core — composites built from the builder's own parts (composite-components\n * plan §3a). FRAMEWORK-FREE: the builder, the SSR engine and iox-cms (generation-core's composer, the site\n * build) read the same recipes, roles and structure rules. Card v2 + Badge / Chip (T23 / T25) are the\n * first; Accordion and Tabs join with their own phases.\n * ⚠️ Consumers wire the usual trio — ng-package raw-ts assets, jest moduleNameMapper, tsconfig paths.\n */\nexport * from './composite-node';\nexport * from './badge';\nexport * from './card';\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CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS;IACrE,IAAI,CAAC,IAAI,EAAE,MAAM;AAAE,QAAA,OAAO,IAAI;AAC9B,IAAA,IAAI,IAAI,KAAK,aAAa,CAAC,MAAM;QAAE,OAAO,gBAAgB,CAAC,UAAU;IACrE,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9C,IAAA,OAAO,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAAC,eAAe;AACjF;AAEA;AACuE;AACjE,SAAU,YAAY,CAAC,IAAiC,EAAA;AAC1D,IAAA,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;AACpE;;ACzDA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"vectoriox-iox-ui-composite-core.mjs","sources":["../../../projects/iox-ui/src/composite-core/composite-node.ts","../../../projects/iox-ui/src/composite-core/badge.ts","../../../projects/iox-ui/src/composite-core/card.ts","../../../projects/iox-ui/src/composite-core/structure.ts","../../../projects/iox-ui/src/composite-core/public-api.ts","../../../projects/iox-ui/src/composite-core/vectoriox-iox-ui-composite-core.ts"],"sourcesContent":["import { ElementStyleTarget, readOwnedTrait, writeOwnedTrait } from '@vectoriox/iox-ui/design-core';\n\n/**\n * The node shape composite-core reads and writes — both a builder `ComponentNode` (values in\n * `traits[].default` / `styleTraits`) and a saved layout node (flat `props` / `styleProps`), the same\n * dual shape design-core's element styles already speak. A composite is a tree of ORDINARY nodes\n * (composite-components plan §1): this module only adds the `role` each part carries.\n */\nexport interface CompositeTrait {\n name: string;\n default?: unknown;\n}\n\nexport interface CompositeLayer {\n styleProps?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface CompositeNode extends ElementStyleTarget {\n id?: string;\n /** The part this node plays in its composite (`card.title`). Additive; saved; read by the shared CSS\n * (`iox-role-<role>`), the structure guard and the composite's own editors. */\n role?: string;\n label?: string;\n props?: Record<string, unknown>;\n traits?: CompositeTrait[];\n responsive?: Partial<Record<string, CompositeLayer>>;\n children?: CompositeNode[];\n}\n\n/** What a recipe asks its consumer to create: a NEW node of `type`, the way that consumer creates one\n * (the builder's `createConfig`, generation-core's `createSerializedNode`), with these props and this\n * element style. `key` is stable per recipe node — a consumer that needs deterministic ids builds them\n * from it (generation-core: `<root id>-<key>`). */\nexport interface CompositeNodeSpec {\n key: string;\n type: string;\n props?: Readonly<Record<string, unknown>>;\n elementStyle?: string | null;\n}\n\nexport type CompositeNodeFactory = (spec: CompositeNodeSpec) => CompositeNode;\n\nconst usesTraits = (node: CompositeNode): boolean => Array.isArray(node.traits);\n\n/** A content trait's value — `traits[].default` on a builder node, `props[name]` on a saved one. */\nexport function readProp(node: CompositeNode, name: string): unknown {\n return usesTraits(node) ? node.traits!.find(t => t.name === name)?.default : node.props?.[name];\n}\n\n/** Write a content trait. False when a builder node has no such trait (the value would be dropped). */\nexport function writeProp(node: CompositeNode, name: string, value: unknown): boolean {\n if (usesTraits(node)) {\n const trait = node.traits!.find(t => t.name === name);\n if (!trait) return false;\n trait.default = value;\n return true;\n }\n node.props = { ...(node.props ?? {}), [name]: value };\n return true;\n}\n\n/** A base style value (the node's own, either shape). */\nexport function readStyle(node: CompositeNode, name: string): unknown {\n return readOwnedTrait(node, { trait: name });\n}\n\n/** Write base style values; returns the names the node has no slot for (a builder node drops them). */\nexport function writeStyles(node: CompositeNode, values: Readonly<Record<string, string>>): string[] {\n const missing: string[] = [];\n for (const [name, value] of Object.entries(values)) {\n if (!writeOwnedTrait(node, { trait: name }, value)) missing.push(name);\n }\n return missing;\n}\n\n/** Set style values in one breakpoint layer (`responsive[bp].styleProps`, the shape both renderers'\n * shared `planResponsiveRules` reads). */\nexport function writeLayerStyles(node: CompositeNode, breakpoint: string, values: Readonly<Record<string, string>>): void {\n const responsive = { ...(node.responsive ?? {}) };\n const layer: CompositeLayer = { ...(responsive[breakpoint] ?? {}) };\n layer.styleProps = { ...(layer.styleProps ?? {}), ...values };\n responsive[breakpoint] = layer;\n node.responsive = responsive;\n}\n\n/** Remove style keys from one breakpoint layer; an emptied layer (and an emptied map) is dropped. */\nexport function clearLayerStyles(node: CompositeNode, breakpoint: string, names: ReadonlyArray<string>): void {\n const layer = node.responsive?.[breakpoint];\n if (!layer?.styleProps) return;\n const styleProps = { ...layer.styleProps };\n for (const name of names) delete styleProps[name];\n const next: CompositeLayer = { ...layer };\n if (Object.keys(styleProps).length) next.styleProps = styleProps;\n else delete next.styleProps;\n const responsive = { ...(node.responsive ?? {}) };\n if (Object.keys(next).length) responsive[breakpoint] = next;\n else delete responsive[breakpoint];\n node.responsive = Object.keys(responsive).length ? responsive : undefined;\n}\n\n/** A breakpoint layer's own value for one style key. */\nexport function readLayerStyle(node: CompositeNode, breakpoint: string, name: string): unknown {\n return node.responsive?.[breakpoint]?.styleProps?.[name];\n}\n\n/** Depth-first: `node`, then every descendant. */\nexport function walkComposite(node: CompositeNode, visit: (node: CompositeNode, parent: CompositeNode | null) => void, parent: CompositeNode | null = null): void {\n visit(node, parent);\n for (const child of node.children ?? []) walkComposite(child, visit, node);\n}\n\n/**\n * The first descendant of `root` playing `role`. Never descends into a NESTED composite of the same\n * root role (a card inside a card's content keeps its own parts).\n */\nexport function findByRole(root: CompositeNode, role: string): CompositeNode | undefined {\n for (const child of root.children ?? []) {\n if (child.role === role) return child;\n if (child.role === root.role && root.role) continue;\n const hit = findByRole(child, role);\n if (hit) return hit;\n }\n return undefined;\n}\n\n/** The node's parent inside `root`, or null. */\nexport function parentInComposite(root: CompositeNode, node: CompositeNode): CompositeNode | null {\n for (const child of root.children ?? []) {\n if (child === node) return root;\n const hit = parentInComposite(child, node);\n if (hit) return hit;\n }\n return null;\n}\n\n/** Detach `node` from its parent inside `root`. True when it was found. */\nexport function removeFromComposite(root: CompositeNode, node: CompositeNode): boolean {\n const parent = parentInComposite(root, node);\n if (!parent?.children) return false;\n parent.children.splice(parent.children.indexOf(node), 1);\n return true;\n}\n","import { elementStyleById, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { CompositeNode, CompositeNodeFactory, writeStyles } from './composite-node';\n\n/**\n * BADGE + CHIP (composite T25; complex-components board 8). A Badge is a Container wearing\n * `badge-<tone>` › Icon + Text; its TONE is its element style, so Badge ▸ Tone writes the style and\n * nothing else, and a re-theme restyles every badge. A Chip is the outlined static style only (no\n * behaviour until the K5 Data view). Inside a card the badge plays `card.badge`; anywhere else it is\n * recognised by its style.\n */\n\nexport enum BadgeTone {\n Neutral = 'neutral',\n Success = 'success',\n Warning = 'warning',\n Accent = 'accent',\n}\n\nexport const BADGE_TONES: ReadonlyArray<BadgeTone> = [BadgeTone.Neutral, BadgeTone.Success, BadgeTone.Warning, BadgeTone.Accent];\n\n/** The tone's element style (`badge-<tone>`, the contract's). */\nexport function badgeStyleId(tone: BadgeTone): string {\n return `badge-${tone}`;\n}\n\nexport const CHIP_STYLE = 'chip';\n\n/** The glyph a fresh badge of each tone shows (the board's tone grid). */\nexport const BADGE_TONE_ICONS: Readonly<Record<BadgeTone, string>> = {\n [BadgeTone.Neutral]: 'ph ph-tag',\n [BadgeTone.Success]: 'ph ph-check',\n [BadgeTone.Warning]: 'ph ph-warning',\n [BadgeTone.Accent]: 'ph ph-sparkle',\n};\nexport const CHIP_ICON = 'ph ph-tag';\n\nconst TONE_BY_STYLE = new Map(BADGE_TONES.map(tone => [badgeStyleId(tone), tone]));\n\n/** The badge tone a node wears, or null when it is no badge. */\nexport function badgeToneOf(node: { elementStyle?: string | null } | null | undefined): BadgeTone | null {\n return TONE_BY_STYLE.get(node?.elementStyle ?? '') ?? null;\n}\n\n/** True for a node wearing a badge tone or the chip style — the pills (their Icon reads their ink). */\nexport function isPillNode(node: { elementStyle?: string | null } | null | undefined): boolean {\n return badgeToneOf(node) !== null || node?.elementStyle === CHIP_STYLE;\n}\n\n/**\n * Badge ▸ Tone: move the badge to another tone's element style (an edit the author made to the old\n * tone's look is kept, design-core's switch rule). Nothing else changes — not the icon, not the words.\n */\nexport function setBadgeTone(node: CompositeNode, tone: BadgeTone, baseline: Readonly<Record<string, unknown>> = {}): boolean {\n const current = node.elementStyle ?? null;\n const next = badgeStyleId(tone);\n if (!badgeToneOf(node) || current === next || !elementStyleById(next)) return false;\n const result = switchElementStyle(node, current, next, baseline);\n if (result.applied) node.elementStyle = next;\n return result.applied;\n}\n\n/** A pill's box: hugs its words, never stretches in a column. */\nconst PILL_BASE: Readonly<Record<string, string>> = {\n display: 'inline-flex', alignItems: 'center', gap: '5px', width: 'auto', minHeight: 'auto', alignSelf: 'flex-start', lineHeight: '1.4',\n};\nconst PILL_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\nconst PILL_WORDS: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: '0px 0px 0px 0px', margin: '0px 0px 0px 0px' };\n/** The pill's words wear the pill's OWN label style (Card v2.1): its type from the badge tokens, its leading,\n * tracking, case and ink inherited from the pill — never the button's label style. */\nexport const PILL_LABEL_STYLE = 'badge-label';\n\nexport interface PillOptions {\n text?: string;\n icon?: string;\n /** Key prefix for the consumer's ids (`badge` → `badge`, `badge-icon`, `badge-text`). */\n key?: string;\n}\n\nfunction buildPill(create: CompositeNodeFactory, elementStyle: string, text: string, icon: string, key: string): CompositeNode {\n const pill = create({ key, type: 'Container', elementStyle });\n writeStyles(pill, PILL_BASE);\n const glyph = create({ key: `${key}-icon`, type: 'Icon', props: { iconClass: icon }, elementStyle: 'icon' });\n writeStyles(glyph, PILL_ICON);\n const words = create({ key: `${key}-text`, type: 'Text', props: { content: text, tag: 'span' }, elementStyle: PILL_LABEL_STYLE });\n writeStyles(words, PILL_WORDS);\n pill.children = [glyph, words];\n return pill;\n}\n\n/** A fresh Badge: Container `badge-<tone>` › Icon + Text. */\nexport function buildBadge(create: CompositeNodeFactory, options: PillOptions & { tone?: BadgeTone } = {}): CompositeNode {\n const tone = options.tone ?? BadgeTone.Accent;\n const badge = buildPill(create, badgeStyleId(tone), options.text ?? 'New', options.icon ?? BADGE_TONE_ICONS[tone], options.key ?? 'badge');\n badge.label = 'Badge';\n return badge;\n}\n\n/** A fresh Chip: Container `chip` › Icon + Text (outlined, static). */\nexport function buildChip(create: CompositeNodeFactory, options: PillOptions = {}): CompositeNode {\n const chip = buildPill(create, CHIP_STYLE, options.text ?? 'Chip', options.icon ?? CHIP_ICON, options.key ?? 'chip');\n chip.label = 'Chip';\n return chip;\n}\n","import { COLOR_SCHEME_TRAIT, elementStyleById, LinkType, setColorScheme, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { BadgeTone, buildBadge } from './badge';\nimport {\n clearLayerStyles, CompositeNode, CompositeNodeFactory, findByRole, parentInComposite, readLayerStyle, readProp, readStyle,\n removeFromComposite, writeLayerStyles, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * CARD v2 (composite T23; complex-components board 8, APPROVED 2026-10-20). Not a component: a recipe of\n * ordinary nodes, each part carrying a role, so every part is selectable on the canvas, in the layer tree\n * and the breadcrumb, wears its own element style and is edited on its own (R2). No runtime and no design\n * state — nothing is hidden at rest.\n *\n * Container `card` role card\n * ├─ Container `box` role card.media (optional: Image)\n * │ ├─ Image `media`\n * │ └─ Container `badge-accent` role card.badge (optional) › Icon + Text\n * └─ Container `box` role card.content (locked)\n * ├─ Text `eyebrow` role card.eyebrow (optional)\n * ├─ Heading h3 `h3` role card.title (locked — the card's link when linked)\n * ├─ Text `body` role card.text (optional)\n * └─ Container `box` role card.actions (optional) › ButtonBlock primary + ghost\n *\n * One recipe for every consumer: the builder's palette (its `createConfig`), generation-core's composer\n * (its `createSerializedNode`) and the site build — each passes its own node factory.\n */\n\nexport enum CardRole {\n Card = 'card',\n Media = 'card.media',\n Badge = 'card.badge',\n Content = 'card.content',\n Eyebrow = 'card.eyebrow',\n Title = 'card.title',\n Text = 'card.text',\n Actions = 'card.actions',\n}\n\n/** The optional parts — Card ▸ Parts, one switch each, in the board's order. Title and Content are locked. */\nexport enum CardPart {\n Media = 'media',\n Badge = 'badge',\n Eyebrow = 'eyebrow',\n Text = 'text',\n Actions = 'actions',\n}\n\nexport const CARD_PARTS: ReadonlyArray<CardPart> = [CardPart.Media, CardPart.Badge, CardPart.Eyebrow, CardPart.Text, CardPart.Actions];\n\nexport const CARD_PART_ROLE: Readonly<Record<CardPart, CardRole>> = {\n [CardPart.Media]: CardRole.Media,\n [CardPart.Badge]: CardRole.Badge,\n [CardPart.Eyebrow]: CardRole.Eyebrow,\n [CardPart.Text]: CardRole.Text,\n [CardPart.Actions]: CardRole.Actions,\n};\n\n/** Card ▸ Layout — a preset, never a stored trait: `applyCardLayout` writes the card's layout styles. */\nexport enum CardLayout {\n Top = 'top',\n Side = 'side',\n Overlay = 'overlay',\n Compact = 'compact',\n}\n\nexport const CARD_LAYOUTS: ReadonlyArray<CardLayout> = [CardLayout.Top, CardLayout.Side, CardLayout.Overlay, CardLayout.Compact];\n/** What Card ▸ Layout shows once the author has changed the layout styles by hand. */\nexport const CARD_LAYOUT_CUSTOM = 'custom';\nexport type CardLayoutState = CardLayout | typeof CARD_LAYOUT_CUSTOM;\n\n/** The words a fresh card starts with — the author's to replace (or a bound field's). */\nexport interface CardWords {\n eyebrow: string;\n title: string;\n text: string;\n primary: string;\n secondary: string;\n badge: string;\n}\n\nexport const CARD_WORDS: Readonly<CardWords> = {\n eyebrow: 'Category',\n title: 'Card title',\n text: 'One or two sentences about this item.',\n primary: 'Learn more',\n secondary: 'Save',\n badge: 'New',\n};\n\n/** The breakpoint whose layer stacks an \"Image side\" card (Breakpoint.Mobile, ≤767px). */\nexport const CARD_STACK_BREAKPOINT = 'mobile';\n\nenum Type {\n Container = 'Container',\n Image = 'Image',\n Heading = 'Heading',\n Text = 'Text',\n Icon = 'Icon',\n ButtonBlock = 'ButtonBlock',\n}\n\nenum Style {\n Card = 'card',\n Box = 'box',\n Media = 'media',\n Eyebrow = 'eyebrow',\n Title = 'h3',\n Body = 'body',\n Label = 'button-label',\n Primary = 'button-primary',\n Ghost = 'button-ghost',\n Icon = 'icon',\n Scrim = 'media-scrim',\n}\n\nenum Scheme {\n Default = 'default',\n Inverse = 'inverse',\n}\n\nconst LINK_TYPE = 'linkType';\nconst SAVE_ICON = 'ph ph-bookmark-simple';\n\n/** A value an element style writes — read from the contract, never retyped. */\nconst styleValue = (style: string, trait: string): string => String(elementStyleById(style)?.base[trait] ?? '');\nconst CARD_PAD = styleValue(Style.Card, 'padding');\nconst IMAGE_RADIUS = styleValue(Style.Media, 'borderRadius');\nconst TITLE_SIZE = styleValue(Style.Title, 'fontSize');\nconst LEAD_SIZE = 'var(--iox-size-lead)';\nconst ZERO_BOX = '0px 0px 0px 0px';\n\n/** What every card part holds in every layout — the recipe's box. */\nconst CARD_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n // No height: a card is a grid or flex item, and the cell's stretch is what makes a row's cards equal.\n // A percentage height resolved against whatever held the card (a tall section) and grew it to that.\n [CardRole.Card]: { display: 'flex', gap: '14px', width: '100%', minWidth: '0px', overflow: 'hidden', position: 'relative' },\n [CardRole.Media]: { display: 'block', width: '100%', minHeight: 'auto', flexGrow: '0', flexShrink: '0' },\n [CardRole.Content]: { display: 'flex', flexDirection: 'column', gap: '8px', width: '100%', minWidth: '0px', minHeight: 'auto' },\n [CardRole.Eyebrow]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n [CardRole.Title]: { margin: ZERO_BOX },\n [CardRole.Text]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n // Buttons pinned to the bottom (board 8 Q: equal heights + buttons pinned): the content column grows,\n // and the row's auto top margin takes the slack.\n [CardRole.Actions]: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: '8px', margin: 'auto 0px 0px 0px', padding: '6px 0px 0px 0px', width: '100%', minHeight: 'auto' },\n};\nconst IMAGE_BASE: Readonly<Record<string, string>> = { display: 'block', width: '100%', maxWidth: '100%' };\n/** A button's label and a pill's words: inherit the type and ink of what holds them. */\nconst LABEL_BASE: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: ZERO_BOX, margin: ZERO_BOX };\nconst INLINE_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\n\n/** One layout preset: the style values it writes per role (every layout writes the same keys, so\n * switching is clean and detection exact), where the badge sits, and what it switches off. */\ninterface CardLayoutSpec {\n card: Readonly<Record<string, string>>;\n media: Readonly<Record<string, string>>;\n image: Readonly<Record<string, string>>;\n content: Readonly<Record<string, string>>;\n contentStyle: Style;\n contentScheme: Scheme;\n title: Readonly<Record<string, string>>;\n badgeOnMedia: boolean;\n /** The stacking layer (Image side only); every other layout clears these keys from it. */\n stack?: { card: Readonly<Record<string, string>>; media: Readonly<Record<string, string>>; image: Readonly<Record<string, string>> };\n partsOff?: ReadonlyArray<CardPart>;\n}\n\nconst IN_FLOW = { position: 'relative', top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' };\nconst GROWING_CONTENT = { position: 'static', flexGrow: '1', flexShrink: '1', flexBasis: '0%', padding: ZERO_BOX };\n\nconst LAYOUTS: Readonly<Record<CardLayout, CardLayoutSpec>> = {\n [CardLayout.Top]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n },\n [CardLayout.Side]: {\n card: { flexDirection: 'row', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '42%' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: '180px', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n stack: {\n card: { flexDirection: 'column' },\n media: { flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto' },\n },\n },\n [CardLayout.Overlay]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-end', minHeight: '340px', padding: ZERO_BOX },\n media: { position: 'absolute', top: '0px', right: '0px', bottom: '0px', left: '0px', flexBasis: 'auto' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: 'auto', borderRadius: '0px' },\n content: { position: 'relative', flexGrow: '0', flexShrink: '0', flexBasis: 'auto', padding: `72px ${CARD_PAD} ${CARD_PAD} ${CARD_PAD}` },\n contentStyle: Style.Scrim, contentScheme: Scheme.Inverse,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: false,\n },\n [CardLayout.Compact]: {\n card: { flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '72px' },\n image: { aspectRatio: '1 / 1', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: LEAD_SIZE },\n badgeOnMedia: false,\n partsOff: [CardPart.Text, CardPart.Actions],\n },\n};\n\nconst STACK_KEYS = {\n card: Object.keys(LAYOUTS[CardLayout.Side].stack!.card),\n media: Object.keys(LAYOUTS[CardLayout.Side].stack!.media),\n image: Object.keys(LAYOUTS[CardLayout.Side].stack!.image),\n};\n\n/** What a type's UNSTYLED node holds — passed so a style switch (Content ⇄ the scrim) hands the old\n * style's values back to the type, never to `undefined`. */\nexport type BaselineStyles = (type: string) => Readonly<Record<string, unknown>>;\n\nexport interface CardEditOptions {\n baselineStyles?: BaselineStyles;\n}\n\nexport interface CardOptions extends CardEditOptions {\n layout?: CardLayout;\n /** Which optional parts the card starts with (all, by default). */\n parts?: Partial<Record<CardPart, boolean>>;\n words?: Partial<CardWords>;\n badgeTone?: BadgeTone;\n}\n\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: CardRole | null, elementStyle: string | null,\n props: Record<string, unknown> = {}, label?: string): CompositeNode {\n const node = create({ key, type, props, elementStyle });\n if (role) node.role = role;\n if (label) node.label = label;\n writeStyles(node, role ? CARD_BASE[role] ?? {} : {});\n return node;\n}\n\nfunction buttonLabel(create: CompositeNodeFactory, key: string, words: string): CompositeNode {\n const label = make(create, key, Type.Text, null, Style.Label, { content: words, tag: 'span' });\n writeStyles(label, LABEL_BASE);\n return label;\n}\n\n/** Each optional part (and the locked title) as the recipe builds it. */\nconst PART_BUILDERS: Readonly<Record<CardPart, (create: CompositeNodeFactory, words: CardWords, tone: BadgeTone) => CompositeNode>> = {\n [CardPart.Media]: (create) => {\n const media = make(create, 'media', Type.Container, CardRole.Media, Style.Box, {}, 'Media');\n const image = make(create, 'image', Type.Image, null, Style.Media, { src: '', alt: '' });\n writeStyles(image, IMAGE_BASE);\n media.children = [image];\n return media;\n },\n [CardPart.Badge]: (create, words, tone) => {\n const badge = buildBadge(create, { tone, text: words.badge, key: 'badge' });\n badge.role = CardRole.Badge;\n badge.label = 'Badge';\n return badge;\n },\n [CardPart.Eyebrow]: (create, words) => make(create, 'eyebrow', Type.Text, CardRole.Eyebrow, Style.Eyebrow, { content: words.eyebrow, tag: 'p' }, 'Eyebrow'),\n [CardPart.Text]: (create, words) => make(create, 'text', Type.Text, CardRole.Text, Style.Body, { content: words.text, tag: 'p' }, 'Text'),\n [CardPart.Actions]: (create, words) => {\n const actions = make(create, 'actions', Type.Container, CardRole.Actions, Style.Box, {}, 'Buttons');\n const primary = make(create, 'primary', Type.ButtonBlock, null, Style.Primary);\n primary.children = [buttonLabel(create, 'primary-label', words.primary)];\n const ghost = make(create, 'secondary', Type.ButtonBlock, null, Style.Ghost);\n const icon = make(create, 'secondary-icon', Type.Icon, null, Style.Icon, { iconClass: SAVE_ICON });\n writeStyles(icon, INLINE_ICON);\n ghost.children = [icon, buttonLabel(create, 'secondary-label', words.secondary)];\n actions.children = [primary, ghost];\n return actions;\n },\n};\n\nfunction buildTitle(create: CompositeNodeFactory, words: CardWords): CompositeNode {\n return make(create, 'title', Type.Heading, CardRole.Title, Style.Title, { content: words.title, level: 'h3', [LINK_TYPE]: LinkType.None }, 'Title');\n}\n\n/** A fresh Card v2: every part a node with its role and element style, laid out by `options.layout`. */\nexport function buildCardRecipe(create: CompositeNodeFactory, options: CardOptions = {}): CompositeNode {\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const tone = options.badgeTone ?? BadgeTone.Accent;\n const on = (part: CardPart) => options.parts?.[part] !== false;\n const card = make(create, 'card', Type.Container, CardRole.Card, Style.Card, {}, 'Card');\n const content = make(create, 'content', Type.Container, CardRole.Content, Style.Box, {}, 'Content');\n content.children = [\n ...(on(CardPart.Eyebrow) ? [PART_BUILDERS[CardPart.Eyebrow](create, words, tone)] : []),\n buildTitle(create, words),\n ...(on(CardPart.Text) ? [PART_BUILDERS[CardPart.Text](create, words, tone)] : []),\n ...(on(CardPart.Actions) ? [PART_BUILDERS[CardPart.Actions](create, words, tone)] : []),\n ];\n card.children = [...(on(CardPart.Media) ? [PART_BUILDERS[CardPart.Media](create, words, tone)] : []), content];\n if (on(CardPart.Badge)) placeBadge(card, PART_BUILDERS[CardPart.Badge](create, words, tone), true);\n applyCardLayout(card, options.layout ?? CardLayout.Top, options);\n return card;\n}\n\n/** True when `node` is a Card v2 root. */\nexport function isCardRoot(node: CompositeNode | null | undefined): boolean {\n return node?.role === CardRole.Card;\n}\n\n/** The Card a part belongs to: the nearest ancestor (or the node itself) playing `card`. `path` = the\n * node's ancestors, root first. */\nexport function cardRootOf(node: CompositeNode, path: ReadonlyArray<CompositeNode>): CompositeNode | null {\n if (isCardRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isCardRoot(path[i])) return path[i];\n return null;\n}\n\n/** Card ▸ Parts: which optional parts the card holds now. */\nexport function cardPartsOf(card: CompositeNode): Record<CardPart, boolean> {\n return Object.fromEntries(CARD_PARTS.map(part => [part, !!findByRole(card, CARD_PART_ROLE[part])])) as Record<CardPart, boolean>;\n}\n\nconst imageOf = (media: CompositeNode | undefined): CompositeNode | undefined => media?.children?.find(c => c.type === Type.Image);\n\n/** Put the badge where the layout says: the Media's top corner, or the head of the content column\n * (Image behind text, Compact, or no Media at all). The corner's insets are logical, in iox-design.css\n * (mirrored in RTL); `position` is the node's own, because the editing canvas forces every node's\n * position from its style props. */\nfunction placeBadge(card: CompositeNode, badge: CompositeNode, onMedia: boolean): void {\n const media = findByRole(card, CardRole.Media);\n const content = findByRole(card, CardRole.Content);\n removeFromComposite(card, badge);\n const overMedia = onMedia && !!media;\n if (overMedia) media!.children = [...(media!.children ?? []), badge];\n else if (content) content.children = [badge, ...(content.children ?? [])];\n writeStyles(badge, { position: overMedia ? 'absolute' : 'static' });\n}\n\n/** Through design-core's ONE scheme writer — the same setting Section colours edits everywhere. */\nfunction writeScheme(node: CompositeNode, scheme: Scheme): void {\n setColorScheme(node, scheme);\n}\n\n/** Write one role's layout values from a spec (base + layers). */\nfunction applyPartLayout(card: CompositeNode, spec: CardLayoutSpec, part: CompositeNode, baseline: BaselineStyles): void {\n switch (part.role) {\n case CardRole.Card:\n writeStyles(part, { ...CARD_BASE[CardRole.Card], ...spec.card });\n setStack(part, spec.stack?.card, STACK_KEYS.card);\n return;\n case CardRole.Media: {\n writeStyles(part, { ...CARD_BASE[CardRole.Media], ...spec.media });\n setStack(part, spec.stack?.media, STACK_KEYS.media);\n const image = imageOf(part);\n if (image) {\n writeStyles(image, { ...IMAGE_BASE, ...spec.image });\n setStack(image, spec.stack?.image, STACK_KEYS.image);\n }\n return;\n }\n case CardRole.Content: {\n const current = part.elementStyle;\n if (current !== spec.contentStyle) {\n switchElementStyle(part, current, spec.contentStyle, baseline(part.type));\n part.elementStyle = spec.contentStyle;\n }\n writeStyles(part, { ...CARD_BASE[CardRole.Content], ...spec.content });\n writeScheme(part, spec.contentScheme);\n return;\n }\n case CardRole.Title:\n writeStyles(part, spec.title);\n return;\n default:\n return;\n }\n}\n\nfunction setStack(node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>): void {\n if (values) writeLayerStyles(node, CARD_STACK_BREAKPOINT, values);\n else clearLayerStyles(node, CARD_STACK_BREAKPOINT, keys);\n}\n\nexport interface CardLayoutResult {\n layout: CardLayout;\n /** Parts the preset switched off (Compact: Text and Buttons). */\n removed: CardPart[];\n}\n\n/**\n * Card ▸ Layout. Rewrites the card's LAYOUT styles for `layout` — the card's direction and box, the\n * Media's placement, the Image's aspect, the content block (Image behind text: the `media-scrim` style +\n * the Inverse scheme), the title size (Compact) and, for Image side, a Mobile layer that stacks it — and\n * moves the badge to where the layout puts it. Nothing else on any part. One undo step for the caller.\n */\nexport function applyCardLayout(card: CompositeNode, layout: CardLayout, options: CardEditOptions = {}): CardLayoutResult {\n const spec = LAYOUTS[layout];\n const baseline = options.baselineStyles ?? (() => ({}));\n const removed: CardPart[] = [];\n for (const part of spec.partsOff ?? []) if (setCardPart(card, part, false)) removed.push(part);\n applyPartLayout(card, spec, card, baseline);\n for (const role of [CardRole.Media, CardRole.Content, CardRole.Title]) {\n const part = findByRole(card, role);\n if (part) applyPartLayout(card, spec, part, baseline);\n }\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n return { layout, removed };\n}\n\nconst same = (a: unknown, b: unknown) => String(a ?? '').trim() === String(b ?? '').trim();\nconst holds = (node: CompositeNode, values: Readonly<Record<string, string>>) => Object.entries(values).every(([k, v]) => same(readStyle(node, k), v));\nconst holdsLayer = (node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>) =>\n values ? Object.entries(values).every(([k, v]) => same(readLayerStyle(node, CARD_STACK_BREAKPOINT, k), v))\n : keys.every(k => readLayerStyle(node, CARD_STACK_BREAKPOINT, k) === undefined);\n\nfunction matches(card: CompositeNode, spec: CardLayoutSpec): boolean {\n if (!holds(card, spec.card) || !holdsLayer(card, spec.stack?.card, STACK_KEYS.card)) return false;\n const media = findByRole(card, CardRole.Media);\n if (media) {\n if (!holds(media, spec.media) || !holdsLayer(media, spec.stack?.media, STACK_KEYS.media)) return false;\n const image = imageOf(media);\n if (image && (!holds(image, spec.image) || !holdsLayer(image, spec.stack?.image, STACK_KEYS.image))) return false;\n }\n const content = findByRole(card, CardRole.Content);\n if (content) {\n if (content.elementStyle !== spec.contentStyle || !holds(content, spec.content)) return false;\n if (!same(readProp(content, COLOR_SCHEME_TRAIT) ?? Scheme.Default, spec.contentScheme)) return false;\n }\n const title = findByRole(card, CardRole.Title);\n if (title && !holds(title, spec.title)) return false;\n const badge = findByRole(card, CardRole.Badge);\n if (badge && media) {\n const onMedia = parentInComposite(card, badge) === media;\n if (onMedia !== spec.badgeOnMedia) return false;\n }\n return true;\n}\n\n/** The layout the card's styles hold now, or `custom` once they were changed by hand (Card ▸ Layout). */\nexport function detectCardLayout(card: CompositeNode): CardLayoutState {\n return CARD_LAYOUTS.find(layout => matches(card, LAYOUTS[layout])) ?? CARD_LAYOUT_CUSTOM;\n}\n\nexport interface CardPartChange {\n part: CardPart;\n /** The node removed (off) or stamped (on); null when there was nothing to do. */\n node: CompositeNode | null;\n}\n\n/**\n * Card ▸ Parts. Off removes the part (the badge first moves out of a removed Media); on stamps it back\n * from the recipe into its role's slot, wearing its element style and laid out like the rest of the card\n * (the card's current layout; Image top when it is Custom). Returns the node touched, or null when the\n * card already was that way. Title and Content are not parts: they are locked (structure guard).\n */\nexport function setCardPart(card: CompositeNode, part: CardPart, on: boolean, create?: CompositeNodeFactory, options: CardOptions = {}): CompositeNode | null {\n const role = CARD_PART_ROLE[part];\n const existing = findByRole(card, role);\n if (!on) {\n if (!existing) return null;\n if (part === CardPart.Media) {\n const badge = findByRole(existing, CardRole.Badge);\n if (badge) placeBadge(card, badge, false);\n }\n removeFromComposite(card, existing);\n return existing;\n }\n if (existing || !create) return null;\n const layout = detectCardLayout(card);\n const spec = LAYOUTS[layout === CARD_LAYOUT_CUSTOM ? CardLayout.Top : layout];\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const node = PART_BUILDERS[part](create, words, options.badgeTone ?? BadgeTone.Accent);\n const content = findByRole(card, CardRole.Content);\n switch (part) {\n case CardPart.Media: {\n card.children = [node, ...(card.children ?? [])];\n applyPartLayout(card, spec, node, () => ({}));\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n break;\n }\n case CardPart.Badge:\n placeBadge(card, node, spec.badgeOnMedia);\n break;\n default:\n if (content) insertInContent(content, part, node);\n break;\n }\n return node;\n}\n\n/** The content column's order: [badge], eyebrow, title, text, buttons. */\nconst CONTENT_ORDER: ReadonlyArray<string> = [CardRole.Badge, CardRole.Eyebrow, CardRole.Title, CardRole.Text, CardRole.Actions];\n\nfunction insertInContent(content: CompositeNode, part: CardPart, node: CompositeNode): void {\n const rank = (n: CompositeNode) => { const i = CONTENT_ORDER.indexOf(n.role ?? ''); return i < 0 ? CONTENT_ORDER.length : i; };\n const children = [...(content.children ?? [])];\n const own = rank(node);\n const at = children.findIndex(c => rank(c) > own);\n children.splice(at < 0 ? children.length : at, 0, node);\n content.children = children;\n}\n\n// ── Link the whole card ──────────────────────────────────────────────────────────────────────\n\n/** The card's title — what \"Link the whole card\" makes the link (its words are the link's name). */\nexport function cardTitleOf(card: CompositeNode): CompositeNode | undefined {\n return findByRole(card, CardRole.Title);\n}\n\n/** True when the card links as a whole: its title carries a link (the stretched link renders from it). */\nexport function isCardLinked(card: CompositeNode): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const type = readProp(title, LINK_TYPE);\n return type === LinkType.Page || type === LinkType.External;\n}\n\n/**\n * Card ▸ Link ▸ \"Link the whole card\". On: the title links (to a website page, unless it already pointed\n * at a URL — the target it held is kept); off: the title links nowhere (its target is kept for the next\n * time). The stretched link itself is the shared CSS (iox-design.css), keyed on the title's anchor.\n */\nexport function setCardLinked(card: CompositeNode, on: boolean): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const current = readProp(title, LINK_TYPE);\n const next = on ? (current === LinkType.External ? LinkType.External : LinkType.Page) : LinkType.None;\n return writeProp(title, LINK_TYPE, next);\n}\n","import { CardPart, CardRole } from './card';\n\n/**\n * The structure every composite declares (composite-components plan §3a `RoleSpec`): where a role may\n * live and whether it is LOCKED (a structural part that cannot be deleted or moved out — a card always\n * has its content column and its title). Optional parts carry the Parts switch that re-adds them.\n * The builder's delete paths and its drop/paste rule ask `structureRefusal` — ONE answer for all of them.\n */\nexport interface CompositeRoleSpec {\n /** The role of the part's parent; null for a composite root. */\n readonly parent: string | null;\n readonly locked?: boolean;\n readonly part?: CardPart;\n}\n\nexport const COMPOSITE_ROLE_SPECS: Readonly<Record<string, CompositeRoleSpec>> = {\n [CardRole.Card]: { parent: null },\n [CardRole.Media]: { parent: CardRole.Card, part: CardPart.Media },\n [CardRole.Badge]: { parent: null, part: CardPart.Badge },\n [CardRole.Content]: { parent: CardRole.Card, locked: true },\n [CardRole.Eyebrow]: { parent: CardRole.Content, part: CardPart.Eyebrow },\n [CardRole.Title]: { parent: CardRole.Content, locked: true },\n [CardRole.Text]: { parent: CardRole.Content, part: CardPart.Text },\n [CardRole.Actions]: { parent: CardRole.Content, part: CardPart.Actions },\n};\n\nexport enum StructureEdit {\n Delete = 'delete',\n /** A drop, paste or wrap that would put the node somewhere new. */\n Move = 'move',\n}\n\nexport enum StructureRefusal {\n /** A locked part cannot be deleted (the card's Content and Title). */\n LockedPart = 'locked-part',\n /** A locked part can only live directly inside its own parent role. */\n LockedPlacement = 'locked-placement',\n}\n\ninterface RoleLike { role?: string | null }\n\n/**\n * Why the structure guard refuses `edit` on `node`, or null when it is allowed. `ancestors` (Move only) =\n * the new parent chain, root first, the direct parent last.\n */\nexport function structureRefusal(node: RoleLike | null | undefined, edit: StructureEdit, ancestors: ReadonlyArray<RoleLike> = []): StructureRefusal | null {\n const spec = node?.role ? COMPOSITE_ROLE_SPECS[node.role] : undefined;\n if (!spec?.locked) return null;\n if (edit === StructureEdit.Delete) return StructureRefusal.LockedPart;\n const parent = ancestors[ancestors.length - 1];\n return parent?.role === spec.parent ? null : StructureRefusal.LockedPlacement;\n}\n\n/** True when `node` is a locked part (shown with a lock and no delete in the layer tree). Deleting a whole\n * composite is always allowed — only its locked parts are refused. */\nexport function isLockedPart(node: RoleLike | null | undefined): boolean {\n return !!(node?.role && COMPOSITE_ROLE_SPECS[node.role]?.locked);\n}\n","/**\n * @vectoriox/iox-ui/composite-core — composites built from the builder's own parts (composite-components\n * plan §3a). FRAMEWORK-FREE: the builder, the SSR engine and iox-cms (generation-core's composer, the site\n * build) read the same recipes, roles and structure rules. Card v2 + Badge / Chip (T23 / T25) are the\n * first; Accordion and Tabs join with their own phases.\n * ⚠️ Consumers wire the usual trio — ng-package raw-ts assets, jest moduleNameMapper, tsconfig paths.\n */\nexport * from './composite-node';\nexport * from './badge';\nexport * from './card';\nexport * from './structure';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AA2CA,MAAM,UAAU,GAAG,CAAC,IAAmB,KAAc,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AAE/E;AACM,SAAU,QAAQ,CAAC,IAAmB,EAAE,IAAY,EAAA;AACtD,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AACnG;AAEA;SACgB,SAAS,CAAC,IAAmB,EAAE,IAAY,EAAE,KAAc,EAAA;AACvE,IAAA,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;AA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