@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
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# ZORA
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Provides opinionated React Native and React Native Web UI components, theme primitives, registries, and reader surfaces built on @ankhorage/surface.
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/features/button/adapters/inbound/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/features/button/adapters/inbound/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAM5D;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Button as SurfaceButton } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { View } from '../../../layout/public.js';
|
|
3
4
|
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope.js';
|
|
4
5
|
import { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe.js';
|
|
5
6
|
import { resolveButtonThemeRecipe } from '../../utils/resolveButtonThemeRecipe.js';
|
|
@@ -12,9 +13,10 @@ import { buttonThemeRecipeMeta } from '../../utils/themeRecipeMeta.js';
|
|
|
12
13
|
*
|
|
13
14
|
*/
|
|
14
15
|
export const Button = withZoraThemeScope(ButtonInner);
|
|
15
|
-
function ButtonInner({ themeId: _themeId, mode: _mode, color, variant, size, interactionPolicy, ...props }) {
|
|
16
|
+
function ButtonInner({ themeId: _themeId, mode: _mode, color, variant, size, interactionPolicy, selectionDecoration, ...props }) {
|
|
16
17
|
const themeFields = useZoraThemeRecipe(buttonThemeRecipeMeta);
|
|
17
18
|
const recipe = resolveButtonThemeRecipe({ color, variant, size, themeFields });
|
|
18
|
-
|
|
19
|
+
const rendered = (<SurfaceButton {...props} color={recipe.color} size={recipe.size} variant={recipe.variant} interactionPolicy={interactionPolicy}/>);
|
|
20
|
+
return selectionDecoration === undefined ? (rendered) : (<View selectionDecoration={selectionDecoration}>{rendered}</View>);
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../../src/features/button/adapters/inbound/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;AAEtD,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,OAAO,EACP,IAAI,EACJ,iBAAiB,EACjB,GAAG,KAAK,EACI;IACZ,MAAM,WAAW,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,wBAAwB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IAE/E,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../../src/features/button/adapters/inbound/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;AAEtD,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,OAAO,EACP,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACnB,GAAG,KAAK,EACI;IACZ,MAAM,WAAW,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,wBAAwB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IAE/E,MAAM,QAAQ,GAAG,CACf,CAAC,aAAa,CACZ,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACxB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,EACrC,CACH,CAAC;IAEF,OAAO,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,CACzC,QAAQ,CACT,CAAC,CAAC,CAAC,CACF,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAClE,CAAC;AACJ,CAAC","sourcesContent":["import { Button as SurfaceButton } from '@ankhorage/surface';\nimport React from 'react';\n\nimport type { ButtonProps } from '../../../../types/button';\nimport { View } from '../../../layout/public';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe';\nimport { resolveButtonThemeRecipe } from '../../utils/resolveButtonThemeRecipe';\nimport { buttonThemeRecipeMeta } from '../../utils/themeRecipeMeta';\n/***\n * Theme-aware action control for primary, secondary, destructive, and neutral actions.\n *\n * Use `Button` for explicit user actions that should follow ZORA's semantic color,\n * variant, and size recipes across React Native and React Native Web.\n *\n */\nexport const Button = withZoraThemeScope(ButtonInner);\n\nfunction ButtonInner({\n themeId: _themeId,\n mode: _mode,\n color,\n variant,\n size,\n interactionPolicy,\n selectionDecoration,\n ...props\n}: ButtonProps) {\n const themeFields = useZoraThemeRecipe(buttonThemeRecipeMeta);\n const recipe = resolveButtonThemeRecipe({ color, variant, size, themeFields });\n\n const rendered = (\n <SurfaceButton\n {...props}\n color={recipe.color}\n size={recipe.size}\n variant={recipe.variant}\n interactionPolicy={interactionPolicy}\n />\n );\n\n return selectionDecoration === undefined ? (\n rendered\n ) : (\n <View selectionDecoration={selectionDecoration}>{rendered}</View>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAmD5D,mFAAmF;AACnF,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThem
|
|
|
3
3
|
import { resolvePageMaxWidth } from '../../utils/resolvePageMaxWidth.js';
|
|
4
4
|
import { ScrollView } from './ScrollView.js';
|
|
5
5
|
import { View } from './View.js';
|
|
6
|
-
function ScreenInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, children, footer, scroll = true, width = 'default', testID, }) {
|
|
7
|
-
const content = (<View alignSelf="center" flex={scroll ? undefined : 1} gap="l" maxWidth={resolvePageMaxWidth(width)} minHeight={scroll ? undefined : 0} minWidth={scroll ? undefined : 0} px={{ base: 16, md: 24, lg: 32 }} py="xl" testID={testID} width="100%">
|
|
6
|
+
function ScreenInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, children, footer, scroll = true, selectionDecoration, width = 'default', testID, }) {
|
|
7
|
+
const content = (<View alignSelf="center" flex={scroll ? undefined : 1} gap="l" maxWidth={resolvePageMaxWidth(width)} minHeight={scroll ? undefined : 0} minWidth={scroll ? undefined : 0} px={{ base: 16, md: 24, lg: 32 }} py="xl" selectionDecoration={selectionDecoration} testID={testID} width="100%">
|
|
8
8
|
{children}
|
|
9
9
|
{footer}
|
|
10
10
|
</View>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.js","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,QAAQ,EACR,MAAM,EACN,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,SAAS,EACjB,MAAM,GACM;IACZ,MAAM,OAAO,GAAG,CACd,CAAC,IAAI,CACH,SAAS,CAAC,QAAQ,CAClB,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAC7B,GAAG,CAAC,GAAG,CACP,QAAQ,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACrC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAClC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CACjC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CACjC,EAAE,CAAC,IAAI,CACP,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,MAAM,CAEZ;MAAA,CAAC,QAAQ,CACT;MAAA,CAAC,MAAM,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;IAEF,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACvD;QAAA,CAAC,OAAO,CACV;MAAA,EAAE,IAAI,CAAC,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,UAAU,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAC7D;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type { ScreenProps } from '../../../../types/layout';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { resolvePageMaxWidth } from '../../utils/resolvePageMaxWidth';\nimport { ScrollView } from './ScrollView';\nimport { View } from './View';\n\nfunction ScreenInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n children,\n footer,\n scroll = true,\n width = 'default',\n testID,\n}: ScreenProps) {\n const content = (\n <View\n alignSelf=\"center\"\n flex={scroll ? undefined : 1}\n gap=\"l\"\n maxWidth={resolvePageMaxWidth(width)}\n minHeight={scroll ? undefined : 0}\n minWidth={scroll ? undefined : 0}\n px={{ base: 16, md: 24, lg: 32 }}\n py=\"xl\"\n testID={testID}\n width=\"100%\"\n >\n {children}\n {footer}\n </View>\n );\n\n if (!scroll) {\n return (\n <View bg=\"background\" flex={1} minHeight={0} minWidth={0}>\n {content}\n </View>\n );\n }\n\n return (\n <ScrollView bg=\"background\" flex={1} minHeight={0} minWidth={0}>\n {content}\n </ScrollView>\n );\n}\n\n/*** Screen content boundary with independent width policy and scroll ownership. */\nexport const Screen = withZoraThemeScope(ScreenInner);\n"]}
|
|
1
|
+
{"version":3,"file":"Screen.js","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,QAAQ,EACR,MAAM,EACN,MAAM,GAAG,IAAI,EACb,mBAAmB,EACnB,KAAK,GAAG,SAAS,EACjB,MAAM,GACM;IACZ,MAAM,OAAO,GA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MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type { ScreenProps } from '../../../../types/layout';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { resolvePageMaxWidth } from '../../utils/resolvePageMaxWidth';\nimport { ScrollView } from './ScrollView';\nimport { View } from './View';\n\nfunction ScreenInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n children,\n footer,\n scroll = true,\n selectionDecoration,\n width = 'default',\n testID,\n}: ScreenProps) {\n const content = (\n <View\n alignSelf=\"center\"\n flex={scroll ? undefined : 1}\n gap=\"l\"\n maxWidth={resolvePageMaxWidth(width)}\n minHeight={scroll ? undefined : 0}\n minWidth={scroll ? undefined : 0}\n px={{ base: 16, md: 24, lg: 32 }}\n py=\"xl\"\n selectionDecoration={selectionDecoration}\n testID={testID}\n width=\"100%\"\n >\n {children}\n {footer}\n </View>\n );\n\n if (!scroll) {\n return (\n <View bg=\"background\" flex={1} minHeight={0} minWidth={0}>\n {content}\n </View>\n );\n }\n\n return (\n <ScrollView bg=\"background\" flex={1} minHeight={0} minWidth={0}>\n {content}\n </ScrollView>\n );\n}\n\n/*** Screen content boundary with independent width policy and scroll ownership. */\nexport const Screen = withZoraThemeScope(ScreenInner);\n"]}
|
|
@@ -6,16 +6,17 @@ import { resolveMasterDetailPresentation } from '../../application/resolveMaster
|
|
|
6
6
|
/** Renders responsive master and detail panes while leaving route transitions to the host. */
|
|
7
7
|
export const MasterDetail = withZoraThemeScope(MasterDetailInner);
|
|
8
8
|
/*** Projects the first two children into a desktop split or one compact route pane. */
|
|
9
|
-
function MasterDetailInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, activePane = 'master', desktopMode = 'split', children, masterWidth = 30, masterScroll = true, detailScroll = true, testID, }) {
|
|
9
|
+
function MasterDetailInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, activePane = 'master', desktopMode = 'split', children, masterWidth = 30, masterScroll = true, selectionDecoration, detailScroll = true, testID, }) {
|
|
10
10
|
const presentation = resolveMasterDetailPresentation(useBreakpoint(), activePane, desktopMode);
|
|
11
11
|
const [master, detail] = React.Children.toArray(children);
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const paneSelectionDecoration = presentation === 'split' ? undefined : selectionDecoration;
|
|
13
|
+
const masterPane = (<MasterPane master={master} scroll={masterScroll} selectionDecoration={paneSelectionDecoration} testID={testID}/>);
|
|
14
|
+
const detailPane = (<DetailPane detail={detail} scroll={detailScroll} selectionDecoration={paneSelectionDecoration} testID={testID}/>);
|
|
14
15
|
if (presentation === 'master')
|
|
15
16
|
return masterPane;
|
|
16
17
|
if (presentation === 'detail')
|
|
17
18
|
return detailPane;
|
|
18
|
-
return (<View direction="row" flex={1} minHeight={0} minWidth={0} testID={testID}>
|
|
19
|
+
return (<View direction="row" flex={1} minHeight={0} minWidth={0} selectionDecoration={selectionDecoration} testID={testID}>
|
|
19
20
|
<View flex={masterWidth} minHeight={0} minWidth={0}>
|
|
20
21
|
{masterPane}
|
|
21
22
|
</View>
|
|
@@ -25,26 +26,28 @@ function MasterDetailInner({ themeId: _themeId, mode: _mode, interactionPolicy:
|
|
|
25
26
|
</View>);
|
|
26
27
|
}
|
|
27
28
|
/*** Provides the independently bounded master pane, scrolling unless the host owns its scrolling. */
|
|
28
|
-
function MasterPane({ master, scroll, testID, }) {
|
|
29
|
-
return (<PaneRegion scroll={scroll} testID={testID ? `${testID}-master` : undefined}>
|
|
29
|
+
function MasterPane({ master, scroll, selectionDecoration, testID, }) {
|
|
30
|
+
return (<PaneRegion scroll={scroll} selectionDecoration={selectionDecoration} testID={testID ? `${testID}-master` : undefined}>
|
|
30
31
|
{master}
|
|
31
32
|
</PaneRegion>);
|
|
32
33
|
}
|
|
33
34
|
/*** Provides the independently bounded detail pane, scrolling unless the host owns its scrolling. */
|
|
34
|
-
function DetailPane({ detail, scroll, testID, }) {
|
|
35
|
-
return (<PaneRegion scroll={scroll} testID={testID ? `${testID}-detail` : undefined}>
|
|
35
|
+
function DetailPane({ detail, scroll, selectionDecoration, testID, }) {
|
|
36
|
+
return (<PaneRegion scroll={scroll} selectionDecoration={selectionDecoration} testID={testID ? `${testID}-detail` : undefined}>
|
|
36
37
|
{detail}
|
|
37
38
|
</PaneRegion>);
|
|
38
39
|
}
|
|
39
40
|
/*** Fills the available area with a scroll region, or a bounded flex container when not scrolling. */
|
|
40
|
-
function PaneRegion({ children, scroll, testID, }) {
|
|
41
|
+
function PaneRegion({ children, scroll, selectionDecoration, testID, }) {
|
|
41
42
|
if (!scroll) {
|
|
42
|
-
return (<View flex={1} minHeight={0} minWidth={0} testID={testID}>
|
|
43
|
+
return (<View flex={1} minHeight={0} minWidth={0} selectionDecoration={selectionDecoration} testID={testID}>
|
|
43
44
|
{children}
|
|
44
45
|
</View>);
|
|
45
46
|
}
|
|
46
47
|
return (<ScrollView flex={1} minHeight={0} minWidth={0} testID={testID}>
|
|
47
|
-
{
|
|
48
|
+
<View minHeight={0} minWidth={0} selectionDecoration={selectionDecoration}>
|
|
49
|
+
{children}
|
|
50
|
+
</View>
|
|
48
51
|
</ScrollView>);
|
|
49
52
|
}
|
|
50
53
|
//# sourceMappingURL=MasterDetail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasterDetail.js","sourceRoot":"","sources":["../../../../../src/features/master-detail/adapters/inbound/MasterDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AAEpG,8FAA8F;AAC9F,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;AAElE,uFAAuF;AACvF,SAAS,iBAAiB,CAAC,EACzB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,UAAU,GAAG,QAAQ,EACrB,WAAW,GAAG,OAAO,EACrB,QAAQ,EACR,WAAW,GAAG,EAAE,EAChB,YAAY,GAAG,IAAI,EACnB,YAAY,GAAG,IAAI,EACnB,MAAM,GACY;IAClB,MAAM,YAAY,GAAG,+BAA+B,CAAC,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IAC/F,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1D,MAAM,
|
|
1
|
+
{"version":3,"file":"MasterDetail.js","sourceRoot":"","sources":["../../../../../src/features/master-detail/adapters/inbound/MasterDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AAEpG,8FAA8F;AAC9F,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;AAElE,uFAAuF;AACvF,SAAS,iBAAiB,CAAC,EACzB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,UAAU,GAAG,QAAQ,EACrB,WAAW,GAAG,OAAO,EACrB,QAAQ,EACR,WAAW,GAAG,EAAE,EAChB,YAAY,GAAG,IAAI,EACnB,mBAAmB,EACnB,YAAY,GAAG,I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AAQ,CAAC,CAAC,CAAC,CAAC,CACZ,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CAAC,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC7D;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACxE;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { useBreakpoint } from '@ankhorage/surface';\nimport React from 'react';\n\nimport type { MasterDetailProps } from '../../../../types/master-detail';\nimport { ScrollView, View } from '../../../layout/public';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { resolveMasterDetailPresentation } from '../../application/resolveMasterDetailPresentation';\n\n/** Renders responsive master and detail panes while leaving route transitions to the host. */\nexport const MasterDetail = withZoraThemeScope(MasterDetailInner);\n\n/*** Projects the first two children into a desktop split or one compact route pane. */\nfunction MasterDetailInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n activePane = 'master',\n desktopMode = 'split',\n children,\n masterWidth = 30,\n masterScroll = true,\n selectionDecoration,\n detailScroll = true,\n testID,\n}: MasterDetailProps) {\n const presentation = resolveMasterDetailPresentation(useBreakpoint(), activePane, desktopMode);\n const [master, detail] = React.Children.toArray(children);\n const paneSelectionDecoration = presentation === 'split' ? undefined : selectionDecoration;\n const masterPane = (\n <MasterPane\n master={master}\n scroll={masterScroll}\n selectionDecoration={paneSelectionDecoration}\n testID={testID}\n />\n );\n const detailPane = (\n <DetailPane\n detail={detail}\n scroll={detailScroll}\n selectionDecoration={paneSelectionDecoration}\n testID={testID}\n />\n );\n\n if (presentation === 'master') return masterPane;\n if (presentation === 'detail') return detailPane;\n\n return (\n <View\n direction=\"row\"\n flex={1}\n minHeight={0}\n minWidth={0}\n selectionDecoration={selectionDecoration}\n testID={testID}\n >\n <View flex={masterWidth} minHeight={0} minWidth={0}>\n {masterPane}\n </View>\n <View flex={100 - masterWidth} minHeight={0} minWidth={0}>\n {detailPane}\n </View>\n </View>\n );\n}\n\n/*** Provides the independently bounded master pane, scrolling unless the host owns its scrolling. */\nfunction MasterPane({\n master,\n scroll,\n selectionDecoration,\n testID,\n}: Pick<MasterDetailProps, 'selectionDecoration' | 'testID'> & {\n master?: React.ReactNode;\n scroll: boolean;\n}) {\n return (\n <PaneRegion\n scroll={scroll}\n selectionDecoration={selectionDecoration}\n testID={testID ? `${testID}-master` : undefined}\n >\n {master}\n </PaneRegion>\n );\n}\n\n/*** Provides the independently bounded detail pane, scrolling unless the host owns its scrolling. */\nfunction DetailPane({\n detail,\n scroll,\n selectionDecoration,\n testID,\n}: Pick<MasterDetailProps, 'selectionDecoration' | 'testID'> & {\n detail?: React.ReactNode;\n scroll: boolean;\n}) {\n return (\n <PaneRegion\n scroll={scroll}\n selectionDecoration={selectionDecoration}\n testID={testID ? `${testID}-detail` : undefined}\n >\n {detail}\n </PaneRegion>\n );\n}\n\n/*** Fills the available area with a scroll region, or a bounded flex container when not scrolling. */\nfunction PaneRegion({\n children,\n scroll,\n selectionDecoration,\n testID,\n}: React.PropsWithChildren<{\n scroll: boolean;\n selectionDecoration?: MasterDetailProps['selectionDecoration'];\n testID?: string;\n}>) {\n if (!scroll) {\n return (\n <View\n flex={1}\n minHeight={0}\n minWidth={0}\n selectionDecoration={selectionDecoration}\n testID={testID}\n >\n {children}\n </View>\n );\n }\n\n return (\n <ScrollView flex={1} minHeight={0} minWidth={0} testID={testID}>\n <View minHeight={0} minWidth={0} selectionDecoration={selectionDecoration}>\n {children}\n </View>\n </ScrollView>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeAuthoringOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/features/selection/adapters/inbound/RuntimeAuthoringOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAE/B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"RuntimeAuthoringOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/features/selection/adapters/inbound/RuntimeAuthoringOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAE/B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,2CAA2C,EAC3C,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AAGrC,uHAAuH;AACvH,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,GACpB,EAAE,4BAA4B,qBAW9B;AAED,6FAA6F;AAC7F,wBAAgB,oCAAoC,CAAC,EACnD,IAAI,GACL,EAAE,2CAA2C,GAAG,8BAA8B,CAO9E"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SelectionDecoration } from '@ankhorage/surface/authoring-controls';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { View } from '../../../layout/public.js';
|
|
4
|
-
import { useZoraTheme } from '../../../theme/composition/useZoraTheme.js';
|
|
5
3
|
import { SelectionProvider, useSelection } from './SelectionProvider.js';
|
|
6
4
|
/*** Provides controlled, single-node selection to Runtime-rendered content without creating a second renderer tree. */
|
|
7
5
|
export function RuntimeAuthoringOverlay({ children, mode, onSelectionChange, selectedComponentId, }) {
|
|
@@ -18,9 +16,8 @@ export function createRuntimeAuthoringOverlayAdapter({ mode, }) {
|
|
|
18
16
|
wrapNode: (args) => <RuntimeAuthoringOverlayNode {...args} mode={mode}/>,
|
|
19
17
|
};
|
|
20
18
|
}
|
|
21
|
-
/***
|
|
19
|
+
/*** Attaches selection directly to the rendered node's ZORA-owned host boundary without a layout wrapper. */
|
|
22
20
|
function RuntimeAuthoringOverlayNode({ component, mode, rendered, select, }) {
|
|
23
|
-
const { theme } = useZoraTheme();
|
|
24
21
|
const selection = useSelection();
|
|
25
22
|
const selected = selection.isSelected(component.componentId);
|
|
26
23
|
const handlePress = (event) => {
|
|
@@ -28,19 +25,11 @@ function RuntimeAuthoringOverlayNode({ component, mode, rendered, select, }) {
|
|
|
28
25
|
return;
|
|
29
26
|
selection.select(component.componentId);
|
|
30
27
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
if (!React.isValidElement(rendered))
|
|
29
|
+
return rendered;
|
|
30
|
+
const target = rendered;
|
|
31
|
+
return (<SelectionDecoration interactionPolicy={mode === 'edit' ? 'enabled' : 'passive'} onPress={handlePress} selected={selected}>
|
|
32
|
+
{target}
|
|
33
|
+
</SelectionDecoration>);
|
|
35
34
|
}
|
|
36
|
-
const styles = {
|
|
37
|
-
highlight: {
|
|
38
|
-
bottom: 0,
|
|
39
|
-
left: 0,
|
|
40
|
-
position: 'absolute',
|
|
41
|
-
right: 0,
|
|
42
|
-
top: 0,
|
|
43
|
-
},
|
|
44
|
-
wrapper: { position: 'relative' },
|
|
45
|
-
};
|
|
46
35
|
//# sourceMappingURL=RuntimeAuthoringOverlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeAuthoringOverlay.js","sourceRoot":"","sources":["../../../../../src/features/selection/adapters/inbound/RuntimeAuthoringOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RuntimeAuthoringOverlay.js","sourceRoot":"","sources":["../../../../../src/features/selection/adapters/inbound/RuntimeA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G,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC7D,MAAM,WAAW,GAAG,CAAC,KAAc,EAAE,EAAE;QACrC,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE,OAAO;QAC9C,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IACrD,MAAM,MAAM,GAAG,QAA6E,CAAC;IAE7F,OAAO,CACL,CAAC,mBAAmB,CAClB,iBAAiB,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAC3D,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAEnB;MAAA,CAAC,MAAM,CACT;IAAA,EAAE,mBAAmB,CAAC,CACvB,CAAC;AACJ,CAAC","sourcesContent":["import type {\n RuntimeAuthoringOverlayAdapter,\n RuntimeAuthoringOverlayNodeArgs,\n} from '@ankhorage/runtime';\nimport type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';\nimport { SelectionDecoration } from '@ankhorage/surface/authoring-controls';\nimport React from 'react';\n\nimport type {\n CreateRuntimeAuthoringOverlayAdapterOptions,\n RuntimeAuthoringOverlayProps,\n} from '../../../../types/selection';\nimport { SelectionProvider, useSelection } from './SelectionProvider';\n\n/*** Provides controlled, single-node selection to Runtime-rendered content without creating a second renderer tree. */\nexport function RuntimeAuthoringOverlay({\n children,\n mode,\n onSelectionChange,\n selectedComponentId,\n}: RuntimeAuthoringOverlayProps) {\n return (\n <SelectionProvider\n disabled={mode === 'preview'}\n mode=\"single\"\n onSelectionChange={(ids) => onSelectionChange?.(ids[0])}\n selectedIds={selectedComponentId === undefined ? [] : [selectedComponentId]}\n >\n {children}\n </SelectionProvider>\n );\n}\n\n/*** Creates ZORA's visual and input adapter for Runtime's generic authoring-overlay hook. */\nexport function createRuntimeAuthoringOverlayAdapter({\n mode,\n}: CreateRuntimeAuthoringOverlayAdapterOptions): RuntimeAuthoringOverlayAdapter {\n return {\n mode,\n getComponentId: (node) => node.id,\n hitTest: () => mode === 'edit',\n wrapNode: (args) => <RuntimeAuthoringOverlayNode {...args} mode={mode} />,\n };\n}\n\n/*** Attaches selection directly to the rendered node's ZORA-owned host boundary without a layout wrapper. */\nfunction RuntimeAuthoringOverlayNode({\n component,\n mode,\n rendered,\n select,\n}: RuntimeAuthoringOverlayNodeArgs & { readonly mode: 'edit' | 'preview' }) {\n const selection = useSelection();\n const selected = selection.isSelected(component.componentId);\n const handlePress = (event: unknown) => {\n if (mode !== 'edit' || !select(event)) return;\n selection.select(component.componentId);\n };\n\n if (!React.isValidElement(rendered)) return rendered;\n const target = rendered as React.ReactElement<Pick<SurfaceViewProps, 'selectionDecoration'>>;\n\n return (\n <SelectionDecoration\n interactionPolicy={mode === 'edit' ? 'enabled' : 'passive'}\n onPress={handlePress}\n selected={selected}\n >\n {target}\n </SelectionDecoration>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAS9D;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Platform, Text as ReactNativeText } from 'react-native';
|
|
4
|
+
import { View } from '../../../layout/adapters/inbound/View.js';
|
|
4
5
|
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope.js';
|
|
5
6
|
import { useZoraTheme } from '../../../theme/composition/useZoraTheme.js';
|
|
6
7
|
import { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe.js';
|
|
@@ -37,7 +38,7 @@ function resolveHeadingContent({ children, text, i18nKey, }) {
|
|
|
37
38
|
return null;
|
|
38
39
|
return i18nKey;
|
|
39
40
|
}
|
|
40
|
-
function HeadingInner({ themeId: _themeId, mode: _mode, children, text, i18nKey, level = 2, size, color, emphasis, align, weight, italic, numberOfLines, ellipsizeMode, selectable, style, accessibilityLabel, accessibilityHint, accessibilityRole, nativeID, testID, interactionPolicy: _interactionPolicy, }) {
|
|
41
|
+
function HeadingInner({ themeId: _themeId, mode: _mode, children, text, i18nKey, level = 2, size, color, emphasis, align, weight, italic, numberOfLines, ellipsizeMode, selectable, style, accessibilityLabel, accessibilityHint, accessibilityRole, nativeID, selectionDecoration, testID, interactionPolicy: _interactionPolicy, }) {
|
|
41
42
|
const { theme } = useZoraTheme();
|
|
42
43
|
const { breakpoint } = useResponsiveRuntime();
|
|
43
44
|
const themeRecipe = resolveHeadingThemeRecipe(useZoraThemeRecipe(headingThemeRecipeMeta));
|
|
@@ -49,7 +50,7 @@ function HeadingInner({ themeId: _themeId, mode: _mode, children, text, i18nKey,
|
|
|
49
50
|
const resolvedWeight = resolveResponsive(weight ?? themeRecipe.weight, breakpoint);
|
|
50
51
|
if (content === null)
|
|
51
52
|
return null;
|
|
52
|
-
|
|
53
|
+
const rendered = (<ReactNativeText accessibilityHint={accessibilityHint} accessibilityLabel={accessibilityLabel} accessibilityRole={accessibilityRole ?? 'header'} ellipsizeMode={ellipsizeMode} nativeID={nativeID} numberOfLines={numberOfLines} selectable={selectable} testID={testID} style={[
|
|
53
54
|
headingLayoutStyle,
|
|
54
55
|
resolveHeadingRecipe(theme, {
|
|
55
56
|
align: resolvedAlign,
|
|
@@ -64,5 +65,6 @@ function HeadingInner({ themeId: _themeId, mode: _mode, children, text, i18nKey,
|
|
|
64
65
|
]}>
|
|
65
66
|
{content}
|
|
66
67
|
</ReactNativeText>);
|
|
68
|
+
return selectionDecoration === undefined ? (rendered) : (<View selectionDecoration={selectionDecoration}>{rendered}</View>);
|
|
67
69
|
}
|
|
68
70
|
//# sourceMappingURL=Heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,eAAe,EAAkB,MAAM,cAAc,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAExD,MAAM,kBAAkB,GAAc;IACpC,UAAU,EAAE,CAAC;IACb,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,CAAC;I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AC,CAEF;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;IAEF,OAAO,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,CACzC,QAAQ,CACT,CAAC,CAAC,CAAC,CACF,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAClE,CAAC;AACJ,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Platform, Text as ReactNativeText, type TextStyle } from 'react-native';\n\nimport type { HeadingProps } from '../../../../types/heading';\nimport { View } from '../../../layout/adapters/inbound/View';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe';\nimport { headingThemeRecipeMeta } from '../../utils/headingThemeRecipeMeta';\nimport { resolveHeadingRecipe } from '../../utils/resolveHeadingRecipe';\nimport { resolveHeadingSizeFromLevel } from '../../utils/resolveHeadingSizeFromLevel';\nimport { resolveHeadingThemeRecipe } from '../../utils/resolveHeadingThemeRecipe';\n/***\n * Structured title primitive for accessible page, section, and card headings.\n *\n * `Heading` gives consumers a ZORA-owned title API with semantic levels,\n * responsive sizes, and theme-aware emphasis while preserving header semantics.\n *\n */\nexport const Heading = withZoraThemeScope(HeadingInner);\n\nconst headingLayoutStyle: TextStyle = {\n flexShrink: 1,\n maxWidth: '100%',\n minWidth: 0,\n ...(Platform.OS === 'web'\n ? {\n overflowWrap: 'break-word',\n whiteSpace: 'normal',\n wordBreak: 'normal',\n }\n : null),\n};\n\nfunction resolveHeadingContent({\n children,\n text,\n i18nKey,\n}: Pick<HeadingProps, 'children' | 'text' | 'i18nKey'>) {\n if (children !== undefined) return children;\n if (text !== undefined) return text;\n if (i18nKey === undefined || i18nKey === '') return null;\n return i18nKey;\n}\n\nfunction HeadingInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n level = 2,\n size,\n color,\n emphasis,\n align,\n weight,\n italic,\n numberOfLines,\n ellipsizeMode,\n selectable,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole,\n nativeID,\n selectionDecoration,\n testID,\n interactionPolicy: _interactionPolicy,\n}: HeadingProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const themeRecipe = resolveHeadingThemeRecipe(useZoraThemeRecipe(headingThemeRecipeMeta));\n const content = resolveHeadingContent({ children, text, i18nKey });\n const resolvedSize =\n resolveResponsive(size ?? themeRecipe.size, breakpoint) ?? resolveHeadingSizeFromLevel(level);\n const resolvedColor = resolveResponsive(color ?? themeRecipe.color, breakpoint);\n const resolvedEmphasis =\n resolveResponsive(emphasis ?? themeRecipe.emphasis, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align ?? themeRecipe.align, breakpoint);\n const resolvedWeight = resolveResponsive(weight ?? themeRecipe.weight, breakpoint);\n\n if (content === null) return null;\n\n const rendered = (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole ?? 'header'}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={[\n headingLayoutStyle,\n resolveHeadingRecipe(theme, {\n align: resolvedAlign,\n italic: italic ?? themeRecipe.italic ?? false,\n level,\n size: resolvedSize,\n color: resolvedColor,\n emphasis: resolvedEmphasis,\n weight: resolvedWeight,\n }),\n style,\n ]}\n >\n {content}\n </ReactNativeText>\n );\n\n return selectionDecoration === undefined ? (\n rendered\n ) : (\n <View selectionDecoration={selectionDecoration}>{rendered}</View>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAQxD;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Platform, Text as ReactNativeText } from 'react-native';
|
|
4
|
+
import { View } from '../../../layout/adapters/inbound/View.js';
|
|
4
5
|
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope.js';
|
|
5
6
|
import { useZoraTheme } from '../../../theme/composition/useZoraTheme.js';
|
|
6
7
|
import { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe.js';
|
|
@@ -36,7 +37,7 @@ function resolveTextContent({ children, text, i18nKey, }) {
|
|
|
36
37
|
return null;
|
|
37
38
|
return i18nKey;
|
|
38
39
|
}
|
|
39
|
-
function TextInner({ themeId: _themeId, mode: _mode, children, text, i18nKey, variant, color, emphasis, align, weight, italic, numberOfLines, ellipsizeMode, selectable, style, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityLiveRegion, nativeID, testID, interactionPolicy: _interactionPolicy, }) {
|
|
40
|
+
function TextInner({ themeId: _themeId, mode: _mode, children, text, i18nKey, variant, color, emphasis, align, weight, italic, numberOfLines, ellipsizeMode, selectable, style, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityLiveRegion, nativeID, selectionDecoration, testID, interactionPolicy: _interactionPolicy, }) {
|
|
40
41
|
const { theme } = useZoraTheme();
|
|
41
42
|
const { breakpoint } = useResponsiveRuntime();
|
|
42
43
|
const themeRecipe = resolveTextThemeRecipe(useZoraThemeRecipe(textThemeRecipeMeta));
|
|
@@ -54,8 +55,9 @@ function TextInner({ themeId: _themeId, mode: _mode, children, text, i18nKey, va
|
|
|
54
55
|
});
|
|
55
56
|
if (content === null || content === undefined)
|
|
56
57
|
return null;
|
|
57
|
-
|
|
58
|
+
const rendered = (<ReactNativeText accessibilityHint={accessibilityHint} accessibilityLabel={accessibilityLabel} accessibilityLiveRegion={accessibilityLiveRegion} accessibilityRole={accessibilityRole} ellipsizeMode={ellipsizeMode} nativeID={nativeID} numberOfLines={numberOfLines} selectable={selectable} testID={testID} style={[textLayoutStyle, resolvedStyle, style]}>
|
|
58
59
|
{content}
|
|
59
60
|
</ReactNativeText>);
|
|
61
|
+
return selectionDecoration === undefined ? (rendered) : (<View selectionDecoration={selectionDecoration}>{rendered}</View>);
|
|
60
62
|
}
|
|
61
63
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,eAAe,EAAkB,MAAM,cAAc,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE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CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAClE,CAAC;AACJ,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Platform, Text as ReactNativeText, type TextStyle } from 'react-native';\n\nimport type { TextProps } from '../../../../types/text';\nimport { View } from '../../../layout/adapters/inbound/View';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe';\nimport { resolveTextStyle } from '../../utils/resolveTextStyle';\nimport { resolveTextThemeRecipe } from '../../utils/resolveTextThemeRecipe';\nimport { textThemeRecipeMeta } from '../../utils/textThemeRecipeMeta';\n/***\n * Structured copy primitive for theme-aware app text.\n *\n * `Text` owns normal body, caption, label, code, and supporting-copy variants so\n * consumers do not need to import lower-level Surface typography directly.\n *\n */\nexport const Text = withZoraThemeScope(TextInner);\n\nconst textLayoutStyle: TextStyle = {\n flexShrink: 1,\n maxWidth: '100%',\n minWidth: 0,\n ...(Platform.OS === 'web'\n ? {\n overflowWrap: 'break-word',\n whiteSpace: 'normal',\n wordBreak: 'normal',\n }\n : null),\n};\n\nfunction resolveTextContent({\n children,\n text,\n i18nKey,\n}: {\n children: TextProps['children'];\n text: TextProps['text'];\n i18nKey: TextProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) return children;\n if (text !== undefined) return text;\n if (i18nKey === undefined || i18nKey === '') return null;\n return i18nKey;\n}\n\nfunction TextInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n variant,\n color,\n emphasis,\n align,\n weight,\n italic,\n numberOfLines,\n ellipsizeMode,\n selectable,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole,\n accessibilityLiveRegion,\n nativeID,\n selectionDecoration,\n testID,\n interactionPolicy: _interactionPolicy,\n}: TextProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const themeRecipe = resolveTextThemeRecipe(useZoraThemeRecipe(textThemeRecipeMeta));\n const content = resolveTextContent({ children, text, i18nKey });\n const resolvedVariant = resolveResponsive(variant ?? themeRecipe.variant, breakpoint) ?? 'body';\n const resolvedStyle = resolveTextStyle({\n theme,\n breakpoint,\n variant: resolvedVariant,\n color: color ?? themeRecipe.color,\n emphasis: emphasis ?? themeRecipe.emphasis,\n align: align ?? themeRecipe.align,\n weight: weight ?? themeRecipe.weight,\n italic: italic ?? themeRecipe.italic ?? false,\n });\n\n if (content === null || content === undefined) return null;\n\n const rendered = (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityLiveRegion={accessibilityLiveRegion}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={[textLayoutStyle, resolvedStyle, style]}\n >\n {content}\n </ReactNativeText>\n );\n\n return selectionDecoration === undefined ? (\n rendered\n ) : (\n <View selectionDecoration={selectionDecoration}>{rendered}</View>\n );\n}\n"]}
|
package/dist/types/heading.d.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
|
import type { ZoraBaseProps } from './base.js';
|
|
@@ -28,5 +29,7 @@ export interface HeadingProps extends ZoraBaseProps {
|
|
|
28
29
|
accessibilityHint?: string;
|
|
29
30
|
accessibilityRole?: AccessibilityRole;
|
|
30
31
|
nativeID?: string;
|
|
32
|
+
/** Internal authoring selection decoration applied to the heading host. */
|
|
33
|
+
selectionDecoration?: SurfaceViewProps['select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
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../src/types/heading.ts"],"names":[],"mappings":"","sourcesContent":["import type { Responsive } from '@ankhorage/surface';\nimport type React from 'react';\nimport type { AccessibilityRole, StyleProp, TextStyle } from 'react-native';\n\nimport type { ZoraBaseProps } from './base';\nimport type { ZoraColor, ZoraEmphasis } from './theme';\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type HeadingSize = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport type HeadingColor = ZoraColor;\nexport type HeadingEmphasis = ZoraEmphasis;\n\nexport type HeadingAlign = NonNullable<TextStyle['textAlign']>;\n\nexport type HeadingWeight = 'regular' | 'medium' | 'semiBold' | 'bold';\n\nexport interface HeadingProps extends ZoraBaseProps {\n children?: React.ReactNode;\n text?: string;\n i18nKey?: string;\n level?: HeadingLevel;\n size?: Responsive<HeadingSize>;\n color?: Responsive<HeadingColor>;\n emphasis?: Responsive<HeadingEmphasis>;\n align?: Responsive<HeadingAlign>;\n weight?: Responsive<HeadingWeight>;\n italic?: boolean;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n selectable?: boolean;\n style?: StyleProp<TextStyle>;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n accessibilityRole?: AccessibilityRole;\n nativeID?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../src/types/heading.ts"],"names":[],"mappings":"","sourcesContent":["import type { Responsive } from '@ankhorage/surface';\nimport type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';\nimport type React from 'react';\nimport type { AccessibilityRole, StyleProp, TextStyle } from 'react-native';\n\nimport type { ZoraBaseProps } from './base';\nimport type { ZoraColor, ZoraEmphasis } from './theme';\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type HeadingSize = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport type HeadingColor = ZoraColor;\nexport type HeadingEmphasis = ZoraEmphasis;\n\nexport type HeadingAlign = NonNullable<TextStyle['textAlign']>;\n\nexport type HeadingWeight = 'regular' | 'medium' | 'semiBold' | 'bold';\n\nexport interface HeadingProps extends ZoraBaseProps {\n children?: React.ReactNode;\n text?: string;\n i18nKey?: string;\n level?: HeadingLevel;\n size?: Responsive<HeadingSize>;\n color?: Responsive<HeadingColor>;\n emphasis?: Responsive<HeadingEmphasis>;\n align?: Responsive<HeadingAlign>;\n weight?: Responsive<HeadingWeight>;\n italic?: boolean;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n selectable?: boolean;\n style?: StyleProp<TextStyle>;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n accessibilityRole?: AccessibilityRole;\n nativeID?: string;\n /** Internal authoring selection decoration applied to the heading host. */\n selectionDecoration?: SurfaceViewProps['selectionDecoration'];\n}\n"]}
|
package/dist/types/layout.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface ScreenProps extends ZoraBaseProps {
|
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
footer?: React.ReactNode;
|
|
22
22
|
scroll?: boolean;
|
|
23
|
+
/** Internal authoring selection decoration applied to the bounded screen content host. */
|
|
24
|
+
selectionDecoration?: SurfaceViewProps['selectionDecoration'];
|
|
23
25
|
width?: ZoraContentWidth;
|
|
24
26
|
}
|
|
25
27
|
/** Exclusive-gesture coordination between a ZORA scroll container and its descendant surfaces. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/types/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,mBAAmB,EACnC,SAAS,IAAI,gBAAgB,EAC7B,eAAe,IAAI,sBAAsB,EACzC,SAAS,IAAI,gBAAgB,EAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;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AC,qBAAqB,CAAC,CAAC;IAC9D,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,kGAAkG;AAClG,MAAM,WAAW,iBAAiB;IAChC,gGAAgG;IAChG,QAAQ,CAAC,OAAO,EAAE,MAAM,MAAM,IAAI,CAAC;IACnC,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;CACnC"}
|
package/dist/types/layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/types/layout.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DividerProps as SurfaceDividerProps,\n GridProps as SurfaceGridProps,\n ScrollViewProps as SurfaceScrollViewProps,\n ViewProps as SurfaceViewProps,\n} from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\nexport type ZoraContentWidth = 'narrow' | 'default' | 'wide';\n\nexport interface ViewProps extends ZoraBaseProps, Omit<SurfaceViewProps, 'mode' | 'themeId'> {}\nexport interface ScrollViewProps\n extends ZoraBaseProps, Omit<SurfaceScrollViewProps, 'mode' | 'testID' | 'themeId'> {}\nexport interface DividerProps\n extends ZoraBaseProps, Omit<SurfaceDividerProps, 'mode' | 'themeId'> {}\nexport interface GridProps extends ZoraBaseProps, Omit<SurfaceGridProps, 'mode' | 'themeId'> {}\n\nexport interface AppShellProps extends ZoraBaseProps {\n children?: React.ReactNode;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n overlay?: React.ReactNode;\n}\n\nexport interface ScreenProps extends ZoraBaseProps {\n children?: React.ReactNode;\n footer?: React.ReactNode;\n scroll?: boolean;\n width?: ZoraContentWidth;\n}\n\n/** Exclusive-gesture coordination between a ZORA scroll container and its descendant surfaces. */\nexport interface ScrollGestureLock {\n /** Suspends scrolling until the returned release function runs; releasing twice is harmless. */\n readonly acquire: () => () => void;\n /** Reports whether this container currently has an active descendant gesture. */\n readonly isActive?: () => boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/types/layout.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DividerProps as SurfaceDividerProps,\n GridProps as SurfaceGridProps,\n ScrollViewProps as SurfaceScrollViewProps,\n ViewProps as SurfaceViewProps,\n} from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\nexport type ZoraContentWidth = 'narrow' | 'default' | 'wide';\n\nexport interface ViewProps extends ZoraBaseProps, Omit<SurfaceViewProps, 'mode' | 'themeId'> {}\nexport interface ScrollViewProps\n extends ZoraBaseProps, Omit<SurfaceScrollViewProps, 'mode' | 'testID' | 'themeId'> {}\nexport interface DividerProps\n extends ZoraBaseProps, Omit<SurfaceDividerProps, 'mode' | 'themeId'> {}\nexport interface GridProps extends ZoraBaseProps, Omit<SurfaceGridProps, 'mode' | 'themeId'> {}\n\nexport interface AppShellProps extends ZoraBaseProps {\n children?: React.ReactNode;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n overlay?: React.ReactNode;\n}\n\nexport interface ScreenProps extends ZoraBaseProps {\n children?: React.ReactNode;\n footer?: React.ReactNode;\n scroll?: boolean;\n /** Internal authoring selection decoration applied to the bounded screen content host. */\n selectionDecoration?: SurfaceViewProps['selectionDecoration'];\n width?: ZoraContentWidth;\n}\n\n/** Exclusive-gesture coordination between a ZORA scroll container and its descendant surfaces. */\nexport interface ScrollGestureLock {\n /** Suspends scrolling until the returned release function runs; releasing twice is harmless. */\n readonly acquire: () => () => void;\n /** Reports whether this container currently has an active descendant gesture. */\n readonly isActive?: () => boolean;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';
|
|
1
2
|
import type React from 'react';
|
|
2
3
|
import type { ZoraBaseProps } from './base.js';
|
|
3
4
|
/** Identifies the compact pane selected by host-owned route state. */
|
|
@@ -21,5 +22,7 @@ export interface MasterDetailProps extends ZoraBaseProps {
|
|
|
21
22
|
masterScroll?: boolean;
|
|
22
23
|
/** Scrolls the detail pane. Set false for bounded content, such as a nested app, that owns its own scrolling. */
|
|
23
24
|
detailScroll?: boolean;
|
|
25
|
+
/** Internal authoring selection decoration applied to the active workspace host. */
|
|
26
|
+
selectionDecoration?: SurfaceViewProps['selectionDecoration'];
|
|
24
27
|
}
|
|
25
28
|
//# sourceMappingURL=master-detail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../src/types/master-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,sEAAsE;AACtE,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzD,6EAA6E;AAC7E,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzD,kEAAkE;AAClE,MAAM,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,kFAAkF;IAClF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,0FAA0F;IAC1F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iHAAiH;IACjH,YAAY,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../src/types/master-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,sEAAsE;AACtE,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzD,6EAA6E;AAC7E,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzD,kEAAkE;AAClE,MAAM,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,kFAAkF;IAClF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,0FAA0F;IAC1F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iHAAiH;IACjH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oFAAoF;IACpF,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;CAC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-detail.js","sourceRoot":"","sources":["../../src/types/master-detail.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\n/** Identifies the compact pane selected by host-owned route state. */\nexport type MasterDetailActivePane = 'master' | 'detail';\n\n/** Controls the expanded-width presentation without changing route state. */\nexport type MasterDetailDesktopMode = 'split' | 'master';\n\n/** Limits the master column to readable workspace proportions. */\nexport type MasterDetailMasterWidth = 25 | 30 | 35 | 40;\n\n/**\n * Presentation-only workspace composition. Place it as a direct child of a non-scrolling Screen\n * so its panes own bounded scrolling. The host supplies activePane from its route state; ZORA\n * never creates routes or handles back navigation.\n */\nexport interface MasterDetailProps extends ZoraBaseProps {\n /** The first child is the master pane and the second child is the detail pane. */\n children?: React.ReactNode;\n activePane?: MasterDetailActivePane;\n desktopMode?: MasterDetailDesktopMode;\n masterWidth?: MasterDetailMasterWidth;\n /** Scrolls the master pane. Set false for bounded content that owns its own scrolling. */\n masterScroll?: boolean;\n /** Scrolls the detail pane. Set false for bounded content, such as a nested app, that owns its own scrolling. */\n detailScroll?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"master-detail.js","sourceRoot":"","sources":["../../src/types/master-detail.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\n/** Identifies the compact pane selected by host-owned route state. */\nexport type MasterDetailActivePane = 'master' | 'detail';\n\n/** Controls the expanded-width presentation without changing route state. */\nexport type MasterDetailDesktopMode = 'split' | 'master';\n\n/** Limits the master column to readable workspace proportions. */\nexport type MasterDetailMasterWidth = 25 | 30 | 35 | 40;\n\n/**\n * Presentation-only workspace composition. Place it as a direct child of a non-scrolling Screen\n * so its panes own bounded scrolling. The host supplies activePane from its route state; ZORA\n * never creates routes or handles back navigation.\n */\nexport interface MasterDetailProps extends ZoraBaseProps {\n /** The first child is the master pane and the second child is the detail pane. */\n children?: React.ReactNode;\n activePane?: MasterDetailActivePane;\n desktopMode?: MasterDetailDesktopMode;\n masterWidth?: MasterDetailMasterWidth;\n /** Scrolls the master pane. Set false for bounded content that owns its own scrolling. */\n masterScroll?: boolean;\n /** Scrolls the detail pane. Set false for bounded content, such as a nested app, that owns its own scrolling. */\n detailScroll?: boolean;\n /** Internal authoring selection decoration applied to the active workspace host. */\n selectionDecoration?: SurfaceViewProps['selectionDecoration'];\n}\n"]}
|
package/dist/types/text.d.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, TextProps as ReactNativeTextProps, TextStyle } from 'react-native';
|
|
4
5
|
import type { ZoraBaseProps } from './base.js';
|
|
@@ -27,5 +28,7 @@ export interface TextProps extends ZoraBaseProps {
|
|
|
27
28
|
accessibilityRole?: AccessibilityRole;
|
|
28
29
|
accessibilityLiveRegion?: ReactNativeTextProps['accessibilityLiveRegion'];
|
|
29
30
|
nativeID?: string;
|
|
31
|
+
/** Internal authoring selection decoration applied to the text host. */
|
|
32
|
+
selectionDecoration?: SurfaceViewProps['selectionDecoration'];
|
|
30
33
|
}
|
|
31
34
|
//# sourceMappingURL=text.d.ts.map
|
package/dist/types/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/types/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,SAAS,IAAI,oBAAoB,EACjC,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnG,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC;AAClC,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;AAE5D,MAAM,WAA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C3B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,uBAAuB,CAAC,EAAE,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;CAC/D"}
|
package/dist/types/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/types/text.ts"],"names":[],"mappings":"","sourcesContent":["import type { Responsive } from '@ankhorage/surface';\nimport type React from 'react';\nimport type {\n AccessibilityRole,\n StyleProp,\n TextProps as ReactNativeTextProps,\n TextStyle,\n} from 'react-native';\n\nimport type { ZoraBaseProps } from './base';\nimport type { ZoraColor, ZoraEmphasis } from './theme';\n\nexport type TextVariant = 'body' | 'lead' | 'bodySmall' | 'caption' | 'label' | 'eyebrow' | 'code';\n\nexport type TextColor = ZoraColor;\nexport type TextEmphasis = ZoraEmphasis;\n\nexport type TextWeight = 'regular' | 'medium' | 'semiBold' | 'bold';\n\nexport type TextAlign = NonNullable<TextStyle['textAlign']>;\n\nexport interface TextProps extends ZoraBaseProps {\n children?: React.ReactNode;\n text?: string;\n i18nKey?: string;\n variant?: Responsive<TextVariant>;\n color?: Responsive<TextColor>;\n emphasis?: Responsive<TextEmphasis>;\n align?: Responsive<TextAlign>;\n weight?: Responsive<TextWeight>;\n italic?: boolean;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n selectable?: boolean;\n style?: StyleProp<TextStyle>;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n accessibilityRole?: AccessibilityRole;\n accessibilityLiveRegion?: ReactNativeTextProps['accessibilityLiveRegion'];\n nativeID?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/types/text.ts"],"names":[],"mappings":"","sourcesContent":["import type { Responsive } from '@ankhorage/surface';\nimport type { ViewProps as SurfaceViewProps } from '@ankhorage/surface';\nimport type React from 'react';\nimport type {\n AccessibilityRole,\n StyleProp,\n TextProps as ReactNativeTextProps,\n TextStyle,\n} from 'react-native';\n\nimport type { ZoraBaseProps } from './base';\nimport type { ZoraColor, ZoraEmphasis } from './theme';\n\nexport type TextVariant = 'body' | 'lead' | 'bodySmall' | 'caption' | 'label' | 'eyebrow' | 'code';\n\nexport type TextColor = ZoraColor;\nexport type TextEmphasis = ZoraEmphasis;\n\nexport type TextWeight = 'regular' | 'medium' | 'semiBold' | 'bold';\n\nexport type TextAlign = NonNullable<TextStyle['textAlign']>;\n\nexport interface TextProps extends ZoraBaseProps {\n children?: React.ReactNode;\n text?: string;\n i18nKey?: string;\n variant?: Responsive<TextVariant>;\n color?: Responsive<TextColor>;\n emphasis?: Responsive<TextEmphasis>;\n align?: Responsive<TextAlign>;\n weight?: Responsive<TextWeight>;\n italic?: boolean;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n selectable?: boolean;\n style?: StyleProp<TextStyle>;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n accessibilityRole?: AccessibilityRole;\n accessibilityLiveRegion?: ReactNativeTextProps['accessibilityLiveRegion'];\n nativeID?: string;\n /** Internal authoring selection decoration applied to the text host. */\n selectionDecoration?: SurfaceViewProps['selectionDecoration'];\n}\n"]}
|