@selfhelp/shared 1.8.0 → 1.11.0
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 +67 -0
- package/dist/{common-B96dASgu.d.mts → common-CJSHQL1E.d.mts} +13 -1
- package/dist/{common-B96dASgu.d.ts → common-CJSHQL1E.d.ts} +13 -1
- package/dist/index.d.mts +136 -44
- package/dist/index.d.ts +136 -44
- package/dist/index.js +395 -8
- package/dist/index.mjs +371 -8
- package/dist/plugin-sdk/index.d.mts +2 -2
- package/dist/plugin-sdk/index.d.ts +2 -2
- package/dist/plugin-sdk/index.js +10 -1
- package/dist/plugin-sdk/index.mjs +10 -1
- package/dist/registry/index.d.mts +42 -4
- package/dist/registry/index.d.ts +42 -4
- package/dist/registry/index.js +56 -3
- package/dist/registry/index.mjs +48 -2
- package/dist/{styles.registry-ClluRYkN.d.ts → styles.registry-BV1iF7k-.d.ts} +678 -461
- package/dist/{styles.registry-nl8uzvMN.d.mts → styles.registry-DkoT-FmN.d.mts} +678 -461
- package/dist/theme/index.d.mts +225 -4
- package/dist/theme/index.d.ts +225 -4
- package/dist/theme/index.js +343 -9
- package/dist/theme/index.mjs +325 -8
- package/dist/theme/tailwind.d.mts +2 -2
- package/dist/theme/tailwind.d.ts +2 -2
- package/package.json +1 -1
- package/src/registry/__tests__/platform.test.ts +187 -0
- package/src/registry/index.ts +73 -0
- package/src/registry/styles.registry.ts +60 -0
- package/src/theme/__tests__/mantineVariant.test.ts +87 -0
- package/src/theme/__tests__/semantic.test.ts +231 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/mantineVariant.ts +145 -0
- package/src/theme/semantic.ts +472 -0
- package/src/theme/tailwind.ts +2 -2
- package/src/theme/tokens.ts +2 -2
- package/src/types/__tests__/mobile-adapters.test.ts +80 -0
- package/src/types/index.ts +1 -0
- package/src/types/mantine/common.ts +13 -0
- package/src/types/mobile-adapters.ts +144 -0
- package/src/types/styles/auth.ts +11 -11
- package/src/types/styles/base.ts +4 -4
- package/src/types/styles/composite.ts +59 -45
- package/src/types/styles/error.ts +24 -13
- package/src/types/styles/forms.ts +184 -184
- package/src/types/styles/interactive.ts +81 -76
- package/src/types/styles/layout.ts +103 -85
- package/src/types/styles/media.ts +20 -20
- package/src/types/styles/typography.ts +39 -39
- package/src/types/styles/unknown.ts +20 -2
- package/src/utils/spacing.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,73 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
|
|
|
9
9
|
|
|
10
10
|
This project follows semantic versioning.
|
|
11
11
|
|
|
12
|
+
## v1.11.0
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Mobile UI adapter contract is now a single public source
|
|
17
|
+
(`IMobileUiAdapters` + the `IMobile*Props` capability interfaces).** Mobile
|
|
18
|
+
rendering plan sections 8.3 / 9: both mobile tiers (the public app's
|
|
19
|
+
open-source adapters and the private `@selfhelp/mobile-pro-ui` overrides) now
|
|
20
|
+
consume one contract from `@selfhelp/shared` instead of each repo keeping a
|
|
21
|
+
hand-synced copy. The module is type-only (it imports `react` types and the
|
|
22
|
+
shared semantic scales `THeroUiSize`/`THeroUiButtonVariant`; it pulls in no
|
|
23
|
+
React Native runtime dependency), which is why it lives here rather than in a
|
|
24
|
+
separate contract package. The milestone-one capability set is
|
|
25
|
+
`MobileButton`, `MobileText`, `MobileContainer`, `MobileCard`, `MobileInput`,
|
|
26
|
+
`MobileTextarea`, `MobileSwitch`, `MobileCheckbox`, `MobileSelect`, and
|
|
27
|
+
`MobileModal`. Covered by a contract test (`src/types/__tests__`) that locks
|
|
28
|
+
the exact set; consumers enforce the shape at compile time
|
|
29
|
+
(`ossAdapters`/`proAdapters: IMobileUiAdapters`).
|
|
30
|
+
|
|
31
|
+
## v1.10.0
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **Style catalog reconciled to the established 90-style backend catalog
|
|
36
|
+
(mobile rendering plan, milestone one).** The experimental registry/union had
|
|
37
|
+
drifted to 98 entries: it included 16 speculative styles and omitted 8
|
|
38
|
+
established ones. Removed the 16 speculative styles (`dialog`, `popover`,
|
|
39
|
+
`menu`, `menu-item`, `bottom-sheet`, `skeleton`, `skeleton-group`, `spinner`,
|
|
40
|
+
`toast`, `tag-group`, `tag`, `input-group`, `input-otp`, `search-field`,
|
|
41
|
+
`fab-button`, `biometric-login-button`) from `BASE_STYLE_REGISTRY`, the
|
|
42
|
+
`TStyle` union, and the type files (deleted `src/types/styles/catalog.ts`).
|
|
43
|
+
Added the 8 established styles that were missing from the registry/union:
|
|
44
|
+
`no-access`, `missing`, `not-found`, `version`, `ref-container`,
|
|
45
|
+
`data-container`, `show-user-input`, `timeline-item`. The applications may
|
|
46
|
+
still use dialogs/menus/etc. internally — they are simply not author-selectable
|
|
47
|
+
CMS styles.
|
|
48
|
+
- **Field naming taxonomy aligned with the backend re-prefix migration.** The
|
|
49
|
+
11 portable visual-semantic fields are now `shared_*` (was the experimental
|
|
50
|
+
`web_*`): `shared_align`, `shared_justify`, `shared_gap`, `shared_direction`,
|
|
51
|
+
`shared_wrap`, `shared_orientation`, `shared_full_width`, `shared_size`,
|
|
52
|
+
`shared_radius`, `shared_text_align`, and `shared_spacing` (was
|
|
53
|
+
`web_spacing_margin_padding`). Genuinely web-specific fields keep `web_*`; the
|
|
54
|
+
margin-only `web_spacing_margin` stays `web_` (not consolidated). This matches
|
|
55
|
+
backend migration `Version20260618143216`.
|
|
56
|
+
- Documented that the registry `platforms`/`TStylePlatform` value mirrors the
|
|
57
|
+
backend `renderTarget` (`styleRenderTargets` lookup); page render target is
|
|
58
|
+
the existing `pageAccessTypes` value, never a duplicate page-platform field.
|
|
59
|
+
- **Semantic mapper reworked to a non-clamping common scale (plan §6.2/§8.2).**
|
|
60
|
+
`shared_size` is now `sm | md | lg` and `shared_radius` is `none | sm | md |
|
|
61
|
+
lg | full` — the true cross-platform common denominator (HeroUI Native has no
|
|
62
|
+
`xs`/`xl`). New `TSharedSize`/`TSharedRadius` types
|
|
63
|
+
(`src/types/mantine/common.ts`) back the `shared_size`/`shared_radius` catalog
|
|
64
|
+
fields across `layout`, `composite`, `interactive`, `forms`, and `error`.
|
|
65
|
+
`src/theme/semantic.ts` no longer clamps unsupported sizes (out-of-domain
|
|
66
|
+
values are ignored, not silently coerced) and exposes the plan's pure
|
|
67
|
+
functions `resolveSharedStyleProps`, `toMantineSemanticProps`,
|
|
68
|
+
`toHeroUiSemanticProps`, and `toReactNativeSemanticStyle(props, theme)`; the
|
|
69
|
+
earlier `resolveSharedStyleForWeb` / `resolveSharedStyleForMobile` names remain
|
|
70
|
+
as deprecated aliases. The backend enforces the same narrowed domain (migration
|
|
71
|
+
`Version20260618195450`).
|
|
72
|
+
|
|
73
|
+
### Notes / follow-ups
|
|
74
|
+
|
|
75
|
+
- Consumer dependency-range updates and `release-manifest.json` compatibility
|
|
76
|
+
floors land with the coordinated cross-repo release (plan section 16 / Phase 6)
|
|
77
|
+
as the frontend and mobile consumers adopt `@selfhelp/shared@1.10.0`.
|
|
78
|
+
|
|
12
79
|
## v1.8.0
|
|
13
80
|
|
|
14
81
|
### Changed
|
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
type TMantineSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
type TMantineRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
|
|
10
10
|
type TMantineSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none' | string;
|
|
11
|
+
/**
|
|
12
|
+
* Cross-platform (`shared_*`) semantic scales — the TRUE common denominator
|
|
13
|
+
* between Mantine (web) and HeroUI Native / React Native (mobile). HeroUI Native
|
|
14
|
+
* only exposes `sm | md | lg`, so portable `shared_size` / `shared_radius` fields
|
|
15
|
+
* use these narrowed scales instead of the full Mantine `xs..xl` range. The
|
|
16
|
+
* backend enforces the same domain (migration `Version20260618195450`), and the
|
|
17
|
+
* semantic mapper (`theme/semantic.ts`) maps these 1:1 without clamping.
|
|
18
|
+
*
|
|
19
|
+
* Web-only `web_size` / `web_radius` keep the full `TMantineSize` / `TMantineRadius`.
|
|
20
|
+
*/
|
|
21
|
+
type TSharedSize = 'sm' | 'md' | 'lg';
|
|
22
|
+
type TSharedRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
11
23
|
type TMantineVariant = 'default' | 'filled' | 'light' | 'outline' | 'subtle' | 'transparent' | 'white' | 'gradient';
|
|
12
24
|
type TMantineColor = 'gray' | 'red' | 'pink' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'teal' | 'green' | 'lime' | 'yellow' | 'orange' | 'dark' | string;
|
|
13
25
|
type TMantineOrientation = 'horizontal' | 'vertical';
|
|
@@ -77,4 +89,4 @@ type TMantineGrow = '0' | '1';
|
|
|
77
89
|
type TMantineInline = '0' | '1';
|
|
78
90
|
type TMantineFluid = '0' | '1';
|
|
79
91
|
|
|
80
|
-
export type {
|
|
92
|
+
export type { TMantineInline as $, TMantineAspectRatio as A, TMantineAutoContrast as B, TMantineBlock as C, TMantineCenterInline as D, TMantineChecked as E, TMantineChipChecked as F, TMantineChipMultiple as G, TMantineClampBehavior as H, TMantineCodeBlock as I, TMantineColorFormat as J, TMantineColorInputSwatches as K, TMantineColorPickerSwatches as L, TMantineColorPickerSwatchesPerRow as M, TMantineCompact as N, TMantineContainerFluid as O, TMantineDisabled as P, TMantineFileAccept as Q, TMantineFileInputMultiple as R, TMantineFluid as S, TMantineRadius as T, TMantineFullWidth as U, TMantineGridGrow as V, TMantineGridOverflow as W, TMantineGroupGrow as X, TMantineGroupWrap as Y, TMantineGrow as Z, TMantineHighlight as _, TSharedSize as a, TMantineIsLink as a0, TMantineKbdSize as a1, TMantineLoading as a2, TMantineMultiple as a3, TMantineNotificationWithCloseButton as a4, TMantineNumberInputDecimalScale as a5, TMantineOpenInNewTab as a6, TMantineProcessing as a7, TMantineRangeSliderMarks as a8, TMantineRatingCount as a9, TMantineRatingFractions as aa, TMantineRatingReadonly as ab, TMantineReadonly as ac, TMantineSpaceHorizontal as ad, TMantineSwatches as ae, TMantineTabDisabled as af, TMantineUseMantineStyle as ag, TMantineWithCloseButton as ah, TMantineWithIcon as ai, TMantineSpacing as b, TMantineJustify as c, TMantineAlign as d, TMantineDirection as e, TMantineWrap as f, TMantineGridSpan as g, TMantineOrientation as h, TMantineColor as i, TSharedRadius as j, TMantineTitleOrder as k, TMantineSize as l, TMantineFieldsetVariant as m, TMantineSpoilerMaxHeight as n, TMantineVariant as o, TMantineBadgeVariant as p, TMantineAvatarVariant as q, TMantineChipVariant as r, TMantineIndicatorPosition as s, TMantineThemeIconVariant as t, TMantineAccordionVariant as u, TMantineTabsVariant as v, TMantineTimelineLineVariant as w, TMantineActionIconLoading as x, TMantineAllowNextClicks as y, TMantineAllowStepClick as z };
|
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
type TMantineSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
type TMantineRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
|
|
10
10
|
type TMantineSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none' | string;
|
|
11
|
+
/**
|
|
12
|
+
* Cross-platform (`shared_*`) semantic scales — the TRUE common denominator
|
|
13
|
+
* between Mantine (web) and HeroUI Native / React Native (mobile). HeroUI Native
|
|
14
|
+
* only exposes `sm | md | lg`, so portable `shared_size` / `shared_radius` fields
|
|
15
|
+
* use these narrowed scales instead of the full Mantine `xs..xl` range. The
|
|
16
|
+
* backend enforces the same domain (migration `Version20260618195450`), and the
|
|
17
|
+
* semantic mapper (`theme/semantic.ts`) maps these 1:1 without clamping.
|
|
18
|
+
*
|
|
19
|
+
* Web-only `web_size` / `web_radius` keep the full `TMantineSize` / `TMantineRadius`.
|
|
20
|
+
*/
|
|
21
|
+
type TSharedSize = 'sm' | 'md' | 'lg';
|
|
22
|
+
type TSharedRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
11
23
|
type TMantineVariant = 'default' | 'filled' | 'light' | 'outline' | 'subtle' | 'transparent' | 'white' | 'gradient';
|
|
12
24
|
type TMantineColor = 'gray' | 'red' | 'pink' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'teal' | 'green' | 'lime' | 'yellow' | 'orange' | 'dark' | string;
|
|
13
25
|
type TMantineOrientation = 'horizontal' | 'vertical';
|
|
@@ -77,4 +89,4 @@ type TMantineGrow = '0' | '1';
|
|
|
77
89
|
type TMantineInline = '0' | '1';
|
|
78
90
|
type TMantineFluid = '0' | '1';
|
|
79
91
|
|
|
80
|
-
export type {
|
|
92
|
+
export type { TMantineInline as $, TMantineAspectRatio as A, TMantineAutoContrast as B, TMantineBlock as C, TMantineCenterInline as D, TMantineChecked as E, TMantineChipChecked as F, TMantineChipMultiple as G, TMantineClampBehavior as H, TMantineCodeBlock as I, TMantineColorFormat as J, TMantineColorInputSwatches as K, TMantineColorPickerSwatches as L, TMantineColorPickerSwatchesPerRow as M, TMantineCompact as N, TMantineContainerFluid as O, TMantineDisabled as P, TMantineFileAccept as Q, TMantineFileInputMultiple as R, TMantineFluid as S, TMantineRadius as T, TMantineFullWidth as U, TMantineGridGrow as V, TMantineGridOverflow as W, TMantineGroupGrow as X, TMantineGroupWrap as Y, TMantineGrow as Z, TMantineHighlight as _, TSharedSize as a, TMantineIsLink as a0, TMantineKbdSize as a1, TMantineLoading as a2, TMantineMultiple as a3, TMantineNotificationWithCloseButton as a4, TMantineNumberInputDecimalScale as a5, TMantineOpenInNewTab as a6, TMantineProcessing as a7, TMantineRangeSliderMarks as a8, TMantineRatingCount as a9, TMantineRatingFractions as aa, TMantineRatingReadonly as ab, TMantineReadonly as ac, TMantineSpaceHorizontal as ad, TMantineSwatches as ae, TMantineTabDisabled as af, TMantineUseMantineStyle as ag, TMantineWithCloseButton as ah, TMantineWithIcon as ai, TMantineSpacing as b, TMantineJustify as c, TMantineAlign as d, TMantineDirection as e, TMantineWrap as f, TMantineGridSpan as g, TMantineOrientation as h, TMantineColor as i, TSharedRadius as j, TMantineTitleOrder as k, TMantineSize as l, TMantineFieldsetVariant as m, TMantineSpoilerMaxHeight as n, TMantineVariant as o, TMantineBadgeVariant as p, TMantineAvatarVariant as q, TMantineChipVariant as r, TMantineIndicatorPosition as s, TMantineThemeIconVariant as t, TMantineAccordionVariant as u, TMantineTabsVariant as v, TMantineTimelineLineVariant as w, TMantineActionIconLoading as x, TMantineAllowNextClicks as y, TMantineAllowStepClick as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,47 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY,
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { T as TStyleName, j as IContentField } from './styles.registry-DkoT-FmN.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, k as IAccordionItemStyle, l as IAccordionStyle, m as IActionIconStyle, n as IAlertStyle, o as IAspectRatioStyle, p as IAudioStyle, q as IAvatarStyle, r as IBackgroundImageStyle, s as IBadgeStyle, t as IBaseStyle, u as IBlockquoteStyle, v as IBoxStyle, w as IButtonStyle, x as ICardSegmentStyle, y as ICardStyle, z as ICarouselStyle, A as ICenterStyle, C as ICheckboxStyle, D as IChipStyle, E as ICodeStyle, F as IColorInputStyle, G as IColorPickerStyle, H as IComboboxStyle, J as IContainerStyle, K as IDataContainerStyle, L as IDatePickerStyle, M as IDividerStyle, N as IEntryListStyle, O as IEntryRecordDeleteStyle, P as IEntryRecordStyle, Q as IFieldsetStyle, R as IFigureStyle, U as IFileInputStyle, V as IFlexStyle, W as IFormLogStyle, X as IFormRecordStyle, Y as IFormStyle, Z as IGridColumnStyle, $ as IGridStyle, a0 as IGroupStyle, a1 as IHighlightStyle, a2 as IHtmlTagStyle, a3 as IImageStyle, a4 as IIndicatorStyle, a5 as IInputStyle, a6 as IKbdStyle, a7 as ILinkStyle, a8 as IListItemStyle, a9 as IListStyle, aa as ILoginStyle, ab as ILoopStyle, ac as IMissingStyle, ad as INoAccessStyle, ae as INotFoundStyle, af as INotificationStyle, ag as INumberInputStyle, ah as IPaperStyle, a as IPluginStyleRegistryEntry, ai as IProfileStyle, aj as IProgressRootStyle, ak as IProgressSectionStyle, al as IProgressStyle, am as IRadioStyle, an as IRangeSliderStyle, ao as IRatingStyle, ap as IRefContainerStyle, aq as IRegisterStyle, ar as IResetPasswordStyle, as as IRichTextEditorStyle, at as IScrollAreaStyle, au as ISegmentedControlStyle, av as ISelectStyle, aw as IShowUserInputEntry, ax as IShowUserInputStyle, ay as ISimpleGridStyle, az as ISliderStyle, aA as ISpaceStyle, aB as ISpoilerStyle, aC as IStackStyle, I as IStyleRegistryEntry, aD as IStyleWithSpacing, aE as ISwitchStyle, aF as ITabStyle, aG as ITabsStyle, aH as ITextInputStyle, aI as ITextStyle, aJ as ITextareaStyle, aK as IThemeIconStyle, aL as ITimelineItemStyle, aM as ITimelineStyle, aN as ITitleStyle, aO as ITwoFactorAuthStyle, aP as ITypographyStyle, aQ as IUnknownStyle, aR as IValidateStyle, aS as IVersionStyle, aT as IVideoStyle, S as STYLE_REGISTRY, c as TConcretePlatform, aU as TMantineAccordionChevronPosition, aV as TMantineAccordionDisableChevronRotation, aW as TMantineAccordionLoop, aX as TMantineAccordionMultiple, aY as TMantineBorder, aZ as TMantineCardShadow, a_ as TMantineCheckboxLabelPosition, a$ as TMantineCols, b0 as TMantineDividerVariant, b1 as TMantineGap, b2 as TMantineGridOffset, b3 as TMantineGridOrder, b4 as TMantineHeight, b5 as TMantineIconSize, b6 as TMantineImageFit, b7 as TMantineLineClamp, b8 as TMantineListCenter, b9 as TMantineListStyleType, ba as TMantineListType, bb as TMantineListWithPadding, bc as TMantinePaperShadow, bd as TMantineProgressTransition, be as TMantineScrollAreaSize, bf as TMantineScrollAreaType, bg as TMantineTextAlign, bh as TMantineTextDecoration, bi as TMantineTextFontStyle, bj as TMantineTextFontWeight, bk as TMantineTextInherit, bl as TMantineTextInputVariant, bm as TMantineTextSpan, bn as TMantineTextTransform, bo as TMantineTextTruncate, bp as TMantineTextVariant, bq as TMantineTextareaAutosize, br as TMantineTextareaResize, bs as TMantineTextareaVariant, bt as TMantineTimelineAlign, bu as TMantineTitleLineClamp, bv as TMantineTitleTextWrap, bw as TMantineTranslatable, bx as TMantineUseInputWrapper, by as TMantineWidth, bz as TStyle, b as TStylePlacement, d as TStylePlatform, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, f as _resetPluginStyleRegistry, g as extendStyleRegistry, h as getMergedStyleRegistry, i as getPluginStyleRegistry } from './styles.registry-DkoT-FmN.mjs';
|
|
3
|
+
export { u as TMantineAccordionVariant, x as TMantineActionIconLoading, d as TMantineAlign, y as TMantineAllowNextClicks, z as TMantineAllowStepClick, A as TMantineAspectRatio, B as TMantineAutoContrast, q as TMantineAvatarVariant, p as TMantineBadgeVariant, C as TMantineBlock, D as TMantineCenterInline, E as TMantineChecked, F as TMantineChipChecked, G as TMantineChipMultiple, r as TMantineChipVariant, H as TMantineClampBehavior, I as TMantineCodeBlock, i as TMantineColor, J as TMantineColorFormat, K as TMantineColorInputSwatches, L as TMantineColorPickerSwatches, M as TMantineColorPickerSwatchesPerRow, N as TMantineCompact, O as TMantineContainerFluid, e as TMantineDirection, P as TMantineDisabled, m as TMantineFieldsetVariant, Q as TMantineFileAccept, R as TMantineFileInputMultiple, S as TMantineFluid, U as TMantineFullWidth, V as TMantineGridGrow, W as TMantineGridOverflow, g as TMantineGridSpan, X as TMantineGroupGrow, Y as TMantineGroupWrap, Z as TMantineGrow, _ as TMantineHighlight, s as TMantineIndicatorPosition, $ as TMantineInline, a0 as TMantineIsLink, c as TMantineJustify, a1 as TMantineKbdSize, a2 as TMantineLoading, a3 as TMantineMultiple, a4 as TMantineNotificationWithCloseButton, a5 as TMantineNumberInputDecimalScale, a6 as TMantineOpenInNewTab, h as TMantineOrientation, a7 as TMantineProcessing, T as TMantineRadius, a8 as TMantineRangeSliderMarks, a9 as TMantineRatingCount, aa as TMantineRatingFractions, ab as TMantineRatingReadonly, ac as TMantineReadonly, l as TMantineSize, ad as TMantineSpaceHorizontal, b as TMantineSpacing, n as TMantineSpoilerMaxHeight, ae as TMantineSwatches, af as TMantineTabDisabled, v as TMantineTabsVariant, t as TMantineThemeIconVariant, w as TMantineTimelineLineVariant, k as TMantineTitleOrder, ag as TMantineUseMantineStyle, o as TMantineVariant, ah as TMantineWithCloseButton, ai as TMantineWithIcon, f as TMantineWrap, j as TSharedRadius, a as TSharedSize } from './common-CJSHQL1E.mjs';
|
|
4
|
+
import { ReactNode, ComponentType } from 'react';
|
|
5
|
+
import { THeroUiButtonVariant, THeroUiSize } from './theme/index.mjs';
|
|
6
|
+
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, IHeroUiResolvedStyle, IMantineResolvedStyle, IReactNativeResolvedStyle, IReactNativeThemeScales, IResolvedVariant, ISharedStyleProps, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, THeroUiColor, TMantineMappedColor, TMantineMappedVariant, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, colorToHex, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle } from './theme/index.mjs';
|
|
7
|
+
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePlacement, getStylePlatforms, getStylePluginId, isKnownStyleName, isRegisteredStyleName, isStyleAllowedOnPage, isStylePlacementAllowed, isStyleSupportedOnPlatform, setToStylePlatform, stylePlatformToSet } from './registry/index.mjs';
|
|
6
8
|
export { sharedTailwindExtend, sharedTailwindPreset } from './theme/tailwind.mjs';
|
|
7
9
|
|
|
8
|
-
interface INoAccessStyle extends IStyleWithSpacing {
|
|
9
|
-
style_name: 'no-access';
|
|
10
|
-
title?: IContentField<string>;
|
|
11
|
-
message?: IContentField<string>;
|
|
12
|
-
button_label?: IContentField<string>;
|
|
13
|
-
login_label?: IContentField<string>;
|
|
14
|
-
show_login?: IContentField<string>;
|
|
15
|
-
mantine_color?: IContentField<string>;
|
|
16
|
-
mantine_radius?: IContentField<string>;
|
|
17
|
-
mantine_shadow?: IContentField<string>;
|
|
18
|
-
mantine_button_variant?: IContentField<string>;
|
|
19
|
-
show_icon?: IContentField<string>;
|
|
20
|
-
}
|
|
21
|
-
interface INotFoundStyle extends IStyleWithSpacing {
|
|
22
|
-
style_name: 'not-found';
|
|
23
|
-
title?: IContentField<string>;
|
|
24
|
-
message?: IContentField<string>;
|
|
25
|
-
button_label?: IContentField<string>;
|
|
26
|
-
login_label?: IContentField<string>;
|
|
27
|
-
mantine_color?: IContentField<string>;
|
|
28
|
-
mantine_radius?: IContentField<string>;
|
|
29
|
-
mantine_shadow?: IContentField<string>;
|
|
30
|
-
mantine_button_variant?: IContentField<string>;
|
|
31
|
-
show_icon?: IContentField<string>;
|
|
32
|
-
}
|
|
33
|
-
interface IMissingStyle extends IStyleWithSpacing {
|
|
34
|
-
style_name: 'missing';
|
|
35
|
-
title?: IContentField<string>;
|
|
36
|
-
message?: IContentField<string>;
|
|
37
|
-
button_label?: IContentField<string>;
|
|
38
|
-
mantine_color?: IContentField<string>;
|
|
39
|
-
mantine_radius?: IContentField<string>;
|
|
40
|
-
mantine_shadow?: IContentField<string>;
|
|
41
|
-
mantine_button_variant?: IContentField<string>;
|
|
42
|
-
show_icon?: IContentField<string>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
10
|
/**
|
|
46
11
|
* Comprehensive page type system, single source of truth for both apps.
|
|
47
12
|
*/
|
|
@@ -1187,6 +1152,133 @@ interface SupportBundleMeta {
|
|
|
1187
1152
|
contents: string[];
|
|
1188
1153
|
}
|
|
1189
1154
|
|
|
1155
|
+
/**
|
|
1156
|
+
* Mobile UI adapter contract — the SINGLE public source of the capability
|
|
1157
|
+
* shape both mobile tiers implement (mobile rendering plan, sections 8.3 / 9).
|
|
1158
|
+
*
|
|
1159
|
+
* The public mobile app renders CMS styles through these `Mobile*` capability
|
|
1160
|
+
* interfaces only, never directly against a UI library, so the build can swap
|
|
1161
|
+
* the implementation behind the `@selfhelp/mobile-pro-ui` specifier:
|
|
1162
|
+
* - OSS tier -> the public app's in-repo adapters on open `heroui-native` +
|
|
1163
|
+
* React Native primitives.
|
|
1164
|
+
* - Pro tier -> the private `@selfhelp/mobile-pro-ui` package built on paid
|
|
1165
|
+
* HeroUI Pro components.
|
|
1166
|
+
*
|
|
1167
|
+
* It lives here (not copied into each consumer) so the public app and the Pro
|
|
1168
|
+
* package consume ONE contract and cannot silently drift. This module is
|
|
1169
|
+
* type-only: it imports `react` types and the shared semantic scales, and
|
|
1170
|
+
* pulls in NO React Native runtime dependency, which is why it belongs in
|
|
1171
|
+
* `@selfhelp/shared` rather than a separate contract package (plan 8.3).
|
|
1172
|
+
*
|
|
1173
|
+
* Props are normalized + renderer-agnostic (driven by the shared semantic
|
|
1174
|
+
* mapper in this package), NOT raw library props, so both tiers share one
|
|
1175
|
+
* contract.
|
|
1176
|
+
*/
|
|
1177
|
+
|
|
1178
|
+
/** Props shared by every adapter (styling + accessibility passthrough). */
|
|
1179
|
+
interface IMobileAdapterBaseProps {
|
|
1180
|
+
/** Uniwind/Tailwind class string (from `css_mobile` + spacing). */
|
|
1181
|
+
className?: string;
|
|
1182
|
+
/** Accessibility label for assistive tech. */
|
|
1183
|
+
accessibilityLabel?: string;
|
|
1184
|
+
testID?: string;
|
|
1185
|
+
}
|
|
1186
|
+
interface IMobileButtonProps extends IMobileAdapterBaseProps {
|
|
1187
|
+
label?: string;
|
|
1188
|
+
onPress?: () => void;
|
|
1189
|
+
variant?: THeroUiButtonVariant;
|
|
1190
|
+
size?: THeroUiSize;
|
|
1191
|
+
isDisabled?: boolean;
|
|
1192
|
+
isLoading?: boolean;
|
|
1193
|
+
isIconOnly?: boolean;
|
|
1194
|
+
fullWidth?: boolean;
|
|
1195
|
+
children?: ReactNode;
|
|
1196
|
+
}
|
|
1197
|
+
interface IMobileTextProps extends IMobileAdapterBaseProps {
|
|
1198
|
+
children?: ReactNode;
|
|
1199
|
+
/** Map to a heading level / emphasis; renderer decides exact styling. */
|
|
1200
|
+
emphasis?: 'title' | 'body' | 'muted';
|
|
1201
|
+
numberOfLines?: number;
|
|
1202
|
+
}
|
|
1203
|
+
interface IMobileContainerProps extends IMobileAdapterBaseProps {
|
|
1204
|
+
children?: ReactNode;
|
|
1205
|
+
fullWidth?: boolean;
|
|
1206
|
+
/** Resolved padding in px (from shared spacing). */
|
|
1207
|
+
paddingPx?: number;
|
|
1208
|
+
}
|
|
1209
|
+
interface IMobileCardProps extends IMobileAdapterBaseProps {
|
|
1210
|
+
children?: ReactNode;
|
|
1211
|
+
/** Resolved corner radius in px (from shared radius). */
|
|
1212
|
+
radiusPx?: number;
|
|
1213
|
+
}
|
|
1214
|
+
interface IMobileInputProps extends IMobileAdapterBaseProps {
|
|
1215
|
+
value?: string;
|
|
1216
|
+
onChangeText?: (next: string) => void;
|
|
1217
|
+
placeholder?: string;
|
|
1218
|
+
label?: string;
|
|
1219
|
+
isDisabled?: boolean;
|
|
1220
|
+
isInvalid?: boolean;
|
|
1221
|
+
isRequired?: boolean;
|
|
1222
|
+
secureTextEntry?: boolean;
|
|
1223
|
+
keyboardType?: 'default' | 'email-address' | 'numeric' | 'phone-pad';
|
|
1224
|
+
}
|
|
1225
|
+
interface IMobileTextareaProps extends IMobileAdapterBaseProps {
|
|
1226
|
+
value?: string;
|
|
1227
|
+
onChangeText?: (next: string) => void;
|
|
1228
|
+
placeholder?: string;
|
|
1229
|
+
label?: string;
|
|
1230
|
+
isDisabled?: boolean;
|
|
1231
|
+
isInvalid?: boolean;
|
|
1232
|
+
isRequired?: boolean;
|
|
1233
|
+
/** Minimum visible rows (maps to RN `numberOfLines`). */
|
|
1234
|
+
numberOfLines?: number;
|
|
1235
|
+
}
|
|
1236
|
+
interface IMobileSwitchProps extends IMobileAdapterBaseProps {
|
|
1237
|
+
isSelected?: boolean;
|
|
1238
|
+
onSelectedChange?: (next: boolean) => void;
|
|
1239
|
+
isDisabled?: boolean;
|
|
1240
|
+
label?: string;
|
|
1241
|
+
}
|
|
1242
|
+
interface IMobileCheckboxProps extends IMobileAdapterBaseProps {
|
|
1243
|
+
isSelected?: boolean;
|
|
1244
|
+
onSelectedChange?: (next: boolean) => void;
|
|
1245
|
+
isDisabled?: boolean;
|
|
1246
|
+
label?: string;
|
|
1247
|
+
}
|
|
1248
|
+
interface IMobileSelectOption {
|
|
1249
|
+
value: string;
|
|
1250
|
+
label: string;
|
|
1251
|
+
}
|
|
1252
|
+
interface IMobileSelectProps extends IMobileAdapterBaseProps {
|
|
1253
|
+
value?: string;
|
|
1254
|
+
onValueChange?: (next: string) => void;
|
|
1255
|
+
options: readonly IMobileSelectOption[];
|
|
1256
|
+
placeholder?: string;
|
|
1257
|
+
isDisabled?: boolean;
|
|
1258
|
+
}
|
|
1259
|
+
interface IMobileModalProps extends IMobileAdapterBaseProps {
|
|
1260
|
+
isOpen: boolean;
|
|
1261
|
+
onClose: () => void;
|
|
1262
|
+
title?: string;
|
|
1263
|
+
children?: ReactNode;
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* The full adapter set every tier must provide. Both the public app's OSS
|
|
1267
|
+
* index and the private Pro package satisfy this exact shape.
|
|
1268
|
+
*/
|
|
1269
|
+
interface IMobileUiAdapters {
|
|
1270
|
+
MobileButton: ComponentType<IMobileButtonProps>;
|
|
1271
|
+
MobileText: ComponentType<IMobileTextProps>;
|
|
1272
|
+
MobileContainer: ComponentType<IMobileContainerProps>;
|
|
1273
|
+
MobileCard: ComponentType<IMobileCardProps>;
|
|
1274
|
+
MobileInput: ComponentType<IMobileInputProps>;
|
|
1275
|
+
MobileTextarea: ComponentType<IMobileTextareaProps>;
|
|
1276
|
+
MobileSwitch: ComponentType<IMobileSwitchProps>;
|
|
1277
|
+
MobileCheckbox: ComponentType<IMobileCheckboxProps>;
|
|
1278
|
+
MobileSelect: ComponentType<IMobileSelectProps>;
|
|
1279
|
+
MobileModal: ComponentType<IMobileModalProps>;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1190
1282
|
/**
|
|
1191
1283
|
* Frontend-only subset of /cms-api/v1/* endpoints. The web frontend keeps
|
|
1192
1284
|
* its admin endpoints local. The mobile app consumes only what's here.
|
|
@@ -1404,7 +1496,7 @@ interface IAssetSource {
|
|
|
1404
1496
|
declare function resolveAssetSources<T extends IAssetSource>(sources: T[] | undefined, baseUrl: string): T[];
|
|
1405
1497
|
|
|
1406
1498
|
/**
|
|
1407
|
-
* Parse the unified `
|
|
1499
|
+
* Parse the unified `shared_spacing` field. The CMS
|
|
1408
1500
|
* stores this as a JSON string with optional keys for each side:
|
|
1409
1501
|
*
|
|
1410
1502
|
* { "mt": "md", "mb": "lg", "ms": "0", "me": "auto",
|
|
@@ -1482,4 +1574,4 @@ declare function transformPageData(apiPage: IRawPage): IPageItem;
|
|
|
1482
1574
|
*/
|
|
1483
1575
|
declare function transformPagesData(pages: IRawPage[] | null | undefined): IPageItem[];
|
|
1484
1576
|
|
|
1485
|
-
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, type BackupRetentionPolicy, type BackupSchedulePolicy, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease, type DatabaseMigrationMetadata, ENDPOINTS, type FrontendRelease, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type ICompatibilityError, type IConditionContext, IContentField, type IEvaluatedCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IFrontendUpdatePreflight, type IFrontendUpdatePreflightResponse, type IFrontendUpdateReleases, type IFrontendUpdateReleasesResponse, type IFrontendUpdateRequest, type IFrontendUpdateRequestResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMaintenanceSetRequest, type IMeta, type
|
|
1577
|
+
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, type BackupRetentionPolicy, type BackupSchedulePolicy, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease, type DatabaseMigrationMetadata, ENDPOINTS, type FrontendRelease, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type ICompatibilityError, type IConditionContext, IContentField, type IEvaluatedCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IFrontendUpdatePreflight, type IFrontendUpdatePreflightResponse, type IFrontendUpdateReleases, type IFrontendUpdateReleasesResponse, type IFrontendUpdateRequest, type IFrontendUpdateRequestResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMaintenanceSetRequest, type IMeta, type IMobileAdapterBaseProps, type IMobileButtonProps, type IMobileCardProps, type IMobileCheckboxProps, type IMobileContainerProps, type IMobileInputProps, type IMobileModalProps, type IMobileSelectOption, type IMobileSelectProps, type IMobileSwitchProps, type IMobileTextProps, type IMobileTextareaProps, type IMobileUiAdapters, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type IResetPasswordRequest, type IResetPasswordResponse, type ISpacingValue, type ISystemAdvisories, type ISystemAdvisoriesResponse, type ISystemAdvisory, type ISystemAdvisoryAffected, type ISystemHealth, type ISystemHealthComponent, type ISystemHealthResponse, type ISystemInstalledPlugin, type ISystemMaintenance, type ISystemMaintenanceResponse, type ISystemVersion, type ISystemVersionResponse, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUpdatePreflight, type IUpdatePreflightCheck, type IUpdatePreflightOption, type IUpdatePreflightResponse, type IUpdateRelease, type IUpdateReleases, type IUpdateReleasesResponse, type IUpdateRequest, type IUpdateRequestResponse, type IUpdateStatus, type IUpdateStatusManager, type IUpdateStatusResponse, type IUpdateStep, type IUserData, type IUserDataResponse, type ImageRef, type InstalledPlugin, type InstanceImages, type InstanceLock, type InstanceManifest, type InstanceMode, type InstanceResourceConfig, type InstanceRouting, type InstanceStatus, type InstanceVersions, type InventoryInstanceEntry, LITERAL_CLASSES, type LockPluginEntry, type LockServiceEntry, PERMISSIONS, type PluginRelease, type PreflightCheck, type PreflightOption, type PreflightStatus, RELEASE_CHANNELS, type RegistryIndex, type RegistryReleaseRef, type ReleaseChannel, type RuntimeServicePolicy, type RuntimeServiceRange, SIZE_VALUES, SPACING_VALUES, SYSTEM_ENDPOINTS, type SchedulerRelease, type SecurityAdvisory, type ServerInventory, type ServiceBackendCompatibility, type SignatureBlock, type SupportBundleMeta, type TCalcedValues, type TClassDecision, type TClientType, THeroUiButtonVariant, THeroUiSize, type TPermission, type TPlatform, TStyleName, type TSystemAdvisorySeverity, type TSystemComponentStatus, type TSystemDeployment, type TSystemHealthOverall, type TUpdateCheckSeverity, type TUpdateKind, type TUpdateOperationStatus, type TUpdatePreflightStatus, type TrustLevel, type TrustedKey, type TrustedKeysFile, type UpdatePreflightResult, type WorkerRelease, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|