@platform-blocks/ui 0.3.0 → 0.4.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.
Files changed (122) hide show
  1. package/lib/cjs/index.js +5378 -2406
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/components/Accordion/hooks/useAccordionItemAnimation.d.ts +8 -10
  4. package/lib/components/Avatar/types.d.ts +9 -0
  5. package/lib/components/Calendar/types.d.ts +2 -1
  6. package/lib/components/Can/types.d.ts +6 -4
  7. package/lib/components/CodeBlock/CodeBlock.d.ts +0 -12
  8. package/lib/components/CodeBlock/types.d.ts +19 -0
  9. package/lib/components/CodeBlock/utils.d.ts +4 -13
  10. package/lib/components/Collapse/Collapse.d.ts +4 -0
  11. package/lib/components/Collapse/index.d.ts +2 -0
  12. package/lib/components/{Reveal → Collapse}/types.d.ts +9 -5
  13. package/lib/components/ColorPicker/styles.d.ts +1 -0
  14. package/lib/components/GradientText/GradientText.d.ts +1 -10
  15. package/lib/components/GradientText/types.d.ts +1 -9
  16. package/lib/components/Input/styles.d.ts +2 -2
  17. package/lib/components/Input/types.d.ts +4 -3
  18. package/lib/components/Knob/Knob.d.ts +22 -3
  19. package/lib/components/Knob/appearance.d.ts +56 -0
  20. package/lib/components/Knob/arc.d.ts +21 -0
  21. package/lib/components/Knob/components/KnobSurface.d.ts +30 -0
  22. package/lib/components/Knob/components/PointerLayer.d.ts +13 -0
  23. package/lib/components/Knob/components/SurfaceLayers.d.ts +38 -0
  24. package/lib/components/Knob/components/ThumbLayer.d.ts +14 -0
  25. package/lib/components/Knob/components/TickLayers.d.ts +27 -0
  26. package/lib/components/Knob/components/ValueLabelLayout.d.ts +18 -0
  27. package/lib/components/Knob/hooks/useKnobGeometry.d.ts +16 -0
  28. package/lib/components/Knob/hooks/useKnobGestures.d.ts +28 -0
  29. package/lib/components/Knob/hooks/useKnobInteraction.d.ts +29 -0
  30. package/lib/components/Knob/hooks/useKnobValue.d.ts +31 -0
  31. package/lib/components/Knob/hooks/useKnobValueLabels.d.ts +20 -0
  32. package/lib/components/Knob/index.d.ts +1 -1
  33. package/lib/components/Knob/interactionConfig.d.ts +22 -0
  34. package/lib/components/Knob/styles.d.ts +93 -0
  35. package/lib/components/Knob/types.d.ts +247 -1
  36. package/lib/components/Knob/utils/geometry.d.ts +6 -0
  37. package/lib/components/Knob/utils/marks.d.ts +4 -0
  38. package/lib/components/Knob/utils/math.d.ts +1 -0
  39. package/lib/components/ListGroup/types.d.ts +2 -2
  40. package/lib/components/Markdown/Markdown.d.ts +5 -0
  41. package/lib/components/Menu/styles.d.ts +2 -2
  42. package/lib/components/Menu/types.d.ts +2 -2
  43. package/lib/components/MenuItemButton/MenuItemButton.d.ts +4 -3
  44. package/lib/components/Notice/Notice.d.ts +2 -0
  45. package/lib/components/Notice/index.d.ts +2 -0
  46. package/lib/components/{Alert → Notice}/types.d.ts +9 -9
  47. package/lib/components/QRCode/types.d.ts +0 -6
  48. package/lib/components/Radio/types.d.ts +2 -0
  49. package/lib/components/Rating/types.d.ts +2 -1
  50. package/lib/components/Search/types.d.ts +3 -3
  51. package/lib/components/ShimmerText/ShimmerText.d.ts +2 -32
  52. package/lib/components/ShimmerText/types.d.ts +18 -10
  53. package/lib/components/Spotlight/Spotlight.d.ts +2 -2
  54. package/lib/components/Spotlight/types.d.ts +3 -3
  55. package/lib/components/Switch/types.d.ts +2 -1
  56. package/lib/components/Text/Text.d.ts +3 -4
  57. package/lib/components/Text/index.d.ts +1 -1
  58. package/lib/components/Toast/ToastProvider.d.ts +1 -8
  59. package/lib/components/Toast/index.d.ts +1 -1
  60. package/lib/components/Toggle/types.d.ts +2 -1
  61. package/lib/components/Tree/types.d.ts +2 -0
  62. package/lib/components/{Disclaimer → _internal/Disclaimer}/Disclaimer.d.ts +2 -2
  63. package/lib/components/_internal/Reveal/Reveal.d.ts +0 -0
  64. package/lib/components/_internal/Reveal/index.d.ts +0 -0
  65. package/lib/components/_internal/Reveal/types.d.ts +0 -0
  66. package/lib/components/index.d.ts +8 -11
  67. package/lib/components/optimized.d.ts +10 -1
  68. package/lib/components/types.d.ts +1 -2
  69. package/lib/core/components/InputContainer.d.ts +3 -3
  70. package/lib/core/factory/factory.d.ts +3 -1
  71. package/lib/core/factory/polymorphicFactory.d.ts +4 -3
  72. package/lib/core/utils/index.d.ts +1 -1
  73. package/lib/core/utils/positioning-enhanced.d.ts +0 -18
  74. package/lib/core/utils/spacing.d.ts +3 -4
  75. package/lib/core/utils/universal.d.ts +1 -2
  76. package/lib/core/utils/universalSimple.d.ts +1 -2
  77. package/lib/core/utils/withUniversalProps.d.ts +1 -1
  78. package/lib/esm/index.js +5379 -2405
  79. package/lib/esm/index.js.map +1 -1
  80. package/lib/hooks/index.d.ts +2 -0
  81. package/lib/hooks/useDeviceInfo/index.d.ts +108 -0
  82. package/lib/hooks/useEscapeKey/index.d.ts +1 -0
  83. package/lib/hooks/useGlobalHotkeys/index.d.ts +1 -0
  84. package/lib/hooks/{useMaskedInput.d.ts → useMaskedInput/index.d.ts} +1 -1
  85. package/lib/hooks/useMaskedInput/utils/mask.d.ts +138 -0
  86. package/lib/hooks/useOverlayMode/index.d.ts +29 -0
  87. package/lib/hooks/useSpotlightToggle/index.d.ts +1 -0
  88. package/lib/hooks/useToggleColorScheme/index.d.ts +1 -0
  89. package/lib/index.d.ts +12 -11
  90. package/lib/utils/mask.d.ts +1 -138
  91. package/package.json +10 -10
  92. package/lib/components/Alert/Alert.d.ts +0 -2
  93. package/lib/components/Alert/index.d.ts +0 -2
  94. package/lib/components/CodeBlock/type.d.ts +0 -40
  95. package/lib/components/Container/Container.d.ts +0 -3
  96. package/lib/components/Container/index.d.ts +0 -2
  97. package/lib/components/Container/types.d.ts +0 -31
  98. package/lib/components/Forms/ContactForm.d.ts +0 -3
  99. package/lib/components/Forms/ForgotPasswordForm.d.ts +0 -3
  100. package/lib/components/Forms/LoginForm.d.ts +0 -3
  101. package/lib/components/Forms/SignupForm.d.ts +0 -3
  102. package/lib/components/Forms/index.d.ts +0 -5
  103. package/lib/components/Forms/types.d.ts +0 -89
  104. package/lib/components/Reveal/Reveal.d.ts +0 -4
  105. package/lib/components/Reveal/index.d.ts +0 -2
  106. /package/lib/components/{Accessibility → _internal/Accessibility}/AccessibilityDemo.d.ts +0 -0
  107. /package/lib/components/{Accessibility → _internal/Accessibility}/AccessibilityHelpers.d.ts +0 -0
  108. /package/lib/components/{Accessibility → _internal/Accessibility}/AccessibilityTesting.d.ts +0 -0
  109. /package/lib/components/{Accessibility → _internal/Accessibility}/AccessibleComponents.d.ts +0 -0
  110. /package/lib/components/{Accessibility → _internal/Accessibility}/index.d.ts +0 -0
  111. /package/lib/components/{Disclaimer → _internal/Disclaimer}/disclaimerUtils.d.ts +0 -0
  112. /package/lib/components/{Disclaimer → _internal/Disclaimer}/index.d.ts +0 -0
  113. /package/lib/components/{Disclaimer → _internal/Disclaimer}/withDisclaimer.d.ts +0 -0
  114. /package/lib/components/{PressAnimation → _internal/PressAnimation}/PressAnimation.d.ts +0 -0
  115. /package/lib/components/{PressAnimation → _internal/PressAnimation}/index.d.ts +0 -0
  116. /package/lib/hooks/{useClipboard.d.ts → useClipboard/index.d.ts} +0 -0
  117. /package/lib/hooks/{useHaptics.d.ts → useHaptics/index.d.ts} +0 -0
  118. /package/lib/hooks/{useHotkeys.d.ts → useHotkeys/index.d.ts} +0 -0
  119. /package/lib/hooks/{useScrollSpy.d.ts → useScrollSpy/index.d.ts} +0 -0
  120. /package/lib/{contexts → hooks/useTitleRegistration/contexts}/TitleRegistryContext.d.ts +0 -0
  121. /package/lib/{contexts → hooks/useTitleRegistration/contexts}/index.d.ts +0 -0
  122. /package/lib/hooks/{useTitleRegistration.d.ts → useTitleRegistration/index.d.ts} +0 -0
@@ -0,0 +1,29 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { View } from 'react-native';
3
+ import type { LayoutState } from './useKnobGeometry';
4
+ import type { NormalizedInteractionConfig } from '../interactionConfig';
5
+ type UseKnobInteractionOptions = {
6
+ disabled: boolean;
7
+ readOnly: boolean;
8
+ pointerGestureEnabled: boolean;
9
+ hasSlideModes: boolean;
10
+ hasVerticalSlide: boolean;
11
+ hasHorizontalSlide: boolean;
12
+ canSpin: boolean;
13
+ interactionConfig: NormalizedInteractionConfig;
14
+ layoutState: LayoutState;
15
+ updateFromPoint: (x: number, y: number, final?: boolean, fromGrant?: boolean) => void;
16
+ onScrubStart?: () => void;
17
+ onScrubEnd?: () => void;
18
+ onChangeEnd?: (value: number) => void;
19
+ valueRef: MutableRefObject<number>;
20
+ hostRef: MutableRefObject<View | null>;
21
+ resetLastDragAngle: () => void;
22
+ handleValueUpdate: (value: number, final: boolean) => void;
23
+ degreesToValueDelta: (degrees: number) => number;
24
+ isRTL: boolean;
25
+ };
26
+ export declare const useKnobInteraction: ({ disabled, readOnly, pointerGestureEnabled, hasSlideModes, hasVerticalSlide, hasHorizontalSlide, canSpin, interactionConfig, layoutState, updateFromPoint, onScrubStart, onScrubEnd, onChangeEnd, valueRef, hostRef, resetLastDragAngle, handleValueUpdate, degreesToValueDelta, isRTL, }: UseKnobInteractionOptions) => {
27
+ panHandlers: import("react-native").GestureResponderHandlers;
28
+ };
29
+ export {};
@@ -0,0 +1,31 @@
1
+ import { MutableRefObject } from 'react';
2
+ import type { SharedValue } from 'react-native-reanimated';
3
+ import type { KnobMark, KnobVariant } from '../types';
4
+ type UseKnobValueOptions = {
5
+ value?: number;
6
+ defaultValue: number;
7
+ min: number;
8
+ max: number;
9
+ step: number;
10
+ marks?: KnobMark[];
11
+ restrictToMarksProp?: boolean;
12
+ resolvedVariant: KnobVariant;
13
+ isEndless: boolean;
14
+ onChange?: (value: number) => void;
15
+ onChangeEnd?: (value: number) => void;
16
+ angle: SharedValue<number>;
17
+ valueToAngle: (value: number) => number;
18
+ };
19
+ export type UseKnobValueResult = {
20
+ marksNormalized: KnobMark[];
21
+ restrictToMarks: boolean;
22
+ displayValue: number;
23
+ resolvedValue: number;
24
+ valueRef: MutableRefObject<number>;
25
+ handleValueUpdate: (nextValue: number, final: boolean) => void;
26
+ isControlled: boolean;
27
+ normalizeValue: (value: number | undefined) => number;
28
+ clampValue: (value: number) => number;
29
+ };
30
+ export declare const useKnobValue: ({ value, defaultValue, min, max, step, marks, restrictToMarksProp, resolvedVariant, isEndless, onChange, onChangeEnd, angle, valueToAngle, }: UseKnobValueOptions) => UseKnobValueResult;
31
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { KnobMark, KnobProps, KnobValueLabelPosition } from '../types';
3
+ export type ValueLabelSlots = Record<KnobValueLabelPosition, React.ReactNode | null>;
4
+ type UseKnobValueLabelsOptions = {
5
+ resolvedVariant: KnobProps['variant'] | 'level' | 'status' | 'dual' | 'endless';
6
+ withLabel: boolean;
7
+ valueLabelProp: KnobProps['valueLabel'];
8
+ formatLabel?: KnobProps['formatLabel'];
9
+ panningValueFormatter?: (value: number) => React.ReactNode;
10
+ min: number;
11
+ max: number;
12
+ displayValue: number;
13
+ theme: any;
14
+ labelColor: string;
15
+ activeMark?: KnobMark | null;
16
+ };
17
+ export declare const useKnobValueLabels: ({ resolvedVariant, withLabel, valueLabelProp, formatLabel, panningValueFormatter, min, max, displayValue, theme, labelColor, activeMark, }: UseKnobValueLabelsOptions) => {
18
+ valueLabelSlots: ValueLabelSlots;
19
+ };
20
+ export {};
@@ -1,2 +1,2 @@
1
1
  export { Knob } from './Knob';
2
- export type { KnobProps, KnobMark } from './types';
2
+ export type { KnobProps, KnobMark, KnobVariant, KnobValueLabelConfig, KnobValueLabelPosition, KnobRootProps, KnobFillPartProps, KnobRingPartProps, KnobProgressPartProps, KnobTickLayerPartProps, KnobPointerPartProps, KnobThumbPartProps, KnobValueLabelPartProps, } from './types';
@@ -0,0 +1,22 @@
1
+ import type { KnobInteractionConfig, KnobInteractionMode } from './types';
2
+ export type NormalizedInteractionConfig = {
3
+ modes: KnobInteractionMode[];
4
+ lockThresholdPx: number;
5
+ variancePx: number;
6
+ slideDominanceRatio: number;
7
+ slideRatio: number;
8
+ slideHysteresisPx: number;
9
+ spinStopAtLimits: boolean;
10
+ spinDeadZoneDegrees: number;
11
+ spinPrecisionRadius?: number;
12
+ respectStartSide: boolean;
13
+ scroll: {
14
+ enabled: boolean;
15
+ ratio: number;
16
+ invert: boolean;
17
+ preventPageScroll: boolean;
18
+ };
19
+ onModeChange?: (mode: KnobInteractionMode | null) => void;
20
+ };
21
+ export declare const DEFAULT_INTERACTION_MODES: KnobInteractionMode[];
22
+ export declare const normalizeInteractionConfig: (appearanceInteraction?: KnobInteractionConfig) => NormalizedInteractionConfig;
@@ -0,0 +1,93 @@
1
+ export declare const knobStyles: {
2
+ knob: {
3
+ position: "relative";
4
+ alignItems: "center";
5
+ justifyContent: "center";
6
+ };
7
+ container: {
8
+ position: "relative";
9
+ alignItems: "center";
10
+ justifyContent: "center";
11
+ };
12
+ thumb: {
13
+ position: "absolute";
14
+ left: "50%";
15
+ top: "50%";
16
+ };
17
+ fillLayer: {
18
+ position: "absolute";
19
+ };
20
+ ringBase: {
21
+ position: "absolute";
22
+ };
23
+ ringSvg: {
24
+ position: "absolute";
25
+ };
26
+ pointerLayer: {
27
+ position: "absolute";
28
+ left: number;
29
+ top: number;
30
+ };
31
+ markDot: {
32
+ position: "absolute";
33
+ };
34
+ markLabelContainer: {
35
+ position: "absolute";
36
+ alignItems: "center";
37
+ justifyContent: "center";
38
+ paddingHorizontal: number;
39
+ };
40
+ markLabelText: {
41
+ textAlign: "center";
42
+ includeFontPadding: false;
43
+ };
44
+ valueLabelContainer: {
45
+ flexDirection: "row";
46
+ alignItems: "center";
47
+ justifyContent: "center";
48
+ pointerEvents: "none";
49
+ };
50
+ valueLabelSecondaryContainer: {
51
+ opacity: number;
52
+ };
53
+ valueLabelText: {
54
+ textAlign: "center";
55
+ };
56
+ valueLabelSecondaryText: {
57
+ textAlign: "center";
58
+ };
59
+ valueLabelAffix: {
60
+ marginHorizontal: number;
61
+ };
62
+ valueLabelStackVertical: {
63
+ alignItems: "center";
64
+ };
65
+ valueLabelStackHorizontal: {
66
+ flexDirection: "row";
67
+ alignItems: "center";
68
+ justifyContent: "center";
69
+ };
70
+ tickDot: {
71
+ position: "absolute";
72
+ };
73
+ tickIcon: {
74
+ position: "absolute";
75
+ };
76
+ tickCustom: {
77
+ position: "absolute";
78
+ };
79
+ tickLabelContainer: {
80
+ position: "absolute";
81
+ alignItems: "center";
82
+ justifyContent: "center";
83
+ paddingHorizontal: number;
84
+ };
85
+ tickLabelText: {
86
+ textAlign: "center";
87
+ includeFontPadding: false;
88
+ };
89
+ statusIconContainer: {
90
+ alignItems: "center";
91
+ justifyContent: "center";
92
+ };
93
+ };
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import type { FC, ReactNode } from 'react';
2
2
  import type { TextStyle, ViewStyle } from 'react-native';
3
3
  import type { SpacingProps, LayoutProps } from '../../core/utils';
4
4
  export interface KnobMark {
@@ -6,8 +6,194 @@ export interface KnobMark {
6
6
  value: number;
7
7
  /** Optional label rendered near the tick */
8
8
  label?: ReactNode;
9
+ /** Optional accent color applied when the mark becomes active */
10
+ accentColor?: string;
11
+ /** Optional icon surfaced by status-oriented variants */
12
+ icon?: ReactNode;
13
+ }
14
+ export type KnobVariant = 'level' | 'stepped' | 'endless' | 'dual' | 'status';
15
+ export type KnobValueLabelPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';
16
+ export interface KnobValueLabelConfig {
17
+ /** Placement relative to the knob surface */
18
+ position?: KnobValueLabelPosition;
19
+ /** Primary formatter for the displayed value */
20
+ formatter?: (value: number) => ReactNode;
21
+ /** Optional prefix rendered before the value */
22
+ prefix?: ReactNode;
23
+ /** Optional suffix rendered after the value */
24
+ suffix?: ReactNode;
25
+ /** Style overrides for the wrapper */
26
+ containerStyle?: ViewStyle;
27
+ /** Style overrides for the primary text */
28
+ textStyle?: TextStyle;
29
+ /** Secondary readout rendered at an independent slot */
30
+ secondary?: {
31
+ formatter?: (value: number) => ReactNode;
32
+ position?: KnobValueLabelPosition;
33
+ prefix?: ReactNode;
34
+ suffix?: ReactNode;
35
+ containerStyle?: ViewStyle;
36
+ textStyle?: TextStyle;
37
+ };
38
+ }
39
+ export type KnobInteractionMode = 'spin' | 'vertical-slide' | 'horizontal-slide' | 'scroll';
40
+ export interface KnobInteractionConfig {
41
+ /** Enabled gesture modalities */
42
+ modes?: KnobInteractionMode[];
43
+ /** Distance in pixels before committing to a gesture */
44
+ lockThresholdPx?: number;
45
+ /** Allowable perpendicular wiggle while detecting slides */
46
+ variancePx?: number;
47
+ /** Required dominance ratio (primary axis vs secondary) before locking into slide */
48
+ slideDominanceRatio?: number;
49
+ /** Pixels of movement required for one degree of rotation */
50
+ slideRatio?: number;
51
+ /** Minimum pixel delta before slides update, filters jitter */
52
+ slideHysteresisPx?: number;
53
+ /** Prevent spin gestures from wrapping past min/max in bounded mode */
54
+ spinStopAtLimits?: boolean;
55
+ /** Ignore tiny spin deltas (degrees) to avoid jitter */
56
+ spinDeadZoneDegrees?: number;
57
+ /** Radius at which spin drags increase precision */
58
+ spinPrecisionRadius?: number;
59
+ /** Whether to mirror GarageBand-style sidedness rules */
60
+ respectStartSide?: boolean;
61
+ /** Mouse/trackpad scroll behavior */
62
+ scroll?: {
63
+ enabled?: boolean;
64
+ ratio?: number;
65
+ invert?: boolean;
66
+ preventPageScroll?: boolean;
67
+ };
68
+ /** Gesture change callback */
69
+ onModeChange?: (mode: KnobInteractionMode | null) => void;
70
+ }
71
+ export interface KnobRingShadow {
72
+ color?: string;
73
+ offsetX?: number;
74
+ offsetY?: number;
75
+ blur?: number;
76
+ opacity?: number;
77
+ }
78
+ export interface KnobRingStyle {
79
+ thickness?: number;
80
+ color?: string;
81
+ trailColor?: string;
82
+ backgroundColor?: string;
83
+ cap?: 'butt' | 'round';
84
+ radiusOffset?: number;
85
+ shadow?: KnobRingShadow;
86
+ }
87
+ export interface KnobFillStyle {
88
+ color?: string;
89
+ borderWidth?: number;
90
+ borderColor?: string;
91
+ radiusOffset?: number;
92
+ }
93
+ export type KnobThumbShape = 'circle' | 'pill' | 'square';
94
+ export interface KnobThumbGlow {
95
+ color?: string;
96
+ blur?: number;
97
+ intensity?: number;
98
+ }
99
+ export interface KnobThumbRenderContext {
100
+ value: number;
101
+ angle: number;
102
+ size: number;
103
+ }
104
+ export interface KnobThumbStyle {
105
+ size?: number;
106
+ shape?: KnobThumbShape;
107
+ color?: string;
108
+ strokeWidth?: number;
109
+ strokeColor?: string;
110
+ offset?: number;
111
+ glow?: KnobThumbGlow;
112
+ style?: ViewStyle;
113
+ renderThumb?: (context: KnobThumbRenderContext) => ReactNode;
114
+ }
115
+ export type KnobTickSource = 'marks' | 'steps' | 'values';
116
+ export type KnobTickShape = 'dot' | 'line' | 'icon' | 'custom';
117
+ export interface KnobTickLabelConfig {
118
+ show?: boolean;
119
+ formatter?: (mark: KnobMark, index: number) => ReactNode;
120
+ position?: 'inner' | 'center' | 'outer';
121
+ offset?: number;
122
+ style?: TextStyle;
123
+ }
124
+ export interface KnobTickLayer {
125
+ source?: KnobTickSource;
126
+ values?: number[];
127
+ shape?: KnobTickShape;
128
+ length?: number;
129
+ width?: number;
130
+ radiusOffset?: number;
131
+ position?: 'inner' | 'center' | 'outer';
132
+ color?: string;
133
+ inactiveColor?: string;
134
+ iconName?: string;
135
+ label?: KnobTickLabelConfig;
136
+ renderTick?: (context: {
137
+ value: number;
138
+ angle: number;
139
+ index: number;
140
+ isActive: boolean;
141
+ center: {
142
+ x: number;
143
+ y: number;
144
+ };
145
+ radius: number;
146
+ }) => ReactNode;
147
+ }
148
+ export interface KnobPointerStyle {
149
+ visible?: boolean;
150
+ length?: number;
151
+ width?: number;
152
+ offset?: number;
153
+ color?: string;
154
+ cap?: 'round' | 'butt';
155
+ counterweight?: {
156
+ size?: number;
157
+ color?: string;
158
+ };
159
+ }
160
+ export interface KnobArcConfig {
161
+ startAngle?: number;
162
+ sweepAngle?: number;
163
+ direction?: 'cw' | 'ccw';
164
+ clampInput?: boolean;
165
+ wrap?: boolean;
166
+ }
167
+ export type KnobProgressMode = 'none' | 'contiguous' | 'split';
168
+ export interface KnobProgressConfig {
169
+ mode?: KnobProgressMode;
170
+ color?: string;
171
+ trailColor?: string;
172
+ roundedCaps?: boolean;
173
+ thickness?: number;
174
+ }
175
+ export interface KnobPanningConfig {
176
+ pivotValue?: number;
177
+ positiveColor?: string;
178
+ negativeColor?: string;
179
+ showZeroIndicator?: boolean;
180
+ valueFormatter?: (value: number) => string | ReactNode;
181
+ mirrorThumbOffset?: boolean;
182
+ }
183
+ export interface KnobAppearance {
184
+ ring?: KnobRingStyle;
185
+ fill?: KnobFillStyle;
186
+ thumb?: KnobThumbStyle | false;
187
+ ticks?: KnobTickLayer | KnobTickLayer[] | false;
188
+ pointer?: KnobPointerStyle | false;
189
+ arc?: KnobArcConfig;
190
+ progress?: KnobProgressConfig | false;
191
+ panning?: KnobPanningConfig;
192
+ interaction?: KnobInteractionConfig;
9
193
  }
10
194
  export interface KnobProps extends SpacingProps, LayoutProps {
195
+ /** Visual preset that tunes defaults for common encoder scenarios */
196
+ variant?: KnobVariant;
11
197
  /** Interaction mode for bounded or endless rotary behavior */
12
198
  mode?: 'bounded' | 'endless';
13
199
  /** Controlled value */
@@ -40,6 +226,8 @@ export interface KnobProps extends SpacingProps, LayoutProps {
40
226
  formatLabel?: (value: number) => ReactNode;
41
227
  /** Render the value label inside the knob */
42
228
  withLabel?: boolean;
229
+ /** Structured configuration for the value label block */
230
+ valueLabel?: KnobValueLabelConfig | false;
43
231
  /** Optional marks rendered around the control */
44
232
  marks?: KnobMark[];
45
233
  /** Restrict interaction to the supplied marks */
@@ -62,4 +250,62 @@ export interface KnobProps extends SpacingProps, LayoutProps {
62
250
  testID?: string;
63
251
  /** Screen reader label */
64
252
  accessibilityLabel?: string;
253
+ /** Unified surface styling and interaction overrides */
254
+ appearance?: KnobAppearance;
255
+ }
256
+ export interface KnobRootProps extends KnobProps {
257
+ /** Modular children composed of Knob.* sub-components */
258
+ children?: ReactNode;
259
+ }
260
+ export interface KnobFillPartProps extends KnobFillStyle {
261
+ visible?: boolean;
262
+ }
263
+ export interface KnobRingPartProps extends KnobRingStyle {
264
+ visible?: boolean;
265
+ }
266
+ export interface KnobProgressPartProps extends KnobProgressConfig {
267
+ visible?: boolean;
268
+ }
269
+ export type KnobTickLayerPartProps = KnobTickLayer;
270
+ export interface KnobPointerPartProps extends KnobPointerStyle {
271
+ enabled?: boolean;
272
+ }
273
+ export interface KnobThumbPartProps extends KnobThumbStyle {
274
+ visible?: boolean;
275
+ }
276
+ export interface KnobValueLabelPartProps extends KnobValueLabelConfig {
277
+ visible?: boolean;
65
278
  }
279
+ export type KnobPartKind = 'fill' | 'ring' | 'progress' | 'tick' | 'pointer' | 'thumb' | 'valueLabel';
280
+ export type KnobPartEntry = {
281
+ kind: 'fill';
282
+ props: KnobFillPartProps;
283
+ order: number;
284
+ } | {
285
+ kind: 'ring';
286
+ props: KnobRingPartProps;
287
+ order: number;
288
+ } | {
289
+ kind: 'progress';
290
+ props: KnobProgressPartProps;
291
+ order: number;
292
+ } | {
293
+ kind: 'tick';
294
+ props: KnobTickLayerPartProps;
295
+ order: number;
296
+ } | {
297
+ kind: 'pointer';
298
+ props: KnobPointerPartProps;
299
+ order: number;
300
+ } | {
301
+ kind: 'thumb';
302
+ props: KnobThumbPartProps;
303
+ order: number;
304
+ } | {
305
+ kind: 'valueLabel';
306
+ props: KnobValueLabelPartProps;
307
+ order: number;
308
+ };
309
+ export type KnobPartComponent<P> = FC<P> & {
310
+ __knobPartKind: KnobPartKind;
311
+ };
@@ -0,0 +1,6 @@
1
+ export declare const toRadians: (deg: number) => number;
2
+ export declare const polarToCartesian: (cx: number, cy: number, radius: number, angleDeg: number) => {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ export declare const getPositionRadius: (ringRadius: number, ringThickness: number, position?: "inner" | "center" | "outer", radiusOffset?: number) => number;
@@ -0,0 +1,4 @@
1
+ import type { KnobMark } from '../types';
2
+ export declare const normalizeMarks: (marks: KnobMark[] | undefined, min: number, max: number) => KnobMark[];
3
+ export declare const pickClosestMark: (value: number, marks: KnobMark[]) => number;
4
+ export declare const findClosestMarkEntry: (value: number, marks: KnobMark[]) => KnobMark | null;
@@ -0,0 +1 @@
1
+ export declare const clamp: (value: number, min: number, max: number) => number;
@@ -22,8 +22,8 @@ export interface ListGroupItemProps {
22
22
  disabled?: boolean;
23
23
  active?: boolean;
24
24
  danger?: boolean;
25
- leftSection?: React.ReactNode;
26
- rightSection?: React.ReactNode;
25
+ startSection?: React.ReactNode;
26
+ endSection?: React.ReactNode;
27
27
  style?: ViewStyle;
28
28
  textStyle?: TextStyle;
29
29
  }
@@ -10,6 +10,8 @@ export interface MarkdownProps extends SpacingProps {
10
10
  allowHtml?: boolean;
11
11
  /** Custom renderer overrides */
12
12
  components?: Partial<MarkdownComponentMap>;
13
+ /** Optional handler invoked when a markdown link is pressed */
14
+ onLinkPress?: (href: string) => void;
13
15
  }
14
16
  export interface MarkdownComponentMap {
15
17
  heading: (props: {
@@ -56,11 +58,14 @@ export interface MarkdownComponentMap {
56
58
  table: (props: {
57
59
  headers: React.ReactNode[];
58
60
  rows: React.ReactNode[][];
61
+ alignments?: (TableAlignment | undefined)[];
59
62
  }) => React.ReactNode;
60
63
  tableCell: (props: {
61
64
  children: React.ReactNode;
62
65
  isHeader?: boolean;
66
+ align?: TableAlignment;
63
67
  }) => React.ReactNode;
64
68
  }
69
+ type TableAlignment = 'left' | 'center' | 'right';
65
70
  export declare const Markdown: React.FC<MarkdownProps>;
66
71
  export default Markdown;
@@ -8,6 +8,6 @@ export declare function useMenuStyles(): {
8
8
  itemDangerPressed: ViewStyle;
9
9
  label: ViewStyle;
10
10
  divider: ViewStyle;
11
- leftSection: ViewStyle;
12
- rightSection: ViewStyle;
11
+ startSection: ViewStyle;
12
+ endSection: ViewStyle;
13
13
  };
@@ -41,9 +41,9 @@ export interface MenuItemProps extends SpacingProps {
41
41
  /** Whether item is disabled */
42
42
  disabled?: boolean;
43
43
  /** Left section content */
44
- leftSection?: React.ReactNode;
44
+ startSection?: React.ReactNode;
45
45
  /** Right section content */
46
- rightSection?: React.ReactNode;
46
+ endSection?: React.ReactNode;
47
47
  /** Item color variant */
48
48
  color?: 'default' | 'danger' | 'success' | 'warning';
49
49
  /** Whether item should close menu when pressed */
@@ -4,6 +4,7 @@ import type { PressableProps } from 'react-native';
4
4
  import type { GestureResponderEvent } from 'react-native';
5
5
  import { SpacingProps } from '../../core/utils';
6
6
  import { type ComponentSizeValue } from '../../core/theme/componentSize';
7
+ type MenuTone = 'default' | 'primary' | 'danger' | 'success' | 'warning';
7
8
  export interface MenuItemButtonProps extends SpacingProps {
8
9
  /** Text label (alternative to children) */
9
10
  title?: string;
@@ -50,11 +51,11 @@ export interface MenuItemButtonProps extends SpacingProps {
50
51
  /** Blur handler */
51
52
  onBlur?: PressableProps['onBlur'];
52
53
  /** Semantic tone for menu styling */
53
- tone?: 'default' | 'danger' | 'success' | 'warning';
54
+ tone?: MenuTone;
54
55
  /** Tone to apply when hovered */
55
- hoverTone?: 'default' | 'danger' | 'success' | 'warning';
56
+ hoverTone?: MenuTone;
56
57
  /** Tone to apply when active/pressed */
57
- activeTone?: 'default' | 'danger' | 'success' | 'warning';
58
+ activeTone?: MenuTone;
58
59
  /** Override text color for base state */
59
60
  textColor?: string;
60
61
  /** Override text color when hovered */
@@ -0,0 +1,2 @@
1
+ import type { NoticeFactoryPayload } from './types';
2
+ export declare const Notice: import("../../core/factory").PlatformBlocksComponent<NoticeFactoryPayload>;
@@ -0,0 +1,2 @@
1
+ export { Notice } from './Notice';
2
+ export type { NoticeProps, NoticeVariant, NoticeColor, NoticeSeverity } from './types';
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import { View, ViewStyle } from 'react-native';
3
3
  import { SpacingProps } from '../../core/utils';
4
4
  import { BorderRadiusProps } from '../../core/theme/radius';
5
- export type AlertVariant = 'light' | 'filled' | 'outline' | 'subtle';
6
- export type AlertColor = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'gray';
7
- export type AlertSeverity = 'info' | 'success' | 'warning' | 'error';
8
- export interface AlertProps extends SpacingProps, BorderRadiusProps {
9
- variant?: AlertVariant;
10
- color?: AlertColor | string;
11
- sev?: AlertSeverity;
5
+ export type NoticeVariant = 'light' | 'filled' | 'outline' | 'subtle';
6
+ export type NoticeColor = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'gray';
7
+ export type NoticeSeverity = 'info' | 'success' | 'warning' | 'error';
8
+ export interface NoticeProps extends SpacingProps, BorderRadiusProps {
9
+ variant?: NoticeVariant;
10
+ color?: NoticeColor | string;
11
+ sev?: NoticeSeverity;
12
12
  title?: string;
13
13
  children?: React.ReactNode;
14
14
  icon?: React.ReactNode | string | null | false;
@@ -19,7 +19,7 @@ export interface AlertProps extends SpacingProps, BorderRadiusProps {
19
19
  style?: ViewStyle;
20
20
  testID?: string;
21
21
  }
22
- export interface AlertFactoryPayload {
23
- props: AlertProps;
22
+ export interface NoticeFactoryPayload {
23
+ props: NoticeProps;
24
24
  ref: View;
25
25
  }
@@ -57,12 +57,6 @@ export interface QRCodeProps extends SpacingProps, LayoutProps {
57
57
  onLoadStart?: () => void;
58
58
  /** Callback when QR code finishes loading */
59
59
  onLoadEnd?: () => void;
60
- /**
61
- * Which QR engine to use.
62
- * - internal: new in-house full spec implementation.
63
- * - legacy: bundled fallback port (qr-code-ts) for comparative testing.
64
- */
65
- engine?: 'internal' | 'legacy';
66
60
  /** If true (or object), tapping the QR copies the value (or provided value). */
67
61
  copyOnPress?: boolean | {
68
62
  value?: string;
@@ -35,6 +35,8 @@ export interface RadioProps extends BaseComponentProps {
35
35
  children?: React.ReactNode;
36
36
  /** Optional icon displayed alongside the label */
37
37
  icon?: React.ReactNode | string;
38
+ /** Key handler for accessibility/keyboard support */
39
+ onKeyDown?: (event: any) => void;
38
40
  }
39
41
  export interface RadioGroupProps extends BaseComponentProps {
40
42
  /** Available options */
@@ -1,7 +1,8 @@
1
1
  import { View, ViewStyle } from 'react-native';
2
2
  import { SpacingProps } from '../../core/utils';
3
3
  import { SizeValue } from '../../core/theme/sizes';
4
- export interface RatingProps extends SpacingProps {
4
+ import type { DisclaimerSupport } from '../_internal/Disclaimer';
5
+ export interface RatingProps extends SpacingProps, DisclaimerSupport {
5
6
  /** Current rating value */
6
7
  value?: number;
7
8
  /** Initial rating value for uncontrolled component */
@@ -1,5 +1,5 @@
1
- import type { SizeValue } from '../../core/theme/types';
2
- export interface SearchProps {
1
+ import type { SizeValue, SpacingProps } from '../../core/theme/types';
2
+ export interface SearchProps extends SpacingProps {
3
3
  value?: string;
4
4
  defaultValue?: string;
5
5
  onChange?: (value: string) => void;
@@ -11,7 +11,7 @@ export interface SearchProps {
11
11
  debounce?: number;
12
12
  clearButton?: boolean;
13
13
  loading?: boolean;
14
- rightSection?: React.ReactNode;
14
+ endSection?: React.ReactNode;
15
15
  accessibilityLabel?: string;
16
16
  style?: any;
17
17
  /** When true, renders as a button that opens the spotlight instead of a typeable input */