@builder.io/sdk-solid 4.1.0 → 4.1.2

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.
package/lib/node/index.js CHANGED
@@ -5255,7 +5255,7 @@ var componentInfo19 = {
5255
5255
  noWrap: true,
5256
5256
  static: true
5257
5257
  };
5258
- var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
5258
+ var _tmpl$20 = /* @__PURE__ */ template(`<img loading=lazy>`);
5259
5259
  function ImgComponent(props) {
5260
5260
  const srcSetToUse = createMemo(() => {
5261
5261
  const url = props.imgSrc || props.image;
@@ -5657,7 +5657,7 @@ function getPreviewContent(_searchParams) {
5657
5657
  }
5658
5658
 
5659
5659
  // src/constants/sdk-version.ts
5660
- var SDK_VERSION = "4.1.0";
5660
+ var SDK_VERSION = "4.1.2";
5661
5661
 
5662
5662
  // src/helpers/sdk-headers.ts
5663
5663
  var getSdkHeaders = () => ({
@@ -6205,59 +6205,7 @@ function isFromTrustedHost(trustedHosts, e) {
6205
6205
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
6206
6206
  }
6207
6207
 
6208
- // src/functions/register.ts
6209
- var registry = {};
6210
- function register(type, info) {
6211
- if (type === "plugin") {
6212
- info = serializeIncludingFunctions(info);
6213
- }
6214
- let typeList = registry[type];
6215
- if (!typeList) {
6216
- typeList = registry[type] = [];
6217
- }
6218
- typeList.push(info);
6219
- if (isBrowser()) {
6220
- const message = {
6221
- type: "builder.register",
6222
- data: {
6223
- type,
6224
- info
6225
- }
6226
- };
6227
- try {
6228
- parent.postMessage(message, "*");
6229
- if (parent !== window) {
6230
- window.postMessage(message, "*");
6231
- }
6232
- } catch (err) {
6233
- }
6234
- }
6235
- }
6236
-
6237
6208
  // src/scripts/init-editing.ts
6238
- var registerInsertMenu = () => {
6239
- register("insertMenu", {
6240
- name: "_default",
6241
- default: true,
6242
- items: [{
6243
- name: "Box"
6244
- }, {
6245
- name: "Text"
6246
- }, {
6247
- name: "Image"
6248
- }, {
6249
- name: "Columns"
6250
- }, ...TARGET === "reactNative" ? [] : [{
6251
- name: "Core:Section"
6252
- }, {
6253
- name: "Core:Button"
6254
- }, {
6255
- name: "Embed"
6256
- }, {
6257
- name: "Custom Code"
6258
- }]]
6259
- });
6260
- };
6261
6209
  var isSetupForEditing = false;
6262
6210
  var setupBrowserForEditing = (options) => {
6263
6211
  if (isSetupForEditing) {
@@ -6656,7 +6604,6 @@ function EnableEditor(props) {
6656
6604
  if (isBrowser()) {
6657
6605
  if (isEditing() && !props.isNestedRender) {
6658
6606
  window.addEventListener("message", processMessage);
6659
- registerInsertMenu();
6660
6607
  setupBrowserForEditing({
6661
6608
  ...props.locale ? {
6662
6609
  locale: props.locale
@@ -7375,6 +7322,35 @@ function Symbol(props) {
7375
7322
  }
7376
7323
  var symbol_default = Symbol;
7377
7324
 
7325
+ // src/functions/register.ts
7326
+ var registry = {};
7327
+ function register(type, info) {
7328
+ if (type === "plugin") {
7329
+ info = serializeIncludingFunctions(info);
7330
+ }
7331
+ let typeList = registry[type];
7332
+ if (!typeList) {
7333
+ typeList = registry[type] = [];
7334
+ }
7335
+ typeList.push(info);
7336
+ if (isBrowser()) {
7337
+ const message = {
7338
+ type: "builder.register",
7339
+ data: {
7340
+ type,
7341
+ info
7342
+ }
7343
+ };
7344
+ try {
7345
+ parent.postMessage(message, "*");
7346
+ if (parent !== window) {
7347
+ window.postMessage(message, "*");
7348
+ }
7349
+ } catch (err) {
7350
+ }
7351
+ }
7352
+ }
7353
+
7378
7354
  // src/functions/set-editor-settings.ts
7379
7355
  var settings = {};
7380
7356
  function setEditorSettings(newSettings) {
@@ -4778,6 +4778,7 @@ function ImgComponent(props) {
4778
4778
  return getSrcSet(url);
4779
4779
  });
4780
4780
  return <><img
4781
+ loading="lazy"
4781
4782
  style={{
4782
4783
  "object-fit": props.backgroundSize || "cover",
4783
4784
  "object-position": props.backgroundPosition || "center"
@@ -5152,7 +5153,7 @@ function getPreviewContent(_searchParams) {
5152
5153
  }
5153
5154
 
5154
5155
  // src/constants/sdk-version.ts
5155
- var SDK_VERSION = "4.1.0";
5156
+ var SDK_VERSION = "4.1.2";
5156
5157
 
5157
5158
  // src/helpers/sdk-headers.ts
5158
5159
  var getSdkHeaders = () => ({
@@ -5700,59 +5701,7 @@ function isFromTrustedHost(trustedHosts, e) {
5700
5701
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5701
5702
  }
5702
5703
 
5703
- // src/functions/register.ts
5704
- var registry = {};
5705
- function register(type, info) {
5706
- if (type === "plugin") {
5707
- info = serializeIncludingFunctions(info);
5708
- }
5709
- let typeList = registry[type];
5710
- if (!typeList) {
5711
- typeList = registry[type] = [];
5712
- }
5713
- typeList.push(info);
5714
- if (isBrowser()) {
5715
- const message = {
5716
- type: "builder.register",
5717
- data: {
5718
- type,
5719
- info
5720
- }
5721
- };
5722
- try {
5723
- parent.postMessage(message, "*");
5724
- if (parent !== window) {
5725
- window.postMessage(message, "*");
5726
- }
5727
- } catch (err) {
5728
- }
5729
- }
5730
- }
5731
-
5732
5704
  // src/scripts/init-editing.ts
5733
- var registerInsertMenu = () => {
5734
- register("insertMenu", {
5735
- name: "_default",
5736
- default: true,
5737
- items: [{
5738
- name: "Box"
5739
- }, {
5740
- name: "Text"
5741
- }, {
5742
- name: "Image"
5743
- }, {
5744
- name: "Columns"
5745
- }, ...TARGET === "reactNative" ? [] : [{
5746
- name: "Core:Section"
5747
- }, {
5748
- name: "Core:Button"
5749
- }, {
5750
- name: "Embed"
5751
- }, {
5752
- name: "Custom Code"
5753
- }]]
5754
- });
5755
- };
5756
5705
  var isSetupForEditing = false;
5757
5706
  var setupBrowserForEditing = (options) => {
5758
5707
  if (isSetupForEditing) {
@@ -6160,7 +6109,6 @@ function EnableEditor(props) {
6160
6109
  if (isBrowser()) {
6161
6110
  if (isEditing() && !props.isNestedRender) {
6162
6111
  window.addEventListener("message", processMessage);
6163
- registerInsertMenu();
6164
6112
  setupBrowserForEditing({
6165
6113
  ...props.locale ? {
6166
6114
  locale: props.locale
@@ -6678,6 +6626,35 @@ function Symbol(props) {
6678
6626
  }
6679
6627
  var symbol_default = Symbol;
6680
6628
 
6629
+ // src/functions/register.ts
6630
+ var registry = {};
6631
+ function register(type, info) {
6632
+ if (type === "plugin") {
6633
+ info = serializeIncludingFunctions(info);
6634
+ }
6635
+ let typeList = registry[type];
6636
+ if (!typeList) {
6637
+ typeList = registry[type] = [];
6638
+ }
6639
+ typeList.push(info);
6640
+ if (isBrowser()) {
6641
+ const message = {
6642
+ type: "builder.register",
6643
+ data: {
6644
+ type,
6645
+ info
6646
+ }
6647
+ };
6648
+ try {
6649
+ parent.postMessage(message, "*");
6650
+ if (parent !== window) {
6651
+ window.postMessage(message, "*");
6652
+ }
6653
+ } catch (err) {
6654
+ }
6655
+ }
6656
+ }
6657
+
6681
6658
  // src/functions/set-editor-settings.ts
6682
6659
  var settings = {};
6683
6660
  function setEditorSettings(newSettings) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist",