@builder.io/sdk-vue 0.0.2-0 → 0.0.2-1

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.
Files changed (39) hide show
  1. package/package.json +4 -4
  2. package/packages/_vue2/dist/block-styles.4b780e2e.js +56 -0
  3. package/packages/_vue2/dist/block-styles.d7caff48.cjs +10 -0
  4. package/packages/_vue2/dist/get-processed-block.1b0392ce.js +57 -0
  5. package/packages/_vue2/dist/get-processed-block.a69f90d1.cjs +1 -0
  6. package/packages/_vue2/dist/index.35b10c2f.js +2081 -0
  7. package/packages/_vue2/dist/index.e881a81c.cjs +4 -0
  8. package/packages/_vue2/dist/render-block.3112f40b.js +237 -0
  9. package/packages/_vue2/dist/render-block.37a4bbe9.cjs +3 -0
  10. package/packages/_vue2/dist/render-component.3c148966.cjs +1 -0
  11. package/packages/_vue2/dist/render-component.7c5a2af0.js +38 -0
  12. package/packages/_vue2/dist/render-inlined-styles.c3478295.cjs +1 -0
  13. package/packages/_vue2/dist/render-inlined-styles.f67a4c7d.js +31 -0
  14. package/packages/_vue2/dist/render-repeated-block.006af118.js +50 -0
  15. package/packages/_vue2/dist/render-repeated-block.ea4adce6.cjs +1 -0
  16. package/packages/_vue2/dist/render-styles.90704267.js +70 -0
  17. package/packages/_vue2/dist/render-styles.e6d20f13.cjs +17 -0
  18. package/packages/_vue2/dist/sdk.cjs +1 -0
  19. package/packages/_vue2/dist/sdk.js +27 -0
  20. package/packages/_vue2/dist/style.css +1 -0
  21. package/packages/_vue3/dist/block-styles.13caf8d7.js +53 -0
  22. package/packages/_vue3/dist/block-styles.8cb7f734.cjs +10 -0
  23. package/packages/_vue3/dist/get-processed-block.15d39b53.cjs +1 -0
  24. package/packages/_vue3/dist/get-processed-block.bebdc794.js +57 -0
  25. package/packages/_vue3/dist/index.f58628dd.cjs +4 -0
  26. package/packages/_vue3/dist/index.fa54ce28.js +2054 -0
  27. package/packages/_vue3/dist/render-block.23c16bfb.cjs +3 -0
  28. package/packages/_vue3/dist/render-block.9c550b26.js +253 -0
  29. package/packages/_vue3/dist/render-component.9668419b.js +43 -0
  30. package/packages/_vue3/dist/render-component.c2e224cc.cjs +1 -0
  31. package/packages/_vue3/dist/render-inlined-styles.08569ffb.js +30 -0
  32. package/packages/_vue3/dist/render-inlined-styles.32f5f3bc.cjs +1 -0
  33. package/packages/_vue3/dist/render-repeated-block.73309b84.js +45 -0
  34. package/packages/_vue3/dist/render-repeated-block.8c10514d.cjs +1 -0
  35. package/packages/_vue3/dist/render-styles.22ddc0bf.cjs +17 -0
  36. package/packages/_vue3/dist/render-styles.63eb2def.js +64 -0
  37. package/packages/_vue3/dist/sdk.cjs +1 -0
  38. package/packages/_vue3/dist/sdk.js +28 -0
  39. package/packages/_vue3/dist/style.css +1 -0
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "workspaces": [
5
5
  "packages/*"
6
6
  ],
7
- "version": "0.0.2-0",
7
+ "version": "0.0.2-1",
8
8
  "dependencies": {
9
9
  "node-fetch": "^2.6.1"
10
10
  },
@@ -12,7 +12,8 @@
12
12
  "module": "./packages/_vue2/dist/sdk.js",
13
13
  "type": "module",
14
14
  "files": [
15
- "dist"
15
+ "packages/_vue2/dist",
16
+ "packages/_vue3/dist"
16
17
  ],
17
18
  "exports": {
18
19
  ".": {
@@ -37,10 +38,9 @@
37
38
  }
38
39
  },
39
40
  "scripts": {
40
- "clear-dist": "rm -rf dist && mkdir dist",
41
41
  "add-debug": "bash ./scripts/add-debug.sh",
42
42
  "remove-debug": "bash ./scripts/remove-debug.sh",
43
- "build": "yarn run clear-dist && yarn workspaces foreach run build",
43
+ "build": "yarn workspaces foreach run build",
44
44
  "release:patch": "yarn run build && npm version patch --no-git-tag-version && npm publish --access public",
45
45
  "release:dev": "yarn run build && npm version prerelease --no-git-tag-version && npm publish --tag dev --access public"
46
46
  },
@@ -0,0 +1,56 @@
1
+ import { g as l, a as r } from "./get-processed-block.1b0392ce.js";
2
+ import { T as c, n as i } from "./index.35b10c2f.js";
3
+ const a = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), o = (e) => Object.entries(e).map(([s, n]) => {
4
+ if (typeof n == "string")
5
+ return `${a(s)}: ${n};`;
6
+ }).join(`
7
+ `), d = () => import("./render-inlined-styles.f67a4c7d.js").then((e) => e.default).catch((e) => {
8
+ throw console.error(
9
+ "Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
10
+ e
11
+ ), e;
12
+ }), m = {
13
+ name: "block-styles",
14
+ components: { "render-inlined-styles": d },
15
+ props: ["block", "context"],
16
+ data: () => ({ TARGET: c }),
17
+ computed: {
18
+ useBlock() {
19
+ return l({
20
+ block: this.block,
21
+ state: this.context.state,
22
+ context: this.context.context,
23
+ shouldEvaluateBindings: !0
24
+ });
25
+ },
26
+ css() {
27
+ 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;
28
+ return `
29
+ ${t ? `.${this.useBlock.id} {${o(t)}}` : ""}
30
+ ${s ? `${r("medium")} {
31
+ .${this.useBlock.id} {${o(s)}}
32
+ }` : ""}
33
+ ${n ? `${r("small")} {
34
+ .${this.useBlock.id} {${o(n)}}
35
+ }` : ""}
36
+ }`;
37
+ }
38
+ }
39
+ };
40
+ var u = function() {
41
+ var t = this, s = t._self._c;
42
+ return t.TARGET === "vue2" || t.TARGET === "vue3" || t.TARGET === "svelte" || t.TARGET === "qwik" ? s("render-inlined-styles", { attrs: { styles: t.css } }) : t._e();
43
+ }, p = [], _ = /* @__PURE__ */ i(
44
+ m,
45
+ u,
46
+ p,
47
+ !1,
48
+ null,
49
+ null,
50
+ null,
51
+ null
52
+ );
53
+ const f = _.exports;
54
+ export {
55
+ f as default
56
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./get-processed-block.a69f90d1.cjs"),c=require("./index.e881a81c.cjs"),l=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),r=e=>Object.entries(e).map(([s,n])=>{if(typeof n=="string")return`${l(s)}: ${n};`}).join(`
2
+ `),i=()=>Promise.resolve().then(()=>require("./render-inlined-styles.c3478295.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),a={name:"block-styles",components:{"render-inlined-styles":i},props:["block","context"],data:()=>({TARGET:c.TARGET}),computed:{useBlock(){return o.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} {${r(t)}}`:""}
4
+ ${s?`${o.getMaxWidthQueryForSize("medium")} {
5
+ .${this.useBlock.id} {${r(s)}}
6
+ }`:""}
7
+ ${n?`${o.getMaxWidthQueryForSize("small")} {
8
+ .${this.useBlock.id} {${r(n)}}
9
+ }`:""}
10
+ }`}}};var d=function(){var t=this,s=t._self._c;return t.TARGET==="vue2"||t.TARGET==="vue3"||t.TARGET==="svelte"||t.TARGET==="qwik"?s("render-inlined-styles",{attrs:{styles:t.css}}):t._e()},u=[],m=c.normalizeComponent(a,d,u,!1,null,null,null,null);const p=m.exports;exports.default=p;
@@ -0,0 +1,57 @@
1
+ import { e as o } from "./index.35b10c2f.js";
2
+ const u = {
3
+ small: {
4
+ min: 320,
5
+ default: 321,
6
+ max: 640
7
+ },
8
+ medium: {
9
+ min: 641,
10
+ default: 642,
11
+ max: 991
12
+ },
13
+ large: {
14
+ min: 990,
15
+ default: 991,
16
+ max: 1200
17
+ }
18
+ }, f = (e) => `@media (max-width: ${u[e].max}px)`, m = (e, r, s) => {
19
+ if (Object(e) !== e)
20
+ return e;
21
+ const t = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g);
22
+ return t.slice(0, -1).reduce(
23
+ (n, i, a) => Object(n[i]) === n[i] ? n[i] : n[i] = Math.abs(Number(t[a + 1])) >> 0 === +t[a + 1] ? [] : {},
24
+ e
25
+ )[t[t.length - 1]] = s, e;
26
+ };
27
+ const c = ({
28
+ block: e,
29
+ context: r,
30
+ state: s
31
+ }) => {
32
+ if (!e.bindings)
33
+ return e;
34
+ const t = {
35
+ ...e,
36
+ properties: { ...e.properties },
37
+ actions: { ...e.actions }
38
+ };
39
+ for (const n in e.bindings) {
40
+ const i = e.bindings[n], a = o({ code: i, state: s, context: r });
41
+ m(t, n, a);
42
+ }
43
+ return t;
44
+ };
45
+ function g({
46
+ block: e,
47
+ context: r,
48
+ shouldEvaluateBindings: s,
49
+ state: t
50
+ }) {
51
+ const n = e;
52
+ return s ? c({ block: n, state: t, context: r }) : n;
53
+ }
54
+ export {
55
+ f as a,
56
+ g
57
+ };
@@ -0,0 +1 @@
1
+ "use strict";const c=require("./index.e881a81c.cjs"),o={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},u=e=>`@media (max-width: ${o[e].max}px)`,d=(e,r,s)=>{if(Object(e)!==e)return e;const t=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g);return t.slice(0,-1).reduce((n,i,a)=>Object(n[i])===n[i]?n[i]:n[i]=Math.abs(Number(t[a+1]))>>0===+t[a+1]?[]:{},e)[t[t.length-1]]=s,e};const m=({block:e,context:r,state:s})=>{if(!e.bindings)return e;const t={...e,properties:{...e.properties},actions:{...e.actions}};for(const n in e.bindings){const i=e.bindings[n],a=c.evaluate({code:i,state:s,context:r});d(t,n,a)}return t};function g({block:e,context:r,shouldEvaluateBindings:s,state:t}){const n=e;return s?m({block:n,state:t,context:r}):n}exports.getMaxWidthQueryForSize=u;exports.getProcessedBlock=g;