@builder.io/sdk-vue 0.0.1 โ 0.0.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.
- package/package.json +15 -11
- package/CHANGELOG.md +0 -53
- package/dist/vue-2/block-styles.3f130795.js +0 -67
- package/dist/vue-2/block-styles.da610cf5.cjs +0 -10
- package/dist/vue-2/get-processed-block.2bcd0d2b.cjs +0 -1
- package/dist/vue-2/get-processed-block.c01e4ddc.js +0 -44
- package/dist/vue-2/index.0622ae10.js +0 -1996
- package/dist/vue-2/index.dcdf302c.cjs +0 -4
- package/dist/vue-2/render-block.bdaa8069.js +0 -243
- package/dist/vue-2/render-block.f41ce0b2.cjs +0 -3
- package/dist/vue-2/render-inlined-styles.7974da9f.js +0 -31
- package/dist/vue-2/render-inlined-styles.b3a06398.cjs +0 -1
- package/dist/vue-2/render-repeated-block.c2b982e3.js +0 -45
- package/dist/vue-2/render-repeated-block.f36a831f.cjs +0 -1
- package/dist/vue-2/render-styles.354823a4.js +0 -65
- package/dist/vue-2/render-styles.4b5b2368.cjs +0 -17
- package/dist/vue-2/sdk.cjs +0 -1
- package/dist/vue-2/sdk.js +0 -27
- package/dist/vue-2/style.css +0 -1
- package/dist/vue-3/block-styles.76754b24.js +0 -64
- package/dist/vue-3/block-styles.e17850cc.cjs +0 -10
- package/dist/vue-3/get-processed-block.2dd25223.cjs +0 -1
- package/dist/vue-3/get-processed-block.6eaca128.js +0 -44
- package/dist/vue-3/index.3e132178.js +0 -78896
- package/dist/vue-3/index.475f52c7.cjs +0 -1
- package/dist/vue-3/index.52915610.js +0 -1969
- package/dist/vue-3/index.91387fc2.cjs +0 -4
- package/dist/vue-3/render-block.369b7818.js +0 -255
- package/dist/vue-3/render-block.c9718d52.cjs +0 -3
- package/dist/vue-3/render-inlined-styles.2a3eeef4.cjs +0 -1
- package/dist/vue-3/render-inlined-styles.af201a11.js +0 -30
- package/dist/vue-3/render-repeated-block.4266e559.js +0 -40
- package/dist/vue-3/render-repeated-block.b4a6d591.cjs +0 -1
- package/dist/vue-3/render-styles.1744d2eb.js +0 -59
- package/dist/vue-3/render-styles.7d5898dd.cjs +0 -17
- package/dist/vue-3/sdk.cjs +0 -1
- package/dist/vue-3/sdk.js +0 -28
- package/dist/vue-3/style.css +0 -1
- package/nuxt.js +0 -25
package/package.json
CHANGED
|
@@ -2,28 +2,30 @@
|
|
|
2
2
|
"name": "@builder.io/sdk-vue",
|
|
3
3
|
"description": "Builder.io SDK for Vue",
|
|
4
4
|
"workspaces": [
|
|
5
|
-
"
|
|
6
|
-
"vue3"
|
|
5
|
+
"packages/*"
|
|
7
6
|
],
|
|
8
|
-
"version": "0.0.
|
|
7
|
+
"version": "0.0.2-0",
|
|
9
8
|
"dependencies": {
|
|
10
9
|
"node-fetch": "^2.6.1"
|
|
11
10
|
},
|
|
12
|
-
"main": "./dist/
|
|
13
|
-
"module": "./dist/
|
|
11
|
+
"main": "./packages/_vue2/dist/sdk.js",
|
|
12
|
+
"module": "./packages/_vue2/dist/sdk.js",
|
|
14
13
|
"type": "module",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
15
17
|
"exports": {
|
|
16
18
|
".": {
|
|
17
|
-
"import": "./dist/
|
|
18
|
-
"require": "./dist/
|
|
19
|
+
"import": "./packages/_vue2/dist/sdk.js",
|
|
20
|
+
"require": "./packages/_vue2/dist/sdk.cjs"
|
|
19
21
|
},
|
|
20
22
|
"./vue2": {
|
|
21
|
-
"import": "./dist/
|
|
22
|
-
"require": "./dist/
|
|
23
|
+
"import": "./packages/_vue2/dist/sdk.js",
|
|
24
|
+
"require": "./packages/_vue2/dist/sdk.cjs"
|
|
23
25
|
},
|
|
24
26
|
"./vue3": {
|
|
25
|
-
"import": "./dist/
|
|
26
|
-
"require": "./dist/
|
|
27
|
+
"import": "./packages/_vue3/dist/sdk.js",
|
|
28
|
+
"require": "./packages/_vue3/dist/sdk.cjs"
|
|
27
29
|
},
|
|
28
30
|
"./nuxt": {
|
|
29
31
|
"import": "./nuxt.js",
|
|
@@ -36,6 +38,8 @@
|
|
|
36
38
|
},
|
|
37
39
|
"scripts": {
|
|
38
40
|
"clear-dist": "rm -rf dist && mkdir dist",
|
|
41
|
+
"add-debug": "bash ./scripts/add-debug.sh",
|
|
42
|
+
"remove-debug": "bash ./scripts/remove-debug.sh",
|
|
39
43
|
"build": "yarn run clear-dist && yarn workspaces foreach run build",
|
|
40
44
|
"release:patch": "yarn run build && npm version patch --no-git-tag-version && npm publish --access public",
|
|
41
45
|
"release:dev": "yarn run build && npm version prerelease --no-git-tag-version && npm publish --tag dev --access public"
|
package/CHANGELOG.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
### 0.0.1-56
|
|
2
|
-
|
|
3
|
-
- Feature: We now provide initial support for Vue 3.
|
|
4
|
-
|
|
5
|
-
๐งจ Breaking change: you must now explicitly import the Vue SDK version that you want (for Vue 2 or Vue 3) e.g.
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
// imports Vue 2 SDK
|
|
9
|
-
import * as BuilderSDK from '@builder.io/sdk-vue/vue2';
|
|
10
|
-
// fallback to Vue 2 SDK
|
|
11
|
-
import * as BuilderSDK from '@builder.io/sdk-vue';
|
|
12
|
-
|
|
13
|
-
// imports Vue 3 SDK
|
|
14
|
-
import * as BuilderSDK from '@builder.io/sdk-vue/vue3';
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### 0.0.1-54
|
|
18
|
-
|
|
19
|
-
๐ Fix: custom components were not rendering correctly
|
|
20
|
-
๐ Fix: Image component's `srcSet` was not being set correctly
|
|
21
|
-
|
|
22
|
-
### 0.0.1-52
|
|
23
|
-
|
|
24
|
-
๐งจ Breaking change: the format of the `customComponents` prop has changed from `[{ component, info }]` to `[{ component, ...info }]`.
|
|
25
|
-
See [builder-registered-components.ts](/packages/sdks/src/constants/builder-registered-components.ts) for examples of how to do so, or see the example provided for this SDK.
|
|
26
|
-
|
|
27
|
-
### 0.0.1-51
|
|
28
|
-
|
|
29
|
-
โ ๏ธ Deprecation notice: Registering components via `registerComponent(component, info)` is now deprecated.
|
|
30
|
-
To register your custom components in Builder, you must now provide a `customComponents` array to the `RenderContent` component containing `[{ component, info }]`.
|
|
31
|
-
See [builder-registered-components.ts](/packages/sdks/src/constants/builder-registered-components.ts) for examples of how to do so, or see the example provided for this SDK.
|
|
32
|
-
|
|
33
|
-
### 0.0.1-50
|
|
34
|
-
|
|
35
|
-
- feat: ๐ธ export `isPreviewing()` (https://github.com/BuilderIO/builder/pull/951)
|
|
36
|
-
- feat: ๐ธ Add support for Symbols (https://github.com/BuilderIO/builder/pull/951)
|
|
37
|
-
- feat: ๐ธ Add support for Data Bindings https://github.com/BuilderIO/builder/pull/970
|
|
38
|
-
|
|
39
|
-
- BREAKING CHANGE: ๐งจ RenderContent must now be provided the `apiKey` as a prop (https://github.com/BuilderIO/builder/pull/951)
|
|
40
|
-
|
|
41
|
-
### 0.0.1-49
|
|
42
|
-
|
|
43
|
-
- Fix: show the "+ add block" button on empty pages https://github.com/BuilderIO/builder/pull/934
|
|
44
|
-
- Add `getBuilderSearchParams` helper export to easily view current drafts on your production site. https://github.com/BuilderIO/builder/pull/883
|
|
45
|
-
|
|
46
|
-
### 0.0.1-48
|
|
47
|
-
|
|
48
|
-
Changes:
|
|
49
|
-
|
|
50
|
-
- Adds support for Columns https://github.com/BuilderIO/builder/pull/717
|
|
51
|
-
- Add preliminary support for Children within custom components https://github.com/BuilderIO/builder/pull/753
|
|
52
|
-
- Seeds classnames to reduce variation in changes https://github.com/BuilderIO/builder/pull/703
|
|
53
|
-
- Fixes `getAllContent` to traverse all symbols/references https://github.com/BuilderIO/builder/pull/718
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { n as r, T as c } from "./index.0622ae10.js";
|
|
2
|
-
import { g as a } from "./get-processed-block.c01e4ddc.js";
|
|
3
|
-
const i = {
|
|
4
|
-
small: {
|
|
5
|
-
min: 320,
|
|
6
|
-
default: 321,
|
|
7
|
-
max: 640
|
|
8
|
-
},
|
|
9
|
-
medium: {
|
|
10
|
-
min: 641,
|
|
11
|
-
default: 642,
|
|
12
|
-
max: 991
|
|
13
|
-
},
|
|
14
|
-
large: {
|
|
15
|
-
min: 990,
|
|
16
|
-
default: 991,
|
|
17
|
-
max: 1200
|
|
18
|
-
}
|
|
19
|
-
}, l = (e) => `@media (max-width: ${i[e].max}px)`, m = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), o = (e) => Object.entries(e).map(([s, n]) => {
|
|
20
|
-
if (typeof n == "string")
|
|
21
|
-
return `${m(s)}: ${n};`;
|
|
22
|
-
}).join(`
|
|
23
|
-
`), u = () => import("./render-inlined-styles.7974da9f.js").then((e) => e.default), d = {
|
|
24
|
-
name: "block-styles",
|
|
25
|
-
components: { "render-inlined-styles": u },
|
|
26
|
-
props: ["block", "context"],
|
|
27
|
-
data: () => ({ TARGET: c }),
|
|
28
|
-
computed: {
|
|
29
|
-
useBlock() {
|
|
30
|
-
return a({
|
|
31
|
-
block: this.block,
|
|
32
|
-
state: this.context.state,
|
|
33
|
-
context: this.context.context,
|
|
34
|
-
shouldEvaluateBindings: !0
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
css() {
|
|
38
|
-
const e = this.useBlock.responsiveStyles, t = e == null ? void 0 : e.large, s = e == null ? void 0 : e.medium, n = e == null ? void 0 : e.small;
|
|
39
|
-
return `
|
|
40
|
-
${t ? `.${this.useBlock.id} {${o(t)}}` : ""}
|
|
41
|
-
${s ? `${l("medium")} {
|
|
42
|
-
.${this.useBlock.id} {${o(s)}}
|
|
43
|
-
}` : ""}
|
|
44
|
-
${n ? `${l("small")} {
|
|
45
|
-
.${this.useBlock.id} {${o(n)}}
|
|
46
|
-
}` : ""}
|
|
47
|
-
}`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
var p = function() {
|
|
52
|
-
var t = this, s = t._self._c;
|
|
53
|
-
return t.TARGET === "vue2" || t.TARGET === "vue3" || t.TARGET === "svelte" ? s("render-inlined-styles", { attrs: { styles: t.css } }) : t._e();
|
|
54
|
-
}, $ = [], f = /* @__PURE__ */ r(
|
|
55
|
-
d,
|
|
56
|
-
p,
|
|
57
|
-
$,
|
|
58
|
-
!1,
|
|
59
|
-
null,
|
|
60
|
-
null,
|
|
61
|
-
null,
|
|
62
|
-
null
|
|
63
|
-
);
|
|
64
|
-
const h = f.exports;
|
|
65
|
-
export {
|
|
66
|
-
h as default
|
|
67
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index.dcdf302c.cjs"),r=require("./get-processed-block.2bcd0d2b.cjs"),i={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},c=e=>`@media (max-width: ${i[e].max}px)`,a=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),o=e=>Object.entries(e).map(([s,n])=>{if(typeof n=="string")return`${a(s)}: ${n};`}).join(`
|
|
2
|
-
`),d=()=>Promise.resolve().then(()=>require("./render-inlined-styles.b3a06398.cjs")).then(e=>e.default),u={name:"block-styles",components:{"render-inlined-styles":d},props:["block","context"],data:()=>({TARGET:l.TARGET}),computed:{useBlock(){return r.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},css(){const e=this.useBlock.responsiveStyles,t=e==null?void 0:e.large,s=e==null?void 0:e.medium,n=e==null?void 0:e.small;return`
|
|
3
|
-
${t?`.${this.useBlock.id} {${o(t)}}`:""}
|
|
4
|
-
${s?`${c("medium")} {
|
|
5
|
-
.${this.useBlock.id} {${o(s)}}
|
|
6
|
-
}`:""}
|
|
7
|
-
${n?`${c("small")} {
|
|
8
|
-
.${this.useBlock.id} {${o(n)}}
|
|
9
|
-
}`:""}
|
|
10
|
-
}`}}};var m=function(){var t=this,s=t._self._c;return t.TARGET==="vue2"||t.TARGET==="vue3"||t.TARGET==="svelte"?s("render-inlined-styles",{attrs:{styles:t.css}}):t._e()},p=[],$=l.normalizeComponent(u,m,p,!1,null,null,null,null);const f=$.exports;exports.default=f;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("./index.dcdf302c.cjs"),d=(r,e,t)=>{if(Object(r)!==r)return r;const n=Array.isArray(e)?e:e.toString().match(/[^.[\]]+/g);return n.slice(0,-1).reduce((s,o,i)=>Object(s[o])===s[o]?s[o]:s[o]=Math.abs(Number(n[i+1]))>>0===+n[i+1]?[]:{},r)[n[n.length-1]]=t,r};var f=Object.defineProperty,l=Object.defineProperties,_=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,p=(r,e,t)=>e in r?f(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,c=(r,e)=>{for(var t in e||(e={}))g.call(e,t)&&p(r,t,e[t]);if(a)for(var t of a(e))O.call(e,t)&&p(r,t,e[t]);return r},P=(r,e)=>l(r,_(e));const v=({block:r,context:e,state:t})=>{if(!r.bindings)return r;const n=P(c({},r),{properties:c({},r.properties),actions:c({},r.actions)});for(const s in r.bindings){const o=r.bindings[s],i=u.evaluate({code:o,state:t,context:e});d(n,s,i)}return n};function m({block:r,context:e,shouldEvaluateBindings:t,state:n}){const s=r;return t?v({block:s,state:n,context:e}):s}exports.getProcessedBlock=m;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { e as u } from "./index.0622ae10.js";
|
|
2
|
-
const f = (r, e, t) => {
|
|
3
|
-
if (Object(r) !== r)
|
|
4
|
-
return r;
|
|
5
|
-
const n = Array.isArray(e) ? e : e.toString().match(/[^.[\]]+/g);
|
|
6
|
-
return n.slice(0, -1).reduce((s, o, i) => Object(s[o]) === s[o] ? s[o] : s[o] = Math.abs(Number(n[i + 1])) >> 0 === +n[i + 1] ? [] : {}, r)[n[n.length - 1]] = t, r;
|
|
7
|
-
};
|
|
8
|
-
var d = Object.defineProperty, _ = Object.defineProperties, g = Object.getOwnPropertyDescriptors, p = Object.getOwnPropertySymbols, l = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable, c = (r, e, t) => e in r ? d(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, a = (r, e) => {
|
|
9
|
-
for (var t in e || (e = {}))
|
|
10
|
-
l.call(e, t) && c(r, t, e[t]);
|
|
11
|
-
if (p)
|
|
12
|
-
for (var t of p(e))
|
|
13
|
-
O.call(e, t) && c(r, t, e[t]);
|
|
14
|
-
return r;
|
|
15
|
-
}, v = (r, e) => _(r, g(e));
|
|
16
|
-
const P = ({
|
|
17
|
-
block: r,
|
|
18
|
-
context: e,
|
|
19
|
-
state: t
|
|
20
|
-
}) => {
|
|
21
|
-
if (!r.bindings)
|
|
22
|
-
return r;
|
|
23
|
-
const n = v(a({}, r), {
|
|
24
|
-
properties: a({}, r.properties),
|
|
25
|
-
actions: a({}, r.actions)
|
|
26
|
-
});
|
|
27
|
-
for (const s in r.bindings) {
|
|
28
|
-
const o = r.bindings[s], i = u({ code: o, state: t, context: e });
|
|
29
|
-
f(n, s, i);
|
|
30
|
-
}
|
|
31
|
-
return n;
|
|
32
|
-
};
|
|
33
|
-
function y({
|
|
34
|
-
block: r,
|
|
35
|
-
context: e,
|
|
36
|
-
shouldEvaluateBindings: t,
|
|
37
|
-
state: n
|
|
38
|
-
}) {
|
|
39
|
-
const s = r;
|
|
40
|
-
return t ? P({ block: s, state: n, context: e }) : s;
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
y as g
|
|
44
|
-
};
|