@yomotech/view-toolkit 1.0.82 → 1.0.84

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.
@@ -3033,6 +3033,10 @@ function visitStyles(node, path, visit) {
3033
3033
  // - new: sizes per device, roundings per part, logo and pictures, font roles named like the Designer (point 173 step 2.1,
3034
3034
  // sketch dev/skizzen/theme-groessen.html) - "standard" is today's look (shown, never put on the page), "devices" lets a
3035
3035
  // value differ on tablet / web (key@tablet, key@web), "options" are the allowed values of a choice
3036
+ // - new: DESIGN_PARTS / themePartCss - the app parts a value goes to (card padding, radius, border, shadow), written only
3037
+ // for values a theme sets: no rule without a value, so today's look stays and a page's own style still wins (step 4b)
3038
+ // - new: borders, shadows per part, focus outline, gap between fields, page margin; per font role line height, letter
3039
+ // spacing and text shadow; kind "number" (a plain number such as a line height) - sketch areas 6 (point 173)
3036
3040
  // - new: DESIGN_DEVICE_MEDIA (tablet: 600 wide and high - a phone turned stays mobile; web: from 1280) and themeDeviceCss -
3037
3041
  // the device values of a theme and the app as @media rules (point 173 step 2.2)
3038
3042
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-09
@@ -3068,25 +3072,28 @@ const value = (key, group, kind, from) => ({
3068
3072
  const extra = (key, group, kind, standard, more = {}) => ({
3069
3073
  key, cssVar: `--vl-${key.replace(/\./g, '-')}`, group, kind, level: 'advanced', standard, ...more,
3070
3074
  });
3071
- /** The font roles, named like the Designer: [key part, family from, size, weight, capitals]. */
3075
+ /** The font roles, named like the Designer: [key part, family from, size, weight, capitals, letter spacing]. */
3072
3076
  const FONT_ROLES = [
3073
- ['header', 'font.heading-family', '1.05rem', '700', 'uppercase'],
3074
- ['page-title', 'font.heading-family', '1.6rem', '700', 'none'],
3075
- ['section-title', 'font.heading-family', '1.15rem', '700', 'none'],
3076
- ['label', 'font.family', '0.7rem', '500', 'uppercase'],
3077
- ['value', 'font.family', '1rem', '400', 'none'],
3078
- ['value-strong', 'font.heading-family', '1.15rem', '700', 'none'],
3079
- ['field', 'font.family', '1rem', '400', 'none'],
3080
- ['button', 'font.family', '0.95rem', '500', 'none'],
3081
- ['message', 'font.family', '0.85rem', '400', 'none'],
3077
+ ['header', 'font.heading-family', '1.05rem', '700', 'uppercase', '0.06em'],
3078
+ ['page-title', 'font.heading-family', '1.6rem', '700', 'none', '0'],
3079
+ ['section-title', 'font.heading-family', '1.15rem', '700', 'none', '0'],
3080
+ ['label', 'font.family', '0.7rem', '500', 'uppercase', '0.08em'],
3081
+ ['value', 'font.family', '1rem', '400', 'none', '0'],
3082
+ ['value-strong', 'font.heading-family', '1.15rem', '700', 'none', '0.03em'],
3083
+ ['field', 'font.family', '1rem', '400', 'none', '0'],
3084
+ ['button', 'font.family', '0.95rem', '500', 'none', '0'],
3085
+ ['message', 'font.family', '0.85rem', '400', 'none', '0'],
3082
3086
  ];
3083
- const fontRole = ([role, family, size, weight, capitals]) => [
3087
+ const fontRole = ([role, family, size, weight, capitals, spacing]) => [
3084
3088
  extra(`text.${role}.family`, 'text', 'font', '', { from: family }),
3085
3089
  extra(`text.${role}.size`, 'text', 'size', size),
3086
3090
  extra(`text.${role}.weight`, 'text', 'weight', weight),
3087
3091
  extra(`text.${role}.case`, 'text', 'choice', capitals, { options: ['none', 'uppercase'] }),
3088
3092
  extra(`text.${role}.style`, 'text', 'choice', 'normal', { options: ['normal', 'italic'] }),
3089
3093
  extra(`text.${role}.decoration`, 'text', 'choice', 'none', { options: ['none', 'underline'] }),
3094
+ extra(`text.${role}.line-height`, 'text', 'number', '1.3'),
3095
+ extra(`text.${role}.letter-spacing`, 'text', 'size', spacing),
3096
+ extra(`text.${role}.shadow`, 'text', 'shadow', 'none'),
3090
3097
  ];
3091
3098
  const DESIGN_VALUES = [
3092
3099
  value('color.primary', 'colors', 'color'),
@@ -3129,10 +3136,22 @@ const DESIGN_VALUES = [
3129
3136
  extra('size.touch-min', 'sizes', 'size', { mobile: '44px', web: '0' }, { devices: true }),
3130
3137
  extra('space.card', 'sizes', 'size', '16px', { devices: true }),
3131
3138
  extra('space.card-gap', 'sizes', 'size', '16px', { devices: true }),
3139
+ extra('space.field-gap', 'sizes', 'size', '12px', { devices: true }),
3140
+ extra('space.page', 'sizes', 'size', { mobile: '16px', tablet: '20px', web: '24px' }, { devices: true }),
3132
3141
  // roundings per part - all follow shape.radius unless set
3133
3142
  extra('shape.card-radius', 'shape', 'size', '8px', { from: 'shape.radius' }),
3134
3143
  extra('shape.field-radius', 'shape', 'size', '8px', { from: 'shape.radius' }),
3135
3144
  extra('shape.icon-radius', 'shape', 'size', '8px', { from: 'shape.button-radius' }),
3145
+ // borders and shadows per part, the outline of a field while it is used (focus)
3146
+ extra('border.card-width', 'border', 'size', '1px'),
3147
+ extra('border.field-width', 'border', 'size', '1px'),
3148
+ extra('border.button-width', 'border', 'size', '1px'),
3149
+ extra('shadow.card', 'depth', 'shadow', 'none'),
3150
+ extra('shadow.dialog', 'depth', 'shadow', '0 6px 20px rgba(0,0,0,.12)'),
3151
+ extra('shadow.button', 'depth', 'shadow', 'none'),
3152
+ extra('shadow.image', 'depth', 'shadow', 'none'),
3153
+ extra('focus.color', 'focus', 'color', '', { from: 'color.primary' }),
3154
+ extra('focus.width', 'focus', 'size', '2px'),
3136
3155
  // logo and pictures: how they stand - which logo and which pictures stay in Media
3137
3156
  extra('logo.height', 'logo', 'size', { mobile: '30px', tablet: '36px', web: '40px' }, { devices: true }),
3138
3157
  extra('logo.position', 'logo', 'choice', 'start', { options: ['start', 'center'] }),
@@ -3311,6 +3330,8 @@ function isSafeDesignValue(key, raw) {
3311
3330
  return /^[\w\s,'"-]+$/.test(v);
3312
3331
  if (item.kind === 'weight')
3313
3332
  return /^[1-9]00$/.test(v);
3333
+ if (item.kind === 'number')
3334
+ return /^[0-9]+(\.[0-9]+)?$/.test(v) && Number(v) <= 10;
3314
3335
  if (item.kind === 'choice')
3315
3336
  return (item.options ?? []).includes(v);
3316
3337
  return /^[\w\s#.,%()/-]+$/.test(v);
@@ -3357,6 +3378,26 @@ function themeDeviceCss(id, own) {
3357
3378
  .map((device) => `@media ${DESIGN_DEVICE_MEDIA[device]} { :root { ${Object.entries(devices[device]).map(([name, v]) => `${name}: ${v};`).join(' ')} } }`)
3358
3379
  .join('\n');
3359
3380
  }
3381
+ /**
3382
+ * The app parts a design value goes to - a rule per part, "$" is the value's variable. Written only for values a theme or
3383
+ * the app sets (themePartCss): without one there is no rule and today's look stays; a page's own style (stylePerCard,
3384
+ * inline) still wins over it, as the order theme -> app -> page -> element says (point 173 step 4b).
3385
+ */
3386
+ const DESIGN_PARTS = [
3387
+ { key: 'space.card', selector: '.vl-card-body', declaration: 'padding: $' },
3388
+ { key: 'shape.card-radius', selector: '.vl-card-body', declaration: 'border-radius: $' },
3389
+ { key: 'border.card-width', selector: '.vl-card-body', declaration: 'border: $ solid var(--vl-color-border, #e5e7eb)' },
3390
+ { key: 'shadow.card', selector: '.vl-card-body', declaration: 'box-shadow: $' },
3391
+ ];
3392
+ /** The rules of DESIGN_PARTS for the values the theme and the app's own values set (also through "from"); '' when none. */
3393
+ function themePartCss(id, own) {
3394
+ const variables = themeVariables(id, own);
3395
+ return DESIGN_PARTS
3396
+ .map((part) => ({ part, item: designValue(part.key) }))
3397
+ .filter(({ item }) => item && variables[item.cssVar] !== undefined)
3398
+ .map(({ part, item }) => `${part.selector} { ${part.declaration.replace('$', `var(${item.cssVar})`)}; }`)
3399
+ .join('\n');
3400
+ }
3360
3401
 
3361
3402
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-09
3362
3403
  // - new: opening hours as data (point 213 worklist 29, user decision A): a week of times per day (day, from, to; a day
@@ -3533,5 +3574,5 @@ function formatPrice(amount, currency, lang, fromWord = '') {
3533
3574
  * Generated bundle index. Do not edit.
3534
3575
  */
3535
3576
 
3536
- 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, buttonsColumnOf, 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 };
3577
+ 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_PARTS, 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, buttonsColumnOf, 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, themePartCss, themeVariables, totp, translateCaptions, uses12Hours, validAmount, validCurrency, validPlace, validTimeZone, validateSettings, validationSettings, vaultJwtLogin, vaultPlace, waitsForFilter, withElementAction, withPageSource, withTestData, zonedNow };
3537
3578
  //# sourceMappingURL=yomotech-view-toolkit-catalog.mjs.map