@agimon-ai/po-native-components 0.0.0-alpha.2 → 0.0.0-alpha.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.mts","names":[],"sources":["../../src/components/SegmentedControl.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.mts","names":[],"sources":["../../src/components/SegmentedControl.tsx"],"mappings":";;iBA6BiB;EACf;EACA;;iBAGe;;EAEf,kBAAkB;;EAElB;EACA,gBAAgB;EAChB;;EAEA;EACA,QAAQ,UAAU;;;;;;;;wBASJ,mBACd,SACA,OACA,eACA,UACA,oBACA,SACC,wCAAqB,IAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.mjs","names":["RNSegmentedControl","StyleProp","ViewStyle","StyleSheet","withUnistyles","fontOf","selectionTick","ThemedSegmentedControl","theme","backgroundColor","colors","deep","tintColor","fontStyle","color","dim","fontFamily","sans","fontSize","base","fontWeight","medium","activeFontStyle","green","semibold","appearance","scheme","SegmentedControlOption","value","label","
|
|
1
|
+
{"version":3,"file":"SegmentedControl.mjs","names":["RNSegmentedControl","SegmentedControlProps","RNSegmentedControlProps","ComponentType","StyleProp","ViewStyle","StyleSheet","withUnistyles","fontOf","selectionTick","ThemedSegmentedControl","theme","backgroundColor","colors","deep","tintColor","fontStyle","color","dim","fontFamily","sans","fontSize","base","fontWeight","medium","activeFontStyle","green","semibold","appearance","scheme","SegmentedControlOption","value","label","options","onValueChange","disabled","accessibilityLabel","style","SegmentedControl","map","option","findIndex","event","next","nativeEvent","selectedSegmentIndex","undefined","styles","control","create","minHeight","borderRadius","md","uni__dependencies"],"sources":["../../src/components/SegmentedControl.tsx"],"sourcesContent":["import RNSegmentedControl, {\n type SegmentedControlProps as RNSegmentedControlProps,\n} from '@react-native-segmented-control/segmented-control';\nimport type { ComponentType } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { StyleSheet, withUnistyles } from 'react-native-unistyles';\n\nimport { fontOf } from '../lib/fonts';\nimport { selectionTick } from '../lib/haptics';\n\n/** Theme colours reach the third-party control through withUnistyles, so it follows theme changes. */\nconst ThemedSegmentedControl = withUnistyles(RNSegmentedControl as ComponentType<RNSegmentedControlProps>, (theme) => ({\n backgroundColor: theme.colors.deep,\n tintColor: theme.colors['tint-green'],\n fontStyle: {\n color: theme.colors.dim,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n fontWeight: theme.fontWeight.medium,\n },\n activeFontStyle: {\n color: theme.colors.green,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n fontWeight: theme.fontWeight.semibold,\n },\n appearance: theme.scheme,\n}));\n\nexport interface SegmentedControlOption {\n value: string;\n label: string;\n}\n\nexport interface SegmentedControlProps {\n /** The segments, in order. */\n options: readonly SegmentedControlOption[];\n /** The selected option's value. */\n value: string;\n onValueChange: (value: string) => void;\n disabled?: boolean;\n /** What the control is for, such as \"Status\". */\n accessibilityLabel?: string;\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * A short exclusive choice, such as a task's status: the platform's own\n * segmented control on iOS, the library's drawn fallback elsewhere, with a\n * selection tick on each change. It is the native stand-in for a web Select\n * with a handful of options.\n */\nexport function SegmentedControl({\n options,\n value,\n onValueChange,\n disabled = false,\n accessibilityLabel,\n style,\n}: SegmentedControlProps) {\n return (\n <ThemedSegmentedControl\n values={options.map((option) => option.label)}\n selectedIndex={options.findIndex((option) => option.value === value)}\n enabled={!disabled}\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ disabled }}\n onChange={(event) => {\n const next = options[event.nativeEvent.selectedSegmentIndex];\n if (next === undefined || next.value === value) return;\n selectionTick();\n onValueChange(next.value);\n }}\n style={[styles.control, style]}\n />\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n control: { minHeight: 32, borderRadius: theme.borderRadius.md },\n}));\n"],"mappings":";;;;;;;;AAWA,MAAMU,yBAAyBH,cAAcP,qBAA+DW,WAAW;CACrHC,iBAAiBD,MAAME,OAAOC;CAC9BC,WAAWJ,MAAME,OAAO;CACxBG,WAAW;EACTC,OAAON,MAAME,OAAOK;EACpBC,YAAYX,OAAOG,MAAMQ,WAAWC,IAAI;EACxCC,UAAUV,MAAMU,SAASC;EACzBC,YAAYZ,MAAMY,WAAWC;CAC/B;CACAC,iBAAiB;EACfR,OAAON,MAAME,OAAOa;EACpBP,YAAYX,OAAOG,MAAMQ,WAAWC,IAAI;EACxCC,UAAUV,MAAMU,SAASC;EACzBC,YAAYZ,MAAMY,WAAWI;CAC/B;CACAC,YAAYjB,MAAMkB;AACpB,EAAE;;;;;;;AAyBF,SAAgBS,iBAAiB,EAC/BL,SACAF,OACAG,eACAC,WAAW,OACXC,oBACAC,SACwB;CACxB,OACE,oBAAC,wBAAD;EACE,QAAQJ,QAAQM,KAAKC,WAAWA,OAAOR,KAAK;EAC5C,eAAeC,QAAQQ,WAAWD,WAAWA,OAAOT,UAAUA,KAAK;EACnE,SAAS,CAACI;EACUC;EACpB,oBAAoB,EAAED,SAAS;EAC/B,WAAWO,UAAU;GACnB,MAAMC,OAAOV,QAAQS,MAAME,YAAYC;GACvC,IAAIF,SAASG,UAAaH,KAAKZ,UAAUA,OAAO;GAChDtB,cAAc;GACdyB,cAAcS,KAAKZ,KAAK;EAC1B;EACA,OAAO,CAACgB,OAAOC,SAASX,KAAK;CAAE;AAGrC;AAEA,MAAMU,SAASzC,WAAW2C,QAAQtC,WAAW,EAC3CqC,SAAS;CAAEE,WAAW;CAAIC,cAAcxC,MAAMwC,aAAaC;CAAEC,mBAAA,CAAA,CAAA;AAAC,EAChE,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-native-components",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.3",
|
|
4
4
|
"description": "Shared React Native components for Po and its native plugins: the web component library's look and API on native parts, tuned to the Doom palette.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
48
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
52
|
-
"@agimon-ai/vibe-lint-plugin-doom-web": "0.0.0-alpha.
|
|
51
|
+
"@agimon-ai/po-build": "0.0.0-alpha.3",
|
|
52
|
+
"@agimon-ai/vibe-lint-plugin-doom-web": "0.0.0-alpha.3",
|
|
53
53
|
"@babel/core": "7.29.7",
|
|
54
54
|
"@expo/vector-icons": "15.1.1",
|
|
55
55
|
"@gorhom/bottom-sheet": "5.2.14",
|
|
56
56
|
"@react-native-segmented-control/segmented-control": "2.5.7",
|
|
57
|
-
"@shopify/flash-list": "2.
|
|
58
|
-
"@types/node": "
|
|
57
|
+
"@shopify/flash-list": "2.3.3",
|
|
58
|
+
"@types/node": "25.9.9",
|
|
59
59
|
"@types/react": "19.3.0",
|
|
60
60
|
"expo": "57.0.27",
|
|
61
61
|
"expo-clipboard": "~57.0.2",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"expo-haptics": "~57.0.3",
|
|
64
64
|
"expo-modules-core": "57.0.21",
|
|
65
65
|
"expo-symbols": "~57.0.3",
|
|
66
|
-
"react": "19.
|
|
67
|
-
"react-dom": "19.
|
|
68
|
-
"react-native": "0.
|
|
66
|
+
"react": "19.3.0",
|
|
67
|
+
"react-dom": "19.3.0",
|
|
68
|
+
"react-native": "0.87.1",
|
|
69
69
|
"react-native-gesture-handler": "~3.3.0",
|
|
70
|
-
"react-native-reanimated": "4.
|
|
71
|
-
"react-native-safe-area-context": "~5.
|
|
70
|
+
"react-native-reanimated": "4.7.1",
|
|
71
|
+
"react-native-safe-area-context": "~5.10.1",
|
|
72
72
|
"react-native-unistyles": "3.5.2",
|
|
73
|
-
"react-native-worklets": "0.
|
|
74
|
-
"tsdown": "0.23.
|
|
73
|
+
"react-native-worklets": "0.13.0",
|
|
74
|
+
"tsdown": "0.23.1",
|
|
75
75
|
"typescript": "7.0.2",
|
|
76
76
|
"vitest": "5.0.3"
|
|
77
77
|
},
|