@yomotech/view-toolkit 1.0.78 → 1.0.80
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/fesm2022/yomotech-view-toolkit-catalog.mjs +86 -3
- package/fesm2022/yomotech-view-toolkit-catalog.mjs.map +1 -1
- package/fesm2022/yomotech-view-toolkit.mjs +8 -1
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/yomotech-view-toolkit-catalog.d.ts +26 -5
|
@@ -3020,6 +3020,10 @@ function visitStyles(node, path, visit) {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
3022
|
|
|
3023
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-18
|
|
3024
|
+
// - new: sizes per device, roundings per part, logo and pictures, font roles named like the Designer (point 173 step 2.1,
|
|
3025
|
+
// sketch dev/skizzen/theme-groessen.html) - "standard" is today's look (shown, never put on the page), "devices" lets a
|
|
3026
|
+
// value differ on tablet / web (key@tablet, key@web), "options" are the allowed values of a choice
|
|
3023
3027
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-09
|
|
3024
3028
|
// - fix: an app's own menu colours bring the derived ones (muted text, hover, divider) - the theme's stayed on a light menu
|
|
3025
3029
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-08
|
|
@@ -3034,6 +3038,8 @@ function visitStyles(node, path, visit) {
|
|
|
3034
3038
|
// AI contract. Two levels: "basic" is what a person chooses, "advanced" follows from the basic values (from) unless
|
|
3035
3039
|
// a theme sets it. A style uses var(--vl-..., today's value): without a theme an app looks as before.
|
|
3036
3040
|
// - new: STANDARD_THEMES, themeVariables - the platform's themes; an app names one in center.theme of Main
|
|
3041
|
+
/** The devices a value may differ on: mobile is the key itself, the others key@tablet / key@web. */
|
|
3042
|
+
const DESIGN_DEVICES = ['tablet', 'web'];
|
|
3037
3043
|
const value = (key, group, kind, from) => ({
|
|
3038
3044
|
key,
|
|
3039
3045
|
cssVar: `--vl-${key.replace(/\./g, '-')}`,
|
|
@@ -3042,6 +3048,30 @@ const value = (key, group, kind, from) => ({
|
|
|
3042
3048
|
level: from ? 'advanced' : 'basic',
|
|
3043
3049
|
...(from ? { from } : {}),
|
|
3044
3050
|
});
|
|
3051
|
+
/** A value of the advanced level with today's look as its standard (no "from": nothing else leads to it). */
|
|
3052
|
+
const extra = (key, group, kind, standard, more = {}) => ({
|
|
3053
|
+
key, cssVar: `--vl-${key.replace(/\./g, '-')}`, group, kind, level: 'advanced', standard, ...more,
|
|
3054
|
+
});
|
|
3055
|
+
/** The font roles, named like the Designer: [key part, family from, size, weight, capitals]. */
|
|
3056
|
+
const FONT_ROLES = [
|
|
3057
|
+
['header', 'font.heading-family', '1.05rem', '700', 'uppercase'],
|
|
3058
|
+
['page-title', 'font.heading-family', '1.6rem', '700', 'none'],
|
|
3059
|
+
['section-title', 'font.heading-family', '1.15rem', '700', 'none'],
|
|
3060
|
+
['label', 'font.family', '0.7rem', '500', 'uppercase'],
|
|
3061
|
+
['value', 'font.family', '1rem', '400', 'none'],
|
|
3062
|
+
['value-strong', 'font.heading-family', '1.15rem', '700', 'none'],
|
|
3063
|
+
['field', 'font.family', '1rem', '400', 'none'],
|
|
3064
|
+
['button', 'font.family', '0.95rem', '500', 'none'],
|
|
3065
|
+
['message', 'font.family', '0.85rem', '400', 'none'],
|
|
3066
|
+
];
|
|
3067
|
+
const fontRole = ([role, family, size, weight, capitals]) => [
|
|
3068
|
+
extra(`text.${role}.family`, 'text', 'font', '', { from: family }),
|
|
3069
|
+
extra(`text.${role}.size`, 'text', 'size', size),
|
|
3070
|
+
extra(`text.${role}.weight`, 'text', 'weight', weight),
|
|
3071
|
+
extra(`text.${role}.case`, 'text', 'choice', capitals, { options: ['none', 'uppercase'] }),
|
|
3072
|
+
extra(`text.${role}.style`, 'text', 'choice', 'normal', { options: ['normal', 'italic'] }),
|
|
3073
|
+
extra(`text.${role}.decoration`, 'text', 'choice', 'none', { options: ['none', 'underline'] }),
|
|
3074
|
+
];
|
|
3045
3075
|
const DESIGN_VALUES = [
|
|
3046
3076
|
value('color.primary', 'colors', 'color'),
|
|
3047
3077
|
value('color.text', 'colors', 'color'),
|
|
@@ -3076,10 +3106,59 @@ const DESIGN_VALUES = [
|
|
|
3076
3106
|
value('space.large', 'spacing', 'size', 'space.medium'),
|
|
3077
3107
|
value('shadow.small', 'depth', 'shadow'),
|
|
3078
3108
|
value('shadow.large', 'depth', 'shadow', 'shadow.small'),
|
|
3109
|
+
// sizes per device (point 173, 2026-11-18) - today's numbers of the accepted tm-guided card
|
|
3110
|
+
extra('size.button-height', 'sizes', 'size', { mobile: '44px', web: '40px' }, { devices: true }),
|
|
3111
|
+
extra('size.icon-button', 'sizes', 'size', { mobile: '36px', web: '32px' }, { devices: true }),
|
|
3112
|
+
extra('size.field-height', 'sizes', 'size', { mobile: '44px', web: '40px' }, { devices: true }),
|
|
3113
|
+
extra('size.touch-min', 'sizes', 'size', { mobile: '44px', web: '0' }, { devices: true }),
|
|
3114
|
+
extra('space.card', 'sizes', 'size', '16px', { devices: true }),
|
|
3115
|
+
extra('space.card-gap', 'sizes', 'size', '16px', { devices: true }),
|
|
3116
|
+
// roundings per part - all follow shape.radius unless set
|
|
3117
|
+
extra('shape.card-radius', 'shape', 'size', '8px', { from: 'shape.radius' }),
|
|
3118
|
+
extra('shape.field-radius', 'shape', 'size', '8px', { from: 'shape.radius' }),
|
|
3119
|
+
extra('shape.icon-radius', 'shape', 'size', '8px', { from: 'shape.button-radius' }),
|
|
3120
|
+
// logo and pictures: how they stand - which logo and which pictures stay in Media
|
|
3121
|
+
extra('logo.height', 'logo', 'size', { mobile: '30px', tablet: '36px', web: '40px' }, { devices: true }),
|
|
3122
|
+
extra('logo.position', 'logo', 'choice', 'start', { options: ['start', 'center'] }),
|
|
3123
|
+
extra('logo.with-name', 'logo', 'choice', 'show', { options: ['show', 'hide'] }),
|
|
3124
|
+
extra('logo.background', 'logo', 'choice', 'none', { options: ['none', 'card'] }),
|
|
3125
|
+
extra('header.height', 'header', 'size', { mobile: '56px', tablet: '64px', web: '64px' }, { devices: true }),
|
|
3126
|
+
extra('image.radius', 'images', 'size', '8px', { from: 'shape.radius' }),
|
|
3127
|
+
extra('image.ratio', 'images', 'choice', '4 / 3', { options: ['4 / 3', '1 / 1', '16 / 9', 'auto'] }),
|
|
3128
|
+
extra('image.fit', 'images', 'choice', 'cover', { options: ['cover', 'contain'] }),
|
|
3129
|
+
extra('image.inset', 'images', 'choice', 'none', { options: ['none', 'card'] }),
|
|
3130
|
+
extra('image.placeholder', 'images', 'color', '', { from: 'color.border' }),
|
|
3131
|
+
// font roles: family, size, weight, capitals, italic, underline per role
|
|
3132
|
+
...FONT_ROLES.flatMap(fontRole),
|
|
3079
3133
|
];
|
|
3080
|
-
/** The value of a key, or undefined. */
|
|
3134
|
+
/** The value of a key, or undefined; a device key (size.button-height@web) names its value when that value has devices. */
|
|
3081
3135
|
function designValue(key) {
|
|
3082
|
-
|
|
3136
|
+
const [base, device] = String(key).split('@');
|
|
3137
|
+
const item = DESIGN_VALUES.find((v) => v.key === base);
|
|
3138
|
+
if (device === undefined)
|
|
3139
|
+
return item;
|
|
3140
|
+
return item?.devices && DESIGN_DEVICES.includes(device) ? item : undefined;
|
|
3141
|
+
}
|
|
3142
|
+
/** The standard of a value on a device (mobile, tablet, web) - today's look; '' when it only follows another value. */
|
|
3143
|
+
function designStandard(item, device = 'mobile') {
|
|
3144
|
+
const standard = item.standard ?? '';
|
|
3145
|
+
if (typeof standard === 'string')
|
|
3146
|
+
return standard;
|
|
3147
|
+
return standard[device] ?? standard.mobile;
|
|
3148
|
+
}
|
|
3149
|
+
/**
|
|
3150
|
+
* The device values of a theme (key@tablet, key@web) as CSS variables per device; {} for a device without any. The
|
|
3151
|
+
* key itself is mobile's and comes from designVariables - a device leaves out what it does not change.
|
|
3152
|
+
*/
|
|
3153
|
+
function designDeviceVariables(values) {
|
|
3154
|
+
const result = { tablet: {}, web: {} };
|
|
3155
|
+
for (const [key, raw] of Object.entries(values)) {
|
|
3156
|
+
const device = key.split('@')[1];
|
|
3157
|
+
const item = device ? designValue(key) : undefined;
|
|
3158
|
+
if (item && (device === 'tablet' || device === 'web'))
|
|
3159
|
+
result[device][item.cssVar] = raw;
|
|
3160
|
+
}
|
|
3161
|
+
return result;
|
|
3083
3162
|
}
|
|
3084
3163
|
/**
|
|
3085
3164
|
* The CSS variables of a theme's values: what the theme leaves out follows its "from" chain; a value nothing leads to
|
|
@@ -3214,6 +3293,10 @@ function isSafeDesignValue(key, raw) {
|
|
|
3214
3293
|
return size.test(v);
|
|
3215
3294
|
if (item.kind === 'font')
|
|
3216
3295
|
return /^[\w\s,'"-]+$/.test(v);
|
|
3296
|
+
if (item.kind === 'weight')
|
|
3297
|
+
return /^[1-9]00$/.test(v);
|
|
3298
|
+
if (item.kind === 'choice')
|
|
3299
|
+
return (item.options ?? []).includes(v);
|
|
3217
3300
|
return /^[\w\s#.,%()/-]+$/.test(v);
|
|
3218
3301
|
}
|
|
3219
3302
|
/** The app's own design values (Main center.themeValues) that pass isSafeDesignValue - the others are left out. */
|
|
@@ -3422,5 +3505,5 @@ function formatPrice(amount, currency, lang, fromWord = '') {
|
|
|
3422
3505
|
* Generated bundle index. Do not edit.
|
|
3423
3506
|
*/
|
|
3424
3507
|
|
|
3425
|
-
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 };
|
|
3508
|
+
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_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, themeFontKnown, themeVariables, totp, translateCaptions, uses12Hours, validAmount, validCurrency, validPlace, validTimeZone, validateSettings, validationSettings, vaultJwtLogin, vaultPlace, waitsForFilter, withElementAction, withPageSource, withTestData, zonedNow };
|
|
3426
3509
|
//# sourceMappingURL=yomotech-view-toolkit-catalog.mjs.map
|