@datocms/svelte 3.0.4 → 4.0.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.
Files changed (25) hide show
  1. package/README.md +7 -2
  2. package/package/components/Head/Head.svelte.d.ts +2 -2
  3. package/package/components/Image/Image.svelte +1 -1
  4. package/package/components/Image/Image.svelte.d.ts +2 -2
  5. package/package/components/NakedImage/NakedImage.svelte.d.ts +2 -2
  6. package/package/components/StructuredText/Node.svelte.d.ts +2 -2
  7. package/package/components/StructuredText/README.md +12 -33
  8. package/package/components/StructuredText/StructuredText.svelte +4 -2
  9. package/package/components/StructuredText/StructuredText.svelte.d.ts +4 -4
  10. package/package/components/StructuredText/nodes/Blockquote.svelte.d.ts +2 -2
  11. package/package/components/StructuredText/nodes/Code.svelte.d.ts +2 -2
  12. package/package/components/StructuredText/nodes/Heading.svelte.d.ts +2 -2
  13. package/package/components/StructuredText/nodes/Link.svelte.d.ts +2 -2
  14. package/package/components/StructuredText/nodes/List.svelte.d.ts +2 -2
  15. package/package/components/StructuredText/nodes/ListItem.svelte.d.ts +2 -2
  16. package/package/components/StructuredText/nodes/Paragraph.svelte.d.ts +2 -2
  17. package/package/components/StructuredText/nodes/Root.svelte.d.ts +2 -2
  18. package/package/components/StructuredText/nodes/Span.svelte.d.ts +2 -2
  19. package/package/components/StructuredText/nodes/ThematicBreak.svelte.d.ts +2 -2
  20. package/package/components/StructuredText/utils/Lines.svelte.d.ts +2 -2
  21. package/package/components/VideoPlayer/VideoPlayer.svelte +1 -1
  22. package/package/components/VideoPlayer/VideoPlayer.svelte.d.ts +2 -2
  23. package/package/index.d.ts +1 -2
  24. package/package/stores/querySubscription/README.md +17 -13
  25. package/package.json +2 -2
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  👉 [Visit the DatoCMS homepage](https://www.datocms.com) or see [What is DatoCMS?](#what-is-datocms)
6
6
 
7
+ ---
8
+
7
9
  <!--datocms-autoinclude-header end-->
8
10
 
9
11
  # @datocms/svelte
@@ -35,7 +37,7 @@ A set of components to work faster with [DatoCMS](https://www.datocms.com/) in S
35
37
 
36
38
  Components:
37
39
 
38
- - [`<Image />`](src/lib/components/Image)
40
+ - [`<Image />` and `<NakedImage />`](src/lib/components/Image)
39
41
  - [`<VideoPlayer />`](src/lib/components/VideoPlayer)
40
42
  - [`<StructuredText />`](src/lib/components/StructuredText)
41
43
  - [`<Head />`](src/lib/components/Head)
@@ -67,7 +69,9 @@ npm run build
67
69
  ```
68
70
 
69
71
  <!--datocms-autoinclude-footer start-->
70
- -----------------
72
+
73
+ ---
74
+
71
75
  # What is DatoCMS?
72
76
  <a href="https://www.datocms.com/"><img src="https://www.datocms.com/images/full_logo.svg" height="60"></a>
73
77
 
@@ -90,4 +94,5 @@ Trusted by over 25,000 enterprise businesses, agency partners, and individuals a
90
94
  - [DatoCMS Starters](https://www.datocms.com/marketplace/starters) has examples for various Javascript frontend frameworks
91
95
 
92
96
  Or see [all our public repos](https://github.com/orgs/datocms/repositories?q=&type=public&language=&sort=stargazers)
97
+
93
98
  <!--datocms-autoinclude-footer end-->
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  export interface TitleMetaLinkTag {
3
3
  /** the tag for the meta information */
4
4
  tag: string;
@@ -56,6 +56,6 @@ declare const __propDef: {
56
56
  export type HeadProps = typeof __propDef.props;
57
57
  export type HeadEvents = typeof __propDef.events;
58
58
  export type HeadSlots = typeof __propDef.slots;
59
- export default class Head extends SvelteComponentTyped<HeadProps, HeadEvents, HeadSlots> {
59
+ export default class Head extends SvelteComponent<HeadProps, HeadEvents, HeadSlots> {
60
60
  }
61
61
  export {};
@@ -119,7 +119,7 @@ $:
119
119
  'background-color': data.bgColor,
120
120
  ...basePlaceholderStyle
121
121
  })}
122
- />
122
+ ></div>
123
123
  {/if}
124
124
  {/if}
125
125
 
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type * as CSS from 'csstype';
3
3
  import { type ResponsiveImageType } from '../NakedImage/utils';
4
4
  declare const __propDef: {
@@ -56,6 +56,6 @@ declare const __propDef: {
56
56
  export type ImageProps = typeof __propDef.props;
57
57
  export type ImageEvents = typeof __propDef.events;
58
58
  export type ImageSlots = typeof __propDef.slots;
59
- export default class Image extends SvelteComponentTyped<ImageProps, ImageEvents, ImageSlots> {
59
+ export default class Image extends SvelteComponent<ImageProps, ImageEvents, ImageSlots> {
60
60
  }
61
61
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import { type ResponsiveImageType } from './utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -36,6 +36,6 @@ declare const __propDef: {
36
36
  export type NakedImageProps = typeof __propDef.props;
37
37
  export type NakedImageEvents = typeof __propDef.events;
38
38
  export type NakedImageSlots = typeof __propDef.slots;
39
- export default class NakedImage extends SvelteComponentTyped<NakedImageProps, NakedImageEvents, NakedImageSlots> {
39
+ export default class NakedImage extends SvelteComponent<NakedImageProps, NakedImageEvents, NakedImageSlots> {
40
40
  }
41
41
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  export declare const DEFAULT_COMPONENTS: PredicateComponentTuple[];
3
3
  import { type Node, type StructuredText } from 'datocms-structured-text-utils';
4
4
  import type { PredicateComponentTuple } from '../..';
@@ -17,6 +17,6 @@ declare const __propDef: {
17
17
  export type NodeProps = typeof __propDef.props;
18
18
  export type NodeEvents = typeof __propDef.events;
19
19
  export type NodeSlots = typeof __propDef.slots;
20
- export default class Node extends SvelteComponentTyped<NodeProps, NodeEvents, NodeSlots> {
20
+ export default class Node extends SvelteComponent<NodeProps, NodeEvents, NodeSlots> {
21
21
  }
22
22
  export {};
@@ -86,8 +86,8 @@ Here is an example using custom components for blocks, inline and item links. Ta
86
86
 
87
87
  ```svelte
88
88
  <script>
89
-
90
89
  import { onMount } from 'svelte';
90
+ import { executeQuery } from '@datocms/cda-client';
91
91
 
92
92
  import { isBlock, isInlineItem, isItemLink } from 'datocms-structured-text-utils';
93
93
 
@@ -104,33 +104,23 @@ const query = `
104
104
  content {
105
105
  value
106
106
  links {
107
- __typename
108
- ... on TeamMemberRecord {
107
+ ... on RecordInterface {
109
108
  id
109
+ __typename
110
+ }
111
+ ... on TeamMemberRecord {
110
112
  firstName
111
113
  slug
112
114
  }
113
115
  }
114
116
  blocks {
115
- __typename
116
- ... on ImageRecord {
117
+ ... on RecordInterface {
117
118
  id
118
- image {
119
- responsiveImage(
120
- imgixParams: { fit: crop, w: 300, h: 300, auto: format }
121
- ) {
122
- srcSet
123
- webpSrcSet
124
- sizes
125
- src
126
- width
127
- height
128
- aspectRatio
129
- alt
130
- title
131
- base64
132
- }
133
- }
119
+ __typename
120
+ }
121
+ ... on CtaRecord {
122
+ title
123
+ url
134
124
  }
135
125
  }
136
126
  }
@@ -141,18 +131,7 @@ const query = `
141
131
  export let data = null;
142
132
 
143
133
  onMount(async () => {
144
- const response = await fetch('https://graphql.datocms.com/', {
145
- method: 'POST',
146
- headers: {
147
- 'Content-Type': 'application/json',
148
- Authorization: "Bearer AN_API_TOKEN",
149
- },
150
- body: JSON.stringify({ query })
151
- })
152
-
153
- const json = await response.json()
154
-
155
- data = json.data;
134
+ data = await executeQuery(query, { token: '<YOUR-API-TOKEN>' });
156
135
  });
157
136
 
158
137
  </script>
@@ -1,11 +1,13 @@
1
1
  <script>import {
2
- isStructuredText
2
+ isStructuredText,
3
+ isDocument,
4
+ isNode
3
5
  } from "datocms-structured-text-utils";
4
6
  import Node from "./Node.svelte";
5
7
  export let data = null;
6
8
  export let components = [];
7
9
  $:
8
- node = data != null && (isStructuredText(data) ? data.value : data).document;
10
+ node = !data ? null : isStructuredText(data) && isDocument(data.value) ? data.value.document : isDocument(data) ? data.document : isNode(data) ? data : void 0;
9
11
  $:
10
12
  blocks = isStructuredText(data) ? data?.blocks : void 0;
11
13
  $:
@@ -1,9 +1,9 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- import { type StructuredText, type Document } from 'datocms-structured-text-utils';
1
+ import { SvelteComponent } from "svelte";
2
+ import { type StructuredText, type Document, type Node as DastNode } from 'datocms-structured-text-utils';
3
3
  import type { PredicateComponentTuple } from '../..';
4
4
  declare const __propDef: {
5
5
  props: {
6
- /** The actual field value you get from DatoCMS **/ data?: StructuredText | Document | null | undefined;
6
+ /** The actual field value you get from DatoCMS **/ data?: StructuredText | Document | DastNode | null | undefined;
7
7
  components?: PredicateComponentTuple[] | undefined;
8
8
  };
9
9
  events: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type StructuredTextProps = typeof __propDef.props;
15
15
  export type StructuredTextEvents = typeof __propDef.events;
16
16
  export type StructuredTextSlots = typeof __propDef.slots;
17
- export default class StructuredText extends SvelteComponentTyped<StructuredTextProps, StructuredTextEvents, StructuredTextSlots> {
17
+ export default class StructuredText extends SvelteComponent<StructuredTextProps, StructuredTextEvents, StructuredTextSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { Blockquote } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type BlockquoteProps = typeof __propDef.props;
15
15
  export type BlockquoteEvents = typeof __propDef.events;
16
16
  export type BlockquoteSlots = typeof __propDef.slots;
17
- export default class Blockquote extends SvelteComponentTyped<BlockquoteProps, BlockquoteEvents, BlockquoteSlots> {
17
+ export default class Blockquote extends SvelteComponent<BlockquoteProps, BlockquoteEvents, BlockquoteSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { Code } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -12,6 +12,6 @@ declare const __propDef: {
12
12
  export type CodeProps = typeof __propDef.props;
13
13
  export type CodeEvents = typeof __propDef.events;
14
14
  export type CodeSlots = typeof __propDef.slots;
15
- export default class Code extends SvelteComponentTyped<CodeProps, CodeEvents, CodeSlots> {
15
+ export default class Code extends SvelteComponent<CodeProps, CodeEvents, CodeSlots> {
16
16
  }
17
17
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { Heading } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type HeadingProps = typeof __propDef.props;
15
15
  export type HeadingEvents = typeof __propDef.events;
16
16
  export type HeadingSlots = typeof __propDef.slots;
17
- export default class Heading extends SvelteComponentTyped<HeadingProps, HeadingEvents, HeadingSlots> {
17
+ export default class Heading extends SvelteComponent<HeadingProps, HeadingEvents, HeadingSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { Link } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type LinkProps = typeof __propDef.props;
15
15
  export type LinkEvents = typeof __propDef.events;
16
16
  export type LinkSlots = typeof __propDef.slots;
17
- export default class Link extends SvelteComponentTyped<LinkProps, LinkEvents, LinkSlots> {
17
+ export default class Link extends SvelteComponent<LinkProps, LinkEvents, LinkSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { List } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type ListProps = typeof __propDef.props;
15
15
  export type ListEvents = typeof __propDef.events;
16
16
  export type ListSlots = typeof __propDef.slots;
17
- export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
17
+ export default class List extends SvelteComponent<ListProps, ListEvents, ListSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { ListItem } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type ListItemProps = typeof __propDef.props;
15
15
  export type ListItemEvents = typeof __propDef.events;
16
16
  export type ListItemSlots = typeof __propDef.slots;
17
- export default class ListItem extends SvelteComponentTyped<ListItemProps, ListItemEvents, ListItemSlots> {
17
+ export default class ListItem extends SvelteComponent<ListItemProps, ListItemEvents, ListItemSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { Paragraph } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type ParagraphProps = typeof __propDef.props;
15
15
  export type ParagraphEvents = typeof __propDef.events;
16
16
  export type ParagraphSlots = typeof __propDef.slots;
17
- export default class Paragraph extends SvelteComponentTyped<ParagraphProps, ParagraphEvents, ParagraphSlots> {
17
+ export default class Paragraph extends SvelteComponent<ParagraphProps, ParagraphEvents, ParagraphSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { Root } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type RootProps = typeof __propDef.props;
15
15
  export type RootEvents = typeof __propDef.events;
16
16
  export type RootSlots = typeof __propDef.slots;
17
- export default class Root extends SvelteComponentTyped<RootProps, RootEvents, RootSlots> {
17
+ export default class Root extends SvelteComponent<RootProps, RootEvents, RootSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { Span } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -14,6 +14,6 @@ declare const __propDef: {
14
14
  export type SpanProps = typeof __propDef.props;
15
15
  export type SpanEvents = typeof __propDef.events;
16
16
  export type SpanSlots = typeof __propDef.slots;
17
- export default class Span extends SvelteComponentTyped<SpanProps, SpanEvents, SpanSlots> {
17
+ export default class Span extends SvelteComponent<SpanProps, SpanEvents, SpanSlots> {
18
18
  }
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { ThematicBreak } from 'datocms-structured-text-utils';
3
3
  declare const __propDef: {
4
4
  props: {
@@ -12,6 +12,6 @@ declare const __propDef: {
12
12
  export type ThematicBreakProps = typeof __propDef.props;
13
13
  export type ThematicBreakEvents = typeof __propDef.events;
14
14
  export type ThematicBreakSlots = typeof __propDef.slots;
15
- export default class ThematicBreak extends SvelteComponentTyped<ThematicBreakProps, ThematicBreakEvents, ThematicBreakSlots> {
15
+ export default class ThematicBreak extends SvelteComponent<ThematicBreakProps, ThematicBreakEvents, ThematicBreakSlots> {
16
16
  }
17
17
  export {};
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  lines?: string[] | undefined;
@@ -11,6 +11,6 @@ declare const __propDef: {
11
11
  export type LinesProps = typeof __propDef.props;
12
12
  export type LinesEvents = typeof __propDef.events;
13
13
  export type LinesSlots = typeof __propDef.slots;
14
- export default class Lines extends SvelteComponentTyped<LinesProps, LinesEvents, LinesSlots> {
14
+ export default class Lines extends SvelteComponent<LinesProps, LinesEvents, LinesSlots> {
15
15
  }
16
16
  export {};
@@ -134,4 +134,4 @@ onMount(async () => {
134
134
  on:error
135
135
  on:cuepointchange
136
136
  on:cuepointschange
137
- />
137
+ ></mux-player>
@@ -1,4 +1,4 @@
1
- import { SvelteComponentTyped } from "svelte";
1
+ import { SvelteComponent } from "svelte";
2
2
  import type { CmcdTypes, MaxResolutionValue, MinResolutionValue, PlaybackTypes, RenditionOrderValue, StreamTypes } from '@mux/playback-core';
3
3
  import type { Tokens } from '@mux/mux-player';
4
4
  type ValueOf<T> = T[keyof T];
@@ -130,5 +130,5 @@ type VideoPlayerProps_ = typeof __propDef.props;
130
130
  export { VideoPlayerProps_ as VideoPlayerProps };
131
131
  export type VideoPlayerEvents = typeof __propDef.events;
132
132
  export type VideoPlayerSlots = typeof __propDef.slots;
133
- export default class VideoPlayer extends SvelteComponentTyped<VideoPlayerProps_, VideoPlayerEvents, VideoPlayerSlots> {
133
+ export default class VideoPlayer extends SvelteComponent<VideoPlayerProps_, VideoPlayerEvents, VideoPlayerSlots> {
134
134
  }
@@ -1,5 +1,4 @@
1
1
  import type { Node } from 'datocms-structured-text-utils';
2
- import type { SvelteComponent } from 'svelte';
3
2
  export { default as NakedImage } from './components/NakedImage/NakedImage.svelte';
4
3
  export type { ResponsiveImageType } from './components/NakedImage/utils';
5
4
  export { default as Head } from './components/Head/Head.svelte';
@@ -9,5 +8,5 @@ export { default as VideoPlayer } from './components/VideoPlayer/VideoPlayer.sve
9
8
  export * from './stores/querySubscription';
10
9
  export type PredicateComponentTuple = [
11
10
  (n: Node) => boolean,
12
- new (...any: any) => SvelteComponent
11
+ any
13
12
  ];
@@ -29,19 +29,23 @@ const subscription = querySubscription(options: Options);
29
29
 
30
30
  ## Initialization options
31
31
 
32
- | prop | type | required | description | default |
33
- | ------------------ | ------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------ | ------------------------------------ |
34
- | enabled | boolean | :x: | Whether the subscription has to be performed or not | true |
35
- | query | string \| [`TypedDocumentNode`](https://github.com/dotansimha/graphql-typed-document-node) | :white_check_mark: | The GraphQL query to subscribe | |
36
- | token | string | :white_check_mark: | DatoCMS API token to use | |
37
- | variables | Object | :x: | GraphQL variables for the query | |
38
- | preview | boolean | :x: | If true, the Content Delivery API with draft content will be used | false |
39
- | environment | string | :x: | The name of the DatoCMS environment where to perform the query | defaults to primary environment |
40
- | initialData | Object | :x: | The initial data to use on the first render | |
41
- | reconnectionPeriod | number | :x: | In case of network errors, the period (in ms) to wait to reconnect | 1000 |
42
- | fetcher | a [fetch-like function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | :x: | The fetch function to use to perform the registration query | window.fetch |
43
- | eventSourceClass | an [EventSource-like](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) class | :x: | The EventSource class to use to open up the SSE connection | window.EventSource |
44
- | baseUrl | string | :x: | The base URL to use to perform the query | `https://graphql-listen.datocms.com` |
32
+ | prop | type | required | description | default |
33
+ | ------------------ | ------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------ |
34
+ | enabled | boolean | :x: | Whether the subscription has to be performed or not | true |
35
+ | query | string \| [`TypedDocumentNode`](https://github.com/dotansimha/graphql-typed-document-node) | :white_check_mark: | The GraphQL query to subscribe | |
36
+ | token | string | :white_check_mark: | DatoCMS API token to use | |
37
+ | variables | Object | :x: | GraphQL variables for the query | |
38
+ | includeDrafts | boolean | :x: | If true, draft records will be returned | |
39
+ | excludeInvalid | boolean | :x: | If true, invalid records will be filtered out | |
40
+ | environment | string | :x: | The name of the DatoCMS environment where to perform the query (defaults to primary environment) | |
41
+ | contentLink | `'vercel-1'` or `undefined` | :x: | If true, embed metadata that enable Content Link | |
42
+ | baseEditingUrl | string | :x: | The base URL of the DatoCMS project | |
43
+ | cacheTags | boolean | :x: | If true, receive the Cache Tags associated with the query | |
44
+ | initialData | Object | :x: | The initial data to use on the first render | |
45
+ | reconnectionPeriod | number | :x: | In case of network errors, the period (in ms) to wait to reconnect | 1000 |
46
+ | fetcher | a [fetch-like function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | :x: | The fetch function to use to perform the registration query | window.fetch |
47
+ | eventSourceClass | an [EventSource-like](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) class | :x: | The EventSource class to use to open up the SSE connection | window.EventSource |
48
+ | baseUrl | string | :x: | The base URL to use to perform the query | `https://graphql-listen.datocms.com` |
45
49
 
46
50
  ## Connection status
47
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/svelte",
3
- "version": "3.0.4",
3
+ "version": "4.0.0",
4
4
  "description": "A set of components and utilities to work faster with DatoCMS in Svelte",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@mux/mux-player": "*",
30
- "svelte": "^3.59.2 || ^4.0.0"
30
+ "svelte": "^4.0.0 || ^5.0.0"
31
31
  },
32
32
  "peerDependenciesMeta": {
33
33
  "@mux/mux-player": {