@mapples/ui 1.0.2 → 1.0.4

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 (48) hide show
  1. package/dist/components/inputs/IconButton/IconButton.d.ts +3 -2
  2. package/dist/components/inputs/IconButton/IconButton.d.ts.map +1 -1
  3. package/dist/components/inputs/IconButton/IconButton.js +15 -4
  4. package/dist/components/inputs/IconButton/IconButton.js.map +1 -1
  5. package/dist/components/media/BarCode/BarCode.d.ts +78 -0
  6. package/dist/components/media/BarCode/BarCode.d.ts.map +1 -0
  7. package/dist/components/media/BarCode/BarCode.js +127 -0
  8. package/dist/components/media/BarCode/BarCode.js.map +1 -0
  9. package/dist/components/media/BarCode/BarCodeEncoder.d.ts +56 -0
  10. package/dist/components/media/BarCode/BarCodeEncoder.d.ts.map +1 -0
  11. package/dist/components/media/BarCode/BarCodeEncoder.js +112 -0
  12. package/dist/components/media/BarCode/BarCodeEncoder.js.map +1 -0
  13. package/dist/components/media/BarCode/index.d.ts +4 -0
  14. package/dist/components/media/BarCode/index.d.ts.map +1 -0
  15. package/dist/components/media/BarCode/index.js +4 -0
  16. package/dist/components/media/BarCode/index.js.map +1 -0
  17. package/dist/components/media/BarCode/schematics.d.ts +3 -0
  18. package/dist/components/media/BarCode/schematics.d.ts.map +1 -0
  19. package/dist/components/media/BarCode/schematics.js +6 -0
  20. package/dist/components/media/BarCode/schematics.js.map +1 -0
  21. package/dist/components/media/Icon/Icon.d.ts +3 -2
  22. package/dist/components/media/Icon/Icon.d.ts.map +1 -1
  23. package/dist/components/media/Icon/Icon.js +16 -5
  24. package/dist/components/media/Icon/Icon.js.map +1 -1
  25. package/dist/components/media/Image/Image.d.ts +2 -0
  26. package/dist/components/media/Image/Image.d.ts.map +1 -1
  27. package/dist/components/media/Image/Image.js +4 -4
  28. package/dist/components/media/Image/Image.js.map +1 -1
  29. package/dist/components/media/QRCode/QRCode.d.ts +83 -0
  30. package/dist/components/media/QRCode/QRCode.d.ts.map +1 -0
  31. package/dist/components/media/QRCode/QRCode.js +42 -0
  32. package/dist/components/media/QRCode/QRCode.js.map +1 -0
  33. package/dist/components/media/QRCode/index.d.ts +4 -0
  34. package/dist/components/media/QRCode/index.d.ts.map +1 -0
  35. package/dist/components/media/QRCode/index.js +4 -0
  36. package/dist/components/media/QRCode/index.js.map +1 -0
  37. package/dist/components/media/QRCode/schematics.d.ts +3 -0
  38. package/dist/components/media/QRCode/schematics.d.ts.map +1 -0
  39. package/dist/components/media/QRCode/schematics.js +6 -0
  40. package/dist/components/media/QRCode/schematics.js.map +1 -0
  41. package/dist/components/media/index.d.ts +4 -0
  42. package/dist/components/media/index.d.ts.map +1 -1
  43. package/dist/components/media/index.js +4 -0
  44. package/dist/components/media/index.js.map +1 -1
  45. package/dist/components/media/schematics.d.ts.map +1 -1
  46. package/dist/components/media/schematics.js +4 -0
  47. package/dist/components/media/schematics.js.map +1 -1
  48. package/package.json +5 -2
@@ -1,5 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { StyledProp, StyledProps, WithStyledProps } from '@mapples/style';
3
+ import { SvgSource } from '@mapples/types';
3
4
  import { PressableProps, TextStyle, View, ViewProps } from 'react-native';
4
5
  /**
5
6
  * Props for the IconButton component.
@@ -14,7 +15,7 @@ export type IconProps = PropsWithChildren<Omit<WithStyledProps<PressableProps>,
14
15
  };
15
16
  }> & {
16
17
  /** URI for the SVG icon to display */
17
- uri?: string;
18
+ uri?: string | SvgSource;
18
19
  };
19
20
  /**
20
21
  * A customizable icon button component with SVG support.
@@ -56,7 +57,7 @@ declare const IconButton: import("react").ForwardRefExoticComponent<Omit<WithSty
56
57
  children?: import("react").ReactNode | undefined;
57
58
  } & {
58
59
  /** URI for the SVG icon to display */
59
- uri?: string;
60
+ uri?: string | SvgSource;
60
61
  } & import("react").RefAttributes<View>>;
61
62
  export default IconButton;
62
63
  //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAGL,UAAU,EACV,WAAW,EAEX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK1E;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,iBAAiB,CACvC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,GAAG;IAChD,kEAAkE;IAClE,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC,CAAC;CACH,CACF,GAAG;IACF,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,UAAU;IA3CZ,kEAAkE;aACzD,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC;;;;IAGH,sCAAsC;UAChC,MAAM;wCAkEb,CAAC;AAGF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAIL,UAAU,EACV,WAAW,EAEX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK1E;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,iBAAiB,CACvC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,GAAG;IAChD,kEAAkE;IAClE,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC,CAAC;CACH,CACF,GAAG;IACF,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,UAAU;IA3CZ,kEAAkE;aACzD,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC;;;;IAGH,sCAAsC;UAChC,MAAM,GAAG,SAAS;wCAuFzB,CAAC;AAGF,eAAe,UAAU,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { forwardRef } from 'react';
2
- import { styled, StyledPressable, Styler, } from '@mapples/style';
2
+ import { styled as makeStyled, styled, StyledPressable, Styler, } from '@mapples/style';
3
3
  import { SvgUri } from 'react-native-svg';
4
4
  import MockIcon from './MockIcon';
5
5
  const StyledSvgUri = styled(SvgUri);
@@ -36,13 +36,24 @@ const StyledSvgUri = styled(SvgUri);
36
36
  const IconButton = forwardRef(({ styled, uri, ...props }, ref) => {
37
37
  const { styleSvg, ...styledViewProps } = styled || {};
38
38
  const ejectStyle = Styler.flatten(styleSvg);
39
- return (<StyledPressable ref={ref} styled={styledViewProps} {...props}>
40
- {uri ? (<StyledSvgUri uri={uri} styled={{
39
+ const getUriComponent = (Uri) => {
40
+ const StyledSvg = makeStyled(Uri.default);
41
+ return (<StyledSvg styled={{
41
42
  width: ejectStyle?.width,
42
43
  height: ejectStyle?.height,
43
44
  color: ejectStyle?.color,
44
45
  style: styleSvg,
45
- }}/>) : (<MockIcon styled={{
46
+ }}/>);
47
+ };
48
+ return (<StyledPressable ref={ref} styled={styledViewProps} {...props}>
49
+ {uri ? (<>
50
+ {typeof uri === 'string' ? (<StyledSvgUri uri={uri} styled={{
51
+ width: ejectStyle?.width,
52
+ height: ejectStyle?.height,
53
+ color: ejectStyle?.color,
54
+ style: styleSvg,
55
+ }}/>) : (getUriComponent(uri))}
56
+ </>) : (<MockIcon styled={{
46
57
  width: ejectStyle?.width,
47
58
  height: ejectStyle?.height,
48
59
  color: ejectStyle?.color,
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EACN,eAAe,EAGf,MAAM,GAEP,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAoBlC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,GAAG,UAAU,CAC3B,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAEtD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,CACL,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,KAAK,CAAC,CAC5D;QAAA,CAAC,GAAG,CAAC,CAAC,CAAC,CACL,CAAC,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C;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,eAAe,UAAU,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { StyledProp, StyledProps, WithStyledProps } from '@mapples/style';
3
+ import { View, ViewProps } from 'react-native';
4
+ import { SvgProps } from 'react-native-svg';
5
+ import { type BarcodeFormat } from './BarCodeEncoder';
6
+ /**
7
+ * Props for the BarCode component.
8
+ *
9
+ * @public
10
+ */
11
+ export type BarCodeProps = PropsWithChildren<Omit<WithStyledProps<ViewProps>, 'styled'> & {
12
+ /** Styling configuration for the barcode container and SVG */
13
+ styled?: StyledProps<ViewProps> & {
14
+ /** SVG-specific styling */
15
+ styleSvg?: StyledProp<SvgProps>;
16
+ };
17
+ /** The value to encode as a barcode */
18
+ value?: string;
19
+ /** Height of the barcode bars */
20
+ height?: number;
21
+ /** Width of each bar module */
22
+ width?: number;
23
+ /** Background color of the barcode */
24
+ backgroundColor?: string;
25
+ /** Foreground color of the barcode bars */
26
+ foregroundColor?: string;
27
+ /** Barcode format (default: CODE128) */
28
+ format?: BarcodeFormat;
29
+ }>;
30
+ /**
31
+ * A customizable barcode component with built-in styling support.
32
+ *
33
+ * The BarCode component renders a barcode using BarcodeEncoder for generation
34
+ * and react-native-svg for rendering. It supports customizable styling
35
+ * through the @mapples/style system.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <BarCode
40
+ * value="123456789"
41
+ * height={100}
42
+ * width={2}
43
+ * styled={{
44
+ * style: {
45
+ * width: 300,
46
+ * height: 100,
47
+ * alignItems: 'center',
48
+ * justifyContent: 'center',
49
+ * },
50
+ * }}
51
+ * />
52
+ * ```
53
+ *
54
+ * @public
55
+ */
56
+ declare const BarCode: import("react").ForwardRefExoticComponent<Omit<WithStyledProps<ViewProps>, "styled"> & {
57
+ /** Styling configuration for the barcode container and SVG */
58
+ styled?: StyledProps<ViewProps> & {
59
+ /** SVG-specific styling */
60
+ styleSvg?: StyledProp<SvgProps>;
61
+ };
62
+ /** The value to encode as a barcode */
63
+ value?: string;
64
+ /** Height of the barcode bars */
65
+ height?: number;
66
+ /** Width of each bar module */
67
+ width?: number;
68
+ /** Background color of the barcode */
69
+ backgroundColor?: string;
70
+ /** Foreground color of the barcode bars */
71
+ foregroundColor?: string;
72
+ /** Barcode format (default: CODE128) */
73
+ format?: BarcodeFormat;
74
+ } & {
75
+ children?: import("react").ReactNode | undefined;
76
+ } & import("react").RefAttributes<View>>;
77
+ export default BarCode;
78
+ //# sourceMappingURL=BarCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarCode.d.ts","sourceRoot":"","sources":["../../../../src/components/media/BarCode/BarCode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7E,OAAO,EACL,UAAU,EACV,WAAW,EAGX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAY,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAuB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAC1C,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,GAAG;IAC3C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;KACjC,CAAC;IACF,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wCAAwC;IACxC,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB,CACF,CAAC;AAiGF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,OAAO;IA7IT,8DAA8D;aACrD,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;KACjC;IACD,uCAAuC;YAC/B,MAAM;IACd,iCAAiC;aACxB,MAAM;IACf,+BAA+B;YACvB,MAAM;IACd,sCAAsC;sBACpB,MAAM;IACxB,2CAA2C;sBACzB,MAAM;IACxB,wCAAwC;aAC/B,aAAa;;;wCAoLzB,CAAC;AAGF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,127 @@
1
+ import { forwardRef, useMemo } from 'react';
2
+ import { StyledView, Styler, } from '@mapples/style';
3
+ import Svg, { Rect } from 'react-native-svg';
4
+ import BarcodeEncoder from './BarCodeEncoder';
5
+ /**
6
+ * Generates barcode pattern using BarcodeEncoder
7
+ * Returns the encoded data and dimensions
8
+ */
9
+ const generateBarcodeData = (value, format = 'CODE128', barWidth = 2) => {
10
+ if (!value)
11
+ return null;
12
+ try {
13
+ // Use BarcodeEncoder to encode the value
14
+ const encoded = BarcodeEncoder.encode(value, format, {});
15
+ if (!encoded) {
16
+ console.warn('Failed to encode barcode value');
17
+ return null;
18
+ }
19
+ const bars = [];
20
+ let x = 0;
21
+ // Handle array response (EAN13, EAN8, UPC)
22
+ if (Array.isArray(encoded)) {
23
+ // Concatenate all segment data strings
24
+ for (const segment of encoded) {
25
+ if (segment && segment.data) {
26
+ for (let i = 0; i < segment.data.length; i++) {
27
+ const digit = segment.data[i];
28
+ if (digit === '1') {
29
+ bars.push({ x, width: barWidth });
30
+ }
31
+ x += barWidth;
32
+ }
33
+ }
34
+ }
35
+ }
36
+ else {
37
+ // Handle single object response (CODE128, CODE39, etc.)
38
+ if (encoded.data) {
39
+ for (let i = 0; i < encoded.data.length; i++) {
40
+ const digit = encoded.data[i];
41
+ if (digit === '1') {
42
+ bars.push({ x, width: barWidth });
43
+ }
44
+ x += barWidth;
45
+ }
46
+ }
47
+ }
48
+ return {
49
+ bars,
50
+ totalWidth: x,
51
+ };
52
+ }
53
+ catch (error) {
54
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
55
+ console.error(`Error generating barcode (format: ${format}, value: ${value}):`, errorMessage);
56
+ // Log available formats for debugging
57
+ try {
58
+ const availableFormats = BarcodeEncoder.getAvailableFormats();
59
+ console.log('Available barcode formats:', availableFormats);
60
+ }
61
+ catch {
62
+ // Ignore if getAvailableFormats fails
63
+ }
64
+ return null;
65
+ }
66
+ };
67
+ /**
68
+ * Renders barcode bars from barcode data
69
+ */
70
+ const renderBarcodeBars = (bars, height, foregroundColor) => {
71
+ return bars.map((bar, index) => (<Rect key={index} x={bar.x} y={0} width={bar.width} height={height} fill={foregroundColor}/>));
72
+ };
73
+ /**
74
+ * A customizable barcode component with built-in styling support.
75
+ *
76
+ * The BarCode component renders a barcode using BarcodeEncoder for generation
77
+ * and react-native-svg for rendering. It supports customizable styling
78
+ * through the @mapples/style system.
79
+ *
80
+ * @example
81
+ * ```tsx
82
+ * <BarCode
83
+ * value="123456789"
84
+ * height={100}
85
+ * width={2}
86
+ * styled={{
87
+ * style: {
88
+ * width: 300,
89
+ * height: 100,
90
+ * alignItems: 'center',
91
+ * justifyContent: 'center',
92
+ * },
93
+ * }}
94
+ * />
95
+ * ```
96
+ *
97
+ * @public
98
+ */
99
+ const BarCode = forwardRef(({ styled, value = '', height = 100, width = 2, backgroundColor = 'transparent', foregroundColor = '#000000', format = 'CODE128', ...props }, ref) => {
100
+ const { styleSvg, ...styledProps } = styled || {};
101
+ const barcodeData = useMemo(() => generateBarcodeData(value, format, width), [value, format, width]);
102
+ const bars = useMemo(() => {
103
+ if (!barcodeData)
104
+ return [];
105
+ return renderBarcodeBars(barcodeData.bars, height, foregroundColor);
106
+ }, [barcodeData, height, foregroundColor]);
107
+ const svgStyle = useMemo(() => {
108
+ const flattened = styleSvg ? Styler.flatten(styleSvg) : {};
109
+ return {
110
+ backgroundColor,
111
+ ...flattened,
112
+ };
113
+ }, [styleSvg, backgroundColor]);
114
+ if (!barcodeData || bars.length === 0) {
115
+ return (<StyledView ref={ref} styled={styledProps} {...props}>
116
+ {/* Empty state - no barcode to display */}
117
+ </StyledView>);
118
+ }
119
+ return (<StyledView ref={ref} styled={styledProps} {...props}>
120
+ <Svg width={barcodeData.totalWidth} height={height} viewBox={`0 0 ${barcodeData.totalWidth} ${height}`} style={svgStyle}>
121
+ {bars}
122
+ </Svg>
123
+ </StyledView>);
124
+ });
125
+ BarCode.displayName = 'BarCode';
126
+ export default BarCode;
127
+ //# sourceMappingURL=BarCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarCode.js","sourceRoot":"","sources":["../../../../src/components/media/BarCode/BarCode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmC,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,EAGL,UAAU,EACV,MAAM,GAEP,MAAM,gBAAgB,CAAC;AAExB,OAAO,GAAG,EAAE,EAAE,IAAI,EAAY,MAAM,kBAAkB,CAAC;AAEvD,OAAO,cAAsC,MAAM,kBAAkB,CAAC;AA6BtE;;;GAGG;AACH,MAAM,mBAAmB,GAAG,CAC1B,KAAa,EACb,SAAwB,SAAS,EACjC,WAAmB,CAAC,EAIb,EAAE;IACT,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,IAAI,CAAC;QACH,yCAAyC;QACzC,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEzD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;YAC/C,OAAO,IA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U,CAAC,CAC9B,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,WAAW,CAAC,UAAU,IAAI,MAAM,EAAE,CAAC,CACnD,KAAK,CAAC,CAAC,QAAiB,CAAC,CAEzB;UAAA,CAAC,IAAI,CACP;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AACF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,eAAe,OAAO,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Supported barcode formats
3
+ */
4
+ export type BarcodeFormat = 'CODE128' | 'CODE39' | 'EAN13' | 'EAN8' | 'UPC' | 'ITF14' | 'MSI' | 'pharmacode' | 'codabar';
5
+ /**
6
+ * Options for barcode encoding
7
+ */
8
+ export interface BarcodeEncodeOptions {
9
+ [key: string]: unknown;
10
+ }
11
+ /**
12
+ * Encoded barcode segment (used for EAN13, EAN8, UPC)
13
+ */
14
+ export interface EncodedBarcodeSegment {
15
+ /** Binary string representation where '1' = bar, '0' = space */
16
+ data: string;
17
+ /** Optional text for this segment */
18
+ text?: string;
19
+ /** Optional segment-specific options */
20
+ options?: {
21
+ height?: number | null;
22
+ [key: string]: unknown;
23
+ };
24
+ }
25
+ /**
26
+ * Encoded barcode data structure
27
+ * Can be a single object (CODE128, CODE39) or array of segments (EAN13, EAN8, UPC)
28
+ */
29
+ export type EncodedBarcode = {
30
+ /** The original text value */
31
+ text: string;
32
+ /** Binary string representation where '1' = bar, '0' = space */
33
+ data: string;
34
+ } | EncodedBarcodeSegment[];
35
+ /**
36
+ * Barcode encoder class that wraps jsbarcode functionality
37
+ */
38
+ declare class BarcodeEncoder {
39
+ /**
40
+ * Encodes text into a barcode binary pattern
41
+ *
42
+ * @param text - The text value to encode
43
+ * @param format - The barcode format to use
44
+ * @param options - Additional encoding options
45
+ * @returns Encoded barcode data with text and binary pattern (or array of segments for EAN/UPC)
46
+ * @throws Error if text is invalid, format is not supported, or encoding fails
47
+ */
48
+ encode(text: string, format: BarcodeFormat, options?: BarcodeEncodeOptions): EncodedBarcode;
49
+ /**
50
+ * Gets list of available barcode formats
51
+ */
52
+ getAvailableFormats(): string[];
53
+ }
54
+ declare const _default: BarcodeEncoder;
55
+ export default _default;
56
+ //# sourceMappingURL=BarCodeEncoder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarCodeEncoder.d.ts","sourceRoot":"","sources":["../../../../src/components/media/BarCode/BarCodeEncoder.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,QAAQ,GACR,OAAO,GACP,MAAM,GACN,KAAK,GACL,OAAO,GACP,KAAK,GACL,YAAY,GACZ,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;CACd,GACD,qBAAqB,EAAE,CAAC;AA0D5B;;GAEG;AACH,cAAM,cAAc;IAClB;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,EACrB,OAAO,GAAE,oBAAyB,GACjC,cAAc;IA6DjB;;OAEG;IACH,mBAAmB,IAAI,MAAM,EAAE;CAGhC;;AAED,wBAAoC"}
@@ -0,0 +1,112 @@
1
+ // @ts-expect-error - jsbarcode/src/barcodes doesn't have type definitions
2
+ import barcodes from 'jsbarcode/src/barcodes';
3
+ /**
4
+ * Maps format names to jsbarcode format names
5
+ * Some formats might have different names in jsbarcode
6
+ */
7
+ const FORMAT_MAP = {
8
+ CODE128: 'CODE128',
9
+ CODE39: 'CODE39',
10
+ EAN13: 'EAN13',
11
+ EAN8: 'EAN8',
12
+ UPC: 'UPC', // jsbarcode uses 'UPC' not 'UPC-A'
13
+ ITF14: 'ITF14', // jsbarcode uses 'ITF14' not 'ITF'
14
+ MSI: 'MSI',
15
+ pharmacode: 'pharmacode',
16
+ codabar: 'codabar',
17
+ };
18
+ /**
19
+ * Tries to find the correct format name in jsbarcode
20
+ * Handles case variations and common aliases
21
+ */
22
+ const findFormat = (format, barcodes) => {
23
+ const mappedFormat = FORMAT_MAP[format];
24
+ if (barcodes[mappedFormat]) {
25
+ return mappedFormat;
26
+ }
27
+ const formatLower = format.toLowerCase();
28
+ for (const key in barcodes) {
29
+ if (key.toLowerCase() === formatLower) {
30
+ return key;
31
+ }
32
+ }
33
+ // Try common aliases
34
+ const aliases = {
35
+ UPC: ['UPC-A', 'UPCA'],
36
+ ITF14: ['ITF', 'ITF-14'],
37
+ EAN13: ['EAN-13', 'EAN_13'],
38
+ EAN8: ['EAN-8', 'EAN_8'],
39
+ };
40
+ const formatAliases = aliases[format];
41
+ if (formatAliases) {
42
+ for (const alias of formatAliases) {
43
+ if (barcodes[alias]) {
44
+ return alias;
45
+ }
46
+ }
47
+ }
48
+ return null;
49
+ };
50
+ /**
51
+ * Barcode encoder class that wraps jsbarcode functionality
52
+ */
53
+ class BarcodeEncoder {
54
+ /**
55
+ * Encodes text into a barcode binary pattern
56
+ *
57
+ * @param text - The text value to encode
58
+ * @param format - The barcode format to use
59
+ * @param options - Additional encoding options
60
+ * @returns Encoded barcode data with text and binary pattern (or array of segments for EAN/UPC)
61
+ * @throws Error if text is invalid, format is not supported, or encoding fails
62
+ */
63
+ encode(text, format, options = {}) {
64
+ // Find the correct format name in jsbarcode
65
+ const jsbarcodeFormat = findFormat(format, barcodes);
66
+ if (!jsbarcodeFormat) {
67
+ const availableFormats = Object.keys(barcodes).join(', ');
68
+ throw new Error(`Barcode format "${format}" not found. Available formats: ${availableFormats}`);
69
+ }
70
+ const Encoder = barcodes[jsbarcodeFormat];
71
+ if (text.length === 0) {
72
+ throw new Error('Barcode value must be a non-empty string');
73
+ }
74
+ let encoder;
75
+ try {
76
+ encoder = new Encoder(text, options);
77
+ }
78
+ catch (error) {
79
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
80
+ throw new Error(`Invalid barcode format: ${errorMessage}`);
81
+ }
82
+ if (!encoder.valid()) {
83
+ throw new Error('Invalid barcode for selected format.');
84
+ }
85
+ const encoded = encoder.encode();
86
+ // Handle array response (EAN13, EAN8, UPC)
87
+ if (Array.isArray(encoded)) {
88
+ // Validate array structure
89
+ if (!encoded.every((segment) => segment &&
90
+ typeof segment === 'object' &&
91
+ typeof segment.data === 'string')) {
92
+ throw new Error('Invalid barcode data structure');
93
+ }
94
+ return encoded;
95
+ }
96
+ // Handle single object response (CODE128, CODE39, etc.)
97
+ if (encoded &&
98
+ typeof encoded === 'object' &&
99
+ typeof encoded.data === 'string') {
100
+ return encoded;
101
+ }
102
+ throw new Error('Failed to encode barcode data');
103
+ }
104
+ /**
105
+ * Gets list of available barcode formats
106
+ */
107
+ getAvailableFormats() {
108
+ return Object.keys(barcodes);
109
+ }
110
+ }
111
+ export default new BarcodeEncoder();
112
+ //# sourceMappingURL=BarCodeEncoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarCodeEncoder.js","sourceRoot":"","sources":["../../../../src/components/media/BarCode/BarCodeEncoder.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAmD9C;;;GAGG;AACH,MAAM,UAAU,GAAkC;IAChD,OAAO,EAA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OAAO,OAAO,KAAK,QAAQ;gBAC3B,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CACnC,EACD,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,OAAkC,CAAC;QAC5C,CAAC;QAED,wDAAwD;QACxD,IACE,OAAO;YACP,OAAO,OAAO,KAAK,QAAQ;YAC3B,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,EAChC,CAAC;YACD,OAAO,OAAyC,CAAC;QACnD,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,mBAAmB;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;CACF;AAED,eAAe,IAAI,cAAc,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default } from './BarCode';
2
+ export * from './schematics';
3
+ export * from './BarCode';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/media/BarCode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default } from './BarCode';
2
+ export * from './schematics';
3
+ export * from './BarCode';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/media/BarCode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponent } from '@mapples/types';
2
+ export declare const BarCodeSchematic: RegisteredComponent;
3
+ //# sourceMappingURL=schematics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/media/BarCode/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,gBAAgB,EAAE,mBAG9B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import BarCode from './BarCode';
2
+ export const BarCodeSchematic = {
3
+ type: 'BarCode',
4
+ Component: BarCode,
5
+ };
6
+ //# sourceMappingURL=schematics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/media/BarCode/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,MAAM,gBAAgB,GAAwB;IACnD,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,OAAO;CACnB,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { StyledProp, StyledProps, WithStyledProps } from '@mapples/style';
3
+ import { SvgSource } from '@mapples/types';
3
4
  import { TextStyle, View, ViewProps } from 'react-native';
4
5
  export type IconProps = PropsWithChildren<Omit<WithStyledProps<ViewProps>, 'styled'> & {
5
6
  styled?: StyledProps<ViewProps> & {
6
7
  styleSvg?: StyledProp<TextStyle>;
7
8
  };
8
9
  }> & {
9
- uri?: string;
10
+ uri?: string | SvgSource;
10
11
  };
11
12
  declare const Icon: import("react").ForwardRefExoticComponent<Omit<WithStyledProps<ViewProps>, "styled"> & {
12
13
  styled?: StyledProps<ViewProps> & {
@@ -15,7 +16,7 @@ declare const Icon: import("react").ForwardRefExoticComponent<Omit<WithStyledPro
15
16
  } & {
16
17
  children?: import("react").ReactNode | undefined;
17
18
  } & {
18
- uri?: string;
19
+ uri?: string | SvgSource;
19
20
  } & import("react").RefAttributes<View>>;
20
21
  export default Icon;
21
22
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/media/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAEL,UAAU,EACV,WAAW,EAGX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK1D,MAAM,MAAM,SAAS,GAAG,iBAAiB,CACvC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,GAAG;IAC3C,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC,CAAC;CACH,CACF,GAAG;IACF,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAIF,QAAA,MAAM,IAAI;aAVG,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC;;;;UAGG,MAAM;wCAoCb,CAAC;AAGF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/media/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAEL,UAAU,EACV,WAAW,EAGX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK1D,MAAM,MAAM,SAAS,GAAG,iBAAiB,CACvC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,GAAG;IAC3C,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC,CAAC;CACH,CACF,GAAG;IACF,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAIF,QAAA,MAAM,IAAI;aAVG,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC;;;;UAGG,MAAM,GAAG,SAAS;wCAyDzB,CAAC;AAGF,eAAe,IAAI,CAAC"}
@@ -1,18 +1,29 @@
1
1
  import { forwardRef } from 'react';
2
- import { styled, StyledView, Styler, } from '@mapples/style';
2
+ import { styled as makeStyled, StyledView, Styler, } from '@mapples/style';
3
3
  import { SvgUri } from 'react-native-svg';
4
4
  import MockIcon from './MockIcon';
5
- const StyledSvgUri = styled(SvgUri);
5
+ const StyledSvgUri = makeStyled(SvgUri);
6
6
  const Icon = forwardRef(({ styled, uri, ...props }, ref) => {
7
7
  const { styleSvg, ...styledViewProps } = styled || {};
8
8
  const ejectStyle = Styler.flatten(styleSvg);
9
- return (<StyledView ref={ref} styled={styledViewProps} {...props}>
10
- {uri ? (<StyledSvgUri uri={uri} styled={{
9
+ const getUriComponent = (Uri) => {
10
+ const StyledSvg = makeStyled(Uri.default);
11
+ return (<StyledSvg styled={{
11
12
  width: ejectStyle?.width,
12
13
  height: ejectStyle?.height,
13
14
  color: ejectStyle?.color,
14
15
  style: styleSvg,
15
- }}/>) : (<MockIcon styled={{
16
+ }}/>);
17
+ };
18
+ return (<StyledView ref={ref} styled={styledViewProps} {...props}>
19
+ {uri ? (<>
20
+ {typeof uri === 'string' ? (<StyledSvgUri uri={uri} styled={{
21
+ width: ejectStyle?.width,
22
+ height: ejectStyle?.height,
23
+ color: ejectStyle?.color,
24
+ style: styleSvg,
25
+ }}/>) : (getUriComponent(uri))}
26
+ </>) : (<MockIcon styled={{
16
27
  width: ejectStyle?.width,
17
28
  height: ejectStyle?.height,
18
29
  color: ejectStyle?.color,
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../../src/components/media/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EAGN,UAAU,EACV,MAAM,GAEP,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAYlC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAEpC,MAAM,IAAI,GAAG,UAAU,CACrB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAEtD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,CACL,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,KAAK,CAAC,CACvD;QAAA,CAAC,GAAG,CAAC,CAAC,CAAC,CACL,CAAC,YAAY,CACX,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,MAAM,CAAC,CAAC;gBACN,KAAK,EAAE,UAAU,EAAE,KAAwB;gBAC3C,MAAM,EAAE,UAAU,EAAE,MAAyB;gBAC7C,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,QAAQ;aAChB,CAAC,EACF,CACH,CAAC,CAAC,CAAC,CACF,CAAC,QAAQ,CACP,MAAM,CAAC,CAAC;gBACN,KAAK,EAAE,UAAU,EAAE,KAAwB;gBAC3C,MAAM,EAAE,UAAU,EAAE,MAAyB;gBAC7C,KAAK,EAAE,UAAU,EAAE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,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,KAAK,CAAC,CACvD;QAAA,CAAC,GAAG,CAAC,CAAC,CAAC,CACL,EACE;YAAA,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,CACzB,CAAC,YAAY,CACX,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,MAAM,CAAC,CAAC;oBACN,KAAK,EAAE,UAAU,EAAE,KAAwB;oBAC3C,MAAM,EAAE,UAAU,EAAE,MAAyB;oBAC7C,KAAK,EAAE,UAAU,EAAE,KAAK;oBACxB,KAAK,EAAE,QAAQ;iBAChB,CAAC,EACF,CACH,CAAC,CAAC,CAAC,CACF,eAAe,CAAC,GAAG,CAAC,CACrB,CACH;UAAA,GAAG,CACJ,CAAC,CAAC,CAAC,CACF,CAAC,QAAQ,CACP,MAAM,CAAC,CAAC;gBACN,KAAK,EAAE,UAAU,EAAE,KAAwB;gBAC3C,MAAM,EAAE,UAAU,EAAE,MAAyB;gBAC7C,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,QAAQ;aAChB,CAAC,EACF,CACH,CACH;MAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AACF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,eAAe,IAAI,CAAC"}
@@ -12,6 +12,7 @@ export type ImageProps = PropsWithChildren<Omit<WithStyledProps<ExpoImageProps>,
12
12
  styled?: StyledProps<ViewProps> & {
13
13
  /** Image-specific styling */
14
14
  styleImage?: StyledProp<ImageStyle>;
15
+ styledImageProps?: StyledProps<ExpoImageProps>;
15
16
  };
16
17
  /** Alternative data source for the image */
17
18
  dataSource?: string;
@@ -48,6 +49,7 @@ declare const Image: import("react").ForwardRefExoticComponent<Omit<WithStyledPr
48
49
  styled?: StyledProps<ViewProps> & {
49
50
  /** Image-specific styling */
50
51
  styleImage?: StyledProp<ImageStyle>;
52
+ styledImageProps?: StyledProps<ExpoImageProps>;
51
53
  };
52
54
  /** Alternative data source for the image */
53
55
  dataSource?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/media/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAEL,UAAU,EACV,WAAW,EAEX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAsB,UAAU,IAAI,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,iBAAiB,CACxC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,GAAG;IAChD,qEAAqE;IACrE,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,6BAA6B;QAC7B,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;KACrC,CAAC;IACF,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CACF,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,KAAK;IAvCP,qEAAqE;aAC5D,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,6BAA6B;QAC7B,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;KACrC;IACD,4CAA4C;iBAC/B,MAAM;;;2CA+CtB,CAAC;AAGF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/media/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAEL,UAAU,EACV,WAAW,EAEX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAsB,UAAU,IAAI,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,iBAAiB,CACxC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,GAAG;IAChD,qEAAqE;IACrE,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,6BAA6B;QAC7B,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;QACpC,gBAAgB,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;KAChD,CAAC;IACF,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CACF,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,KAAK;IAxCP,qEAAqE;aAC5D,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,6BAA6B;QAC7B,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;QACpC,gBAAgB,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;KAChD;IACD,4CAA4C;iBAC/B,MAAM;;;2CA+CtB,CAAC;AAGF,eAAe,KAAK,CAAC"}
@@ -29,10 +29,10 @@ const StyledExpoImage = styled(ExpoImage);
29
29
  *
30
30
  * @public
31
31
  */
32
- const Image = forwardRef(({ styled, source, alt, dataSource, ...props }, ref) => {
33
- const { styleImage, ...styledProps } = styled || {};
34
- return (<StyledView ref={ref} styled={styledProps} {...props}>
35
- <StyledExpoImage source={dataSource || source} alt={alt} styled={{ style: styleImage }}/>
32
+ const Image = forwardRef(({ styled, source, dataSource, ...props }, ref) => {
33
+ const { styleImage, styledImageProps, ...styledProps } = styled || {};
34
+ return (<StyledView ref={ref} styled={styledProps}>
35
+ <StyledExpoImage source={dataSource || source} styled={{ style: styleImage, ...(styledImageProps || {}) }} {...props}/>
36
36
  </StyledView>);
37
37
  });
38
38
  Image.displayName = 'Image';
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../src/components/media/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EAGN,UAAU,GAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAgC,MAAM,YAAY,CAAC;AAoB9E,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,KAAK,GAAG,UAAU,CACtB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,KAAK,EAAc,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAEpD,OAAO,CACL,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CACnD;QAAA,CAAC,eAAe,CACd,MAAM,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,CAC7B,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAElC;MAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../src/components/media/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EAGN,UAAU,GAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAgC,MAAM,YAAY,CAAC;AAqB9E,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,KAAK,GAAG,UAAU,CACtB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,EAAc,EAAE,GAAG,EAAE,EAAE;IAC5D,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAEtE,OAAO,CACL,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CACxC;QAAA,CAAC,eAAe,CACd,MAAM,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,CAC7B,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC,EAAE,CAAC,CAC3D,IAAI,KAAK,CAAC,EAEd;MAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,eAAe,KAAK,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { StyledProp, StyledProps, WithStyledProps } from '@mapples/style';
3
+ import { View, ViewProps } from 'react-native';
4
+ import { SvgProps } from 'react-native-svg';
5
+ /**
6
+ * Props for the QRCode component.
7
+ *
8
+ * @public
9
+ */
10
+ export type QRCodeProps = PropsWithChildren<Omit<WithStyledProps<ViewProps>, 'styled'> & {
11
+ /** Styling configuration for the QR code container and SVG */
12
+ styled?: StyledProps<ViewProps> & {
13
+ /** SVG-specific styling */
14
+ styleSvg?: StyledProp<SvgProps>;
15
+ };
16
+ /** The value to encode as a QR code */
17
+ value?: string;
18
+ /** Size of the QR code (width and height) */
19
+ size?: number;
20
+ /** Background color of the QR code */
21
+ backgroundColor?: string;
22
+ /** Foreground color of the QR code */
23
+ color?: string;
24
+ /** Error correction level */
25
+ ecl?: 'L' | 'M' | 'Q' | 'H';
26
+ /** Logo to display in the center of the QR code */
27
+ logo?: string;
28
+ /** Size of the logo */
29
+ logoSize?: number;
30
+ /** Margin around the QR code */
31
+ quietZone?: number;
32
+ }>;
33
+ /**
34
+ * A customizable QR code component with built-in styling support.
35
+ *
36
+ * The QRCode component renders a QR code using react-native-svg.
37
+ * It supports customizable styling through the @mapples/style system.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <QRCode
42
+ * value="https://example.com"
43
+ * size={200}
44
+ * styled={{
45
+ * style: {
46
+ * width: 200,
47
+ * height: 200,
48
+ * alignItems: 'center',
49
+ * justifyContent: 'center',
50
+ * },
51
+ * }}
52
+ * />
53
+ * ```
54
+ *
55
+ * @public
56
+ */
57
+ declare const QRCode: import("react").ForwardRefExoticComponent<Omit<WithStyledProps<ViewProps>, "styled"> & {
58
+ /** Styling configuration for the QR code container and SVG */
59
+ styled?: StyledProps<ViewProps> & {
60
+ /** SVG-specific styling */
61
+ styleSvg?: StyledProp<SvgProps>;
62
+ };
63
+ /** The value to encode as a QR code */
64
+ value?: string;
65
+ /** Size of the QR code (width and height) */
66
+ size?: number;
67
+ /** Background color of the QR code */
68
+ backgroundColor?: string;
69
+ /** Foreground color of the QR code */
70
+ color?: string;
71
+ /** Error correction level */
72
+ ecl?: "L" | "M" | "Q" | "H";
73
+ /** Logo to display in the center of the QR code */
74
+ logo?: string;
75
+ /** Size of the logo */
76
+ logoSize?: number;
77
+ /** Margin around the QR code */
78
+ quietZone?: number;
79
+ } & {
80
+ children?: import("react").ReactNode | undefined;
81
+ } & import("react").RefAttributes<View>>;
82
+ export default QRCode;
83
+ //# sourceMappingURL=QRCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QRCode.d.ts","sourceR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C/B,MAAM;IACd,6CAA6C;WACtC,MAAM;IACb,sCAAsC;sBACpB,MAAM;IACxB,sCAAsC;YAC9B,MAAM;IACd,6BAA6B;UACvB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;IAC3B,mDAAmD;WAC5C,MAAM;IACb,uBAAuB;eACZ,MAAM;IACjB,gCAAgC;gBACpB,MAAM;;;wCAsErB,CAAC;AAGF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { forwardRef, useMemo } from 'react';
2
+ import { StyledView, Styler, } from '@mapples/style';
3
+ import QRCodeSvg from 'react-native-qrcode-svg';
4
+ /**
5
+ * A customizable QR code component with built-in styling support.
6
+ *
7
+ * The QRCode component renders a QR code using react-native-svg.
8
+ * It supports customizable styling through the @mapples/style system.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <QRCode
13
+ * value="https://example.com"
14
+ * size={200}
15
+ * styled={{
16
+ * style: {
17
+ * width: 200,
18
+ * height: 200,
19
+ * alignItems: 'center',
20
+ * justifyContent: 'center',
21
+ * },
22
+ * }}
23
+ * />
24
+ * ```
25
+ *
26
+ * @public
27
+ */
28
+ const QRCode = forwardRef(({ styled, value = '', size = 200, backgroundColor = '#FFFFFF', color = '#000000', ecl = 'M', logo, logoSize, quietZone, ...props }, ref) => {
29
+ const { styleSvg, ...styledProps } = styled || {};
30
+ const svgStyle = useMemo(() => {
31
+ const flattened = styleSvg ? Styler.flatten(styleSvg) : {};
32
+ return {
33
+ ...flattened,
34
+ };
35
+ }, [styleSvg]);
36
+ return (<StyledView ref={ref} styled={styledProps} {...props}>
37
+ {value && (<QRCodeSvg value={value} size={size} color={color} backgroundColor={backgroundColor} ecl={ecl} logo={logo ? { uri: logo } : undefined} logoSize={logoSize} quietZone={quietZone}/>)}
38
+ </StyledView>);
39
+ });
40
+ QRCode.displayName = 'QRCode';
41
+ export default QRCode;
42
+ //# sourceMappingURL=QRCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CACvC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,SAAS,CAAC,CAAC,SAAS,CAAC,EACrB,CACH,CACH;MAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,eAAe,MAAM,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default } from './QRCode';
2
+ export * from './QRCode';
3
+ export * from './schematics';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/media/QRCode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default } from './QRCode';
2
+ export * from './QRCode';
3
+ export * from './schematics';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/media/QRCode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponent } from '@mapples/types';
2
+ export declare const QRCodeSchematic: RegisteredComponent;
3
+ //# sourceMappingURL=schematics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/media/QRCode/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,eAAe,EAAE,mBAG7B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import QRCode from './QRCode';
2
+ export const QRCodeSchematic = {
3
+ type: 'QRCode',
4
+ Component: QRCode,
5
+ };
6
+ //# sourceMappingURL=schematics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/media/QRCode/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,eAAe,GAAwB;IAClD,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,MAAM;CAClB,CAAC"}
@@ -4,5 +4,9 @@ export { default as Image } from './Image';
4
4
  export * from './Image';
5
5
  export { default as Icon } from './Icon';
6
6
  export * from './Icon';
7
+ export { default as BarCode } from './BarCode';
8
+ export * from './BarCode';
9
+ export { default as QRCode } from './QRCode';
10
+ export * from './QRCode';
7
11
  export * from './schematics';
8
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,cAAc,QAAQ,CAAC;AAEvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,cAAc,QAAQ,CAAC;AAEvB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC"}
@@ -4,5 +4,9 @@ export { default as Image } from './Image';
4
4
  export * from './Image';
5
5
  export { default as Icon } from './Icon';
6
6
  export * from './Icon';
7
+ export { default as BarCode } from './BarCode';
8
+ export * from './BarCode';
9
+ export { default as QRCode } from './QRCode';
10
+ export * from './QRCode';
7
11
  export * from './schematics';
8
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/media/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,cAAc,QAAQ,CAAC;AAEvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/media/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,cAAc,QAAQ,CAAC;AAEvB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../src/components/media/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD,eAAO,MAAM,eAAe,EAAE,oBAI7B,CAAC"}
1
+ {"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../src/components/media/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAQtD,eAAO,MAAM,eAAe,EAAE,oBAM7B,CAAC"}
@@ -1,9 +1,13 @@
1
+ import { BarCodeSchematic } from './BarCode';
1
2
  import { IconSchematics } from './Icon';
2
3
  import { ImageSchematic } from './Image';
4
+ import { QRCodeSchematic } from './QRCode';
3
5
  import { VideoSchematic } from './Video';
4
6
  export const MediaSchematics = {
5
7
  [VideoSchematic.type]: VideoSchematic,
6
8
  [ImageSchematic.type]: ImageSchematic,
7
9
  [IconSchematics.type]: IconSchematics,
10
+ [BarCodeSchematic.type]: BarCodeSchematic,
11
+ [QRCodeSchematic.type]: QRCodeSchematic,
8
12
  };
9
13
  //# sourceMappingURL=schematics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../src/components/media/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;IACrC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;IACrC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;CACtC,CAAC"}
1
+ {"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../src/components/media/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;IACrC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;IACrC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;IACrC,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,gBAAgB;IACzC,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,eAAe;CACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapples/ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -20,8 +20,11 @@
20
20
  "directory": "packages/@mapples/ui"
21
21
  },
22
22
  "peerDependencies": {
23
+ "jsbarcode": "^3.11.5",
23
24
  "react": ">=18.0.0 <20.0.0",
24
- "react-native": ">=0.71.0"
25
+ "react-native": ">=0.71.0",
26
+ "react-native-qrcode-svg": "^6.0.0",
27
+ "react-native-svg": ">=12.0.0"
25
28
  },
26
29
  "devDependencies": {
27
30
  "@types/react": ">=18.0.0 <20.0.0",