@yomotech/view-toolkit 1.0.82 → 1.0.83

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,8 @@ 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: borders, shadows per part, focus outline, gap between fields, page margin; per font role line height, letter
3037
+ // spacing and text shadow; kind "number" (a plain number such as a line height) - sketch areas 6 (point 173)
3036
3038
  // - new: DESIGN_DEVICE_MEDIA (tablet: 600 wide and high - a phone turned stays mobile; web: from 1280) and themeDeviceCss -
3037
3039
  // the device values of a theme and the app as @media rules (point 173 step 2.2)
3038
3040
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-09
@@ -3068,25 +3070,28 @@ const value = (key, group, kind, from) => ({
3068
3070
  const extra = (key, group, kind, standard, more = {}) => ({
3069
3071
  key, cssVar: `--vl-${key.replace(/\./g, '-')}`, group, kind, level: 'advanced', standard, ...more,
3070
3072
  });
3071
- /** The font roles, named like the Designer: [key part, family from, size, weight, capitals]. */
3073
+ /** The font roles, named like the Designer: [key part, family from, size, weight, capitals, letter spacing]. */
3072
3074
  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'],
3075
+ ['header', 'font.heading-family', '1.05rem', '700', 'uppercase', '0.06em'],
3076
+ ['page-title', 'font.heading-family', '1.6rem', '700', 'none', '0'],
3077
+ ['section-title', 'font.heading-family', '1.15rem', '700', 'none', '0'],
3078
+ ['label', 'font.family', '0.7rem', '500', 'uppercase', '0.08em'],
3079
+ ['value', 'font.family', '1rem', '400', 'none', '0'],
3080
+ ['value-strong', 'font.heading-family', '1.15rem', '700', 'none', '0.03em'],
3081
+ ['field', 'font.family', '1rem', '400', 'none', '0'],
3082
+ ['button', 'font.family', '0.95rem', '500', 'none', '0'],
3083
+ ['message', 'font.family', '0.85rem', '400', 'none', '0'],
3082
3084
  ];
3083
- const fontRole = ([role, family, size, weight, capitals]) => [
3085
+ const fontRole = ([role, family, size, weight, capitals, spacing]) => [
3084
3086
  extra(`text.${role}.family`, 'text', 'font', '', { from: family }),
3085
3087
  extra(`text.${role}.size`, 'text', 'size', size),
3086
3088
  extra(`text.${role}.weight`, 'text', 'weight', weight),
3087
3089
  extra(`text.${role}.case`, 'text', 'choice', capitals, { options: ['none', 'uppercase'] }),
3088
3090
  extra(`text.${role}.style`, 'text', 'choice', 'normal', { options: ['normal', 'italic'] }),
3089
3091
  extra(`text.${role}.decoration`, 'text', 'choice', 'none', { options: ['none', 'underline'] }),
3092
+ extra(`text.${role}.line-height`, 'text', 'number', '1.3'),
3093
+ extra(`text.${role}.letter-spacing`, 'text', 'size', spacing),
3094
+ extra(`text.${role}.shadow`, 'text', 'shadow', 'none'),
3090
3095
  ];
3091
3096
  const DESIGN_VALUES = [
3092
3097
  value('color.primary', 'colors', 'color'),
@@ -3129,10 +3134,22 @@ const DESIGN_VALUES = [
3129
3134
  extra('size.touch-min', 'sizes', 'size', { mobile: '44px', web: '0' }, { devices: true }),
3130
3135
  extra('space.card', 'sizes', 'size', '16px', { devices: true }),
3131
3136
  extra('space.card-gap', 'sizes', 'size', '16px', { devices: true }),
3137
+ extra('space.field-gap', 'sizes', 'size', '12px', { devices: true }),
3138
+ extra('space.page', 'sizes', 'size', { mobile: '16px', tablet: '20px', web: '24px' }, { devices: true }),
3132
3139
  // roundings per part - all follow shape.radius unless set
3133
3140
  extra('shape.card-radius', 'shape', 'size', '8px', { from: 'shape.radius' }),
3134
3141
  extra('shape.field-radius', 'shape', 'size', '8px', { from: 'shape.radius' }),
3135
3142
  extra('shape.icon-radius', 'shape', 'size', '8px', { from: 'shape.button-radius' }),
3143
+ // borders and shadows per part, the outline of a field while it is used (focus)
3144
+ extra('border.card-width', 'border', 'size', '1px'),
3145
+ extra('border.field-width', 'border', 'size', '1px'),
3146
+ extra('border.button-width', 'border', 'size', '1px'),
3147
+ extra('shadow.card', 'depth', 'shadow', 'none'),
3148
+ extra('shadow.dialog', 'depth', 'shadow', '0 6px 20px rgba(0,0,0,.12)'),
3149
+ extra('shadow.button', 'depth', 'shadow', 'none'),
3150
+ extra('shadow.image', 'depth', 'shadow', 'none'),
3151
+ extra('focus.color', 'focus', 'color', '', { from: 'color.primary' }),
3152
+ extra('focus.width', 'focus', 'size', '2px'),
3136
3153
  // logo and pictures: how they stand - which logo and which pictures stay in Media
3137
3154
  extra('logo.height', 'logo', 'size', { mobile: '30px', tablet: '36px', web: '40px' }, { devices: true }),
3138
3155
  extra('logo.position', 'logo', 'choice', 'start', { options: ['start', 'center'] }),
@@ -3311,6 +3328,8 @@ function isSafeDesignValue(key, raw) {
3311
3328
  return /^[\w\s,'"-]+$/.test(v);
3312
3329
  if (item.kind === 'weight')
3313
3330
  return /^[1-9]00$/.test(v);
3331
+ if (item.kind === 'number')
3332
+ return /^[0-9]+(\.[0-9]+)?$/.test(v) && Number(v) <= 10;
3314
3333
  if (item.kind === 'choice')
3315
3334
  return (item.options ?? []).includes(v);
3316
3335
  return /^[\w\s#.,%()/-]+$/.test(v);