@starlightcms/react-sdk 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,8 +20,8 @@ export interface ResponsiveImageProps {
20
20
  sizes?: string;
21
21
  /**
22
22
  * Alternate text description of the image. If set and the given image is a
23
- * Starlight media object, it will overwrite this image's alternative text
24
- * set in Starlight.
23
+ * Starlight media object, it will be used in place of the image's
24
+ * alternative text set in Starlight.
25
25
  */
26
26
  alt?: string;
27
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ResponsiveImage/types.ts"],"names":[],"mappings":"","sourcesContent":["import { MediaObject } from '@starlightcms/js-sdk'\nimport { RefObject } from 'react'\n\n/**\n * Props accepted by the {@link ResponsiveImage} component.\n * @group ResponsiveImage\n */\nexport interface ResponsiveImageProps {\n className?: string\n /**\n * The image to render. It should be a URI string or the object returned by\n * Starlight on a Media File field. Required.\n */\n image: MediaObject | string\n /**\n * An HTML <img> `sizes` attribute. If provided, the browser will render the\n * best fit image size variation to the current viewport size. See\n * [the MDN documentation on the sizes property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-sizes)\n * to learn how to configure this attribute.\n */\n sizes?: string\n /**\n * Alternate text description of the image. If set and the given image is a\n * Starlight media object, it will overwrite this image's alternative text\n * set in Starlight.\n */\n alt?: string\n /**\n * Defines which image variation will be rendered. Defaults to `optimized`.\n */\n variation?: string\n /**\n * Defines the background color of the image while it loads. It accepts any\n * CSS color, including `transparent`. Defaults to the color generated by\n * Starlight when the image was uploaded, or transparent when the given image\n * is a URI string.\n */\n background?: string\n /**\n * Defines the scrollable parent of the image. Set this to the nearest\n * scrollable HTMLElement parent of this image if lazy-loading is not working.\n * See [the MDN documentation on IntersectionObserver.root](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root)\n * to learn more.\n */\n lazyRoot?: RefObject<HTMLElement> | null\n /**\n * Defines how close to the viewport an image has to be to start loading.\n * See [the MDN documentation on IntersectionObserver.rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)\n * to learn more. Defaults to 200px.\n */\n lazyRootMargin?: string\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ResponsiveImage/types.ts"],"names":[],"mappings":"","sourcesContent":["import { MediaObject } from '@starlightcms/js-sdk'\nimport { RefObject } from 'react'\n\n/**\n * Props accepted by the {@link ResponsiveImage} component.\n * @group ResponsiveImage\n */\nexport interface ResponsiveImageProps {\n className?: string\n /**\n * The image to render. It should be a URI string or the object returned by\n * Starlight on a Media File field. Required.\n */\n image: MediaObject | string\n /**\n * An HTML <img> `sizes` attribute. If provided, the browser will render the\n * best fit image size variation to the current viewport size. See\n * [the MDN documentation on the sizes property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-sizes)\n * to learn how to configure this attribute.\n */\n sizes?: string\n /**\n * Alternate text description of the image. If set and the given image is a\n * Starlight media object, it will be used in place of the image's\n * alternative text set in Starlight.\n */\n alt?: string\n /**\n * Defines which image variation will be rendered. Defaults to `optimized`.\n */\n variation?: string\n /**\n * Defines the background color of the image while it loads. It accepts any\n * CSS color, including `transparent`. Defaults to the color generated by\n * Starlight when the image was uploaded, or transparent when the given image\n * is a URI string.\n */\n background?: string\n /**\n * Defines the scrollable parent of the image. Set this to the nearest\n * scrollable HTMLElement parent of this image if lazy-loading is not working.\n * See [the MDN documentation on IntersectionObserver.root](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root)\n * to learn more.\n */\n lazyRoot?: RefObject<HTMLElement> | null\n /**\n * Defines how close to the viewport an image has to be to start loading.\n * See [the MDN documentation on IntersectionObserver.rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)\n * to learn more. Defaults to 200px.\n */\n lazyRootMargin?: string\n}\n"]}
@@ -20,8 +20,8 @@ export interface ResponsiveImageProps {
20
20
  sizes?: string;
21
21
  /**
22
22
  * Alternate text description of the image. If set and the given image is a
23
- * Starlight media object, it will overwrite this image's alternative text
24
- * set in Starlight.
23
+ * Starlight media object, it will be used in place of the image's
24
+ * alternative text set in Starlight.
25
25
  */
26
26
  alt?: string;
27
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ResponsiveImage/types.ts"],"names":[],"mappings":"","sourcesContent":["import { MediaObject } from '@starlightcms/js-sdk'\nimport { RefObject } from 'react'\n\n/**\n * Props accepted by the {@link ResponsiveImage} component.\n * @group ResponsiveImage\n */\nexport interface ResponsiveImageProps {\n className?: string\n /**\n * The image to render. It should be a URI string or the object returned by\n * Starlight on a Media File field. Required.\n */\n image: MediaObject | string\n /**\n * An HTML <img> `sizes` attribute. If provided, the browser will render the\n * best fit image size variation to the current viewport size. See\n * [the MDN documentation on the sizes property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-sizes)\n * to learn how to configure this attribute.\n */\n sizes?: string\n /**\n * Alternate text description of the image. If set and the given image is a\n * Starlight media object, it will overwrite this image's alternative text\n * set in Starlight.\n */\n alt?: string\n /**\n * Defines which image variation will be rendered. Defaults to `optimized`.\n */\n variation?: string\n /**\n * Defines the background color of the image while it loads. It accepts any\n * CSS color, including `transparent`. Defaults to the color generated by\n * Starlight when the image was uploaded, or transparent when the given image\n * is a URI string.\n */\n background?: string\n /**\n * Defines the scrollable parent of the image. Set this to the nearest\n * scrollable HTMLElement parent of this image if lazy-loading is not working.\n * See [the MDN documentation on IntersectionObserver.root](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root)\n * to learn more.\n */\n lazyRoot?: RefObject<HTMLElement> | null\n /**\n * Defines how close to the viewport an image has to be to start loading.\n * See [the MDN documentation on IntersectionObserver.rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)\n * to learn more. Defaults to 200px.\n */\n lazyRootMargin?: string\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ResponsiveImage/types.ts"],"names":[],"mappings":"","sourcesContent":["import { MediaObject } from '@starlightcms/js-sdk'\nimport { RefObject } from 'react'\n\n/**\n * Props accepted by the {@link ResponsiveImage} component.\n * @group ResponsiveImage\n */\nexport interface ResponsiveImageProps {\n className?: string\n /**\n * The image to render. It should be a URI string or the object returned by\n * Starlight on a Media File field. Required.\n */\n image: MediaObject | string\n /**\n * An HTML <img> `sizes` attribute. If provided, the browser will render the\n * best fit image size variation to the current viewport size. See\n * [the MDN documentation on the sizes property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-sizes)\n * to learn how to configure this attribute.\n */\n sizes?: string\n /**\n * Alternate text description of the image. If set and the given image is a\n * Starlight media object, it will be used in place of the image's\n * alternative text set in Starlight.\n */\n alt?: string\n /**\n * Defines which image variation will be rendered. Defaults to `optimized`.\n */\n variation?: string\n /**\n * Defines the background color of the image while it loads. It accepts any\n * CSS color, including `transparent`. Defaults to the color generated by\n * Starlight when the image was uploaded, or transparent when the given image\n * is a URI string.\n */\n background?: string\n /**\n * Defines the scrollable parent of the image. Set this to the nearest\n * scrollable HTMLElement parent of this image if lazy-loading is not working.\n * See [the MDN documentation on IntersectionObserver.root](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root)\n * to learn more.\n */\n lazyRoot?: RefObject<HTMLElement> | null\n /**\n * Defines how close to the viewport an image has to be to start loading.\n * See [the MDN documentation on IntersectionObserver.rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)\n * to learn more. Defaults to 200px.\n */\n lazyRootMargin?: string\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starlightcms/react-sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "The Starlight SDK for React",
5
5
  "workspaces": [
6
6
  "website"
@@ -60,7 +60,7 @@
60
60
  ]
61
61
  },
62
62
  "dependencies": {
63
- "@starlightcms/js-sdk": "^0.12.1"
63
+ "@starlightcms/js-sdk": "^0.13.1"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": ">=16.0.0"