@reuters-graphics/graphics-components 0.0.30 → 0.0.31

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.
@@ -0,0 +1,30 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { ContainerWidth } from '../@types/global';
3
+ declare const __propDef: {
4
+ props: {
5
+ /**
6
+ * Width of the container, one of: normal, wide, wider, widest or fluid
7
+ */ width?: ContainerWidth;
8
+ /**
9
+ * The unique identifier for the document.
10
+ * @required
11
+ */ slug: string;
12
+ /**
13
+ * Alt text for the document.
14
+ * @required
15
+ */ altText: string;
16
+ /** Add an ID to target with SCSS. */ id?: string;
17
+ /** Add a class to target with SCSS. */ cls?: string;
18
+ };
19
+ events: {
20
+ [evt: string]: CustomEvent<any>;
21
+ };
22
+ slots: {};
23
+ };
24
+ export declare type DocumentCloudProps = typeof __propDef.props;
25
+ export declare type DocumentCloudEvents = typeof __propDef.events;
26
+ export declare type DocumentCloudSlots = typeof __propDef.slots;
27
+ /** `DocumentCloud` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-DocumentCloud--default) */
28
+ export default class DocumentCloud extends SvelteComponentTyped<DocumentCloudProps, DocumentCloudEvents, DocumentCloudSlots> {
29
+ }
30
+ export {};
@@ -3,6 +3,7 @@ export { default as BeforeAfter } from "./components/BeforeAfter/BeforeAfter.sve
3
3
  export { default as Block } from "./components/Block/Block.svelte";
4
4
  export { default as BodyText } from "./components/BodyText/BodyText.svelte";
5
5
  export { default as DatawrapperChart } from "./components/DatawrapperChart/DatawrapperChart.svelte";
6
+ export { default as DocumentCloud } from "./components/DocumentCloud/DocumentCloud.svelte";
6
7
  export { default as EmbedPreviewerLink } from "./components/EmbedPreviewerLink/EmbedPreviewerLink.svelte";
7
8
  export { default as FeaturePhoto } from "./components/FeaturePhoto/FeaturePhoto.svelte";
8
9
  export { default as Framer } from "./components/Framer/Framer.svelte";
@@ -0,0 +1,33 @@
1
+ <!-- @component `DocumentCloud` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-DocumentCloud--default) -->
2
+ <script>/** ✏️ DOCUMENT your chart's props using TypeScript and JSDoc comments like below! */
3
+ /**
4
+ * Width of the container, one of: normal, wide, wider, widest or fluid
5
+ */
6
+ export let width = 'normal';
7
+ /**
8
+ * The unique identifier for the document.
9
+ * @required
10
+ */
11
+ export let slug;
12
+ /**
13
+ * Alt text for the document.
14
+ * @required
15
+ */
16
+ export let altText;
17
+ /** Add an ID to target with SCSS. */
18
+ export let id = '';
19
+ /** Add a class to target with SCSS. */
20
+ export let cls = '';
21
+ import Block from '../Block/Block.svelte';
22
+ </script>
23
+
24
+ <Block width="{width}" id="{id}" cls="photo {cls}">
25
+ <iframe
26
+ src="https://embed.documentcloud.org/documents/{slug}/?embed=1&amp;responsive=1&amp;title=1"
27
+ title="{altText}"
28
+ width="700"
29
+ height="540"
30
+ style="border: 1px solid #aaa; width: 100%; height: 800px; height: calc(100vh - 100px);"
31
+ sandbox="allow-scripts allow-same-origin allow-popups allow-forms allow-popups-to-escape-sandbox"
32
+ ></iframe>
33
+ </Block>
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export { default as BeforeAfter } from './components/BeforeAfter/BeforeAfter.sve
4
4
  export { default as Block } from './components/Block/Block.svelte';
5
5
  export { default as BodyText } from './components/BodyText/BodyText.svelte';
6
6
  export { default as DatawrapperChart } from './components/DatawrapperChart/DatawrapperChart.svelte';
7
+ export { default as DocumentCloud } from './components/DocumentCloud/DocumentCloud.svelte';
7
8
  export { default as EmbedPreviewerLink } from './components/EmbedPreviewerLink/EmbedPreviewerLink.svelte';
8
9
  export { default as FeaturePhoto } from './components/FeaturePhoto/FeaturePhoto.svelte';
9
10
  export { default as Framer } from './components/Framer/Framer.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reuters-graphics/graphics-components",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://reuters-graphics.github.io/graphics-components",
@@ -105,6 +105,7 @@
105
105
  "./components/Block/Block.svelte": "./dist/components/Block/Block.svelte",
106
106
  "./components/BodyText/BodyText.svelte": "./dist/components/BodyText/BodyText.svelte",
107
107
  "./components/DatawrapperChart/DatawrapperChart.svelte": "./dist/components/DatawrapperChart/DatawrapperChart.svelte",
108
+ "./components/DocumentCloud/DocumentCloud.svelte": "./dist/components/DocumentCloud/DocumentCloud.svelte",
108
109
  "./components/EmbedPreviewerLink/EmbedPreviewerLink.svelte": "./dist/components/EmbedPreviewerLink/EmbedPreviewerLink.svelte",
109
110
  "./components/FeaturePhoto/FeaturePhoto.svelte": "./dist/components/FeaturePhoto/FeaturePhoto.svelte",
110
111
  "./components/Framer/Framer.svelte": "./dist/components/Framer/Framer.svelte",