@builder.io/sdk-svelte 5.2.8 → 5.2.10

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.
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.2.8";
1
+ export declare const SDK_VERSION = "5.2.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.8";
1
+ export const SDK_VERSION = "5.2.10";
@@ -76,11 +76,18 @@ export const generateContentUrl = (options) => {
76
76
  }
77
77
  return url;
78
78
  };
79
+ const parseStudioUserAttribute = (value) => {
80
+ if (value === 'true')
81
+ return true;
82
+ if (value === 'false')
83
+ return false;
84
+ return value;
85
+ };
79
86
  const getUserAttributesFromQueryOptions = (queryOptions) => {
80
87
  const newUserAttributes = {};
81
88
  for (const key in queryOptions) {
82
89
  if (key.startsWith('userAttributes.')) {
83
- newUserAttributes[key] = queryOptions[key];
90
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
84
91
  delete queryOptions[key];
85
92
  }
86
93
  }
@@ -117,7 +117,9 @@ export interface Input {
117
117
  /** @hidden */
118
118
  richText?: boolean;
119
119
  /** @hidden */
120
- showIf?: ((options: Map<string, any>) => boolean) | string;
120
+ showIf?: ((options: Map<string, any>, parent?: any, parentElements?: any, context?: {
121
+ locale?: string;
122
+ }) => boolean) | string;
121
123
  /** @hidden */
122
124
  copyOnAdd?: boolean;
123
125
  /**
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.2.8";
1
+ export declare const SDK_VERSION = "5.2.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.8";
1
+ export const SDK_VERSION = "5.2.10";
@@ -76,11 +76,18 @@ export const generateContentUrl = (options) => {
76
76
  }
77
77
  return url;
78
78
  };
79
+ const parseStudioUserAttribute = (value) => {
80
+ if (value === 'true')
81
+ return true;
82
+ if (value === 'false')
83
+ return false;
84
+ return value;
85
+ };
79
86
  const getUserAttributesFromQueryOptions = (queryOptions) => {
80
87
  const newUserAttributes = {};
81
88
  for (const key in queryOptions) {
82
89
  if (key.startsWith('userAttributes.')) {
83
- newUserAttributes[key] = queryOptions[key];
90
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
84
91
  delete queryOptions[key];
85
92
  }
86
93
  }
@@ -117,7 +117,9 @@ export interface Input {
117
117
  /** @hidden */
118
118
  richText?: boolean;
119
119
  /** @hidden */
120
- showIf?: ((options: Map<string, any>) => boolean) | string;
120
+ showIf?: ((options: Map<string, any>, parent?: any, parentElements?: any, context?: {
121
+ locale?: string;
122
+ }) => boolean) | string;
121
123
  /** @hidden */
122
124
  copyOnAdd?: boolean;
123
125
  /**
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.2.8";
1
+ export declare const SDK_VERSION = "5.2.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.8";
1
+ export const SDK_VERSION = "5.2.10";
@@ -76,11 +76,18 @@ export const generateContentUrl = (options) => {
76
76
  }
77
77
  return url;
78
78
  };
79
+ const parseStudioUserAttribute = (value) => {
80
+ if (value === 'true')
81
+ return true;
82
+ if (value === 'false')
83
+ return false;
84
+ return value;
85
+ };
79
86
  const getUserAttributesFromQueryOptions = (queryOptions) => {
80
87
  const newUserAttributes = {};
81
88
  for (const key in queryOptions) {
82
89
  if (key.startsWith('userAttributes.')) {
83
- newUserAttributes[key] = queryOptions[key];
90
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
84
91
  delete queryOptions[key];
85
92
  }
86
93
  }
@@ -117,7 +117,9 @@ export interface Input {
117
117
  /** @hidden */
118
118
  richText?: boolean;
119
119
  /** @hidden */
120
- showIf?: ((options: Map<string, any>) => boolean) | string;
120
+ showIf?: ((options: Map<string, any>, parent?: any, parentElements?: any, context?: {
121
+ locale?: string;
122
+ }) => boolean) | string;
121
123
  /** @hidden */
122
124
  copyOnAdd?: boolean;
123
125
  /**
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.2.8",
4
+ "version": "5.2.10",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "lib",
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.8"
1
+ export const SDK_VERSION = "5.2.10"
@@ -96,11 +96,16 @@ export const generateContentUrl = (options: GetContentOptions): URL => {
96
96
  }
97
97
  return url;
98
98
  };
99
+ const parseStudioUserAttribute = (value: unknown) => {
100
+ if (value === 'true') return true;
101
+ if (value === 'false') return false;
102
+ return value;
103
+ };
99
104
  const getUserAttributesFromQueryOptions = (queryOptions: any) => {
100
105
  const newUserAttributes: any = {};
101
106
  for (const key in queryOptions) {
102
107
  if (key.startsWith('userAttributes.')) {
103
- newUserAttributes[key] = queryOptions[key];
108
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
104
109
  delete queryOptions[key];
105
110
  }
106
111
  }
@@ -118,7 +118,9 @@ export interface Input {
118
118
  /** @hidden */
119
119
  richText?: boolean;
120
120
  /** @hidden */
121
- showIf?: ((options: Map<string, any>) => boolean) | string;
121
+ showIf?: ((options: Map<string, any>, parent?: any, parentElements?: any, context?: {
122
+ locale?: string;
123
+ }) => boolean) | string;
122
124
  /** @hidden */
123
125
  copyOnAdd?: boolean;
124
126
  /**