@builder.io/sdk-svelte 0.0.1-13 → 0.0.1-16

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/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This is the Svelte SDK. It is currently in beta.
4
4
 
5
+ ## Mitosis
6
+
7
+ This SDK is generated by [Mitosis](https://github.com/BuilderIO/mitosis). To see the Mitosis source-code, go [here](../../).
8
+
5
9
  ## Feature Support
6
10
 
7
11
  To check the status of the SDK, look at [these tables](../../README.md#feature-implementation).
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": "0.0.1-13",
4
+ "version": "0.0.1-16",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "src"
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- import RenderBlocks, { } from '../../components/render-blocks.svelte';
7
-
6
+ import RenderBlocks from '../../components/render-blocks.svelte';
7
+
8
8
 
9
9
 
10
10
 
@@ -5,6 +5,7 @@
5
5
 
6
6
 
7
7
 
8
+
8
9
 
9
10
 
10
11
 
@@ -16,7 +17,6 @@ export let code;
16
17
  function findAndRunScripts() {
17
18
  // TODO: Move this function to standalone one in '@builder.io/utils'
18
19
  if (elem && typeof window !== 'undefined') {
19
- /** @type {HTMLScriptElement[]} */
20
20
  const scripts = elem.getElementsByTagName('script');
21
21
 
22
22
  for (let i = 0; i < scripts.length; i++) {
@@ -5,6 +5,7 @@
5
5
 
6
6
 
7
7
 
8
+
8
9
 
9
10
 
10
11
 
@@ -15,7 +16,6 @@ export let content;
15
16
  function findAndRunScripts() {
16
17
  // TODO: Move this function to standalone one in '@builder.io/utils'
17
18
  if (elem && typeof window !== 'undefined') {
18
- /** @type {HTMLScriptElement[]} */
19
19
  const scripts = elem.getElementsByTagName('script');
20
20
 
21
21
  for (let i = 0; i < scripts.length; i++) {
@@ -3,9 +3,9 @@
3
3
 
4
4
 
5
5
 
6
- import RenderBlock, { } from '../../components/render-block/render-block.svelte';
7
- import { isEditing } from '../../functions/is-editing.js';
8
-
6
+ import RenderBlock from '../../components/render-block/render-block.svelte';
7
+ import { isEditing } from '../../functions/is-editing.js';
8
+
9
9
 
10
10
 
11
11
 
@@ -5,6 +5,7 @@
5
5
 
6
6
 
7
7
 
8
+
8
9
 
9
10
 
10
11
 
@@ -41,10 +42,10 @@ export let builderBlock;
41
42
  <img loading="lazy" alt={altText} role={altText ? 'presentation' : undefined} style={{
42
43
  objectPosition: backgroundSize || 'center',
43
44
  objectFit: backgroundSize || 'cover'
44
- }} class={'builder-image' + (className ? ' ' + className : '')} src={image} srcSet={srcset} sizes={sizes} />
45
+ }} class={'builder-image' + (className ? ' ' + className : '')} src={image} srcset={srcset} sizes={sizes} />
45
46
 
46
47
 
47
- <source srcSet={srcset} />
48
+ <source srcset={srcset} />
48
49
 
49
50
  </picture>
50
51
 
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- import { isEditing } from '../../functions/is-editing.js';
7
-
6
+ import { isEditing } from '../../functions/is-editing.js';
7
+
8
8
 
9
9
 
10
10
 
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- import { isEditing } from '../../functions/is-editing.js';
6
+ import { isEditing } from '../../functions/is-editing.js';
7
7
 
8
8
 
9
9
 
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- import { isEditing } from '../../functions/is-editing.js';
6
+ import { isEditing } from '../../functions/is-editing.js';
7
7
 
8
8
 
9
9
 
@@ -3,10 +3,10 @@
3
3
  import { afterUpdate } from 'svelte'
4
4
 
5
5
 
6
- import RenderContent, { } from '../../components/render-content/render-content.svelte';
7
- import BuilderContext, { } from '../../context/builder.context';
8
- import { getContent } from '../../functions/get-content/index.js';
9
-
6
+ import RenderContent from '../../components/render-content/render-content.svelte';
7
+ import BuilderContext from '../../context/builder.context';
8
+ import { getContent } from '../../functions/get-content/index.js';
9
+
10
10
 
11
11
 
12
12
  import { getContext, setContext } from "svelte";
@@ -3,11 +3,11 @@
3
3
 
4
4
 
5
5
 
6
- import { TARGET } from '../../constants/target.js';
7
- import BuilderContext, { } from '../../context/builder.context';
8
- import { getProcessedBlock } from '../../functions/get-processed-block.js';
9
- import RenderInlinedStyles, { } from '../render-inlined-styles.svelte';
10
-
6
+ import { TARGET } from '../../constants/target.js';
7
+ import BuilderContext from '../../context/builder.context';
8
+ import { getProcessedBlock } from '../../functions/get-processed-block.js';
9
+ import RenderInlinedStyles from '../render-inlined-styles.svelte';
10
+
11
11
 
12
12
 
13
13
  import { getContext, setContext } from "svelte";
@@ -3,17 +3,17 @@
3
3
 
4
4
 
5
5
 
6
- import BuilderContext, { } from '../../context/builder.context';
7
- import { getBlockActions } from '../../functions/get-block-actions.js';
8
- import { getBlockComponentOptions } from '../../functions/get-block-component-options.js';
9
- import { getBlockProperties } from '../../functions/get-block-properties.js';
10
- import { getBlockStyles } from '../../functions/get-block-styles.js';
11
- import { getBlockTag } from '../../functions/get-block-tag.js';
12
- import { getProcessedBlock } from '../../functions/get-processed-block.js';
13
- import BlockStyles, { } from './block-styles.svelte';
14
- import { isEmptyHtmlElement } from './render-block.helpers.js';
15
- import RenderComponent, { } from './render-component.svelte';
16
-
6
+ import BuilderContext from '../../context/builder.context';
7
+ import { getBlockActions } from '../../functions/get-block-actions.js';
8
+ import { getBlockComponentOptions } from '../../functions/get-block-component-options.js';
9
+ import { getBlockProperties } from '../../functions/get-block-properties.js';
10
+ import { getBlockStyles } from '../../functions/get-block-styles.js';
11
+ import { getBlockTag } from '../../functions/get-block-tag.js';
12
+ import { getProcessedBlock } from '../../functions/get-processed-block.js';
13
+ import BlockStyles from './block-styles.svelte';
14
+ import { isEmptyHtmlElement } from './render-block.helpers.js';
15
+ import RenderComponent from './render-component.svelte';
16
+
17
17
 
18
18
 
19
19
  import { getContext, setContext } from "svelte";
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- import BlockStyles, { } from './block-styles.svelte';
7
- import RenderBlock, { } from './render-block.svelte';
6
+ import BlockStyles from './block-styles.svelte';
7
+ import RenderBlock from './render-block.svelte';
8
8
 
9
9
 
10
10
 
@@ -3,10 +3,10 @@
3
3
 
4
4
 
5
5
 
6
- import { isEditing } from '../functions/is-editing.js';
7
- import BlockStyles, { } from './render-block/block-styles.svelte';
8
- import RenderBlock, { } from './render-block/render-block.svelte';
9
-
6
+ import { isEditing } from '../functions/is-editing.js';
7
+ import BlockStyles from './render-block/block-styles.svelte';
8
+ import RenderBlock from './render-block/render-block.svelte';
9
+
10
10
 
11
11
 
12
12
 
@@ -54,9 +54,9 @@ return 'builder-blocks' + (!blocks?.length ? ' no-blocks' : '');
54
54
 
55
55
  </script>
56
56
 
57
- <div builder-path={path} builder-parent-id={parent} dataSet={{
57
+ <div class={className()} builder-path={path} builder-parent-id={parent} dataSet={{
58
58
  class: className()
59
- }} on:click="{event => onClick()}" on:mouseenter="{event => onMouseEnter()}" class={className()} >
59
+ }} on:click="{event => onClick()}" on:mouseenter="{event => onMouseEnter()}" >
60
60
 
61
61
 
62
62
 
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- import RenderInlinedStyles, { } from '../../render-inlined-styles.svelte';
7
-
6
+ import RenderInlinedStyles from '../../render-inlined-styles.svelte';
7
+
8
8
 
9
9
 
10
10
 
@@ -3,22 +3,22 @@
3
3
  import { afterUpdate } from 'svelte'
4
4
  import { onDestroy } from 'svelte'
5
5
 
6
- import { getDefaultRegisteredComponents } from '../../constants/builder-registered-components.js';
7
- import { TARGET } from '../../constants/target.js';
8
- import BuilderContext, { } from '../../context/builder.context';
9
- import { evaluate } from '../../functions/evaluate.js';
10
- import { convertSearchParamsToQueryObject , getBuilderSearchParams } from '../../functions/get-builder-search-params/index.js';
11
- import { getContent } from '../../functions/get-content/index.js';
12
- import { getFetch } from '../../functions/get-fetch.js';
13
- import { isBrowser } from '../../functions/is-browser.js';
14
- import { isEditing } from '../../functions/is-editing.js';
15
- import { isPreviewing } from '../../functions/is-previewing.js';
16
- import { previewingModelName } from '../../functions/previewing-model-name.js';
17
- import { components , createRegisterComponentMessage } from '../../functions/register-component.js';
18
- import { track } from '../../functions/track.js';
19
- import RenderBlocks, { } from '../render-blocks.svelte';
20
- import RenderContentStyles, { } from './components/render-styles.svelte';
21
-
6
+ import { getDefaultRegisteredComponents } from '../../constants/builder-registered-components.js';
7
+ import { TARGET } from '../../constants/target.js';
8
+ import BuilderContext from '../../context/builder.context';
9
+ import { evaluate } from '../../functions/evaluate.js';
10
+ import { convertSearchParamsToQueryObject, getBuilderSearchParams } from '../../functions/get-builder-search-params/index.js';
11
+ import { getContent } from '../../functions/get-content/index.js';
12
+ import { getFetch } from '../../functions/get-fetch.js';
13
+ import { isBrowser } from '../../functions/is-browser.js';
14
+ import { isEditing } from '../../functions/is-editing.js';
15
+ import { isPreviewing } from '../../functions/is-previewing.js';
16
+ import { previewingModelName } from '../../functions/previewing-model-name.js';
17
+ import { components, createRegisterComponentMessage } from '../../functions/register-component.js';
18
+ import { track } from '../../functions/track.js';
19
+ import RenderBlocks from '../render-blocks.svelte';
20
+ import RenderContentStyles from './components/render-styles.svelte';
21
+
22
22
 
23
23
 
24
24
  import { getContext, setContext } from "svelte";
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- import { TARGET } from '../constants/target.js';
7
-
6
+ import { TARGET } from '../constants/target.js';
7
+
8
8
 
9
9
 
10
10
 
@@ -7,11 +7,13 @@ import { default as default7 } from "../blocks/button/button.svelte";
7
7
  import { default as default8 } from "../blocks/section/section.svelte";
8
8
  import { default as default9 } from "../blocks/fragment/fragment.svelte";
9
9
  import { default as default10 } from "../components/render-content/render-content.svelte";
10
+ import { default as default11 } from "../components/render-blocks.svelte";
10
11
  export {
11
12
  default7 as Button,
12
13
  default2 as Columns,
13
14
  default9 as Fragment,
14
15
  default3 as Image,
16
+ default11 as RenderBlocks,
15
17
  default10 as RenderContent,
16
18
  default8 as Section,
17
19
  default6 as Symbol,