@proulr/sdui-components 0.1.32 → 0.1.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proulr/sdui-components",
3
- "version": "0.1.32",
3
+ "version": "0.1.35",
4
4
  "type": "module",
5
5
  "main": "./src/renderer/index.ts",
6
6
  "types": "./src/renderer/index.ts",
@@ -75,6 +75,8 @@ export const APP_ICON_NAMES = [
75
75
  'signal',
76
76
  'hourglass',
77
77
  'bell',
78
+ 'share',
79
+ 'gift',
78
80
  ] as const;
79
81
 
80
82
  export type AppIconName = (typeof APP_ICON_NAMES)[number];
@@ -9,6 +9,7 @@ export function AppButton({
9
9
  disabled,
10
10
  loading,
11
11
  compact,
12
+ testID,
12
13
  }: {
13
14
  label: string;
14
15
  onPress: () => void;
@@ -16,6 +17,7 @@ export function AppButton({
16
17
  disabled?: boolean;
17
18
  loading?: boolean;
18
19
  compact?: boolean;
20
+ testID?: string;
19
21
  }) {
20
22
  const isPrimary = variant === 'primary';
21
23
  const isSecondary = variant === 'secondary';
@@ -30,6 +32,8 @@ export function AppButton({
30
32
 
31
33
  return (
32
34
  <Pressable
35
+ testID={testID}
36
+ accessibilityRole="button"
33
37
  onPress={onPress}
34
38
  disabled={disabled || loading}
35
39
  style={({ pressed }) => [
@@ -1892,6 +1892,99 @@ export function AppChromeBellGlyph({ color = m3Colors.primary, size = 24 }: AppC
1892
1892
  );
1893
1893
  }
1894
1894
 
1895
+ /** Share / export — box with upward arrow. */
1896
+ export function AppChromeShareGlyph({ color = m3Colors.primary, size = 24 }: AppChromeGlyphProps) {
1897
+ const stroke = strokeFor(size);
1898
+ return (
1899
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
1900
+ <View
1901
+ style={{
1902
+ position: 'absolute',
1903
+ bottom: size * 0.18,
1904
+ width: size * 0.62,
1905
+ height: size * 0.42,
1906
+ borderWidth: stroke,
1907
+ borderTopWidth: 0,
1908
+ borderColor: color,
1909
+ borderBottomLeftRadius: size * 0.1,
1910
+ borderBottomRightRadius: size * 0.1,
1911
+ }}
1912
+ />
1913
+ <View
1914
+ style={{
1915
+ position: 'absolute',
1916
+ top: size * 0.16,
1917
+ width: stroke,
1918
+ height: size * 0.38,
1919
+ backgroundColor: color,
1920
+ borderRadius: 1,
1921
+ }}
1922
+ />
1923
+ <View
1924
+ style={{
1925
+ position: 'absolute',
1926
+ top: size * 0.14,
1927
+ width: size * 0.28,
1928
+ height: size * 0.28,
1929
+ borderLeftWidth: stroke,
1930
+ borderTopWidth: stroke,
1931
+ borderColor: color,
1932
+ transform: [{ rotate: '45deg' }],
1933
+ }}
1934
+ />
1935
+ </View>
1936
+ );
1937
+ }
1938
+
1939
+ /** Gift / referral reward — box with ribbon. */
1940
+ export function AppChromeGiftGlyph({ color = m3Colors.primary, size = 24 }: AppChromeGlyphProps) {
1941
+ const stroke = strokeFor(size);
1942
+ const box = size * 0.55;
1943
+ return (
1944
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
1945
+ <View
1946
+ style={{
1947
+ width: box,
1948
+ height: box * 0.72,
1949
+ marginTop: size * 0.12,
1950
+ borderWidth: stroke,
1951
+ borderColor: color,
1952
+ borderRadius: size * 0.06,
1953
+ }}
1954
+ />
1955
+ <View
1956
+ style={{
1957
+ position: 'absolute',
1958
+ top: size * 0.22,
1959
+ width: box,
1960
+ height: stroke,
1961
+ backgroundColor: color,
1962
+ }}
1963
+ />
1964
+ <View
1965
+ style={{
1966
+ position: 'absolute',
1967
+ top: size * 0.28,
1968
+ width: stroke,
1969
+ height: box * 0.72,
1970
+ backgroundColor: color,
1971
+ }}
1972
+ />
1973
+ <View
1974
+ style={{
1975
+ position: 'absolute',
1976
+ top: size * 0.1,
1977
+ width: size * 0.22,
1978
+ height: size * 0.16,
1979
+ borderWidth: stroke,
1980
+ borderColor: color,
1981
+ borderRadius: size * 0.11,
1982
+ }}
1983
+ />
1984
+ </View>
1985
+ );
1986
+ }
1987
+
1895
1988
  const styles = StyleSheet.create({
1896
1989
  crosshair: {
1897
1990
  position: 'absolute',
@@ -47,6 +47,8 @@ import {
47
47
  AppChromeRepostGlyph,
48
48
  AppChromeSearchGlyph,
49
49
  AppChromeSendGlyph,
50
+ AppChromeShareGlyph,
51
+ AppChromeGiftGlyph,
50
52
  AppChromeSettingsGlyph,
51
53
  AppChromeShieldGlyph,
52
54
  AppChromeSignalGlyph,
@@ -161,6 +163,8 @@ const ICON_REGISTRY: Record<AppIconName, ComponentType<AppChromeGlyphProps>> = {
161
163
  signal: AppChromeSignalGlyph,
162
164
  hourglass: AppChromeHourglassGlyph,
163
165
  bell: AppChromeBellGlyph,
166
+ share: AppChromeShareGlyph,
167
+ gift: AppChromeGiftGlyph,
164
168
  };
165
169
 
166
170
  export type AppIconProps = {