mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
Copy react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67 (upstream software-mansion/enriched-markdown 766fc0e67) into packages/react-native-enriched-markdown, with patches/react-native-enriched-markdown+1.2.0-nightly-20261014-766fc0e67.patch applied. Nothing else changes in this commit; the package is not a workspace yet. Reproduce: npm pack react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67 tar xzf react-native-enriched-markdown-*.tgz mkdir -p t/node_modules && mv package t/node_modules/react-native-enriched-markdown (cd t && git init -q && git apply ../patches/react-native-enriched-markdown+*.patch) diff -r t/node_modules/react-native-enriched-markdown packages/react-native-enriched-markdown The diff is empty.
64 lines
2.3 KiB
JavaScript
64 lines
2.3 KiB
JavaScript
"use strict";
|
|
|
|
/**
|
|
* Default strings spoken by VoiceOver / TalkBack when the consumer does not
|
|
* provide an override. See `AccessibilityLabels` for the placeholder syntax
|
|
* and the rationale for the no-plural cardinal form.
|
|
*/
|
|
export const DEFAULT_ACCESSIBILITY_LABELS = {
|
|
list: {
|
|
bulletPoint: 'Bullet point',
|
|
nestedBulletPoint: 'Nested bullet point',
|
|
orderedItem: 'List item {n}',
|
|
nestedOrderedItem: 'Nested list item {n}'
|
|
},
|
|
blockquote: {
|
|
quote: 'Blockquote',
|
|
nestedQuote: 'Nested blockquote'
|
|
},
|
|
table: {
|
|
row: 'Row {n}: {content}'
|
|
},
|
|
math: {
|
|
equation: 'Math: {latex}'
|
|
},
|
|
rotor: {
|
|
headings: 'Headings',
|
|
links: 'Links',
|
|
images: 'Images'
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Resolves a partial `AccessibilityLabels` against `DEFAULT_ACCESSIBILITY_LABELS`,
|
|
* returning a fully-populated struct that native code can consume without any
|
|
* null checks. Override resolution is shallow per sub-group: if a consumer
|
|
* passes `{ list: { bulletPoint: 'Punkt' } }`, only that one field changes and
|
|
* the other list entries fall back to the defaults.
|
|
*/
|
|
export function resolveAccessibilityLabels(labels) {
|
|
return {
|
|
list: {
|
|
bulletPoint: labels?.list?.bulletPoint ?? DEFAULT_ACCESSIBILITY_LABELS.list.bulletPoint,
|
|
nestedBulletPoint: labels?.list?.nestedBulletPoint ?? DEFAULT_ACCESSIBILITY_LABELS.list.nestedBulletPoint,
|
|
orderedItem: labels?.list?.orderedItem ?? DEFAULT_ACCESSIBILITY_LABELS.list.orderedItem,
|
|
nestedOrderedItem: labels?.list?.nestedOrderedItem ?? DEFAULT_ACCESSIBILITY_LABELS.list.nestedOrderedItem
|
|
},
|
|
blockquote: {
|
|
quote: labels?.blockquote?.quote ?? DEFAULT_ACCESSIBILITY_LABELS.blockquote.quote,
|
|
nestedQuote: labels?.blockquote?.nestedQuote ?? DEFAULT_ACCESSIBILITY_LABELS.blockquote.nestedQuote
|
|
},
|
|
table: {
|
|
row: labels?.table?.row ?? DEFAULT_ACCESSIBILITY_LABELS.table.row
|
|
},
|
|
math: {
|
|
equation: labels?.math?.equation ?? DEFAULT_ACCESSIBILITY_LABELS.math.equation
|
|
},
|
|
rotor: {
|
|
headings: labels?.rotor?.headings ?? DEFAULT_ACCESSIBILITY_LABELS.rotor.headings,
|
|
links: labels?.rotor?.links ?? DEFAULT_ACCESSIBILITY_LABELS.rotor.links,
|
|
images: labels?.rotor?.images ?? DEFAULT_ACCESSIBILITY_LABELS.rotor.images
|
|
}
|
|
};
|
|
}
|
|
//# sourceMappingURL=accessibilityLabelDefaults.js.map
|