@xaui/native 0.9.1-alpha.38 → 0.9.1-alpha.39

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 (35) hide show
  1. package/dist/chunk-2EGR4LWD.js +145 -0
  2. package/dist/chunk-37L7YGZV.cjs +425 -0
  3. package/dist/chunk-64MXEVT3.js +66 -0
  4. package/dist/{chunk-RAWGK2XK.cjs → chunk-76XDVA24.cjs} +43 -133
  5. package/dist/{chunk-Q3MQ7S2D.cjs → chunk-7KLBTMXV.cjs} +6 -4
  6. package/dist/chunk-EKS3W46M.cjs +66 -0
  7. package/dist/{chunk-ZF6KIHXH.js → chunk-GJSFKH4L.js} +15 -20
  8. package/dist/{chunk-ZNZ7HVRW.js → chunk-JKP4TPIL.js} +51 -217
  9. package/dist/chunk-LUPCPLND.cjs +145 -0
  10. package/dist/chunk-XAFP5JLK.js +425 -0
  11. package/dist/components/accordion/index.cjs +3 -2
  12. package/dist/components/accordion/index.js +2 -1
  13. package/dist/components/badge/index.d.cts +1 -1
  14. package/dist/components/badge/index.d.ts +1 -1
  15. package/dist/components/popover/index.cjs +37 -0
  16. package/dist/components/popover/index.d.cts +254 -0
  17. package/dist/components/popover/index.d.ts +254 -0
  18. package/dist/components/popover/index.js +37 -0
  19. package/dist/components/select/index.cjs +4 -2
  20. package/dist/components/select/index.d.cts +14 -25
  21. package/dist/components/select/index.d.ts +14 -25
  22. package/dist/components/select/index.js +3 -1
  23. package/dist/index.cjs +42 -5
  24. package/dist/index.d.cts +3 -1
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.js +44 -7
  27. package/dist/placement-DHa0Rrh1.d.cts +38 -0
  28. package/dist/placement-DHa0Rrh1.d.ts +38 -0
  29. package/dist/system/index.cjs +16 -2
  30. package/dist/system/index.d.cts +38 -2
  31. package/dist/system/index.d.ts +38 -2
  32. package/dist/system/index.js +15 -1
  33. package/package.json +11 -1
  34. /package/dist/{chunk-OJCCV65P.cjs → chunk-GGW43Q37.cjs} +0 -0
  35. /package/dist/{chunk-MESKS6AI.js → chunk-WHJTBTYM.js} +0 -0
@@ -1,9 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
+ var _chunkLUPCPLNDcjs = require('./chunk-LUPCPLND.cjs');
4
+
3
5
 
4
6
  var _chunkWDDXU3OHcjs = require('./chunk-WDDXU3OH.cjs');
5
7
 
6
8
 
9
+
10
+
11
+
12
+
13
+
14
+ var _chunkEKS3W46Mcjs = require('./chunk-EKS3W46M.cjs');
15
+
16
+
7
17
  var _chunkWFEMJCXOcjs = require('./chunk-WFEMJCXO.cjs');
8
18
 
9
19
 
@@ -39,60 +49,18 @@ var _react = require('react');
39
49
  var _reactnative = require('react-native');
40
50
  var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
41
51
 
42
- // src/components/select/select.context.ts
43
- var [SelectProvider, useSelect] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Select");
44
- var [SelectItemProvider, useSelectItem] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Select.Item");
45
-
46
- // src/components/select/select.animation.ts
47
-
48
- var INDICATOR_SPRING = {
49
- damping: 140,
50
- stiffness: 1e3,
51
- mass: 4
52
- };
53
- var INDICATOR_ROTATION = [0, -180];
54
- var ENTER_MS = 200;
55
- var EXIT_MS = 150;
56
- function contentEntering(placement) {
57
- const from = placement === "bottom" ? -8 : 8;
58
- return new (0, _reactnativereanimated.Keyframe)({
59
- 0: {
60
- opacity: 0,
61
- transform: [{ translateY: from }, { scale: 0.95 }]
62
- },
63
- 100: {
64
- opacity: 1,
65
- transform: [{ translateY: 0 }, { scale: 1 }],
66
- easing: _reactnativereanimated.Easing.out(_reactnativereanimated.Easing.cubic)
67
- }
68
- }).duration(ENTER_MS);
69
- }
70
- function contentExiting(placement) {
71
- const to = placement === "bottom" ? -8 : 8;
72
- return new (0, _reactnativereanimated.Keyframe)({
73
- 0: { opacity: 1, transform: [{ translateY: 0 }, { scale: 1 }] },
74
- 100: {
75
- opacity: 0,
76
- transform: [{ translateY: to }, { scale: 0.95 }],
77
- easing: _reactnativereanimated.Easing.in(_reactnativereanimated.Easing.cubic)
78
- }
79
- }).duration(EXIT_MS);
80
- }
81
- var overlayEntering = new (0, _reactnativereanimated.Keyframe)({
82
- 0: { opacity: 0 },
83
- 100: { opacity: 1 }
84
- }).duration(ENTER_MS);
85
- var overlayExiting = new (0, _reactnativereanimated.Keyframe)({
86
- 0: { opacity: 1 },
87
- 100: { opacity: 0 }
88
- }).duration(EXIT_MS);
89
-
90
52
  // src/components/select/select-item.tsx
91
53
 
92
54
 
93
55
  // src/components/select/select-item-label.tsx
94
56
 
95
57
 
58
+
59
+ // src/components/select/select.context.ts
60
+ var [SelectProvider, useSelect] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Select");
61
+ var [SelectItemProvider, useSelectItem] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Select.Item");
62
+
63
+ // src/components/select/select-item-label.tsx
96
64
  var _jsxruntime = require('react/jsx-runtime');
97
65
  var SelectItemLabel = _react.forwardRef.call(void 0,
98
66
  function SelectItemLabel2({ children, numberOfLines = 1, style, ...props }, ref) {
@@ -185,45 +153,6 @@ SelectItem.displayName = "XAUI.Select.Item";
185
153
 
186
154
  // src/components/select/select.utils.ts
187
155
 
188
- function resolvePlacement(input) {
189
- const { anchor, content, window, offset, alignOffset, insets } = input;
190
- const available = window.width - insets.start - insets.end;
191
- const width = Math.min(resolveWidth(input), Math.max(available, 0));
192
- const placement = choosePlacement(input);
193
- const maxHeight = Math.max(roomFor(placement, input), 0);
194
- const height = Math.min(content.height, maxHeight);
195
- const top = placement === "bottom" ? anchor.y + anchor.height + offset : anchor.y - offset - height;
196
- const start = clamp(
197
- alignedStart(input, width) + alignOffset,
198
- insets.start,
199
- Math.max(window.width - insets.end - width, insets.start)
200
- );
201
- return { top, start, width, maxHeight, placement };
202
- }
203
- function resolveWidth({ width, anchor, content }) {
204
- if (width === "trigger") return anchor.width;
205
- if (width === "content-fit") return content.width;
206
- return width;
207
- }
208
- function choosePlacement(input) {
209
- const { placement, avoidCollisions, content } = input;
210
- if (!avoidCollisions) return placement;
211
- if (roomFor(placement, input) >= content.height) return placement;
212
- const other = placement === "bottom" ? "top" : "bottom";
213
- return roomFor(other, input) > roomFor(placement, input) ? other : placement;
214
- }
215
- function roomFor(placement, input) {
216
- const { anchor, window, offset, insets } = input;
217
- return placement === "bottom" ? window.height - insets.bottom - (anchor.y + anchor.height) - offset : anchor.y - insets.top - offset;
218
- }
219
- function alignedStart({ align, anchor }, width) {
220
- if (align === "start") return anchor.x;
221
- if (align === "end") return anchor.x + anchor.width - width;
222
- return anchor.x + (anchor.width - width) / 2;
223
- }
224
- function clamp(value, min, max) {
225
- return Math.min(Math.max(value, min), max);
226
- }
227
156
  function collectItemLabels(children, isItem) {
228
157
  const found = [];
229
158
  const walk = (node) => {
@@ -244,15 +173,15 @@ function collectItemLabels(children, isItem) {
244
173
 
245
174
  // src/components/select/select-content.tsx
246
175
 
176
+
247
177
  var DEFAULT_OFFSET = 8;
248
- var ZERO = { x: 0, y: 0 };
249
- var isSelectItem = (type) => type === SelectItem;
250
178
  var DEFAULT_INSETS = {
251
179
  top: 12,
252
180
  bottom: 12,
253
181
  start: 12,
254
182
  end: 12
255
183
  };
184
+ var isSelectItem = (type) => type === SelectItem;
256
185
  var SelectContent = _react.forwardRef.call(void 0,
257
186
  function SelectContent2({
258
187
  children,
@@ -268,56 +197,37 @@ var SelectContent = _react.forwardRef.call(void 0,
268
197
  ...props
269
198
  }, ref) {
270
199
  const context = useSelect();
271
- const { contentStyle, isOpen, anchor } = context;
200
+ const { contentStyle, isOpen, anchor, registerLabel } = context;
272
201
  const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
273
- const window = _reactnative.useWindowDimensions.call(void 0, );
274
- const origin = _nullishCoalesce(_optionalChain([_react.useContext.call(void 0, _chunkWDDXU3OHcjs.PortalContext), 'optionalAccess', _2 => _2.origin]), () => ( ZERO));
275
- const [measured, setMeasured] = _react.useState.call(void 0, null);
276
- const { registerLabel } = context;
277
- _react.useEffect.call(void 0, () => {
278
- for (const [value, label] of collectItemLabels(children, isSelectItem)) {
279
- registerLabel(value, label);
280
- }
281
- }, [children, registerLabel]);
282
- if (!isOpen && measured !== null) setMeasured(null);
283
- if (!isOpen || anchor === null) return null;
284
- const measure = (event) => {
285
- _optionalChain([onLayout, 'optionalCall', _3 => _3(event)]);
286
- const { width: w, height: h } = event.nativeEvent.layout;
287
- if (measured === null || measured.height !== h || measured.width !== w) {
288
- setMeasured({ width: w, height: h });
289
- }
290
- };
291
- const local = { ...anchor, x: anchor.x - origin.x, y: anchor.y - origin.y };
292
- const position = measured && resolvePlacement({
293
- anchor: local,
294
- content: measured,
295
- // The window in the host's own coordinates, for the same reason as the anchor.
296
- window: {
297
- width: window.width - origin.x,
298
- height: window.height - origin.y
299
- },
202
+ const { position, onContentLayout, measuringStyle } = _chunkLUPCPLNDcjs.useAnchoredPosition.call(void 0, {
203
+ anchor,
204
+ isOpen,
300
205
  placement,
301
206
  align,
302
207
  width,
303
208
  offset,
304
209
  alignOffset,
305
210
  avoidCollisions,
306
- insets: { ...DEFAULT_INSETS, ...insets }
211
+ insets: { ...DEFAULT_INSETS, ...insets },
212
+ onLayout
307
213
  });
214
+ _react.useEffect.call(void 0, () => {
215
+ for (const [value, label] of collectItemLabels(children, isSelectItem)) {
216
+ registerLabel(value, label);
217
+ }
218
+ }, [children, registerLabel]);
219
+ if (!isOpen || anchor === null) return null;
308
220
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDDXU3OHcjs.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
309
221
  _reactnativereanimated2.default.View,
310
222
  {
311
223
  ref,
312
- entering: position ? contentEntering(position.placement) : void 0,
313
- exiting: position ? contentExiting(position.placement) : void 0,
314
- onLayout: measure,
224
+ entering: position ? _chunkEKS3W46Mcjs.anchoredEntering.call(void 0, position.placement) : void 0,
225
+ exiting: position ? _chunkEKS3W46Mcjs.anchoredExiting.call(void 0, position.placement) : void 0,
226
+ onLayout: onContentLayout,
315
227
  ...rest,
316
228
  style: [
317
229
  contentStyle,
318
- // The measuring pass: laid out at the trigger's width so the rows wrap as they
319
- // finally will, and invisible so the reader never sees it at the wrong place.
320
- position === null ? { opacity: 0, top: 0, start: 0, width: local.width } : {
230
+ position === null ? measuringStyle : {
321
231
  top: position.top,
322
232
  start: position.start,
323
233
  width: position.width,
@@ -336,7 +246,7 @@ var SelectContent = _react.forwardRef.call(void 0,
336
246
  }
337
247
  )
338
248
  },
339
- _nullishCoalesce(_optionalChain([position, 'optionalAccess', _4 => _4.placement]), () => ( "measuring"))
249
+ _nullishCoalesce(_optionalChain([position, 'optionalAccess', _2 => _2.placement]), () => ( "measuring"))
340
250
  ) }) });
341
251
  }
342
252
  );
@@ -358,12 +268,12 @@ function SelectIndicator({
358
268
  const { indicatorStyle, isOpen } = useSelect();
359
269
  const progress = _reactnativereanimated.useSharedValue.call(void 0, isOpen ? 1 : 0);
360
270
  _react.useEffect.call(void 0, () => {
361
- progress.set(_reactnativereanimated.withSpring.call(void 0, isOpen ? 1 : 0, INDICATOR_SPRING));
271
+ progress.set(_reactnativereanimated.withSpring.call(void 0, isOpen ? 1 : 0, _chunkEKS3W46Mcjs.INDICATOR_SPRING));
362
272
  }, [isOpen, progress]);
363
273
  const rotation = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
364
274
  transform: [
365
275
  {
366
- rotate: `${_reactnativereanimated.interpolate.call(void 0, progress.get(), [0, 1], [INDICATOR_ROTATION[0], INDICATOR_ROTATION[1]])}deg`
276
+ rotate: `${_reactnativereanimated.interpolate.call(void 0, progress.get(), [0, 1], [_chunkEKS3W46Mcjs.INDICATOR_ROTATION[0], _chunkEKS3W46Mcjs.INDICATOR_ROTATION[1]])}deg`
367
277
  }
368
278
  ]
369
279
  }));
@@ -456,8 +366,8 @@ var SelectOverlay = _react.forwardRef.call(void 0,
456
366
  AnimatedPressable,
457
367
  {
458
368
  ref,
459
- entering: overlayEntering,
460
- exiting: overlayExiting,
369
+ entering: _chunkEKS3W46Mcjs.overlayEntering,
370
+ exiting: _chunkEKS3W46Mcjs.overlayExiting,
461
371
  accessibilityRole: "none",
462
372
  importantForAccessibility: "no",
463
373
  onPress: isDismissable ? close : void 0,
@@ -501,13 +411,13 @@ var SelectTrigger = _react.forwardRef.call(void 0,
501
411
  const node = _react.useRef.call(void 0, null);
502
412
  const refs = _chunkWFEMJCXOcjs.useMergedRef.call(void 0, node, ref);
503
413
  const measure = _react.useCallback.call(void 0, () => {
504
- _optionalChain([node, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.measureInWindow, 'call', _7 => _7((x, y, width, height) => {
414
+ _optionalChain([node, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.measureInWindow, 'call', _5 => _5((x, y, width, height) => {
505
415
  setAnchor({ x, y, width, height });
506
416
  })]);
507
417
  }, [setAnchor]);
508
418
  const handleLayout = _react.useCallback.call(void 0,
509
419
  (event) => {
510
- _optionalChain([onLayout, 'optionalCall', _8 => _8(event)]);
420
+ _optionalChain([onLayout, 'optionalCall', _6 => _6(event)]);
511
421
  measure();
512
422
  },
513
423
  [measure, onLayout]
@@ -517,7 +427,7 @@ var SelectTrigger = _react.forwardRef.call(void 0,
517
427
  }, [isOpen, measure]);
518
428
  const handlePress = _react.useCallback.call(void 0,
519
429
  (event) => {
520
- _optionalChain([onPress, 'optionalCall', _9 => _9(event)]);
430
+ _optionalChain([onPress, 'optionalCall', _7 => _7(event)]);
521
431
  measure();
522
432
  toggle();
523
433
  },
@@ -877,7 +787,7 @@ function Select({
877
787
  const context = _react.useMemo.call(void 0, () => {
878
788
  const indicator = _reactnative.StyleSheet.flatten([
879
789
  styles.indicator,
880
- _optionalChain([tint, 'optionalAccess', _10 => _10.indicator])
790
+ _optionalChain([tint, 'optionalAccess', _8 => _8.indicator])
881
791
  ]);
882
792
  const itemLabel = _reactnative.StyleSheet.flatten([styles.itemLabel]);
883
793
  const tintedPlaceholder = tint ? _reactnative.StyleSheet.flatten([tint.value]).color : void 0;
@@ -1,6 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
+ var _chunkEKS3W46Mcjs = require('./chunk-EKS3W46M.cjs');
5
+
6
+
7
+
4
8
 
5
9
  var _chunk4KFKWBN5cjs = require('./chunk-4KFKWBN5.cjs');
6
10
 
@@ -41,8 +45,6 @@ var contentEntering = _reactnativereanimated.FadeIn.duration(CONTENT_MS).easing(
41
45
  var contentExiting = _reactnativereanimated.FadeOut.duration(CONTENT_MS).easing(
42
46
  _reactnativereanimated.Easing.in(_reactnativereanimated.Easing.ease)
43
47
  );
44
- var INDICATOR_SPRING = { damping: 140, stiffness: 1e3, mass: 4 };
45
- var INDICATOR_ROTATION = [0, -180];
46
48
 
47
49
  // src/components/accordion/accordion.context.ts
48
50
  var [AccordionProvider, useAccordion] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Accordion");
@@ -88,12 +90,12 @@ function AccordionIndicator({
88
90
  const { isExpanded } = useAccordionItem();
89
91
  const progress = _reactnativereanimated.useSharedValue.call(void 0, isExpanded ? 1 : 0);
90
92
  _react.useEffect.call(void 0, () => {
91
- progress.set(_reactnativereanimated.withSpring.call(void 0, isExpanded ? 1 : 0, INDICATOR_SPRING));
93
+ progress.set(_reactnativereanimated.withSpring.call(void 0, isExpanded ? 1 : 0, _chunkEKS3W46Mcjs.INDICATOR_SPRING));
92
94
  }, [isExpanded, progress]);
93
95
  const rotation = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
94
96
  transform: [
95
97
  {
96
- rotate: `${_reactnativereanimated.interpolate.call(void 0, progress.get(), [0, 1], [INDICATOR_ROTATION[0], INDICATOR_ROTATION[1]])}deg`
98
+ rotate: `${_reactnativereanimated.interpolate.call(void 0, progress.get(), [0, 1], [_chunkEKS3W46Mcjs.INDICATOR_ROTATION[0], _chunkEKS3W46Mcjs.INDICATOR_ROTATION[1]])}deg`
97
99
  }
98
100
  ]
99
101
  }));
@@ -0,0 +1,66 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/system/anchored/anchored-motion.ts
2
+ var _reactnativereanimated = require('react-native-reanimated');
3
+ var ENTER_MS = 200;
4
+ var EXIT_MS = 150;
5
+ var TRAVEL = 8;
6
+ function anchoredEntering(placement) {
7
+ const [x, y] = travel(placement);
8
+ return new (0, _reactnativereanimated.Keyframe)({
9
+ 0: {
10
+ opacity: 0,
11
+ transform: [{ translateX: x }, { translateY: y }, { scale: 0.95 }]
12
+ },
13
+ 100: {
14
+ opacity: 1,
15
+ transform: [{ translateX: 0 }, { translateY: 0 }, { scale: 1 }],
16
+ easing: _reactnativereanimated.Easing.out(_reactnativereanimated.Easing.cubic)
17
+ }
18
+ }).duration(ENTER_MS);
19
+ }
20
+ function anchoredExiting(placement) {
21
+ const [x, y] = travel(placement);
22
+ return new (0, _reactnativereanimated.Keyframe)({
23
+ 0: {
24
+ opacity: 1,
25
+ transform: [{ translateX: 0 }, { translateY: 0 }, { scale: 1 }]
26
+ },
27
+ 100: {
28
+ opacity: 0,
29
+ transform: [{ translateX: x }, { translateY: y }, { scale: 0.95 }],
30
+ easing: _reactnativereanimated.Easing.in(_reactnativereanimated.Easing.cubic)
31
+ }
32
+ }).duration(EXIT_MS);
33
+ }
34
+ function travel(placement) {
35
+ switch (placement) {
36
+ case "bottom":
37
+ return [0, -TRAVEL];
38
+ case "top":
39
+ return [0, TRAVEL];
40
+ case "end":
41
+ return [-TRAVEL, 0];
42
+ case "start":
43
+ return [TRAVEL, 0];
44
+ }
45
+ }
46
+ var overlayEntering = new (0, _reactnativereanimated.Keyframe)({
47
+ 0: { opacity: 0 },
48
+ 100: { opacity: 1 }
49
+ }).duration(ENTER_MS);
50
+ var overlayExiting = new (0, _reactnativereanimated.Keyframe)({
51
+ 0: { opacity: 1 },
52
+ 100: { opacity: 0 }
53
+ }).duration(EXIT_MS);
54
+
55
+ // src/system/anchored/indicator-spring.ts
56
+ var INDICATOR_SPRING = { damping: 140, stiffness: 1e3, mass: 4 };
57
+ var INDICATOR_ROTATION = [0, -180];
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ exports.anchoredEntering = anchoredEntering; exports.anchoredExiting = anchoredExiting; exports.overlayEntering = overlayEntering; exports.overlayExiting = overlayExiting; exports.INDICATOR_SPRING = INDICATOR_SPRING; exports.INDICATOR_ROTATION = INDICATOR_ROTATION;
@@ -1,3 +1,4 @@
1
+ import { INDICATOR_ROTATION, INDICATOR_SPRING } from "./chunk-64MXEVT3.js";
1
2
  import { ChevronDownIcon, Icon, IconContext } from "./chunk-FHUYHV6J.js";
2
3
  import { useControllableState } from "./chunk-F6W3JQ7K.js";
3
4
  import { PressableFeedback } from "./chunk-LIUO6D3D.js";
@@ -17,12 +18,6 @@ var LAYOUT = LinearTransition.springify().damping(140).stiffness(1600).mass(4);
17
18
  var CONTENT_MS = 200;
18
19
  var contentEntering = FadeIn.duration(CONTENT_MS).easing(Easing.out(Easing.ease));
19
20
  var contentExiting = FadeOut.duration(CONTENT_MS).easing(Easing.in(Easing.ease));
20
- var INDICATOR_SPRING = {
21
- damping: 140,
22
- stiffness: 1e3,
23
- mass: 4
24
- };
25
- var INDICATOR_ROTATION = [0, -180];
26
21
 
27
22
  // src/components/accordion/accordion.context.ts
28
23
  var [AccordionProvider, useAccordion] = createSlotContext("Accordion");
@@ -58,10 +53,10 @@ AccordionContent.displayName = "XAUI.Accordion.Content";
58
53
  import { useEffect } from "react";
59
54
  import Animated2, { interpolate, useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated";
60
55
  import { jsx as jsx2 } from "react/jsx-runtime";
61
- const _worklet_14153867294208_init_data = {
62
- code: "function chunkZF6KIHXHJs1(){const{interpolate,progress,INDICATOR_ROTATION}=this.__closure;return{transform:[{rotate:interpolate(progress.get(),[0,1],[INDICATOR_ROTATION[0],INDICATOR_ROTATION[1]])+\"deg\"}]};}",
63
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-ZF6KIHXH.js",
64
- sourceMap: "{\"version\":3,\"names\":[\"chunkZF6KIHXHJs1\",\"interpolate\",\"progress\",\"INDICATOR_ROTATION\",\"__closure\",\"transform\",\"rotate\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-ZF6KIHXH.js\"],\"mappings\":\"AA4FoC,SAAAA,iBAAA,QAAAC,WAAA,CAAAC,QAAA,CAAAC,kBAAA,OAAAC,SAAA,OAAO,CACvCC,SAAS,CAAE,CACT,CACEC,MAAM,CAAKL,WAAW,CAACC,QAAQ,CAACK,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAACJ,kBAAkB,CAAC,CAAC,CAAC,CAAEA,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,MAChG,CAAC,CAEL,CAAC\",\"ignoreList\":[]}"
56
+ const _worklet_5989753634611_init_data = {
57
+ code: "function chunkGJSFKH4LJs1(){const{interpolate,progress,INDICATOR_ROTATION}=this.__closure;return{transform:[{rotate:interpolate(progress.get(),[0,1],[INDICATOR_ROTATION[0],INDICATOR_ROTATION[1]])+\"deg\"}]};}",
58
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GJSFKH4L.js",
59
+ sourceMap: "{\"version\":3,\"names\":[\"chunkGJSFKH4LJs1\",\"interpolate\",\"progress\",\"INDICATOR_ROTATION\",\"__closure\",\"transform\",\"rotate\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GJSFKH4L.js\"],\"mappings\":\"AA8FoC,SAAAA,iBAAA,QAAAC,WAAA,CAAAC,QAAA,CAAAC,kBAAA,OAAAC,SAAA,OAAO,CACvCC,SAAS,CAAE,CACT,CACEC,MAAM,CAAKL,WAAW,CAACC,QAAQ,CAACK,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAACJ,kBAAkB,CAAC,CAAC,CAAC,CAAEA,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,MAChG,CAAC,CAEL,CAAC\",\"ignoreList\":[]}"
65
60
  };
66
61
  function AccordionIndicator({
67
62
  as = ChevronDownIcon,
@@ -77,30 +72,30 @@ function AccordionIndicator({
77
72
  useEffect(() => {
78
73
  progress.set(withSpring(isExpanded ? 1 : 0, INDICATOR_SPRING));
79
74
  }, [isExpanded, progress]);
80
- const rotation = useAnimatedStyle(function chunkZF6KIHXHJs1Factory({
81
- _worklet_14153867294208_init_data,
75
+ const rotation = useAnimatedStyle(function chunkGJSFKH4LJs1Factory({
76
+ _worklet_5989753634611_init_data,
82
77
  interpolate,
83
78
  progress,
84
79
  INDICATOR_ROTATION
85
80
  }) {
86
81
  const _e = [new global.Error(), -4, -27];
87
- const chunkZF6KIHXHJs1 = () => ({
82
+ const chunkGJSFKH4LJs1 = () => ({
88
83
  transform: [{
89
84
  rotate: `${interpolate(progress.get(), [0, 1], [INDICATOR_ROTATION[0], INDICATOR_ROTATION[1]])}deg`
90
85
  }]
91
86
  });
92
- chunkZF6KIHXHJs1.__closure = {
87
+ chunkGJSFKH4LJs1.__closure = {
93
88
  interpolate,
94
89
  progress,
95
90
  INDICATOR_ROTATION
96
91
  };
97
- chunkZF6KIHXHJs1.__workletHash = 14153867294208;
98
- chunkZF6KIHXHJs1.__pluginVersion = "0.7.4";
99
- chunkZF6KIHXHJs1.__initData = _worklet_14153867294208_init_data;
100
- chunkZF6KIHXHJs1.__stackDetails = _e;
101
- return chunkZF6KIHXHJs1;
92
+ chunkGJSFKH4LJs1.__workletHash = 5989753634611;
93
+ chunkGJSFKH4LJs1.__pluginVersion = "0.7.4";
94
+ chunkGJSFKH4LJs1.__initData = _worklet_5989753634611_init_data;
95
+ chunkGJSFKH4LJs1.__stackDetails = _e;
96
+ return chunkGJSFKH4LJs1;
102
97
  }({
103
- _worklet_14153867294208_init_data,
98
+ _worklet_5989753634611_init_data,
104
99
  interpolate,
105
100
  progress,
106
101
  INDICATOR_ROTATION