@selfhelp/shared 1.3.0 → 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 -341
- package/LICENSE +381 -381
- package/README.md +57 -57
- package/package.json +102 -102
- package/src/api/__tests__/endpoints.test.ts +45 -45
- 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/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
package/src/types/api/forms.ts
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
import type { IBaseApiResponse } from './envelope';
|
|
6
|
-
|
|
7
|
-
export interface IFormSubmitRequest {
|
|
8
|
-
section_id: number;
|
|
9
|
-
page_id?: number;
|
|
10
|
-
record_id?: number;
|
|
11
|
-
form_data: Record<string, unknown>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface IFormUpdateRequest {
|
|
15
|
-
section_id: number;
|
|
16
|
-
page_id?: number;
|
|
17
|
-
record_id?: number;
|
|
18
|
-
form_data: Record<string, unknown>;
|
|
19
|
-
update_based_on?: Record<string, unknown>;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface IFormDeleteRequest {
|
|
23
|
-
record_id: number;
|
|
24
|
-
page_id?: number;
|
|
25
|
-
section_id: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Legacy/aspirational form-result fields.
|
|
30
|
-
*
|
|
31
|
-
* @deprecated The current backend `form_submitted` / `form_updated` responses
|
|
32
|
-
* do NOT include these. `FormController` returns only the structured fields on
|
|
33
|
-
* {@link IFormSubmitData} / {@link IFormUpdateData}, and both JSON schemas
|
|
34
|
-
* declare `additionalProperties: false`. Frontend code that reads
|
|
35
|
-
* `data.success` / `data.message` (e.g. `useFormSubmission.ts`) is reading
|
|
36
|
-
* values the backend never sends. Kept OPTIONAL so consumers keep compiling
|
|
37
|
-
* during migration; drop them once no consumer references them.
|
|
38
|
-
*/
|
|
39
|
-
export interface IFormResultLegacyFields {
|
|
40
|
-
/** @deprecated Not returned by the current backend form endpoints. */
|
|
41
|
-
success?: boolean;
|
|
42
|
-
/** @deprecated Not returned by the current backend form endpoints. */
|
|
43
|
-
redirect_url?: string;
|
|
44
|
-
/** @deprecated Not returned by the current backend form endpoints. */
|
|
45
|
-
message?: string;
|
|
46
|
-
/** @deprecated Not returned by the current backend form endpoints. */
|
|
47
|
-
field_errors?: Record<string, string>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Data returned by a successful POST form submit. Mirrors the backend contract
|
|
52
|
-
* `config/schemas/api/v1/responses/frontend/form_submitted.json`.
|
|
53
|
-
*/
|
|
54
|
-
export interface IFormSubmitData extends IFormResultLegacyFields {
|
|
55
|
-
record_id: number;
|
|
56
|
-
section_id: number;
|
|
57
|
-
page_id: number;
|
|
58
|
-
submitted_at: string;
|
|
59
|
-
user_authenticated: boolean;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Data returned by a successful PUT form update. Mirrors the backend contract
|
|
64
|
-
* `config/schemas/api/v1/responses/frontend/form_updated.json` (note: the
|
|
65
|
-
* update response carries `updated_at`, not `submitted_at`/`user_authenticated`).
|
|
66
|
-
*/
|
|
67
|
-
export interface IFormUpdateData extends IFormResultLegacyFields {
|
|
68
|
-
record_id: number;
|
|
69
|
-
section_id: number;
|
|
70
|
-
page_id: number;
|
|
71
|
-
updated_at: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type IFormSubmitResponse = IBaseApiResponse<IFormSubmitData>;
|
|
75
|
-
export type IFormUpdateResponse = IBaseApiResponse<IFormUpdateData>;
|
|
76
|
-
export type IFormDeleteResponse = IBaseApiResponse<{ success: boolean; message?: string }>;
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseApiResponse } from './envelope';
|
|
6
|
+
|
|
7
|
+
export interface IFormSubmitRequest {
|
|
8
|
+
section_id: number;
|
|
9
|
+
page_id?: number;
|
|
10
|
+
record_id?: number;
|
|
11
|
+
form_data: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IFormUpdateRequest {
|
|
15
|
+
section_id: number;
|
|
16
|
+
page_id?: number;
|
|
17
|
+
record_id?: number;
|
|
18
|
+
form_data: Record<string, unknown>;
|
|
19
|
+
update_based_on?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IFormDeleteRequest {
|
|
23
|
+
record_id: number;
|
|
24
|
+
page_id?: number;
|
|
25
|
+
section_id: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Legacy/aspirational form-result fields.
|
|
30
|
+
*
|
|
31
|
+
* @deprecated The current backend `form_submitted` / `form_updated` responses
|
|
32
|
+
* do NOT include these. `FormController` returns only the structured fields on
|
|
33
|
+
* {@link IFormSubmitData} / {@link IFormUpdateData}, and both JSON schemas
|
|
34
|
+
* declare `additionalProperties: false`. Frontend code that reads
|
|
35
|
+
* `data.success` / `data.message` (e.g. `useFormSubmission.ts`) is reading
|
|
36
|
+
* values the backend never sends. Kept OPTIONAL so consumers keep compiling
|
|
37
|
+
* during migration; drop them once no consumer references them.
|
|
38
|
+
*/
|
|
39
|
+
export interface IFormResultLegacyFields {
|
|
40
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
41
|
+
success?: boolean;
|
|
42
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
43
|
+
redirect_url?: string;
|
|
44
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
45
|
+
message?: string;
|
|
46
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
47
|
+
field_errors?: Record<string, string>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Data returned by a successful POST form submit. Mirrors the backend contract
|
|
52
|
+
* `config/schemas/api/v1/responses/frontend/form_submitted.json`.
|
|
53
|
+
*/
|
|
54
|
+
export interface IFormSubmitData extends IFormResultLegacyFields {
|
|
55
|
+
record_id: number;
|
|
56
|
+
section_id: number;
|
|
57
|
+
page_id: number;
|
|
58
|
+
submitted_at: string;
|
|
59
|
+
user_authenticated: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Data returned by a successful PUT form update. Mirrors the backend contract
|
|
64
|
+
* `config/schemas/api/v1/responses/frontend/form_updated.json` (note: the
|
|
65
|
+
* update response carries `updated_at`, not `submitted_at`/`user_authenticated`).
|
|
66
|
+
*/
|
|
67
|
+
export interface IFormUpdateData extends IFormResultLegacyFields {
|
|
68
|
+
record_id: number;
|
|
69
|
+
section_id: number;
|
|
70
|
+
page_id: number;
|
|
71
|
+
updated_at: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type IFormSubmitResponse = IBaseApiResponse<IFormSubmitData>;
|
|
75
|
+
export type IFormUpdateResponse = IBaseApiResponse<IFormUpdateData>;
|
|
76
|
+
export type IFormDeleteResponse = IBaseApiResponse<{ success: boolean; message?: string }>;
|
package/src/types/api/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
export * from './envelope';
|
|
6
|
-
export * from './auth';
|
|
7
|
-
export * from './forms';
|
|
8
|
-
export * from './language';
|
|
9
|
-
export * from './page';
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
export * from './envelope';
|
|
6
|
+
export * from './auth';
|
|
7
|
+
export * from './forms';
|
|
8
|
+
export * from './language';
|
|
9
|
+
export * from './page';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
import type { IBaseApiResponse } from './envelope';
|
|
6
|
-
import type { ILanguagePreference } from '../auth';
|
|
7
|
-
|
|
8
|
-
export interface ILanguageItem extends ILanguagePreference {
|
|
9
|
-
is_default?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type ILanguagesResponse = IBaseApiResponse<ILanguageItem[]>;
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseApiResponse } from './envelope';
|
|
6
|
+
import type { ILanguagePreference } from '../auth';
|
|
7
|
+
|
|
8
|
+
export interface ILanguageItem extends ILanguagePreference {
|
|
9
|
+
is_default?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type ILanguagesResponse = IBaseApiResponse<ILanguageItem[]>;
|
package/src/types/api/page.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
import type { IBaseApiResponse } from './envelope';
|
|
6
|
-
import type { IPageContent, IPageItem } from '../pages';
|
|
7
|
-
|
|
8
|
-
export type IGetPageResponse = IBaseApiResponse<{ page: IPageContent }>;
|
|
9
|
-
export type IGetPagesResponse = IBaseApiResponse<IPageItem[]>;
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseApiResponse } from './envelope';
|
|
6
|
+
import type { IPageContent, IPageItem } from '../pages';
|
|
7
|
+
|
|
8
|
+
export type IGetPageResponse = IBaseApiResponse<{ page: IPageContent }>;
|
|
9
|
+
export type IGetPagesResponse = IBaseApiResponse<IPageItem[]>;
|
package/src/types/index.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
export * from './styles/base';
|
|
6
|
-
export * from './styles/auth';
|
|
7
|
-
export * from './styles/layout';
|
|
8
|
-
export * from './styles/typography';
|
|
9
|
-
export * from './styles/media';
|
|
10
|
-
export * from './styles/interactive';
|
|
11
|
-
export * from './styles/forms';
|
|
12
|
-
export * from './styles/composite';
|
|
13
|
-
export * from './styles/unknown';
|
|
14
|
-
export * from './pages';
|
|
15
|
-
export * from './auth';
|
|
16
|
-
export * from './api';
|
|
17
|
-
export * from './mantine/common';
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
export * from './styles/base';
|
|
6
|
+
export * from './styles/auth';
|
|
7
|
+
export * from './styles/layout';
|
|
8
|
+
export * from './styles/typography';
|
|
9
|
+
export * from './styles/media';
|
|
10
|
+
export * from './styles/interactive';
|
|
11
|
+
export * from './styles/forms';
|
|
12
|
+
export * from './styles/composite';
|
|
13
|
+
export * from './styles/unknown';
|
|
14
|
+
export * from './pages';
|
|
15
|
+
export * from './auth';
|
|
16
|
+
export * from './api';
|
|
17
|
+
export * from './mantine/common';
|
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
/*
|
|
2
|
-
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Shared Mantine semantic types used by both web (Mantine v9) and mobile
|
|
7
|
-
* (HeroUI Native + Uniwind, where these are mapped through the theme tokens).
|
|
8
|
-
*
|
|
9
|
-
* Whenever a value here changes, both renderers must update their token
|
|
10
|
-
* mapping in `src/theme/tokens.ts`.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export type TMantineSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
-
export type TMantineRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
|
|
15
|
-
export type TMantineSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none' | string;
|
|
16
|
-
export type TMantineVariant =
|
|
17
|
-
| 'default'
|
|
18
|
-
| 'filled'
|
|
19
|
-
| 'light'
|
|
20
|
-
| 'outline'
|
|
21
|
-
| 'subtle'
|
|
22
|
-
| 'transparent'
|
|
23
|
-
| 'white'
|
|
24
|
-
| 'gradient';
|
|
25
|
-
|
|
26
|
-
export type TMantineColor =
|
|
27
|
-
| 'gray'
|
|
28
|
-
| 'red'
|
|
29
|
-
| 'pink'
|
|
30
|
-
| 'grape'
|
|
31
|
-
| 'violet'
|
|
32
|
-
| 'indigo'
|
|
33
|
-
| 'blue'
|
|
34
|
-
| 'cyan'
|
|
35
|
-
| 'teal'
|
|
36
|
-
| 'green'
|
|
37
|
-
| 'lime'
|
|
38
|
-
| 'yellow'
|
|
39
|
-
| 'orange'
|
|
40
|
-
| 'dark'
|
|
41
|
-
| string;
|
|
42
|
-
|
|
43
|
-
export type TMantineOrientation = 'horizontal' | 'vertical';
|
|
44
|
-
export type TMantineDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
45
|
-
export type TMantineWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
46
|
-
export type TMantineJustify =
|
|
47
|
-
| 'flex-start'
|
|
48
|
-
| 'center'
|
|
49
|
-
| 'flex-end'
|
|
50
|
-
| 'space-between'
|
|
51
|
-
| 'space-around'
|
|
52
|
-
| 'space-evenly';
|
|
53
|
-
export type TMantineAlign = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
54
|
-
export type TMantineColorFormat = 'hex' | 'rgba' | 'rgb' | 'hsl' | 'hsla';
|
|
55
|
-
export type TMantineGridSpan = 'auto' | 'content' | string;
|
|
56
|
-
export type TMantineGridOverflow = 'visible' | 'hidden';
|
|
57
|
-
export type TMantineTabsVariant = 'default' | 'outline' | 'pills';
|
|
58
|
-
export type TMantineFileAccept =
|
|
59
|
-
| 'image/*'
|
|
60
|
-
| 'video/*'
|
|
61
|
-
| 'audio/*'
|
|
62
|
-
| 'application/pdf'
|
|
63
|
-
| string;
|
|
64
|
-
export type TMantineClampBehavior = 'strict' | 'blur' | 'none';
|
|
65
|
-
export type TMantineChipVariant = 'filled' | 'outline' | 'light';
|
|
66
|
-
export type TMantineFieldsetVariant = 'default' | 'filled' | 'unstyled';
|
|
67
|
-
export type TMantineAccordionVariant = 'default' | 'contained' | 'filled' | 'separated';
|
|
68
|
-
export type TMantineAvatarVariant =
|
|
69
|
-
| 'default'
|
|
70
|
-
| 'filled'
|
|
71
|
-
| 'light'
|
|
72
|
-
| 'outline'
|
|
73
|
-
| 'subtle'
|
|
74
|
-
| 'transparent'
|
|
75
|
-
| 'white';
|
|
76
|
-
export type TMantineBadgeVariant =
|
|
77
|
-
| 'default'
|
|
78
|
-
| 'filled'
|
|
79
|
-
| 'light'
|
|
80
|
-
| 'outline'
|
|
81
|
-
| 'dot'
|
|
82
|
-
| 'transparent'
|
|
83
|
-
| 'white'
|
|
84
|
-
| 'gradient';
|
|
85
|
-
export type TMantineIndicatorPosition =
|
|
86
|
-
| 'top-start'
|
|
87
|
-
| 'top-end'
|
|
88
|
-
| 'bottom-start'
|
|
89
|
-
| 'bottom-end'
|
|
90
|
-
| 'top-center'
|
|
91
|
-
| 'bottom-center'
|
|
92
|
-
| 'middle-start'
|
|
93
|
-
| 'middle-end';
|
|
94
|
-
export type TMantineKbdSize = TMantineSize;
|
|
95
|
-
export type TMantineThemeIconVariant = TMantineVariant;
|
|
96
|
-
export type TMantineTimelineLineVariant = 'solid' | 'dashed' | 'dotted';
|
|
97
|
-
export type TMantineTitleOrder = '1' | '2' | '3' | '4' | '5' | '6';
|
|
98
|
-
export type TMantineCodeBlock = '0' | '1';
|
|
99
|
-
export type TMantineHighlight = string;
|
|
100
|
-
export type TMantineSpoilerMaxHeight = string;
|
|
101
|
-
export type TMantineRatingCount = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | string;
|
|
102
|
-
export type TMantineRatingFractions = '1' | '2' | '3' | '4' | '5' | string;
|
|
103
|
-
export type TMantineNotificationWithCloseButton = '0' | '1';
|
|
104
|
-
export type TMantineAspectRatio = string;
|
|
105
|
-
export type TMantineColorPickerSwatchesPerRow = string;
|
|
106
|
-
export type TMantineActionIconLoading = '0' | '1';
|
|
107
|
-
export type TMantineGroupWrap = '0' | '1';
|
|
108
|
-
export type TMantineGroupGrow = '0' | '1';
|
|
109
|
-
export type TMantineGridGrow = '0' | '1';
|
|
110
|
-
export type TMantineTabDisabled = '0' | '1';
|
|
111
|
-
export type TMantineColorInputSwatches = string;
|
|
112
|
-
export type TMantineColorPickerSwatches = string;
|
|
113
|
-
export type TMantineFileInputMultiple = '0' | '1';
|
|
114
|
-
export type TMantineNumberInputDecimalScale = string;
|
|
115
|
-
export type TMantineRangeSliderMarks = string;
|
|
116
|
-
export type TMantineChipChecked = '0' | '1';
|
|
117
|
-
export type TMantineChipMultiple = '0' | '1';
|
|
118
|
-
export type TMantineRatingReadonly = '0' | '1';
|
|
119
|
-
export type TMantineSpaceHorizontal = '0' | '1';
|
|
120
|
-
export type TMantineCenterInline = '0' | '1';
|
|
121
|
-
export type TMantineContainerFluid = '0' | '1';
|
|
122
|
-
export type TMantineFullWidth = '0' | '1';
|
|
123
|
-
export type TMantineCompact = '0' | '1';
|
|
124
|
-
export type TMantineAutoContrast = '0' | '1';
|
|
125
|
-
export type TMantineIsLink = '0' | '1';
|
|
126
|
-
export type TMantineUseMantineStyle = '0' | '1';
|
|
127
|
-
export type TMantineDisabled = '0' | '1';
|
|
128
|
-
export type TMantineOpenInNewTab = '0' | '1';
|
|
129
|
-
export type TMantineLoading = '0' | '1';
|
|
130
|
-
export type TMantineMultiple = '0' | '1';
|
|
131
|
-
export type TMantineChecked = '0' | '1';
|
|
132
|
-
export type TMantineReadonly = '0' | '1';
|
|
133
|
-
export type TMantineWithCloseButton = '0' | '1';
|
|
134
|
-
export type TMantineProcessing = '0' | '1';
|
|
135
|
-
export type TMantineBlock = '0' | '1';
|
|
136
|
-
export type TMantineWithIcon = '0' | '1';
|
|
137
|
-
export type TMantineAllowStepClick = '0' | '1';
|
|
138
|
-
export type TMantineAllowNextClicks = '0' | '1';
|
|
139
|
-
export type TMantineSwatches = string;
|
|
140
|
-
export type TMantineGrow = '0' | '1';
|
|
141
|
-
export type TMantineInline = '0' | '1';
|
|
142
|
-
export type TMantineFluid = '0' | '1';
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Shared Mantine semantic types used by both web (Mantine v9) and mobile
|
|
7
|
+
* (HeroUI Native + Uniwind, where these are mapped through the theme tokens).
|
|
8
|
+
*
|
|
9
|
+
* Whenever a value here changes, both renderers must update their token
|
|
10
|
+
* mapping in `src/theme/tokens.ts`.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export type TMantineSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
export type TMantineRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
|
|
15
|
+
export type TMantineSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none' | string;
|
|
16
|
+
export type TMantineVariant =
|
|
17
|
+
| 'default'
|
|
18
|
+
| 'filled'
|
|
19
|
+
| 'light'
|
|
20
|
+
| 'outline'
|
|
21
|
+
| 'subtle'
|
|
22
|
+
| 'transparent'
|
|
23
|
+
| 'white'
|
|
24
|
+
| 'gradient';
|
|
25
|
+
|
|
26
|
+
export type TMantineColor =
|
|
27
|
+
| 'gray'
|
|
28
|
+
| 'red'
|
|
29
|
+
| 'pink'
|
|
30
|
+
| 'grape'
|
|
31
|
+
| 'violet'
|
|
32
|
+
| 'indigo'
|
|
33
|
+
| 'blue'
|
|
34
|
+
| 'cyan'
|
|
35
|
+
| 'teal'
|
|
36
|
+
| 'green'
|
|
37
|
+
| 'lime'
|
|
38
|
+
| 'yellow'
|
|
39
|
+
| 'orange'
|
|
40
|
+
| 'dark'
|
|
41
|
+
| string;
|
|
42
|
+
|
|
43
|
+
export type TMantineOrientation = 'horizontal' | 'vertical';
|
|
44
|
+
export type TMantineDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
45
|
+
export type TMantineWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
46
|
+
export type TMantineJustify =
|
|
47
|
+
| 'flex-start'
|
|
48
|
+
| 'center'
|
|
49
|
+
| 'flex-end'
|
|
50
|
+
| 'space-between'
|
|
51
|
+
| 'space-around'
|
|
52
|
+
| 'space-evenly';
|
|
53
|
+
export type TMantineAlign = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
54
|
+
export type TMantineColorFormat = 'hex' | 'rgba' | 'rgb' | 'hsl' | 'hsla';
|
|
55
|
+
export type TMantineGridSpan = 'auto' | 'content' | string;
|
|
56
|
+
export type TMantineGridOverflow = 'visible' | 'hidden';
|
|
57
|
+
export type TMantineTabsVariant = 'default' | 'outline' | 'pills';
|
|
58
|
+
export type TMantineFileAccept =
|
|
59
|
+
| 'image/*'
|
|
60
|
+
| 'video/*'
|
|
61
|
+
| 'audio/*'
|
|
62
|
+
| 'application/pdf'
|
|
63
|
+
| string;
|
|
64
|
+
export type TMantineClampBehavior = 'strict' | 'blur' | 'none';
|
|
65
|
+
export type TMantineChipVariant = 'filled' | 'outline' | 'light';
|
|
66
|
+
export type TMantineFieldsetVariant = 'default' | 'filled' | 'unstyled';
|
|
67
|
+
export type TMantineAccordionVariant = 'default' | 'contained' | 'filled' | 'separated';
|
|
68
|
+
export type TMantineAvatarVariant =
|
|
69
|
+
| 'default'
|
|
70
|
+
| 'filled'
|
|
71
|
+
| 'light'
|
|
72
|
+
| 'outline'
|
|
73
|
+
| 'subtle'
|
|
74
|
+
| 'transparent'
|
|
75
|
+
| 'white';
|
|
76
|
+
export type TMantineBadgeVariant =
|
|
77
|
+
| 'default'
|
|
78
|
+
| 'filled'
|
|
79
|
+
| 'light'
|
|
80
|
+
| 'outline'
|
|
81
|
+
| 'dot'
|
|
82
|
+
| 'transparent'
|
|
83
|
+
| 'white'
|
|
84
|
+
| 'gradient';
|
|
85
|
+
export type TMantineIndicatorPosition =
|
|
86
|
+
| 'top-start'
|
|
87
|
+
| 'top-end'
|
|
88
|
+
| 'bottom-start'
|
|
89
|
+
| 'bottom-end'
|
|
90
|
+
| 'top-center'
|
|
91
|
+
| 'bottom-center'
|
|
92
|
+
| 'middle-start'
|
|
93
|
+
| 'middle-end';
|
|
94
|
+
export type TMantineKbdSize = TMantineSize;
|
|
95
|
+
export type TMantineThemeIconVariant = TMantineVariant;
|
|
96
|
+
export type TMantineTimelineLineVariant = 'solid' | 'dashed' | 'dotted';
|
|
97
|
+
export type TMantineTitleOrder = '1' | '2' | '3' | '4' | '5' | '6';
|
|
98
|
+
export type TMantineCodeBlock = '0' | '1';
|
|
99
|
+
export type TMantineHighlight = string;
|
|
100
|
+
export type TMantineSpoilerMaxHeight = string;
|
|
101
|
+
export type TMantineRatingCount = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | string;
|
|
102
|
+
export type TMantineRatingFractions = '1' | '2' | '3' | '4' | '5' | string;
|
|
103
|
+
export type TMantineNotificationWithCloseButton = '0' | '1';
|
|
104
|
+
export type TMantineAspectRatio = string;
|
|
105
|
+
export type TMantineColorPickerSwatchesPerRow = string;
|
|
106
|
+
export type TMantineActionIconLoading = '0' | '1';
|
|
107
|
+
export type TMantineGroupWrap = '0' | '1';
|
|
108
|
+
export type TMantineGroupGrow = '0' | '1';
|
|
109
|
+
export type TMantineGridGrow = '0' | '1';
|
|
110
|
+
export type TMantineTabDisabled = '0' | '1';
|
|
111
|
+
export type TMantineColorInputSwatches = string;
|
|
112
|
+
export type TMantineColorPickerSwatches = string;
|
|
113
|
+
export type TMantineFileInputMultiple = '0' | '1';
|
|
114
|
+
export type TMantineNumberInputDecimalScale = string;
|
|
115
|
+
export type TMantineRangeSliderMarks = string;
|
|
116
|
+
export type TMantineChipChecked = '0' | '1';
|
|
117
|
+
export type TMantineChipMultiple = '0' | '1';
|
|
118
|
+
export type TMantineRatingReadonly = '0' | '1';
|
|
119
|
+
export type TMantineSpaceHorizontal = '0' | '1';
|
|
120
|
+
export type TMantineCenterInline = '0' | '1';
|
|
121
|
+
export type TMantineContainerFluid = '0' | '1';
|
|
122
|
+
export type TMantineFullWidth = '0' | '1';
|
|
123
|
+
export type TMantineCompact = '0' | '1';
|
|
124
|
+
export type TMantineAutoContrast = '0' | '1';
|
|
125
|
+
export type TMantineIsLink = '0' | '1';
|
|
126
|
+
export type TMantineUseMantineStyle = '0' | '1';
|
|
127
|
+
export type TMantineDisabled = '0' | '1';
|
|
128
|
+
export type TMantineOpenInNewTab = '0' | '1';
|
|
129
|
+
export type TMantineLoading = '0' | '1';
|
|
130
|
+
export type TMantineMultiple = '0' | '1';
|
|
131
|
+
export type TMantineChecked = '0' | '1';
|
|
132
|
+
export type TMantineReadonly = '0' | '1';
|
|
133
|
+
export type TMantineWithCloseButton = '0' | '1';
|
|
134
|
+
export type TMantineProcessing = '0' | '1';
|
|
135
|
+
export type TMantineBlock = '0' | '1';
|
|
136
|
+
export type TMantineWithIcon = '0' | '1';
|
|
137
|
+
export type TMantineAllowStepClick = '0' | '1';
|
|
138
|
+
export type TMantineAllowNextClicks = '0' | '1';
|
|
139
|
+
export type TMantineSwatches = string;
|
|
140
|
+
export type TMantineGrow = '0' | '1';
|
|
141
|
+
export type TMantineInline = '0' | '1';
|
|
142
|
+
export type TMantineFluid = '0' | '1';
|