@selfhelp/shared 1.2.5 → 1.3.1
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/CHANGELOG.md +341 -326
- package/LICENSE +381 -381
- package/README.md +57 -57
- package/dist/index.d.mts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +102 -102
- package/src/api/__tests__/endpoints.test.ts +45 -0
- package/src/api/endpoints.ts +2 -0
- package/src/api/index.ts +5 -5
- package/src/assets/__tests__/resolveAssetUrl.test.ts +61 -61
- package/src/assets/index.ts +5 -5
- package/src/assets/resolveAssetUrl.ts +44 -44
- package/src/cms-classes/__tests__/classify.test.ts +63 -63
- package/src/cms-classes/allow-list.ts +158 -158
- package/src/cms-classes/classify.ts +90 -90
- package/src/cms-classes/index.ts +7 -7
- package/src/cms-classes/remap.ts +44 -44
- package/src/condition/__tests__/evaluate.test.ts +54 -54
- package/src/condition/evaluate.ts +121 -121
- package/src/condition/index.ts +5 -5
- package/src/index.ts +25 -25
- package/src/interpolation/__tests__/replaceCalcedValues.test.ts +41 -41
- package/src/interpolation/index.ts +5 -5
- package/src/interpolation/replaceCalcedValues.ts +27 -27
- package/src/plugin-sdk/define.ts +89 -89
- package/src/plugin-sdk/index.ts +103 -103
- package/src/plugin-sdk/lock.ts +124 -124
- package/src/plugin-sdk/manifest.ts +307 -307
- package/src/plugin-sdk/realtime.ts +277 -277
- package/src/plugin-sdk/registry.ts +105 -105
- package/src/plugin-sdk/runtime-shim.ts +140 -140
- package/src/plugin-sdk/types.ts +315 -315
- package/src/plugin-sdk/version.ts +209 -209
- package/src/registry/__tests__/registry.test.ts +135 -135
- package/src/registry/index.ts +94 -94
- package/src/registry/styles.registry.ts +295 -295
- package/src/testing/__tests__/testing-kit.test.ts +228 -228
- package/src/testing/index.ts +483 -483
- package/src/theme/index.ts +6 -6
- package/src/theme/tailwind.ts +73 -73
- package/src/theme/tokens.ts +177 -177
- package/src/types/api/auth.ts +22 -0
- package/src/types/api/envelope.ts +34 -34
- package/src/types/api/forms.ts +76 -76
- package/src/types/api/index.ts +9 -9
- package/src/types/api/language.ts +12 -12
- package/src/types/api/page.ts +9 -9
- package/src/types/index.ts +17 -17
- package/src/types/mantine/common.ts +142 -142
- package/src/types/pages.ts +107 -107
- package/src/types/styles/auth.ts +184 -184
- package/src/types/styles/base.ts +72 -72
- package/src/types/styles/composite.ts +131 -131
- package/src/types/styles/forms.ts +439 -439
- package/src/types/styles/interactive.ts +165 -165
- package/src/types/styles/layout.ts +184 -184
- package/src/types/styles/media.ts +68 -68
- package/src/types/styles/typography.ts +118 -118
- package/src/types/styles/unknown.ts +220 -220
- package/src/utils/__tests__/transformPageData.test.ts +69 -69
- package/src/utils/spacing.ts +64 -64
- package/src/utils/transformPageData.ts +99 -99
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
-
import type {
|
|
7
|
-
TMantineSize,
|
|
8
|
-
TMantineSpacing,
|
|
9
|
-
TMantineRadius,
|
|
10
|
-
TMantineColor,
|
|
11
|
-
TMantineOrientation,
|
|
12
|
-
TMantineDirection,
|
|
13
|
-
TMantineWrap,
|
|
14
|
-
TMantineJustify,
|
|
15
|
-
TMantineAlign,
|
|
16
|
-
TMantineGridSpan,
|
|
17
|
-
} from '../mantine/common';
|
|
18
|
-
|
|
19
|
-
// Style-specific helper types only used in layout interfaces
|
|
20
|
-
export type TMantineBorder = '0' | '1';
|
|
21
|
-
export type TMantineWidth = string;
|
|
22
|
-
export type TMantineHeight = string;
|
|
23
|
-
export type TMantineDividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
24
|
-
export type TMantinePaperShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
25
|
-
export type TMantineCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
26
|
-
export type TMantineGap = '0' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
27
|
-
export type TMantineCols = string;
|
|
28
|
-
export type TMantineGridOffset = string;
|
|
29
|
-
export type TMantineGridOrder = string;
|
|
30
|
-
export type TMantineScrollAreaSize = string;
|
|
31
|
-
export type TMantineScrollAreaType = 'hover' | 'always' | 'never' | 'scroll';
|
|
32
|
-
|
|
33
|
-
export interface IContainerStyle extends IStyleWithSpacing {
|
|
34
|
-
style_name: 'container';
|
|
35
|
-
mantine_size?: IContentField<TMantineSize>;
|
|
36
|
-
mantine_fluid?: IContentField<string>;
|
|
37
|
-
mantine_px?: IContentField<TMantineSpacing>;
|
|
38
|
-
mantine_py?: IContentField<TMantineSpacing>;
|
|
39
|
-
use_mantine_style?: IContentField<string>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IBoxStyle extends IStyleWithSpacing {
|
|
43
|
-
style_name: 'box';
|
|
44
|
-
content?: IContentField<string>;
|
|
45
|
-
use_mantine_style?: IContentField<string>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface IFlexStyle extends IStyleWithSpacing {
|
|
49
|
-
style_name: 'flex';
|
|
50
|
-
mantine_gap?: IContentField<TMantineGap>;
|
|
51
|
-
mantine_justify?: IContentField<TMantineJustify>;
|
|
52
|
-
mantine_align?: IContentField<TMantineAlign>;
|
|
53
|
-
mantine_direction?: IContentField<TMantineDirection>;
|
|
54
|
-
mantine_wrap?: IContentField<TMantineWrap>;
|
|
55
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
56
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface IGroupStyle extends IStyleWithSpacing {
|
|
60
|
-
style_name: 'group';
|
|
61
|
-
mantine_gap?: IContentField<TMantineGap>;
|
|
62
|
-
mantine_justify?: IContentField<TMantineJustify>;
|
|
63
|
-
mantine_align?: IContentField<TMantineAlign>;
|
|
64
|
-
mantine_group_wrap?: IContentField<'0' | '1'>;
|
|
65
|
-
mantine_group_grow?: IContentField<'0' | '1'>;
|
|
66
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
67
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface IStackStyle extends IStyleWithSpacing {
|
|
71
|
-
style_name: 'stack';
|
|
72
|
-
mantine_gap?: IContentField<TMantineGap>;
|
|
73
|
-
mantine_justify?: IContentField<TMantineJustify>;
|
|
74
|
-
mantine_align?: IContentField<TMantineAlign>;
|
|
75
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
76
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface ISimpleGridStyle extends IStyleWithSpacing {
|
|
80
|
-
style_name: 'simple-grid';
|
|
81
|
-
mantine_cols?: IContentField<TMantineCols>;
|
|
82
|
-
mantine_spacing?: IContentField<TMantineSpacing>;
|
|
83
|
-
mantine_breakpoints?: IContentField<string>;
|
|
84
|
-
mantine_vertical_spacing?: IContentField<TMantineSpacing>;
|
|
85
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
86
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface IGridStyle extends IStyleWithSpacing {
|
|
90
|
-
style_name: 'grid';
|
|
91
|
-
mantine_cols?: IContentField<TMantineCols>;
|
|
92
|
-
mantine_gap?: IContentField<TMantineGap>;
|
|
93
|
-
mantine_justify?: IContentField<TMantineJustify>;
|
|
94
|
-
mantine_align?: IContentField<TMantineAlign>;
|
|
95
|
-
mantine_grid_overflow?: IContentField<string>;
|
|
96
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
97
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
98
|
-
use_mantine_style?: IContentField<string>;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface IGridColumnStyle extends IStyleWithSpacing {
|
|
102
|
-
style_name: 'grid-column';
|
|
103
|
-
mantine_grid_span?: IContentField<TMantineGridSpan>;
|
|
104
|
-
mantine_grid_offset?: IContentField<TMantineGridOffset>;
|
|
105
|
-
mantine_grid_order?: IContentField<TMantineGridOrder>;
|
|
106
|
-
mantine_grid_grow?: IContentField<string>;
|
|
107
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
108
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
109
|
-
use_mantine_style?: IContentField<string>;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export interface ISpaceStyle extends IStyleWithSpacing {
|
|
113
|
-
style_name: 'space';
|
|
114
|
-
mantine_size?: IContentField<TMantineSize>;
|
|
115
|
-
mantine_space_direction?: IContentField<string>;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface IDividerStyle extends IBaseStyle {
|
|
119
|
-
style_name: 'divider';
|
|
120
|
-
mantine_divider_variant?: IContentField<TMantineDividerVariant>;
|
|
121
|
-
mantine_size?: IContentField<TMantineSize>;
|
|
122
|
-
mantine_divider_label?: IContentField<string>;
|
|
123
|
-
mantine_divider_label_position?: IContentField<string>;
|
|
124
|
-
mantine_orientation?: IContentField<TMantineOrientation>;
|
|
125
|
-
mantine_color?: IContentField<TMantineColor>;
|
|
126
|
-
use_mantine_style?: IContentField<string>;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export interface IPaperStyle extends IStyleWithSpacing {
|
|
130
|
-
style_name: 'paper';
|
|
131
|
-
mantine_paper_shadow?: IContentField<TMantinePaperShadow>;
|
|
132
|
-
mantine_radius?: IContentField<TMantineRadius>;
|
|
133
|
-
mantine_px?: IContentField<TMantineSpacing>;
|
|
134
|
-
mantine_py?: IContentField<TMantineSpacing>;
|
|
135
|
-
mantine_border?: IContentField<TMantineBorder>;
|
|
136
|
-
use_mantine_style?: IContentField<string>;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface ICenterStyle extends IBaseStyle {
|
|
140
|
-
style_name: 'center';
|
|
141
|
-
mantine_center_inline?: IContentField<string>;
|
|
142
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
143
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
144
|
-
mantine_miw?: IContentField<TMantineWidth>;
|
|
145
|
-
mantine_mih?: IContentField<TMantineHeight>;
|
|
146
|
-
mantine_maw?: IContentField<TMantineWidth>;
|
|
147
|
-
mantine_mah?: IContentField<TMantineHeight>;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export interface IScrollAreaStyle extends IStyleWithSpacing {
|
|
151
|
-
style_name: 'scroll-area';
|
|
152
|
-
mantine_scroll_area_scrollbar_size?: IContentField<TMantineScrollAreaSize>;
|
|
153
|
-
mantine_scroll_area_type?: IContentField<TMantineScrollAreaType>;
|
|
154
|
-
mantine_scroll_area_offset_scrollbars?: IContentField<string>;
|
|
155
|
-
mantine_scroll_area_scroll_hide_delay?: IContentField<string>;
|
|
156
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
157
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface ICardStyle extends IStyleWithSpacing {
|
|
161
|
-
style_name: 'card';
|
|
162
|
-
mantine_card_shadow?: IContentField<TMantineCardShadow>;
|
|
163
|
-
mantine_border?: IContentField<TMantineBorder>;
|
|
164
|
-
mantine_radius?: IContentField<TMantineRadius>;
|
|
165
|
-
use_mantine_style?: IContentField<string>;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface ICardSegmentStyle extends IStyleWithSpacing {
|
|
169
|
-
style_name: 'card-segment';
|
|
170
|
-
use_mantine_style?: IContentField<string>;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface IAspectRatioStyle extends IBaseStyle {
|
|
174
|
-
style_name: 'aspect-ratio';
|
|
175
|
-
mantine_aspect_ratio?: IContentField<string>;
|
|
176
|
-
use_mantine_style?: IContentField<string>;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export interface IBackgroundImageStyle extends IStyleWithSpacing {
|
|
180
|
-
style_name: 'background-image';
|
|
181
|
-
img_src?: IContentField<string>;
|
|
182
|
-
mantine_radius?: IContentField<TMantineRadius>;
|
|
183
|
-
use_mantine_style?: IContentField<string>;
|
|
184
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
import type {
|
|
7
|
+
TMantineSize,
|
|
8
|
+
TMantineSpacing,
|
|
9
|
+
TMantineRadius,
|
|
10
|
+
TMantineColor,
|
|
11
|
+
TMantineOrientation,
|
|
12
|
+
TMantineDirection,
|
|
13
|
+
TMantineWrap,
|
|
14
|
+
TMantineJustify,
|
|
15
|
+
TMantineAlign,
|
|
16
|
+
TMantineGridSpan,
|
|
17
|
+
} from '../mantine/common';
|
|
18
|
+
|
|
19
|
+
// Style-specific helper types only used in layout interfaces
|
|
20
|
+
export type TMantineBorder = '0' | '1';
|
|
21
|
+
export type TMantineWidth = string;
|
|
22
|
+
export type TMantineHeight = string;
|
|
23
|
+
export type TMantineDividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
24
|
+
export type TMantinePaperShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
25
|
+
export type TMantineCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
26
|
+
export type TMantineGap = '0' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
27
|
+
export type TMantineCols = string;
|
|
28
|
+
export type TMantineGridOffset = string;
|
|
29
|
+
export type TMantineGridOrder = string;
|
|
30
|
+
export type TMantineScrollAreaSize = string;
|
|
31
|
+
export type TMantineScrollAreaType = 'hover' | 'always' | 'never' | 'scroll';
|
|
32
|
+
|
|
33
|
+
export interface IContainerStyle extends IStyleWithSpacing {
|
|
34
|
+
style_name: 'container';
|
|
35
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
36
|
+
mantine_fluid?: IContentField<string>;
|
|
37
|
+
mantine_px?: IContentField<TMantineSpacing>;
|
|
38
|
+
mantine_py?: IContentField<TMantineSpacing>;
|
|
39
|
+
use_mantine_style?: IContentField<string>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IBoxStyle extends IStyleWithSpacing {
|
|
43
|
+
style_name: 'box';
|
|
44
|
+
content?: IContentField<string>;
|
|
45
|
+
use_mantine_style?: IContentField<string>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface IFlexStyle extends IStyleWithSpacing {
|
|
49
|
+
style_name: 'flex';
|
|
50
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
51
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
52
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
53
|
+
mantine_direction?: IContentField<TMantineDirection>;
|
|
54
|
+
mantine_wrap?: IContentField<TMantineWrap>;
|
|
55
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
56
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface IGroupStyle extends IStyleWithSpacing {
|
|
60
|
+
style_name: 'group';
|
|
61
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
62
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
63
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
64
|
+
mantine_group_wrap?: IContentField<'0' | '1'>;
|
|
65
|
+
mantine_group_grow?: IContentField<'0' | '1'>;
|
|
66
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
67
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface IStackStyle extends IStyleWithSpacing {
|
|
71
|
+
style_name: 'stack';
|
|
72
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
73
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
74
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
75
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
76
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ISimpleGridStyle extends IStyleWithSpacing {
|
|
80
|
+
style_name: 'simple-grid';
|
|
81
|
+
mantine_cols?: IContentField<TMantineCols>;
|
|
82
|
+
mantine_spacing?: IContentField<TMantineSpacing>;
|
|
83
|
+
mantine_breakpoints?: IContentField<string>;
|
|
84
|
+
mantine_vertical_spacing?: IContentField<TMantineSpacing>;
|
|
85
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
86
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface IGridStyle extends IStyleWithSpacing {
|
|
90
|
+
style_name: 'grid';
|
|
91
|
+
mantine_cols?: IContentField<TMantineCols>;
|
|
92
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
93
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
94
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
95
|
+
mantine_grid_overflow?: IContentField<string>;
|
|
96
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
97
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
98
|
+
use_mantine_style?: IContentField<string>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface IGridColumnStyle extends IStyleWithSpacing {
|
|
102
|
+
style_name: 'grid-column';
|
|
103
|
+
mantine_grid_span?: IContentField<TMantineGridSpan>;
|
|
104
|
+
mantine_grid_offset?: IContentField<TMantineGridOffset>;
|
|
105
|
+
mantine_grid_order?: IContentField<TMantineGridOrder>;
|
|
106
|
+
mantine_grid_grow?: IContentField<string>;
|
|
107
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
108
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
109
|
+
use_mantine_style?: IContentField<string>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface ISpaceStyle extends IStyleWithSpacing {
|
|
113
|
+
style_name: 'space';
|
|
114
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
115
|
+
mantine_space_direction?: IContentField<string>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface IDividerStyle extends IBaseStyle {
|
|
119
|
+
style_name: 'divider';
|
|
120
|
+
mantine_divider_variant?: IContentField<TMantineDividerVariant>;
|
|
121
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
122
|
+
mantine_divider_label?: IContentField<string>;
|
|
123
|
+
mantine_divider_label_position?: IContentField<string>;
|
|
124
|
+
mantine_orientation?: IContentField<TMantineOrientation>;
|
|
125
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
126
|
+
use_mantine_style?: IContentField<string>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface IPaperStyle extends IStyleWithSpacing {
|
|
130
|
+
style_name: 'paper';
|
|
131
|
+
mantine_paper_shadow?: IContentField<TMantinePaperShadow>;
|
|
132
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
133
|
+
mantine_px?: IContentField<TMantineSpacing>;
|
|
134
|
+
mantine_py?: IContentField<TMantineSpacing>;
|
|
135
|
+
mantine_border?: IContentField<TMantineBorder>;
|
|
136
|
+
use_mantine_style?: IContentField<string>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ICenterStyle extends IBaseStyle {
|
|
140
|
+
style_name: 'center';
|
|
141
|
+
mantine_center_inline?: IContentField<string>;
|
|
142
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
143
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
144
|
+
mantine_miw?: IContentField<TMantineWidth>;
|
|
145
|
+
mantine_mih?: IContentField<TMantineHeight>;
|
|
146
|
+
mantine_maw?: IContentField<TMantineWidth>;
|
|
147
|
+
mantine_mah?: IContentField<TMantineHeight>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface IScrollAreaStyle extends IStyleWithSpacing {
|
|
151
|
+
style_name: 'scroll-area';
|
|
152
|
+
mantine_scroll_area_scrollbar_size?: IContentField<TMantineScrollAreaSize>;
|
|
153
|
+
mantine_scroll_area_type?: IContentField<TMantineScrollAreaType>;
|
|
154
|
+
mantine_scroll_area_offset_scrollbars?: IContentField<string>;
|
|
155
|
+
mantine_scroll_area_scroll_hide_delay?: IContentField<string>;
|
|
156
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
157
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface ICardStyle extends IStyleWithSpacing {
|
|
161
|
+
style_name: 'card';
|
|
162
|
+
mantine_card_shadow?: IContentField<TMantineCardShadow>;
|
|
163
|
+
mantine_border?: IContentField<TMantineBorder>;
|
|
164
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
165
|
+
use_mantine_style?: IContentField<string>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface ICardSegmentStyle extends IStyleWithSpacing {
|
|
169
|
+
style_name: 'card-segment';
|
|
170
|
+
use_mantine_style?: IContentField<string>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface IAspectRatioStyle extends IBaseStyle {
|
|
174
|
+
style_name: 'aspect-ratio';
|
|
175
|
+
mantine_aspect_ratio?: IContentField<string>;
|
|
176
|
+
use_mantine_style?: IContentField<string>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface IBackgroundImageStyle extends IStyleWithSpacing {
|
|
180
|
+
style_name: 'background-image';
|
|
181
|
+
img_src?: IContentField<string>;
|
|
182
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
183
|
+
use_mantine_style?: IContentField<string>;
|
|
184
|
+
}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
-
import type { TMantineRadius } from '../mantine/common';
|
|
7
|
-
import type { TMantineWidth, TMantineHeight } from './layout';
|
|
8
|
-
|
|
9
|
-
export type TMantineImageFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
10
|
-
|
|
11
|
-
export interface IImageStyle extends IStyleWithSpacing {
|
|
12
|
-
style_name: 'image';
|
|
13
|
-
title?: IContentField<string>;
|
|
14
|
-
is_fluid?: IContentField<string>;
|
|
15
|
-
alt?: IContentField<string>;
|
|
16
|
-
img_src?: IContentField<string>;
|
|
17
|
-
height?: IContentField<string>;
|
|
18
|
-
width?: IContentField<string>;
|
|
19
|
-
mantine_image_fit?: IContentField<TMantineImageFit>;
|
|
20
|
-
mantine_width?: IContentField<TMantineWidth>;
|
|
21
|
-
mantine_height?: IContentField<TMantineHeight>;
|
|
22
|
-
mantine_radius?: IContentField<TMantineRadius>;
|
|
23
|
-
use_mantine_style?: IContentField<string>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface IVideoStyle extends IBaseStyle {
|
|
27
|
-
style_name: 'video';
|
|
28
|
-
is_fluid?: IContentField<string>;
|
|
29
|
-
alt?: IContentField<string>;
|
|
30
|
-
sources?: IContentField<unknown[]>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface IAudioStyle extends IBaseStyle {
|
|
34
|
-
style_name: 'audio';
|
|
35
|
-
sources?: IContentField<unknown[]>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface IFigureStyle extends IBaseStyle {
|
|
39
|
-
style_name: 'figure';
|
|
40
|
-
caption_title?: IContentField<string>;
|
|
41
|
-
caption?: IContentField<string>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface ICarouselStyle extends IStyleWithSpacing {
|
|
45
|
-
style_name: 'carousel';
|
|
46
|
-
id_prefix?: IContentField<string>;
|
|
47
|
-
has_controls?: IContentField<string>;
|
|
48
|
-
has_indicators?: IContentField<string>;
|
|
49
|
-
has_crossfade?: IContentField<string>;
|
|
50
|
-
sources?: IContentField<unknown[]>;
|
|
51
|
-
mantine_height?: IContentField<string>;
|
|
52
|
-
mantine_carousel_slide_size?: IContentField<string>;
|
|
53
|
-
mantine_carousel_slide_gap?: IContentField<string>;
|
|
54
|
-
mantine_orientation?: IContentField<string>;
|
|
55
|
-
mantine_control_size?: IContentField<string>;
|
|
56
|
-
mantine_carousel_controls_offset?: IContentField<string>;
|
|
57
|
-
mantine_carousel_next_control_icon?: IContentField<string>;
|
|
58
|
-
mantine_carousel_previous_control_icon?: IContentField<string>;
|
|
59
|
-
mantine_loop?: IContentField<string>;
|
|
60
|
-
drag_free?: IContentField<string>;
|
|
61
|
-
mantine_carousel_align?: IContentField<string>;
|
|
62
|
-
mantine_carousel_contain_scroll?: IContentField<string>;
|
|
63
|
-
skip_snaps?: IContentField<string>;
|
|
64
|
-
mantine_carousel_in_view_threshold?: IContentField<string>;
|
|
65
|
-
mantine_carousel_duration?: IContentField<string>;
|
|
66
|
-
mantine_carousel_embla_options?: IContentField<string>;
|
|
67
|
-
use_mantine_style?: IContentField<string>;
|
|
68
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
import type { TMantineRadius } from '../mantine/common';
|
|
7
|
+
import type { TMantineWidth, TMantineHeight } from './layout';
|
|
8
|
+
|
|
9
|
+
export type TMantineImageFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
10
|
+
|
|
11
|
+
export interface IImageStyle extends IStyleWithSpacing {
|
|
12
|
+
style_name: 'image';
|
|
13
|
+
title?: IContentField<string>;
|
|
14
|
+
is_fluid?: IContentField<string>;
|
|
15
|
+
alt?: IContentField<string>;
|
|
16
|
+
img_src?: IContentField<string>;
|
|
17
|
+
height?: IContentField<string>;
|
|
18
|
+
width?: IContentField<string>;
|
|
19
|
+
mantine_image_fit?: IContentField<TMantineImageFit>;
|
|
20
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
21
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
22
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
23
|
+
use_mantine_style?: IContentField<string>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IVideoStyle extends IBaseStyle {
|
|
27
|
+
style_name: 'video';
|
|
28
|
+
is_fluid?: IContentField<string>;
|
|
29
|
+
alt?: IContentField<string>;
|
|
30
|
+
sources?: IContentField<unknown[]>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IAudioStyle extends IBaseStyle {
|
|
34
|
+
style_name: 'audio';
|
|
35
|
+
sources?: IContentField<unknown[]>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface IFigureStyle extends IBaseStyle {
|
|
39
|
+
style_name: 'figure';
|
|
40
|
+
caption_title?: IContentField<string>;
|
|
41
|
+
caption?: IContentField<string>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ICarouselStyle extends IStyleWithSpacing {
|
|
45
|
+
style_name: 'carousel';
|
|
46
|
+
id_prefix?: IContentField<string>;
|
|
47
|
+
has_controls?: IContentField<string>;
|
|
48
|
+
has_indicators?: IContentField<string>;
|
|
49
|
+
has_crossfade?: IContentField<string>;
|
|
50
|
+
sources?: IContentField<unknown[]>;
|
|
51
|
+
mantine_height?: IContentField<string>;
|
|
52
|
+
mantine_carousel_slide_size?: IContentField<string>;
|
|
53
|
+
mantine_carousel_slide_gap?: IContentField<string>;
|
|
54
|
+
mantine_orientation?: IContentField<string>;
|
|
55
|
+
mantine_control_size?: IContentField<string>;
|
|
56
|
+
mantine_carousel_controls_offset?: IContentField<string>;
|
|
57
|
+
mantine_carousel_next_control_icon?: IContentField<string>;
|
|
58
|
+
mantine_carousel_previous_control_icon?: IContentField<string>;
|
|
59
|
+
mantine_loop?: IContentField<string>;
|
|
60
|
+
drag_free?: IContentField<string>;
|
|
61
|
+
mantine_carousel_align?: IContentField<string>;
|
|
62
|
+
mantine_carousel_contain_scroll?: IContentField<string>;
|
|
63
|
+
skip_snaps?: IContentField<string>;
|
|
64
|
+
mantine_carousel_in_view_threshold?: IContentField<string>;
|
|
65
|
+
mantine_carousel_duration?: IContentField<string>;
|
|
66
|
+
mantine_carousel_embla_options?: IContentField<string>;
|
|
67
|
+
use_mantine_style?: IContentField<string>;
|
|
68
|
+
}
|