@ohmyteeth/react-native-line-flex-message-renderer 0.1.1 → 0.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.
package/dist/index.d.mts CHANGED
@@ -9,5 +9,12 @@ type FlexMessageRendererProps = {
9
9
  };
10
10
  declare const FlexMessageRenderer: ({ json, onAction }: FlexMessageRendererProps) => import("react").JSX.Element;
11
11
  //#endregion
12
- export { FlexMessageRenderer };
12
+ //#region src/context/debug.d.ts
13
+ declare const DebugProvider: ({ children, value }: {
14
+ children: React.ReactNode;
15
+ value: boolean;
16
+ }) => import("react").JSX.Element;
17
+ declare const useDebugMode: () => boolean;
18
+ //#endregion
19
+ export { DebugProvider, FlexMessageRenderer, useDebugMode };
13
20
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/renderer.tsx"],"mappings":";;KASK;;;;EAIH;EAEA,YAAY,QAAQ;;cAGT,wBAAmB,MAAA,YAAwB,6CAAwB,IAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/renderer.tsx","../src/context/debug.tsx"],"mappings":";;KASK;;;;EAIH;EAEA,YAAY,QAAQ;;cAGT,wBAAmB,MAAA,YAAwB,6CAAwB,IAAA;;;cCdnE,kBAAa,UAAA;EAA2B,UAAU,MAAM;EAAW;sBAAgB,IAAA;cAMnF"}
package/dist/index.mjs CHANGED
@@ -1,14 +1,28 @@
1
1
  import { getActualNumericSize, getActualSize, getBorderRadius, getBorderWidth, getButtonHeight, getIconSize, getImageSize, getMarginSize, getOffset, getPaddingSize, getSpacingSize, registerComponents, renderComponent } from "@ohmyteeth/line-flex-message-renderer-core";
2
2
  import { Image, ScrollView, StyleSheet, Text, TouchableOpacity, View } from "react-native";
3
+ import React, { createContext, useCallback, useContext, useMemo, useState } from "react";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import React, { useCallback, useMemo, useState } from "react";
5
+ //#region src/context/debug.tsx
6
+ const DebugContext = createContext(false);
7
+ const DebugProvider = ({ children, value }) => /* @__PURE__ */ jsx(DebugContext.Provider, {
8
+ value,
9
+ children
10
+ });
11
+ const useDebugMode = () => {
12
+ return useContext(DebugContext);
13
+ };
14
+ //#endregion
5
15
  //#region src/components/filler.tsx
6
16
  const Filler = ({ flex }) => {
7
17
  return /* @__PURE__ */ jsx(View, { style: {
8
18
  flexGrow: 1,
9
19
  flexShrink: 0,
10
20
  flexBasis: 0,
11
- flex
21
+ flex,
22
+ ...useDebugMode() ? {
23
+ borderColor: "red",
24
+ borderWidth: 1
25
+ } : {}
12
26
  } });
13
27
  };
14
28
  //#endregion
@@ -27,13 +41,18 @@ const useParentFlexDirection = () => {
27
41
  //#region src/components/icon.tsx
28
42
  const Icon = ({ url, margin, position, offsetTop, offsetBottom, offsetStart, offsetEnd, size, scaling, aspectRatio }) => {
29
43
  const parentDirection = useParentFlexDirection();
44
+ const isDebugMode = useDebugMode();
30
45
  const width = getActualSize(getIconSize(size ?? "md"));
31
46
  const marginSize = getActualSize(getMarginSize(margin));
32
47
  return /* @__PURE__ */ jsx(View, {
33
48
  style: {
34
49
  width,
35
50
  flexShrink: 0,
36
- ...parentDirection === "column" ? { marginTop: marginSize } : { marginLeft: marginSize }
51
+ ...parentDirection === "column" ? { marginTop: marginSize } : { marginLeft: marginSize },
52
+ ...isDebugMode ? {
53
+ borderColor: "red",
54
+ borderWidth: 1
55
+ } : {}
37
56
  },
38
57
  children: /* @__PURE__ */ jsx(Image, {
39
58
  style: {
@@ -42,7 +61,11 @@ const Icon = ({ url, margin, position, offsetTop, offsetBottom, offsetStart, off
42
61
  bottom: getActualSize(getOffset(offsetBottom)),
43
62
  left: getActualSize(getOffset(offsetStart)),
44
63
  right: getActualSize(getOffset(offsetEnd)),
45
- position: position === void 0 ? "relative" : position
64
+ position: position === void 0 ? "relative" : position,
65
+ ...isDebugMode ? {
66
+ borderColor: "blue",
67
+ borderWidth: 1
68
+ } : {}
46
69
  },
47
70
  source: { uri: url }
48
71
  })
@@ -50,7 +73,7 @@ const Icon = ({ url, margin, position, offsetTop, offsetBottom, offsetStart, off
50
73
  };
51
74
  //#endregion
52
75
  //#region src/containers/bubble.tsx
53
- const Bubble = ({ body, direction, footer, header, hero, size, style, action, onClick, containerStyle, onLayout }) => {
76
+ const Bubble = ({ body, direction, footer, header, hero, size, styles, action, onClick, containerStyle, onLayout }) => {
54
77
  const hasHero = !!hero;
55
78
  const hasFooter = !!footer;
56
79
  const hasHeader = !!header;
@@ -68,7 +91,7 @@ const Bubble = ({ body, direction, footer, header, hero, size, style, action, on
68
91
  ...size === "mega" && Styles$1.megaInner,
69
92
  ...size === "giga" && Styles$1.gigaInner
70
93
  };
71
- return /* @__PURE__ */ jsx(TouchableOpacity, {
94
+ return /* @__PURE__ */ jsx(action ? TouchableOpacity : View, {
72
95
  style: [{
73
96
  ...Styles$1.bubble,
74
97
  ...Styles$1[size ?? "mega"]
@@ -80,14 +103,14 @@ const Bubble = ({ body, direction, footer, header, hero, size, style, action, on
80
103
  children: [
81
104
  header && /* @__PURE__ */ jsx(View, {
82
105
  style: {
83
- backgroundColor: style?.header?.backgroundColor ?? "#fff",
84
- borderBottomWidth: style?.header?.separator ? 1 : 0,
85
- borderColor: style?.header?.separatorColor ?? "#000"
106
+ backgroundColor: styles?.header?.backgroundColor ?? "#fff",
107
+ borderBottomWidth: styles?.header?.separator ? 1 : 0,
108
+ borderColor: styles?.header?.separatorColor ?? "#000"
86
109
  },
87
110
  children: renderComponent(header, onClick)
88
111
  }),
89
112
  hero && /* @__PURE__ */ jsx(View, {
90
- style: { backgroundColor: style?.hero?.backgroundColor ?? "#fff" },
113
+ style: { backgroundColor: styles?.hero?.backgroundColor ?? "#fff" },
91
114
  children: renderComponent(hero, onClick)
92
115
  }),
93
116
  body && /* @__PURE__ */ jsx(View, {
@@ -97,16 +120,16 @@ const Bubble = ({ body, direction, footer, header, hero, size, style, action, on
97
120
  ...hasHero && size !== "micro" && Styles$1.bodyWithHero,
98
121
  ...hasFooter && Styles$1.bodyWithFooter,
99
122
  ...!body.paddingAll && Styles$1.withPadding,
100
- backgroundColor: style?.body?.backgroundColor ?? "#fff"
123
+ backgroundColor: styles?.body?.backgroundColor ?? "#fff"
101
124
  },
102
125
  children: renderComponent(body, onClick)
103
126
  }),
104
127
  footer && /* @__PURE__ */ jsx(View, {
105
128
  style: {
106
129
  ...Styles$1.footer,
107
- backgroundColor: style?.footer?.backgroundColor ?? "#fff",
108
- borderTopWidth: style?.footer?.separator ? 1 : 0,
109
- borderColor: style?.footer?.separatorColor ?? "#000"
130
+ backgroundColor: styles?.footer?.backgroundColor ?? "#fff",
131
+ borderTopWidth: styles?.footer?.separator ? 1 : 0,
132
+ borderColor: styles?.footer?.separatorColor ?? "#000"
110
133
  },
111
134
  children: renderComponent(footer, onClick)
112
135
  })
@@ -219,13 +242,18 @@ const FlexMessageRenderer = ({ json, onAction }) => {
219
242
  //#endregion
220
243
  //#region src/components/span.tsx
221
244
  const Span = ({ text, color, size, weight, style, decoration }) => {
245
+ const isDebugMode = useDebugMode();
222
246
  return /* @__PURE__ */ jsx(Text, {
223
247
  style: {
224
248
  color,
225
249
  fontSize: getActualNumericSize(getIconSize(size)),
226
250
  fontStyle: style,
227
251
  fontWeight: weight === "regular" ? "400" : weight,
228
- textDecorationLine: decoration !== "none" ? decoration : void 0
252
+ textDecorationLine: decoration !== "none" ? decoration : void 0,
253
+ ...isDebugMode ? {
254
+ borderColor: "red",
255
+ borderWidth: 1
256
+ } : {}
229
257
  },
230
258
  children: text
231
259
  });
@@ -234,14 +262,15 @@ const Span = ({ text, color, size, weight, style, decoration }) => {
234
262
  //#region src/components/button.tsx
235
263
  const Button = ({ action, adjustMode, color, flex, gravity, height, margin, offsetBottom, offsetEnd, offsetStart, offsetTop, position, scaling, style, onClick }) => {
236
264
  const parentDirection = useParentFlexDirection();
265
+ const isDebugMode = useDebugMode();
237
266
  const handleClick = () => {
238
267
  if (action) onClick?.(action);
239
268
  };
240
269
  const resolvedStyle = style ?? "link";
241
- const textColor = resolvedStyle === "primary" ? "#fff" : resolvedStyle === "link" ? "#42659a" : void 0;
270
+ const textColor = resolvedStyle === "primary" ? "#fff" : resolvedStyle === "secondary" ? "#111111" : resolvedStyle === "link" ? "#42659a" : void 0;
242
271
  return /* @__PURE__ */ jsx(TouchableOpacity, {
243
272
  onPress: handleClick,
244
- children: /* @__PURE__ */ jsx(View, {
273
+ children: /* @__PURE__ */ jsxs(View, {
245
274
  style: {
246
275
  ...resolvedStyle === "primary" ? {
247
276
  backgroundColor: "#17c950",
@@ -254,6 +283,17 @@ const Button = ({ action, adjustMode, color, flex, gravity, height, margin, offs
254
283
  alignItems: "center",
255
284
  borderRadius: 8
256
285
  } : {},
286
+ ...resolvedStyle === "secondary" ? {
287
+ backgroundColor: "#dcdfe5",
288
+ width: "100%",
289
+ paddingTop: 0,
290
+ paddingBottom: 0,
291
+ paddingLeft: 16,
292
+ paddingRight: 16,
293
+ justifyContent: "center",
294
+ alignItems: "center",
295
+ borderRadius: 8
296
+ } : {},
257
297
  ...resolvedStyle === "link" ? {
258
298
  alignItems: "center",
259
299
  justifyContent: "center",
@@ -271,12 +311,19 @@ const Button = ({ action, adjustMode, color, flex, gravity, height, margin, offs
271
311
  ...parentDirection === "column" ? { marginTop: getActualSize(getMarginSize(margin)) } : { marginLeft: getActualSize(getMarginSize(margin)) },
272
312
  position: position === void 0 ? "relative" : position,
273
313
  height: getActualSize(getButtonHeight(height)),
274
- ...color !== void 0 ? { backgroundColor: color } : {}
314
+ ...color !== void 0 ? { backgroundColor: color } : {},
315
+ ...isDebugMode ? {
316
+ borderColor: "red",
317
+ borderWidth: 1
318
+ } : {}
275
319
  },
276
- children: action.type === "uri" && /* @__PURE__ */ jsx(Text, {
320
+ children: [action.type === "uri" && /* @__PURE__ */ jsx(Text, {
277
321
  style: { color: textColor },
278
322
  children: action.label
279
- })
323
+ }), action.type === "postback" && /* @__PURE__ */ jsx(Text, {
324
+ style: { color: textColor },
325
+ children: action.displayText
326
+ })]
280
327
  })
281
328
  });
282
329
  };
@@ -284,6 +331,7 @@ const Button = ({ action, adjustMode, color, flex, gravity, height, margin, offs
284
331
  //#region src/components/image.tsx
285
332
  const Image$1 = ({ url, flex, position, margin, offsetTop, offsetBottom, offsetStart, offsetEnd, align, gravity, size, aspectRatio, aspectMode, backgroundColor, animated, action, onClick }) => {
286
333
  const parentDirection = useParentFlexDirection();
334
+ const isDebugMode = useDebugMode();
287
335
  const rawWidth = getImageSize(size);
288
336
  const sizeWidth = rawWidth === "unset" ? void 0 : getActualSize(rawWidth);
289
337
  const width = flex ? "100%" : sizeWidth;
@@ -305,11 +353,27 @@ const Image$1 = ({ url, flex, position, margin, offsetTop, offsetBottom, offsetS
305
353
  marginBottom: 0,
306
354
  marginRight: "auto",
307
355
  marginLeft: "auto"
308
- }
356
+ },
357
+ ...isDebugMode ? {
358
+ borderColor: "red",
359
+ borderWidth: 1
360
+ } : {}
309
361
  },
310
- children: /* @__PURE__ */ jsx(TouchableOpacity, {
362
+ children: action ? /* @__PURE__ */ jsx(TouchableOpacity, {
311
363
  onPress: handleClick,
312
- style: width !== void 0 ? { width } : { height: "100%" },
364
+ style: width !== void 0 ? {
365
+ width,
366
+ ...isDebugMode ? {
367
+ borderColor: "red",
368
+ borderWidth: 1
369
+ } : {}
370
+ } : {
371
+ height: "100%",
372
+ ...isDebugMode ? {
373
+ borderColor: "red",
374
+ borderWidth: 1
375
+ } : {}
376
+ },
313
377
  children: /* @__PURE__ */ jsx(Image, {
314
378
  style: {
315
379
  aspectRatio: aspectRatio?.split(":").join("/") ?? "1",
@@ -320,10 +384,37 @@ const Image$1 = ({ url, flex, position, margin, offsetTop, offsetBottom, offsetS
320
384
  bottom: getActualSize(getOffset(offsetBottom)),
321
385
  left: getActualSize(getOffset(offsetStart)),
322
386
  right: getActualSize(getOffset(offsetEnd)),
323
- ...width !== void 0 ? { width } : { height: "100%" }
387
+ ...width !== void 0 ? { width } : {
388
+ height: "auto",
389
+ width: "100%"
390
+ },
391
+ ...isDebugMode ? {
392
+ borderColor: "blue",
393
+ borderWidth: 1
394
+ } : {}
324
395
  },
325
396
  source: { uri: url }
326
397
  })
398
+ }) : /* @__PURE__ */ jsx(Image, {
399
+ style: {
400
+ aspectRatio: aspectRatio?.split(":").join("/") ?? "1",
401
+ objectFit: aspectMode === "cover" ? "cover" : "contain",
402
+ backgroundColor,
403
+ position: position === void 0 ? "relative" : position,
404
+ top: getActualSize(getOffset(offsetTop)),
405
+ bottom: getActualSize(getOffset(offsetBottom)),
406
+ left: getActualSize(getOffset(offsetStart)),
407
+ right: getActualSize(getOffset(offsetEnd)),
408
+ ...width !== void 0 ? { width } : {
409
+ height: "auto",
410
+ width: "100%"
411
+ },
412
+ ...isDebugMode ? {
413
+ borderColor: "blue",
414
+ borderWidth: 1
415
+ } : {}
416
+ },
417
+ source: { uri: url }
327
418
  })
328
419
  });
329
420
  };
@@ -342,55 +433,68 @@ const Box = ({ layout, contents, backgroundColor, borderColor, borderWidth, corn
342
433
  if (action) onClick?.(action);
343
434
  };
344
435
  const parentDirection = useParentFlexDirection();
436
+ const isDebugMode = useDebugMode();
345
437
  const ownDirection = layout === "vertical" ? "column" : "row";
346
- return /* @__PURE__ */ jsx(TouchableOpacity, {
347
- style: {
348
- ...layout === "baseline" ? {
349
- flexDirection: "row",
350
- alignItems: "baseline",
351
- columnGap: getActualSize(getSpacingSize(spacing))
352
- } : layout === "horizontal" ? {
353
- flexDirection: "row",
354
- columnGap: getActualSize(getSpacingSize(spacing))
355
- } : {
356
- flexDirection: "column",
357
- rowGap: getActualSize(getSpacingSize(spacing))
358
- },
359
- ...flex !== void 0 ? {
360
- flexGrow: flex === 0 ? 0 : flex,
361
- flexShrink: 0,
362
- flexBasis: flex === 0 || parentDirection === "column" ? "auto" : 0
363
- } : { flexShrink: 1 },
364
- width: getActualSize(width) ?? (layout === "baseline" ? "100%" : void 0),
365
- maxWidth: getActualSize(maxWidth),
366
- height: getActualSize(height),
367
- maxHeight: getActualSize(maxHeight),
368
- backgroundColor: backgroundColor ?? background?.startColor,
369
- borderColor,
370
- borderWidth: getActualNumericSize(getBorderWidth(borderWidth)),
371
- borderRadius: getActualNumericSize(getBorderRadius(cornerRadius)),
372
- ...cornerRadius !== void 0 ? { overflow: "hidden" } : {},
373
- paddingTop: getActualSize(getPaddingSize(paddingTop)),
374
- paddingBottom: getActualSize(getPaddingSize(paddingBottom)),
375
- paddingLeft: getActualSize(getPaddingSize(paddingStart)),
376
- paddingRight: getActualSize(getPaddingSize(paddingEnd)),
377
- padding: getActualSize(getPaddingSize(paddingAll)),
378
- ...parentDirection === "column" ? { marginTop: getActualSize(getMarginSize(margin)) } : { marginLeft: getActualSize(getMarginSize(margin)) },
379
- position: position === void 0 ? "relative" : position,
380
- alignItems: alignItems ?? (layout === "baseline" ? "baseline" : void 0),
381
- justifyContent,
382
- top: getActualSize(getOffset(offsetTop)),
383
- bottom: getActualSize(getOffset(offsetBottom)),
384
- left: getActualSize(getOffset(offsetStart)),
385
- right: getActualSize(getOffset(offsetEnd)),
386
- ...width ? { flexShrink: 0 } : {}
438
+ const containerStyle = {
439
+ ...layout === "baseline" ? {
440
+ flexDirection: "row",
441
+ alignItems: "baseline",
442
+ columnGap: getActualSize(getSpacingSize(spacing))
443
+ } : layout === "horizontal" ? {
444
+ flexDirection: "row",
445
+ columnGap: getActualSize(getSpacingSize(spacing))
446
+ } : {
447
+ flexDirection: "column",
448
+ rowGap: getActualSize(getSpacingSize(spacing))
387
449
  },
450
+ ...flex !== void 0 ? {
451
+ flexGrow: flex === 0 ? 0 : flex,
452
+ flexShrink: 0,
453
+ flexBasis: flex === 0 || parentDirection === "column" ? "auto" : 0
454
+ } : { flexShrink: 1 },
455
+ width: getActualSize(width) ?? (layout === "baseline" ? "100%" : void 0),
456
+ maxWidth: getActualSize(maxWidth),
457
+ height: getActualSize(height),
458
+ maxHeight: getActualSize(maxHeight),
459
+ backgroundColor: backgroundColor ?? background?.startColor,
460
+ borderColor,
461
+ borderWidth: getActualNumericSize(getBorderWidth(borderWidth)),
462
+ borderRadius: getActualNumericSize(getBorderRadius(cornerRadius)),
463
+ ...cornerRadius !== void 0 ? { overflow: "hidden" } : {},
464
+ paddingTop: getActualSize(getPaddingSize(paddingTop)),
465
+ paddingBottom: getActualSize(getPaddingSize(paddingBottom)),
466
+ paddingLeft: getActualSize(getPaddingSize(paddingStart)),
467
+ paddingRight: getActualSize(getPaddingSize(paddingEnd)),
468
+ padding: getActualSize(getPaddingSize(paddingAll)),
469
+ ...parentDirection === "column" ? { marginTop: getActualSize(getMarginSize(margin)) } : { marginLeft: getActualSize(getMarginSize(margin)) },
470
+ position: position === void 0 ? "relative" : position,
471
+ alignItems: alignItems ?? (layout === "baseline" ? "baseline" : void 0),
472
+ justifyContent,
473
+ top: getActualSize(getOffset(offsetTop)),
474
+ bottom: getActualSize(getOffset(offsetBottom)),
475
+ left: getActualSize(getOffset(offsetStart)),
476
+ right: getActualSize(getOffset(offsetEnd)),
477
+ ...width ? { flexShrink: 0 } : {},
478
+ ...isDebugMode ? {
479
+ borderColor: "red",
480
+ borderWidth: 1
481
+ } : {}
482
+ };
483
+ if (action) return /* @__PURE__ */ jsx(TouchableOpacity, {
484
+ style: containerStyle,
388
485
  onPress: handleClick,
389
486
  children: /* @__PURE__ */ jsx(ParentFlexDirectionProvider, {
390
487
  direction: ownDirection,
391
488
  children: contents.map((content, i) => /* @__PURE__ */ jsx(React.Fragment, { children: renderComponent(content) }, i))
392
489
  })
393
490
  });
491
+ return /* @__PURE__ */ jsx(View, {
492
+ style: containerStyle,
493
+ children: /* @__PURE__ */ jsx(ParentFlexDirectionProvider, {
494
+ direction: ownDirection,
495
+ children: contents.map((content, i) => /* @__PURE__ */ jsx(React.Fragment, { children: renderComponent(content) }, i))
496
+ })
497
+ });
394
498
  };
395
499
  //#endregion
396
500
  //#region src/hooks/useInheritedMarginSize.tsx
@@ -405,6 +509,7 @@ const MarginSizeProvider = ({ children, marginSize }) => {
405
509
  //#region src/components/text.tsx
406
510
  const Text$1 = ({ text, contents, adjustMode, flex, margin, position, offsetTop, offsetBottom, offsetStart, offsetEnd, size, scaling, align, gravity, wrap, lineSpacing, maxLines, weight, color, style, decoration, action, onClick }) => {
407
511
  const parentDirection = useParentFlexDirection();
512
+ const isDebugMode = useDebugMode();
408
513
  const handleClick = () => {
409
514
  if (action) onClick?.(action);
410
515
  };
@@ -423,7 +528,11 @@ const Text$1 = ({ text, contents, adjustMode, flex, margin, position, offsetTop,
423
528
  right: getActualSize(getOffset(offsetEnd)),
424
529
  position: position === void 0 ? "relative" : position,
425
530
  width: align === "center" || align === "end" && flex !== 0 ? "100%" : void 0,
426
- ...(align === "center" || align === "end") && flex === void 0 ? { flexShrink: 1 } : {}
531
+ ...(align === "center" || align === "end") && flex === void 0 ? { flexShrink: 1 } : {},
532
+ ...isDebugMode ? {
533
+ borderColor: "red",
534
+ borderWidth: 1
535
+ } : {}
427
536
  };
428
537
  const numberOfLines = maxLines ?? (wrap || parentDirection !== "column" ? void 0 : 1);
429
538
  const textStyle = {
@@ -432,7 +541,11 @@ const Text$1 = ({ text, contents, adjustMode, flex, margin, position, offsetTop,
432
541
  fontStyle: style,
433
542
  fontWeight: weight === "regular" ? "400" : weight,
434
543
  textAlign: align === "center" ? "center" : align === "end" ? "right" : "left",
435
- textDecorationLine: decoration !== "none" ? decoration : void 0
544
+ textDecorationLine: decoration !== "none" ? decoration : void 0,
545
+ ...isDebugMode ? {
546
+ borderColor: "blue",
547
+ borderWidth: 1
548
+ } : {}
436
549
  };
437
550
  if (text) return /* @__PURE__ */ jsx(TouchableOpacity, {
438
551
  style: containerStyle,
@@ -465,9 +578,14 @@ const Text$1 = ({ text, contents, adjustMode, flex, margin, position, offsetTop,
465
578
  //#region src/components/separator.tsx
466
579
  const Separator = ({ margin, color }) => {
467
580
  const parentDirection = useParentFlexDirection();
581
+ const isDebugMode = useDebugMode();
468
582
  return /* @__PURE__ */ jsx(View, { style: {
469
583
  height: 1,
470
584
  backgroundColor: color ?? "#d4d6da",
585
+ ...isDebugMode ? {
586
+ borderColor: "red",
587
+ borderWidth: 1
588
+ } : {},
471
589
  ...parentDirection === "column" ? { marginTop: getActualSize(getMarginSize(margin)) } : { marginLeft: getActualSize(getMarginSize(margin)) }
472
590
  } });
473
591
  };
@@ -485,6 +603,6 @@ registerComponents({
485
603
  video: Video
486
604
  });
487
605
  //#endregion
488
- export { FlexMessageRenderer };
606
+ export { DebugProvider, FlexMessageRenderer, useDebugMode };
489
607
 
490
608
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Styles","Touchable","Image","RNImage","Text","RNText","Image","Text"],"sources":["../src/components/filler.tsx","../src/hooks/useParentFlexDirection.tsx","../src/components/icon.tsx","../src/containers/bubble.tsx","../src/containers/carousel.tsx","../src/renderer.tsx","../src/components/span.tsx","../src/components/button.tsx","../src/components/image.tsx","../src/components/video.tsx","../src/components/box.tsx","../src/hooks/useInheritedMarginSize.tsx","../src/components/text.tsx","../src/components/separator.tsx","../src/index.ts"],"sourcesContent":["import type { FillerComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { View } from \"react-native\";\r\n\r\nexport const Filler = ({ flex }: FillerComponent) => {\r\n return <View style={{ flexGrow: 1, flexShrink: 0, flexBasis: 0, flex }} />;\r\n};\r\n","import React from \"react\";\r\n\r\nconst ParentFlexDirectionContext = React.createContext<\"row\" | \"column\">(\"column\");\r\n\r\nexport const ParentFlexDirectionProvider = ({\r\n children,\r\n direction,\r\n}: {\r\n children: React.ReactNode;\r\n direction: \"row\" | \"column\";\r\n}) => {\r\n return <ParentFlexDirectionContext.Provider value={direction}>{children}</ParentFlexDirectionContext.Provider>;\r\n};\r\n\r\nexport const useParentFlexDirection = () => {\r\n return React.useContext(ParentFlexDirectionContext);\r\n};\r\n","import {\r\n getActualSize,\r\n getIconSize,\r\n getMarginSize,\r\n getOffset,\r\n type IconComponent,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { Image, View } from \"react-native\";\r\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\r\n\r\nexport const Icon = ({\r\n url,\r\n margin,\r\n position,\r\n offsetTop,\r\n offsetBottom,\r\n offsetStart,\r\n offsetEnd,\r\n size,\r\n scaling,\r\n aspectRatio,\r\n}: IconComponent) => {\r\n const parentDirection = useParentFlexDirection();\r\n // getIconSize(undefined) returns undefined; without this fallback an unsized icon renders at its source's native pixel size.\r\n const width = getActualSize(getIconSize(size ?? \"md\"));\r\n const marginSize = getActualSize(getMarginSize(margin));\r\n\r\n return (\r\n <View\r\n style={{\r\n width,\r\n flexShrink: 0,\r\n // `margin` is space along whichever axis the parent lays siblings out on — marginTop in a\r\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\r\n ...(parentDirection === \"column\" ? { marginTop: marginSize } : { marginLeft: marginSize }),\r\n }}\r\n >\r\n <Image\r\n style={{\r\n aspectRatio: aspectRatio?.split(\":\").join(\"/\") ?? \"1\",\r\n top: getActualSize(getOffset(offsetTop)),\r\n bottom: getActualSize(getOffset(offsetBottom)),\r\n left: getActualSize(getOffset(offsetStart)),\r\n right: getActualSize(getOffset(offsetEnd)),\r\n position: position === undefined ? \"relative\" : position,\r\n }}\r\n source={{ uri: url }}\r\n />\r\n </View>\r\n );\r\n};\r\n","import {\r\n renderComponent,\r\n type BubbleContainer,\r\n type ClickHandler,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { StyleSheet, TouchableOpacity, View, type StyleProp, type ViewStyle, type LayoutChangeEvent } from \"react-native\";\r\n\r\nexport const Bubble = ({\r\n body,\r\n direction,\r\n footer,\r\n header,\r\n hero,\r\n size,\r\n style,\r\n action,\r\n onClick,\r\n containerStyle,\r\n onLayout,\r\n}: BubbleContainer & {\r\n onClick?: ClickHandler | undefined;\r\n // Native-only, not part of the Flex Message spec: lets Carousel measure every bubble's natural height\r\n // and stretch them all to match the tallest one, since ScrollView content doesn't do this on its own.\r\n containerStyle?: StyleProp<ViewStyle>;\r\n onLayout?: ((event: LayoutChangeEvent) => void) | undefined;\r\n}) => {\r\n const hasHero = !!hero;\r\n const hasFooter = !!footer;\r\n const hasHeader = !!header;\r\n const handleClick = () => {\r\n if (action) {\r\n onClick?.(action);\r\n }\r\n };\r\n\r\n const inner = {\r\n ...Styles.bubbleInner,\r\n // Only when Carousel hands us an explicit (now definite, non-percentage) height to match: without\r\n // this, bubbleInner stays content-sized and the extra space added below is just blank/transparent.\r\n ...(containerStyle !== undefined && { flexGrow: 1 }),\r\n ...(size === \"nano\" && Styles.nanoInner),\r\n ...(size === \"micro\" && Styles.microInner),\r\n ...(size === \"deca\" && Styles.decaInner),\r\n ...(size === \"hecto\" && Styles.hectoInner),\r\n ...(size === \"kilo\" && Styles.kiloInner),\r\n ...(size === \"mega\" && Styles.megaInner),\r\n ...(size === \"giga\" && Styles.gigaInner),\r\n };\r\n\r\n return (\r\n <TouchableOpacity\r\n style={[{ ...Styles.bubble, ...Styles[size ?? \"mega\"] }, containerStyle]}\r\n onPress={handleClick}\r\n onLayout={onLayout}\r\n >\r\n <View style={inner}>\r\n {header && (\r\n <View\r\n style={{\r\n backgroundColor: style?.header?.backgroundColor ?? \"#fff\",\r\n borderBottomWidth: style?.header?.separator ? 1 : 0,\r\n borderColor: style?.header?.separatorColor ?? \"#000\",\r\n }}\r\n >\r\n {renderComponent(header, onClick)}\r\n </View>\r\n )}\r\n\r\n {hero && (\r\n <View style={{ backgroundColor: style?.hero?.backgroundColor ?? \"#fff\" }}>\r\n {renderComponent(hero, onClick)}\r\n </View>\r\n )}\r\n\r\n {body && (\r\n <View\r\n style={{\r\n ...Styles.body,\r\n ...(hasHeader && !body.paddingAll && Styles.bodyWithHeader),\r\n // The web port zeroes this out specifically for \"micro\" bubbles (see its CSS), since a\r\n // micro body commonly sets its own smaller `paddingAll` — without this exception the two\r\n // paddings stack (this wrapper's 20px plus the body Box's own), roughly doubling the gap.\r\n ...(hasHero && size !== \"micro\" && Styles.bodyWithHero),\r\n ...(hasFooter && Styles.bodyWithFooter),\r\n ...(!body.paddingAll && Styles.withPadding),\r\n backgroundColor: style?.body?.backgroundColor ?? \"#fff\",\r\n }}\r\n >\r\n {renderComponent(body, onClick)}\r\n </View>\r\n )}\r\n\r\n {footer && (\r\n <View\r\n style={{\r\n ...Styles.footer,\r\n backgroundColor: style?.footer?.backgroundColor ?? \"#fff\",\r\n borderTopWidth: style?.footer?.separator ? 1 : 0,\r\n borderColor: style?.footer?.separatorColor ?? \"#000\",\r\n }}\r\n >\r\n {renderComponent(footer, onClick)}\r\n </View>\r\n )}\r\n </View>\r\n </TouchableOpacity>\r\n );\r\n};\r\n\r\nconst Styles = StyleSheet.create({\r\n bubble: {\r\n flexDirection: \"column\",\r\n width: \"100%\",\r\n },\r\n bubbleInner: {\r\n flexDirection: \"column\",\r\n overflow: \"hidden\",\r\n borderRadius: 10,\r\n },\r\n nano: {\r\n width: 120,\r\n maxWidth: 120,\r\n },\r\n nanoInner: {\r\n borderRadius: 10,\r\n },\r\n micro: {\r\n width: 160,\r\n maxWidth: 160,\r\n },\r\n microInner: {\r\n borderRadius: 10,\r\n },\r\n deca: {\r\n width: 220,\r\n maxWidth: 220,\r\n },\r\n decaInner: {\r\n borderRadius: 10,\r\n },\r\n hecto: {\r\n width: 241,\r\n maxWidth: 241,\r\n },\r\n hectoInner: {\r\n borderRadius: 10,\r\n },\r\n kilo: {\r\n width: 260,\r\n maxWidth: 260,\r\n },\r\n kiloInner: {\r\n borderRadius: 10,\r\n },\r\n mega: {\r\n width: 300,\r\n maxWidth: 300,\r\n },\r\n megaInner: {\r\n borderRadius: 17,\r\n },\r\n giga: {\r\n width: 340,\r\n maxWidth: 340,\r\n },\r\n gigaInner: {\r\n borderRadius: 5,\r\n },\r\n body: {\r\n flexGrow: 1,\r\n },\r\n withPadding: {\r\n padding: 20,\r\n },\r\n bodyWithHeader: {\r\n padding: 20,\r\n },\r\n bodyWithHero: {\r\n padding: 20,\r\n },\r\n bodyWithFooter: {\r\n paddingBottom: 10,\r\n },\r\n footer: {\r\n padding: 10,\r\n },\r\n});\r\n","import {\r\n type CarouselContainer,\r\n type ClickHandler,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { useCallback, useState } from \"react\";\r\nimport { ScrollView, StyleSheet, type LayoutChangeEvent } from \"react-native\";\r\nimport { Bubble } from \"./bubble.js\";\r\n\r\nexport const Carousel = ({ contents, onClick }: CarouselContainer & { onClick?: ClickHandler }) => {\r\n // `alignItems: \"stretch\"` doesn't equalize bubble heights here — ScrollView content doesn't participate\r\n // in cross-axis stretch the way a plain flex row does — so each bubble's natural height is measured via\r\n // onLayout, and once all have reported in, every bubble is pinned to the tallest one's height.\r\n const [heights, setHeights] = useState<Record<number, number>>({});\r\n const measured = Object.keys(heights).length === contents.length;\r\n const maxHeight = measured ? Math.max(...Object.values(heights)) : undefined;\r\n\r\n const handleLayout = useCallback((index: number, event: LayoutChangeEvent) => {\r\n const { height } = event.nativeEvent.layout;\r\n setHeights((prev) => (prev[index] === height ? prev : { ...prev, [index]: height }));\r\n }, []);\r\n\r\n return (\r\n // TODO: web uses `scroll-snap-type: x mandatory` to snap between bubbles; ScrollView has no direct\r\n // equivalent (would need `snapToInterval`/`snapToOffsets`, which assume a fixed bubble width per size).\r\n <ScrollView horizontal contentContainerStyle={Styles.carousel}>\r\n {contents.map((bubble, index) => (\r\n <Bubble\r\n key={index}\r\n {...bubble}\r\n onClick={onClick}\r\n containerStyle={maxHeight !== undefined ? { height: maxHeight } : undefined}\r\n onLayout={measured ? undefined : (event) => handleLayout(index, event)}\r\n />\r\n ))}\r\n </ScrollView>\r\n );\r\n};\r\n\r\nconst Styles = StyleSheet.create({\r\n carousel: {\r\n flexDirection: \"row\",\r\n columnGap: 20,\r\n // Not \"stretch\": that's exactly the unreliable ScrollView cross-axis stretch this component works\r\n // around above — leaving it on lets the very first (pre-measurement) layout pass report an inflated\r\n // height, which then gets locked in as the \"tallest\" bubble for everyone to match.\r\n alignItems: \"flex-start\",\r\n },\r\n});\r\n","import type {\r\n Action,\r\n BubbleContainer,\r\n CarouselContainer,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { useCallback, useMemo } from \"react\";\r\nimport { Bubble } from \"./containers/bubble.js\";\r\nimport { Carousel } from \"./containers/carousel.js\";\r\n\r\ntype FlexMessageRendererProps = {\r\n /**\r\n * A JSON string representing the Flex Message to be rendered.\r\n */\r\n json: string;\r\n\r\n onAction?: (action: Action) => void;\r\n};\r\n\r\nexport const FlexMessageRenderer = ({ json, onAction }: FlexMessageRendererProps) => {\r\n const data = useMemo(() => {\r\n return JSON.parse(json) as CarouselContainer | BubbleContainer;\r\n }, [json]);\r\n const handleClick = useCallback(\r\n (action?: Action) => {\r\n if (action) {\r\n onAction?.(action);\r\n }\r\n },\r\n [onAction],\r\n );\r\n\r\n switch (data.type) {\r\n case \"bubble\":\r\n return <Bubble {...data} onClick={handleClick} />;\r\n\r\n case \"carousel\":\r\n return <Carousel {...data} onClick={handleClick} />;\r\n\r\n default:\r\n throw new Error(`Unsupported Flex Message type: ${data}`);\r\n }\r\n};\r\n","import { getActualNumericSize, getIconSize, type SpanComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { Text } from \"react-native\";\r\n\r\nexport const Span = ({ text, color, size, weight, style, decoration }: SpanComponent) => {\r\n return <Text style={{\r\n color,\r\n fontSize: getActualNumericSize(getIconSize(size)),\r\n fontStyle: style,\r\n fontWeight: weight === \"regular\" ? \"400\" : weight,\r\n textDecorationLine: decoration !== \"none\" ? decoration : undefined,\r\n }}>\r\n {text}\r\n </Text>;\r\n};\r\n","import {\r\n getActualSize,\r\n getButtonHeight,\r\n getMarginSize,\r\n getOffset,\r\n type ButtonComponent,\r\n type ClickHandler,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { Text, TouchableOpacity as Touchable, View } from \"react-native\";\r\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\r\n\r\nexport const Button = ({\r\n action,\r\n adjustMode,\r\n color,\r\n flex,\r\n gravity,\r\n height,\r\n margin,\r\n offsetBottom,\r\n offsetEnd,\r\n offsetStart,\r\n offsetTop,\r\n position,\r\n scaling,\r\n style,\r\n onClick,\r\n}: ButtonComponent & { onClick?: ClickHandler | undefined }) => {\r\n const parentDirection = useParentFlexDirection();\r\n const handleClick = () => {\r\n if (action) {\r\n onClick?.(action);\r\n }\r\n };\r\n // LINE's default button style is \"link\" when unspecified (matches the web port's `style ?? \"link\"`).\r\n const resolvedStyle = style ?? \"link\";\r\n const textColor = resolvedStyle === \"primary\" ? \"#fff\" : resolvedStyle === \"link\" ? \"#42659a\" : undefined;\r\n\r\n return (\r\n <Touchable onPress={handleClick}>\r\n <View\r\n style={{\r\n ...(resolvedStyle === \"primary\" ? {\r\n backgroundColor: \"#17c950\",\r\n width: \"100%\",\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n paddingLeft: 16,\r\n paddingRight: 16,\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n borderRadius: 8,\r\n } : {}),\r\n ...(resolvedStyle === \"link\" ? {\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"transparent\",\r\n } : {}),\r\n // \"secondary\" has no dedicated look in the web port either (its CSS class is empty) — it just\r\n // renders as a plain, unstyled box with default text color.\r\n // Only override flex sizing when `flex` is actually specified (see text.tsx/box.tsx for why).\r\n // flexBasis is explicitly \"auto\" (matching the web port's `flex 0 auto`, not `flex 0 0`) so the\r\n // explicit `height` below still wins — an explicit flexBasis otherwise overrides `height`\r\n // entirely for flex layout, collapsing the button whenever its parent has no space to grow into.\r\n ...(flex !== undefined ? { flexGrow: flex === 0 ? 0 : flex, flexShrink: 0, flexBasis: \"auto\" } : {}),\r\n top: getActualSize(getOffset(offsetTop)),\r\n bottom: getActualSize(getOffset(offsetBottom)),\r\n left: getActualSize(getOffset(offsetStart)),\r\n right: getActualSize(getOffset(offsetEnd)),\r\n // `margin` is space along whichever axis the parent lays siblings out on — marginTop in a\r\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\r\n ...(parentDirection === \"column\"\r\n ? { marginTop: getActualSize(getMarginSize(margin)) }\r\n : { marginLeft: getActualSize(getMarginSize(margin)) }),\r\n position: position === undefined ? \"relative\" : position,\r\n height: getActualSize(getButtonHeight(height)),\r\n // `color` should only override the style preset's background when it's actually provided —\r\n // otherwise this erases the \"primary\" green / makes \"link\" buttons blend into the card.\r\n ...(color !== undefined ? { backgroundColor: color } : {}),\r\n }}\r\n >\r\n {action.type === \"uri\" && <Text style={{ color: textColor }}>{action.label}</Text>}\r\n </View>\r\n </Touchable>\r\n );\r\n};\r\n","import {\r\n getImageSize,\r\n getMarginSize,\r\n getOffset,\r\n type ImageComponent,\r\n type ClickHandler,\r\n getActualSize,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { Image as RNImage, TouchableOpacity, View } from \"react-native\";\r\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\r\n\r\nexport const Image = ({\r\n url,\r\n flex,\r\n position,\r\n margin,\r\n offsetTop,\r\n offsetBottom,\r\n offsetStart,\r\n offsetEnd,\r\n align,\r\n gravity,\r\n size,\r\n aspectRatio,\r\n aspectMode,\r\n backgroundColor,\r\n animated,\r\n action,\r\n onClick,\r\n}: ImageComponent & { onClick?: ClickHandler | undefined }) => {\r\n const parentDirection = useParentFlexDirection();\r\n const rawWidth = getImageSize(size);\r\n const sizeWidth = rawWidth === \"unset\" ? undefined : getActualSize(rawWidth);\r\n // When `flex` is meant to grow this image within a row/column of siblings, let it fill 100% of\r\n // whatever space it's allocated instead of the fixed `size` width — otherwise the fixed width fights\r\n // the flex-grown container for space (the fixed width wins, and the image can end up misplaced or\r\n // fully covered by a sibling that gets laid out for the space the image should have used).\r\n const width = flex ? \"100%\" : sizeWidth;\r\n const handleClick = () => {\r\n if (action) {\r\n onClick?.(action);\r\n }\r\n };\r\n\r\n return (\r\n <View\r\n style={{\r\n flexDirection: \"row\",\r\n justifyContent: \"center\",\r\n // Explicit flexGrow/flexShrink, not the bare `flex` shorthand (only to avoid ambiguity — the\r\n // shorthand's implied flexBasis:0% is actually what we want here, unlike box.tsx/text.tsx).\r\n // flexBasis stays \"0\", not \"auto\": an \"auto\" basis makes RN measure this View's content to find\r\n // its natural size, and Image's own natural-size measurement falls back to the source asset's\r\n // native pixel size instead of respecting `width`, letting one image claim all of its siblings'\r\n // space. Basis 0 sidesteps that measurement entirely — the final size is already fully\r\n // determined by the explicit width/aspectRatio below regardless of the starting basis.\r\n ...(flex !== undefined\r\n ? { flexGrow: flex === 0 ? 0 : flex, flexShrink: 0, flexBasis: flex === 0 ? \"auto\" : 0 }\r\n : { flexShrink: 1 }),\r\n // Same rule as below: only force a % height when width can't drive sizing on its own — otherwise\r\n // this resolves against whatever definite height it finds further up and stretches the whole card.\r\n ...(width === undefined ? { height: \"100%\" } : {}),\r\n // Auto left/right margins center a naturally-sized image, but they compete with flexGrow for the\r\n // same leftover space — skip them when `flex` is meant to actually grow this image instead.\r\n // `margin` itself is space along whichever axis the parent lays siblings out on — marginTop in a\r\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\r\n ...(margin\r\n ? parentDirection === \"column\"\r\n ? { marginTop: getActualSize(getMarginSize(margin)) }\r\n : { marginLeft: getActualSize(getMarginSize(margin)) }\r\n : flex\r\n ? {}\r\n : { marginTop: 0, marginBottom: 0, marginRight: \"auto\", marginLeft: \"auto\" }),\r\n }}\r\n >\r\n {/* Only one of width/height may be definite — the other must stay unset so aspectRatio can derive it. */}\r\n <TouchableOpacity onPress={handleClick} style={width !== undefined ? { width } : { height: \"100%\" }}>\r\n <RNImage\r\n style={{\r\n aspectRatio: aspectRatio?.split(\":\").join(\"/\") ?? \"1\",\r\n objectFit: aspectMode === \"cover\" ? \"cover\" : \"contain\",\r\n backgroundColor,\r\n position: position === undefined ? \"relative\" : position,\r\n top: getActualSize(getOffset(offsetTop)),\r\n bottom: getActualSize(getOffset(offsetBottom)),\r\n left: getActualSize(getOffset(offsetStart)),\r\n right: getActualSize(getOffset(offsetEnd)),\r\n ...(width !== undefined ? { width } : { height: \"100%\" }),\r\n }}\r\n source={{ uri: url }}\r\n />\r\n </TouchableOpacity>\r\n </View>\r\n );\r\n};\r\n","import type { VideoComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\r\n\r\nimport type { ClickHandler } from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { TouchableOpacity } from \"react-native\";\r\n\r\nexport const Video = ({\r\n action,\r\n onClick,\r\n}: VideoComponent & { onClick?: ClickHandler | undefined }) => {\r\n const handleClick = () => {\r\n if (action) {\r\n onClick?.(action);\r\n }\r\n };\r\n\r\n return <TouchableOpacity onPress={handleClick} />;\r\n};\r\n","import {\r\n getActualNumericSize,\r\n getActualSize,\r\n getBorderRadius,\r\n getBorderWidth,\r\n getMarginSize,\r\n getOffset,\r\n getPaddingSize,\r\n getSpacingSize,\r\n renderComponent,\r\n type BoxComponent,\r\n type ClickHandler,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport React from \"react\";\r\nimport { TouchableOpacity, type ViewStyle } from \"react-native\";\r\nimport { ParentFlexDirectionProvider, useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\r\n\r\nexport const Box = ({\r\n layout,\r\n contents,\r\n backgroundColor,\r\n borderColor,\r\n borderWidth,\r\n cornerRadius,\r\n width,\r\n maxWidth,\r\n height,\r\n maxHeight,\r\n flex,\r\n spacing,\r\n margin,\r\n paddingAll,\r\n paddingTop,\r\n paddingBottom,\r\n paddingStart,\r\n paddingEnd,\r\n position,\r\n offsetTop,\r\n offsetBottom,\r\n offsetStart,\r\n offsetEnd,\r\n justifyContent,\r\n alignItems,\r\n background,\r\n action,\r\n onClick,\r\n}: BoxComponent & { onClick?: ClickHandler | undefined }) => {\r\n const handleClick = () => {\r\n if (action) {\r\n onClick?.(action);\r\n }\r\n };\r\n const parentDirection = useParentFlexDirection();\r\n const ownDirection = layout === \"vertical\" ? \"column\" : \"row\";\r\n\r\n const containerStyle: ViewStyle = {\r\n ...(layout === \"baseline\"\r\n ? { flexDirection: \"row\", alignItems: \"baseline\", columnGap: getActualSize(getSpacingSize(spacing)) }\r\n : layout === \"horizontal\"\r\n ? { flexDirection: \"row\", columnGap: getActualSize(getSpacingSize(spacing)) }\r\n : { flexDirection: \"column\", rowGap: getActualSize(getSpacingSize(spacing)) }),\r\n // flexBasis of 0 only makes sense along the parent's main axis when that axis has a definite total to\r\n // distribute — true for \"row\" parents here (bubble width is always fixed), but not for \"column\"\r\n // parents (bubble height is always auto/content-driven). In a \"column\" parent, flexBasis:0 makes this\r\n // box contribute nothing to that auto-height calculation, collapsing the whole ancestor chain to 0.\r\n ...(flex !== undefined\r\n ? {\r\n flexGrow: flex === 0 ? 0 : flex,\r\n flexShrink: 0,\r\n flexBasis: flex === 0 || parentDirection === \"column\" ? \"auto\" : 0,\r\n }\r\n : { flexShrink: 1 }),\r\n width: getActualSize(width) ?? (layout === \"baseline\" ? \"100%\" : undefined),\r\n maxWidth: getActualSize(maxWidth),\r\n height: getActualSize(height),\r\n maxHeight: getActualSize(maxHeight),\r\n backgroundColor: backgroundColor ?? background?.startColor,\r\n borderColor,\r\n borderWidth: getActualNumericSize(getBorderWidth(borderWidth)),\r\n borderRadius: getActualNumericSize(getBorderRadius(cornerRadius)),\r\n // Unlike CSS, RN's borderRadius only rounds this box's own background/border — it doesn't clip\r\n // children to the rounded shape unless overflow is also hidden (e.g. a square image inside a\r\n // circular avatar box would otherwise cover the rounded corners entirely).\r\n ...(cornerRadius !== undefined ? { overflow: \"hidden\" } : {}),\r\n paddingTop: getActualSize(getPaddingSize(paddingTop)),\r\n paddingBottom: getActualSize(getPaddingSize(paddingBottom)),\r\n paddingLeft: getActualSize(getPaddingSize(paddingStart)),\r\n paddingRight: getActualSize(getPaddingSize(paddingEnd)),\r\n padding: getActualSize(getPaddingSize(paddingAll)),\r\n // Same rule as text.tsx: `margin` is space along whichever axis the parent lays siblings out on —\r\n // marginTop in a \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\r\n ...(parentDirection === \"column\"\r\n ? { marginTop: getActualSize(getMarginSize(margin)) }\r\n : { marginLeft: getActualSize(getMarginSize(margin)) }),\r\n position: position === undefined ? \"relative\" : position,\r\n // `alignItems` here (from the JSON) must win when explicitly set, but otherwise must NOT blindly\r\n // override the \"baseline\" set above for `layout:\"baseline\"` — it was doing exactly that (since this\r\n // key appears later in the same object), silently turning every baseline row into RN's default\r\n // \"stretch\" instead, which stretches every child to match the tallest sibling's height.\r\n alignItems: alignItems ?? (layout === \"baseline\" ? \"baseline\" : undefined),\r\n justifyContent,\r\n top: getActualSize(getOffset(offsetTop)),\r\n bottom: getActualSize(getOffset(offsetBottom)),\r\n left: getActualSize(getOffset(offsetStart)),\r\n right: getActualSize(getOffset(offsetEnd)),\r\n ...(width ? { flexShrink: 0 } : {}),\r\n };\r\n\r\n return (\r\n <TouchableOpacity style={containerStyle} onPress={handleClick}>\r\n <ParentFlexDirectionProvider direction={ownDirection}>\r\n {contents.map((content, i) => (\r\n <React.Fragment key={i}>{renderComponent(content)}</React.Fragment>\r\n ))}\r\n </ParentFlexDirectionProvider>\r\n </TouchableOpacity>\r\n );\r\n};\r\n","import React from \"react\";\r\n\r\nconst MarginSizeContext = React.createContext<number | undefined>(undefined);\r\n\r\nexport const MarginSizeProvider = ({ children, marginSize }: { children: React.ReactNode; marginSize: number | undefined }) => {\r\n return <MarginSizeContext.Provider value={marginSize}>{children}</MarginSizeContext.Provider>;\r\n}\r\n\r\nexport const useInheritedMarginSize = () => {\r\n return React.useContext(MarginSizeContext);\r\n};","import {\r\n getActualSize,\r\n getIconSize,\r\n getMarginSize,\r\n getOffset,\r\n renderComponent,\r\n type TextComponent,\r\n type ClickHandler,\r\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport React from \"react\";\r\nimport { Text as RNText, TouchableOpacity, type TextStyle, type ViewStyle } from \"react-native\";\r\nimport { MarginSizeProvider } from \"../hooks/useInheritedMarginSize.js\";\r\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\r\n\r\nexport const Text = ({\r\n text,\r\n contents,\r\n adjustMode,\r\n flex,\r\n margin,\r\n position,\r\n offsetTop,\r\n offsetBottom,\r\n offsetStart,\r\n offsetEnd,\r\n size,\r\n scaling,\r\n align,\r\n gravity,\r\n wrap,\r\n lineSpacing,\r\n maxLines,\r\n weight,\r\n color,\r\n style,\r\n decoration,\r\n action,\r\n onClick,\r\n}: TextComponent & { onClick?: ClickHandler | undefined }) => {\r\n const parentDirection = useParentFlexDirection();\r\n const handleClick = () => {\r\n if (action) {\r\n onClick?.(action);\r\n }\r\n };\r\n\r\n if (!text && !contents) {\r\n return null;\r\n }\r\n\r\n const marginSize = getActualSize(getMarginSize(margin)) as number | undefined;\r\n\r\n const containerStyle: ViewStyle = {\r\n // Only override flex sizing when `flex` is actually specified. flexBasis:0 only makes sense along a\r\n // \"row\" parent's main axis (bubble width is always fixed) — a \"column\" parent's height is always\r\n // auto/content-driven, and flexBasis:0 there makes this Text contribute nothing to that calculation,\r\n // collapsing the whole auto-height ancestor chain. See box.tsx for the fuller explanation.\r\n // No flexShrink default when `flex` is undefined (unlike box.tsx): a plain label Text (e.g. \"ITEMS\"\r\n // next to a right-aligned price) needs to hold its natural width so its \"align:end\" sibling below is\r\n // the one that shrinks to fit — making this Text shrinkable too would let both compete for the same\r\n // space and truncate the label.\r\n ...(flex !== undefined\r\n ? {\r\n flexGrow: flex === 0 ? 0 : flex,\r\n flexShrink: 0,\r\n flexBasis: flex === 0 || parentDirection === \"column\" ? \"auto\" : 0,\r\n }\r\n : {}),\r\n // The space `margin` describes is this Text's own gap before its previous sibling, along whichever\r\n // axis the parent actually lays siblings out on — marginTop in a \"column\" (vertical) parent, but\r\n // marginLeft in a \"row\" (horizontal/baseline) parent, matching the web port's per-direction CSS.\r\n ...(parentDirection === \"column\" ? { marginTop: marginSize } : { marginLeft: marginSize }),\r\n top: getActualSize(getOffset(offsetTop)),\r\n bottom: getActualSize(getOffset(offsetBottom)),\r\n left: getActualSize(getOffset(offsetStart)),\r\n right: getActualSize(getOffset(offsetEnd)),\r\n position: position === undefined ? \"relative\" : position,\r\n width: align === \"center\" || (align === \"end\" && flex !== 0) ? \"100%\" : undefined,\r\n // RN defaults flexShrink to 0 (web defaults to 1), so without this a \"100%\"-wide row item can't\r\n // shrink to fit whatever space its siblings left behind and instead overflows past the card edge.\r\n // Skipped when `flex` is explicitly set, since that case is already fully handled above.\r\n ...((align === \"center\" || align === \"end\") && flex === undefined ? { flexShrink: 1 } : {}),\r\n };\r\n\r\n // RN has a known bug where a Text with numberOfLines inside an `alignItems:\"baseline\"` row can size its\r\n // container to the text's full untruncated height even though the text itself renders truncated (see\r\n // https://github.com/facebook/react-native/issues/35276). Row/baseline labels are short by convention\r\n // and the \"align:end\" siblings already shrink-to-fit instead of truncating, so it's safe to just not\r\n // cap line count there rather than risk that bug.\r\n const numberOfLines = maxLines ?? (wrap || parentDirection !== \"column\" ? undefined : 1);\r\n\r\n const textStyle: TextStyle = {\r\n color,\r\n fontSize: getActualSize(getIconSize(size)) as number | undefined,\r\n fontStyle: style,\r\n fontWeight: weight === \"regular\" ? \"400\" : weight,\r\n textAlign: align === \"center\" ? \"center\" : align === \"end\" ? \"right\" : \"left\",\r\n textDecorationLine: decoration !== \"none\" ? decoration : undefined,\r\n };\r\n\r\n if (text) {\r\n return (\r\n <TouchableOpacity style={containerStyle} onPress={handleClick}>\r\n <MarginSizeProvider marginSize={marginSize}>\r\n <RNText style={textStyle} numberOfLines={numberOfLines} ellipsizeMode=\"tail\">\r\n {text}\r\n </RNText>\r\n </MarginSizeProvider>\r\n </TouchableOpacity>\r\n );\r\n }\r\n\r\n if (contents) {\r\n return (\r\n <TouchableOpacity style={containerStyle} onPress={handleClick}>\r\n <MarginSizeProvider marginSize={marginSize}>\r\n <RNText style={textStyle} numberOfLines={numberOfLines} ellipsizeMode=\"tail\">\r\n {contents.map((content, index) => (\r\n <React.Fragment key={index}>{renderComponent(content)}</React.Fragment>\r\n ))}\r\n </RNText>\r\n </MarginSizeProvider>\r\n </TouchableOpacity>\r\n );\r\n }\r\n};\r\n","import { getActualSize, getMarginSize, type SeparatorComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { View } from \"react-native\";\r\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\r\n\r\nexport const Separator = ({ margin, color }: SeparatorComponent) => {\r\n const parentDirection = useParentFlexDirection();\r\n\r\n return (\r\n <View\r\n style={{\r\n height: 1,\r\n backgroundColor: color ?? \"#d4d6da\",\r\n // `margin` is space along whichever axis the parent lays siblings out on — marginTop in a\r\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\r\n ...(parentDirection === \"column\"\r\n ? { marginTop: getActualSize(getMarginSize(margin)) }\r\n : { marginLeft: getActualSize(getMarginSize(margin)) }),\r\n }}\r\n />\r\n );\r\n};\r\n","import { registerComponents } from \"@ohmyteeth/line-flex-message-renderer-core\";\r\nimport { Filler } from \"./components/filler.js\";\r\nimport { Icon } from \"./components/icon.js\";\r\nimport { FlexMessageRenderer } from \"./renderer.js\";\r\nimport { Span } from \"./components/span.js\";\r\nimport { Button } from \"./components/button.js\";\r\nimport { Image } from \"./components/image.js\";\r\nimport { Video } from \"./components/video.js\";\r\nimport { Box } from \"./components/box.js\";\r\nimport { Text } from \"./components/text.js\";\r\nimport { Separator } from \"./components/separator.js\";\r\n\r\nregisterComponents({\r\n box: Box,\r\n button: Button,\r\n filler: Filler,\r\n icon: Icon,\r\n image: Image,\r\n separator: Separator,\r\n span: Span,\r\n text: Text,\r\n video: Video,\r\n});\r\n\r\nexport { FlexMessageRenderer };\r\n"],"mappings":";;;;;AAGA,MAAa,UAAU,EAAE,WAA4B;CACnD,OAAO,oBAAC,MAAD,EAAM,OAAO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AC,MAAD,EACE,OAAO;EACL,QAAQ;EACR,iBAAiB,SAAS;EAG1B,GAAI,oBAAoB,WACpB,EAAE,WAAW,cAAc,cAAc,MAAM,CAAC,EAAE,IAClD,EAAE,YAAY,cAAc,cAAc,MAAM,CAAC,EAAE;CACzD,EACD,CAAA;AAEL;;;ACRA,mBAAmB;CACjB,KAAK;CACL,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,OAAOC;CACP,WAAW;CACX,MAAM;CACN,MAAMC;CACN,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":["Styles","Touchable","Image","RNImage","Text","RNText","Image","Text"],"sources":["../src/context/debug.tsx","../src/components/filler.tsx","../src/hooks/useParentFlexDirection.tsx","../src/components/icon.tsx","../src/containers/bubble.tsx","../src/containers/carousel.tsx","../src/renderer.tsx","../src/components/span.tsx","../src/components/button.tsx","../src/components/image.tsx","../src/components/video.tsx","../src/components/box.tsx","../src/hooks/useInheritedMarginSize.tsx","../src/components/text.tsx","../src/components/separator.tsx","../src/index.ts"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\nconst DebugContext = createContext(false);\n\nexport const DebugProvider = ({ children, value }: { children: React.ReactNode; value: boolean }) => (\n <DebugContext.Provider value={value}>\n {children}\n </DebugContext.Provider>\n);\n\nexport const useDebugMode = () => {\n return useContext(DebugContext);\n}\n","import type { FillerComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { View } from \"react-native\";\nimport { useDebugMode } from \"../context/debug.js\";\n\nexport const Filler = ({ flex }: FillerComponent) => {\n const isDebugMode = useDebugMode();\n return <View style={{ flexGrow: 1, flexShrink: 0, flexBasis: 0, flex, ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}) }} />;\n};\n","import React from \"react\";\n\nconst ParentFlexDirectionContext = React.createContext<\"row\" | \"column\">(\"column\");\n\nexport const ParentFlexDirectionProvider = ({\n children,\n direction,\n}: {\n children: React.ReactNode;\n direction: \"row\" | \"column\";\n}) => {\n return <ParentFlexDirectionContext.Provider value={direction}>{children}</ParentFlexDirectionContext.Provider>;\n};\n\nexport const useParentFlexDirection = () => {\n return React.useContext(ParentFlexDirectionContext);\n};\n","import {\n getActualSize,\n getIconSize,\n getMarginSize,\n getOffset,\n type IconComponent,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { Image, View } from \"react-native\";\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\nimport { useDebugMode } from \"../context/debug.js\";\n\nexport const Icon = ({\n url,\n margin,\n position,\n offsetTop,\n offsetBottom,\n offsetStart,\n offsetEnd,\n size,\n scaling,\n aspectRatio,\n}: IconComponent) => {\n const parentDirection = useParentFlexDirection();\n const isDebugMode = useDebugMode();\n // getIconSize(undefined) returns undefined; without this fallback an unsized icon renders at its source's native pixel size.\n const width = getActualSize(getIconSize(size ?? \"md\"));\n const marginSize = getActualSize(getMarginSize(margin));\n\n return (\n <View\n style={{\n width,\n flexShrink: 0,\n // `margin` is space along whichever axis the parent lays siblings out on — marginTop in a\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\n ...(parentDirection === \"column\" ? { marginTop: marginSize } : { marginLeft: marginSize }),\n ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}),\n }}\n >\n <Image\n style={{\n aspectRatio: aspectRatio?.split(\":\").join(\"/\") ?? \"1\",\n top: getActualSize(getOffset(offsetTop)),\n bottom: getActualSize(getOffset(offsetBottom)),\n left: getActualSize(getOffset(offsetStart)),\n right: getActualSize(getOffset(offsetEnd)),\n position: position === undefined ? \"relative\" : position,\n ...(isDebugMode ? { borderColor: \"blue\", borderWidth: 1 } : {}),\n }}\n source={{ uri: url }}\n />\n </View>\n );\n};\n","import {\n renderComponent,\n type BubbleContainer,\n type ClickHandler,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { StyleSheet, TouchableOpacity, View, type StyleProp, type ViewStyle, type LayoutChangeEvent } from \"react-native\";\n\nexport const Bubble = ({\n body,\n direction,\n footer,\n header,\n hero,\n size,\n styles,\n action,\n onClick,\n containerStyle,\n onLayout,\n}: BubbleContainer & {\n onClick?: ClickHandler | undefined;\n // Native-only, not part of the Flex Message spec: lets Carousel measure every bubble's natural height\n // and stretch them all to match the tallest one, since ScrollView content doesn't do this on its own.\n containerStyle?: StyleProp<ViewStyle>;\n onLayout?: ((event: LayoutChangeEvent) => void) | undefined;\n}) => {\n const hasHero = !!hero;\n const hasFooter = !!footer;\n const hasHeader = !!header;\n const handleClick = () => {\n if (action) {\n onClick?.(action);\n }\n };\n\n const inner = {\n ...Styles.bubbleInner,\n // Only when Carousel hands us an explicit (now definite, non-percentage) height to match: without\n // this, bubbleInner stays content-sized and the extra space added below is just blank/transparent.\n ...(containerStyle !== undefined && { flexGrow: 1 }),\n ...(size === \"nano\" && Styles.nanoInner),\n ...(size === \"micro\" && Styles.microInner),\n ...(size === \"deca\" && Styles.decaInner),\n ...(size === \"hecto\" && Styles.hectoInner),\n ...(size === \"kilo\" && Styles.kiloInner),\n ...(size === \"mega\" && Styles.megaInner),\n ...(size === \"giga\" && Styles.gigaInner),\n };\n\n const Component = action ? TouchableOpacity : View;\n return (\n <Component\n style={[{ ...Styles.bubble, ...Styles[size ?? \"mega\"] }, containerStyle]}\n onPress={handleClick}\n onLayout={onLayout}\n >\n <View style={inner}>\n {header && (\n <View\n style={{\n backgroundColor: styles?.header?.backgroundColor ?? \"#fff\",\n borderBottomWidth: styles?.header?.separator ? 1 : 0,\n borderColor: styles?.header?.separatorColor ?? \"#000\",\n }}\n >\n {renderComponent(header, onClick)}\n </View>\n )}\n\n {hero && (\n <View style={{ backgroundColor: styles?.hero?.backgroundColor ?? \"#fff\" }}>\n {renderComponent(hero, onClick)}\n </View>\n )}\n\n {body && (\n <View\n style={{\n ...Styles.body,\n ...(hasHeader && !body.paddingAll && Styles.bodyWithHeader),\n // The web port zeroes this out specifically for \"micro\" bubbles (see its CSS), since a\n // micro body commonly sets its own smaller `paddingAll` — without this exception the two\n // paddings stack (this wrapper's 20px plus the body Box's own), roughly doubling the gap.\n ...(hasHero && size !== \"micro\" && Styles.bodyWithHero),\n ...(hasFooter && Styles.bodyWithFooter),\n ...(!body.paddingAll && Styles.withPadding),\n backgroundColor: styles?.body?.backgroundColor ?? \"#fff\",\n }}\n >\n {renderComponent(body, onClick)}\n </View>\n )}\n\n {footer && (\n <View\n style={{\n ...Styles.footer,\n backgroundColor: styles?.footer?.backgroundColor ?? \"#fff\",\n borderTopWidth: styles?.footer?.separator ? 1 : 0,\n borderColor: styles?.footer?.separatorColor ?? \"#000\",\n }}\n >\n {renderComponent(footer, onClick)}\n </View>\n )}\n </View>\n </Component>\n );\n};\n\nconst Styles = StyleSheet.create({\n bubble: {\n flexDirection: \"column\",\n width: \"100%\",\n },\n bubbleInner: {\n flexDirection: \"column\",\n overflow: \"hidden\",\n borderRadius: 10,\n },\n nano: {\n width: 120,\n maxWidth: 120,\n },\n nanoInner: {\n borderRadius: 10,\n },\n micro: {\n width: 160,\n maxWidth: 160,\n },\n microInner: {\n borderRadius: 10,\n },\n deca: {\n width: 220,\n maxWidth: 220,\n },\n decaInner: {\n borderRadius: 10,\n },\n hecto: {\n width: 241,\n maxWidth: 241,\n },\n hectoInner: {\n borderRadius: 10,\n },\n kilo: {\n width: 260,\n maxWidth: 260,\n },\n kiloInner: {\n borderRadius: 10,\n },\n mega: {\n width: 300,\n maxWidth: 300,\n },\n megaInner: {\n borderRadius: 17,\n },\n giga: {\n width: 340,\n maxWidth: 340,\n },\n gigaInner: {\n borderRadius: 5,\n },\n body: {\n flexGrow: 1,\n },\n withPadding: {\n padding: 20,\n },\n bodyWithHeader: {\n padding: 20,\n },\n bodyWithHero: {\n padding: 20,\n },\n bodyWithFooter: {\n paddingBottom: 10,\n },\n footer: {\n padding: 10,\n },\n});\n","import {\n type CarouselContainer,\n type ClickHandler,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { useCallback, useState } from \"react\";\nimport { ScrollView, StyleSheet, type LayoutChangeEvent } from \"react-native\";\nimport { Bubble } from \"./bubble.js\";\n\nexport const Carousel = ({ contents, onClick }: CarouselContainer & { onClick?: ClickHandler }) => {\n // `alignItems: \"stretch\"` doesn't equalize bubble heights here — ScrollView content doesn't participate\n // in cross-axis stretch the way a plain flex row does — so each bubble's natural height is measured via\n // onLayout, and once all have reported in, every bubble is pinned to the tallest one's height.\n const [heights, setHeights] = useState<Record<number, number>>({});\n const measured = Object.keys(heights).length === contents.length;\n const maxHeight = measured ? Math.max(...Object.values(heights)) : undefined;\n\n const handleLayout = useCallback((index: number, event: LayoutChangeEvent) => {\n const { height } = event.nativeEvent.layout;\n setHeights((prev) => (prev[index] === height ? prev : { ...prev, [index]: height }));\n }, []);\n\n return (\n // TODO: web uses `scroll-snap-type: x mandatory` to snap between bubbles; ScrollView has no direct\n // equivalent (would need `snapToInterval`/`snapToOffsets`, which assume a fixed bubble width per size).\n <ScrollView horizontal contentContainerStyle={Styles.carousel}>\n {contents.map((bubble, index) => (\n <Bubble\n key={index}\n {...bubble}\n onClick={onClick}\n containerStyle={maxHeight !== undefined ? { height: maxHeight } : undefined}\n onLayout={measured ? undefined : (event) => handleLayout(index, event)}\n />\n ))}\n </ScrollView>\n );\n};\n\nconst Styles = StyleSheet.create({\n carousel: {\n flexDirection: \"row\",\n columnGap: 20,\n // Not \"stretch\": that's exactly the unreliable ScrollView cross-axis stretch this component works\n // around above — leaving it on lets the very first (pre-measurement) layout pass report an inflated\n // height, which then gets locked in as the \"tallest\" bubble for everyone to match.\n alignItems: \"flex-start\",\n },\n});\n","import type {\n Action,\n BubbleContainer,\n CarouselContainer,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { useCallback, useMemo } from \"react\";\nimport { Bubble } from \"./containers/bubble.js\";\nimport { Carousel } from \"./containers/carousel.js\";\n\ntype FlexMessageRendererProps = {\n /**\n * A JSON string representing the Flex Message to be rendered.\n */\n json: string;\n\n onAction?: (action: Action) => void;\n};\n\nexport const FlexMessageRenderer = ({ json, onAction }: FlexMessageRendererProps) => {\n const data = useMemo(() => {\n return JSON.parse(json) as CarouselContainer | BubbleContainer;\n }, [json]);\n const handleClick = useCallback(\n (action?: Action) => {\n if (action) {\n onAction?.(action);\n }\n },\n [onAction],\n );\n\n switch (data.type) {\n case \"bubble\":\n return <Bubble {...data} onClick={handleClick} />;\n\n case \"carousel\":\n return <Carousel {...data} onClick={handleClick} />;\n\n default:\n throw new Error(`Unsupported Flex Message type: ${data}`);\n }\n};\n","import { getActualNumericSize, getIconSize, type SpanComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { Text } from \"react-native\";\nimport { useDebugMode } from \"../context/debug.js\";\n\nexport const Span = ({ text, color, size, weight, style, decoration }: SpanComponent) => {\n const isDebugMode = useDebugMode();\n return <Text style={{\n color,\n fontSize: getActualNumericSize(getIconSize(size)),\n fontStyle: style,\n fontWeight: weight === \"regular\" ? \"400\" : weight,\n textDecorationLine: decoration !== \"none\" ? decoration : undefined,\n ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}),\n }}>\n {text}\n </Text>;\n};\n","import {\n getActualSize,\n getButtonHeight,\n getMarginSize,\n getOffset,\n type ButtonComponent,\n type ClickHandler,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { Text, TouchableOpacity as Touchable, View } from \"react-native\";\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\nimport { useDebugMode } from \"../context/debug.js\";\n\nexport const Button = ({\n action,\n adjustMode,\n color,\n flex,\n gravity,\n height,\n margin,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n position,\n scaling,\n style,\n onClick,\n}: ButtonComponent & { onClick?: ClickHandler | undefined }) => {\n const parentDirection = useParentFlexDirection();\n const isDebugMode = useDebugMode();\n const handleClick = () => {\n if (action) {\n onClick?.(action);\n }\n };\n // LINE's default button style is \"link\" when unspecified (matches the web port's `style ?? \"link\"`).\n const resolvedStyle = style ?? \"link\";\n const textColor = resolvedStyle === \"primary\" ? \"#fff\" : resolvedStyle === \"secondary\" ? \"#111111\" : resolvedStyle === \"link\" ? \"#42659a\" : undefined;\n\n return (\n <Touchable onPress={handleClick}>\n <View\n style={{\n ...(resolvedStyle === \"primary\" ? {\n backgroundColor: \"#17c950\",\n width: \"100%\",\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 16,\n paddingRight: 16,\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: 8,\n } : {}),\n ...(resolvedStyle === \"secondary\" ? {\n backgroundColor: \"#dcdfe5\",\n width: \"100%\",\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 16,\n paddingRight: 16,\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: 8,\n } : {}),\n ...(resolvedStyle === \"link\" ? {\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n } : {}),\n // \"secondary\" has no dedicated look in the web port either (its CSS class is empty) — it just\n // renders as a plain, unstyled box with default text color.\n // Only override flex sizing when `flex` is actually specified (see text.tsx/box.tsx for why).\n // flexBasis is explicitly \"auto\" (matching the web port's `flex 0 auto`, not `flex 0 0`) so the\n // explicit `height` below still wins — an explicit flexBasis otherwise overrides `height`\n // entirely for flex layout, collapsing the button whenever its parent has no space to grow into.\n ...(flex !== undefined ? { flexGrow: flex === 0 ? 0 : flex, flexShrink: 0, flexBasis: \"auto\" } : {}),\n top: getActualSize(getOffset(offsetTop)),\n bottom: getActualSize(getOffset(offsetBottom)),\n left: getActualSize(getOffset(offsetStart)),\n right: getActualSize(getOffset(offsetEnd)),\n // `margin` is space along whichever axis the parent lays siblings out on — marginTop in a\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\n ...(parentDirection === \"column\"\n ? { marginTop: getActualSize(getMarginSize(margin)) }\n : { marginLeft: getActualSize(getMarginSize(margin)) }),\n position: position === undefined ? \"relative\" : position,\n height: getActualSize(getButtonHeight(height)),\n // `color` should only override the style preset's background when it's actually provided —\n // otherwise this erases the \"primary\" green / makes \"link\" buttons blend into the card.\n ...(color !== undefined ? { backgroundColor: color } : {}),\n ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}),\n }}\n >\n {action.type === \"uri\" && <Text style={{ color: textColor }}>{action.label}</Text>}\n {action.type === \"postback\" && <Text style={{ color: textColor }}>{action.displayText}</Text>}\n </View>\n </Touchable>\n );\n};\n","import {\n getImageSize,\n getMarginSize,\n getOffset,\n type ImageComponent,\n type ClickHandler,\n getActualSize,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { Image as RNImage, TouchableOpacity, View } from \"react-native\";\nimport { useDebugMode } from \"../context/debug.js\";\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\n\nexport const Image = ({\n url,\n flex,\n position,\n margin,\n offsetTop,\n offsetBottom,\n offsetStart,\n offsetEnd,\n align,\n gravity,\n size,\n aspectRatio,\n aspectMode,\n backgroundColor,\n animated,\n action,\n onClick,\n}: ImageComponent & { onClick?: ClickHandler | undefined }) => {\n const parentDirection = useParentFlexDirection();\n const isDebugMode = useDebugMode();\n const rawWidth = getImageSize(size);\n const sizeWidth = rawWidth === \"unset\" ? undefined : getActualSize(rawWidth);\n // When `flex` is meant to grow this image within a row/column of siblings, let it fill 100% of\n // whatever space it's allocated instead of the fixed `size` width — otherwise the fixed width fights\n // the flex-grown container for space (the fixed width wins, and the image can end up misplaced or\n // fully covered by a sibling that gets laid out for the space the image should have used).\n const width = flex ? \"100%\" : sizeWidth;\n const handleClick = () => {\n if (action) {\n onClick?.(action);\n }\n };\n\n return (\n <View\n style={{\n flexDirection: \"row\",\n justifyContent: \"center\",\n // Explicit flexGrow/flexShrink, not the bare `flex` shorthand (only to avoid ambiguity — the\n // shorthand's implied flexBasis:0% is actually what we want here, unlike box.tsx/text.tsx).\n // flexBasis stays \"0\", not \"auto\": an \"auto\" basis makes RN measure this View's content to find\n // its natural size, and Image's own natural-size measurement falls back to the source asset's\n // native pixel size instead of respecting `width`, letting one image claim all of its siblings'\n // space. Basis 0 sidesteps that measurement entirely — the final size is already fully\n // determined by the explicit width/aspectRatio below regardless of the starting basis.\n ...(flex !== undefined\n ? { flexGrow: flex === 0 ? 0 : flex, flexShrink: 0, flexBasis: flex === 0 ? \"auto\" : 0 }\n : { flexShrink: 1 }),\n // Same rule as below: only force a % height when width can't drive sizing on its own — otherwise\n // this resolves against whatever definite height it finds further up and stretches the whole card.\n ...(width === undefined ? { height: \"100%\" } : {}),\n // Auto left/right margins center a naturally-sized image, but they compete with flexGrow for the\n // same leftover space — skip them when `flex` is meant to actually grow this image instead.\n // `margin` itself is space along whichever axis the parent lays siblings out on — marginTop in a\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\n ...(margin\n ? parentDirection === \"column\"\n ? { marginTop: getActualSize(getMarginSize(margin)) }\n : { marginLeft: getActualSize(getMarginSize(margin)) }\n : flex\n ? {}\n : { marginTop: 0, marginBottom: 0, marginRight: \"auto\", marginLeft: \"auto\" }),\n ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}),\n }}\n >\n {action ?\n <TouchableOpacity onPress={handleClick} style={width !== undefined ? { width, ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}) } : { height: \"100%\", ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}) }}>\n <RNImage\n style={{\n aspectRatio: aspectRatio?.split(\":\").join(\"/\") ?? \"1\",\n objectFit: aspectMode === \"cover\" ? \"cover\" : \"contain\",\n backgroundColor,\n position: position === undefined ? \"relative\" : position,\n top: getActualSize(getOffset(offsetTop)),\n bottom: getActualSize(getOffset(offsetBottom)),\n left: getActualSize(getOffset(offsetStart)),\n right: getActualSize(getOffset(offsetEnd)),\n ...(width !== undefined ? { width } : { height: \"auto\", width: \"100%\" }),\n ...(isDebugMode ? { borderColor: \"blue\", borderWidth: 1 } : {}),\n }}\n source={{ uri: url }}\n />\n </TouchableOpacity>\n :\n <RNImage\n style={{\n aspectRatio: aspectRatio?.split(\":\").join(\"/\") ?? \"1\",\n objectFit: aspectMode === \"cover\" ? \"cover\" : \"contain\",\n backgroundColor,\n position: position === undefined ? \"relative\" : position,\n top: getActualSize(getOffset(offsetTop)),\n bottom: getActualSize(getOffset(offsetBottom)),\n left: getActualSize(getOffset(offsetStart)),\n right: getActualSize(getOffset(offsetEnd)),\n ...(width !== undefined ? { width } : { height: \"auto\", width: \"100%\" }),\n ...(isDebugMode ? { borderColor: \"blue\", borderWidth: 1 } : {}),\n }}\n source={{ uri: url }}\n />}\n {/* Only one of width/height may be definite — the other must stay unset so aspectRatio can derive it. */}\n\n </View>\n );\n};\n","import type { VideoComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\n\nimport type { ClickHandler } from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { TouchableOpacity } from \"react-native\";\n\nexport const Video = ({\n action,\n onClick,\n}: VideoComponent & { onClick?: ClickHandler | undefined }) => {\n const handleClick = () => {\n if (action) {\n onClick?.(action);\n }\n };\n\n return <TouchableOpacity onPress={handleClick} />;\n};\n","import {\n getActualNumericSize,\n getActualSize,\n getBorderRadius,\n getBorderWidth,\n getMarginSize,\n getOffset,\n getPaddingSize,\n getSpacingSize,\n renderComponent,\n type BoxComponent,\n type ClickHandler,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport React from \"react\";\nimport { TouchableOpacity, View, type ViewStyle } from \"react-native\";\nimport { ParentFlexDirectionProvider, useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\nimport { useDebugMode } from \"../context/debug.js\";\n\nexport const Box = ({\n layout,\n contents,\n backgroundColor,\n borderColor,\n borderWidth,\n cornerRadius,\n width,\n maxWidth,\n height,\n maxHeight,\n flex,\n spacing,\n margin,\n paddingAll,\n paddingTop,\n paddingBottom,\n paddingStart,\n paddingEnd,\n position,\n offsetTop,\n offsetBottom,\n offsetStart,\n offsetEnd,\n justifyContent,\n alignItems,\n background,\n action,\n onClick,\n}: BoxComponent & { onClick?: ClickHandler | undefined }) => {\n const handleClick = () => {\n if (action) {\n onClick?.(action);\n }\n };\n const parentDirection = useParentFlexDirection();\n const isDebugMode = useDebugMode();\n const ownDirection = layout === \"vertical\" ? \"column\" : \"row\";\n\n const containerStyle: ViewStyle = {\n ...(layout === \"baseline\"\n ? { flexDirection: \"row\", alignItems: \"baseline\", columnGap: getActualSize(getSpacingSize(spacing)) }\n : layout === \"horizontal\"\n ? { flexDirection: \"row\", columnGap: getActualSize(getSpacingSize(spacing)) }\n : { flexDirection: \"column\", rowGap: getActualSize(getSpacingSize(spacing)) }),\n // flexBasis of 0 only makes sense along the parent's main axis when that axis has a definite total to\n // distribute — true for \"row\" parents here (bubble width is always fixed), but not for \"column\"\n // parents (bubble height is always auto/content-driven). In a \"column\" parent, flexBasis:0 makes this\n // box contribute nothing to that auto-height calculation, collapsing the whole ancestor chain to 0.\n ...(flex !== undefined\n ? {\n flexGrow: flex === 0 ? 0 : flex,\n flexShrink: 0,\n flexBasis: flex === 0 || parentDirection === \"column\" ? \"auto\" : 0,\n }\n : { flexShrink: 1 }),\n width: getActualSize(width) ?? (layout === \"baseline\" ? \"100%\" : undefined),\n maxWidth: getActualSize(maxWidth),\n height: getActualSize(height),\n maxHeight: getActualSize(maxHeight),\n backgroundColor: backgroundColor ?? background?.startColor,\n borderColor,\n borderWidth: getActualNumericSize(getBorderWidth(borderWidth)),\n borderRadius: getActualNumericSize(getBorderRadius(cornerRadius)),\n // Unlike CSS, RN's borderRadius only rounds this box's own background/border — it doesn't clip\n // children to the rounded shape unless overflow is also hidden (e.g. a square image inside a\n // circular avatar box would otherwise cover the rounded corners entirely).\n ...(cornerRadius !== undefined ? { overflow: \"hidden\" } : {}),\n paddingTop: getActualSize(getPaddingSize(paddingTop)),\n paddingBottom: getActualSize(getPaddingSize(paddingBottom)),\n paddingLeft: getActualSize(getPaddingSize(paddingStart)),\n paddingRight: getActualSize(getPaddingSize(paddingEnd)),\n padding: getActualSize(getPaddingSize(paddingAll)),\n // Same rule as text.tsx: `margin` is space along whichever axis the parent lays siblings out on —\n // marginTop in a \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\n ...(parentDirection === \"column\"\n ? { marginTop: getActualSize(getMarginSize(margin)) }\n : { marginLeft: getActualSize(getMarginSize(margin)) }),\n position: position === undefined ? \"relative\" : position,\n // `alignItems` here (from the JSON) must win when explicitly set, but otherwise must NOT blindly\n // override the \"baseline\" set above for `layout:\"baseline\"` — it was doing exactly that (since this\n // key appears later in the same object), silently turning every baseline row into RN's default\n // \"stretch\" instead, which stretches every child to match the tallest sibling's height.\n alignItems: alignItems ?? (layout === \"baseline\" ? \"baseline\" : undefined),\n justifyContent,\n top: getActualSize(getOffset(offsetTop)),\n bottom: getActualSize(getOffset(offsetBottom)),\n left: getActualSize(getOffset(offsetStart)),\n right: getActualSize(getOffset(offsetEnd)),\n ...(width ? { flexShrink: 0 } : {}),\n ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}),\n };\n\n if (action) {\n return (\n <TouchableOpacity style={containerStyle} onPress={handleClick}>\n <ParentFlexDirectionProvider direction={ownDirection}>\n {contents.map((content, i) => (\n <React.Fragment key={i}>{renderComponent(content)}</React.Fragment>\n ))}\n </ParentFlexDirectionProvider>\n </TouchableOpacity>\n );\n }\n\n return (\n <View style={containerStyle}>\n <ParentFlexDirectionProvider direction={ownDirection}>\n {contents.map((content, i) => (\n <React.Fragment key={i}>{renderComponent(content)}</React.Fragment>\n ))}\n </ParentFlexDirectionProvider>\n </View>\n );\n};\n","import React from \"react\";\n\nconst MarginSizeContext = React.createContext<number | undefined>(undefined);\n\nexport const MarginSizeProvider = ({ children, marginSize }: { children: React.ReactNode; marginSize: number | undefined }) => {\n return <MarginSizeContext.Provider value={marginSize}>{children}</MarginSizeContext.Provider>;\n}\n\nexport const useInheritedMarginSize = () => {\n return React.useContext(MarginSizeContext);\n};","import {\n getActualSize,\n getIconSize,\n getMarginSize,\n getOffset,\n renderComponent,\n type TextComponent,\n type ClickHandler,\n} from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport React from \"react\";\nimport { useDebugMode } from \"../context/debug.js\";\nimport { Text as RNText, TouchableOpacity, type TextStyle, type ViewStyle } from \"react-native\";\nimport { MarginSizeProvider } from \"../hooks/useInheritedMarginSize.js\";\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\n\nexport const Text = ({\n text,\n contents,\n adjustMode,\n flex,\n margin,\n position,\n offsetTop,\n offsetBottom,\n offsetStart,\n offsetEnd,\n size,\n scaling,\n align,\n gravity,\n wrap,\n lineSpacing,\n maxLines,\n weight,\n color,\n style,\n decoration,\n action,\n onClick,\n}: TextComponent & { onClick?: ClickHandler | undefined }) => {\n const parentDirection = useParentFlexDirection();\n const isDebugMode = useDebugMode();\n const handleClick = () => {\n if (action) {\n onClick?.(action);\n }\n };\n\n if (!text && !contents) {\n return null;\n }\n\n const marginSize = getActualSize(getMarginSize(margin)) as number | undefined;\n\n const containerStyle: ViewStyle = {\n // Only override flex sizing when `flex` is actually specified. flexBasis:0 only makes sense along a\n // \"row\" parent's main axis (bubble width is always fixed) — a \"column\" parent's height is always\n // auto/content-driven, and flexBasis:0 there makes this Text contribute nothing to that calculation,\n // collapsing the whole auto-height ancestor chain. See box.tsx for the fuller explanation.\n // No flexShrink default when `flex` is undefined (unlike box.tsx): a plain label Text (e.g. \"ITEMS\"\n // next to a right-aligned price) needs to hold its natural width so its \"align:end\" sibling below is\n // the one that shrinks to fit — making this Text shrinkable too would let both compete for the same\n // space and truncate the label.\n ...(flex !== undefined\n ? {\n flexGrow: flex === 0 ? 0 : flex,\n flexShrink: 0,\n flexBasis: flex === 0 || parentDirection === \"column\" ? \"auto\" : 0,\n }\n : {}),\n // The space `margin` describes is this Text's own gap before its previous sibling, along whichever\n // axis the parent actually lays siblings out on — marginTop in a \"column\" (vertical) parent, but\n // marginLeft in a \"row\" (horizontal/baseline) parent, matching the web port's per-direction CSS.\n ...(parentDirection === \"column\" ? { marginTop: marginSize } : { marginLeft: marginSize }),\n top: getActualSize(getOffset(offsetTop)),\n bottom: getActualSize(getOffset(offsetBottom)),\n left: getActualSize(getOffset(offsetStart)),\n right: getActualSize(getOffset(offsetEnd)),\n position: position === undefined ? \"relative\" : position,\n width: align === \"center\" || (align === \"end\" && flex !== 0) ? \"100%\" : undefined,\n // RN defaults flexShrink to 0 (web defaults to 1), so without this a \"100%\"-wide row item can't\n // shrink to fit whatever space its siblings left behind and instead overflows past the card edge.\n // Skipped when `flex` is explicitly set, since that case is already fully handled above.\n ...((align === \"center\" || align === \"end\") && flex === undefined ? { flexShrink: 1 } : {}),\n ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}),\n };\n\n // RN has a known bug where a Text with numberOfLines inside an `alignItems:\"baseline\"` row can size its\n // container to the text's full untruncated height even though the text itself renders truncated (see\n // https://github.com/facebook/react-native/issues/35276). Row/baseline labels are short by convention\n // and the \"align:end\" siblings already shrink-to-fit instead of truncating, so it's safe to just not\n // cap line count there rather than risk that bug.\n const numberOfLines = maxLines ?? (wrap || parentDirection !== \"column\" ? undefined : 1);\n\n const textStyle: TextStyle = {\n color,\n fontSize: getActualSize(getIconSize(size)) as number | undefined,\n fontStyle: style,\n fontWeight: weight === \"regular\" ? \"400\" : weight,\n textAlign: align === \"center\" ? \"center\" : align === \"end\" ? \"right\" : \"left\",\n textDecorationLine: decoration !== \"none\" ? decoration : undefined,\n ...(isDebugMode ? { borderColor: \"blue\", borderWidth: 1 } : {}),\n };\n\n if (text) {\n return (\n <TouchableOpacity style={containerStyle} onPress={handleClick}>\n <MarginSizeProvider marginSize={marginSize}>\n <RNText style={textStyle} numberOfLines={numberOfLines} ellipsizeMode=\"tail\">\n {text}\n </RNText>\n </MarginSizeProvider>\n </TouchableOpacity>\n );\n }\n\n if (contents) {\n return (\n <TouchableOpacity style={containerStyle} onPress={handleClick}>\n <MarginSizeProvider marginSize={marginSize}>\n <RNText style={textStyle} numberOfLines={numberOfLines} ellipsizeMode=\"tail\">\n {contents.map((content, index) => (\n <React.Fragment key={index}>{renderComponent(content)}</React.Fragment>\n ))}\n </RNText>\n </MarginSizeProvider>\n </TouchableOpacity>\n );\n }\n};\n","import { getActualSize, getMarginSize, type SeparatorComponent } from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { View } from \"react-native\";\nimport { useParentFlexDirection } from \"../hooks/useParentFlexDirection.js\";\nimport { useDebugMode } from \"../context/debug.js\";\n\nexport const Separator = ({ margin, color }: SeparatorComponent) => {\n const parentDirection = useParentFlexDirection();\n const isDebugMode = useDebugMode();\n\n return (\n <View\n style={{\n height: 1,\n backgroundColor: color ?? \"#d4d6da\",\n ...(isDebugMode ? { borderColor: \"red\", borderWidth: 1 } : {}),\n // `margin` is space along whichever axis the parent lays siblings out on — marginTop in a\n // \"column\" parent, marginLeft in a \"row\" (horizontal/baseline) parent.\n ...(parentDirection === \"column\"\n ? { marginTop: getActualSize(getMarginSize(margin)) }\n : { marginLeft: getActualSize(getMarginSize(margin)) }),\n }}\n />\n );\n};\n","import { registerComponents } from \"@ohmyteeth/line-flex-message-renderer-core\";\nimport { Filler } from \"./components/filler.js\";\nimport { Icon } from \"./components/icon.js\";\nimport { FlexMessageRenderer } from \"./renderer.js\";\nimport { Span } from \"./components/span.js\";\nimport { Button } from \"./components/button.js\";\nimport { Image } from \"./components/image.js\";\nimport { Video } from \"./components/video.js\";\nimport { Box } from \"./components/box.js\";\nimport { Text } from \"./components/text.js\";\nimport { Separator } from \"./components/separator.js\";\n\nregisterComponents({\n box: Box,\n button: Button,\n filler: Filler,\n icon: Icon,\n image: Image,\n separator: Separator,\n span: Span,\n text: Text,\n video: Video,\n});\n\nexport { FlexMessageRenderer };\nexport { DebugProvider, useDebugMode } from \"./context/debug.js\";"],"mappings":";;;;;AAEA,MAAM,eAAe,cAAc,KAAK;AAExC,MAAa,iBAAiB,EAAE,UAAU,YACxC,oBAAC,aAAa,UAAd;CAA8B;CAC3B;AACoB,CAAA;AAGzB,MAAa,qBAAqB;CAChC,OAAO,WAAW,YAAY;AA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yteeth/react-native-line-flex-message-renderer",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "This is a component library for rendering LINE Flex Messages in React Native.",
5
5
  "license": "MIT",
6
6
  "author": "Oh my teeth, Co.",
@@ -39,7 +39,7 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@ohmyteeth/line-flex-message-renderer-core": "0.1.0"
42
+ "@ohmyteeth/line-flex-message-renderer-core": "0.2.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@oxfmt/binding-darwin-arm64": "^0.58.0",