@royaloperahouse/harmonic 0.15.0-c → 0.15.0-e

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.
@@ -1,5 +1,4 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- import { StyledProps } from 'styled-components';
1
+ import React from 'react';
3
2
  export declare enum AspectRatio {
4
3
  '1:1' = "1 / 1",
5
4
  '3:4' = "3 / 4",
@@ -44,13 +43,18 @@ export interface IImageWithCaptionProps {
44
43
  caption: string;
45
44
  /** Alternative text describing the image content for accessibility purposes. */
46
45
  altText?: string;
47
- /** Image element */
48
- children: ReactElement<HTMLImageElement>;
46
+ /** Image source */
47
+ src: string;
48
+ /** Optional srcSet for responsive images */
49
+ srcSet?: string;
50
+ /** Optional sizes for responsive images */
51
+ sizes?: string;
52
+ /** Optional loading strategy */
53
+ loading?: 'lazy' | 'eager';
54
+ /** Custom CSS classes */
55
+ className?: string;
49
56
  }
50
- export interface IImageWithCaptionWrapperProps extends StyledProps<{
51
- aspectRatio?: AspectRatio;
52
- height: number;
53
- }> {
57
+ export interface IImageWithCaptionWrapperProps {
54
58
  /**
55
59
  * Aspect ratio of the contained image
56
60
  */
@@ -58,11 +62,11 @@ export interface IImageWithCaptionWrapperProps extends StyledProps<{
58
62
  /**
59
63
  * Height of the wrapper
60
64
  */
61
- height: number;
65
+ height?: number;
62
66
  }
63
- export interface ImageAspectRatioWrapperProps extends IImageAspectRatioWrapperProps {
67
+ export interface ImageAspectRatioWrapperProps extends IImageAspectRatioWrapperProps, React.HTMLAttributes<HTMLDivElement> {
64
68
  /**
65
69
  * Image elements
66
70
  */
67
- children: ReactNode;
71
+ children: React.ReactNode;
68
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "0.15.0-c",
3
+ "version": "0.15.0-e",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",