@tamagui/image 2.7.7 → 3.0.0-beta.643.1
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/cjs/Image.cjs +25 -45
- package/dist/cjs/Image.native.cjs +29 -0
- package/dist/cjs/Image.native.js +16 -20
- package/dist/cjs/Image.native.js.map +1 -1
- package/dist/cjs/createImage.cjs +112 -145
- package/dist/cjs/createImage.native.cjs +133 -0
- package/dist/cjs/createImage.native.js +116 -145
- package/dist/cjs/createImage.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +22 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +10 -11
- package/dist/cjs/types.native.cjs +19 -0
- package/dist/cjs/types.native.js +10 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/Image.mjs +13 -28
- package/dist/esm/Image.mjs.map +1 -1
- package/dist/esm/Image.native.js +4 -4
- package/dist/esm/Image.native.js.map +1 -1
- package/dist/esm/createImage.mjs +100 -128
- package/dist/esm/createImage.mjs.map +1 -1
- package/dist/esm/createImage.native.js +105 -130
- package/dist/esm/createImage.native.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.native.js +3 -3
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.native.js +0 -2
- package/dist/jsx/Image.mjs +13 -28
- package/dist/jsx/Image.mjs.map +1 -1
- package/dist/jsx/Image.native.cjs +29 -0
- package/dist/jsx/Image.native.js +16 -20
- package/dist/jsx/Image.native.js.map +1 -1
- package/dist/jsx/createImage.mjs +100 -128
- package/dist/jsx/createImage.mjs.map +1 -1
- package/dist/jsx/createImage.native.cjs +133 -0
- package/dist/jsx/createImage.native.js +116 -145
- package/dist/jsx/createImage.native.js.map +1 -1
- package/dist/jsx/index.js +3 -3
- package/dist/jsx/index.mjs +3 -3
- package/dist/jsx/index.native.cjs +22 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.native.cjs +19 -0
- package/dist/jsx/types.native.js +10 -10
- package/dist/jsx/types.native.js.map +1 -1
- package/package.json +8 -7
- package/src/Image.tsx +5 -4
- package/src/createImage.tsx +99 -89
- package/types/Image.d.ts.map +1 -1
- package/types/Image.native.d.ts +4 -4
- package/types/Image.native.d.ts.map +1 -1
- package/types/createImage.d.ts +4 -4
- package/types/createImage.d.ts.map +1 -1
- package/dist/cjs/v1/Image.cjs +0 -101
- package/dist/cjs/v1/Image.native.js +0 -123
- package/dist/cjs/v1/Image.native.js.map +0 -1
- package/dist/cjs/v1/index.cjs +0 -20
- package/dist/cjs/v1/index.native.js +0 -23
- package/dist/cjs/v1/index.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/v1/Image.mjs +0 -65
- package/dist/esm/v1/Image.mjs.map +0 -1
- package/dist/esm/v1/Image.native.js +0 -84
- package/dist/esm/v1/Image.native.js.map +0 -1
- package/dist/esm/v1/index.mjs +0 -2
- package/dist/esm/v1/index.mjs.map +0 -1
- package/dist/esm/v1/index.native.js +0 -2
- package/dist/esm/v1/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/v1/Image.mjs +0 -65
- package/dist/jsx/v1/Image.mjs.map +0 -1
- package/dist/jsx/v1/Image.native.js +0 -123
- package/dist/jsx/v1/Image.native.js.map +0 -1
- package/dist/jsx/v1/index.mjs +0 -2
- package/dist/jsx/v1/index.mjs.map +0 -1
- package/dist/jsx/v1/index.native.js +0 -23
- package/dist/jsx/v1/index.native.js.map +0 -1
- package/src/v1/Image.tsx +0 -144
- package/src/v1/index.ts +0 -1
- package/types/v1/Image.d.ts +0 -36
- package/types/v1/Image.d.ts.map +0 -1
- package/types/v1/index.d.ts +0 -2
- package/types/v1/index.d.ts.map +0 -1
package/src/createImage.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getTokenValue, styled } from '@tamagui/web'
|
|
1
|
+
import { createStyledHOC, getTokenValue, styled } from '@tamagui/web'
|
|
2
2
|
import type { ComponentType } from 'react'
|
|
3
3
|
import type { ImageResizeMode } from 'react-native'
|
|
4
4
|
import type { ImageProps, ImageType } from './types'
|
|
@@ -131,7 +131,7 @@ export function createImage<C extends ComponentType<any>>(
|
|
|
131
131
|
const StyledImage = styled(
|
|
132
132
|
Component as ComponentType<any>,
|
|
133
133
|
{
|
|
134
|
-
|
|
134
|
+
displayName: 'Image',
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
inlineProps: inlinePropsSet,
|
|
@@ -141,100 +141,110 @@ export function createImage<C extends ComponentType<any>>(
|
|
|
141
141
|
// Combined props: ImageProps (Tamagui) + Component's native props
|
|
142
142
|
type CombinedProps = ImageProps & Omit<GetProps<C>, keyof ImageProps>
|
|
143
143
|
|
|
144
|
-
const ImageComponent =
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
typeof width === 'string' && width[0] === '$'
|
|
169
|
-
? getTokenValue(width as any, 'size')
|
|
170
|
-
: width
|
|
171
|
-
const resolvedHeight =
|
|
172
|
-
typeof height === 'string' && height[0] === '$'
|
|
173
|
-
? getTokenValue(height as any, 'size')
|
|
174
|
-
: height
|
|
175
|
-
|
|
176
|
-
const finalSource = transformSource({
|
|
177
|
-
src,
|
|
178
|
-
source,
|
|
179
|
-
width: resolvedWidth,
|
|
180
|
-
height: resolvedHeight,
|
|
181
|
-
})
|
|
182
|
-
|
|
183
|
-
const incomingStyle = Array.isArray(rest.style)
|
|
184
|
-
? Object.assign({}, ...rest.style.flat())
|
|
185
|
-
: rest.style
|
|
186
|
-
|
|
187
|
-
const resolvedBorderRadius =
|
|
188
|
-
typeof borderRadius === 'string' && borderRadius[0] === '$'
|
|
189
|
-
? getTokenValue(borderRadius as any, 'radius')
|
|
190
|
-
: borderRadius
|
|
191
|
-
|
|
192
|
-
const finalProps: any = {
|
|
193
|
-
...rest,
|
|
194
|
-
source: finalSource,
|
|
195
|
-
style: {
|
|
196
|
-
...incomingStyle,
|
|
197
|
-
...(resolvedBorderRadius !== undefined && { borderRadius: resolvedBorderRadius }),
|
|
198
|
-
...(resolvedWidth !== undefined && { width: resolvedWidth }),
|
|
199
|
-
...(resolvedHeight !== undefined && { height: resolvedHeight }),
|
|
200
|
-
},
|
|
201
|
-
}
|
|
144
|
+
const ImageComponent = createStyledHOC(
|
|
145
|
+
StyledImage,
|
|
146
|
+
(incomingProps: CombinedProps, ref) => {
|
|
147
|
+
const props = incomingProps as any
|
|
148
|
+
const {
|
|
149
|
+
src,
|
|
150
|
+
source,
|
|
151
|
+
width,
|
|
152
|
+
height,
|
|
153
|
+
borderRadius,
|
|
154
|
+
objectFit,
|
|
155
|
+
objectPosition,
|
|
156
|
+
// web only props - filter out on native
|
|
157
|
+
decoding,
|
|
158
|
+
elementTiming,
|
|
159
|
+
fetchpriority,
|
|
160
|
+
isMap,
|
|
161
|
+
loading,
|
|
162
|
+
sizes,
|
|
163
|
+
useMap,
|
|
164
|
+
onLoad,
|
|
165
|
+
onError,
|
|
166
|
+
...rest
|
|
167
|
+
} = props
|
|
202
168
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
169
|
+
const resolvedWidth =
|
|
170
|
+
typeof width === 'string' ? (getTokenValue(width as any, 'size') ?? width) : width
|
|
171
|
+
const resolvedHeight =
|
|
172
|
+
typeof height === 'string'
|
|
173
|
+
? (getTokenValue(height as any, 'size') ?? height)
|
|
174
|
+
: height
|
|
207
175
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
176
|
+
const finalSource = transformSource({
|
|
177
|
+
src,
|
|
178
|
+
source,
|
|
179
|
+
width: resolvedWidth,
|
|
180
|
+
height: resolvedHeight,
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
const incomingStyle = Array.isArray(rest.style)
|
|
184
|
+
? Object.assign({}, ...rest.style.flat())
|
|
185
|
+
: rest.style
|
|
212
186
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
187
|
+
const resolvedBorderRadius =
|
|
188
|
+
typeof borderRadius === 'string'
|
|
189
|
+
? (getTokenValue(borderRadius as any, 'radius') ?? borderRadius)
|
|
190
|
+
: borderRadius
|
|
191
|
+
|
|
192
|
+
const finalProps: any = {
|
|
193
|
+
...rest,
|
|
194
|
+
source: finalSource,
|
|
195
|
+
style: {
|
|
196
|
+
...incomingStyle,
|
|
197
|
+
...(resolvedBorderRadius !== undefined && {
|
|
198
|
+
borderRadius: resolvedBorderRadius,
|
|
199
|
+
}),
|
|
200
|
+
...(resolvedWidth !== undefined && { width: resolvedWidth }),
|
|
201
|
+
...(resolvedHeight !== undefined && { height: resolvedHeight }),
|
|
202
|
+
// RN 0.76+ reads objectFit from style natively on Image; harmless on older.
|
|
203
|
+
// Also forwarded to the resize-mode prop below for back-compat / non-RN components.
|
|
204
|
+
...(objectFit !== undefined && { objectFit }),
|
|
205
|
+
// RN doesn't currently read objectPosition from style; expo-image uses
|
|
206
|
+
// contentPosition (handled via objectPositionPropName below). Forwarding
|
|
207
|
+
// through style is a no-op there but matches CSS shape and is forward-compatible.
|
|
208
|
+
...(objectPosition !== undefined && { objectPosition }),
|
|
209
|
+
},
|
|
224
210
|
}
|
|
225
|
-
}
|
|
226
211
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
onError({
|
|
231
|
-
type: 'error',
|
|
232
|
-
} as any)
|
|
212
|
+
// Set resize mode / content fit
|
|
213
|
+
if (objectFit) {
|
|
214
|
+
finalProps[resizeModePropName] = mapObjectFitToResizeMode(objectFit)
|
|
233
215
|
}
|
|
234
|
-
}
|
|
235
216
|
|
|
236
|
-
|
|
237
|
-
|
|
217
|
+
// Add object position if supported (e.g. expo-image's contentPosition)
|
|
218
|
+
if (objectPositionPropName && objectPosition) {
|
|
219
|
+
finalProps[objectPositionPropName] = objectPosition
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Normalize onLoad event
|
|
223
|
+
if (onLoad) {
|
|
224
|
+
finalProps.onLoad = (e: any) => {
|
|
225
|
+
const source = e?.nativeEvent?.source || e?.source || {}
|
|
226
|
+
onLoad({
|
|
227
|
+
target: {
|
|
228
|
+
naturalHeight: source?.height,
|
|
229
|
+
naturalWidth: source?.width,
|
|
230
|
+
},
|
|
231
|
+
type: 'load',
|
|
232
|
+
} as any)
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Normalize onError event
|
|
237
|
+
if (onError) {
|
|
238
|
+
finalProps.onError = () => {
|
|
239
|
+
onError({
|
|
240
|
+
type: 'error',
|
|
241
|
+
} as any)
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return <StyledImage ref={ref} {...finalProps} />
|
|
246
|
+
}
|
|
247
|
+
) as unknown as ImageType & React.FC<CombinedProps>
|
|
238
248
|
|
|
239
249
|
// Add static methods if the component has them
|
|
240
250
|
const comp = Component as any
|
package/types/Image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,SAAS,CAAA;AAOpD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,SAAS,CAAA;AAOpD,eAAO,MAAM,KAAK,EAwBF,SAAS,CAAA"}
|
package/types/Image.native.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export declare const Image: import("react").FC<Partial<import("./types").ImagePr
|
|
|
6
6
|
prefetchWithMetadata: typeof RNImage.prefetchWithMetadata;
|
|
7
7
|
abortPrefetch: typeof RNImage.abortPrefetch | undefined;
|
|
8
8
|
queryCache: typeof RNImage.queryCache | undefined;
|
|
9
|
-
} & import("react").FC<import("@tamagui/web").StackNonStyleProps & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> &
|
|
9
|
+
} & import("react").FC<import("@tamagui/web").StackNonStyleProps & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & Omit<import("react-native").ImageProps, "resizeMode" | "source" | keyof import("@tamagui/web").StackNonStyleProps | keyof import("@tamagui/web").StackStyleBase> & {
|
|
10
10
|
src?: string | number;
|
|
11
11
|
source?: import("react-native").ImageSourcePropType;
|
|
12
12
|
resizeMode?: import("react-native").ImageResizeMode;
|
|
13
|
-
objectFit?: React.CSSProperties[
|
|
14
|
-
objectPosition?: React.CSSProperties[
|
|
15
|
-
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>,
|
|
13
|
+
objectFit?: React.CSSProperties['objectFit'];
|
|
14
|
+
objectPosition?: React.CSSProperties['objectPosition'];
|
|
15
|
+
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "src" | keyof import("@tamagui/web").StackNonStyleProps | keyof import("@tamagui/web").StackStyleBase> & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "height" | "src" | "style" | "width"> & Omit<import("react-native").ImageProps, "about" | "accessKey" | "alt" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "blurRadius" | "capInsets" | "content" | "contentEditable" | "contextMenu" | "crossOrigin" | "datatype" | "decoding" | "defaultChecked" | "defaultSource" | "defaultValue" | "dir" | "draggable" | "enterKeyHint" | "exportparts" | "fadeDuration" | "fetchPriority" | "hidden" | "inert" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "lang" | "loading" | "loadingIndicatorSource" | "nonce" | "objectPosition" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInputCapture" | "onBeforeToggle" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChangeCapture" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenuCapture" | "onCopyCapture" | "onCutCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onLayout" | "onLoad" | "onLoadCapture" | "onLoadEnd" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onPartialLoad" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onToggle" | "onTouchCancelCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheelCapture" | "part" | "popover" | "popoverTarget" | "popoverTargetAction" | "prefix" | "progressiveRenderingEnabled" | "property" | "radioGroup" | "referrerPolicy" | "rel" | "resizeMethod" | "resizeMode" | "resource" | "results" | "rev" | "security" | "sizes" | "slot" | "source" | "spellCheck" | "src" | "srcSet" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tintColor" | "title" | "translate" | "typeof" | "unselectable" | "useMap" | "vocab" | keyof import("@tamagui/web").StackNonStyleProps | keyof import("@tamagui/web").StackStyleBase>>;
|
|
16
16
|
//# sourceMappingURL=Image.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.native.d.ts","sourceRoot":"","sources":["../src/Image.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,cAAc,CAAA;AAG/C,eAAO,MAAM,KAAK;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Image.native.d.ts","sourceRoot":"","sources":["../src/Image.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,cAAc,CAAA;AAG/C,eAAO,MAAM,KAAK;;;;;;;;;;;;;gqJAEhB,CAAA"}
|
package/types/createImage.d.ts
CHANGED
|
@@ -66,12 +66,12 @@ export declare function createImage<C extends ComponentType<any>>(options: Creat
|
|
|
66
66
|
prefetchWithMetadata: typeof import("react-native").Image.prefetchWithMetadata;
|
|
67
67
|
abortPrefetch: typeof import("react-native").Image.abortPrefetch | undefined;
|
|
68
68
|
queryCache: typeof import("react-native").Image.queryCache | undefined;
|
|
69
|
-
} & import("react").FC<import("@tamagui/web").StackNonStyleProps & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> &
|
|
69
|
+
} & import("react").FC<import("@tamagui/web").StackNonStyleProps & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & Omit<import("react-native").ImageProps, "resizeMode" | "source" | keyof import("@tamagui/web").StackNonStyleProps | keyof import("@tamagui/web").StackStyleBase> & {
|
|
70
70
|
src?: string | number;
|
|
71
71
|
source?: import("react-native").ImageSourcePropType;
|
|
72
72
|
resizeMode?: ImageResizeMode;
|
|
73
|
-
objectFit?: React.CSSProperties[
|
|
74
|
-
objectPosition?: React.CSSProperties[
|
|
75
|
-
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>,
|
|
73
|
+
objectFit?: React.CSSProperties['objectFit'];
|
|
74
|
+
objectPosition?: React.CSSProperties['objectPosition'];
|
|
75
|
+
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "src" | keyof import("@tamagui/web").StackNonStyleProps | keyof import("@tamagui/web").StackStyleBase> & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "height" | "src" | "style" | "width"> & Omit<GetProps<C>, "about" | "accessKey" | "alt" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "blurRadius" | "capInsets" | "content" | "contentEditable" | "contextMenu" | "crossOrigin" | "datatype" | "decoding" | "defaultChecked" | "defaultSource" | "defaultValue" | "dir" | "draggable" | "enterKeyHint" | "exportparts" | "fadeDuration" | "fetchPriority" | "hidden" | "inert" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "lang" | "loading" | "loadingIndicatorSource" | "nonce" | "objectPosition" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInputCapture" | "onBeforeToggle" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChangeCapture" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenuCapture" | "onCopyCapture" | "onCutCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onLayout" | "onLoad" | "onLoadCapture" | "onLoadEnd" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onPartialLoad" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onToggle" | "onTouchCancelCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheelCapture" | "part" | "popover" | "popoverTarget" | "popoverTargetAction" | "prefix" | "progressiveRenderingEnabled" | "property" | "radioGroup" | "referrerPolicy" | "rel" | "resizeMethod" | "resizeMode" | "resource" | "results" | "rev" | "security" | "sizes" | "slot" | "source" | "spellCheck" | "src" | "srcSet" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tintColor" | "title" | "translate" | "typeof" | "unselectable" | "useMap" | "vocab" | keyof import("@tamagui/web").StackNonStyleProps | keyof import("@tamagui/web").StackStyleBase>>;
|
|
76
76
|
export {};
|
|
77
77
|
//# sourceMappingURL=createImage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createImage.d.ts","sourceRoot":"","sources":["../src/createImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KA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AC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE/D,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,IAAI;IAC7D;;;OAGG;IACH,SAAS,EAAE,CAAC,CAAA;IACZ;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACxD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACrB,MAAM,CAAC,EAAE,GAAG,CAAA;QACZ,KAAK,CAAC,EAAE,GAAG,CAAA;QACX,MAAM,CAAC,EAAE,GAAG,CAAA;KACb,KAAK,GAAG,CAAA;CACV,CAAA;AAoCD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,EACtD,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC;;;;;;;;;;;;;mnJA8J/B"}
|
package/dist/cjs/v1/Image.cjs
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
34
|
-
var Image_exports = {};
|
|
35
|
-
__export(Image_exports, {
|
|
36
|
-
Image: () => Image
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(Image_exports);
|
|
39
|
-
var import_react = __toESM(require("react"), 1);
|
|
40
|
-
var import_constants = require("@tamagui/constants");
|
|
41
|
-
var import_web = require("@tamagui/web");
|
|
42
|
-
var import_react_native = require("react-native-web");
|
|
43
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
-
const StyledImage = (0, import_web.styled)(import_react_native.Image, {
|
|
45
|
-
name: "Image"
|
|
46
|
-
});
|
|
47
|
-
let hasWarned = false;
|
|
48
|
-
const Image = StyledImage.styleable((inProps, ref) => {
|
|
49
|
-
const [props, style] = (0, import_web.usePropsAndStyle)(inProps);
|
|
50
|
-
const {
|
|
51
|
-
src,
|
|
52
|
-
source,
|
|
53
|
-
objectFit,
|
|
54
|
-
...rest
|
|
55
|
-
} = props;
|
|
56
|
-
if (process.env.NODE_ENV === "development") {
|
|
57
|
-
if (typeof src === "string") {
|
|
58
|
-
if (typeof props.width === "string" && props.width[0] !== "$" || typeof props.height === "string" && props.height[0] !== "$") {
|
|
59
|
-
if (!hasWarned) {
|
|
60
|
-
hasWarned = true;
|
|
61
|
-
console.warn(`React Native expects a numerical width/height. If you want to use a percent you must define the "source" prop with width, height, and uri.`);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
let finalSource = typeof src === "string" ? {
|
|
67
|
-
uri: src,
|
|
68
|
-
...(import_constants.isWeb && {
|
|
69
|
-
width: props.width || style?.width,
|
|
70
|
-
height: props.height || style?.height
|
|
71
|
-
})
|
|
72
|
-
} : source ?? src;
|
|
73
|
-
if (finalSource && typeof finalSource === "object") {
|
|
74
|
-
if (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR) import_react.default.useEffect(() => {
|
|
75
|
-
async function run() {
|
|
76
|
-
if (typeof src === "string") try {
|
|
77
|
-
await fetch(src).then(res => res.text());
|
|
78
|
-
} catch (err) {
|
|
79
|
-
console.error(`Error loading image: ${src}`, {
|
|
80
|
-
props
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
run();
|
|
85
|
-
}, [src]);
|
|
86
|
-
if (finalSource["default"]) finalSource = finalSource["default"];
|
|
87
|
-
}
|
|
88
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Image, {
|
|
89
|
-
resizeMode: objectFit,
|
|
90
|
-
ref,
|
|
91
|
-
source: finalSource,
|
|
92
|
-
style,
|
|
93
|
-
...rest
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
Image.getSize = import_react_native.Image.getSize;
|
|
97
|
-
Image.getSizeWithHeaders = import_react_native.Image.getSizeWithHeaders;
|
|
98
|
-
Image.prefetch = import_react_native.Image.prefetch;
|
|
99
|
-
Image.prefetchWithMetadata = import_react_native.Image.prefetchWithMetadata;
|
|
100
|
-
Image.abortPrefetch = import_react_native.Image.abortPrefetch;
|
|
101
|
-
Image.queryCache = import_react_native.Image.queryCache;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all) __defProp(target, name, {
|
|
11
|
-
get: all[name],
|
|
12
|
-
enumerable: true
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
-
get: () => from[key],
|
|
19
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
32
|
-
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
36
|
-
var Image_exports = {};
|
|
37
|
-
__export(Image_exports, {
|
|
38
|
-
Image: () => Image
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(Image_exports);
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
var import_react = __toESM(require("react"), 1);
|
|
43
|
-
var import_constants = require("@tamagui/constants");
|
|
44
|
-
var import_web = require("@tamagui/web");
|
|
45
|
-
var import_react_native = require("react-native");
|
|
46
|
-
function _type_of(obj) {
|
|
47
|
-
"@swc/helpers - typeof";
|
|
48
|
-
|
|
49
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
50
|
-
}
|
|
51
|
-
var StyledImage = (0, import_web.styled)(import_react_native.Image, {
|
|
52
|
-
name: "Image"
|
|
53
|
-
});
|
|
54
|
-
var hasWarned = false;
|
|
55
|
-
var Image = StyledImage.styleable(function (inProps, ref) {
|
|
56
|
-
var [props, style] = (0, import_web.usePropsAndStyle)(inProps);
|
|
57
|
-
var {
|
|
58
|
-
src,
|
|
59
|
-
source,
|
|
60
|
-
objectFit,
|
|
61
|
-
...rest
|
|
62
|
-
} = props;
|
|
63
|
-
if (process.env.NODE_ENV === "development") {
|
|
64
|
-
if (typeof src === "string") {
|
|
65
|
-
if (typeof props.width === "string" && props.width[0] !== "$" || typeof props.height === "string" && props.height[0] !== "$") {
|
|
66
|
-
if (!hasWarned) {
|
|
67
|
-
hasWarned = true;
|
|
68
|
-
console.warn(`React Native expects a numerical width/height. If you want to use a percent you must define the "source" prop with width, height, and uri.`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
var finalSource = typeof src === "string" ? {
|
|
74
|
-
uri: src,
|
|
75
|
-
...(import_constants.isWeb && {
|
|
76
|
-
width: props.width || (style === null || style === void 0 ? void 0 : style.width),
|
|
77
|
-
height: props.height || (style === null || style === void 0 ? void 0 : style.height)
|
|
78
|
-
})
|
|
79
|
-
} : source !== null && source !== void 0 ? source : src;
|
|
80
|
-
if (finalSource && (typeof finalSource === "undefined" ? "undefined" : _type_of(finalSource)) === "object") {
|
|
81
|
-
if (!Array.isArray(finalSource)) {
|
|
82
|
-
if (typeof finalSource.uri === "number") {
|
|
83
|
-
finalSource = finalSource.uri;
|
|
84
|
-
if (source && (typeof source === "undefined" ? "undefined" : _type_of(source)) === "object" && !Array.isArray(source)) {
|
|
85
|
-
var _style, _style1;
|
|
86
|
-
var _width;
|
|
87
|
-
(_width = (_style = style).width) !== null && _width !== void 0 || (_style.width = source.width);
|
|
88
|
-
var _height;
|
|
89
|
-
(_height = (_style1 = style).height) !== null && _height !== void 0 || (_style1.height = source.height);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR) import_react.default.useEffect(function () {
|
|
94
|
-
async function run() {
|
|
95
|
-
if (typeof src === "string") try {
|
|
96
|
-
await fetch(src).then(function (res) {
|
|
97
|
-
return res.text();
|
|
98
|
-
});
|
|
99
|
-
} catch (err) {
|
|
100
|
-
console.error(`Error loading image: ${src}`, {
|
|
101
|
-
props
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
run();
|
|
106
|
-
}, [src]);
|
|
107
|
-
if (finalSource["default"]) finalSource = finalSource["default"];
|
|
108
|
-
}
|
|
109
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Image, {
|
|
110
|
-
resizeMode: objectFit,
|
|
111
|
-
ref,
|
|
112
|
-
source: finalSource,
|
|
113
|
-
style,
|
|
114
|
-
...rest
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
Image.getSize = import_react_native.Image.getSize;
|
|
118
|
-
Image.getSizeWithHeaders = import_react_native.Image.getSizeWithHeaders;
|
|
119
|
-
Image.prefetch = import_react_native.Image.prefetch;
|
|
120
|
-
Image.prefetchWithMetadata = import_react_native.Image.prefetchWithMetadata;
|
|
121
|
-
Image.abortPrefetch = import_react_native.Image.abortPrefetch;
|
|
122
|
-
Image.queryCache = import_react_native.Image.queryCache;
|
|
123
|
-
//# sourceMappingURL=Image.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isNodeMode","mod","__esModule","__defProp","target","value","enumerable","__toCommonJS","__copyProps","Image_exports","__export","Image","module","exports","import_jsx_runtime","require","import_react","__toESM","import_constants","import_web","import_react_native","_type_of","obj","Symbol","constructor","StyledImage","styled","name","hasWarned","styleable","inProps","ref","props","style","usePropsAndStyle","src","source","objectFit","rest","process","env","NODE_ENV","width","height","console","warn","finalSource","uri","isWeb","Array","isArray","_style","_style1","_width","_height","TAMAGUI_IMAGE_CHECK_ERROR","default","useEffect","run","fetch","then","res","text","err","error","jsx","resizeMode","getSize","getSizeWithHeaders","prefetch","prefetchWithMetadata","abortPrefetch","queryCache"],"sources":["../../../src/v1/Image.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,UAAA,KAAAC,GAAA,KAAAA,GAAA,CAAAC,UAAA,GAAAC,SAAA,CAAAC,MAAA;EAAAC,KAAA,EAAAJ,GAAA;EAAAK,UAAA;AAAA,KAAAF,MAAA,EAAAH,GAAA;AACA,IAAAM,YAAA,GAAAN,GAAsB,IAAAO,WAAA,CAAAL,SAAA;EAAAE,KAAA;AAAA,IAAAJ,GAAA;AAQtB,IAAAQ,aAAyC;AAEzCC,QAAA,CAAAD,aAAA;EAAiCE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AAqH7BC,MAAA,CAAAC,OAAA,GAAAN,YAAA,CAAAE,aAAA;AAnHJ,IAAAK,kBAAM,GAAcC,OAAA,oBAAO;AAAS,IAClCC,YAAM,GAAAC,OAAA,CAAAF,OAAA;AACR,IAACG,g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AAA;IACZK,MACA,EAAAU,WAAQ;IAAAb,KACR;IAAA,GAAAK;EACK;AAAA,EACP;AAEJ3B,KAAC,CAAAwD,OAAA,GAAA/C,mBAAA,CAAAT,KAAA,CAAAwD,OAAA;AAEDxD,KAAA,CAAMyD,kBAAU,GAAAhD,mBAAQ,CAAAT,KAAA,CAAAyD,kBAAA;AACxBzD,KAAA,CAAM0D,QAAA,GAAAjD,mBAAqB,CAAAT,KAAA,CAAA0D,QAAA;AAC3B1D,KAAA,CAAM2D,oBAAW,GAAAlD,mBAAQ,CAAAT,KAAA,CAAA2D,oBAAA;AACzB3D,KAAA,CAAM4D,aAAA,GAAAnD,mBAAuB,CAAAT,KAAA,CAAA4D,aAAQ;AACrC5D,KAAA,CAAM6D,UAAA,GAAApD,mBAAgB,CAAAT,KAAA,CAAA6D,UAAQ","ignoreList":[]}
|
package/dist/cjs/v1/index.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
-
get: () => from[key],
|
|
9
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
18
|
-
var v1_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(v1_exports);
|
|
20
|
-
__reExport(v1_exports, require("./Image.cjs"), module.exports);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
-
get: () => from[key],
|
|
11
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
20
|
-
var v1_exports = {};
|
|
21
|
-
module.exports = __toCommonJS(v1_exports);
|
|
22
|
-
__reExport(v1_exports, require("./Image.native.js"), module.exports);
|
|
23
|
-
//# sourceMappingURL=index.native.js.map
|