@yomotech/view-toolkit 1.0.79 → 1.0.81

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yomotech/view-toolkit",
3
- "version": "1.0.79",
3
+ "version": "1.0.81",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^21.0.0",
6
6
  "@angular/common": "^21.0.0",
@@ -1006,8 +1006,18 @@ declare function normalizeStyleSpelling<T>(doc: T): {
1006
1006
  findings: StyleSpellingFinding[];
1007
1007
  };
1008
1008
 
1009
- type DesignValueGroup = 'colors' | 'status' | 'header' | 'menu' | 'buttons' | 'fonts' | 'shape' | 'spacing' | 'depth';
1010
- type DesignValueKind = 'color' | 'font' | 'size' | 'shadow';
1009
+ type DesignValueGroup = 'colors' | 'status' | 'header' | 'menu' | 'buttons' | 'fonts' | 'shape' | 'spacing' | 'depth' | 'sizes' | 'logo' | 'images' | 'text';
1010
+ type DesignValueKind = 'color' | 'font' | 'size' | 'shadow' | 'weight' | 'choice';
1011
+ /** The devices a value may differ on: mobile is the key itself, the others key@tablet / key@web. */
1012
+ declare const DESIGN_DEVICES: readonly ["tablet", "web"];
1013
+ /** Where a device starts (CSS media query) - the same for the runtime's theme and the library's styles. */
1014
+ declare const DESIGN_DEVICE_MEDIA: Record<'tablet' | 'web', string>;
1015
+ /** Today's look of a value: one for all devices, or per device (mobile first; a device left out takes mobile's). */
1016
+ type DesignStandard = string | {
1017
+ mobile: string;
1018
+ tablet?: string;
1019
+ web?: string;
1020
+ };
1011
1021
  interface DesignValue {
1012
1022
  /** The name in a theme file, e.g. color.primary. */
1013
1023
  key: string;
@@ -1018,10 +1028,23 @@ interface DesignValue {
1018
1028
  level: 'basic' | 'advanced';
1019
1029
  /** An advanced value not set by the theme takes the value of this key. */
1020
1030
  from?: string;
1031
+ /** Today's look (what the styles fall back to) - shown in the Designer and the contract, never put on the page. */
1032
+ standard?: DesignStandard;
1033
+ /** The value may differ per device: key@tablet, key@web (mobile is the key itself). */
1034
+ devices?: true;
1035
+ /** A choice: the allowed values (CSS-ready). */
1036
+ options?: string[];
1021
1037
  }
1022
1038
  declare const DESIGN_VALUES: DesignValue[];
1023
- /** The value of a key, or undefined. */
1039
+ /** The value of a key, or undefined; a device key (size.button-height@web) names its value when that value has devices. */
1024
1040
  declare function designValue(key: string): DesignValue | undefined;
1041
+ /** The standard of a value on a device (mobile, tablet, web) - today's look; '' when it only follows another value. */
1042
+ declare function designStandard(item: DesignValue, device?: 'mobile' | 'tablet' | 'web'): string;
1043
+ /**
1044
+ * The device values of a theme (key@tablet, key@web) as CSS variables per device; {} for a device without any. The
1045
+ * key itself is mobile's and comes from designVariables - a device leaves out what it does not change.
1046
+ */
1047
+ declare function designDeviceVariables(values: Record<string, string>): Record<'tablet' | 'web', Record<string, string>>;
1025
1048
  /**
1026
1049
  * The CSS variables of a theme's values: what the theme leaves out follows its "from" chain; a value nothing leads to
1027
1050
  * stays out, so the style's own fallback - today's look - applies.
@@ -1066,6 +1089,11 @@ declare function safeDesignValues(own: unknown): Record<string, string>;
1066
1089
  * an app its own look as design values, never as CSS); {} when neither gives anything.
1067
1090
  */
1068
1091
  declare function themeVariables(id: unknown, own?: unknown): Record<string, string>;
1092
+ /**
1093
+ * The device values of a theme and the app's own values over it (key@tablet, key@web) as CSS: one @media rule per device
1094
+ * that has any, tablet before web; '' when none. Values pass isSafeDesignValue first (safeDesignValues).
1095
+ */
1096
+ declare function themeDeviceCss(id: unknown, own?: unknown): string;
1069
1097
 
1070
1098
  declare const WEEK_DAYS: readonly ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
1071
1099
  type WeekDay = typeof WEEK_DAYS[number];
@@ -1115,5 +1143,5 @@ declare function validCurrency(code: unknown): boolean;
1115
1143
  /** The price in a language: "32 €" (de), "€32" (en), with the word for "from" before it; '' for no amount. */
1116
1144
  declare function formatPrice(amount: unknown, currency: unknown, lang: string, fromWord?: string): string;
1117
1145
 
1118
- export { APP_DATA_KEEP, APP_KEYBOARD_DEVICES, APP_SETTINGS, APP_SETTINGS_PATH, APP_SETTING_BLOCKS, BACKEND_ACTIONS, BASIC_TYPES, BROWSER_STORAGES, CALCULATE_OPERATORS, CALL_KEYS, CALL_KINDS, CARD_LAYOUTS, CONTACT_ICONS, CONTACT_KINDS, CONTROLS, CONTROL_TYPES, DATA_FORMATS, DATA_OBJECT_KEYS, DATA_OBJECT_NAME_PLACES, DATA_OBJECT_PLACES, DEFAULT_DEVICES, DEFAULT_TEMPO_SECONDS, DESIGN_VALUES, DISPLAY_FORMATS, DOCUMENT_KINDS, ENTER_KEYS, EXPECT_KINDS, FORMATS, FRAME_PARTS, FRAME_SELECTORS, HEADER_SCROLLS, INNER_ACTIONS, KEYBOARD_CONTROLS, KEYBOARD_TYPES, LIST_STATES, LOGIN_FLAGS, LOGIN_METHODS, LOGIN_STORAGES, LOGIN_WHEN, MENU_DECIDED_BY, MENU_ENTRY_KINDS, MENU_STYLES, MENU_SWITCHABLE, NO_CALL_ACTIONS, NUMBER_STYLES, OLD_CALL_KEYS, OLD_DEVICE_NAMES, OLD_STORAGES, ORIENTATIONS, PAGINATION_ALIGNS, PAGINATION_PLACEMENTS, PAGINATION_TYPES, PLACEHOLDER_CONTROLS, PLACEHOLDER_SOURCE, PRICE_CURRENCIES, RESULTS_DIR, RESULTS_KEEP, RTL_LANGUAGES, SETTING_MENU_TEXTS, SHOWN_TEXT_KEYS, STANDARD_THEMES, START_PAGE_KEYS, START_PAGE_PATH, STEP_KINDS, STORAGES, STRIPE_TEST_CARDS, SYSTEM_KEYBOARDS, TEMPORAL_TRANSFER, TERMS_DOCUMENTS, TESTS_DIR, TEST_DATA_FILE, TEST_DEVICES, TEST_TEMPOS, THEME_FONTS, THEME_PATH, TYPE_ALIASES, WEEK_DAYS, actionName, actionParams, alignRowsOf, appSettingsFooter, appSettingsMenu, appTheme, assertFieldSettings, base32Bytes, baseType, basicType, callAttributes, callKindOf, camelStyleKey, canonicalControl, cardLayoutOf, checkAppSettings, checkCall, checkElementAction, checkPagePagination, checkTestFlow, clone, contactLink, controlChoicesFor, controlsFor, convertOlderForms, cssStyle, cssStyleKey, dataSettings, dateOrder, defaultKeyboard, designValue, designVariables, deviceChoices, displaySettings, effectiveControl, effectiveFormat, elementAction, enterKeyFor, flowDevices, flowLanguages, formatPrice, hasAppKeyboard, headerScrollOf, isKeyboardCheck, isSafeDesignValue, isStyleHolder, keyboardFor, languageName, layoutNotes, layoutProblems, localeKeys, localeRenderings, loginMethod, mapEmbedUrl, matchesTemplate, maxLinesOf, menuCaption, menuEntries, menuEntryByCaption, menuEntryForPage, menuPage, methodOf, normalizeFormat, normalizeStyleSpelling, openingProblems, openingStatus, pageOf, paginationFor, parseDevice, probeClearAppData, probeField, probeFieldVisible, probeInFrame, probeLayoutSnapshot, probePagePlace, probeRestoreStorage, probeStorageSnapshot, probeUntranslated, readAppSettings, readTestUser, renameDataObject, resolveProperty, resultsToDelete, rolesOf, rulesFor, safeDesignValues, startPage, startPageFor, stepKind, storageOf, stripeTestPaymentMethod, styleSpellingFindings, styleValue, successMessageOf, tempoPause, temporalPart, testDataRefs, testUserEntry, themeFontKnown, themeVariables, totp, translateCaptions, uses12Hours, validAmount, validCurrency, validPlace, validTimeZone, validateSettings, validationSettings, vaultJwtLogin, vaultPlace, waitsForFilter, withElementAction, withPageSource, withTestData, zonedNow };
1119
- export type { ActionPlace, ActionRule, AppSettingBlock, AppSettingDef, AppSettings, AppSettingsFooter, AppSettingsProblem, AppTheme, Bag$1 as Bag, CallKind, CallKindRule, CallProblem, CardLayout, ContactKind, ConversionChange, DesignValue, DesignValueGroup, DesignValueKind, DocumentKind, ElementAction, EnterKey, FlowResult, HeaderScroll, LayoutBox, LayoutScroller, LayoutSnapshot, LoginStorage, LoginWhen, MenuEntryKind, MenuStyle, OpeningStatus, OpeningTime, Orientation, Pagination, PaginationAlign, PaginationPlacement, PaginationType, Setting, StepResult, Storage, StyleSpellingFinding, TemporalPart, TermsDocument, TestDevice, TestExpect, TestFlow, TestProblem, TestRun, TestStep, TestTempo, TestUser, TestUserEntry, ThemeFont, WeekDay };
1146
+ export { APP_DATA_KEEP, APP_KEYBOARD_DEVICES, APP_SETTINGS, APP_SETTINGS_PATH, APP_SETTING_BLOCKS, BACKEND_ACTIONS, BASIC_TYPES, BROWSER_STORAGES, CALCULATE_OPERATORS, CALL_KEYS, CALL_KINDS, CARD_LAYOUTS, CONTACT_ICONS, CONTACT_KINDS, CONTROLS, CONTROL_TYPES, DATA_FORMATS, DATA_OBJECT_KEYS, DATA_OBJECT_NAME_PLACES, DATA_OBJECT_PLACES, DEFAULT_DEVICES, DEFAULT_TEMPO_SECONDS, DESIGN_DEVICES, DESIGN_DEVICE_MEDIA, DESIGN_VALUES, DISPLAY_FORMATS, DOCUMENT_KINDS, ENTER_KEYS, EXPECT_KINDS, FORMATS, FRAME_PARTS, FRAME_SELECTORS, HEADER_SCROLLS, INNER_ACTIONS, KEYBOARD_CONTROLS, KEYBOARD_TYPES, LIST_STATES, LOGIN_FLAGS, LOGIN_METHODS, LOGIN_STORAGES, LOGIN_WHEN, MENU_DECIDED_BY, MENU_ENTRY_KINDS, MENU_STYLES, MENU_SWITCHABLE, NO_CALL_ACTIONS, NUMBER_STYLES, OLD_CALL_KEYS, OLD_DEVICE_NAMES, OLD_STORAGES, ORIENTATIONS, PAGINATION_ALIGNS, PAGINATION_PLACEMENTS, PAGINATION_TYPES, PLACEHOLDER_CONTROLS, PLACEHOLDER_SOURCE, PRICE_CURRENCIES, RESULTS_DIR, RESULTS_KEEP, RTL_LANGUAGES, SETTING_MENU_TEXTS, SHOWN_TEXT_KEYS, STANDARD_THEMES, START_PAGE_KEYS, START_PAGE_PATH, STEP_KINDS, STORAGES, STRIPE_TEST_CARDS, SYSTEM_KEYBOARDS, TEMPORAL_TRANSFER, TERMS_DOCUMENTS, TESTS_DIR, TEST_DATA_FILE, TEST_DEVICES, TEST_TEMPOS, THEME_FONTS, THEME_PATH, TYPE_ALIASES, WEEK_DAYS, actionName, actionParams, alignRowsOf, appSettingsFooter, appSettingsMenu, appTheme, assertFieldSettings, base32Bytes, baseType, basicType, callAttributes, callKindOf, camelStyleKey, canonicalControl, cardLayoutOf, checkAppSettings, checkCall, checkElementAction, checkPagePagination, checkTestFlow, clone, contactLink, controlChoicesFor, controlsFor, convertOlderForms, cssStyle, cssStyleKey, dataSettings, dateOrder, defaultKeyboard, designDeviceVariables, designStandard, designValue, designVariables, deviceChoices, displaySettings, effectiveControl, effectiveFormat, elementAction, enterKeyFor, flowDevices, flowLanguages, formatPrice, hasAppKeyboard, headerScrollOf, isKeyboardCheck, isSafeDesignValue, isStyleHolder, keyboardFor, languageName, layoutNotes, layoutProblems, localeKeys, localeRenderings, loginMethod, mapEmbedUrl, matchesTemplate, maxLinesOf, menuCaption, menuEntries, menuEntryByCaption, menuEntryForPage, menuPage, methodOf, normalizeFormat, normalizeStyleSpelling, openingProblems, openingStatus, pageOf, paginationFor, parseDevice, probeClearAppData, probeField, probeFieldVisible, probeInFrame, probeLayoutSnapshot, probePagePlace, probeRestoreStorage, probeStorageSnapshot, probeUntranslated, readAppSettings, readTestUser, renameDataObject, resolveProperty, resultsToDelete, rolesOf, rulesFor, safeDesignValues, startPage, startPageFor, stepKind, storageOf, stripeTestPaymentMethod, styleSpellingFindings, styleValue, successMessageOf, tempoPause, temporalPart, testDataRefs, testUserEntry, themeDeviceCss, themeFontKnown, themeVariables, totp, translateCaptions, uses12Hours, validAmount, validCurrency, validPlace, validTimeZone, validateSettings, validationSettings, vaultJwtLogin, vaultPlace, waitsForFilter, withElementAction, withPageSource, withTestData, zonedNow };
1147
+ export type { ActionPlace, ActionRule, AppSettingBlock, AppSettingDef, AppSettings, AppSettingsFooter, AppSettingsProblem, AppTheme, Bag$1 as Bag, CallKind, CallKindRule, CallProblem, CardLayout, ContactKind, ConversionChange, DesignStandard, DesignValue, DesignValueGroup, DesignValueKind, DocumentKind, ElementAction, EnterKey, FlowResult, HeaderScroll, LayoutBox, LayoutScroller, LayoutSnapshot, LoginStorage, LoginWhen, MenuEntryKind, MenuStyle, OpeningStatus, OpeningTime, Orientation, Pagination, PaginationAlign, PaginationPlacement, PaginationType, Setting, StepResult, Storage, StyleSpellingFinding, TemporalPart, TermsDocument, TestDevice, TestExpect, TestFlow, TestProblem, TestRun, TestStep, TestTempo, TestUser, TestUserEntry, ThemeFont, WeekDay };