@selfhelp/shared 1.14.20 → 1.14.24

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/dist/{common-DMm4kymA.d.mts → common-qaDIAYS3.d.mts} +5 -4
  3. package/dist/{common-DMm4kymA.d.ts → common-qaDIAYS3.d.ts} +5 -4
  4. package/dist/index.d.mts +9 -9
  5. package/dist/index.d.ts +9 -9
  6. package/dist/index.js +99 -175
  7. package/dist/index.mjs +99 -172
  8. package/dist/plugin-sdk/index.d.mts +2 -2
  9. package/dist/plugin-sdk/index.d.ts +2 -2
  10. package/dist/plugin-sdk/index.js +90 -91
  11. package/dist/plugin-sdk/index.mjs +90 -91
  12. package/dist/registry/index.d.mts +3 -3
  13. package/dist/registry/index.d.ts +3 -3
  14. package/dist/registry/index.js +90 -90
  15. package/dist/registry/index.mjs +90 -90
  16. package/dist/{styles.registry-B8IaEULk.d.ts → styles.registry-4W0LzmZB.d.mts} +194 -365
  17. package/dist/{styles.registry-DhkxrV2-.d.mts → styles.registry-D6xMm5VR.d.ts} +194 -365
  18. package/dist/theme/index.d.mts +42 -91
  19. package/dist/theme/index.d.ts +42 -91
  20. package/dist/theme/index.js +9 -85
  21. package/dist/theme/index.mjs +9 -82
  22. package/dist/theme/tailwind.d.mts +2 -2
  23. package/dist/theme/tailwind.d.ts +2 -2
  24. package/package.json +1 -1
  25. package/src/plugin-sdk/define.ts +0 -1
  26. package/src/registry/__tests__/platform.test.ts +0 -4
  27. package/src/registry/__tests__/registry.test.ts +0 -2
  28. package/src/registry/styles.registry.ts +90 -96
  29. package/src/theme/__tests__/mantineVariant.test.ts +2 -2
  30. package/src/theme/__tests__/semantic.test.ts +34 -71
  31. package/src/theme/mantineVariant.ts +3 -3
  32. package/src/theme/semantic.ts +45 -185
  33. package/src/theme/tailwind.ts +2 -2
  34. package/src/theme/tokens.ts +3 -3
  35. package/src/types/__tests__/mobile-adapters.test.ts +1 -1
  36. package/src/types/mantine/common.ts +4 -3
  37. package/src/types/mobile-adapters.ts +4 -4
  38. package/src/types/styles/auth.ts +10 -10
  39. package/src/types/styles/base.ts +2 -2
  40. package/src/types/styles/composite.ts +7 -9
  41. package/src/types/styles/error.ts +9 -9
  42. package/src/types/styles/forms.ts +74 -58
  43. package/src/types/styles/interactive.ts +34 -32
  44. package/src/types/styles/layout.ts +42 -42
  45. package/src/types/styles/media.ts +6 -6
  46. package/src/types/styles/typography.ts +13 -13
  47. package/src/utils/spacing.ts +1 -1
@@ -45,7 +45,7 @@ export type TMantineScrollAreaType = 'hover' | 'always' | 'auto' | 'never' | 'sc
45
45
 
46
46
  export interface IContainerStyle extends IStyleWithSpacing {
47
47
  style_name: 'container';
48
- shared_size?: IContentField<TSharedSize>;
48
+ size?: IContentField<TSharedSize>;
49
49
  web_fluid?: IContentField<string>;
50
50
  }
51
51
 
@@ -55,20 +55,20 @@ export interface IBoxStyle extends IStyleWithSpacing {
55
55
 
56
56
  export interface IFlexStyle extends IStyleWithSpacing {
57
57
  style_name: 'flex';
58
- shared_gap?: IContentField<TMantineGap>;
59
- shared_justify?: IContentField<TMantineJustify>;
60
- shared_align?: IContentField<TMantineAlign>;
61
- shared_direction?: IContentField<TMantineDirection>;
62
- shared_wrap?: IContentField<TMantineWrap>;
58
+ gap?: IContentField<TMantineGap>;
59
+ justify?: IContentField<TMantineJustify>;
60
+ align?: IContentField<TMantineAlign>;
61
+ direction?: IContentField<TMantineDirection>;
62
+ wrap?: IContentField<TMantineWrap>;
63
63
  shared_width?: IContentField<TSharedDimension>;
64
64
  shared_height?: IContentField<TSharedDimension>;
65
65
  }
66
66
 
67
67
  export interface IGroupStyle extends IStyleWithSpacing {
68
68
  style_name: 'group';
69
- shared_gap?: IContentField<TMantineGap>;
70
- shared_justify?: IContentField<TMantineJustify>;
71
- shared_align?: IContentField<TMantineAlign>;
69
+ gap?: IContentField<TMantineGap>;
70
+ justify?: IContentField<TMantineJustify>;
71
+ align?: IContentField<TMantineAlign>;
72
72
  shared_width?: IContentField<TSharedDimension>;
73
73
  shared_height?: IContentField<TSharedDimension>;
74
74
  web_group_wrap?: IContentField<'0' | '1'>;
@@ -77,21 +77,21 @@ export interface IGroupStyle extends IStyleWithSpacing {
77
77
 
78
78
  export interface IStackStyle extends IStyleWithSpacing {
79
79
  style_name: 'stack';
80
- shared_gap?: IContentField<TMantineGap>;
81
- shared_justify?: IContentField<TMantineJustify>;
82
- shared_align?: IContentField<TMantineAlign>;
80
+ gap?: IContentField<TMantineGap>;
81
+ justify?: IContentField<TMantineJustify>;
82
+ align?: IContentField<TMantineAlign>;
83
83
  shared_width?: IContentField<TSharedDimension>;
84
84
  shared_height?: IContentField<TSharedDimension>;
85
85
  }
86
86
 
87
87
  export interface ISimpleGridStyle extends IStyleWithSpacing {
88
88
  style_name: 'simple-grid';
89
- shared_cols?: IContentField<TSharedCols>;
90
- shared_gap?: IContentField<TMantineGap>;
91
- shared_vertical_spacing?: IContentField<TMantineGap>;
89
+ cols?: IContentField<TSharedCols>;
90
+ gap?: IContentField<TMantineGap>;
91
+ vertical_spacing?: IContentField<TMantineGap>;
92
92
  shared_width?: IContentField<TSharedDimension>;
93
93
  shared_height?: IContentField<TSharedDimension>;
94
- // Web-only responsive column overrides; clear to inherit shared_cols.
94
+ // Web-only responsive column overrides; clear to inherit cols.
95
95
  web_cols_sm?: IContentField<TSharedCols>;
96
96
  web_cols_md?: IContentField<TSharedCols>;
97
97
  web_cols_lg?: IContentField<TSharedCols>;
@@ -99,10 +99,10 @@ export interface ISimpleGridStyle extends IStyleWithSpacing {
99
99
 
100
100
  export interface IGridStyle extends IStyleWithSpacing {
101
101
  style_name: 'grid';
102
- shared_cols?: IContentField<TSharedCols>;
103
- shared_gap?: IContentField<TMantineGap>;
104
- shared_justify?: IContentField<TMantineJustify>;
105
- shared_align?: IContentField<TMantineAlign>;
102
+ cols?: IContentField<TSharedCols>;
103
+ gap?: IContentField<TMantineGap>;
104
+ justify?: IContentField<TMantineJustify>;
105
+ align?: IContentField<TMantineAlign>;
106
106
  shared_width?: IContentField<TSharedDimension>;
107
107
  shared_height?: IContentField<TSharedDimension>;
108
108
  web_grid_overflow?: IContentField<TMantineGridOverflow>;
@@ -110,28 +110,28 @@ export interface IGridStyle extends IStyleWithSpacing {
110
110
 
111
111
  export interface IGridColumnStyle extends IStyleWithSpacing {
112
112
  style_name: 'grid-column';
113
- shared_grid_span?: IContentField<TMantineGridSpan>;
114
- shared_grid_offset?: IContentField<TMantineGridOffset>;
115
- shared_grid_order?: IContentField<TMantineGridOrder>;
116
- shared_grid_grow?: IContentField<TMantineGridGrow>;
113
+ grid_span?: IContentField<TMantineGridSpan>;
114
+ grid_offset?: IContentField<TMantineGridOffset>;
115
+ grid_order?: IContentField<TMantineGridOrder>;
116
+ grid_grow?: IContentField<TMantineGridGrow>;
117
117
  shared_width?: IContentField<TSharedDimension>;
118
118
  shared_height?: IContentField<TSharedDimension>;
119
119
  }
120
120
 
121
121
  export interface ISpaceStyle extends IStyleWithSpacing {
122
122
  style_name: 'space';
123
- shared_size?: IContentField<TSharedSize>;
124
- shared_orientation?: IContentField<TMantineOrientation>;
123
+ size?: IContentField<TSharedSize>;
124
+ orientation?: IContentField<TMantineOrientation>;
125
125
  }
126
126
 
127
127
  export interface IDividerStyle extends IStyleWithSpacing {
128
128
  style_name: 'divider';
129
- shared_divider_variant?: IContentField<TSharedDividerVariant>;
130
- shared_size?: IContentField<TSharedSize>;
129
+ divider_variant?: IContentField<TSharedDividerVariant>;
130
+ size?: IContentField<TSharedSize>;
131
131
  divider_label?: IContentField<string>;
132
- shared_divider_label_position?: IContentField<TSharedDividerLabelPosition>;
133
- shared_orientation?: IContentField<TMantineOrientation>;
134
- shared_color?: IContentField<TMantineColor>;}
132
+ divider_label_position?: IContentField<TSharedDividerLabelPosition>;
133
+ orientation?: IContentField<TMantineOrientation>;
134
+ color?: IContentField<TMantineColor>;}
135
135
 
136
136
  export interface IPaperStyle extends IStyleWithSpacing {
137
137
  style_name: 'paper';
@@ -139,18 +139,18 @@ export interface IPaperStyle extends IStyleWithSpacing {
139
139
  // never auto-creates a child section.
140
140
  title?: IContentField<string>;
141
141
  web_paper_shadow?: IContentField<TMantinePaperShadow>;
142
- shared_radius?: IContentField<TSharedRadius>;
143
- shared_border?: IContentField<TSharedBorder>;}
142
+ radius?: IContentField<TSharedRadius>;
143
+ border?: IContentField<TSharedBorder>;}
144
144
 
145
145
  export interface ICenterStyle extends IStyleWithSpacing {
146
146
  style_name: 'center';
147
147
  web_center_inline?: IContentField<string>;
148
148
  shared_width?: IContentField<TSharedDimension>;
149
149
  shared_height?: IContentField<TSharedDimension>;
150
- shared_miw?: IContentField<TSharedDimension>;
151
- shared_mih?: IContentField<TSharedDimension>;
152
- shared_maw?: IContentField<TSharedDimension>;
153
- shared_mah?: IContentField<TSharedDimension>;
150
+ miw?: IContentField<TSharedDimension>;
151
+ mih?: IContentField<TSharedDimension>;
152
+ maw?: IContentField<TSharedDimension>;
153
+ mah?: IContentField<TSharedDimension>;
154
154
  }
155
155
 
156
156
  export interface IScrollAreaStyle extends IStyleWithSpacing {
@@ -169,17 +169,17 @@ export interface ICardStyle extends IStyleWithSpacing {
169
169
  title?: IContentField<string>;
170
170
  img_src?: IContentField<string>;
171
171
  // Cross-platform border (Mantine withBorder / themed border on mobile).
172
- shared_border?: IContentField<TSharedBorder>;
173
- // NOTE: no web-only card padding — padding is the portable `shared_spacing`
172
+ border?: IContentField<TSharedBorder>;
173
+ // NOTE: no web-only card padding — padding is the portable `spacing`
174
174
  // (pt/pb/ps/pe), which renders on web AND mobile. The renderer keeps a fixed
175
175
  // Mantine inner padding ("md") as the default + Card.Section bleed reference.
176
176
  web_card_shadow?: IContentField<TMantineCardShadow>;
177
- shared_radius?: IContentField<TSharedRadius>;}
177
+ radius?: IContentField<TSharedRadius>;}
178
178
 
179
179
  export interface ICardSegmentStyle extends IStyleWithSpacing {
180
180
  style_name: 'card-segment';
181
181
  // Mantine Card.Section withBorder (themed divider on mobile).
182
- shared_border?: IContentField<TSharedBorder>;
182
+ border?: IContentField<TSharedBorder>;
183
183
  // Mantine Card.Section inheritPadding (web only).
184
184
  web_segment_inherit_padding?: IContentField<'0' | '1'>;}
185
185
 
@@ -190,7 +190,7 @@ export interface IAspectRatioStyle extends IBaseStyle {
190
190
  export interface IBackgroundImageStyle extends IStyleWithSpacing {
191
191
  style_name: 'background-image';
192
192
  img_src?: IContentField<string>;
193
- shared_radius?: IContentField<TSharedRadius>;}
193
+ radius?: IContentField<TSharedRadius>;}
194
194
 
195
195
  /**
196
196
  * Renders content referenced from another section. Has no own fields; the
@@ -14,14 +14,13 @@ export interface IImageStyle extends IStyleWithSpacing {
14
14
  is_fluid?: IContentField<string>;
15
15
  alt?: IContentField<string>;
16
16
  img_src?: IContentField<string>;
17
- height?: IContentField<string>;
18
- width?: IContentField<string>;
19
17
  web_image_fit?: IContentField<TMantineImageFit>;
20
18
  web_width?: IContentField<TMantineWidth>;
21
19
  web_height?: IContentField<TMantineHeight>;
22
- shared_radius?: IContentField<TMantineRadius>;
20
+ radius?: IContentField<TMantineRadius>;
23
21
  /** Image shown when the main source fails to load (Mantine Image fallbackSrc). */
24
- fallback_src?: IContentField<string>;}
22
+ fallback_src?: IContentField<string>;
23
+ }
25
24
 
26
25
  export interface IVideoStyle extends IStyleWithSpacing {
27
26
  style_name: 'video';
@@ -66,7 +65,7 @@ export interface ICarouselStyle extends IStyleWithSpacing {
66
65
  web_height?: IContentField<string>;
67
66
  web_carousel_slide_size?: IContentField<string>;
68
67
  web_carousel_slide_gap?: IContentField<string>;
69
- shared_orientation?: IContentField<string>;
68
+ orientation?: IContentField<string>;
70
69
  web_control_size?: IContentField<string>;
71
70
  web_carousel_controls_offset?: IContentField<string>;
72
71
  web_carousel_next_control_icon?: IContentField<string>;
@@ -78,4 +77,5 @@ export interface ICarouselStyle extends IStyleWithSpacing {
78
77
  skip_snaps?: IContentField<string>;
79
78
  web_carousel_in_view_threshold?: IContentField<string>;
80
79
  web_carousel_duration?: IContentField<string>;
81
- web_carousel_embla_options?: IContentField<string>;}
80
+ web_carousel_embla_options?: IContentField<string>;
81
+ }
@@ -32,22 +32,22 @@ export interface ITitleStyle extends IStyleWithSpacing {
32
32
  content?: IContentField<string>;
33
33
  // Semantic heading level (H1-H6) read on both platforms.
34
34
  title_order?: IContentField<TMantineTitleOrder>;
35
- shared_size?: IContentField<TMantineSize>;
36
- shared_color?: IContentField<TMantineColor>;
35
+ size?: IContentField<TMantineSize>;
36
+ color?: IContentField<TMantineColor>;
37
37
  web_title_text_wrap?: IContentField<TMantineTitleTextWrap>;
38
38
  // Web lineClamp / mobile numberOfLines.
39
- shared_line_clamp?: IContentField<TMantineTitleLineClamp>;}
39
+ line_clamp?: IContentField<TMantineTitleLineClamp>;}
40
40
 
41
41
  export interface ITextStyle extends IStyleWithSpacing {
42
42
  style_name: 'text';
43
43
  text?: IContentField<string>;
44
- shared_size?: IContentField<TMantineSize>;
45
- shared_color?: IContentField<TMantineColor>;
44
+ size?: IContentField<TMantineSize>;
45
+ color?: IContentField<TMantineColor>;
46
46
  web_text_font_weight?: IContentField<TMantineTextFontWeight>;
47
47
  web_text_font_style?: IContentField<TMantineTextFontStyle>;
48
48
  web_text_text_decoration?: IContentField<TMantineTextDecoration>;
49
49
  web_text_text_transform?: IContentField<TMantineTextTransform>;
50
- shared_text_align?: IContentField<TMantineTextAlign>;
50
+ text_align?: IContentField<TMantineTextAlign>;
51
51
  web_text_variant?: IContentField<TMantineTextVariant>;
52
52
  web_text_gradient?: IContentField<string>;
53
53
  web_text_truncate?: IContentField<TMantineTextTruncate>;
@@ -59,8 +59,8 @@ export interface ICodeStyle extends IStyleWithSpacing {
59
59
  style_name: 'code';
60
60
  // Cross-platform block-vs-inline behaviour.
61
61
  code_block?: IContentField<string>;
62
- shared_color?: IContentField<TMantineColor>;
63
- shared_radius?: IContentField<TSharedRadius>;
62
+ color?: IContentField<TMantineColor>;
63
+ radius?: IContentField<TSharedRadius>;
64
64
  content?: IContentField<string>;
65
65
  }
66
66
 
@@ -68,7 +68,7 @@ export interface IHighlightStyle extends IStyleWithSpacing {
68
68
  style_name: 'highlight';
69
69
  text?: IContentField<string>;
70
70
  highlight_highlight?: IContentField<string>;
71
- shared_color?: IContentField<TMantineColor>;}
71
+ color?: IContentField<TMantineColor>;}
72
72
 
73
73
  export interface IBlockquoteStyle extends IStyleWithSpacing {
74
74
  style_name: 'blockquote';
@@ -77,7 +77,7 @@ export interface IBlockquoteStyle extends IStyleWithSpacing {
77
77
  cite?: IContentField<string>;
78
78
  web_left_icon?: IContentField<string>;
79
79
  web_icon_size?: IContentField<TMantineIconSize>;
80
- shared_color?: IContentField<TMantineColor>;}
80
+ color?: IContentField<TMantineColor>;}
81
81
 
82
82
  export interface IHtmlTagStyle extends IBaseStyle {
83
83
  style_name: 'html-tag';
@@ -88,7 +88,7 @@ export interface IHtmlTagStyle extends IBaseStyle {
88
88
  export interface IKbdStyle extends IStyleWithSpacing {
89
89
  style_name: 'kbd';
90
90
  label?: IContentField<string>;
91
- shared_size?: IContentField<TMantineSize>;}
91
+ size?: IContentField<TMantineSize>;}
92
92
 
93
93
  export interface ITypographyStyle extends IStyleWithSpacing {
94
94
  style_name: 'typography';}
@@ -98,7 +98,7 @@ export interface IFieldsetStyle extends IStyleWithSpacing {
98
98
  label?: IContentField<string>;
99
99
  legend?: IContentField<string>;
100
100
  web_fieldset_variant?: IContentField<TMantineFieldsetVariant>;
101
- shared_radius?: IContentField<TMantineRadius>; disabled?: IContentField<string>;
101
+ radius?: IContentField<TMantineRadius>; disabled?: IContentField<string>;
102
102
  }
103
103
 
104
104
  export interface ISpoilerStyle extends IStyleWithSpacing {
@@ -107,4 +107,4 @@ export interface ISpoilerStyle extends IStyleWithSpacing {
107
107
  spoiler_show_label?: IContentField<string>;
108
108
  spoiler_hide_label?: IContentField<string>;
109
109
  /** Color of the show/hide control link. */
110
- shared_color?: IContentField<TMantineColor>;}
110
+ color?: IContentField<TMantineColor>;}
@@ -3,7 +3,7 @@ SPDX-FileCopyrightText: 2026 Humdek, University of Bern
3
3
  SPDX-License-Identifier: MPL-2.0
4
4
  */
5
5
  /**
6
- * Parse the unified `shared_spacing` field. The CMS
6
+ * Parse the unified `spacing` field. The CMS
7
7
  * stores this as a JSON string with optional keys for each side:
8
8
  *
9
9
  * { "mt": "md", "mb": "lg", "ms": "0", "me": "auto",