@ankhorage/zora 28.4.0 → 28.5.1
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 +12 -0
- package/README.md +1 -1
- package/dist/features/color/ColorPicker.js +27 -1
- package/dist/features/color/ColorPicker.js.map +1 -1
- package/dist/features/layout/adapters/inbound/ZoraWebStyleSheet.d.ts +4 -0
- package/dist/features/layout/adapters/inbound/ZoraWebStyleSheet.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/ZoraWebStyleSheet.js +18 -0
- package/dist/features/layout/adapters/inbound/ZoraWebStyleSheet.js.map +1 -0
- package/dist/features/layout/public.d.ts +1 -0
- package/dist/features/layout/public.d.ts.map +1 -1
- package/dist/features/layout/public.js +1 -0
- package/dist/features/layout/public.js.map +1 -1
- package/dist/features/popover/adapters/inbound/Popover.d.ts +4 -0
- package/dist/features/popover/adapters/inbound/Popover.d.ts.map +1 -0
- package/dist/features/popover/adapters/inbound/Popover.js +9 -0
- package/dist/features/popover/adapters/inbound/Popover.js.map +1 -0
- package/dist/features/popover/public.d.ts +3 -0
- package/dist/features/popover/public.d.ts.map +1 -0
- package/dist/features/popover/public.js +2 -0
- package/dist/features/popover/public.js.map +1 -0
- package/dist/features/theme/adapters/inbound/ZoraProvider.d.ts.map +1 -1
- package/dist/features/theme/adapters/inbound/ZoraProvider.js +10 -8
- package/dist/features/theme/adapters/inbound/ZoraProvider.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/types/popover.d.ts +7 -0
- package/dist/types/popover.d.ts.map +1 -0
- package/dist/types/popover.js +2 -0
- package/dist/types/popover.js.map +1 -0
- package/package.json +1 -1
- package/src/features/color/ColorPicker.layout.test.tsx +60 -0
- package/src/features/color/ColorPicker.tsx +31 -1
- package/src/features/layout/adapters/inbound/ZoraWebStyleSheet.tsx +26 -0
- package/src/features/layout/public.test.ts +9 -1
- package/src/features/layout/public.ts +1 -0
- package/src/features/master-detail/adapters/inbound/MasterDetail.runtime.test.tsx +1 -0
- package/src/features/popover/adapters/inbound/Popover.tsx +17 -0
- package/src/features/popover/public.test.ts +9 -0
- package/src/features/popover/public.ts +2 -0
- package/src/features/theme/adapters/inbound/ZoraProvider.tsx +10 -8
- package/src/features/theme/themeScopeStructure.test.ts +3 -2
- package/src/index.ts +7 -0
- package/src/types/popover.ts +12 -0
- package/web-dist/chunks/{Accordion-nmpzv3b0.js → Accordion-0egwarcs.js} +3 -3
- package/web-dist/chunks/{Accordion-htm3j8r8.js → Accordion-0spfxhpg.js} +4 -4
- package/web-dist/chunks/{Accordion-r75ep5pg.js → Accordion-19aegsx2.js} +4 -4
- package/web-dist/chunks/{Accordion-gnbt6w4q.js → Accordion-1g91we37.js} +4 -4
- package/web-dist/chunks/{Accordion-sh79sr5g.js → Accordion-224snqz3.js} +2 -2
- package/web-dist/chunks/{Accordion-f8zpd80k.js → Accordion-23k6n6zk.js} +3 -3
- package/web-dist/chunks/{Accordion-za0jcjgn.js → Accordion-2ad57stc.js} +2 -2
- package/web-dist/chunks/{Accordion-d405whfb.js → Accordion-2bygfpwg.js} +1 -1
- package/web-dist/chunks/{Accordion-fdzyyqe9.js → Accordion-2yat0x6x.js} +4 -3
- package/web-dist/chunks/{Accordion-v86n9tvj.js → Accordion-3cpkxpdg.js} +2 -2
- package/web-dist/chunks/{Accordion-5rwztz14.js → Accordion-49d0frg7.js} +2 -2
- package/web-dist/chunks/{Accordion-f8a49gy8.js → Accordion-4mg3epm9.js} +19 -1
- package/web-dist/chunks/Accordion-4qrva6ye.js +15 -0
- package/web-dist/chunks/{Accordion-01bsg7zt.js → Accordion-4yrszsvs.js} +1 -1
- package/web-dist/chunks/{Accordion-38xvj0cq.js → Accordion-516n2cx4.js} +4 -4
- package/web-dist/chunks/{Accordion-bp9y7738.js → Accordion-554f42yj.js} +27 -8
- package/web-dist/chunks/{Accordion-be2yhfqz.js → Accordion-5z75befg.js} +12 -4
- package/web-dist/chunks/{Accordion-tqagt6cz.js → Accordion-77514sk9.js} +1 -1
- package/web-dist/chunks/{Accordion-2xkxthf1.js → Accordion-78astqx3.js} +6 -6
- package/web-dist/chunks/{Accordion-h63c9k9k.js → Accordion-7nn4r909.js} +16 -9
- package/web-dist/chunks/{Accordion-2xb252py.js → Accordion-7v6mrp8n.js} +6 -6
- package/web-dist/chunks/{Accordion-kcm6jcpp.js → Accordion-9b4bsxwe.js} +1 -1
- package/web-dist/chunks/{Accordion-a1mgdfg7.js → Accordion-9m5asd8r.js} +1 -1
- package/web-dist/chunks/{Accordion-f1vargnk.js → Accordion-9tgvr155.js} +4 -4
- package/web-dist/chunks/{Accordion-vb52sts9.js → Accordion-a5fsrv3x.js} +7 -6
- package/web-dist/chunks/{Accordion-bzgy9sg3.js → Accordion-agt9vt85.js} +2 -2
- package/web-dist/chunks/{Accordion-xzaa9s7f.js → Accordion-akwd4brm.js} +1 -13
- package/web-dist/chunks/{Accordion-379mgrse.js → Accordion-arr9ayv0.js} +1 -1
- package/web-dist/chunks/{Accordion-axe7nsht.js → Accordion-d5sz8vaq.js} +1 -1
- package/web-dist/chunks/{Accordion-5qz4j8tt.js → Accordion-ge7cjtwy.js} +5 -5
- package/web-dist/chunks/{Accordion-e0vm82xr.js → Accordion-gs838h0n.js} +2 -2
- package/web-dist/chunks/{Accordion-4zb6dcys.js → Accordion-j1zerr6z.js} +1 -1
- package/web-dist/chunks/{Accordion-2ys50fc8.js → Accordion-jtgh2tep.js} +1 -1
- package/web-dist/chunks/{Accordion-9qg7cjt8.js → Accordion-kcspvk6q.js} +2 -2
- package/web-dist/chunks/{Accordion-vkqqktc5.js → Accordion-khfjh10v.js} +2 -2
- package/web-dist/chunks/{Accordion-q683s6kd.js → Accordion-ktscjwa2.js} +3 -3
- package/web-dist/chunks/{Accordion-hdyzyw8q.js → Accordion-mnxf855g.js} +1 -1
- package/web-dist/chunks/{Accordion-17s33h1a.js → Accordion-q8a423pk.js} +1 -1
- package/web-dist/chunks/{Accordion-rtamzg9j.js → Accordion-qjxbf8nt.js} +1 -1
- package/web-dist/chunks/{Accordion-v6vhyv31.js → Accordion-qjxx43r1.js} +1 -1
- package/web-dist/chunks/{Accordion-bd9vzpbz.js → Accordion-sj1n06dw.js} +8 -8
- package/web-dist/chunks/{Accordion-rq311z1k.js → Accordion-tdrk9cyn.js} +4 -4
- package/web-dist/chunks/{Accordion-kdb9g5b1.js → Accordion-vx8bjm5k.js} +4 -4
- package/web-dist/chunks/{Accordion-2wggrer7.js → Accordion-ytf9ba8v.js} +2 -2
- package/web-dist/chunks/{Accordion-t9n4ey2r.js → Accordion-zd15byha.js} +1 -1
- package/web-dist/chunks/{RichTextClient-8x3t7bwd.js → RichTextClient-70qt7037.js} +11 -11
- package/web-dist/chunks/{Video.native-97x0098j.js → Video.native-6142s9f7.js} +5 -5
- package/web-dist/chunks/{index-cnnsfz6n.js → index-n6p0wdvg.js} +1 -1
- package/web-dist/components/accordion/Accordion.js +2 -2
- package/web-dist/components/accordion-item/AccordionItem.js +2 -2
- package/web-dist/components/app-bar/AppBar.js +9 -9
- package/web-dist/components/app-header/AppHeader.js +9 -9
- package/web-dist/components/app-shell/AppShell.js +1 -1
- package/web-dist/components/audio/Audio.js +6 -6
- package/web-dist/components/auth-screen/AuthScreen.js +10 -10
- package/web-dist/components/avatar/Avatar.js +2 -2
- package/web-dist/components/avatar-group/AvatarGroup.js +2 -2
- package/web-dist/components/badge/Badge.js +2 -2
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +9 -9
- package/web-dist/components/bottom-sheet/BottomSheet.js +2 -2
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +2 -2
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +2 -2
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +2 -2
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +2 -2
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +2 -2
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +4 -4
- package/web-dist/components/button/Button.js +4 -4
- package/web-dist/components/button-group/ButtonGroup.js +4 -4
- package/web-dist/components/calendar/Calendar.js +5 -5
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +9 -9
- package/web-dist/components/card/Card.js +8 -8
- package/web-dist/components/chat-list-item/ChatListItem.js +6 -6
- package/web-dist/components/checkbox/Checkbox.js +4 -4
- package/web-dist/components/checkbox-group/CheckboxGroup.js +4 -4
- package/web-dist/components/chip/Chip.js +3 -3
- package/web-dist/components/chip-group/ChipGroup.js +3 -3
- package/web-dist/components/collection-editor/CollectionEditor.js +8 -8
- package/web-dist/components/color-hue-scale/ColorHueScale.js +15 -15
- package/web-dist/components/color-picker/ColorPicker.js +15 -15
- package/web-dist/components/color-tone/ColorTone.js +15 -15
- package/web-dist/components/color-wheel/ColorWheel.js +15 -15
- package/web-dist/components/content-rail/ContentRail.js +4 -4
- package/web-dist/components/data-table/DataTable.js +17 -17
- package/web-dist/components/date-picker/DatePicker.js +11 -11
- package/web-dist/components/dialog/Dialog.js +4 -4
- package/web-dist/components/divider/Divider.js +1 -1
- package/web-dist/components/empty-state/EmptyState.js +9 -9
- package/web-dist/components/explorer/Explorer.js +3 -3
- package/web-dist/components/field/Field.js +4 -4
- package/web-dist/components/file-explorer/FileExplorer.js +3 -3
- package/web-dist/components/flat-list/FlatList.js +5 -5
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +10 -10
- package/web-dist/components/form/Form.js +7 -7
- package/web-dist/components/form-actions/FormActions.js +7 -7
- package/web-dist/components/form-error/FormError.js +7 -7
- package/web-dist/components/game/Game.js +2 -2
- package/web-dist/components/game-entity/GameEntity.js +2 -2
- package/web-dist/components/game-field/GameField.js +2 -2
- package/web-dist/components/game-input-zone/GameInputZone.js +2 -2
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +2 -2
- package/web-dist/components/game-overlay/GameOverlay.js +2 -2
- package/web-dist/components/gradient/Gradient.js +2 -2
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +2 -2
- package/web-dist/components/grid/Grid.js +1 -1
- package/web-dist/components/hero/Hero.js +8 -8
- package/web-dist/components/icon-button/IconButton.js +4 -4
- package/web-dist/components/image/Image.js +2 -2
- package/web-dist/components/list/List.js +5 -5
- package/web-dist/components/list-item/ListItem.js +5 -5
- package/web-dist/components/list-section/ListSection.js +5 -5
- package/web-dist/components/master-detail/MasterDetail.js +1 -1
- package/web-dist/components/media-card/MediaCard.js +8 -8
- package/web-dist/components/media-explorer/MediaExplorer.js +3 -3
- package/web-dist/components/message-bubble/MessageBubble.js +6 -6
- package/web-dist/components/metric-card/MetricCard.js +8 -8
- package/web-dist/components/missing-element/MissingElement.js +3 -3
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +10 -10
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +10 -10
- package/web-dist/components/otp-form/OtpForm.js +10 -10
- package/web-dist/components/pagination/Pagination.js +4 -4
- package/web-dist/components/palette-item/PaletteItem.js +8 -8
- package/web-dist/components/popover/Popover.d.ts +5 -0
- package/web-dist/components/popover/Popover.dependency-0.d.ts +27 -0
- package/web-dist/components/popover/Popover.dependency-1.d.ts +3 -0
- package/web-dist/components/popover/Popover.js +29 -0
- package/web-dist/components/popover/Popover.types-0.d.ts +10 -0
- package/web-dist/components/popover/index.d.ts +2 -0
- package/web-dist/components/popover/index.js +2 -0
- package/web-dist/components/popover-menu/PopoverMenu.js +6 -6
- package/web-dist/components/post-card/PostCard.js +8 -8
- package/web-dist/components/product-card/ProductCard.js +8 -8
- package/web-dist/components/progress/Progress.js +2 -2
- package/web-dist/components/progress-ring/ProgressRing.js +2 -2
- package/web-dist/components/radio/Radio.js +4 -4
- package/web-dist/components/radio-group/RadioGroup.js +4 -4
- package/web-dist/components/rating/Rating.js +1 -1
- package/web-dist/components/reader/Reader.js +11 -11
- package/web-dist/components/rich-text/RichText.js +2 -2
- package/web-dist/components/scan-overlay/ScanOverlay.js +9 -9
- package/web-dist/components/screen/Screen.js +1 -1
- package/web-dist/components/screen-section/ScreenSection.js +2 -2
- package/web-dist/components/scroll-view/ScrollView.js +1 -1
- package/web-dist/components/search-input/SearchInput.js +6 -6
- package/web-dist/components/section-header/SectionHeader.js +2 -2
- package/web-dist/components/section-list/SectionList.js +5 -5
- package/web-dist/components/select/Select.js +9 -9
- package/web-dist/components/sign-in-form/SignInForm.js +10 -10
- package/web-dist/components/sign-up-form/SignUpForm.js +10 -10
- package/web-dist/components/skeleton/Skeleton.js +11 -11
- package/web-dist/components/skeleton-card/SkeletonCard.js +11 -11
- package/web-dist/components/skeleton-list/SkeletonList.js +11 -11
- package/web-dist/components/skeleton-text/SkeletonText.js +11 -11
- package/web-dist/components/switch/Switch.js +3 -3
- package/web-dist/components/tab/Tab.js +2 -2
- package/web-dist/components/tab-list/TabList.js +2 -2
- package/web-dist/components/tab-panel/TabPanel.js +2 -2
- package/web-dist/components/tabs/Tabs.js +2 -2
- package/web-dist/components/text-input/TextInput.js +6 -6
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +4 -4
- package/web-dist/components/time-picker/TimePicker.js +10 -10
- package/web-dist/components/timeline/Timeline.js +2 -2
- package/web-dist/components/toast/Toast.js +4 -4
- package/web-dist/components/toast-provider/ToastProvider.js +4 -4
- package/web-dist/components/toolbar/Toolbar.js +9 -9
- package/web-dist/components/tree-item/TreeItem.js +6 -6
- package/web-dist/components/uploader/Uploader.js +13 -13
- package/web-dist/components/video/Video.js +4 -4
- package/web-dist/components/view/View.js +1 -1
- package/web-dist/components/zora-web-style-sheet/ZoraWebStyleSheet.d.ts +5 -0
- package/web-dist/components/zora-web-style-sheet/ZoraWebStyleSheet.js +14 -0
- package/web-dist/components/zora-web-style-sheet/index.d.ts +1 -0
- package/web-dist/components/zora-web-style-sheet/index.js +2 -0
- package/web-dist/manifest.json +798 -734
- package/web-dist/runtime/ZoraProvider.js +89 -58
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
sortOverlayEntries,
|
|
10
10
|
OverlayStackContext,
|
|
11
11
|
OverlayStackActionsContext,
|
|
12
|
+
OverlayEntryContext,
|
|
12
13
|
createOverlayEntry
|
|
13
|
-
} from "../chunks/Accordion-
|
|
14
|
+
} from "../chunks/Accordion-7nn4r909.js";
|
|
14
15
|
import {
|
|
15
16
|
useFontRuntime,
|
|
16
17
|
zoraDefaultTheme,
|
|
@@ -24,9 +25,9 @@ import {
|
|
|
24
25
|
} from "../chunks/Accordion-9d38cgqj.js";
|
|
25
26
|
import {
|
|
26
27
|
ToastProvider3
|
|
27
|
-
} from "../chunks/Accordion-
|
|
28
|
+
} from "../chunks/Accordion-ktscjwa2.js";
|
|
28
29
|
import"../chunks/Accordion-pdjhezmz.js";
|
|
29
|
-
import"../chunks/Accordion-
|
|
30
|
+
import"../chunks/Accordion-9b4bsxwe.js";
|
|
30
31
|
import"../chunks/Accordion-eqvdv7tt.js";
|
|
31
32
|
import"../chunks/Accordion-c6edgxay.js";
|
|
32
33
|
import {
|
|
@@ -46,10 +47,9 @@ import {
|
|
|
46
47
|
// node_modules/@ankhorage/surface/src/features/theme/adapters/inbound/ThemeProvider.tsx
|
|
47
48
|
import { useMemo, useState } from "react";
|
|
48
49
|
|
|
49
|
-
// node_modules/@ankhorage/surface/src/internal/overlay/
|
|
50
|
+
// node_modules/@ankhorage/surface/src/internal/overlay/OverlayStackHost.tsx
|
|
50
51
|
var import_react_native = __toESM(require_cjs(), 1);
|
|
51
|
-
import
|
|
52
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
52
|
+
import { jsx } from "react/jsx-runtime";
|
|
53
53
|
import { createElement } from "react";
|
|
54
54
|
var boxNonePointerEvents = resolvePointerEvents("box-none");
|
|
55
55
|
var styles = import_react_native.StyleSheet.create({
|
|
@@ -61,56 +61,85 @@ var styles = import_react_native.StyleSheet.create({
|
|
|
61
61
|
top: 0
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
function OverlayStackHost({ overlays }) {
|
|
65
|
+
return /* @__PURE__ */ jsx(import_react_native.View, {
|
|
66
|
+
...boxNonePointerEvents.props,
|
|
67
|
+
style: [boxNonePointerEvents.style, styles.fill],
|
|
68
|
+
children: overlays.map((overlay) => /* @__PURE__ */ createElement(import_react_native.View, {
|
|
69
|
+
...boxNonePointerEvents.props,
|
|
70
|
+
key: overlay.id,
|
|
71
|
+
style: [boxNonePointerEvents.style, styles.fill, overlayZIndex(overlay.zIndex)]
|
|
72
|
+
}, /* @__PURE__ */ jsx(OverlayEntryContext, {
|
|
73
|
+
value: overlay,
|
|
74
|
+
children: overlay.node
|
|
75
|
+
})))
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function overlayZIndex(zIndex) {
|
|
79
|
+
return { zIndex };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// node_modules/@ankhorage/surface/src/internal/overlay/useOverlayStackRuntime.ts
|
|
83
|
+
import React2 from "react";
|
|
84
|
+
function useOverlayStackRuntime() {
|
|
85
|
+
const orderRef = React2.useRef(0);
|
|
86
|
+
const [overlays, setOverlays] = React2.useState([]);
|
|
87
|
+
const overlaysRef = React2.useRef([]);
|
|
88
|
+
React2.useEffect(() => {
|
|
89
|
+
overlaysRef.current = overlays;
|
|
90
|
+
}, [overlays]);
|
|
91
|
+
const setOverlay = React2.useCallback((id, descriptor) => {
|
|
68
92
|
setOverlays((current) => {
|
|
69
93
|
const existing = current.find((entry) => entry.id === id);
|
|
70
94
|
const nextEntry = createOverlayEntry(id, existing?.order ?? orderRef.current++, descriptor);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return sortOverlayEntries(current.map((entry) => entry.id === id ? nextEntry : entry));
|
|
95
|
+
const next = !existing ? sortOverlayEntries([...current, nextEntry]) : sortOverlayEntries(current.map((entry) => entry.id === id ? nextEntry : entry));
|
|
96
|
+
overlaysRef.current = next;
|
|
97
|
+
return next;
|
|
75
98
|
});
|
|
76
99
|
}, []);
|
|
77
|
-
const removeOverlay =
|
|
78
|
-
setOverlays((current) =>
|
|
100
|
+
const removeOverlay = React2.useCallback((id) => {
|
|
101
|
+
setOverlays((current) => {
|
|
102
|
+
const next = current.filter((entry) => !isOverlayDescendantOf(entry, id, current));
|
|
103
|
+
overlaysRef.current = next;
|
|
104
|
+
return next;
|
|
105
|
+
});
|
|
106
|
+
}, []);
|
|
107
|
+
const dismissTopmost = React2.useCallback(() => {
|
|
108
|
+
const topmost = overlaysRef.current.at(-1);
|
|
109
|
+
topmost?.onDismiss?.();
|
|
79
110
|
}, []);
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return
|
|
111
|
+
const isTopmost = React2.useCallback((id) => overlaysRef.current.at(-1)?.id === id, []);
|
|
112
|
+
const actions = React2.useMemo(() => ({ dismissTopmost, isTopmost, removeOverlay, setOverlay }), [dismissTopmost, isTopmost, removeOverlay, setOverlay]);
|
|
113
|
+
const value = React2.useMemo(() => ({ dismissTopmost, isTopmost, overlays, removeOverlay, setOverlay }), [dismissTopmost, isTopmost, overlays, removeOverlay, setOverlay]);
|
|
114
|
+
return { actions, value };
|
|
115
|
+
}
|
|
116
|
+
function isOverlayDescendantOf(entry, removedId, overlays) {
|
|
117
|
+
if (entry.id === removedId)
|
|
118
|
+
return true;
|
|
119
|
+
const parent = entry.parentId === undefined ? undefined : overlays.find((item) => item.id === entry.parentId);
|
|
120
|
+
return parent === undefined ? false : isOverlayDescendantOf(parent, removedId, overlays);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// node_modules/@ankhorage/surface/src/internal/overlay/OverlayProvider.tsx
|
|
124
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
125
|
+
function OverlayProvider({ children }) {
|
|
126
|
+
const { actions, value } = useOverlayStackRuntime();
|
|
127
|
+
return /* @__PURE__ */ jsx2(OverlayStackActionsContext, {
|
|
90
128
|
value: actions,
|
|
91
129
|
children: /* @__PURE__ */ jsxs(OverlayStackContext, {
|
|
92
130
|
value,
|
|
93
131
|
children: [
|
|
94
132
|
children,
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
97
|
-
style: [boxNonePointerEvents.style, styles.fill],
|
|
98
|
-
children: overlays.map((overlay) => /* @__PURE__ */ createElement(import_react_native.View, {
|
|
99
|
-
...boxNonePointerEvents.props,
|
|
100
|
-
key: overlay.id,
|
|
101
|
-
style: [boxNonePointerEvents.style, styles.fill, overlayZIndex(overlay.zIndex)]
|
|
102
|
-
}, overlay.node))
|
|
133
|
+
/* @__PURE__ */ jsx2(OverlayStackHost, {
|
|
134
|
+
overlays: value.overlays
|
|
103
135
|
})
|
|
104
136
|
]
|
|
105
137
|
})
|
|
106
138
|
});
|
|
107
139
|
}
|
|
108
|
-
function overlayZIndex(zIndex) {
|
|
109
|
-
return { zIndex };
|
|
110
|
-
}
|
|
111
140
|
|
|
112
141
|
// node_modules/@ankhorage/surface/src/features/theme/adapters/inbound/ThemeProvider.tsx
|
|
113
|
-
import { jsx as
|
|
142
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
114
143
|
function ThemeProvider({
|
|
115
144
|
children,
|
|
116
145
|
initialConfig,
|
|
@@ -128,10 +157,10 @@ function ThemeProvider({
|
|
|
128
157
|
setThemeConfig: (nextConfig) => setConfig((previous) => deepMerge(previous, nextConfig)),
|
|
129
158
|
setMode
|
|
130
159
|
}), [mode, theme]);
|
|
131
|
-
return /* @__PURE__ */
|
|
132
|
-
children: /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ jsx3(ResponsiveProvider, {
|
|
161
|
+
children: /* @__PURE__ */ jsx3(ThemeRuntimeContext, {
|
|
133
162
|
value,
|
|
134
|
-
children: /* @__PURE__ */
|
|
163
|
+
children: /* @__PURE__ */ jsx3(OverlayProvider, {
|
|
135
164
|
children
|
|
136
165
|
})
|
|
137
166
|
})
|
|
@@ -139,7 +168,7 @@ function ThemeProvider({
|
|
|
139
168
|
}
|
|
140
169
|
|
|
141
170
|
// src/features/theme/adapters/inbound/ZoraProvider.tsx
|
|
142
|
-
import
|
|
171
|
+
import React3 from "react";
|
|
143
172
|
|
|
144
173
|
// src/features/theme/application/use-cases/createZoraThemeConfig.ts
|
|
145
174
|
function createZoraThemeConfig(theme = zoraDefaultTheme) {
|
|
@@ -159,18 +188,18 @@ function createZoraThemeConfig(theme = zoraDefaultTheme) {
|
|
|
159
188
|
}
|
|
160
189
|
|
|
161
190
|
// src/features/theme/composition/ZoraRuntimeCapabilities.web.tsx
|
|
162
|
-
import { jsx as
|
|
191
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
163
192
|
function ZoraRuntimeCapabilities({ children, toast }) {
|
|
164
193
|
if (!toast)
|
|
165
194
|
return children;
|
|
166
|
-
return /* @__PURE__ */
|
|
195
|
+
return /* @__PURE__ */ jsx4(ToastProvider3, {
|
|
167
196
|
...toast === true ? {} : toast,
|
|
168
197
|
children
|
|
169
198
|
});
|
|
170
199
|
}
|
|
171
200
|
|
|
172
201
|
// src/features/theme/adapters/inbound/ZoraProvider.tsx
|
|
173
|
-
import { jsx as
|
|
202
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
174
203
|
function ZoraProvider({
|
|
175
204
|
bottomSheet = false,
|
|
176
205
|
children,
|
|
@@ -180,19 +209,21 @@ function ZoraProvider({
|
|
|
180
209
|
mode,
|
|
181
210
|
toast = false
|
|
182
211
|
}) {
|
|
183
|
-
const resolvedConfig =
|
|
184
|
-
const runtimeValue =
|
|
185
|
-
return /* @__PURE__ */
|
|
212
|
+
const resolvedConfig = React3.useMemo(() => themeConfig ?? createZoraThemeConfig(theme), [theme, themeConfig]);
|
|
213
|
+
const runtimeValue = React3.useMemo(() => ({ themeId: resolvedConfig.id }), [resolvedConfig.id]);
|
|
214
|
+
return /* @__PURE__ */ jsx5(ZoraThemeRuntimeContext, {
|
|
186
215
|
value: runtimeValue,
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
216
|
+
children: /* @__PURE__ */ jsx5(ResponsiveProvider, {
|
|
217
|
+
children: /* @__PURE__ */ jsx5(ThemeProvider, {
|
|
218
|
+
initialConfig: resolvedConfig,
|
|
219
|
+
initialMode: mode ?? initialMode,
|
|
220
|
+
children: /* @__PURE__ */ jsx5(ZoraProviderMode, {
|
|
221
|
+
mode,
|
|
222
|
+
children: /* @__PURE__ */ jsx5(ZoraRuntimeCapabilities, {
|
|
223
|
+
bottomSheet,
|
|
224
|
+
toast,
|
|
225
|
+
children
|
|
226
|
+
})
|
|
196
227
|
})
|
|
197
228
|
})
|
|
198
229
|
})
|
|
@@ -200,7 +231,7 @@ function ZoraProvider({
|
|
|
200
231
|
}
|
|
201
232
|
function ZoraProviderMode({ children, mode }) {
|
|
202
233
|
const runtime = useTheme();
|
|
203
|
-
|
|
234
|
+
React3.useEffect(() => {
|
|
204
235
|
if (mode !== undefined && runtime.mode !== mode)
|
|
205
236
|
runtime.setMode(mode);
|
|
206
237
|
}, [mode, runtime]);
|