@builder.io/sdk-svelte 1.0.6 → 1.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.
@@ -19,8 +19,9 @@ let componentsContext = getContext(ComponentsContext.key);
19
19
  {parent}
20
20
  {path}
21
21
  {styleProp}
22
- BlocksWrapper={$context?.BlocksWrapper}
23
- BlocksWrapperProps={$context?.BlocksWrapperProps}
22
+ BlocksWrapper={$context?.BlocksWrapper || $builderContext.BlocksWrapper}
23
+ BlocksWrapperProps={$context?.BlocksWrapperProps ||
24
+ $builderContext.BlocksWrapperProps}
24
25
  >
25
26
  {#if blocks}
26
27
  {#each blocks as block (block.id)}
@@ -233,8 +233,10 @@ let httpReqsData = {};
233
233
  let clicked = false;
234
234
  onMount(() => {
235
235
  if (isBrowser()) {
236
- if (isEditing() && elementRef) {
237
- elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
236
+ if (isEditing()) {
237
+ if (elementRef) {
238
+ elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
239
+ }
238
240
  }
239
241
  const shouldTrackImpression = $builderContextSignal.content && getDefaultCanTrack(canTrack);
240
242
  if (shouldTrackImpression) {
@@ -250,8 +252,10 @@ onMount(() => {
250
252
  });
251
253
  }
252
254
  // override normal content in preview mode
253
- if (isPreviewing() && elementRef) {
254
- elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
255
+ if (isPreviewing()) {
256
+ if (elementRef) {
257
+ elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
258
+ }
255
259
  }
256
260
  }
257
261
  });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.6";
1
+ export declare const SDK_VERSION = "1.0.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.6";
1
+ export const SDK_VERSION = "1.0.8";
@@ -19,8 +19,9 @@ let componentsContext = getContext(ComponentsContext.key);
19
19
  {parent}
20
20
  {path}
21
21
  {styleProp}
22
- BlocksWrapper={$context?.BlocksWrapper}
23
- BlocksWrapperProps={$context?.BlocksWrapperProps}
22
+ BlocksWrapper={$context?.BlocksWrapper || $builderContext.BlocksWrapper}
23
+ BlocksWrapperProps={$context?.BlocksWrapperProps ||
24
+ $builderContext.BlocksWrapperProps}
24
25
  >
25
26
  {#if blocks}
26
27
  {#each blocks as block (block.id)}
@@ -233,8 +233,10 @@ let httpReqsData = {};
233
233
  let clicked = false;
234
234
  onMount(() => {
235
235
  if (isBrowser()) {
236
- if (isEditing() && elementRef) {
237
- elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
236
+ if (isEditing()) {
237
+ if (elementRef) {
238
+ elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
239
+ }
238
240
  }
239
241
  const shouldTrackImpression = $builderContextSignal.content && getDefaultCanTrack(canTrack);
240
242
  if (shouldTrackImpression) {
@@ -250,8 +252,10 @@ onMount(() => {
250
252
  });
251
253
  }
252
254
  // override normal content in preview mode
253
- if (isPreviewing() && elementRef) {
254
- elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
255
+ if (isPreviewing()) {
256
+ if (elementRef) {
257
+ elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
258
+ }
255
259
  }
256
260
  }
257
261
  });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.6";
1
+ export declare const SDK_VERSION = "1.0.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.6";
1
+ export const SDK_VERSION = "1.0.8";
@@ -19,8 +19,9 @@ let componentsContext = getContext(ComponentsContext.key);
19
19
  {parent}
20
20
  {path}
21
21
  {styleProp}
22
- BlocksWrapper={$context?.BlocksWrapper}
23
- BlocksWrapperProps={$context?.BlocksWrapperProps}
22
+ BlocksWrapper={$context?.BlocksWrapper || $builderContext.BlocksWrapper}
23
+ BlocksWrapperProps={$context?.BlocksWrapperProps ||
24
+ $builderContext.BlocksWrapperProps}
24
25
  >
25
26
  {#if blocks}
26
27
  {#each blocks as block (block.id)}
@@ -233,8 +233,10 @@ let httpReqsData = {};
233
233
  let clicked = false;
234
234
  onMount(() => {
235
235
  if (isBrowser()) {
236
- if (isEditing() && elementRef) {
237
- elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
236
+ if (isEditing()) {
237
+ if (elementRef) {
238
+ elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
239
+ }
238
240
  }
239
241
  const shouldTrackImpression = $builderContextSignal.content && getDefaultCanTrack(canTrack);
240
242
  if (shouldTrackImpression) {
@@ -250,8 +252,10 @@ onMount(() => {
250
252
  });
251
253
  }
252
254
  // override normal content in preview mode
253
- if (isPreviewing() && elementRef) {
254
- elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
255
+ if (isPreviewing()) {
256
+ if (elementRef) {
257
+ elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
258
+ }
255
259
  }
256
260
  }
257
261
  });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.6";
1
+ export declare const SDK_VERSION = "1.0.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.6";
1
+ export const SDK_VERSION = "1.0.8";
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": "1.0.6",
4
+ "version": "1.0.8",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "lib",
@@ -25,8 +25,9 @@
25
25
  {parent}
26
26
  {path}
27
27
  {styleProp}
28
- BlocksWrapper={$context?.BlocksWrapper}
29
- BlocksWrapperProps={$context?.BlocksWrapperProps}
28
+ BlocksWrapper={$context?.BlocksWrapper || $builderContext.BlocksWrapper}
29
+ BlocksWrapperProps={$context?.BlocksWrapperProps ||
30
+ $builderContext.BlocksWrapperProps}
30
31
  >
31
32
  {#if blocks}
32
33
  {#each blocks as block (block.id)}
@@ -287,8 +287,10 @@
287
287
 
288
288
  onMount(() => {
289
289
  if (isBrowser()) {
290
- if (isEditing() && elementRef) {
291
- elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
290
+ if (isEditing()) {
291
+ if (elementRef) {
292
+ elementRef.dispatchEvent(new CustomEvent("initeditingbldr"));
293
+ }
292
294
  }
293
295
  const shouldTrackImpression =
294
296
  $builderContextSignal.content && getDefaultCanTrack(canTrack);
@@ -306,8 +308,10 @@
306
308
  }
307
309
 
308
310
  // override normal content in preview mode
309
- if (isPreviewing() && elementRef) {
310
- elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
311
+ if (isPreviewing()) {
312
+ if (elementRef) {
313
+ elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"));
314
+ }
311
315
  }
312
316
  }
313
317
  });
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.6"
1
+ export const SDK_VERSION = "1.0.8"