@builder.io/sdk-svelte 2.0.5 → 2.0.8

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 (38) hide show
  1. package/lib/browser/components/block/block.svelte +2 -1
  2. package/lib/browser/components/content-variants/content-variants.svelte +1 -0
  3. package/lib/browser/components/content-variants/content-variants.types.d.ts +2 -1
  4. package/lib/browser/components/content-variants/extra-framework-props-types.d.ts +2 -0
  5. package/lib/browser/components/content-variants/extra-framework-props-types.js +1 -0
  6. package/lib/browser/constants/sdk-version.d.ts +1 -1
  7. package/lib/browser/constants/sdk-version.js +1 -1
  8. package/lib/browser/context/extra-context-types.d.ts +6 -0
  9. package/lib/browser/context/extra-context-types.js +1 -0
  10. package/lib/browser/context/types.d.ts +2 -1
  11. package/lib/edge/components/block/block.svelte +2 -1
  12. package/lib/edge/components/content-variants/content-variants.svelte +1 -0
  13. package/lib/edge/components/content-variants/content-variants.types.d.ts +2 -1
  14. package/lib/edge/components/content-variants/extra-framework-props-types.d.ts +2 -0
  15. package/lib/edge/components/content-variants/extra-framework-props-types.js +1 -0
  16. package/lib/edge/constants/sdk-version.d.ts +1 -1
  17. package/lib/edge/constants/sdk-version.js +1 -1
  18. package/lib/edge/context/extra-context-types.d.ts +6 -0
  19. package/lib/edge/context/extra-context-types.js +1 -0
  20. package/lib/edge/context/types.d.ts +2 -1
  21. package/lib/node/components/block/block.svelte +2 -1
  22. package/lib/node/components/content-variants/content-variants.svelte +1 -0
  23. package/lib/node/components/content-variants/content-variants.types.d.ts +2 -1
  24. package/lib/node/components/content-variants/extra-framework-props-types.d.ts +2 -0
  25. package/lib/node/components/content-variants/extra-framework-props-types.js +1 -0
  26. package/lib/node/constants/sdk-version.d.ts +1 -1
  27. package/lib/node/constants/sdk-version.js +1 -1
  28. package/lib/node/context/extra-context-types.d.ts +6 -0
  29. package/lib/node/context/extra-context-types.js +1 -0
  30. package/lib/node/context/types.d.ts +2 -1
  31. package/package.json +1 -1
  32. package/src/components/block/block.svelte +2 -1
  33. package/src/components/content-variants/content-variants.svelte +1 -0
  34. package/src/components/content-variants/content-variants.types.ts +2 -1
  35. package/src/components/content-variants/extra-framework-props-types.ts +1 -0
  36. package/src/constants/sdk-version.ts +1 -1
  37. package/src/context/extra-context-types.ts +5 -0
  38. package/src/context/types.ts +2 -1
@@ -1,6 +1,7 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>import { onMount } from "svelte";
4
+ import { TARGET } from "../../constants/target";
4
5
  import { getBlockComponentOptions } from "../../functions/get-block-component-options";
5
6
  import { getProcessedBlock } from "../../functions/get-processed-block";
6
7
  import "../dynamic-div.svelte";
@@ -86,7 +87,7 @@ $: componentRefProps = () => {
86
87
  registeredComponents: registeredComponents,
87
88
  builderBlock: processedBlock(),
88
89
  includeBlockProps: blockComponent?.()?.noWrap === true,
89
- isInteractive: !blockComponent?.()?.isRSC,
90
+ isInteractive: !(blockComponent?.()?.isRSC && TARGET === "rsc"),
90
91
  };
91
92
  };
92
93
  onMount(() => {
@@ -102,6 +102,7 @@ onMount(() => {
102
102
  {contentWrapper}
103
103
  {contentWrapperProps}
104
104
  {trustedHosts}
105
+ {...{}}
105
106
  />
106
107
  {/each}
107
108
  {/if}
@@ -2,7 +2,8 @@ import type { BuilderRenderContext, RegisteredComponent } from '../../context/ty
2
2
  import type { ApiVersion } from '../../types/api-version';
3
3
  import type { BuilderContent } from '../../types/builder-content';
4
4
  import type { Nullable } from '../../types/typescript';
5
- export interface ContentVariantsPrps {
5
+ import type { ExtraFrameworkProps } from './extra-framework-props-types';
6
+ export interface ContentVariantsPrps extends ExtraFrameworkProps {
6
7
  /**
7
8
  * The Builder content JSON to render (required).
8
9
  */
@@ -0,0 +1,2 @@
1
+ export interface ExtraFrameworkProps {
2
+ }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.5";
1
+ export declare const SDK_VERSION = "2.0.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.5";
1
+ export const SDK_VERSION = "2.0.8";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * no-op type for extra context types on a per-SDK basis
3
+ * See `overrides/react-native/src/context/extra-context-types.ts` for an example
4
+ * */
5
+ export interface ExtraContextTypes {
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -3,13 +3,14 @@ import type { ApiVersion } from '../types/api-version';
3
3
  import type { BuilderContent } from '../types/builder-content';
4
4
  import type { ComponentInfo } from '../types/components';
5
5
  import type { Dictionary, Nullable } from '../types/typescript';
6
+ import type { ExtraContextTypes } from './extra-context-types';
6
7
  export type RegisteredComponent = ComponentInfo & {
7
8
  component: any;
8
9
  };
9
10
  export type RegisteredComponents = Dictionary<RegisteredComponent>;
10
11
  export type BuilderRenderState = Record<string, unknown>;
11
12
  export type BuilderRenderContext = Record<string, unknown>;
12
- export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
13
+ export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>, ExtraContextTypes {
13
14
  content: Nullable<BuilderContent>;
14
15
  context: BuilderRenderContext;
15
16
  /**
@@ -1,6 +1,7 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>import { onMount } from "svelte";
4
+ import { TARGET } from "../../constants/target";
4
5
  import { getBlockComponentOptions } from "../../functions/get-block-component-options";
5
6
  import { getProcessedBlock } from "../../functions/get-processed-block";
6
7
  import "../dynamic-div.svelte";
@@ -86,7 +87,7 @@ $: componentRefProps = () => {
86
87
  registeredComponents: registeredComponents,
87
88
  builderBlock: processedBlock(),
88
89
  includeBlockProps: blockComponent?.()?.noWrap === true,
89
- isInteractive: !blockComponent?.()?.isRSC,
90
+ isInteractive: !(blockComponent?.()?.isRSC && TARGET === "rsc"),
90
91
  };
91
92
  };
92
93
  onMount(() => {
@@ -102,6 +102,7 @@ onMount(() => {
102
102
  {contentWrapper}
103
103
  {contentWrapperProps}
104
104
  {trustedHosts}
105
+ {...{}}
105
106
  />
106
107
  {/each}
107
108
  {/if}
@@ -2,7 +2,8 @@ import type { BuilderRenderContext, RegisteredComponent } from '../../context/ty
2
2
  import type { ApiVersion } from '../../types/api-version';
3
3
  import type { BuilderContent } from '../../types/builder-content';
4
4
  import type { Nullable } from '../../types/typescript';
5
- export interface ContentVariantsPrps {
5
+ import type { ExtraFrameworkProps } from './extra-framework-props-types';
6
+ export interface ContentVariantsPrps extends ExtraFrameworkProps {
6
7
  /**
7
8
  * The Builder content JSON to render (required).
8
9
  */
@@ -0,0 +1,2 @@
1
+ export interface ExtraFrameworkProps {
2
+ }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.5";
1
+ export declare const SDK_VERSION = "2.0.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.5";
1
+ export const SDK_VERSION = "2.0.8";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * no-op type for extra context types on a per-SDK basis
3
+ * See `overrides/react-native/src/context/extra-context-types.ts` for an example
4
+ * */
5
+ export interface ExtraContextTypes {
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -3,13 +3,14 @@ import type { ApiVersion } from '../types/api-version';
3
3
  import type { BuilderContent } from '../types/builder-content';
4
4
  import type { ComponentInfo } from '../types/components';
5
5
  import type { Dictionary, Nullable } from '../types/typescript';
6
+ import type { ExtraContextTypes } from './extra-context-types';
6
7
  export type RegisteredComponent = ComponentInfo & {
7
8
  component: any;
8
9
  };
9
10
  export type RegisteredComponents = Dictionary<RegisteredComponent>;
10
11
  export type BuilderRenderState = Record<string, unknown>;
11
12
  export type BuilderRenderContext = Record<string, unknown>;
12
- export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
13
+ export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>, ExtraContextTypes {
13
14
  content: Nullable<BuilderContent>;
14
15
  context: BuilderRenderContext;
15
16
  /**
@@ -1,6 +1,7 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>import { onMount } from "svelte";
4
+ import { TARGET } from "../../constants/target";
4
5
  import { getBlockComponentOptions } from "../../functions/get-block-component-options";
5
6
  import { getProcessedBlock } from "../../functions/get-processed-block";
6
7
  import "../dynamic-div.svelte";
@@ -86,7 +87,7 @@ $: componentRefProps = () => {
86
87
  registeredComponents: registeredComponents,
87
88
  builderBlock: processedBlock(),
88
89
  includeBlockProps: blockComponent?.()?.noWrap === true,
89
- isInteractive: !blockComponent?.()?.isRSC,
90
+ isInteractive: !(blockComponent?.()?.isRSC && TARGET === "rsc"),
90
91
  };
91
92
  };
92
93
  onMount(() => {
@@ -102,6 +102,7 @@ onMount(() => {
102
102
  {contentWrapper}
103
103
  {contentWrapperProps}
104
104
  {trustedHosts}
105
+ {...{}}
105
106
  />
106
107
  {/each}
107
108
  {/if}
@@ -2,7 +2,8 @@ import type { BuilderRenderContext, RegisteredComponent } from '../../context/ty
2
2
  import type { ApiVersion } from '../../types/api-version';
3
3
  import type { BuilderContent } from '../../types/builder-content';
4
4
  import type { Nullable } from '../../types/typescript';
5
- export interface ContentVariantsPrps {
5
+ import type { ExtraFrameworkProps } from './extra-framework-props-types';
6
+ export interface ContentVariantsPrps extends ExtraFrameworkProps {
6
7
  /**
7
8
  * The Builder content JSON to render (required).
8
9
  */
@@ -0,0 +1,2 @@
1
+ export interface ExtraFrameworkProps {
2
+ }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.5";
1
+ export declare const SDK_VERSION = "2.0.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.5";
1
+ export const SDK_VERSION = "2.0.8";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * no-op type for extra context types on a per-SDK basis
3
+ * See `overrides/react-native/src/context/extra-context-types.ts` for an example
4
+ * */
5
+ export interface ExtraContextTypes {
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -3,13 +3,14 @@ import type { ApiVersion } from '../types/api-version';
3
3
  import type { BuilderContent } from '../types/builder-content';
4
4
  import type { ComponentInfo } from '../types/components';
5
5
  import type { Dictionary, Nullable } from '../types/typescript';
6
+ import type { ExtraContextTypes } from './extra-context-types';
6
7
  export type RegisteredComponent = ComponentInfo & {
7
8
  component: any;
8
9
  };
9
10
  export type RegisteredComponents = Dictionary<RegisteredComponent>;
10
11
  export type BuilderRenderState = Record<string, unknown>;
11
12
  export type BuilderRenderContext = Record<string, unknown>;
12
- export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
13
+ export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>, ExtraContextTypes {
13
14
  content: Nullable<BuilderContent>;
14
15
  context: BuilderRenderContext;
15
16
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-svelte",
3
3
  "description": "Builder.io SDK for Svelte",
4
- "version": "2.0.5",
4
+ "version": "2.0.8",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "lib",
@@ -10,6 +10,7 @@
10
10
  <script lang="ts">
11
11
  import { onMount } from "svelte";
12
12
 
13
+ import { TARGET } from "../../constants/target";
13
14
  import type {
14
15
  BuilderContextInterface,
15
16
  RegisteredComponents,
@@ -115,7 +116,7 @@
115
116
  registeredComponents: registeredComponents,
116
117
  builderBlock: processedBlock(),
117
118
  includeBlockProps: blockComponent?.()?.noWrap === true,
118
- isInteractive: !blockComponent?.()?.isRSC,
119
+ isInteractive: !(blockComponent?.()?.isRSC && TARGET === "rsc"),
119
120
  };
120
121
  };
121
122
 
@@ -129,6 +129,7 @@
129
129
  {contentWrapper}
130
130
  {contentWrapperProps}
131
131
  {trustedHosts}
132
+ {...{}}
132
133
  />
133
134
  {/each}
134
135
  {/if}
@@ -2,7 +2,8 @@ import type { BuilderRenderContext, RegisteredComponent } from '../../context/ty
2
2
  import type { ApiVersion } from '../../types/api-version';
3
3
  import type { BuilderContent } from '../../types/builder-content';
4
4
  import type { Nullable } from '../../types/typescript';
5
- export interface ContentVariantsPrps {
5
+ import type { ExtraFrameworkProps } from './extra-framework-props-types';
6
+ export interface ContentVariantsPrps extends ExtraFrameworkProps {
6
7
  /**
7
8
  * The Builder content JSON to render (required).
8
9
  */
@@ -0,0 +1 @@
1
+ export interface ExtraFrameworkProps {}
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.5"
1
+ export const SDK_VERSION = "2.0.8"
@@ -0,0 +1,5 @@
1
+ /**
2
+ * no-op type for extra context types on a per-SDK basis
3
+ * See `overrides/react-native/src/context/extra-context-types.ts` for an example
4
+ * */
5
+ export interface ExtraContextTypes {}
@@ -3,13 +3,14 @@ import type { ApiVersion } from '../types/api-version';
3
3
  import type { BuilderContent } from '../types/builder-content';
4
4
  import type { ComponentInfo } from '../types/components';
5
5
  import type { Dictionary, Nullable } from '../types/typescript';
6
+ import type { ExtraContextTypes } from './extra-context-types';
6
7
  export type RegisteredComponent = ComponentInfo & {
7
8
  component: any;
8
9
  };
9
10
  export type RegisteredComponents = Dictionary<RegisteredComponent>;
10
11
  export type BuilderRenderState = Record<string, unknown>;
11
12
  export type BuilderRenderContext = Record<string, unknown>;
12
- export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
13
+ export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>, ExtraContextTypes {
13
14
  content: Nullable<BuilderContent>;
14
15
  context: BuilderRenderContext;
15
16
  /**