@vectoriox/iox-ui 5.13.0 → 5.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/design-core/index.d.ts
CHANGED
|
@@ -8591,16 +8591,10 @@ declare function fontsForTokens(tokens: ReadonlyArray<DesignTokenLike> | null |
|
|
|
8591
8591
|
*/
|
|
8592
8592
|
/** The 161 names of the contract's two tiers, plus its legacy aliases. */
|
|
8593
8593
|
declare function specTokenNames(): ReadonlySet<string>;
|
|
8594
|
-
/**
|
|
8595
|
-
* Names a PRE-DS2 rule still reads, because changing them would restyle a saved legacy page (D5):
|
|
8596
|
-
* the brand ramp F2 shipped (`deriveBrandTokens`, e.g. the legacy switch's `brand-500`). Computed
|
|
8597
|
-
* from the shipped function — never retyped — and only ever legitimate in an UNMARKED rule.
|
|
8598
|
-
*/
|
|
8599
|
-
declare function legacyTokenNames(): ReadonlySet<string>;
|
|
8600
8594
|
/** Every distinct token a stylesheet READS (`var(--iox-x…)`), in first-seen order. */
|
|
8601
8595
|
declare function tokenReferences(css: string): string[];
|
|
8602
|
-
/** The referenced names that are neither spec tokens
|
|
8596
|
+
/** The referenced names that are neither spec tokens nor in `alsoAllowed`. */
|
|
8603
8597
|
declare function unknownTokenReferences(css: string, alsoAllowed?: Iterable<string>): string[];
|
|
8604
8598
|
|
|
8605
|
-
export { ACCENT_TOKEN_NAMES, BUTTON_VARIANT_TO_STYLE, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, ElementStyleState, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, OwnedTraitLink, PALETTE_PRESETS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FONTS, SPEC_FONT_ROLES, SPEC_LEGACY_ALIASES, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SPRINGS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SWISS_FLAVOR, USER_TOKEN_SOURCE, WCAG_AA_TEXT, apcaLc, applyElementStyle, applyHeadingLevelRule, buildFlavorTokens, buildFontFaceCss, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, elementStyleById, elementStyleClass, elementStyleClasses, elementStylesFor, flavorSourceStamp, fontsForTokens, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType,
|
|
8599
|
+
export { ACCENT_TOKEN_NAMES, BUTTON_VARIANT_TO_STYLE, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, ElementStyleState, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, OwnedTraitLink, PALETTE_PRESETS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FONTS, SPEC_FONT_ROLES, SPEC_LEGACY_ALIASES, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SPRINGS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SWISS_FLAVOR, USER_TOKEN_SOURCE, WCAG_AA_TEXT, apcaLc, applyElementStyle, applyHeadingLevelRule, buildFlavorTokens, buildFontFaceCss, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, elementStyleById, elementStyleClass, elementStyleClasses, elementStylesFor, flavorSourceStamp, fontsForTokens, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, oklabToRgb, ownedTraitStatus, parseFontFamilies, parseHexColor, planFlavorRevert, planFlavorSeed, relativeLuminance, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, specTokenNames, springToLinear, styleKeyToKebab, switchElementStyle, syncElementStyleMarker, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, userFontStack, validateFlavorPack, wcagContrastRatio };
|
|
8606
8600
|
export type { AccentBackgrounds, AccentTokenName, ApplyElementStyleResult, DensityId, DesignChoices, DesignMode, DesignTokenGroup, DesignTokenLike, DesignTokenRow, DesignTokenTier, DesignTokenType, ElementStyle, ElementStyleTarget, ElementStyleTraitLike, FlavorPack, FlavorPackV2, FlavorRevertPlan, FlavorRevertSnapshot, FlavorSeedPlan, FlavorSpecToken, FlavorTokenDef, FontDescriptor, FontFormat, FontPair, FontRoleToken, FontStyle, LinearSpring, MotionId, OkLab, OwnedTrait, OwnedTraitStatus, PalettePreset, ResolvedMode, Rgb, SchemeId, ShapeId, StoredDesignTokenRow, SwitchElementStyleResult, TokenCssBlocks, TokenCssOptions };
|
|
@@ -10536,25 +10536,16 @@ function specTokenNames() {
|
|
|
10536
10536
|
...Object.keys(SPEC_LEGACY_ALIASES),
|
|
10537
10537
|
]);
|
|
10538
10538
|
}
|
|
10539
|
-
/**
|
|
10540
|
-
* Names a PRE-DS2 rule still reads, because changing them would restyle a saved legacy page (D5):
|
|
10541
|
-
* the brand ramp F2 shipped (`deriveBrandTokens`, e.g. the legacy switch's `brand-500`). Computed
|
|
10542
|
-
* from the shipped function — never retyped — and only ever legitimate in an UNMARKED rule.
|
|
10543
|
-
*/
|
|
10544
|
-
function legacyTokenNames() {
|
|
10545
|
-
return new Set(deriveBrandTokens('#808080', {}).map(t => t.name));
|
|
10546
|
-
}
|
|
10547
10539
|
const REFERENCE = /var\(\s*--iox-([a-z0-9-]+)/gi;
|
|
10548
10540
|
/** Every distinct token a stylesheet READS (`var(--iox-x…)`), in first-seen order. */
|
|
10549
10541
|
function tokenReferences(css) {
|
|
10550
10542
|
return [...new Set(Array.from(css.matchAll(REFERENCE), m => m[1]))];
|
|
10551
10543
|
}
|
|
10552
|
-
/** The referenced names that are neither spec tokens
|
|
10544
|
+
/** The referenced names that are neither spec tokens nor in `alsoAllowed`. */
|
|
10553
10545
|
function unknownTokenReferences(css, alsoAllowed = []) {
|
|
10554
10546
|
const spec = specTokenNames();
|
|
10555
|
-
const legacy = legacyTokenNames();
|
|
10556
10547
|
const extra = new Set(alsoAllowed);
|
|
10557
|
-
return tokenReferences(css).filter(name => !spec.has(name) && !
|
|
10548
|
+
return tokenReferences(css).filter(name => !spec.has(name) && !extra.has(name));
|
|
10558
10549
|
}
|
|
10559
10550
|
|
|
10560
10551
|
/**
|
|
@@ -10572,5 +10563,5 @@ function unknownTokenReferences(css, alsoAllowed = []) {
|
|
|
10572
10563
|
* Generated bundle index. Do not edit.
|
|
10573
10564
|
*/
|
|
10574
10565
|
|
|
10575
|
-
export { ACCENT_TOKEN_NAMES, BUTTON_VARIANT_TO_STYLE, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, ElementStyleState, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, OwnedTraitLink, PALETTE_PRESETS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FONTS, SPEC_FONT_ROLES, SPEC_LEGACY_ALIASES, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SPRINGS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SWISS_FLAVOR, USER_TOKEN_SOURCE, WCAG_AA_TEXT, apcaLc, applyElementStyle, applyHeadingLevelRule, buildFlavorTokens, buildFontFaceCss, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, elementStyleById, elementStyleClass, elementStyleClasses, elementStylesFor, flavorSourceStamp, fontsForTokens, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType,
|
|
10566
|
+
export { ACCENT_TOKEN_NAMES, BUTTON_VARIANT_TO_STYLE, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, ElementStyleState, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, OwnedTraitLink, PALETTE_PRESETS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FONTS, SPEC_FONT_ROLES, SPEC_LEGACY_ALIASES, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SPRINGS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SWISS_FLAVOR, USER_TOKEN_SOURCE, WCAG_AA_TEXT, apcaLc, applyElementStyle, applyHeadingLevelRule, buildFlavorTokens, buildFontFaceCss, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, elementStyleById, elementStyleClass, elementStyleClasses, elementStylesFor, flavorSourceStamp, fontsForTokens, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, oklabToRgb, ownedTraitStatus, parseFontFamilies, parseHexColor, planFlavorRevert, planFlavorSeed, relativeLuminance, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, specTokenNames, springToLinear, styleKeyToKebab, switchElementStyle, syncElementStyleMarker, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, userFontStack, validateFlavorPack, wcagContrastRatio };
|
|
10576
10567
|
//# sourceMappingURL=vectoriox-iox-ui-design-core.mjs.map
|