@ankhorage/zora 28.12.0 → 28.12.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 +6 -0
- package/README.md +1 -1
- package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -1
- package/dist/features/button/adapters/inbound/Button.js +4 -2
- package/dist/features/button/adapters/inbound/Button.js.map +1 -1
- package/dist/features/layout/adapters/inbound/Screen.d.ts.map +1 -1
- package/dist/features/layout/adapters/inbound/Screen.js +2 -2
- package/dist/features/layout/adapters/inbound/Screen.js.map +1 -1
- package/dist/features/master-detail/adapters/inbound/MasterDetail.js +14 -11
- package/dist/features/master-detail/adapters/inbound/MasterDetail.js.map +1 -1
- package/dist/features/selection/adapters/inbound/RuntimeAuthoringOverlay.d.ts.map +1 -1
- package/dist/features/selection/adapters/inbound/RuntimeAuthoringOverlay.js +8 -19
- package/dist/features/selection/adapters/inbound/RuntimeAuthoringOverlay.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.js +4 -2
- package/dist/features/typography/adapters/inbound/Heading.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.js +4 -2
- package/dist/features/typography/adapters/inbound/Text.js.map +1 -1
- package/dist/types/heading.d.ts +3 -0
- package/dist/types/heading.d.ts.map +1 -1
- package/dist/types/heading.js.map +1 -1
- package/dist/types/layout.d.ts +2 -0
- package/dist/types/layout.d.ts.map +1 -1
- package/dist/types/layout.js.map +1 -1
- package/dist/types/master-detail.d.ts +3 -0
- package/dist/types/master-detail.d.ts.map +1 -1
- package/dist/types/master-detail.js.map +1 -1
- package/dist/types/text.d.ts +3 -0
- package/dist/types/text.d.ts.map +1 -1
- package/dist/types/text.js.map +1 -1
- package/package.json +2 -2
- package/src/features/button/adapters/inbound/Button.tsx +9 -1
- package/src/features/calendar/adapters/inbound/Calendar.interaction.test.tsx +54 -15
- package/src/features/layout/adapters/inbound/Screen.tsx +2 -0
- package/src/features/list/adapters/inbound/virtualizedLists.test.tsx +1 -0
- package/src/features/master-detail/adapters/inbound/MasterDetail.runtime.test.tsx +29 -1
- package/src/features/master-detail/adapters/inbound/MasterDetail.tsx +62 -10
- package/src/features/matrix-grid/adapters/inbound/MatrixGrid.protected-focus.test.tsx +47 -12
- package/src/features/matrix-grid/adapters/inbound/MatrixGrid.test.tsx +58 -1
- package/src/features/selection/adapters/inbound/RuntimeAuthoringOverlay.test.tsx +24 -10
- package/src/features/selection/adapters/inbound/RuntimeAuthoringOverlay.tsx +10 -32
- package/src/features/typography/adapters/inbound/Heading.tsx +9 -1
- package/src/features/typography/adapters/inbound/Text.tsx +9 -1
- package/src/types/heading.ts +3 -0
- package/src/types/layout.ts +2 -0
- package/src/types/master-detail.ts +3 -0
- package/src/types/text.ts +3 -0
- package/src/webPackageExports.test.ts +35 -5
- package/web-dist/authoring/index.d.ts +2 -2
- package/web-dist/authoring/index.js +5 -5
- package/web-dist/chunks/{Accordion-cah5j61y.js → Accordion-0khxr0bc.js} +1 -1
- package/web-dist/chunks/{Accordion-zagrbkq1.js → Accordion-0zg7bp65.js} +1 -1
- package/web-dist/chunks/{Accordion-h2rnzgyv.js → Accordion-13qdzpsw.js} +2 -2
- package/web-dist/chunks/{Accordion-gy3bx3xa.js → Accordion-1dv9qy83.js} +1 -1
- package/web-dist/chunks/{Accordion-7eysykr1.js → Accordion-215f8pzb.js} +6 -4
- package/web-dist/chunks/{Accordion-b1tqkxx6.js → Accordion-2khy77a4.js} +2 -2
- package/web-dist/chunks/{Accordion-5x4cv0kv.js → Accordion-31xdsdbt.js} +15 -2
- package/web-dist/chunks/{Accordion-qz6ddnmv.js → Accordion-451n4t9y.js} +2 -2
- package/web-dist/chunks/{Accordion-a8b6g53f.js → Accordion-4e5wzq5h.js} +5 -3
- package/web-dist/chunks/{Accordion-w4zh2nws.js → Accordion-5hs2x3mg.js} +8 -6
- package/web-dist/chunks/{Accordion-ajqj6ymg.js → Accordion-5ry809w9.js} +2 -2
- package/web-dist/chunks/Accordion-63x9gd07.js +21 -0
- package/web-dist/chunks/{Accordion-a0hbjxg9.js → Accordion-87rb2j42.js} +2 -2
- package/web-dist/chunks/{Accordion-nhf8zjt4.js → Accordion-8y0zdc9b.js} +1 -1
- package/web-dist/chunks/{Accordion-eysfka31.js → Accordion-9brxrdt0.js} +9 -7
- package/web-dist/chunks/{Accordion-et7xzm6k.js → Accordion-a3p5s8r5.js} +9 -7
- package/web-dist/chunks/{Accordion-vbh3xqv6.js → Accordion-b32cj447.js} +9 -4
- package/web-dist/chunks/{Accordion-afxbyvwp.js → Accordion-cx1wpv5h.js} +2 -2
- package/web-dist/chunks/{Accordion-p84h11ek.js → Accordion-e8e1qanc.js} +2 -2
- package/web-dist/chunks/{Accordion-ak6dvant.js → Accordion-fkdxf4za.js} +2 -2
- package/web-dist/chunks/{Accordion-mkd3k28h.js → Accordion-fx6h9j9b.js} +2 -2
- package/web-dist/chunks/{Accordion-dy1j2a7p.js → Accordion-hj2c784w.js} +4 -4
- package/web-dist/chunks/{Accordion-wkqemqjw.js → Accordion-j41dzcsm.js} +11 -10
- package/web-dist/chunks/{Accordion-e9jwetg7.js → Accordion-jf05jg7c.js} +2 -2
- package/web-dist/chunks/{Accordion-yannd7r3.js → Accordion-mb7bvv02.js} +2 -2
- package/web-dist/chunks/{Accordion-2b3sd76b.js → Accordion-n4pb4fxf.js} +1 -1
- package/web-dist/chunks/{Accordion-2kv6p7by.js → Accordion-ngp3wrcj.js} +22 -32
- package/web-dist/chunks/{Accordion-rv90tjqr.js → Accordion-r3s4hat8.js} +1 -1
- package/web-dist/chunks/{Accordion-x9sb23p3.js → Accordion-s6gkg1x4.js} +1 -1
- package/web-dist/chunks/{Accordion-95003ycq.js → Accordion-t3307xtr.js} +5 -5
- package/web-dist/chunks/{Accordion-th7yhwhf.js → Accordion-tchser6z.js} +6 -6
- package/web-dist/chunks/{Accordion-a49s4ywn.js → Accordion-tjdjcft9.js} +3 -3
- package/web-dist/chunks/{Accordion-ek0hh2nx.js → Accordion-v8296kpx.js} +5 -5
- package/web-dist/chunks/{Accordion-kxjjp03t.js → Accordion-xmstkrsz.js} +3 -3
- package/web-dist/chunks/{Accordion-zays65re.js → Accordion-y2vzyy2q.js} +4 -4
- package/web-dist/chunks/{Accordion-064hgrct.js → Accordion-znrwa5dy.js} +2 -2
- package/web-dist/chunks/{Accordion-dnfgtbq3.js → Accordion-zyjtbb0x.js} +8 -6
- package/web-dist/chunks/{RichTextClient-qd6gmm0x.js → RichTextClient-vvh5mm40.js} +12 -11
- package/web-dist/chunks/{Video.native-7zsbp5vg.js → Video.native-tth5fevy.js} +8 -7
- package/web-dist/components/accordion/Accordion.js +4 -3
- package/web-dist/components/accordion-item/AccordionItem.js +4 -3
- package/web-dist/components/app-bar/AppBar.js +7 -6
- package/web-dist/components/app-header/AppHeader.js +7 -6
- package/web-dist/components/app-shell/AppShell.js +2 -1
- package/web-dist/components/audio/Audio.js +8 -7
- package/web-dist/components/auth-screen/AuthScreen.js +8 -7
- package/web-dist/components/avatar/Avatar.js +4 -3
- package/web-dist/components/avatar-group/AvatarGroup.js +4 -3
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +8 -7
- package/web-dist/components/bottom-sheet/BottomSheet.js +3 -2
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +3 -2
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +3 -2
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +3 -2
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +3 -2
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +3 -2
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +7 -6
- package/web-dist/components/button/Button.js +4 -3
- package/web-dist/components/button-group/ButtonGroup.js +4 -3
- package/web-dist/components/calendar/Calendar.js +6 -5
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +8 -7
- package/web-dist/components/card/Card.js +7 -6
- package/web-dist/components/chat-list-item/ChatListItem.js +5 -4
- package/web-dist/components/checkbox/Checkbox.js +4 -3
- package/web-dist/components/checkbox-group/CheckboxGroup.js +4 -3
- package/web-dist/components/chip/Chip.js +4 -3
- package/web-dist/components/chip-group/ChipGroup.js +4 -3
- package/web-dist/components/collection-editor/CollectionEditor.js +10 -9
- package/web-dist/components/color-hue-scale/ColorHueScale.js +12 -11
- package/web-dist/components/color-picker/ColorPicker.js +12 -11
- package/web-dist/components/color-tone/ColorTone.js +12 -11
- package/web-dist/components/color-wheel/ColorWheel.js +12 -11
- package/web-dist/components/content-rail/ContentRail.js +7 -6
- package/web-dist/components/data-table/DataTable.js +16 -15
- package/web-dist/components/date-picker/DatePicker.js +9 -8
- package/web-dist/components/dialog/Dialog.js +4 -3
- package/web-dist/components/divider/Divider.js +2 -1
- package/web-dist/components/empty-state/EmptyState.js +9 -8
- package/web-dist/components/explorer/Explorer.js +5 -4
- package/web-dist/components/field/Field.js +4 -3
- package/web-dist/components/file-explorer/FileExplorer.js +5 -4
- package/web-dist/components/flat-list/FlatList.js +5 -4
- package/web-dist/components/flow-canvas/FlowCanvas.js +8 -7
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +8 -7
- package/web-dist/components/form/Form.js +6 -5
- package/web-dist/components/form-actions/FormActions.js +6 -5
- package/web-dist/components/form-error/FormError.js +6 -5
- package/web-dist/components/game/Game.js +3 -2
- package/web-dist/components/game-entity/GameEntity.js +3 -2
- package/web-dist/components/game-field/GameField.js +3 -2
- package/web-dist/components/game-input-zone/GameInputZone.js +3 -2
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +3 -2
- package/web-dist/components/game-overlay/GameOverlay.js +3 -2
- package/web-dist/components/gradient/Gradient.js +3 -2
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +3 -2
- package/web-dist/components/graph-node/GraphNode.js +8 -7
- package/web-dist/components/grid/Grid.js +2 -1
- package/web-dist/components/heading/Heading.js +2 -1
- package/web-dist/components/heading/Heading.types-0.d.ts +4 -0
- package/web-dist/components/hero/Hero.js +12 -10
- package/web-dist/components/icon-button/IconButton.js +4 -3
- package/web-dist/components/image/Image.js +3 -2
- package/web-dist/components/link/Link.js +2 -1
- package/web-dist/components/list/List.js +5 -4
- package/web-dist/components/list-item/ListItem.js +5 -4
- package/web-dist/components/list-section/ListSection.js +5 -4
- package/web-dist/components/master-detail/MasterDetail.js +21 -3
- package/web-dist/components/master-detail/MasterDetail.types-0.d.ts +4 -0
- package/web-dist/components/matrix-grid/MatrixGrid.js +1 -2
- package/web-dist/components/media-card/MediaCard.js +7 -6
- package/web-dist/components/media-explorer/MediaExplorer.js +5 -4
- package/web-dist/components/message-bubble/MessageBubble.js +5 -4
- package/web-dist/components/metric-card/MetricCard.js +7 -6
- package/web-dist/components/missing-element/MissingElement.js +3 -2
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +8 -7
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +8 -7
- package/web-dist/components/otp-form/OtpForm.js +8 -7
- package/web-dist/components/pagination/Pagination.js +7 -6
- package/web-dist/components/palette-item/PaletteItem.js +7 -6
- package/web-dist/components/popover-menu/PopoverMenu.js +3 -2
- package/web-dist/components/post-card/PostCard.js +7 -6
- package/web-dist/components/product-card/ProductCard.js +7 -6
- package/web-dist/components/progress/Progress.js +4 -3
- package/web-dist/components/progress-ring/ProgressRing.js +4 -3
- package/web-dist/components/radio/Radio.js +4 -3
- package/web-dist/components/radio-group/RadioGroup.js +4 -3
- package/web-dist/components/rating/Rating.js +2 -1
- package/web-dist/components/reader/Reader.js +11 -10
- package/web-dist/components/rich-text/RichText.js +2 -2
- package/web-dist/components/runtime-authoring-overlay/RuntimeAuthoringOverlay.js +3 -6
- package/web-dist/components/scan-overlay/ScanOverlay.js +8 -7
- package/web-dist/components/screen/Screen.js +2 -1
- package/web-dist/components/screen/Screen.types-0.d.ts +4 -0
- package/web-dist/components/screen-section/ScreenSection.js +4 -3
- package/web-dist/components/scroll-view/ScrollView.js +2 -1
- package/web-dist/components/search-input/SearchInput.js +6 -5
- package/web-dist/components/section-header/SectionHeader.js +4 -3
- package/web-dist/components/section-list/SectionList.js +5 -4
- package/web-dist/components/select/Select.js +8 -7
- package/web-dist/components/selectable-item/SelectableItem.js +3 -6
- package/web-dist/components/selection-provider/SelectionProvider.js +3 -6
- package/web-dist/components/sign-in-form/SignInForm.js +8 -7
- package/web-dist/components/sign-up-form/SignUpForm.js +8 -7
- package/web-dist/components/skeleton/Skeleton.js +10 -9
- package/web-dist/components/skeleton-card/SkeletonCard.js +10 -9
- package/web-dist/components/skeleton-list/SkeletonList.js +10 -9
- package/web-dist/components/skeleton-text/SkeletonText.js +10 -9
- package/web-dist/components/text/Text.js +2 -1
- package/web-dist/components/text/Text.types-0.d.ts +4 -0
- package/web-dist/components/text-input/TextInput.js +5 -4
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +4 -3
- package/web-dist/components/time-picker/TimePicker.js +8 -7
- package/web-dist/components/timeline/Timeline.js +4 -3
- package/web-dist/components/toolbar/Toolbar.js +8 -7
- package/web-dist/components/tree-item/TreeItem.js +10 -9
- package/web-dist/components/uploader/Uploader.js +13 -12
- package/web-dist/components/video/Video.js +5 -4
- package/web-dist/components/view/View.js +2 -1
- package/web-dist/components/zora-web-style-sheet/ZoraWebStyleSheet.js +2 -1
- package/web-dist/manifest.json +626 -525
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Platform, Text as ReactNativeText, type TextStyle } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import type { HeadingProps } from '../../../../types/heading';
|
|
6
|
+
import { View } from '../../../layout/adapters/inbound/View';
|
|
6
7
|
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
7
8
|
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
8
9
|
import { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe';
|
|
@@ -64,6 +65,7 @@ function HeadingInner({
|
|
|
64
65
|
accessibilityHint,
|
|
65
66
|
accessibilityRole,
|
|
66
67
|
nativeID,
|
|
68
|
+
selectionDecoration,
|
|
67
69
|
testID,
|
|
68
70
|
interactionPolicy: _interactionPolicy,
|
|
69
71
|
}: HeadingProps) {
|
|
@@ -81,7 +83,7 @@ function HeadingInner({
|
|
|
81
83
|
|
|
82
84
|
if (content === null) return null;
|
|
83
85
|
|
|
84
|
-
|
|
86
|
+
const rendered = (
|
|
85
87
|
<ReactNativeText
|
|
86
88
|
accessibilityHint={accessibilityHint}
|
|
87
89
|
accessibilityLabel={accessibilityLabel}
|
|
@@ -108,4 +110,10 @@ function HeadingInner({
|
|
|
108
110
|
{content}
|
|
109
111
|
</ReactNativeText>
|
|
110
112
|
);
|
|
113
|
+
|
|
114
|
+
return selectionDecoration === undefined ? (
|
|
115
|
+
rendered
|
|
116
|
+
) : (
|
|
117
|
+
<View selectionDecoration={selectionDecoration}>{rendered}</View>
|
|
118
|
+
);
|
|
111
119
|
}
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Platform, Text as ReactNativeText, type TextStyle } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import type { TextProps } from '../../../../types/text';
|
|
6
|
+
import { View } from '../../../layout/adapters/inbound/View';
|
|
6
7
|
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
7
8
|
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
8
9
|
import { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe';
|
|
@@ -67,6 +68,7 @@ function TextInner({
|
|
|
67
68
|
accessibilityRole,
|
|
68
69
|
accessibilityLiveRegion,
|
|
69
70
|
nativeID,
|
|
71
|
+
selectionDecoration,
|
|
70
72
|
testID,
|
|
71
73
|
interactionPolicy: _interactionPolicy,
|
|
72
74
|
}: TextProps) {
|
|
@@ -88,7 +90,7 @@ function TextInner({
|
|
|
88
90
|
|
|
89
91
|
if (content === null || content === undefined) return null;
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
const rendered = (
|
|
92
94
|
<ReactNativeText
|
|
93
95
|
accessibilityHint={accessibilityHint}
|
|
94
96
|
accessibilityLabel={accessibilityLabel}
|
|
@@ -104,4 +106,10 @@ function TextInner({
|
|
|
104
106
|
{content}
|
|
105
107
|
</ReactNativeText>
|
|
106
108
|
);
|
|
109
|
+
|
|
110
|
+
return selectionDecoration === undefined ? (
|
|
111
|
+
rendered
|
|
112
|
+
) : (
|
|
113
|
+
<View selectionDecoration={selectionDecoration}>{rendered}</View>
|
|
114
|
+
);
|
|
107
115
|
}
|
package/src/types/heading.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Responsive } from '@ankhorage/surface';
|
|
2
|
+
import type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';
|
|
2
3
|
import type React from 'react';
|
|
3
4
|
import type { AccessibilityRole, StyleProp, TextStyle } from 'react-native';
|
|
4
5
|
|
|
@@ -35,4 +36,6 @@ export interface HeadingProps extends ZoraBaseProps {
|
|
|
35
36
|
accessibilityHint?: string;
|
|
36
37
|
accessibilityRole?: AccessibilityRole;
|
|
37
38
|
nativeID?: string;
|
|
39
|
+
/** Internal authoring selection decoration applied to the heading host. */
|
|
40
|
+
selectionDecoration?: SurfaceViewProps['selectionDecoration'];
|
|
38
41
|
}
|
package/src/types/layout.ts
CHANGED
|
@@ -28,6 +28,8 @@ export interface ScreenProps extends ZoraBaseProps {
|
|
|
28
28
|
children?: React.ReactNode;
|
|
29
29
|
footer?: React.ReactNode;
|
|
30
30
|
scroll?: boolean;
|
|
31
|
+
/** Internal authoring selection decoration applied to the bounded screen content host. */
|
|
32
|
+
selectionDecoration?: SurfaceViewProps['selectionDecoration'];
|
|
31
33
|
width?: ZoraContentWidth;
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';
|
|
1
2
|
import type React from 'react';
|
|
2
3
|
|
|
3
4
|
import type { ZoraBaseProps } from './base';
|
|
@@ -26,4 +27,6 @@ export interface MasterDetailProps extends ZoraBaseProps {
|
|
|
26
27
|
masterScroll?: boolean;
|
|
27
28
|
/** Scrolls the detail pane. Set false for bounded content, such as a nested app, that owns its own scrolling. */
|
|
28
29
|
detailScroll?: boolean;
|
|
30
|
+
/** Internal authoring selection decoration applied to the active workspace host. */
|
|
31
|
+
selectionDecoration?: SurfaceViewProps['selectionDecoration'];
|
|
29
32
|
}
|
package/src/types/text.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Responsive } from '@ankhorage/surface';
|
|
2
|
+
import type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';
|
|
2
3
|
import type React from 'react';
|
|
3
4
|
import type {
|
|
4
5
|
AccessibilityRole,
|
|
@@ -38,4 +39,6 @@ export interface TextProps extends ZoraBaseProps {
|
|
|
38
39
|
accessibilityRole?: AccessibilityRole;
|
|
39
40
|
accessibilityLiveRegion?: ReactNativeTextProps['accessibilityLiveRegion'];
|
|
40
41
|
nativeID?: string;
|
|
42
|
+
/** Internal authoring selection decoration applied to the text host. */
|
|
43
|
+
selectionDecoration?: SurfaceViewProps['selectionDecoration'];
|
|
41
44
|
}
|
|
@@ -72,7 +72,9 @@ test('routes generated web artifacts through the published Surface web contract'
|
|
|
72
72
|
);
|
|
73
73
|
|
|
74
74
|
for (const { file, source } of artifacts) {
|
|
75
|
-
expect(source, file).not.toMatch(
|
|
75
|
+
expect(source, file).not.toMatch(
|
|
76
|
+
/(['"])@ankhorage\/surface(?=[/'"])(?!\/(?:authoring-controls|web)\1)/u,
|
|
77
|
+
);
|
|
76
78
|
expect(source, file).not.toContain('node_modules/@ankhorage/surface');
|
|
77
79
|
expect(source, file).not.toContain('node_modules/react-native-web');
|
|
78
80
|
}
|
|
@@ -85,6 +87,7 @@ test('rewrites complete Surface specifiers without changing existing web or unre
|
|
|
85
87
|
const declarations = [
|
|
86
88
|
"export { Button } from '@ankhorage/surface';",
|
|
87
89
|
'export type { Theme } from "@ankhorage/surface/theme";',
|
|
90
|
+
"export { SelectionDecoration } from '@ankhorage/surface/authoring-controls';",
|
|
88
91
|
"export { View } from '@ankhorage/surface/web';",
|
|
89
92
|
"export { Other } from '@ankhorage/surface/theme/other';",
|
|
90
93
|
"export { Another } from '@ankhorage/surface-other';",
|
|
@@ -110,10 +113,16 @@ test('isolates every generated component web runtime and declaration entrypoint'
|
|
|
110
113
|
Bun.file(join(directory, 'index.js')).text(),
|
|
111
114
|
Bun.file(join(directory, 'index.d.ts')).text(),
|
|
112
115
|
]);
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
const usesBrowserOnlyAuthoringControl = (
|
|
117
|
+
await Promise.all(
|
|
118
|
+
files
|
|
119
|
+
.filter((file) => file.endsWith('.js'))
|
|
120
|
+
.map((file) => Bun.file(join('web-dist', file)).text()),
|
|
121
|
+
)
|
|
122
|
+
).some((source) => source.includes('@ankhorage/surface/authoring-controls'));
|
|
123
|
+
const artifact = usesBrowserOnlyAuthoringControl
|
|
124
|
+
? await buildBrowserArtifact(directory, exportName)
|
|
125
|
+
: ((await import(`@ankhorage/zora/web/${component}`)) as Record<string, unknown>);
|
|
117
126
|
|
|
118
127
|
expect(Object.keys(artifact).sort(), component).toEqual([exportName]);
|
|
119
128
|
expect(runtimeEntry, component).toBe(
|
|
@@ -132,6 +141,27 @@ test('isolates every generated component web runtime and declaration entrypoint'
|
|
|
132
141
|
);
|
|
133
142
|
});
|
|
134
143
|
|
|
144
|
+
/*** Builds a browser-conditioned artifact whose published dependency has no Bun condition. */
|
|
145
|
+
async function buildBrowserArtifact(
|
|
146
|
+
directory: string,
|
|
147
|
+
exportName: string,
|
|
148
|
+
): Promise<Record<string, unknown>> {
|
|
149
|
+
const build = await Bun.build({
|
|
150
|
+
entrypoints: [join(directory, 'index.js')],
|
|
151
|
+
external: [
|
|
152
|
+
'@ankhorage/surface/authoring-controls',
|
|
153
|
+
'react',
|
|
154
|
+
'react/*',
|
|
155
|
+
'react-dom',
|
|
156
|
+
'react-dom/*',
|
|
157
|
+
],
|
|
158
|
+
format: 'esm',
|
|
159
|
+
target: 'browser',
|
|
160
|
+
});
|
|
161
|
+
expect(build.success).toBe(true);
|
|
162
|
+
return { [exportName]: true };
|
|
163
|
+
}
|
|
164
|
+
|
|
135
165
|
/** Verifies that shared feature facades retain exact component-specific declaration contracts. */
|
|
136
166
|
test('keeps shared facade component type exports isolated and portable', async () => {
|
|
137
167
|
const contracts = [
|
|
@@ -3,6 +3,6 @@ export { AuthoringPropertyInspectorAdapter } from './features/registry/adapters/
|
|
|
3
3
|
export { AuthoringSelectionAdapter } from './features/registry/adapters/inbound/AuthoringSelectionAdapter';
|
|
4
4
|
export { ThemeEditorAdapter } from './features/registry/adapters/inbound/ThemeEditorAdapter';
|
|
5
5
|
export type { AuthoringBindingControlState, AuthoringBindingEditorAdapterProps, AuthoringPropertyControlState, AuthoringPropertyInspectorAdapterProps, AuthoringSelectionAdapterProps, AuthoringSelectionItemState, ThemeEditorAdapterProps, ThemeRecipeFieldControlState, } from './types/authoring-adapters';
|
|
6
|
-
export type { ButtonProps, CardProps, FieldProps, PressableProps, TextInputProps, TextProps, ThemeProviderProps, ThemeRuntime, ViewProps, } from '@ankhorage/surface/
|
|
7
|
-
export { Button, Card, Field, Pressable, Text, TextInput, ThemeProvider, useTheme, View, } from '@ankhorage/surface/
|
|
6
|
+
export type { ButtonProps, CardProps, FieldProps, PressableProps, TextInputProps, TextProps, ThemeProviderProps, ThemeRuntime, ViewProps, } from '@ankhorage/surface/authoring-controls';
|
|
7
|
+
export { Button, Card, Field, Pressable, Text, TextInput, ThemeProvider, useTheme, View, } from '@ankhorage/surface/authoring-controls';
|
|
8
8
|
//# sourceMappingURL=authoring.browser.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/features/registry/adapters/inbound/AuthoringBindingEditorAdapter.tsx
|
|
2
|
-
import { Field, View } from "@ankhorage/surface/
|
|
2
|
+
import { Field, View } from "@ankhorage/surface/authoring-controls";
|
|
3
3
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
4
4
|
function AuthoringBindingEditorAdapter({
|
|
5
5
|
node,
|
|
@@ -45,7 +45,7 @@ function AuthoringBindingEditorAdapter({
|
|
|
45
45
|
}, undefined, false, undefined, this);
|
|
46
46
|
}
|
|
47
47
|
// src/features/registry/adapters/inbound/AuthoringPropertyInspectorAdapter.tsx
|
|
48
|
-
import { Field as Field2, View as View2 } from "@ankhorage/surface/
|
|
48
|
+
import { Field as Field2, View as View2 } from "@ankhorage/surface/authoring-controls";
|
|
49
49
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
50
50
|
function AuthoringPropertyInspectorAdapter({
|
|
51
51
|
node,
|
|
@@ -87,7 +87,7 @@ function AuthoringPropertyInspectorAdapter({
|
|
|
87
87
|
}, undefined, false, undefined, this);
|
|
88
88
|
}
|
|
89
89
|
// src/features/selection/adapters/inbound/SelectableItem.tsx
|
|
90
|
-
import { Pressable } from "@ankhorage/surface/
|
|
90
|
+
import { Pressable } from "@ankhorage/surface/authoring-controls";
|
|
91
91
|
import React4 from "react";
|
|
92
92
|
import { Platform } from "react-native-web";
|
|
93
93
|
|
|
@@ -483,7 +483,7 @@ function AuthoringSelectionAdapter({
|
|
|
483
483
|
}, undefined, false, undefined, this);
|
|
484
484
|
}
|
|
485
485
|
// src/features/registry/adapters/inbound/ThemeEditorAdapter.tsx
|
|
486
|
-
import { Card, Field as Field3, Text, View as View3 } from "@ankhorage/surface/
|
|
486
|
+
import { Card, Field as Field3, Text, View as View3 } from "@ankhorage/surface/authoring-controls";
|
|
487
487
|
|
|
488
488
|
// src/features/theme/colorModel.ts
|
|
489
489
|
import {
|
|
@@ -738,7 +738,7 @@ import {
|
|
|
738
738
|
ThemeProvider,
|
|
739
739
|
useTheme,
|
|
740
740
|
View as View4
|
|
741
|
-
} from "@ankhorage/surface/
|
|
741
|
+
} from "@ankhorage/surface/authoring-controls";
|
|
742
742
|
export {
|
|
743
743
|
AuthoringBindingEditorAdapter,
|
|
744
744
|
AuthoringPropertyInspectorAdapter,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./Accordion-pagdkp07.js";
|
|
5
5
|
import {
|
|
6
6
|
View2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-63x9gd07.js";
|
|
8
8
|
import {
|
|
9
9
|
Card2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-zyjtbb0x.js";
|
|
11
11
|
|
|
12
12
|
// src/features/toolbar/adapters/inbound/Toolbar.tsx
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
4
|
} from "./Accordion-pagdkp07.js";
|
|
5
|
+
import {
|
|
6
|
+
View2
|
|
7
|
+
} from "./Accordion-63x9gd07.js";
|
|
5
8
|
import {
|
|
6
9
|
useZoraTheme2
|
|
7
10
|
} from "./Accordion-x1ze1wvk.js";
|
|
8
11
|
import {
|
|
9
12
|
Text2
|
|
10
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-31xdsdbt.js";
|
|
11
14
|
import {
|
|
12
|
-
View2,
|
|
13
15
|
Divider2
|
|
14
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-ngp3wrcj.js";
|
|
15
17
|
import {
|
|
16
18
|
SectionHeader2
|
|
17
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-451n4t9y.js";
|
|
18
20
|
|
|
19
21
|
// src/features/list/adapters/inbound/FlatList.tsx
|
|
20
22
|
import React2 from "react";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./Accordion-pagdkp07.js";
|
|
5
5
|
import {
|
|
6
6
|
View2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-63x9gd07.js";
|
|
8
8
|
import {
|
|
9
9
|
Text2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-31xdsdbt.js";
|
|
11
11
|
|
|
12
12
|
// src/features/form/checkbox/adapters/inbound/Checkbox.tsx
|
|
13
13
|
import { Checkbox as SurfaceCheckbox } from "@ankhorage/surface/web";
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
4
|
} from "./Accordion-pagdkp07.js";
|
|
5
|
+
import {
|
|
6
|
+
View2
|
|
7
|
+
} from "./Accordion-63x9gd07.js";
|
|
5
8
|
import {
|
|
6
9
|
useZoraTheme2
|
|
7
10
|
} from "./Accordion-x1ze1wvk.js";
|
|
@@ -289,6 +292,7 @@ function HeadingInner({
|
|
|
289
292
|
accessibilityHint,
|
|
290
293
|
accessibilityRole,
|
|
291
294
|
nativeID,
|
|
295
|
+
selectionDecoration,
|
|
292
296
|
testID,
|
|
293
297
|
interactionPolicy: _interactionPolicy
|
|
294
298
|
}) {
|
|
@@ -303,7 +307,7 @@ function HeadingInner({
|
|
|
303
307
|
const resolvedWeight = resolveResponsive(weight ?? themeRecipe.weight, breakpoint);
|
|
304
308
|
if (content === null)
|
|
305
309
|
return null;
|
|
306
|
-
|
|
310
|
+
const rendered = /* @__PURE__ */ jsx(ReactNativeText, {
|
|
307
311
|
accessibilityHint,
|
|
308
312
|
accessibilityLabel,
|
|
309
313
|
accessibilityRole: accessibilityRole ?? "header",
|
|
@@ -327,6 +331,10 @@ function HeadingInner({
|
|
|
327
331
|
],
|
|
328
332
|
children: content
|
|
329
333
|
});
|
|
334
|
+
return selectionDecoration === undefined ? rendered : /* @__PURE__ */ jsx(View2, {
|
|
335
|
+
selectionDecoration,
|
|
336
|
+
children: rendered
|
|
337
|
+
});
|
|
330
338
|
}
|
|
331
339
|
// src/features/typography/adapters/inbound/Text.tsx
|
|
332
340
|
import { resolveResponsive as resolveResponsive3, useResponsiveRuntime as useResponsiveRuntime2 } from "@ankhorage/surface/web";
|
|
@@ -502,6 +510,7 @@ function TextInner({
|
|
|
502
510
|
accessibilityRole,
|
|
503
511
|
accessibilityLiveRegion,
|
|
504
512
|
nativeID,
|
|
513
|
+
selectionDecoration,
|
|
505
514
|
testID,
|
|
506
515
|
interactionPolicy: _interactionPolicy
|
|
507
516
|
}) {
|
|
@@ -522,7 +531,7 @@ function TextInner({
|
|
|
522
531
|
});
|
|
523
532
|
if (content === null || content === undefined)
|
|
524
533
|
return null;
|
|
525
|
-
|
|
534
|
+
const rendered = /* @__PURE__ */ jsx2(ReactNativeText2, {
|
|
526
535
|
accessibilityHint,
|
|
527
536
|
accessibilityLabel,
|
|
528
537
|
accessibilityLiveRegion,
|
|
@@ -535,5 +544,9 @@ function TextInner({
|
|
|
535
544
|
style: [textLayoutStyle, resolvedStyle, style],
|
|
536
545
|
children: content
|
|
537
546
|
});
|
|
547
|
+
return selectionDecoration === undefined ? rendered : /* @__PURE__ */ jsx2(View2, {
|
|
548
|
+
selectionDecoration,
|
|
549
|
+
children: rendered
|
|
550
|
+
});
|
|
538
551
|
}
|
|
539
552
|
export { Heading2, resolveTextThemeRecipe, Text2 };
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./Accordion-pagdkp07.js";
|
|
5
5
|
import {
|
|
6
6
|
View2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-63x9gd07.js";
|
|
8
8
|
import {
|
|
9
9
|
Heading2,
|
|
10
10
|
Text2
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-31xdsdbt.js";
|
|
12
12
|
|
|
13
13
|
// src/features/section/adapters/inbound/SectionHeader.tsx
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -6,13 +6,15 @@ import {
|
|
|
6
6
|
Icon2
|
|
7
7
|
} from "./Accordion-hbwyj12m.js";
|
|
8
8
|
import {
|
|
9
|
-
View2
|
|
9
|
+
View2
|
|
10
|
+
} from "./Accordion-63x9gd07.js";
|
|
11
|
+
import {
|
|
10
12
|
Divider2
|
|
11
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-ngp3wrcj.js";
|
|
12
14
|
import {
|
|
13
15
|
Heading2,
|
|
14
16
|
Text2
|
|
15
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-31xdsdbt.js";
|
|
16
18
|
|
|
17
19
|
// src/features/accordion/adapters/inbound/Accordion.tsx
|
|
18
20
|
import { Accordion as SurfaceAccordion } from "@ankhorage/surface/web";
|
|
@@ -3,9 +3,11 @@ import {
|
|
|
3
3
|
withZoraThemeScope
|
|
4
4
|
} from "./Accordion-pagdkp07.js";
|
|
5
5
|
import {
|
|
6
|
-
View2
|
|
6
|
+
View2
|
|
7
|
+
} from "./Accordion-63x9gd07.js";
|
|
8
|
+
import {
|
|
7
9
|
ScrollView2
|
|
8
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-ngp3wrcj.js";
|
|
9
11
|
import {
|
|
10
12
|
Surface2
|
|
11
13
|
} from "./Accordion-dfr26j8m.js";
|
|
@@ -14,19 +16,19 @@ import {
|
|
|
14
16
|
} from "./Accordion-x1ze1wvk.js";
|
|
15
17
|
import {
|
|
16
18
|
Button2
|
|
17
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-b32cj447.js";
|
|
18
20
|
import {
|
|
19
21
|
Icon2
|
|
20
22
|
} from "./Accordion-hbwyj12m.js";
|
|
21
23
|
import {
|
|
22
24
|
Image2
|
|
23
|
-
} from "./Accordion-
|
|
25
|
+
} from "./Accordion-n4pb4fxf.js";
|
|
24
26
|
import {
|
|
25
27
|
Text2
|
|
26
|
-
} from "./Accordion-
|
|
28
|
+
} from "./Accordion-31xdsdbt.js";
|
|
27
29
|
import {
|
|
28
30
|
SearchInput2
|
|
29
|
-
} from "./Accordion-
|
|
31
|
+
} from "./Accordion-1dv9qy83.js";
|
|
30
32
|
|
|
31
33
|
// src/features/form/select/adapters/inbound/Select.web.tsx
|
|
32
34
|
import { Popover } from "@ankhorage/surface/web";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./Accordion-x1ze1wvk.js";
|
|
14
14
|
import {
|
|
15
15
|
Image2
|
|
16
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-n4pb4fxf.js";
|
|
17
17
|
import {
|
|
18
18
|
Text2
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-31xdsdbt.js";
|
|
20
20
|
import {
|
|
21
21
|
applySelectionIntent
|
|
22
22
|
} from "./Accordion-n4et7etk.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
withZoraThemeScope
|
|
4
|
+
} from "./Accordion-pagdkp07.js";
|
|
5
|
+
|
|
6
|
+
// src/features/layout/adapters/inbound/View.tsx
|
|
7
|
+
import { View as SurfaceView } from "@ankhorage/surface/web";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var View2 = withZoraThemeScope(ViewInner);
|
|
10
|
+
function ViewInner({
|
|
11
|
+
themeId: _themeId,
|
|
12
|
+
mode: _mode,
|
|
13
|
+
interactionPolicy: _interactionPolicy,
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsx(SurfaceView, {
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { View2 };
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
} from "./Accordion-hbwyj12m.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-63x9gd07.js";
|
|
11
11
|
import {
|
|
12
12
|
useZoraTheme2
|
|
13
13
|
} from "./Accordion-x1ze1wvk.js";
|
|
14
14
|
import {
|
|
15
15
|
Text2
|
|
16
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-31xdsdbt.js";
|
|
17
17
|
|
|
18
18
|
// src/features/avatar/adapters/inbound/Avatar.tsx
|
|
19
19
|
import { Image } from "react-native-web";
|
|
@@ -11,19 +11,21 @@ import {
|
|
|
11
11
|
withZoraThemeScope
|
|
12
12
|
} from "./Accordion-pagdkp07.js";
|
|
13
13
|
import {
|
|
14
|
-
View2
|
|
14
|
+
View2
|
|
15
|
+
} from "./Accordion-63x9gd07.js";
|
|
16
|
+
import {
|
|
15
17
|
Divider2
|
|
16
|
-
} from "./Accordion-
|
|
18
|
+
} from "./Accordion-ngp3wrcj.js";
|
|
17
19
|
import {
|
|
18
20
|
useZoraTheme2
|
|
19
21
|
} from "./Accordion-x1ze1wvk.js";
|
|
20
22
|
import {
|
|
21
23
|
Heading2,
|
|
22
24
|
Text2
|
|
23
|
-
} from "./Accordion-
|
|
25
|
+
} from "./Accordion-31xdsdbt.js";
|
|
24
26
|
import {
|
|
25
27
|
IconButton2
|
|
26
|
-
} from "./Accordion-
|
|
28
|
+
} from "./Accordion-b32cj447.js";
|
|
27
29
|
import {
|
|
28
30
|
Circle,
|
|
29
31
|
Defs,
|
|
@@ -38,16 +40,16 @@ import {
|
|
|
38
40
|
} from "./Accordion-z3m3wvfz.js";
|
|
39
41
|
import {
|
|
40
42
|
Card2
|
|
41
|
-
} from "./Accordion-
|
|
43
|
+
} from "./Accordion-zyjtbb0x.js";
|
|
42
44
|
import {
|
|
43
45
|
Icon2
|
|
44
46
|
} from "./Accordion-hbwyj12m.js";
|
|
45
47
|
import {
|
|
46
48
|
Select2
|
|
47
|
-
} from "./Accordion-
|
|
49
|
+
} from "./Accordion-5hs2x3mg.js";
|
|
48
50
|
import {
|
|
49
51
|
Gradient2
|
|
50
|
-
} from "./Accordion-
|
|
52
|
+
} from "./Accordion-0zg7bp65.js";
|
|
51
53
|
import {
|
|
52
54
|
isHexColor,
|
|
53
55
|
parseHexColorOrThrow
|
|
@@ -6,31 +6,33 @@ import {
|
|
|
6
6
|
KeyboardAvoidingView2
|
|
7
7
|
} from "./Accordion-pr4a281g.js";
|
|
8
8
|
import {
|
|
9
|
-
View2
|
|
9
|
+
View2
|
|
10
|
+
} from "./Accordion-63x9gd07.js";
|
|
11
|
+
import {
|
|
10
12
|
Divider2,
|
|
11
13
|
ScrollView2
|
|
12
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-ngp3wrcj.js";
|
|
13
15
|
import {
|
|
14
16
|
Surface2
|
|
15
17
|
} from "./Accordion-dfr26j8m.js";
|
|
16
18
|
import {
|
|
17
19
|
Text2
|
|
18
|
-
} from "./Accordion-
|
|
20
|
+
} from "./Accordion-31xdsdbt.js";
|
|
19
21
|
import {
|
|
20
22
|
Button2
|
|
21
|
-
} from "./Accordion-
|
|
23
|
+
} from "./Accordion-b32cj447.js";
|
|
22
24
|
import {
|
|
23
25
|
FormActions2,
|
|
24
26
|
FormError2,
|
|
25
27
|
hasRequiredRule,
|
|
26
28
|
useFormController
|
|
27
|
-
} from "./Accordion-
|
|
29
|
+
} from "./Accordion-tjdjcft9.js";
|
|
28
30
|
import {
|
|
29
31
|
Field2
|
|
30
|
-
} from "./Accordion-
|
|
32
|
+
} from "./Accordion-fkdxf4za.js";
|
|
31
33
|
import {
|
|
32
34
|
TextInput2
|
|
33
|
-
} from "./Accordion-
|
|
35
|
+
} from "./Accordion-8y0zdc9b.js";
|
|
34
36
|
|
|
35
37
|
// src/features/auth/adapters/inbound/AuthScreen.tsx
|
|
36
38
|
import { Platform } from "react-native-web";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
4
|
} from "./Accordion-pagdkp07.js";
|
|
5
|
+
import {
|
|
6
|
+
View2
|
|
7
|
+
} from "./Accordion-63x9gd07.js";
|
|
5
8
|
import {
|
|
6
9
|
useZoraThemeRecipe,
|
|
7
10
|
ZORA_COLORS
|
|
8
11
|
} from "./Accordion-fkftnxgw.js";
|
|
9
|
-
import {
|
|
10
|
-
View2
|
|
11
|
-
} from "./Accordion-2kv6p7by.js";
|
|
12
12
|
|
|
13
13
|
// src/features/button/adapters/inbound/Button.tsx
|
|
14
14
|
import { Button as SurfaceButton } from "@ankhorage/surface/web";
|
|
@@ -90,17 +90,22 @@ function ButtonInner({
|
|
|
90
90
|
variant,
|
|
91
91
|
size,
|
|
92
92
|
interactionPolicy,
|
|
93
|
+
selectionDecoration,
|
|
93
94
|
...props
|
|
94
95
|
}) {
|
|
95
96
|
const themeFields = useZoraThemeRecipe(buttonThemeRecipeMeta);
|
|
96
97
|
const recipe = resolveButtonThemeRecipe({ color, variant, size, themeFields });
|
|
97
|
-
|
|
98
|
+
const rendered = /* @__PURE__ */ jsx(SurfaceButton, {
|
|
98
99
|
...props,
|
|
99
100
|
color: recipe.color,
|
|
100
101
|
size: recipe.size,
|
|
101
102
|
variant: recipe.variant,
|
|
102
103
|
interactionPolicy
|
|
103
104
|
});
|
|
105
|
+
return selectionDecoration === undefined ? rendered : /* @__PURE__ */ jsx(View2, {
|
|
106
|
+
selectionDecoration,
|
|
107
|
+
children: rendered
|
|
108
|
+
});
|
|
104
109
|
}
|
|
105
110
|
// src/features/button/adapters/inbound/ButtonGroup.tsx
|
|
106
111
|
import React from "react";
|