@builder.io/sdk-vue 0.11.1 → 0.11.3
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 +15 -12
- package/lib/browser/block-styles.4dd5487a.js +70 -0
- package/lib/browser/block-styles.6d4042d1.cjs +1 -0
- package/lib/{node/block-wrapper.f2c88f1b.js → browser/block-wrapper.56a0b862.js} +3 -3
- package/lib/browser/block-wrapper.d76c58a5.cjs +1 -0
- package/lib/browser/blocks/button/button.types.d.ts +6 -0
- package/lib/browser/blocks/button/button.vue.d.ts +0 -9
- package/lib/browser/blocks/columns/columns.types.d.ts +15 -0
- package/lib/browser/blocks/columns/columns.vue.d.ts +0 -14
- package/lib/browser/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/browser/blocks/fragment/fragment.vue.d.ts +0 -5
- package/lib/browser/blocks/image/image.types.d.ts +19 -0
- package/lib/browser/blocks/image/image.vue.d.ts +0 -19
- package/lib/browser/blocks/section/section.types.d.ts +6 -0
- package/lib/browser/blocks/section/section.vue.d.ts +0 -9
- package/lib/browser/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +0 -23
- package/lib/browser/blocks/text/text.types.d.ts +3 -0
- package/lib/browser/blocks/text/text.vue.d.ts +0 -3
- package/lib/browser/blocks/video/video.types.d.ts +21 -0
- package/lib/browser/blocks/video/video.vue.d.ts +0 -21
- package/lib/{node/component-ref.130474d3.js → browser/component-ref.6b764356.js} +38 -47
- package/lib/browser/component-ref.c01f28a8.cjs +1 -0
- package/lib/browser/components/blocks/blocks.types.d.ts +6 -0
- package/lib/browser/components/blocks/blocks.vue.d.ts +0 -6
- package/lib/browser/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/css.bee71b93.js +22 -0
- package/lib/browser/css.c905e549.cjs +6 -0
- package/lib/browser/functions/get-content/index.d.ts +1 -1
- package/lib/browser/functions/get-content/types.d.ts +2 -2
- package/lib/browser/get-block-actions.6c569f39.cjs +1 -0
- package/lib/{node/get-block-actions.3fb3fc2a.js → browser/get-block-actions.ea82379d.js} +11 -10
- package/lib/browser/{index.81d49325.js → index.cf8f3cf0.js} +686 -773
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.e420a426.cjs +156 -0
- package/lib/browser/index.js +8 -8
- package/lib/browser/repeated-block.0e1c5e05.cjs +1 -0
- package/lib/{edge/repeated-block.c411bac0.js → browser/repeated-block.a2b6e71d.js} +2 -2
- package/lib/browser/server-index.d.ts +10 -1
- package/lib/edge/block-styles.6941072a.cjs +1 -0
- package/lib/edge/block-styles.c251cc50.js +69 -0
- package/lib/{browser/block-wrapper.7f48d4fe.js → edge/block-wrapper.17244a32.js} +3 -3
- package/lib/edge/block-wrapper.a4b57a19.cjs +1 -0
- package/lib/edge/blocks/button/button.types.d.ts +6 -0
- package/lib/edge/blocks/button/button.vue.d.ts +0 -9
- package/lib/edge/blocks/columns/columns.types.d.ts +15 -0
- package/lib/edge/blocks/columns/columns.vue.d.ts +0 -14
- package/lib/edge/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/edge/blocks/fragment/fragment.vue.d.ts +0 -5
- package/lib/edge/blocks/image/image.types.d.ts +19 -0
- package/lib/edge/blocks/image/image.vue.d.ts +0 -19
- package/lib/edge/blocks/section/section.types.d.ts +6 -0
- package/lib/edge/blocks/section/section.vue.d.ts +0 -9
- package/lib/edge/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +0 -23
- package/lib/edge/blocks/text/text.types.d.ts +3 -0
- package/lib/edge/blocks/text/text.vue.d.ts +0 -3
- package/lib/edge/blocks/video/video.types.d.ts +21 -0
- package/lib/edge/blocks/video/video.vue.d.ts +0 -21
- package/lib/edge/{component-ref.d68927ae.js → component-ref.a9555536.js} +40 -49
- package/lib/edge/component-ref.c6ef9f36.cjs +1 -0
- package/lib/edge/components/blocks/blocks.types.d.ts +6 -0
- package/lib/edge/components/blocks/blocks.vue.d.ts +0 -6
- package/lib/edge/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/css.a1099f86.cjs +6 -0
- package/lib/edge/css.d3b9ec3d.js +21 -0
- package/lib/edge/functions/get-content/index.d.ts +1 -1
- package/lib/edge/functions/get-content/types.d.ts +2 -2
- package/lib/edge/get-block-actions.c862ea25.cjs +1 -0
- package/lib/{browser/get-block-actions.c6593feb.js → edge/get-block-actions.f0aac0c8.js} +4 -4
- package/lib/edge/{index.e790fe96.cjs → index.6014202a.cjs} +26 -31
- package/lib/edge/{index.382b8dbf.js → index.6b327d2e.js} +1228 -1316
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +25 -26
- package/lib/{node/repeated-block.2c78eba4.js → edge/repeated-block.2b8fbf14.js} +6 -8
- package/lib/edge/repeated-block.409149dc.cjs +1 -0
- package/lib/edge/server-index.d.ts +10 -1
- package/lib/node/block-styles.b4e350c6.js +70 -0
- package/lib/node/block-styles.daaf5082.cjs +1 -0
- package/lib/node/block-wrapper.35fb80b6.js +56 -0
- package/lib/node/block-wrapper.7ec7b19a.cjs +1 -0
- package/lib/node/blocks/button/button.types.d.ts +6 -0
- package/lib/node/blocks/button/button.vue.d.ts +0 -9
- package/lib/node/blocks/columns/columns.types.d.ts +15 -0
- package/lib/node/blocks/columns/columns.vue.d.ts +0 -14
- package/lib/node/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/node/blocks/fragment/fragment.vue.d.ts +0 -5
- package/lib/node/blocks/image/image.types.d.ts +19 -0
- package/lib/node/blocks/image/image.vue.d.ts +0 -19
- package/lib/node/blocks/section/section.types.d.ts +6 -0
- package/lib/node/blocks/section/section.vue.d.ts +0 -9
- package/lib/node/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/node/blocks/symbol/symbol.vue.d.ts +0 -23
- package/lib/node/blocks/text/text.types.d.ts +3 -0
- package/lib/node/blocks/text/text.vue.d.ts +0 -3
- package/lib/node/blocks/video/video.types.d.ts +21 -0
- package/lib/node/blocks/video/video.vue.d.ts +0 -21
- package/lib/node/component-ref.04b89158.cjs +1 -0
- package/lib/{browser/component-ref.882caae9.js → node/component-ref.2211624f.js} +41 -49
- package/lib/node/components/blocks/blocks.types.d.ts +6 -0
- package/lib/node/components/blocks/blocks.vue.d.ts +0 -6
- package/lib/node/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/css.92fd0ea1.cjs +6 -0
- package/lib/node/css.9a474d8f.js +21 -0
- package/lib/node/functions/get-content/index.d.ts +1 -1
- package/lib/node/functions/get-content/types.d.ts +2 -2
- package/lib/node/get-block-actions.b15d24e5.cjs +1 -0
- package/lib/{edge/get-block-actions.4fc76296.js → node/get-block-actions.f7b1ef76.js} +4 -4
- package/lib/node/{index.cc3260e1.js → index.29fcda33.js} +278 -366
- package/lib/node/{index.356c6953.cjs → index.c9e2c835.cjs} +6 -11
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +24 -25
- package/lib/{edge/repeated-block.ffceb5bb.cjs → node/repeated-block.bf2609f9.cjs} +1 -1
- package/lib/{browser/repeated-block.cca0a723.js → node/repeated-block.f9ea4988.js} +3 -3
- package/lib/node/server-index.d.ts +10 -1
- package/nuxt.js +10 -0
- package/package.json +57 -2
- package/lib/browser/block-wrapper.24616a36.cjs +0 -1
- package/lib/browser/component-ref.6a1f9724.cjs +0 -1
- package/lib/browser/get-block-actions.db148a56.cjs +0 -1
- package/lib/browser/index.aa209acd.cjs +0 -161
- package/lib/browser/repeated-block.83d2cfa3.cjs +0 -1
- package/lib/edge/block-wrapper.3c4203ff.cjs +0 -1
- package/lib/edge/block-wrapper.f4a95bbc.js +0 -55
- package/lib/edge/component-ref.27cab64c.cjs +0 -1
- package/lib/edge/get-block-actions.c7759664.cjs +0 -1
- package/lib/node/block-wrapper.1d4009cf.cjs +0 -1
- package/lib/node/component-ref.065ff556.cjs +0 -1
- package/lib/node/get-block-actions.ca43c4fe.cjs +0 -1
- package/lib/node/repeated-block.4c468fb3.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
2
|
import type { GetContentOptions } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Returns
|
|
4
|
+
* Returns the first content entry that matches the given options.
|
|
5
5
|
*/
|
|
6
6
|
export declare function fetchOneEntry(options: GetContentOptions): Promise<BuilderContent | null>;
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface GetContentOptions {
|
|
2
|
-
/** The model to get content for */
|
|
2
|
+
/** The model to get content for (required) */
|
|
3
3
|
model: string;
|
|
4
|
-
/** Your public API key */
|
|
4
|
+
/** Your public API key (required) */
|
|
5
5
|
apiKey: string;
|
|
6
6
|
/** Number of items to fetch. Default is 1 */
|
|
7
7
|
limit?: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var y=require("./style.css");const n=require("./index.e420a426.cjs"),i=require("./css.c905e549.cjs");function l(e){const t={};if(typeof e!="string")return t;const r=e.trim().split(/\\s+/);for(const s of r)t[s]=!0;return t}function u({properties:e}){return e.class=l(e.class),e}const f=e=>({href:e.href});function v({block:e,context:t}){var s;const r={...f(e),...e.properties,"builder-id":e.id,style:e.style?d(e.style):void 0,class:[e.id,"builder-block",e.class,(s=e.properties)==null?void 0:s.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}function d(e){switch(n.TARGET){case"svelte":case"vue":case"solid":return i.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const S=e=>`v-on:${e.toLowerCase()}`,p=(e,t)=>r=>n.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function g(e){var s;const t={},r=(s=e.block.actions)!=null?s:{};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=r[o];let c=S(o);if(e.stripPrefix)switch(n.TARGET){case"vue":c=c.replace("v-on:","");break;case"svelte":c=c.replace("on:","");break}t[c]=p(a,e)}return t}exports.getBlockActions=g;exports.getBlockProperties=v;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { T as n,
|
|
2
|
+
import { T as n, e as i } from "./index.cf8f3cf0.js";
|
|
3
|
+
import { a as l } from "./css.bee71b93.js";
|
|
3
4
|
function u(e) {
|
|
4
5
|
const t = {};
|
|
5
6
|
if (typeof e != "string")
|
|
@@ -17,7 +18,7 @@ function f({
|
|
|
17
18
|
const v = (e) => ({
|
|
18
19
|
href: e.href
|
|
19
20
|
});
|
|
20
|
-
function
|
|
21
|
+
function x({
|
|
21
22
|
block: e,
|
|
22
23
|
context: t
|
|
23
24
|
}) {
|
|
@@ -26,7 +27,7 @@ function g({
|
|
|
26
27
|
...v(e),
|
|
27
28
|
...e.properties,
|
|
28
29
|
"builder-id": e.id,
|
|
29
|
-
style: e.style ?
|
|
30
|
+
style: e.style ? p(e.style) : void 0,
|
|
30
31
|
class: [e.id, "builder-block", e.class, (s = e.properties) == null ? void 0 : s.class].filter(Boolean).join(" ")
|
|
31
32
|
};
|
|
32
33
|
return f({
|
|
@@ -35,12 +36,12 @@ function g({
|
|
|
35
36
|
block: e
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function p(e) {
|
|
39
40
|
switch (n) {
|
|
40
41
|
case "svelte":
|
|
41
42
|
case "vue":
|
|
42
43
|
case "solid":
|
|
43
|
-
return
|
|
44
|
+
return l(e).join(" ");
|
|
44
45
|
case "qwik":
|
|
45
46
|
case "reactNative":
|
|
46
47
|
case "react":
|
|
@@ -48,7 +49,7 @@ function S(e) {
|
|
|
48
49
|
return e;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
const
|
|
52
|
+
const S = (e) => `v-on:${e.toLowerCase()}`, d = (e, t) => (r) => i({
|
|
52
53
|
code: e,
|
|
53
54
|
context: t.context,
|
|
54
55
|
localState: t.localState,
|
|
@@ -57,14 +58,14 @@ const p = (e) => `v-on:${e.toLowerCase()}`, d = (e, t) => (r) => l({
|
|
|
57
58
|
event: r,
|
|
58
59
|
isExpression: !1
|
|
59
60
|
});
|
|
60
|
-
function
|
|
61
|
+
function h(e) {
|
|
61
62
|
var s;
|
|
62
63
|
const t = {}, r = (s = e.block.actions) != null ? s : {};
|
|
63
64
|
for (const o in r) {
|
|
64
65
|
if (!r.hasOwnProperty(o))
|
|
65
66
|
continue;
|
|
66
67
|
const c = r[o];
|
|
67
|
-
let a =
|
|
68
|
+
let a = S(o);
|
|
68
69
|
if (e.stripPrefix)
|
|
69
70
|
switch (n) {
|
|
70
71
|
case "vue":
|
|
@@ -79,6 +80,6 @@ function x(e) {
|
|
|
79
80
|
return t;
|
|
80
81
|
}
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
x as a,
|
|
84
|
+
h as g
|
|
84
85
|
};
|