@ankhorage/zora 25.8.17 → 25.9.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 +48 -0
- package/README.md +1 -1
- package/dist/capabilities/index.js +11 -2
- package/dist/capabilities/index.js.map +3 -3
- package/dist/features/layout/adapters/inbound/ScrollView.js +2 -2
- package/dist/features/layout/adapters/inbound/ScrollView.js.map +1 -1
- package/dist/features/layout/scrollViewMeta.d.ts +13 -0
- package/dist/features/layout/scrollViewMeta.d.ts.map +1 -1
- package/dist/features/layout/scrollViewMeta.js +9 -0
- package/dist/features/layout/scrollViewMeta.js.map +1 -1
- package/package.json +37 -6
- package/src/expo57Migration.test.ts +1 -2
- package/src/features/layout/adapters/inbound/ScrollView.test.tsx +60 -1
- package/src/features/layout/adapters/inbound/ScrollView.tsx +7 -2
- package/src/features/layout/scrollViewMeta.ts +9 -0
- package/src/features/registry/componentMeta.test.ts +20 -0
- package/src/webPackageExports.test.ts +101 -0
- package/web-dist/chunks/{Accordion-ep35792s.js → Accordion-0x8jncra.js} +28 -5
- package/web-dist/chunks/{Accordion-cbbafww1.js → Accordion-1jxtw4vn.js} +2 -2
- package/web-dist/chunks/{Accordion-cjjg81ry.js → Accordion-221757sc.js} +5 -5
- package/web-dist/chunks/{Accordion-h9brgsk8.js → Accordion-2ga81fwp.js} +1 -1
- package/web-dist/chunks/{Accordion-jyemxzat.js → Accordion-2r2tm2nk.js} +3 -3
- package/web-dist/chunks/{Accordion-vqx3exsq.js → Accordion-37fyjrmm.js} +1 -1
- package/web-dist/chunks/{Accordion-d0bebw9j.js → Accordion-43g7xsam.js} +7 -7
- package/web-dist/chunks/{Accordion-7n93d7fa.js → Accordion-51pp6pn7.js} +5 -5
- package/web-dist/chunks/{Accordion-z5a0tx18.js → Accordion-58yzdsab.js} +2 -2
- package/web-dist/chunks/{Accordion-n7y08rz5.js → Accordion-6ec4gxv2.js} +33 -1
- package/web-dist/chunks/{Accordion-ptxa6trg.js → Accordion-8pwsx854.js} +14 -22
- package/web-dist/chunks/{Accordion-rfc5mdbv.js → Accordion-972z2w82.js} +2 -2
- package/web-dist/chunks/{Accordion-2nesr9cv.js → Accordion-apchszqk.js} +1 -1
- package/web-dist/chunks/{Accordion-vnb3vntm.js → Accordion-awarqvqt.js} +3 -3
- package/web-dist/chunks/{Accordion-45nc4bte.js → Accordion-dev40gg3.js} +3 -3
- package/web-dist/chunks/{Accordion-0gfsj9qh.js → Accordion-dtt4qkrb.js} +1 -1
- package/web-dist/chunks/{Accordion-3qphhsb4.js → Accordion-f5a0z9jh.js} +2 -2
- package/web-dist/chunks/{Accordion-4x8gdqqs.js → Accordion-fvv1jb72.js} +3 -3
- package/web-dist/chunks/{Accordion-5pr1wqe3.js → Accordion-hywab9gp.js} +1 -1
- package/web-dist/chunks/{Accordion-xgxxg1hz.js → Accordion-jz4j00nh.js} +3 -3
- package/web-dist/chunks/{Accordion-ve81xazy.js → Accordion-k9bnymp0.js} +3 -3
- package/web-dist/chunks/{Accordion-gntmfcmz.js → Accordion-mfyhqbk5.js} +6 -6
- package/web-dist/chunks/{Accordion-a42brn0p.js → Accordion-n1d0hvd6.js} +3 -3
- package/web-dist/chunks/{Accordion-c912kzs0.js → Accordion-ng4f4k3b.js} +2 -2
- package/web-dist/chunks/{Accordion-b337t2df.js → Accordion-nj7k0m66.js} +5 -5
- package/web-dist/chunks/{Accordion-y2pss5p0.js → Accordion-nmxdqe80.js} +2 -2
- package/web-dist/chunks/{Accordion-z5dpzw3g.js → Accordion-nsamv0p0.js} +4 -4
- package/web-dist/chunks/{Accordion-799z2zf6.js → Accordion-pdgjv1pr.js} +1 -1
- package/web-dist/chunks/{Accordion-b74j4hdt.js → Accordion-pwpjet1r.js} +1 -1
- package/web-dist/chunks/{Accordion-zf1g5422.js → Accordion-pxbpwn9v.js} +2 -2
- package/web-dist/chunks/{Accordion-kmwhjw1k.js → Accordion-qnd0dzk2.js} +14 -22
- package/web-dist/chunks/{Accordion-wyxmd0n0.js → Accordion-qr5qn652.js} +1 -1
- package/web-dist/chunks/{Accordion-w95t2pr3.js → Accordion-rmnw8z4x.js} +2 -2
- package/web-dist/chunks/{Accordion-hnx7hx55.js → Accordion-v79xc8mb.js} +1 -1
- package/web-dist/chunks/{Accordion-w87gvpbg.js → Accordion-ve9f47b4.js} +1 -1
- package/web-dist/chunks/{Accordion-x055n3b3.js → Accordion-vj2yj9fa.js} +1 -1
- package/web-dist/chunks/{Accordion-2c759z0y.js → Accordion-vyr0pdcg.js} +5 -5
- package/web-dist/chunks/{Accordion-fzcpm4xf.js → Accordion-waxb6x73.js} +1 -1
- package/web-dist/chunks/{Accordion-69c4pfz2.js → Accordion-wf60fekp.js} +6 -6
- package/web-dist/chunks/{Accordion-1495be5z.js → Accordion-whk372cs.js} +8 -8
- package/web-dist/chunks/{Accordion-nnv76yff.js → Accordion-xstk85jq.js} +3 -3
- package/web-dist/chunks/{Accordion-184r2r82.js → Accordion-yq16wwh5.js} +1 -1
- package/web-dist/chunks/{Accordion-58bpmzdj.js → Accordion-yrrsqd5t.js} +5 -5
- package/web-dist/chunks/{Accordion-czcaf5x2.js → Accordion-z43mw081.js} +5 -5
- package/web-dist/chunks/{Accordion-09qs8gt1.js → Accordion-zj4wnm3e.js} +19 -2
- package/web-dist/components/accordion/Accordion.js +6 -6
- package/web-dist/components/accordion-item/AccordionItem.js +6 -6
- package/web-dist/components/app-bar/AppBar.js +13 -13
- package/web-dist/components/app-header/AppHeader.js +13 -13
- package/web-dist/components/app-shell/AppShell.js +4 -4
- package/web-dist/components/auth-screen/AuthScreen.js +15 -15
- package/web-dist/components/avatar/Avatar.js +6 -6
- package/web-dist/components/avatar-group/AvatarGroup.js +6 -6
- package/web-dist/components/badge/Badge.js +5 -5
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +14 -14
- package/web-dist/components/bottom-sheet/BottomSheet.js +5 -5
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +5 -5
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +5 -5
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +5 -5
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +5 -5
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +5 -5
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +8 -8
- package/web-dist/components/button/Button.js +7 -7
- package/web-dist/components/button-group/ButtonGroup.js +7 -7
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +14 -14
- package/web-dist/components/card/Card.js +13 -13
- package/web-dist/components/chat-list-item/ChatListItem.js +10 -10
- package/web-dist/components/checkbox/Checkbox.js +8 -8
- package/web-dist/components/checkbox-group/CheckboxGroup.js +8 -8
- package/web-dist/components/chip/Chip.js +7 -7
- package/web-dist/components/chip-group/ChipGroup.js +7 -7
- package/web-dist/components/collection-editor/CollectionEditor.js +13 -13
- package/web-dist/components/content-rail/ContentRail.js +8 -8
- package/web-dist/components/data-table/DataTable.js +20 -20
- package/web-dist/components/date-picker/DatePicker.js +14 -14
- package/web-dist/components/dialog/Dialog.js +8 -8
- package/web-dist/components/divider/Divider.js +4 -4
- package/web-dist/components/empty-state/EmptyState.js +14 -14
- package/web-dist/components/explorer/Explorer.js +7 -7
- package/web-dist/components/field/Field.js +8 -8
- package/web-dist/components/file-explorer/FileExplorer.js +7 -7
- package/web-dist/components/flat-list/FlatList.js +9 -9
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +15 -15
- package/web-dist/components/form/Form.js +11 -11
- package/web-dist/components/form-actions/FormActions.js +11 -11
- package/web-dist/components/form-error/FormError.js +11 -11
- package/web-dist/components/game/Game.js +5 -5
- package/web-dist/components/game-entity/GameEntity.js +5 -5
- package/web-dist/components/game-field/GameField.js +5 -5
- package/web-dist/components/game-input-zone/GameInputZone.js +5 -5
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +5 -5
- package/web-dist/components/game-overlay/GameOverlay.js +5 -5
- package/web-dist/components/gradient/Gradient.js +5 -5
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +5 -5
- package/web-dist/components/grid/Grid.js +4 -4
- package/web-dist/components/heading/Heading.js +2 -2
- package/web-dist/components/hero/Hero.js +13 -13
- package/web-dist/components/icon-button/IconButton.js +7 -7
- package/web-dist/components/image/Image.js +5 -5
- package/web-dist/components/list/List.js +9 -9
- package/web-dist/components/list-item/ListItem.js +9 -9
- package/web-dist/components/list-section/ListSection.js +9 -9
- package/web-dist/components/matrix-grid/MatrixGrid.js +4 -4
- package/web-dist/components/media-card/MediaCard.js +13 -13
- package/web-dist/components/media-explorer/MediaExplorer.js +7 -7
- package/web-dist/components/message-bubble/MessageBubble.js +10 -10
- package/web-dist/components/metric-card/MetricCard.js +13 -13
- package/web-dist/components/missing-element/MissingElement.js +7 -7
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +15 -15
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +15 -15
- package/web-dist/components/otp-form/OtpForm.js +15 -15
- package/web-dist/components/pagination/Pagination.js +8 -8
- package/web-dist/components/palette-item/PaletteItem.js +13 -13
- package/web-dist/components/popover-menu/PopoverMenu.js +9 -9
- package/web-dist/components/post-card/PostCard.js +13 -13
- package/web-dist/components/product-card/ProductCard.js +13 -13
- package/web-dist/components/progress/Progress.js +6 -6
- package/web-dist/components/progress-ring/ProgressRing.js +6 -6
- package/web-dist/components/radio/Radio.js +8 -8
- package/web-dist/components/radio-group/RadioGroup.js +8 -8
- package/web-dist/components/rating/Rating.js +4 -4
- package/web-dist/components/reader/Reader.js +16 -16
- package/web-dist/components/scan-overlay/ScanOverlay.js +14 -14
- package/web-dist/components/screen/Screen.js +4 -4
- package/web-dist/components/screen-section/ScreenSection.js +6 -6
- package/web-dist/components/scroll-view/ScrollView.js +4 -4
- package/web-dist/components/search-input/SearchInput.js +8 -8
- package/web-dist/components/section-header/SectionHeader.js +6 -6
- package/web-dist/components/section-list/SectionList.js +9 -9
- package/web-dist/components/select/Select.js +12 -12
- package/web-dist/components/selectable-item/SelectableItem.js +4 -4
- package/web-dist/components/selection-provider/SelectionProvider.js +4 -4
- package/web-dist/components/sign-in-form/SignInForm.js +15 -15
- package/web-dist/components/sign-up-form/SignUpForm.js +15 -15
- package/web-dist/components/skeleton/Skeleton.js +16 -16
- package/web-dist/components/skeleton-card/SkeletonCard.js +16 -16
- package/web-dist/components/skeleton-list/SkeletonList.js +16 -16
- package/web-dist/components/skeleton-text/SkeletonText.js +16 -16
- package/web-dist/components/surface/Surface.js +5 -5
- package/web-dist/components/switch/Switch.js +6 -6
- package/web-dist/components/tab/Tab.js +5 -5
- package/web-dist/components/tab-list/TabList.js +5 -5
- package/web-dist/components/tab-panel/TabPanel.js +5 -5
- package/web-dist/components/tabs/Tabs.js +5 -5
- package/web-dist/components/text/Text.js +2 -2
- package/web-dist/components/text-input/TextInput.js +8 -8
- package/web-dist/components/time-picker/TimePicker.js +14 -14
- package/web-dist/components/timeline/Timeline.js +5 -5
- package/web-dist/components/toast/Toast.js +8 -8
- package/web-dist/components/toast-provider/ToastProvider.js +8 -8
- package/web-dist/components/toolbar/Toolbar.js +13 -13
- package/web-dist/components/tree-item/TreeItem.js +11 -11
- package/web-dist/components/uploader/Uploader.js +17 -17
- package/web-dist/components/view/View.js +4 -4
- package/web-dist/manifest.json +1036 -1036
- package/web-dist/runtime/ZoraProvider.js +7 -7
|
@@ -7,12 +7,12 @@ import { useScrollGestureLock } from './useScrollGestureLock';
|
|
|
7
7
|
/*** Adapts the token-aware Surface ScrollView primitive to ZORA theme scope. */
|
|
8
8
|
export const ScrollView = withZoraThemeScope(ScrollViewInner);
|
|
9
9
|
/*** Forwards ZORA scrolling props to the published Surface ScrollView boundary and yields scrolling to active descendant gestures. */
|
|
10
|
-
function ScrollViewInner({ themeId: _themeId, mode: _mode, interactionPolicy
|
|
10
|
+
function ScrollViewInner({ themeId: _themeId, mode: _mode, interactionPolicy, scrollEnabled = true, onRefresh, ...props }) {
|
|
11
11
|
const parentLock = useScrollGestureLock();
|
|
12
12
|
const [activeGestures, setActiveGestures] = React.useState(0);
|
|
13
13
|
const lock = React.useMemo(() => createScrollGestureLock(parentLock, (delta) => setActiveGestures((count) => count + delta)), [parentLock]);
|
|
14
14
|
return (<ScrollGestureLockContext.Provider value={lock}>
|
|
15
|
-
<SurfaceScrollView {...props} scrollEnabled={scrollEnabled && activeGestures === 0}/>
|
|
15
|
+
<SurfaceScrollView {...props} onRefresh={interactionPolicy === 'passive' ? undefined : onRefresh} scrollEnabled={scrollEnabled && activeGestures === 0}/>
|
|
16
16
|
</ScrollGestureLockContext.Provider>);
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=ScrollView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;AAE9D,sIAAsI;AACtI,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;AAE9D,sIAAsI;AACtI,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,aAAa,GAAG,IAAI,EACpB,SAAS,EACT,GAAG,KAAK,EACQ;IAChB,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;IAC1C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CACxB,GAAG,EAAE,CACH,uBAAuB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,EAC7F,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,OAAO,CACL,CAAC,wBAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAC7C;MAAA,CAAC,iBAAiB,CAChB,IAAI,KAAK,CAAC,CACV,SAAS,CAAC,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CACnE,aAAa,CAAC,CAAC,aAAa,IAAI,cAAc,KAAK,CAAC,CAAC,EAEzD;IAAA,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC","sourcesContent":["import { ScrollView as SurfaceScrollView } from '@ankhorage/surface';\nimport React from 'react';\n\nimport type { ScrollViewProps } from '../../../../types/layout';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { createScrollGestureLock } from '../../utils/createScrollGestureLock';\nimport { ScrollGestureLockContext } from './ScrollGestureLockContext';\nimport { useScrollGestureLock } from './useScrollGestureLock';\n\n/*** Adapts the token-aware Surface ScrollView primitive to ZORA theme scope. */\nexport const ScrollView = withZoraThemeScope(ScrollViewInner);\n\n/*** Forwards ZORA scrolling props to the published Surface ScrollView boundary and yields scrolling to active descendant gestures. */\nfunction ScrollViewInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n scrollEnabled = true,\n onRefresh,\n ...props\n}: ScrollViewProps) {\n const parentLock = useScrollGestureLock();\n const [activeGestures, setActiveGestures] = React.useState(0);\n const lock = React.useMemo(\n () =>\n createScrollGestureLock(parentLock, (delta) => setActiveGestures((count) => count + delta)),\n [parentLock],\n );\n\n return (\n <ScrollGestureLockContext.Provider value={lock}>\n <SurfaceScrollView\n {...props}\n onRefresh={interactionPolicy === 'passive' ? undefined : onRefresh}\n scrollEnabled={scrollEnabled && activeGestures === 0}\n />\n </ScrollGestureLockContext.Provider>\n );\n}\n"]}
|
|
@@ -3,12 +3,25 @@ export declare const scrollViewMeta: {
|
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
5
|
readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
|
|
6
|
+
readonly events: {
|
|
7
|
+
readonly refresh: {
|
|
8
|
+
readonly label: "Refresh";
|
|
9
|
+
readonly eventType: "scrollView.refresh";
|
|
10
|
+
readonly description: "Emitted when the native refresh control requests fresh content.";
|
|
11
|
+
readonly payloadFields: readonly [];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
6
14
|
readonly props: {
|
|
7
15
|
readonly horizontal: {
|
|
8
16
|
readonly type: "boolean";
|
|
9
17
|
readonly category: "Layout";
|
|
10
18
|
readonly default: false;
|
|
11
19
|
};
|
|
20
|
+
readonly refreshing: {
|
|
21
|
+
readonly type: "boolean";
|
|
22
|
+
readonly category: "State";
|
|
23
|
+
readonly default: false;
|
|
24
|
+
};
|
|
12
25
|
readonly p: {
|
|
13
26
|
readonly type: "spacing";
|
|
14
27
|
readonly category: "Spacing";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollViewMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"scrollViewMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBW,CAAC"}
|
|
@@ -5,9 +5,18 @@ export const scrollViewMeta = {
|
|
|
5
5
|
category: 'foundation',
|
|
6
6
|
directManifestNode: true,
|
|
7
7
|
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
8
|
+
events: {
|
|
9
|
+
refresh: {
|
|
10
|
+
label: 'Refresh',
|
|
11
|
+
eventType: 'scrollView.refresh',
|
|
12
|
+
description: 'Emitted when the native refresh control requests fresh content.',
|
|
13
|
+
payloadFields: [],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
8
16
|
props: {
|
|
9
17
|
...LAYOUT_PROPS,
|
|
10
18
|
horizontal: { type: 'boolean', category: 'Layout', default: false },
|
|
19
|
+
refreshing: { type: 'boolean', category: 'State', default: false },
|
|
11
20
|
},
|
|
12
21
|
};
|
|
13
22
|
//# sourceMappingURL=scrollViewMeta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollViewMeta.js","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,YAAY;IACtB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,KAAK,EAAE;QACL,GAAG,YAAY;QACf,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"scrollViewMeta.js","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,YAAY;IACtB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,oBAAoB;YAC/B,WAAW,EAAE,iEAAiE;YAC9E,aAAa,EAAE,EAAE;SAClB;KACF;IACD,KAAK,EAAE;QACL,GAAG,YAAY;QACf,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QACnE,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;KACnE;CACmC,CAAC","sourcesContent":["import { CONTAINER_ALLOWED_CHILDREN } from '../../constants/authoring';\nimport type { ZoraComponentMeta } from '../../types/authoring';\nimport { LAYOUT_PROPS } from './constants';\n\nexport const scrollViewMeta = {\n name: 'ScrollView',\n category: 'foundation',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n events: {\n refresh: {\n label: 'Refresh',\n eventType: 'scrollView.refresh',\n description: 'Emitted when the native refresh control requests fresh content.',\n payloadFields: [],\n },\n },\n props: {\n ...LAYOUT_PROPS,\n horizontal: { type: 'boolean', category: 'Layout', default: false },\n refreshing: { type: 'boolean', category: 'State', default: false },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "25.
|
|
4
|
+
"version": "25.9.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@ankhorage/ankh": "^0.13.2",
|
|
45
45
|
"@ankhorage/capability": "^0.2.2",
|
|
46
46
|
"@ankhorage/color-theory": "^0.3.1",
|
|
47
|
-
"@ankhorage/contracts": "^26.0.
|
|
47
|
+
"@ankhorage/contracts": "^26.0.2",
|
|
48
48
|
"@ankhorage/game": "^0.1.3",
|
|
49
49
|
"@ankhorage/grid-view": "^0.5.0",
|
|
50
50
|
"@ankhorage/reader": "^0.1.1",
|
|
51
|
-
"@ankhorage/runtime": "^5.
|
|
52
|
-
"@ankhorage/surface": "^9.4.
|
|
53
|
-
"@ankhorage/utility": "^1.
|
|
51
|
+
"@ankhorage/runtime": "^5.1.2",
|
|
52
|
+
"@ankhorage/surface": "^9.4.12",
|
|
53
|
+
"@ankhorage/utility": "^1.10.0",
|
|
54
54
|
"chess.js": "^1.4.0",
|
|
55
55
|
"expo-document-picker": "~57.0.3",
|
|
56
56
|
"expo-image-picker": "~57.0.20"
|
|
@@ -120,6 +120,16 @@
|
|
|
120
120
|
"import": "./dist/features/theme/public.js",
|
|
121
121
|
"default": "./dist/features/theme/public.js"
|
|
122
122
|
},
|
|
123
|
+
"./web/runtime": {
|
|
124
|
+
"types": "./web-dist/runtime/ZoraProvider.d.ts",
|
|
125
|
+
"import": "./web-dist/runtime/ZoraProvider.js",
|
|
126
|
+
"default": "./web-dist/runtime/ZoraProvider.js"
|
|
127
|
+
},
|
|
128
|
+
"./web/*": {
|
|
129
|
+
"types": "./web-dist/components/*/index.d.ts",
|
|
130
|
+
"import": "./web-dist/components/*/index.js",
|
|
131
|
+
"default": "./web-dist/components/*/index.js"
|
|
132
|
+
},
|
|
123
133
|
"./package.json": "./package.json",
|
|
124
134
|
"./cli": {
|
|
125
135
|
"types": "./dist/cli/index.d.ts",
|
|
@@ -149,7 +159,7 @@
|
|
|
149
159
|
"version-packages": "ankhorage-changeset version"
|
|
150
160
|
},
|
|
151
161
|
"devDependencies": {
|
|
152
|
-
"@ankhorage/devtools": "^2.3.
|
|
162
|
+
"@ankhorage/devtools": "^2.3.26",
|
|
153
163
|
"@ankhorage/paradox": "^0.3.5",
|
|
154
164
|
"@react-native-vector-icons/fontawesome": "^14.0.0",
|
|
155
165
|
"@react-native-vector-icons/fontawesome5": "^14.0.0",
|
|
@@ -1609,6 +1619,27 @@
|
|
|
1609
1619
|
}
|
|
1610
1620
|
}
|
|
1611
1621
|
},
|
|
1622
|
+
{
|
|
1623
|
+
"id": "scrollView.refresh",
|
|
1624
|
+
"owner": "@ankhorage/zora",
|
|
1625
|
+
"access": [
|
|
1626
|
+
"emit"
|
|
1627
|
+
],
|
|
1628
|
+
"binding": {
|
|
1629
|
+
"kind": "event",
|
|
1630
|
+
"bindableAs": [
|
|
1631
|
+
"source"
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
"label": "Refresh",
|
|
1635
|
+
"description": "Emitted when the native refresh control requests fresh content.",
|
|
1636
|
+
"output": {
|
|
1637
|
+
"schema": {
|
|
1638
|
+
"type": "object",
|
|
1639
|
+
"properties": {}
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1612
1643
|
{
|
|
1613
1644
|
"id": "searchInput.clear",
|
|
1614
1645
|
"owner": "@ankhorage/zora",
|
|
@@ -33,7 +33,6 @@ const EXPO_57_GRID_WORKSPACES_CONTRACT = {
|
|
|
33
33
|
expo: '~57.0.30',
|
|
34
34
|
metroConfig: '0.86.3',
|
|
35
35
|
typesReact: '~19.2.18',
|
|
36
|
-
zora: '25.8.15',
|
|
37
36
|
} as const;
|
|
38
37
|
const GRID_WORKSPACES_MANIFEST = 'examples/grid-workspaces/package.json';
|
|
39
38
|
|
|
@@ -163,7 +162,7 @@ describe('Expo 57 example boundary', () => {
|
|
|
163
162
|
const development = readRecord(packageJson, 'devDependencies');
|
|
164
163
|
|
|
165
164
|
expect(dependencies.expo).toBe(EXPO_57_GRID_WORKSPACES_CONTRACT.expo);
|
|
166
|
-
expect(dependencies['@ankhorage/zora']).
|
|
165
|
+
expect(dependencies['@ankhorage/zora']).toMatch(SEMVER_PATTERNS.exact);
|
|
167
166
|
expect(dependencies['@react-native/metro-config']).toBe(
|
|
168
167
|
EXPO_57_GRID_WORKSPACES_CONTRACT.metroConfig,
|
|
169
168
|
);
|
|
@@ -33,8 +33,18 @@ const reactNativeWeb = await import('react-native-web');
|
|
|
33
33
|
await mock.module('react-native', () => reactNativeWeb);
|
|
34
34
|
// ZORA's ScrollView only needs Surface's ScrollView and ThemeScope; the real package would load
|
|
35
35
|
// native-only peers, so the DOM-capable react-native-web ScrollView stands in for the primitive.
|
|
36
|
+
type SurfaceScrollViewProps = React.ComponentProps<typeof reactNativeWeb.ScrollView> & {
|
|
37
|
+
readonly onRefresh?: () => void;
|
|
38
|
+
readonly refreshing?: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const surfaceScrollViewProps: SurfaceScrollViewProps[] = [];
|
|
42
|
+
|
|
36
43
|
await mock.module('@ankhorage/surface', () => ({
|
|
37
|
-
ScrollView:
|
|
44
|
+
ScrollView: (props: SurfaceScrollViewProps) => {
|
|
45
|
+
surfaceScrollViewProps.push(props);
|
|
46
|
+
return React.createElement(reactNativeWeb.ScrollView, props);
|
|
47
|
+
},
|
|
38
48
|
ThemeScope: ({ children }: { readonly children: React.ReactNode }) => children,
|
|
39
49
|
}));
|
|
40
50
|
const { ScrollView } = await import('./ScrollView');
|
|
@@ -232,3 +242,52 @@ test('never re-enables a ScrollView that the caller disabled explicitly', async
|
|
|
232
242
|
await mounted.unmount();
|
|
233
243
|
}
|
|
234
244
|
});
|
|
245
|
+
|
|
246
|
+
test('forwards controlled refresh state and does not simulate a native pull gesture on web', async () => {
|
|
247
|
+
const mounted = mount();
|
|
248
|
+
const refreshSignals: undefined[] = [];
|
|
249
|
+
const onRefresh = () => refreshSignals.push(undefined);
|
|
250
|
+
try {
|
|
251
|
+
await mounted.render(
|
|
252
|
+
<ScrollView refreshing={false} onRefresh={onRefresh} testID="refreshable-scroll-view" />,
|
|
253
|
+
);
|
|
254
|
+
expect(surfaceScrollViewProps.at(-1)?.refreshing).toBe(false);
|
|
255
|
+
expect(surfaceScrollViewProps.at(-1)?.onRefresh).toBe(onRefresh);
|
|
256
|
+
|
|
257
|
+
await mounted.swipe('refreshable-scroll-view');
|
|
258
|
+
expect(refreshSignals).toEqual([]);
|
|
259
|
+
|
|
260
|
+
surfaceScrollViewProps.at(-1)?.onRefresh?.();
|
|
261
|
+
expect(refreshSignals).toEqual([undefined]);
|
|
262
|
+
|
|
263
|
+
await mounted.render(
|
|
264
|
+
<ScrollView refreshing onRefresh={onRefresh} testID="refreshable-scroll-view" />,
|
|
265
|
+
);
|
|
266
|
+
expect(surfaceScrollViewProps.at(-1)?.refreshing).toBe(true);
|
|
267
|
+
|
|
268
|
+
await mounted.render(
|
|
269
|
+
<ScrollView refreshing={false} onRefresh={onRefresh} testID="refreshable-scroll-view" />,
|
|
270
|
+
);
|
|
271
|
+
expect(surfaceScrollViewProps.at(-1)?.refreshing).toBe(false);
|
|
272
|
+
} finally {
|
|
273
|
+
await mounted.unmount();
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
test('suppresses pull-to-refresh while the interaction policy is passive', async () => {
|
|
278
|
+
const mounted = mount();
|
|
279
|
+
const onRefresh = () => undefined;
|
|
280
|
+
try {
|
|
281
|
+
await mounted.render(
|
|
282
|
+
<ScrollView
|
|
283
|
+
interactionPolicy="passive"
|
|
284
|
+
onRefresh={onRefresh}
|
|
285
|
+
testID="passive-refreshable-scroll-view"
|
|
286
|
+
/>,
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
expect(surfaceScrollViewProps.at(-1)?.onRefresh).toBeUndefined();
|
|
290
|
+
} finally {
|
|
291
|
+
await mounted.unmount();
|
|
292
|
+
}
|
|
293
|
+
});
|
|
@@ -14,8 +14,9 @@ export const ScrollView = withZoraThemeScope(ScrollViewInner);
|
|
|
14
14
|
function ScrollViewInner({
|
|
15
15
|
themeId: _themeId,
|
|
16
16
|
mode: _mode,
|
|
17
|
-
interactionPolicy
|
|
17
|
+
interactionPolicy,
|
|
18
18
|
scrollEnabled = true,
|
|
19
|
+
onRefresh,
|
|
19
20
|
...props
|
|
20
21
|
}: ScrollViewProps) {
|
|
21
22
|
const parentLock = useScrollGestureLock();
|
|
@@ -28,7 +29,11 @@ function ScrollViewInner({
|
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
31
|
<ScrollGestureLockContext.Provider value={lock}>
|
|
31
|
-
<SurfaceScrollView
|
|
32
|
+
<SurfaceScrollView
|
|
33
|
+
{...props}
|
|
34
|
+
onRefresh={interactionPolicy === 'passive' ? undefined : onRefresh}
|
|
35
|
+
scrollEnabled={scrollEnabled && activeGestures === 0}
|
|
36
|
+
/>
|
|
32
37
|
</ScrollGestureLockContext.Provider>
|
|
33
38
|
);
|
|
34
39
|
}
|
|
@@ -7,8 +7,17 @@ export const scrollViewMeta = {
|
|
|
7
7
|
category: 'foundation',
|
|
8
8
|
directManifestNode: true,
|
|
9
9
|
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
10
|
+
events: {
|
|
11
|
+
refresh: {
|
|
12
|
+
label: 'Refresh',
|
|
13
|
+
eventType: 'scrollView.refresh',
|
|
14
|
+
description: 'Emitted when the native refresh control requests fresh content.',
|
|
15
|
+
payloadFields: [],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
10
18
|
props: {
|
|
11
19
|
...LAYOUT_PROPS,
|
|
12
20
|
horizontal: { type: 'boolean', category: 'Layout', default: false },
|
|
21
|
+
refreshing: { type: 'boolean', category: 'State', default: false },
|
|
13
22
|
},
|
|
14
23
|
} as const satisfies ZoraComponentMeta;
|
|
@@ -101,6 +101,26 @@ describe('ZORA_COMPONENT_META event metadata', () => {
|
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
test('owns controlled component events in direct metadata and projects their bindings', () => {
|
|
104
|
+
expect(ZORA_COMPONENT_META.ScrollView.props.refreshing).toMatchObject({
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
category: 'State',
|
|
107
|
+
default: false,
|
|
108
|
+
});
|
|
109
|
+
expect(ZORA_COMPONENT_META.ScrollView.events?.refresh).toMatchObject({
|
|
110
|
+
eventType: 'scrollView.refresh',
|
|
111
|
+
payloadFields: [],
|
|
112
|
+
});
|
|
113
|
+
expect(ZORA_COMPONENT_META.ScrollView.bindings?.props?.refreshing.value).toEqual({
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
});
|
|
116
|
+
expect(ZORA_COMPONENT_META.ScrollView.bindings?.events?.refresh.payload).toEqual({
|
|
117
|
+
eventType: 'scrollView.refresh',
|
|
118
|
+
fields: [],
|
|
119
|
+
});
|
|
120
|
+
for (const component of [ZORA_COMPONENT_META.FlatList, ZORA_COMPONENT_META.SectionList]) {
|
|
121
|
+
expect(component.props.refreshing).toMatchObject({ type: 'boolean', category: 'State' });
|
|
122
|
+
expect(component.events?.refresh.payloadFields).toEqual([]);
|
|
123
|
+
}
|
|
104
124
|
expect(ZORA_COMPONENT_META.TextInput.events?.changeText).toMatchObject({
|
|
105
125
|
eventType: 'textInput.changeText',
|
|
106
126
|
payloadFields: [{ path: 'value', type: 'string' }],
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { expect, test } from 'bun:test';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
7
|
+
|
|
8
|
+
const forbiddenWebDependencies = [
|
|
9
|
+
'expo-document-picker',
|
|
10
|
+
'expo-image-picker',
|
|
11
|
+
'@gorhom/bottom-sheet',
|
|
12
|
+
'react-native-gesture-handler',
|
|
13
|
+
] as const;
|
|
14
|
+
|
|
15
|
+
/** Verifies that stable package web subpaths resolve only their requested UI graph. */
|
|
16
|
+
test('publishes SSR-safe ordinary UI through canonical web subpaths', async () => {
|
|
17
|
+
const packageJson = (await Bun.file('package.json').json()) as {
|
|
18
|
+
readonly exports: Record<string, unknown>;
|
|
19
|
+
};
|
|
20
|
+
expect(packageJson.exports['./web/runtime']).toEqual({
|
|
21
|
+
types: './web-dist/runtime/ZoraProvider.d.ts',
|
|
22
|
+
import: './web-dist/runtime/ZoraProvider.js',
|
|
23
|
+
default: './web-dist/runtime/ZoraProvider.js',
|
|
24
|
+
});
|
|
25
|
+
expect(packageJson.exports['./web/*']).toEqual({
|
|
26
|
+
types: './web-dist/components/*/index.d.ts',
|
|
27
|
+
import: './web-dist/components/*/index.js',
|
|
28
|
+
default: './web-dist/components/*/index.js',
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const temporaryDirectory = await mkdtemp(join(process.cwd(), '.cache-zora-web-entrypoints-'));
|
|
32
|
+
try {
|
|
33
|
+
const entrypoint = join(temporaryDirectory, 'dashboard.tsx');
|
|
34
|
+
await writeFile(
|
|
35
|
+
entrypoint,
|
|
36
|
+
[
|
|
37
|
+
"export { ZoraProvider } from '@ankhorage/zora/web/runtime';",
|
|
38
|
+
"export { AppBar } from '@ankhorage/zora/web/app-bar';",
|
|
39
|
+
"export { AppShell } from '@ankhorage/zora/web/app-shell';",
|
|
40
|
+
"export { Badge } from '@ankhorage/zora/web/badge';",
|
|
41
|
+
"export { Button } from '@ankhorage/zora/web/button';",
|
|
42
|
+
"export { Card } from '@ankhorage/zora/web/card';",
|
|
43
|
+
"export { DataTable } from '@ankhorage/zora/web/data-table';",
|
|
44
|
+
"export { Dialog } from '@ankhorage/zora/web/dialog';",
|
|
45
|
+
"export { MetricCard } from '@ankhorage/zora/web/metric-card';",
|
|
46
|
+
"export { PopoverMenu } from '@ankhorage/zora/web/popover-menu';",
|
|
47
|
+
"export { Select } from '@ankhorage/zora/web/select';",
|
|
48
|
+
"export { TextInput } from '@ankhorage/zora/web/text-input';",
|
|
49
|
+
"export { Text } from '@ankhorage/zora/web/text';",
|
|
50
|
+
"export { Heading } from '@ankhorage/zora/web/heading';",
|
|
51
|
+
"export { View } from '@ankhorage/zora/web/view';",
|
|
52
|
+
'',
|
|
53
|
+
].join('\n'),
|
|
54
|
+
'utf8',
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const build = await Bun.build({
|
|
58
|
+
entrypoints: [entrypoint],
|
|
59
|
+
target: 'browser',
|
|
60
|
+
format: 'esm',
|
|
61
|
+
external: ['react', 'react/*', 'react-dom', 'react-dom/*'],
|
|
62
|
+
});
|
|
63
|
+
expect(build.success).toBe(true);
|
|
64
|
+
const graph = (await Promise.all(build.outputs.map((output) => output.text()))).join('\n');
|
|
65
|
+
for (const dependency of forbiddenWebDependencies) {
|
|
66
|
+
expect(graph).not.toContain(dependency);
|
|
67
|
+
}
|
|
68
|
+
} finally {
|
|
69
|
+
await rm(temporaryDirectory, { force: true, recursive: true });
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/** Renders the generated public web entrypoints without a native runtime host. */
|
|
74
|
+
test('SSR-renders ordinary UI from its public web subpaths', async () => {
|
|
75
|
+
const [{ ZoraProvider }, { AppShell }, { Button }, { Screen }, { Text }] = await Promise.all([
|
|
76
|
+
import('@ankhorage/zora/web/runtime'),
|
|
77
|
+
import('@ankhorage/zora/web/app-shell'),
|
|
78
|
+
import('@ankhorage/zora/web/button'),
|
|
79
|
+
import('@ankhorage/zora/web/screen'),
|
|
80
|
+
import('@ankhorage/zora/web/text'),
|
|
81
|
+
]);
|
|
82
|
+
const markup = renderToStaticMarkup(
|
|
83
|
+
React.createElement(
|
|
84
|
+
ZoraProvider,
|
|
85
|
+
{ mode: 'light' },
|
|
86
|
+
React.createElement(
|
|
87
|
+
AppShell,
|
|
88
|
+
undefined,
|
|
89
|
+
React.createElement(
|
|
90
|
+
Screen,
|
|
91
|
+
undefined,
|
|
92
|
+
React.createElement(Text, undefined, 'Web entrypoint'),
|
|
93
|
+
React.createElement(Button, undefined, 'Continue'),
|
|
94
|
+
),
|
|
95
|
+
),
|
|
96
|
+
),
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
expect(markup).toContain('Web entrypoint');
|
|
100
|
+
expect(markup).toContain('Continue');
|
|
101
|
+
});
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveResponsive,
|
|
4
4
|
useResponsiveRuntime
|
|
5
|
-
} from "./Accordion-
|
|
5
|
+
} from "./Accordion-zj4wnm3e.js";
|
|
6
6
|
import {
|
|
7
7
|
View3,
|
|
8
8
|
Divider3
|
|
9
|
-
} from "./Accordion-
|
|
9
|
+
} from "./Accordion-58yzdsab.js";
|
|
10
10
|
import {
|
|
11
11
|
useTheme
|
|
12
12
|
} from "./Accordion-6wrr910w.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
resolveSpacing,
|
|
18
18
|
resolveViewStyles
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-yq16wwh5.js";
|
|
20
20
|
import {
|
|
21
21
|
require_cjs
|
|
22
22
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -177,7 +177,15 @@ function ScrollView(props) {
|
|
|
177
177
|
const visual = splitVisualProps(spacing.rest);
|
|
178
178
|
const dimensions = splitDimensionProps(visual.rest);
|
|
179
179
|
const layout = splitLayoutProps(dimensions.rest);
|
|
180
|
-
const {
|
|
180
|
+
const {
|
|
181
|
+
children,
|
|
182
|
+
contentContainerStyle,
|
|
183
|
+
style,
|
|
184
|
+
refreshing,
|
|
185
|
+
onRefresh,
|
|
186
|
+
refreshControl: nativeRefreshControl,
|
|
187
|
+
...scrollProps
|
|
188
|
+
} = layout.rest;
|
|
181
189
|
const resolved = resolveViewStyles(theme, breakpoint, {
|
|
182
190
|
...spacing.styleProps,
|
|
183
191
|
...visual.styleProps,
|
|
@@ -187,10 +195,23 @@ function ScrollView(props) {
|
|
|
187
195
|
return /* @__PURE__ */ jsx6(import_react_native2.ScrollView, {
|
|
188
196
|
...scrollProps,
|
|
189
197
|
contentContainerStyle,
|
|
198
|
+
refreshControl: resolveRefreshControl({ nativeRefreshControl, onRefresh, refreshing }),
|
|
190
199
|
style: [resolved, style],
|
|
191
200
|
children
|
|
192
201
|
});
|
|
193
202
|
}
|
|
203
|
+
function resolveRefreshControl({
|
|
204
|
+
nativeRefreshControl,
|
|
205
|
+
onRefresh,
|
|
206
|
+
refreshing
|
|
207
|
+
}) {
|
|
208
|
+
if (onRefresh === undefined && refreshing === undefined)
|
|
209
|
+
return nativeRefreshControl;
|
|
210
|
+
return /* @__PURE__ */ jsx6(import_react_native2.RefreshControl, {
|
|
211
|
+
onRefresh,
|
|
212
|
+
refreshing: refreshing ?? false
|
|
213
|
+
});
|
|
214
|
+
}
|
|
194
215
|
function splitSpacingProps(props) {
|
|
195
216
|
const { p, px, py, pt, pb, pl, pr, m, mx, my, mt, mb, ml, mr, gap, rowGap, columnGap, ...rest } = props;
|
|
196
217
|
return {
|
|
@@ -291,8 +312,9 @@ var ScrollView2 = withZoraThemeScope(ScrollViewInner);
|
|
|
291
312
|
function ScrollViewInner({
|
|
292
313
|
themeId: _themeId,
|
|
293
314
|
mode: _mode,
|
|
294
|
-
interactionPolicy
|
|
315
|
+
interactionPolicy,
|
|
295
316
|
scrollEnabled = true,
|
|
317
|
+
onRefresh,
|
|
296
318
|
...props
|
|
297
319
|
}) {
|
|
298
320
|
const parentLock = useScrollGestureLock();
|
|
@@ -302,6 +324,7 @@ function ScrollViewInner({
|
|
|
302
324
|
value: lock,
|
|
303
325
|
children: /* @__PURE__ */ jsx7(ScrollView, {
|
|
304
326
|
...props,
|
|
327
|
+
onRefresh: interactionPolicy === "passive" ? undefined : onRefresh,
|
|
305
328
|
scrollEnabled: scrollEnabled && activeGestures === 0
|
|
306
329
|
})
|
|
307
330
|
});
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./Accordion-1fsrnq73.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-0x8jncra.js";
|
|
11
11
|
import {
|
|
12
12
|
Text3
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-37fyjrmm.js";
|
|
14
14
|
import {
|
|
15
15
|
useZoraTheme2
|
|
16
16
|
} from "./Accordion-srjya6dz.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-z43mw081.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
7
|
} from "./Accordion-vj1m2wck.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-0x8jncra.js";
|
|
11
11
|
import {
|
|
12
12
|
Card2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-whk372cs.js";
|
|
14
14
|
import {
|
|
15
15
|
Text3
|
|
16
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-37fyjrmm.js";
|
|
17
17
|
import {
|
|
18
18
|
Badge2
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-jz4j00nh.js";
|
|
20
20
|
import {
|
|
21
21
|
useZoraTheme2
|
|
22
22
|
} from "./Accordion-srjya6dz.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-z43mw081.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
7
|
} from "./Accordion-vj1m2wck.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-0x8jncra.js";
|
|
11
11
|
import {
|
|
12
12
|
Text3
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-37fyjrmm.js";
|
|
14
14
|
import {
|
|
15
15
|
useZoraTheme2
|
|
16
16
|
} from "./Accordion-srjya6dz.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-z43mw081.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
7
|
} from "./Accordion-vj1m2wck.js";
|
|
@@ -9,28 +9,28 @@ import {
|
|
|
9
9
|
View2,
|
|
10
10
|
Divider2,
|
|
11
11
|
ScrollView2
|
|
12
|
-
} from "./Accordion-
|
|
12
|
+
} from "./Accordion-0x8jncra.js";
|
|
13
13
|
import {
|
|
14
14
|
FormActions2,
|
|
15
15
|
FormError2,
|
|
16
16
|
hasRequiredRule,
|
|
17
17
|
useFormController
|
|
18
|
-
} from "./Accordion-
|
|
18
|
+
} from "./Accordion-2r2tm2nk.js";
|
|
19
19
|
import {
|
|
20
20
|
Text3
|
|
21
|
-
} from "./Accordion-
|
|
21
|
+
} from "./Accordion-37fyjrmm.js";
|
|
22
22
|
import {
|
|
23
23
|
Field2
|
|
24
|
-
} from "./Accordion-
|
|
24
|
+
} from "./Accordion-fvv1jb72.js";
|
|
25
25
|
import {
|
|
26
26
|
TextInput2
|
|
27
|
-
} from "./Accordion-
|
|
27
|
+
} from "./Accordion-nmxdqe80.js";
|
|
28
28
|
import {
|
|
29
29
|
KeyboardAvoidingView2
|
|
30
30
|
} from "./Accordion-r2g18vxa.js";
|
|
31
31
|
import {
|
|
32
32
|
Surface2
|
|
33
|
-
} from "./Accordion-
|
|
33
|
+
} from "./Accordion-vj2yj9fa.js";
|
|
34
34
|
import {
|
|
35
35
|
require_cjs
|
|
36
36
|
} from "./Accordion-xgpzh4wq.js";
|