@builder.io/sdk-svelte 5.1.1 → 5.2.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.
@@ -7,6 +7,8 @@ export interface SymbolInfo {
7
7
  content?: BuilderContent;
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
+ ownerId?: string;
11
+ global?: boolean;
10
12
  }
11
13
  export declare const fetchSymbolContent: ({ builderContextValue, symbol }: {
12
14
  symbol: SymbolInfo | undefined;
@@ -15,7 +15,7 @@ export const fetchSymbolContent = async ({ builderContextValue, symbol }) => {
15
15
  builderContextValue?.apiKey) {
16
16
  return fetchOneEntry({
17
17
  model: symbol.model,
18
- apiKey: builderContextValue.apiKey,
18
+ apiKey: symbol.global && symbol.ownerId ? symbol.ownerId : builderContextValue.apiKey,
19
19
  apiVersion: builderContextValue.apiVersion,
20
20
  ...(symbol?.entry && {
21
21
  query: {
@@ -65,7 +65,9 @@ $: onUpdateFn_0(...[symbol]);
65
65
  nonce={$builderContext.nonce}
66
66
  isNestedRender={true}
67
67
  apiVersion={$builderContext.apiVersion}
68
- apiKey={$builderContext.apiKey}
68
+ apiKey={symbol?.global && symbol?.ownerId
69
+ ? symbol.ownerId
70
+ : $builderContext.apiKey}
69
71
  context={{
70
72
  ...$builderContext.context,
71
73
  symbolId: builderBlock?.id,
@@ -7,6 +7,8 @@ export interface SymbolInfo {
7
7
  content?: BuilderContent;
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
+ ownerId?: string;
11
+ global?: boolean;
10
12
  }
11
13
  export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp {
12
14
  symbol?: SymbolInfo;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.1.1";
1
+ export declare const SDK_VERSION = "5.2.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.1.1";
1
+ export const SDK_VERSION = "5.2.0";
@@ -7,6 +7,8 @@ export interface SymbolInfo {
7
7
  content?: BuilderContent;
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
+ ownerId?: string;
11
+ global?: boolean;
10
12
  }
11
13
  export declare const fetchSymbolContent: ({ builderContextValue, symbol }: {
12
14
  symbol: SymbolInfo | undefined;
@@ -15,7 +15,7 @@ export const fetchSymbolContent = async ({ builderContextValue, symbol }) => {
15
15
  builderContextValue?.apiKey) {
16
16
  return fetchOneEntry({
17
17
  model: symbol.model,
18
- apiKey: builderContextValue.apiKey,
18
+ apiKey: symbol.global && symbol.ownerId ? symbol.ownerId : builderContextValue.apiKey,
19
19
  apiVersion: builderContextValue.apiVersion,
20
20
  ...(symbol?.entry && {
21
21
  query: {
@@ -65,7 +65,9 @@ $: onUpdateFn_0(...[symbol]);
65
65
  nonce={$builderContext.nonce}
66
66
  isNestedRender={true}
67
67
  apiVersion={$builderContext.apiVersion}
68
- apiKey={$builderContext.apiKey}
68
+ apiKey={symbol?.global && symbol?.ownerId
69
+ ? symbol.ownerId
70
+ : $builderContext.apiKey}
69
71
  context={{
70
72
  ...$builderContext.context,
71
73
  symbolId: builderBlock?.id,
@@ -7,6 +7,8 @@ export interface SymbolInfo {
7
7
  content?: BuilderContent;
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
+ ownerId?: string;
11
+ global?: boolean;
10
12
  }
11
13
  export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp {
12
14
  symbol?: SymbolInfo;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.1.1";
1
+ export declare const SDK_VERSION = "5.2.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.1.1";
1
+ export const SDK_VERSION = "5.2.0";
@@ -7,6 +7,8 @@ export interface SymbolInfo {
7
7
  content?: BuilderContent;
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
+ ownerId?: string;
11
+ global?: boolean;
10
12
  }
11
13
  export declare const fetchSymbolContent: ({ builderContextValue, symbol }: {
12
14
  symbol: SymbolInfo | undefined;
@@ -15,7 +15,7 @@ export const fetchSymbolContent = async ({ builderContextValue, symbol }) => {
15
15
  builderContextValue?.apiKey) {
16
16
  return fetchOneEntry({
17
17
  model: symbol.model,
18
- apiKey: builderContextValue.apiKey,
18
+ apiKey: symbol.global && symbol.ownerId ? symbol.ownerId : builderContextValue.apiKey,
19
19
  apiVersion: builderContextValue.apiVersion,
20
20
  ...(symbol?.entry && {
21
21
  query: {
@@ -65,7 +65,9 @@ $: onUpdateFn_0(...[symbol]);
65
65
  nonce={$builderContext.nonce}
66
66
  isNestedRender={true}
67
67
  apiVersion={$builderContext.apiVersion}
68
- apiKey={$builderContext.apiKey}
68
+ apiKey={symbol?.global && symbol?.ownerId
69
+ ? symbol.ownerId
70
+ : $builderContext.apiKey}
69
71
  context={{
70
72
  ...$builderContext.context,
71
73
  symbolId: builderBlock?.id,
@@ -7,6 +7,8 @@ export interface SymbolInfo {
7
7
  content?: BuilderContent;
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
+ ownerId?: string;
11
+ global?: boolean;
10
12
  }
11
13
  export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp {
12
14
  symbol?: SymbolInfo;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.1.1";
1
+ export declare const SDK_VERSION = "5.2.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.1.1";
1
+ export const SDK_VERSION = "5.2.0";
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": "5.1.1",
4
+ "version": "5.2.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "lib",
@@ -9,6 +9,8 @@ export interface SymbolInfo {
9
9
  content?: BuilderContent;
10
10
  inline?: boolean;
11
11
  dynamic?: boolean;
12
+ ownerId?: string;
13
+ global?: boolean;
12
14
  }
13
15
  export const fetchSymbolContent = async ({
14
16
  builderContextValue,
@@ -31,7 +33,7 @@ export const fetchSymbolContent = async ({
31
33
  builderContextValue?.apiKey) {
32
34
  return fetchOneEntry({
33
35
  model: symbol.model,
34
- apiKey: builderContextValue.apiKey,
36
+ apiKey: symbol.global && symbol.ownerId ? symbol.ownerId : builderContextValue.apiKey,
35
37
  apiVersion: builderContextValue.apiVersion,
36
38
  ...(symbol?.entry && {
37
39
  query: {
@@ -76,7 +76,9 @@
76
76
  nonce={$builderContext.nonce}
77
77
  isNestedRender={true}
78
78
  apiVersion={$builderContext.apiVersion}
79
- apiKey={$builderContext.apiKey}
79
+ apiKey={symbol?.global && symbol?.ownerId
80
+ ? symbol.ownerId
81
+ : $builderContext.apiKey}
80
82
  context={{
81
83
  ...$builderContext.context,
82
84
  symbolId: builderBlock?.id,
@@ -7,6 +7,8 @@ export interface SymbolInfo {
7
7
  content?: BuilderContent;
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
+ ownerId?: string;
11
+ global?: boolean;
10
12
  }
11
13
  export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp {
12
14
  symbol?: SymbolInfo;
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.1.1"
1
+ export const SDK_VERSION = "5.2.0"