@molecule/app-ui-react-native 2.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/README.md +81 -10
  2. package/dist/components/Alert.d.ts.map +1 -1
  3. package/dist/components/Alert.js +2 -3
  4. package/dist/components/Button.d.ts +3 -1
  5. package/dist/components/Button.d.ts.map +1 -1
  6. package/dist/components/Button.js +35 -3
  7. package/dist/components/Skeleton.d.ts.map +1 -1
  8. package/dist/components/Skeleton.js +13 -12
  9. package/dist/components/Spinner.js +2 -2
  10. package/dist/elements/Anchor.d.ts +15 -0
  11. package/dist/elements/Anchor.d.ts.map +1 -0
  12. package/dist/elements/Anchor.js +57 -0
  13. package/dist/elements/Box.d.ts +19 -0
  14. package/dist/elements/Box.d.ts.map +1 -0
  15. package/dist/elements/Box.js +157 -0
  16. package/dist/elements/CheckField.d.ts +18 -0
  17. package/dist/elements/CheckField.d.ts.map +1 -0
  18. package/dist/elements/CheckField.js +103 -0
  19. package/dist/elements/Disclosure.d.ts +11 -0
  20. package/dist/elements/Disclosure.d.ts.map +1 -0
  21. package/dist/elements/Disclosure.js +67 -0
  22. package/dist/elements/Fieldset.d.ts +16 -0
  23. package/dist/elements/Fieldset.d.ts.map +1 -0
  24. package/dist/elements/Fieldset.js +34 -0
  25. package/dist/elements/FileField.d.ts +12 -0
  26. package/dist/elements/FileField.d.ts.map +1 -0
  27. package/dist/elements/FileField.js +111 -0
  28. package/dist/elements/FormArea.d.ts +18 -0
  29. package/dist/elements/FormArea.d.ts.map +1 -0
  30. package/dist/elements/FormArea.js +42 -0
  31. package/dist/elements/GlyphIcon.d.ts +19 -0
  32. package/dist/elements/GlyphIcon.d.ts.map +1 -0
  33. package/dist/elements/GlyphIcon.js +43 -0
  34. package/dist/elements/Image.d.ts +17 -0
  35. package/dist/elements/Image.d.ts.map +1 -0
  36. package/dist/elements/Image.js +26 -0
  37. package/dist/elements/Link.d.ts +20 -0
  38. package/dist/elements/Link.d.ts.map +1 -0
  39. package/dist/elements/Link.js +53 -0
  40. package/dist/elements/Pressable.d.ts +18 -0
  41. package/dist/elements/Pressable.d.ts.map +1 -0
  42. package/dist/elements/Pressable.js +108 -0
  43. package/dist/elements/PulseDots.d.ts +15 -0
  44. package/dist/elements/PulseDots.d.ts.map +1 -0
  45. package/dist/elements/PulseDots.js +78 -0
  46. package/dist/elements/RangeField.d.ts +11 -0
  47. package/dist/elements/RangeField.d.ts.map +1 -0
  48. package/dist/elements/RangeField.js +266 -0
  49. package/dist/elements/RichText.d.ts +23 -0
  50. package/dist/elements/RichText.d.ts.map +1 -0
  51. package/dist/elements/RichText.js +55 -0
  52. package/dist/elements/Rule.d.ts +11 -0
  53. package/dist/elements/Rule.d.ts.map +1 -0
  54. package/dist/elements/Rule.js +19 -0
  55. package/dist/elements/ScrollArea.d.ts +21 -0
  56. package/dist/elements/ScrollArea.d.ts.map +1 -0
  57. package/dist/elements/ScrollArea.js +101 -0
  58. package/dist/elements/SelectAction.d.ts +20 -0
  59. package/dist/elements/SelectAction.d.ts.map +1 -0
  60. package/dist/elements/SelectAction.js +117 -0
  61. package/dist/elements/SelectField.d.ts +11 -0
  62. package/dist/elements/SelectField.d.ts.map +1 -0
  63. package/dist/elements/SelectField.js +220 -0
  64. package/dist/elements/SelectMenu.d.ts +19 -0
  65. package/dist/elements/SelectMenu.d.ts.map +1 -0
  66. package/dist/elements/SelectMenu.js +122 -0
  67. package/dist/elements/Svg.d.ts +155 -0
  68. package/dist/elements/Svg.d.ts.map +1 -0
  69. package/dist/elements/Svg.js +535 -0
  70. package/dist/elements/TableBox.d.ts +19 -0
  71. package/dist/elements/TableBox.d.ts.map +1 -0
  72. package/dist/elements/TableBox.js +87 -0
  73. package/dist/elements/TableCell.d.ts +16 -0
  74. package/dist/elements/TableCell.d.ts.map +1 -0
  75. package/dist/elements/TableCell.js +69 -0
  76. package/dist/elements/Text.d.ts +17 -0
  77. package/dist/elements/Text.d.ts.map +1 -0
  78. package/dist/elements/Text.js +96 -0
  79. package/dist/elements/TextField.d.ts +25 -0
  80. package/dist/elements/TextField.d.ts.map +1 -0
  81. package/dist/elements/TextField.js +257 -0
  82. package/dist/elements/accessibility.d.ts +36 -0
  83. package/dist/elements/accessibility.d.ts.map +1 -0
  84. package/dist/elements/accessibility.js +244 -0
  85. package/dist/elements/className.d.ts +45 -0
  86. package/dist/elements/className.d.ts.map +1 -0
  87. package/dist/elements/className.js +8 -0
  88. package/dist/elements/decimal.d.ts +5 -0
  89. package/dist/elements/decimal.d.ts.map +1 -0
  90. package/dist/elements/decimal.js +11 -0
  91. package/dist/elements/documentUrl.d.ts +35 -0
  92. package/dist/elements/documentUrl.d.ts.map +1 -0
  93. package/dist/elements/documentUrl.js +89 -0
  94. package/dist/elements/drag-drop.d.ts +11 -0
  95. package/dist/elements/drag-drop.d.ts.map +1 -0
  96. package/dist/elements/drag-drop.js +277 -0
  97. package/dist/elements/drag.d.ts +53 -0
  98. package/dist/elements/drag.d.ts.map +1 -0
  99. package/dist/elements/drag.js +520 -0
  100. package/dist/elements/dragModifiers.d.ts +22 -0
  101. package/dist/elements/dragModifiers.d.ts.map +1 -0
  102. package/dist/elements/dragModifiers.js +62 -0
  103. package/dist/elements/events.d.ts +45 -0
  104. package/dist/elements/events.d.ts.map +1 -0
  105. package/dist/elements/events.js +101 -0
  106. package/dist/elements/fieldBounds.d.ts +5 -0
  107. package/dist/elements/fieldBounds.d.ts.map +1 -0
  108. package/dist/elements/fieldBounds.js +60 -0
  109. package/dist/elements/flow.d.ts +36 -0
  110. package/dist/elements/flow.d.ts.map +1 -0
  111. package/dist/elements/flow.js +47 -0
  112. package/dist/elements/form.d.ts +48 -0
  113. package/dist/elements/form.d.ts.map +1 -0
  114. package/dist/elements/form.js +112 -0
  115. package/dist/elements/grid.d.ts +96 -0
  116. package/dist/elements/grid.d.ts.map +1 -0
  117. package/dist/elements/grid.js +272 -0
  118. package/dist/elements/index.d.ts +36 -0
  119. package/dist/elements/index.d.ts.map +1 -0
  120. package/dist/elements/index.js +35 -0
  121. package/dist/elements/inherited.d.ts +181 -0
  122. package/dist/elements/inherited.d.ts.map +1 -0
  123. package/dist/elements/inherited.js +512 -0
  124. package/dist/elements/labels.d.ts +39 -0
  125. package/dist/elements/labels.d.ts.map +1 -0
  126. package/dist/elements/labels.js +163 -0
  127. package/dist/elements/measure.d.ts +27 -0
  128. package/dist/elements/measure.d.ts.map +1 -0
  129. package/dist/elements/measure.js +24 -0
  130. package/dist/elements/outsidePress.d.ts +31 -0
  131. package/dist/elements/outsidePress.d.ts.map +1 -0
  132. package/dist/elements/outsidePress.js +94 -0
  133. package/dist/elements/paste.d.ts +22 -0
  134. package/dist/elements/paste.d.ts.map +1 -0
  135. package/dist/elements/paste.js +49 -0
  136. package/dist/elements/press.d.ts +41 -0
  137. package/dist/elements/press.d.ts.map +1 -0
  138. package/dist/elements/press.js +131 -0
  139. package/dist/elements/rangeKeyboard.d.ts +41 -0
  140. package/dist/elements/rangeKeyboard.d.ts.map +1 -0
  141. package/dist/elements/rangeKeyboard.js +58 -0
  142. package/dist/elements/rangeValues.d.ts +20 -0
  143. package/dist/elements/rangeValues.d.ts.map +1 -0
  144. package/dist/elements/rangeValues.js +101 -0
  145. package/dist/elements/ref.d.ts +16 -0
  146. package/dist/elements/ref.d.ts.map +1 -0
  147. package/dist/elements/ref.js +22 -0
  148. package/dist/elements/reveal.d.ts +8 -0
  149. package/dist/elements/reveal.d.ts.map +1 -0
  150. package/dist/elements/reveal.js +10 -0
  151. package/dist/elements/scrollReveal.d.ts +19 -0
  152. package/dist/elements/scrollReveal.d.ts.map +1 -0
  153. package/dist/elements/scrollReveal.js +52 -0
  154. package/dist/elements/selectOptions.d.ts +25 -0
  155. package/dist/elements/selectOptions.d.ts.map +1 -0
  156. package/dist/elements/selectOptions.js +60 -0
  157. package/dist/elements/style.d.ts +30 -0
  158. package/dist/elements/style.d.ts.map +1 -0
  159. package/dist/elements/style.js +368 -0
  160. package/dist/elements/svgHover.d.ts +41 -0
  161. package/dist/elements/svgHover.d.ts.map +1 -0
  162. package/dist/elements/svgHover.js +152 -0
  163. package/dist/elements/table.d.ts +52 -0
  164. package/dist/elements/table.d.ts.map +1 -0
  165. package/dist/elements/table.js +104 -0
  166. package/dist/elements/types.d.ts +25 -0
  167. package/dist/elements/types.d.ts.map +1 -0
  168. package/dist/elements/types.js +8 -0
  169. package/dist/elements/viewport.d.ts +53 -0
  170. package/dist/elements/viewport.d.ts.map +1 -0
  171. package/dist/elements/viewport.js +62 -0
  172. package/dist/elements/wheelZoom.d.ts +12 -0
  173. package/dist/elements/wheelZoom.d.ts.map +1 -0
  174. package/dist/elements/wheelZoom.js +8 -0
  175. package/dist/index.d.ts +9 -4
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +9 -4
  178. package/dist/platform/focus.d.ts +31 -0
  179. package/dist/platform/focus.d.ts.map +1 -0
  180. package/dist/platform/focus.js +93 -0
  181. package/dist/platform/index.d.ts +31 -0
  182. package/dist/platform/index.d.ts.map +1 -0
  183. package/dist/platform/index.js +179 -0
  184. package/dist/platform/layout.d.ts +13 -0
  185. package/dist/platform/layout.d.ts.map +1 -0
  186. package/dist/platform/layout.js +15 -0
  187. package/dist/platform/position.d.ts +5 -0
  188. package/dist/platform/position.d.ts.map +1 -0
  189. package/dist/platform/position.js +177 -0
  190. package/dist/platform/stack.d.ts +86 -0
  191. package/dist/platform/stack.d.ts.map +1 -0
  192. package/dist/platform/stack.js +318 -0
  193. package/package.json +67 -8
@@ -0,0 +1,163 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Native label associations. A form owns its id lookup, and a wrapping label
4
+ * activates its first labelable descendant even if that control has no id.
5
+ *
6
+ * @module
7
+ */
8
+ import { Children, createContext, isValidElement, useCallback, useContext, useLayoutEffect, useRef, useState, useSyncExternalStore, } from 'react';
9
+ /** Creates an id lookup for labelable controls and notifies labels when the lookup changes. */
10
+ export function createLabelDirectory() {
11
+ const controls = new Map();
12
+ const texts = new Map();
13
+ const listeners = new Set();
14
+ const notify = () => listeners.forEach((listener) => listener());
15
+ return {
16
+ first(id) {
17
+ return controls.get(id)?.values().next().value;
18
+ },
19
+ text(id) {
20
+ return texts.get(id)?.values().next().value?.text;
21
+ },
22
+ subscribe(listener) {
23
+ listeners.add(listener);
24
+ return () => listeners.delete(listener);
25
+ },
26
+ register(id, control) {
27
+ const matches = controls.get(id) ?? new Set();
28
+ matches.add(control);
29
+ controls.set(id, matches);
30
+ notify();
31
+ return () => {
32
+ matches.delete(control);
33
+ if (matches.size === 0)
34
+ controls.delete(id);
35
+ notify();
36
+ };
37
+ },
38
+ registerText(id, text) {
39
+ const matches = texts.get(id) ?? new Set();
40
+ const entry = { text };
41
+ matches.add(entry);
42
+ texts.set(id, matches);
43
+ notify();
44
+ return () => {
45
+ matches.delete(entry);
46
+ if (matches.size === 0)
47
+ texts.delete(id);
48
+ notify();
49
+ };
50
+ },
51
+ };
52
+ }
53
+ const rootLabels = createLabelDirectory();
54
+ const wrappingLabel = createContext(null);
55
+ /** The nearest form's id lookup. Controls outside a form use the root lookup. */
56
+ export const FormLabels = createContext(rootLabels);
57
+ /** Reads text already present in a label's children, including text in styled spans. */
58
+ export function labelText(children) {
59
+ return Children.toArray(children)
60
+ .map((child) => {
61
+ if (typeof child === 'string' || typeof child === 'number')
62
+ return String(child);
63
+ if (isValidElement(child) &&
64
+ child.props['aria-hidden'] !== true &&
65
+ child.props['aria-hidden'] !== 'true') {
66
+ return labelText(child.props.children);
67
+ }
68
+ return '';
69
+ })
70
+ .join(' ')
71
+ .replace(/\s+/g, ' ')
72
+ .trim();
73
+ }
74
+ /** Registers the text a label or description relationship can address by id. */
75
+ export function useLabelText(id, children, name) {
76
+ const directory = useContext(FormLabels);
77
+ const text = id ? (name ?? labelText(children)) : '';
78
+ useLayoutEffect(() => (id && text ? directory.registerText(id, text) : undefined), [directory, id, text]);
79
+ }
80
+ /** Reads a space-separated id list, preferring the nearest form and then the root. */
81
+ export function useReferencedLabelText(ids) {
82
+ const directory = useContext(FormLabels);
83
+ const subscribe = useCallback((listener) => {
84
+ if (!ids)
85
+ return () => undefined;
86
+ const dispose = directory.subscribe(listener);
87
+ const disposeRoot = directory === rootLabels ? undefined : rootLabels.subscribe(listener);
88
+ return () => {
89
+ dispose();
90
+ disposeRoot?.();
91
+ };
92
+ }, [directory, ids]);
93
+ const read = useCallback(() => ids
94
+ ?.trim()
95
+ .split(/\s+/)
96
+ .map((id) => directory.text(id) ?? rootLabels.text(id))
97
+ .filter(Boolean)
98
+ .join(' ') || undefined, [directory, ids]);
99
+ return useSyncExternalStore(subscribe, read, () => undefined);
100
+ }
101
+ /** Tracks the associated control, including one mounted after its label. */
102
+ function useLabelControl(directory, id, fallback) {
103
+ const subscribe = useCallback((listener) => {
104
+ if (id === undefined)
105
+ return () => undefined;
106
+ const remove = directory.subscribe(listener);
107
+ const removeFallback = fallback?.subscribe(listener);
108
+ return () => {
109
+ remove();
110
+ removeFallback?.();
111
+ };
112
+ }, [directory, fallback, id]);
113
+ const lookup = useCallback(() => (id === undefined ? undefined : (directory.first(id) ?? fallback?.first(id))), [directory, fallback, id]);
114
+ return useSyncExternalStore(subscribe, lookup, () => undefined);
115
+ }
116
+ /** Supplies the label's visible text to its associated control for accessibility. */
117
+ function useLabelName(control, text) {
118
+ useLayoutEffect(() => (text ? control?.addName(text) : undefined), [control, text]);
119
+ }
120
+ /** Connects a text label with the control named by its `htmlFor`. */
121
+ export function useLabelPress(id, children) {
122
+ const directory = useContext(FormLabels);
123
+ const control = useLabelControl(directory, id, directory === rootLabels ? undefined : rootLabels);
124
+ useLabelName(control, id === undefined ? '' : labelText(children));
125
+ return control?.activate;
126
+ }
127
+ /** Provides the association for a label that wraps its control. */
128
+ export function WrappingLabel({ children, render, }) {
129
+ const [directory] = useState(createLabelDirectory);
130
+ const control = useLabelControl(directory, '');
131
+ useLabelName(control, labelText(children));
132
+ return (_jsx(wrappingLabel.Provider, { value: directory, children: render(() => directory.first('')?.activate()) }));
133
+ }
134
+ /** Registers a labelable element and returns the text of its associated labels. */
135
+ export function useLabelable(id, activate) {
136
+ const wrapper = useContext(wrappingLabel);
137
+ const directory = useContext(FormLabels);
138
+ const latest = useRef(activate);
139
+ useLayoutEffect(() => {
140
+ latest.current = activate;
141
+ }, [activate]);
142
+ const [name, setName] = useState();
143
+ const [control] = useState(() => {
144
+ const names = new Set();
145
+ const update = () => setName([...names].map(({ text }) => text).join(' ') || undefined);
146
+ return {
147
+ activate: () => latest.current?.(),
148
+ addName(text) {
149
+ const entry = { text };
150
+ names.add(entry);
151
+ update();
152
+ return () => {
153
+ names.delete(entry);
154
+ update();
155
+ };
156
+ },
157
+ };
158
+ });
159
+ const labelable = activate !== undefined;
160
+ useLayoutEffect(() => (labelable ? wrapper?.register('', control) : undefined), [wrapper, control, labelable]);
161
+ useLayoutEffect(() => (labelable && id ? directory.register(id, control) : undefined), [directory, id, control, labelable]);
162
+ return name;
163
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Measuring an element's box.
3
+ *
4
+ * @module
5
+ */
6
+ import type { NativeMethods, ScrollView } from 'react-native';
7
+ import type { ElementBox, ElementHandle, ElementMeasureTarget } from '@molecule/app-ui';
8
+ type MeasurableHost = ElementHandle | Pick<NativeMethods, 'measureInWindow'> | ScrollView;
9
+ /**
10
+ * An element's box in the window, from the host view's `measureInWindow`.
11
+ * A native scroll view is measured through its underlying host.
12
+ *
13
+ * @param handle - The element, from its `ref`.
14
+ * @returns Its box.
15
+ * @throws {TypeError} When the handle is not a rendered host view.
16
+ */
17
+ export declare function measureElement(handle: MeasurableHost): Promise<ElementBox>;
18
+ /**
19
+ * Receives viewport bounds from the host. On web the callback runs during the original event.
20
+ *
21
+ * @param handle - The element, from its `ref`.
22
+ * @param onMeasure - Receives the element's box.
23
+ * @param target - A device measures the registered host in either mode.
24
+ */
25
+ export declare function measureElement(handle: MeasurableHost, onMeasure: (box: ElementBox) => void, target?: ElementMeasureTarget): void;
26
+ export {};
27
+ //# sourceMappingURL=measure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../src/elements/measure.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAEvF,KAAK,cAAc,GAAG,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,GAAG,UAAU,CAAA;AAEzF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAC3E;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,EACpC,MAAM,CAAC,EAAE,oBAAoB,GAC5B,IAAI,CAAA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Measuring an element's box.
3
+ *
4
+ * @module
5
+ */
6
+ export function measureElement(handle, onMeasure) {
7
+ if (onMeasure)
8
+ return measureHost(handle, onMeasure);
9
+ return new Promise((resolve) => measureHost(handle, resolve));
10
+ }
11
+ /** Delegates measurement to the rendered view or the scroll view's underlying host. */
12
+ function measureHost(handle, onMeasure) {
13
+ // RN 0.79 exposes this method on ScrollView at runtime but omits it from ScrollView.d.ts.
14
+ const host = 'getNativeScrollRef' in handle && typeof handle.getNativeScrollRef === 'function'
15
+ ? handle.getNativeScrollRef()
16
+ : handle;
17
+ if (typeof host !== 'object' ||
18
+ host === null ||
19
+ !('measureInWindow' in host) ||
20
+ typeof host.measureInWindow !== 'function') {
21
+ throw new TypeError('measureElement: not a rendered view');
22
+ }
23
+ host.measureInWindow((x, y, width, height) => onMeasure({ x, y, width, height }));
24
+ }
@@ -0,0 +1,31 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ElementHandle, OverlayTarget } from '@molecule/app-ui';
3
+ type TouchHandler = NonNullable<ViewProps['onTouchStart']>;
4
+ type OutsideSubscription = {
5
+ dismiss(): void;
6
+ };
7
+ type TouchPath = {
8
+ boxes: Set<OutsideSubscription>;
9
+ handles: Set<ElementHandle>;
10
+ };
11
+ type OutsideBoundary = {
12
+ listeners: Set<OutsideSubscription>;
13
+ paths: WeakMap<object, TouchPath>;
14
+ };
15
+ type OutsideGesture = (inside: ReadonlySet<ElementHandle>) => (() => void) | undefined;
16
+ /** The outer Box's outside-touch boundary. */
17
+ export declare const OutsidePressScope: import("react").Context<OutsideBoundary | null>;
18
+ /** Adds an anchor or surface on the native touch's bubble path. */
19
+ export declare function useOutsideTouch(target: OverlayTarget): TouchHandler | undefined;
20
+ /** Makes every raw child touch observable without becoming its responder. */
21
+ export declare function useOutsidePressRoot(onGesture: OutsideGesture): {
22
+ scope: OutsideBoundary;
23
+ handlers: Pick<ViewProps, 'onTouchStart' | 'onTouchEnd' | 'onTouchCancel'>;
24
+ };
25
+ /** Observes the touch bubble path without taking the responder from a child. */
26
+ export declare function useOutsidePress(dismiss: (() => void) | undefined, target?: OverlayTarget): {
27
+ scope: OutsideBoundary;
28
+ onTouchStart: TouchHandler | undefined;
29
+ };
30
+ export {};
31
+ //# sourceMappingURL=outsidePress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outsidePress.d.ts","sourceRoot":"","sources":["../../src/elements/outsidePress.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAyB,SAAS,EAAE,MAAM,cAAc,CAAA;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEpE,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;AAC1D,KAAK,mBAAmB,GAAG;IAAE,OAAO,IAAI,IAAI,CAAA;CAAE,CAAA;AAC9C,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAC/B,OAAO,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;CAC5B,CAAA;AACD,KAAK,eAAe,GAAG;IACrB,SAAS,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;IACnC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CAClC,CAAA;AACD,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;AAUtF,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,iDAA8C,CAAA;AAE5E,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,YAAY,GAAG,SAAS,CAM/E;AAmBD,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,cAAc,GAAG;IAC9D,KAAK,EAAE,eAAe,CAAA;IACtB,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,cAAc,GAAG,YAAY,GAAG,eAAe,CAAC,CAAA;CAC3E,CAmCA;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAC7B,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,EACjC,MAAM,CAAC,EAAE,aAAa,GACrB;IACD,KAAK,EAAE,eAAe,CAAA;IACtB,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,CAqBA"}
@@ -0,0 +1,94 @@
1
+ /** Outside-touch dispatch in the enclosing native Box tree. */
2
+ import { createContext, useContext, useLayoutEffect, useMemo, useRef } from 'react';
3
+ /** Tracks subscribed boxes and the boxes on each touch's bubble path. */
4
+ function createBoundary() {
5
+ return {
6
+ listeners: new Set(),
7
+ paths: new WeakMap(),
8
+ };
9
+ }
10
+ /** The outer Box's outside-touch boundary. */
11
+ export const OutsidePressScope = createContext(null);
12
+ /** Adds an anchor or surface on the native touch's bubble path. */
13
+ export function useOutsideTouch(target) {
14
+ const scope = useContext(OutsidePressScope);
15
+ if (!scope)
16
+ return;
17
+ return (event) => {
18
+ if (target.current)
19
+ pathFor(scope, event).handles.add(target.current);
20
+ };
21
+ }
22
+ /** The same native event bubbles through the marked surfaces and the presentation root. */
23
+ function pathFor(scope, event) {
24
+ const path = scope.paths.get(event.nativeEvent) ?? { boxes: new Set(), handles: new Set() };
25
+ scope.paths.set(event.nativeEvent, path);
26
+ return path;
27
+ }
28
+ /** Dispatches ordinary outside-Box requests and returns the overlay boundaries in the path. */
29
+ function finish(scope, event) {
30
+ const path = pathFor(scope, event);
31
+ scope.paths.delete(event.nativeEvent);
32
+ for (const listener of scope.listeners) {
33
+ if (!path.boxes.has(listener))
34
+ listener.dismiss();
35
+ }
36
+ return path.handles;
37
+ }
38
+ /** Makes every raw child touch observable without becoming its responder. */
39
+ export function useOutsidePressRoot(onGesture) {
40
+ const scope = useMemo(createBoundary, []);
41
+ const pending = useRef(undefined);
42
+ return {
43
+ scope,
44
+ handlers: {
45
+ onTouchStart(event) {
46
+ pending.current = undefined;
47
+ const inside = finish(scope, event);
48
+ const { identifier, pageX, pageY, touches } = event.nativeEvent;
49
+ if (touches.length !== 1)
50
+ return;
51
+ const activate = onGesture(inside);
52
+ if (activate)
53
+ pending.current = { identifier, x: pageX, y: pageY, activate };
54
+ },
55
+ onTouchEnd(event) {
56
+ const press = pending.current;
57
+ pending.current = undefined;
58
+ const { identifier, pageX, pageY } = event.nativeEvent;
59
+ if (press?.identifier === identifier && Math.hypot(press.x - pageX, press.y - pageY) <= 8) {
60
+ press.activate();
61
+ }
62
+ },
63
+ onTouchCancel() {
64
+ pending.current = undefined;
65
+ },
66
+ },
67
+ };
68
+ }
69
+ /** Observes the touch bubble path without taking the responder from a child. */
70
+ export function useOutsidePress(dismiss, target) {
71
+ const parent = useContext(OutsidePressScope);
72
+ const scope = useMemo(() => parent ?? createBoundary(), [parent]);
73
+ const subscription = useMemo(() => (dismiss ? { dismiss } : undefined), [dismiss]);
74
+ useLayoutEffect(() => {
75
+ if (!subscription)
76
+ return;
77
+ scope.listeners.add(subscription);
78
+ return () => {
79
+ scope.listeners.delete(subscription);
80
+ };
81
+ }, [subscription, scope]);
82
+ const onTouchStart = subscription || target || !parent
83
+ ? (event) => {
84
+ const path = pathFor(scope, event);
85
+ if (subscription)
86
+ path.boxes.add(subscription);
87
+ if (target?.current)
88
+ path.handles.add(target.current);
89
+ if (!parent)
90
+ finish(scope, event);
91
+ }
92
+ : undefined;
93
+ return { scope, onTouchStart };
94
+ }
@@ -0,0 +1,22 @@
1
+ import { type NativeSyntheticEvent } from 'react-native';
2
+ type PasteText = (text: string) => void;
3
+ /** A paste subscription and the native command that uses it. */
4
+ export interface PasteOwner {
5
+ handlePaste: PasteText;
6
+ label: string;
7
+ activate(): void;
8
+ showMenu(): void;
9
+ }
10
+ /** The nearest Box that subscribed to plain-text paste. */
11
+ export declare const PasteScope: import("react").Context<PasteOwner | undefined>;
12
+ /** Prepares a localized Paste command for the box and its focused children. */
13
+ export declare function boxPasteOwner(handlePaste: PasteText): PasteOwner;
14
+ /** Props recognized by the RN 0.79.6 command adapter in the parked native kit. */
15
+ export declare function nativePasteProps(onPaste: PasteText | undefined): {
16
+ consumePlainTextPaste?: true;
17
+ onPlainTextPaste?: (event: NativeSyntheticEvent<{
18
+ text: string;
19
+ }>) => void;
20
+ };
21
+ export {};
22
+ //# sourceMappingURL=paste.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paste.d.ts","sourceRoot":"","sources":["../../src/elements/paste.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAK/D,KAAK,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;AAEvC,gEAAgE;AAChE,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,SAAS,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,IAAI,IAAI,CAAA;IAChB,QAAQ,IAAI,IAAI,CAAA;CACjB;AAED,2DAA2D;AAC3D,eAAO,MAAM,UAAU,iDAAmD,CAAA;AAc1E,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,CAehE;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG;IAChE,qBAAqB,CAAC,EAAE,IAAI,CAAA;IAC5B,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAA;CAC3E,CASA"}
@@ -0,0 +1,49 @@
1
+ /** Plain-text paste ownership and the native clipboard command. */
2
+ import { createContext } from 'react';
3
+ import { Alert } from 'react-native';
4
+ import { readText } from '@molecule/app-clipboard';
5
+ import { t } from '@molecule/app-i18n';
6
+ /** The nearest Box that subscribed to plain-text paste. */
7
+ export const PasteScope = createContext(undefined);
8
+ /** Reads the clipboard only in response to an explicitly activated Paste command. */
9
+ async function pasteFromClipboard(handlePaste) {
10
+ let text;
11
+ try {
12
+ text = await readText();
13
+ }
14
+ catch (_error) {
15
+ // An unbonded provider or denied clipboard read leaves the selected cells unchanged.
16
+ return;
17
+ }
18
+ if (text !== '')
19
+ handlePaste(text);
20
+ }
21
+ /** Prepares a localized Paste command for the box and its focused children. */
22
+ export function boxPasteOwner(handlePaste) {
23
+ const label = t('ui.paste', undefined, { defaultValue: 'Paste' });
24
+ const activate = () => {
25
+ void pasteFromClipboard(handlePaste);
26
+ };
27
+ return {
28
+ handlePaste,
29
+ label,
30
+ activate,
31
+ showMenu: () => Alert.alert(label, undefined, [
32
+ { text: t('confirm.cancel', undefined, { defaultValue: 'Cancel' }), style: 'cancel' },
33
+ { text: label, onPress: activate },
34
+ ]),
35
+ };
36
+ }
37
+ /** Props recognized by the RN 0.79.6 command adapter in the parked native kit. */
38
+ export function nativePasteProps(onPaste) {
39
+ if (!onPaste)
40
+ return {};
41
+ return {
42
+ consumePlainTextPaste: true,
43
+ onPlainTextPaste: (event) => {
44
+ const { text } = event.nativeEvent;
45
+ if (text !== '')
46
+ onPaste(text);
47
+ },
48
+ };
49
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The native `Pressable` props for an element's interaction props.
3
+ *
4
+ * @module
5
+ */
6
+ import type { GestureResponderEvent, PressableProps as NativePressableProps } from 'react-native';
7
+ import type { InteractionProps, MouseEventHandler, MousePressProps } from '@molecule/app-ui';
8
+ import { type PasteOwner } from './paste.js';
9
+ /** The containing anchor's click when a nested button owns the native press. */
10
+ export declare const AnchorPress: import("react").Context<MouseEventHandler | undefined>;
11
+ /** Carries a container's context request to the pressable hit target that owns the gesture. */
12
+ export declare const ContextMenuScope: import("react").Context<MouseEventHandler | undefined>;
13
+ type MouseTarget = InteractionProps & MousePressProps;
14
+ /** The native props {@link pressProps} sets. */
15
+ export type NativePressProps = Pick<NativePressableProps, 'focusable' | 'onPress' | 'onHoverIn' | 'onHoverOut' | 'onFocus' | 'onBlur'>;
16
+ /**
17
+ * Whether an element is something the user can press, hover or focus on a device: it has a
18
+ * handler a device fires, or a tab stop. Key handlers alone do not count (a device sends no key
19
+ * events to a view).
20
+ *
21
+ * @param props - The element's interaction props.
22
+ * @returns Whether it renders as a native `Pressable` rather than a `View`.
23
+ */
24
+ export declare function isPressable(props: MouseTarget): boolean;
25
+ /** Native press-in and context actions for the element that receives the touch. */
26
+ export declare function useMousePress(props: MouseTarget, base: NativePressProps, ownPaste?: PasteOwner, enabled?: boolean): NativePressProps & Pick<NativePressableProps, 'onPressIn' | 'onPressOut' | 'onLongPress' | 'onPointerDown' | 'accessibilityActions' | 'onAccessibilityAction'>;
27
+ /**
28
+ * The native `Pressable` props for an element's interaction props: a press calls `onClick`,
29
+ * hovering (a pointer on iPad, Android or the web) calls the mouse handlers, and a tab stop makes
30
+ * it focusable.
31
+ *
32
+ * @param props - The element's interaction props.
33
+ * @param activate - Its default action, when the click is not canceled.
34
+ * @param onBubble - The containing anchor's click, when native press events do not bubble.
35
+ * @returns The native props.
36
+ */
37
+ export declare function pressProps(props: InteractionProps, activate?: () => void, onBubble?: MouseEventHandler): NativePressProps;
38
+ /** Runs the same click and default action for a direct press, a label, or an implicit submit. */
39
+ export declare function activatePress(onClick: MouseEventHandler | undefined, activate: (() => void) | undefined, event?: GestureResponderEvent, onBubble?: MouseEventHandler): void;
40
+ export {};
41
+ //# sourceMappingURL=press.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"press.d.ts","sourceRoot":"","sources":["../../src/elements/press.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAGjG,OAAO,KAAK,EACV,gBAAgB,EAEhB,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,YAAY,CAAA;AAExD,gFAAgF;AAChF,eAAO,MAAM,WAAW,wDAA0D,CAAA;AAElF,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,wDAA0D,CAAA;AAEvF,KAAK,WAAW,GAAG,gBAAgB,GAAG,eAAe,CAAA;AAErD,gDAAgD;AAChD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,EACpB,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAC5E,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAWvD;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,gBAAgB,EACtB,QAAQ,CAAC,EAAE,UAAU,EACrB,OAAO,UAAO,GACb,gBAAgB,GACjB,IAAI,CACF,oBAAoB,EAClB,WAAW,GACX,YAAY,GACZ,aAAa,GACb,eAAe,GACf,sBAAsB,GACtB,uBAAuB,CAC1B,CAgEF;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,EACrB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,gBAAgB,CAalB;AAED,iGAAiG;AACjG,wBAAgB,aAAa,CAC3B,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,EAClC,KAAK,CAAC,EAAE,qBAAqB,EAC7B,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,IAAI,CAKN"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * The native `Pressable` props for an element's interaction props.
3
+ *
4
+ * @module
5
+ */
6
+ import { createContext, useContext, useRef } from 'react';
7
+ import { t } from '@molecule/app-i18n';
8
+ import { focusEvent, mouseEvent } from './events.js';
9
+ import { PasteScope } from './paste.js';
10
+ /** The containing anchor's click when a nested button owns the native press. */
11
+ export const AnchorPress = createContext(undefined);
12
+ /** Carries a container's context request to the pressable hit target that owns the gesture. */
13
+ export const ContextMenuScope = createContext(undefined);
14
+ /**
15
+ * Whether an element is something the user can press, hover or focus on a device: it has a
16
+ * handler a device fires, or a tab stop. Key handlers alone do not count (a device sends no key
17
+ * events to a view).
18
+ *
19
+ * @param props - The element's interaction props.
20
+ * @returns Whether it renders as a native `Pressable` rather than a `View`.
21
+ */
22
+ export function isPressable(props) {
23
+ return (props.onClick !== undefined ||
24
+ props.onContextMenu !== undefined ||
25
+ props.onMouseDown !== undefined ||
26
+ props.onMouseEnter !== undefined ||
27
+ props.onMouseLeave !== undefined ||
28
+ props.onFocus !== undefined ||
29
+ props.onBlur !== undefined ||
30
+ props.tabIndex !== undefined);
31
+ }
32
+ /** Native press-in and context actions for the element that receives the touch. */
33
+ export function useMousePress(props, base, ownPaste, enabled = true) {
34
+ const inheritedContext = useContext(ContextMenuScope);
35
+ const inheritedPaste = useContext(PasteScope);
36
+ const paste = enabled ? (ownPaste ?? (base.focusable ? inheritedPaste : undefined)) : undefined;
37
+ const context = enabled ? (props.onContextMenu ?? inheritedContext) : undefined;
38
+ const onMouseDown = enabled ? props.onMouseDown : undefined;
39
+ const down = useRef(null);
40
+ const contextLabel = context
41
+ ? t('ui.contextMenu', undefined, { defaultValue: 'Context menu' })
42
+ : '';
43
+ const requestContext = (event) => {
44
+ context?.(mouseEvent(event, 2));
45
+ };
46
+ return {
47
+ ...base,
48
+ onPressIn: onMouseDown
49
+ ? (event) => {
50
+ down.current = mouseEvent(event);
51
+ onMouseDown(down.current);
52
+ }
53
+ : undefined,
54
+ onPressOut: onMouseDown
55
+ ? () => {
56
+ const released = down.current;
57
+ // Pressability can deliver press-out immediately before press in the same turn.
58
+ queueMicrotask(() => {
59
+ if (down.current === released)
60
+ down.current = null;
61
+ });
62
+ }
63
+ : undefined,
64
+ onPress: base.onPress && onMouseDown
65
+ ? (event) => {
66
+ if (!down.current?.defaultPrevented)
67
+ base.onPress?.(event);
68
+ down.current = null;
69
+ }
70
+ : base.onPress,
71
+ onLongPress: context ? requestContext : paste?.showMenu,
72
+ onPointerDown: context
73
+ ? (event) => {
74
+ if (event.nativeEvent.button !== 2)
75
+ return;
76
+ event.stopPropagation();
77
+ context(mouseEvent(event, 2));
78
+ }
79
+ : undefined,
80
+ accessibilityActions: context || paste || (onMouseDown && !base.onPress)
81
+ ? [
82
+ ...(context ? [{ name: 'contextMenu', label: contextLabel }] : []),
83
+ ...(paste ? [{ name: 'paste', label: paste.label }] : []),
84
+ ...(onMouseDown && !base.onPress ? [{ name: 'activate' }] : []),
85
+ ]
86
+ : undefined,
87
+ onAccessibilityAction: context || paste || onMouseDown
88
+ ? (event) => {
89
+ const { actionName } = event.nativeEvent;
90
+ if (actionName === 'contextMenu')
91
+ requestContext();
92
+ else if (actionName === 'paste')
93
+ paste?.activate();
94
+ else if (actionName === 'activate' && !base.onPress)
95
+ onMouseDown?.(mouseEvent(undefined));
96
+ }
97
+ : undefined,
98
+ };
99
+ }
100
+ /**
101
+ * The native `Pressable` props for an element's interaction props: a press calls `onClick`,
102
+ * hovering (a pointer on iPad, Android or the web) calls the mouse handlers, and a tab stop makes
103
+ * it focusable.
104
+ *
105
+ * @param props - The element's interaction props.
106
+ * @param activate - Its default action, when the click is not canceled.
107
+ * @param onBubble - The containing anchor's click, when native press events do not bubble.
108
+ * @returns The native props.
109
+ */
110
+ export function pressProps(props, activate, onBubble) {
111
+ const { onClick, onMouseEnter, onMouseLeave, onFocus, onBlur, tabIndex } = props;
112
+ return {
113
+ focusable: tabIndex === undefined ? undefined : tabIndex >= 0,
114
+ onPress: onClick || activate || onBubble
115
+ ? (event) => activatePress(onClick, activate, event, onBubble)
116
+ : undefined,
117
+ onHoverIn: onMouseEnter ? () => onMouseEnter(mouseEvent(undefined)) : undefined,
118
+ onHoverOut: onMouseLeave ? () => onMouseLeave(mouseEvent(undefined)) : undefined,
119
+ onFocus: onFocus ? () => onFocus(focusEvent()) : undefined,
120
+ onBlur: onBlur ? () => onBlur(focusEvent()) : undefined,
121
+ };
122
+ }
123
+ /** Runs the same click and default action for a direct press, a label, or an implicit submit. */
124
+ export function activatePress(onClick, activate, event, onBubble) {
125
+ const click = mouseEvent(event);
126
+ onClick?.(click);
127
+ if (onBubble && !event?.isPropagationStopped())
128
+ onBubble(click);
129
+ if (!click.defaultPrevented)
130
+ activate?.();
131
+ }
@@ -0,0 +1,41 @@
1
+ import { type HostComponent, type NativeSyntheticEvent, type ViewProps } from 'react-native';
2
+ import type { KitKeyboardEvent } from '@molecule/app-ui';
3
+ /** Key event from the optional native hardware-keyboard host. */
4
+ export type NativeKeyPress = NativeSyntheticEvent<Readonly<{
5
+ keyCode: number;
6
+ unicode: number;
7
+ unicodeChar: string;
8
+ isLongPress: boolean;
9
+ isAltPressed: boolean;
10
+ isShiftPressed: boolean;
11
+ isCtrlPressed: boolean;
12
+ isCapsLockOn: boolean;
13
+ hasNoModifiers: boolean;
14
+ }>>;
15
+ /** Native view contract used by keyboard-aware kit controls. */
16
+ export interface NativeKeyboardViewProps extends ViewProps {
17
+ canBeFocused?: boolean;
18
+ haloEffect?: boolean;
19
+ lockFocus?: number;
20
+ hasKeyDownPress?: boolean;
21
+ hasKeyUpPress?: boolean;
22
+ hasOnFocusChanged?: boolean;
23
+ onFocusChange?: (event: NativeSyntheticEvent<Readonly<{
24
+ isFocused: boolean;
25
+ }>>) => void;
26
+ onKeyDownPress?: (event: NativeKeyPress) => void;
27
+ onKeyUpPress?: (event: NativeKeyPress) => void;
28
+ }
29
+ /** The registered hardware-keyboard host component. */
30
+ export type NativeKeyboardView = HostComponent<NativeKeyboardViewProps>;
31
+ /** Registers the keyboard host at startup in native builds that include it. */
32
+ export declare function setNativeKeyboardView(view: NativeKeyboardView | undefined): void;
33
+ /** Resolves the optional host only in an application with its native manager. */
34
+ export declare function getNativeKeyboardView(): NativeKeyboardView | undefined;
35
+ /** Reports whether the optional keyboard host can be mounted. */
36
+ export declare function hasRangeKeyboardView(): boolean;
37
+ /** ExternalKeyboardView's up, down, left and right focus locks. Tab remains available. */
38
+ export declare const RANGE_DIRECTIONAL_KEYS = 15;
39
+ /** Maps the hardware event and its modifier state into the kit's keyboard contract. */
40
+ export declare function rangeKeyboardEvent(event: NativeKeyPress): KitKeyboardEvent;
41
+ //# sourceMappingURL=rangeKeyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rangeKeyboard.d.ts","sourceRoot":"","sources":["../../src/elements/rangeKeyboard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAGzB,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAIxD,iEAAiE;AACjE,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAC/C,QAAQ,CAAC;IACP,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAC,CACH,CAAA;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,KAAK,IAAI,CAAA;IACvF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAA;IAChD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAA;CAC/C;AAED,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAA;AAIvE,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI,CAEhF;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,IAAI,kBAAkB,GAAG,SAAS,CAOtE;AAED,iEAAiE;AACjE,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,KAAS,CAAA;AA+B5C,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,gBAAgB,CAS1E"}