@sudobility/components 4.0.134 → 4.0.140

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.
@@ -8,6 +8,7 @@ export * from './image-gallery';
8
8
  export * from './image-comparison';
9
9
  export * from './image-cropper';
10
10
  export * from './lightbox';
11
+ export * from './retina-image';
11
12
  export * from './video-player';
12
13
  export * from './video-thumbnail';
13
14
  export * from './video-editor';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/media/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAG3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAG9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/media/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAG9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { default as React } from 'react';
2
+ export interface RetinaImageProps {
3
+ /** Image source URL */
4
+ src: string;
5
+ /** Alt text */
6
+ alt: string;
7
+ /** Scale factor for retina images (default: 2 for 2x retina) */
8
+ scale?: number;
9
+ /** Additional className for the image */
10
+ className?: string;
11
+ /** Additional className for the container */
12
+ containerClassName?: string;
13
+ /** Callback when image loads */
14
+ onLoad?: () => void;
15
+ /** Callback when image errors */
16
+ onError?: () => void;
17
+ }
18
+ /**
19
+ * RetinaImage Component
20
+ *
21
+ * Displays retina (high-DPI) images at their correct display size.
22
+ * Automatically scales down images based on the scale factor.
23
+ * For 2x retina images, displays at 50% of natural dimensions.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * // Display a 2x retina screenshot at correct size
28
+ * <RetinaImage
29
+ * src="/screenshots/feature.png"
30
+ * alt="Feature screenshot"
31
+ * />
32
+ * ```
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * // Display a 3x retina image
37
+ * <RetinaImage
38
+ * src="/images/icon@3x.png"
39
+ * alt="App icon"
40
+ * scale={3}
41
+ * />
42
+ * ```
43
+ */
44
+ export declare const RetinaImage: React.FC<RetinaImageProps>;
45
+ //# sourceMappingURL=retina-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retina-image.d.ts","sourceRoot":"","sources":["../../src/media/retina-image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwClD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/components",
3
- "version": "4.0.134",
3
+ "version": "4.0.140",
4
4
  "description": "Reusable UI components and design system - Reorganized for better maintainability",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",
@@ -56,8 +56,8 @@
56
56
  "@radix-ui/react-slot": ">=1.0.0",
57
57
  "@radix-ui/react-switch": ">=1.0.0",
58
58
  "@radix-ui/react-tabs": ">=1.0.0",
59
- "@sudobility/design": "^1.1.17",
60
- "@sudobility/types": "^1.9.43",
59
+ "@sudobility/design": "^1.1.18",
60
+ "@sudobility/types": "^1.9.44",
61
61
  "class-variance-authority": ">=0.7.0",
62
62
  "clsx": ">=2.0.0",
63
63
  "i18next": ">=23.0.0",
@@ -79,8 +79,8 @@
79
79
  "@radix-ui/react-slot": "^1.2.3",
80
80
  "@radix-ui/react-switch": "^1.2.6",
81
81
  "@radix-ui/react-tabs": "^1.1.13",
82
- "@sudobility/design": "^1.1.17",
83
- "@sudobility/types": "^1.9.43",
82
+ "@sudobility/design": "^1.1.18",
83
+ "@sudobility/types": "^1.9.44",
84
84
  "@testing-library/dom": "^10.4.1",
85
85
  "@testing-library/jest-dom": "^6.9.1",
86
86
  "@testing-library/react": "^16.3.0",
@@ -133,6 +133,6 @@
133
133
  "access": "public"
134
134
  },
135
135
  "dependencies": {
136
- "@sudobility/components": "^4.0.133"
136
+ "@sudobility/components": "^4.0.139"
137
137
  }
138
138
  }