@builder.io/sdk-svelte 0.0.1-1 → 0.0.1-4
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/package.json +15 -4
- package/src/blocks/button/index.js +2 -2
- package/src/blocks/columns/index.js +2 -2
- package/src/blocks/custom-code/index.js +2 -2
- package/src/blocks/embed/index.js +2 -2
- package/src/blocks/form/form.svelte +1 -1
- package/src/blocks/form/index.js +2 -2
- package/src/blocks/fragment/index.js +2 -2
- package/src/blocks/image/index.js +2 -2
- package/src/blocks/img/img.svelte +1 -1
- package/src/blocks/img/index.js +2 -2
- package/src/blocks/input/index.js +2 -2
- package/src/blocks/input/input.svelte +1 -1
- package/src/blocks/raw-text/index.js +2 -2
- package/src/blocks/section/index.js +2 -2
- package/src/blocks/select/index.js +2 -2
- package/src/blocks/select/select.svelte +1 -1
- package/src/blocks/submit-button/index.js +2 -2
- package/src/blocks/symbol/index.js +2 -2
- package/src/blocks/symbol/symbol.svelte +1 -1
- package/src/blocks/text/index.js +2 -2
- package/src/blocks/textarea/index.js +2 -2
- package/src/blocks/video/index.js +2 -2
- package/src/components/render-block/render-block.svelte +8 -8
- package/src/components/render-blocks.svelte +1 -1
- package/src/components/render-content/render-content.svelte +10 -10
- package/src/components/render-inlined-styles.svelte +1 -1
- package/src/functions/evaluate.js +2 -2
- package/src/functions/get-block-actions.js +2 -2
- package/src/functions/get-block-styles.js +1 -1
- package/src/functions/get-content/fn.test.js +1 -1
- package/src/functions/get-content/index.js +1 -1
- package/src/functions/get-fetch.js +1 -1
- package/src/functions/get-processed-block.js +3 -3
- package/src/functions/get-processed-block.test.js +1 -1
- package/src/functions/if-target.js +1 -1
- package/src/functions/is-editing.js +1 -1
- package/src/functions/is-iframe.js +1 -1
- package/src/functions/is-previewing.js +2 -2
- package/src/functions/on-change.test.js +1 -1
- package/src/functions/previewing-model-name.js +1 -1
- package/src/functions/register-component.js +1 -1
- package/src/functions/register.js +1 -1
- package/src/functions/set-editor-settings.js +1 -1
- package/src/functions/set.test.js +1 -1
- package/src/functions/track.js +3 -3
- package/src/index-helpers/blocks-exports.js +8 -8
- package/src/index.js +10 -10
- package/src/scripts/init-editing.js +4 -4
package/package.json
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-svelte",
|
|
3
3
|
"description": "Builder.io SDK for Svelte",
|
|
4
|
-
"version": "0.0.1-
|
|
5
|
-
"
|
|
6
|
-
|
|
4
|
+
"version": "0.0.1-4",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"src"
|
|
8
|
+
],
|
|
9
|
+
"main": "./src/index.js",
|
|
10
|
+
"module": "./src/index.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./src/index.js",
|
|
14
|
+
"require": "./src/index.js"
|
|
15
|
+
}
|
|
7
16
|
},
|
|
8
|
-
"main": "src/index.js",
|
|
9
17
|
"scripts": {
|
|
10
18
|
"release:dev": "npm version prerelease --no-git-tag-version && npm publish --tag dev --access public"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"node-fetch": "^2.6.1"
|
|
11
22
|
}
|
|
12
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
2
|
import component from "./button.svelte";
|
|
3
|
-
import { componentInfo } from "./component-info";
|
|
3
|
+
import { componentInfo } from "./component-info.js";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
6
6
|
stdin_default as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
2
|
import component from "./columns.svelte";
|
|
3
|
-
import { componentInfo } from "./component-info";
|
|
3
|
+
import { componentInfo } from "./component-info.js";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
6
6
|
stdin_default as default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./custom-code.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./embed.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
package/src/blocks/form/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./form.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./fragment.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./image.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
package/src/blocks/img/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./img.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./input.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./raw-text.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./section.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./select.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./submit-button.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./symbol.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import RenderContent, { } from '../../components/render-content/render-content.svelte';
|
|
7
7
|
import BuilderContext, { } from '../../context/builder.context';
|
|
8
|
-
import { getContent } from '../../functions/get-content';
|
|
8
|
+
import { getContent } from '../../functions/get-content/index.js';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
package/src/blocks/text/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./text.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./textarea.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerComponent } from "../../functions/register-component";
|
|
2
|
-
import { componentInfo } from "./component-info";
|
|
1
|
+
import { registerComponent } from "../../functions/register-component.js";
|
|
2
|
+
import { componentInfo } from "./component-info.js";
|
|
3
3
|
import component from "./video.svelte";
|
|
4
4
|
var stdin_default = registerComponent(component, componentInfo);
|
|
5
5
|
export {
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
import { TARGET } from '../../constants/target';
|
|
6
|
+
import { TARGET } from '../../constants/target.js';
|
|
7
7
|
import BuilderContext, { } from '../../context/builder.context';
|
|
8
|
-
import { getBlockActions } from '../../functions/get-block-actions';
|
|
9
|
-
import { getBlockComponentOptions } from '../../functions/get-block-component-options';
|
|
10
|
-
import { getBlockProperties } from '../../functions/get-block-properties';
|
|
11
|
-
import { getBlockStyles } from '../../functions/get-block-styles';
|
|
12
|
-
import { getBlockTag } from '../../functions/get-block-tag';
|
|
13
|
-
import { getProcessedBlock } from '../../functions/get-processed-block';
|
|
14
|
-
import { components } from '../../functions/register-component';
|
|
8
|
+
import { getBlockActions } from '../../functions/get-block-actions.js';
|
|
9
|
+
import { getBlockComponentOptions } from '../../functions/get-block-component-options.js';
|
|
10
|
+
import { getBlockProperties } from '../../functions/get-block-properties.js';
|
|
11
|
+
import { getBlockStyles } from '../../functions/get-block-styles.js';
|
|
12
|
+
import { getBlockTag } from '../../functions/get-block-tag.js';
|
|
13
|
+
import { getProcessedBlock } from '../../functions/get-processed-block.js';
|
|
14
|
+
import { components } from '../../functions/register-component.js';
|
|
15
15
|
import BlockStyles, { } from './block-styles.svelte';
|
|
16
16
|
|
|
17
17
|
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import { afterUpdate } from 'svelte'
|
|
4
4
|
import { onDestroy } from 'svelte'
|
|
5
5
|
|
|
6
|
-
import { TARGET } from '../../constants/target';
|
|
6
|
+
import { TARGET } from '../../constants/target.js';
|
|
7
7
|
import BuilderContext, { } from '../../context/builder.context';
|
|
8
|
-
import { evaluate } from '../../functions/evaluate';
|
|
9
|
-
import { convertSearchParamsToQueryObject , getBuilderSearchParams } from '../../functions/get-builder-search-params';
|
|
10
|
-
import { getContent } from '../../functions/get-content';
|
|
11
|
-
import { getFetch } from '../../functions/get-fetch';
|
|
12
|
-
import { isBrowser } from '../../functions/is-browser';
|
|
13
|
-
import { isEditing } from '../../functions/is-editing';
|
|
14
|
-
import { isPreviewing } from '../../functions/is-previewing';
|
|
15
|
-
import { previewingModelName } from '../../functions/previewing-model-name';
|
|
16
|
-
import { track } from '../../functions/track';
|
|
8
|
+
import { evaluate } from '../../functions/evaluate.js';
|
|
9
|
+
import { convertSearchParamsToQueryObject , getBuilderSearchParams } from '../../functions/get-builder-search-params/index.js';
|
|
10
|
+
import { getContent } from '../../functions/get-content/index.js';
|
|
11
|
+
import { getFetch } from '../../functions/get-fetch.js';
|
|
12
|
+
import { isBrowser } from '../../functions/is-browser.js';
|
|
13
|
+
import { isEditing } from '../../functions/is-editing.js';
|
|
14
|
+
import { isPreviewing } from '../../functions/is-previewing.js';
|
|
15
|
+
import { previewingModelName } from '../../functions/previewing-model-name.js';
|
|
16
|
+
import { track } from '../../functions/track.js';
|
|
17
17
|
import RenderBlocks, { } from '../render-blocks.svelte';
|
|
18
18
|
import RenderContentStyles, { } from './components/render-styles.svelte';
|
|
19
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { evaluate } from "./evaluate";
|
|
2
|
-
import { getEventHandlerName } from "./event-handler-name";
|
|
1
|
+
import { evaluate } from "./evaluate.js";
|
|
2
|
+
import { getEventHandlerName } from "./event-handler-name.js";
|
|
3
3
|
function getBlockActions(options) {
|
|
4
4
|
var _a;
|
|
5
5
|
const obj = {};
|
|
@@ -14,7 +14,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { sizes } from "../constants/device-sizes";
|
|
17
|
+
import { sizes } from "../constants/device-sizes.js";
|
|
18
18
|
function getBlockStyles(block) {
|
|
19
19
|
var _a, _b, _c, _d, _e;
|
|
20
20
|
const styles = __spreadValues(__spreadValues({}, (_a = block.responsiveStyles) == null ? void 0 : _a.large), block.styles);
|
|
@@ -37,7 +37,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37
37
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
import { getFetch } from "../get-fetch";
|
|
40
|
+
import { getFetch } from "../get-fetch.js";
|
|
41
41
|
const fetch$ = getFetch();
|
|
42
42
|
function flatten(object, path = null, separator = ".") {
|
|
43
43
|
return Object.keys(object).reduce((acc, key) => {
|
|
@@ -18,7 +18,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
import { getGlobalThis } from "./get-global-this";
|
|
21
|
+
import { getGlobalThis } from "./get-global-this.js";
|
|
22
22
|
function getFetch() {
|
|
23
23
|
return __async(this, null, function* () {
|
|
24
24
|
const globalFetch = getGlobalThis().fetch;
|
|
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { evaluate } from "./evaluate";
|
|
21
|
-
import { set } from "./set";
|
|
22
|
-
import { transformBlock } from "./transform-block";
|
|
20
|
+
import { evaluate } from "./evaluate.js";
|
|
21
|
+
import { set } from "./set.js";
|
|
22
|
+
import { transformBlock } from "./transform-block.js";
|
|
23
23
|
function getProcessedBlock(options) {
|
|
24
24
|
const { state, context } = options;
|
|
25
25
|
const block = transformBlock(options.block);
|
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { isBrowser } from "./is-browser";
|
|
20
|
+
import { isBrowser } from "./is-browser.js";
|
|
21
21
|
const components = {};
|
|
22
22
|
function registerComponent(component, info) {
|
|
23
23
|
var _a;
|
package/src/functions/track.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TARGET } from "../constants/target";
|
|
2
|
-
import { isBrowser } from "./is-browser";
|
|
3
|
-
import { isEditing } from "./is-editing";
|
|
1
|
+
import { TARGET } from "../constants/target.js";
|
|
2
|
+
import { isBrowser } from "./is-browser.js";
|
|
3
|
+
import { isEditing } from "./is-editing.js";
|
|
4
4
|
function track(event, properties) {
|
|
5
5
|
if (isEditing()) {
|
|
6
6
|
return;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { default as default2 } from "../blocks/columns";
|
|
2
|
-
import { default as default3 } from "../blocks/image";
|
|
3
|
-
import { default as default4 } from "../blocks/text";
|
|
4
|
-
import { default as default5 } from "../blocks/video";
|
|
5
|
-
import { default as default6 } from "../blocks/symbol";
|
|
6
|
-
import { default as default7 } from "../blocks/button";
|
|
7
|
-
import { default as default8 } from "../blocks/section";
|
|
8
|
-
import { default as default9 } from "../blocks/fragment";
|
|
1
|
+
import { default as default2 } from "../blocks/columns/index.js";
|
|
2
|
+
import { default as default3 } from "../blocks/image/index.js";
|
|
3
|
+
import { default as default4 } from "../blocks/text/index.js";
|
|
4
|
+
import { default as default5 } from "../blocks/video/index.js";
|
|
5
|
+
import { default as default6 } from "../blocks/symbol/index.js";
|
|
6
|
+
import { default as default7 } from "../blocks/button/index.js";
|
|
7
|
+
import { default as default8 } from "../blocks/section/index.js";
|
|
8
|
+
import { default as default9 } from "../blocks/fragment/index.js";
|
|
9
9
|
import { default as default10 } from "../components/render-content/render-content.svelte";
|
|
10
10
|
export {
|
|
11
11
|
default7 as Button,
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./index-helpers/top-of-file";
|
|
2
|
-
import "./scripts/init-editing";
|
|
3
|
-
export * from "./index-helpers/blocks-exports";
|
|
4
|
-
export * from "./functions/is-editing";
|
|
5
|
-
export * from "./functions/is-previewing";
|
|
6
|
-
export * from "./functions/register-component";
|
|
7
|
-
export * from "./functions/register";
|
|
8
|
-
export * from "./functions/set-editor-settings";
|
|
9
|
-
export * from "./functions/get-content";
|
|
10
|
-
export * from "./functions/get-builder-search-params";
|
|
1
|
+
import "./index-helpers/top-of-file.js";
|
|
2
|
+
import "./scripts/init-editing.js";
|
|
3
|
+
export * from "./index-helpers/blocks-exports.js";
|
|
4
|
+
export * from "./functions/is-editing.js";
|
|
5
|
+
export * from "./functions/is-previewing.js";
|
|
6
|
+
export * from "./functions/register-component.js";
|
|
7
|
+
export * from "./functions/register.js";
|
|
8
|
+
export * from "./functions/set-editor-settings.js";
|
|
9
|
+
export * from "./functions/get-content/index.js";
|
|
10
|
+
export * from "./functions/get-builder-search-params/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TARGET } from "../constants/target";
|
|
2
|
-
import { isBrowser } from "../functions/is-browser";
|
|
3
|
-
import { isEditing } from "../functions/is-editing";
|
|
4
|
-
import { register } from "../functions/register";
|
|
1
|
+
import { TARGET } from "../constants/target.js";
|
|
2
|
+
import { isBrowser } from "../functions/is-browser.js";
|
|
3
|
+
import { isEditing } from "../functions/is-editing.js";
|
|
4
|
+
import { register } from "../functions/register.js";
|
|
5
5
|
const registerInsertMenu = () => {
|
|
6
6
|
register("insertMenu", {
|
|
7
7
|
name: "_default",
|