@builder.io/sdk-vue 1.0.20 → 1.0.22
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/lib/browser/block-styles-VImRioSm.js +87 -0
- package/lib/browser/block-styles-WIrvoyUF.cjs +1 -0
- package/lib/browser/{block-wrapper-mUYhrZYL.js → block-wrapper--ZG8uXgi.js} +3 -3
- package/lib/browser/{block-wrapper-7jEUErnD.cjs → block-wrapper-PG29yePT.cjs} +1 -1
- package/lib/browser/{component-ref-pY_JzaE9.js → component-ref-AbXXG_wD.js} +2 -2
- package/lib/browser/{component-ref-cnJXcopK.cjs → component-ref-Oh6emZ2D.cjs} +1 -1
- package/lib/browser/components/block/animator.d.ts +1 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/evaluate/node-runtime/init.d.ts +10 -0
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +6 -0
- package/lib/browser/functions/get-content/types.d.ts +139 -0
- package/lib/browser/functions/is-previewing.d.ts +1 -1
- package/lib/browser/{get-block-properties-DdFv1Dpy.cjs → get-block-properties-iG0EdCc7.cjs} +1 -1
- package/lib/browser/{get-block-properties-L3LkEv9O.js → get-block-properties-jSTzat9q.js} +6 -6
- package/lib/browser/helpers/logger.d.ts +1 -0
- package/lib/browser/{index-PUvnbz_d.cjs → index-3lFzntkG.cjs} +19 -19
- package/lib/browser/{index-HNoYiB0Y.js → index-_VfPZEOT.js} +401 -424
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +3 -3
- package/lib/browser/{repeated-block-TTrWA7vt.cjs → repeated-block-GitdVuPz.cjs} +1 -1
- package/lib/browser/{repeated-block-UXKcZAEd.js → repeated-block-LywEnyR6.js} +2 -2
- package/lib/edge/block-styles-ZxWEJSxb.js +86 -0
- package/lib/edge/block-styles-eJqBAPHH.cjs +1 -0
- package/lib/{node/block-wrapper-0JSFFSq8.cjs → edge/block-wrapper-2Crn7tbG.cjs} +1 -1
- package/lib/edge/{block-wrapper-tCVyzPQa.js → block-wrapper-E58yJMa2.js} +3 -3
- package/lib/{node/component-ref-ZXwoV9mW.cjs → edge/component-ref-4M72dsyI.cjs} +1 -1
- package/lib/{node/component-ref-UMw1_m4l.js → edge/component-ref-lMVExvau.js} +2 -2
- package/lib/edge/components/block/animator.d.ts +1 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/evaluate/node-runtime/init.d.ts +10 -0
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +6 -0
- package/lib/edge/functions/get-content/types.d.ts +139 -0
- package/lib/edge/functions/is-previewing.d.ts +1 -1
- package/lib/{node/get-block-properties-QyVkMg_E.js → edge/get-block-properties-RLx998wH.js} +4 -4
- package/lib/edge/{get-block-properties-92j4bSTt.cjs → get-block-properties-ozEWpZlZ.cjs} +1 -1
- package/lib/edge/helpers/logger.d.ts +1 -0
- package/lib/edge/{index-r6ecFwxx.js → index-53gkK1JA.js} +641 -664
- package/lib/edge/{index-1xe9jFQi.cjs → index-nVP8G4zp.cjs} +26 -26
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +4 -4
- package/lib/edge/{repeated-block-h1uxL2QS.cjs → repeated-block-_7bmUv-Z.cjs} +1 -1
- package/lib/edge/{repeated-block-tHlmcShN.js → repeated-block-kei-SmhT.js} +13 -13
- package/lib/node/block-styles-_OMTv9sJ.js +86 -0
- package/lib/node/block-styles-cJg0zG2x.cjs +1 -0
- package/lib/node/{block-wrapper-DaZ4mIlX.js → block-wrapper-WFhgV7rM.js} +3 -3
- package/lib/{edge/block-wrapper-tMchV8Ed.cjs → node/block-wrapper-olhoZ1Gm.cjs} +1 -1
- package/lib/{edge/component-ref-xS-36BFD.js → node/component-ref-CnP6F8zd.js} +2 -2
- package/lib/{edge/component-ref-6kXahKbj.cjs → node/component-ref-Wy04EyRy.cjs} +1 -1
- package/lib/node/components/block/animator.d.ts +1 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/evaluate/node-runtime/init.d.ts +10 -0
- package/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +6 -0
- package/lib/node/functions/get-content/types.d.ts +139 -0
- package/lib/node/functions/is-previewing.d.ts +1 -1
- package/lib/{edge/get-block-properties-wwUqgoY1.js → node/get-block-properties-3AHBPypn.js} +4 -4
- package/lib/node/{get-block-properties-oIIGvsOK.cjs → get-block-properties-azp9C2XD.cjs} +1 -1
- package/lib/node/helpers/logger.d.ts +1 -0
- package/lib/node/{index-DZC2NODY.js → index-eF57HLR1.js} +56 -61
- package/lib/node/{index-UPy9JYpO.cjs → index-my4sBiPM.cjs} +12 -5
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +4 -4
- package/lib/node/{repeated-block-0xbl-nXX.cjs → repeated-block-AtgGXQbg.cjs} +1 -1
- package/lib/node/{repeated-block-b2kLuK6t.js → repeated-block-uRrCR8KR.js} +13 -13
- package/package.json +1 -1
- package/lib/browser/block-styles-d4tM_Pbm.cjs +0 -1
- package/lib/browser/block-styles-gV1j-Mno.js +0 -70
- package/lib/edge/block-styles-7ZVVl2UI.js +0 -69
- package/lib/edge/block-styles-CFbRginC.cjs +0 -1
- package/lib/node/block-styles-WQaU9sgN.cjs +0 -1
- package/lib/node/block-styles-nh4wTQ1n.js +0 -69
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { defineComponent as g, resolveComponent as B, openBlock as C, createBlock as v, createCommentVNode as _ } from "vue";
|
|
3
|
+
import { _ as $, T, g as p, c as y, a as w, b as l, d as k, e as E, f as N } from "./index-_VfPZEOT.js";
|
|
4
|
+
const z = g({
|
|
5
|
+
name: "block-styles",
|
|
6
|
+
components: { InlinedStyles: $ },
|
|
7
|
+
props: ["block", "context"],
|
|
8
|
+
data() {
|
|
9
|
+
return { TARGET: T };
|
|
10
|
+
},
|
|
11
|
+
computed: {
|
|
12
|
+
canShowBlock() {
|
|
13
|
+
const t = p({
|
|
14
|
+
block: this.block,
|
|
15
|
+
localState: this.context.localState,
|
|
16
|
+
rootState: this.context.rootState,
|
|
17
|
+
rootSetState: this.context.rootSetState,
|
|
18
|
+
context: this.context.context,
|
|
19
|
+
shouldEvaluateBindings: !0
|
|
20
|
+
});
|
|
21
|
+
return y(t.hide) ? !t.hide : y(t.show) ? t.show : !0;
|
|
22
|
+
},
|
|
23
|
+
css() {
|
|
24
|
+
var S, u, h;
|
|
25
|
+
const t = p({
|
|
26
|
+
block: this.block,
|
|
27
|
+
localState: this.context.localState,
|
|
28
|
+
rootState: this.context.rootState,
|
|
29
|
+
rootSetState: this.context.rootSetState,
|
|
30
|
+
context: this.context.context,
|
|
31
|
+
shouldEvaluateBindings: !0
|
|
32
|
+
}), e = t.responsiveStyles, n = this.context.content, c = w(
|
|
33
|
+
((S = n == null ? void 0 : n.meta) == null ? void 0 : S.breakpoints) || {}
|
|
34
|
+
), i = e == null ? void 0 : e.large, r = e == null ? void 0 : e.medium, a = e == null ? void 0 : e.small, o = t.id;
|
|
35
|
+
if (!o)
|
|
36
|
+
return "";
|
|
37
|
+
const f = i ? l({
|
|
38
|
+
className: o,
|
|
39
|
+
styles: i
|
|
40
|
+
}) : "", x = r ? l({
|
|
41
|
+
className: o,
|
|
42
|
+
styles: r,
|
|
43
|
+
mediaQuery: k(
|
|
44
|
+
"medium",
|
|
45
|
+
c
|
|
46
|
+
)
|
|
47
|
+
}) : "", b = a ? l({
|
|
48
|
+
className: o,
|
|
49
|
+
styles: a,
|
|
50
|
+
mediaQuery: k(
|
|
51
|
+
"small",
|
|
52
|
+
c
|
|
53
|
+
)
|
|
54
|
+
}) : "", s = t.animations && t.animations.find((d) => d.trigger === "hover");
|
|
55
|
+
let m = "";
|
|
56
|
+
if (s) {
|
|
57
|
+
const d = ((h = (u = s.steps) == null ? void 0 : u[1]) == null ? void 0 : h.styles) || {};
|
|
58
|
+
m = l({
|
|
59
|
+
className: `${o}:hover`,
|
|
60
|
+
styles: {
|
|
61
|
+
...d,
|
|
62
|
+
transition: `all ${s.duration}s ${E(s.easing)}`,
|
|
63
|
+
transitionDelay: s.delay ? `${s.delay}s` : "0s"
|
|
64
|
+
}
|
|
65
|
+
}) || "";
|
|
66
|
+
}
|
|
67
|
+
return [
|
|
68
|
+
f,
|
|
69
|
+
x,
|
|
70
|
+
b,
|
|
71
|
+
m
|
|
72
|
+
].join(" ");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
function A(t, e, n, c, i, r) {
|
|
77
|
+
const a = B("inlined-styles");
|
|
78
|
+
return t.TARGET !== "reactNative" && t.css && t.canShowBlock ? (C(), v(a, {
|
|
79
|
+
key: 0,
|
|
80
|
+
id: "builderio-block",
|
|
81
|
+
styles: t.css
|
|
82
|
+
}, null, 8, ["styles"])) : _("", !0);
|
|
83
|
+
}
|
|
84
|
+
const G = /* @__PURE__ */ N(z, [["render", A]]);
|
|
85
|
+
export {
|
|
86
|
+
G as default
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),e=require("./index-3lFzntkG.cjs"),f=a.defineComponent({name:"block-styles",components:{InlinedStyles:e._sfc_main},props:["block","context"],data(){return{TARGET:e.TARGET}},computed:{canShowBlock(){const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return e.checkIsDefined(t.hide)?!t.hide:e.checkIsDefined(t.show)?t.show:!0},css(){var m,h,y;const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),s=t.responsiveStyles,c=this.context.content,r=e.getSizesForBreakpoints(((m=c==null?void 0:c.meta)==null?void 0:m.breakpoints)||{}),i=s==null?void 0:s.large,d=s==null?void 0:s.medium,l=s==null?void 0:s.small,n=t.id;if(!n)return"";const p=i?e.createCssClass({className:n,styles:i}):"",k=d?e.createCssClass({className:n,styles:d,mediaQuery:e.getMaxWidthQueryForSize("medium",r)}):"",C=l?e.createCssClass({className:n,styles:l,mediaQuery:e.getMaxWidthQueryForSize("small",r)}):"",o=t.animations&&t.animations.find(u=>u.trigger==="hover");let S="";if(o){const u=((y=(h=o.steps)==null?void 0:h[1])==null?void 0:y.styles)||{};S=e.createCssClass({className:`${n}:hover`,styles:{...u,transition:`all ${o.duration}s ${e.camelCaseToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[p,k,C,S].join(" ")}}});function g(t,s,c,r,i,d){const l=a.resolveComponent("inlined-styles");return t.TARGET!=="reactNative"&&t.css&&t.canShowBlock?(a.openBlock(),a.createBlock(l,{key:0,id:"builderio-block",styles:t.css},null,8,["styles"])):a.createCommentVNode("",!0)}const x=e._export_sfc(f,[["render",g]]);exports.default=x;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
|
|
3
|
-
import { g as s, a as l } from "./get-block-properties-
|
|
4
|
-
import {
|
|
5
|
-
const d = () => import("./index-
|
|
3
|
+
import { g as s, a as l } from "./get-block-properties-jSTzat9q.js";
|
|
4
|
+
import { f as m } from "./index-_VfPZEOT.js";
|
|
5
|
+
const d = () => import("./index-_VfPZEOT.js").then((e) => e.G).then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
8
8
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-
|
|
1
|
+
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-iG0EdCc7.cjs"),n=require("./index-3lFzntkG.cjs"),c=()=>Promise.resolve().then(()=>require("./index-3lFzntkG.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("dynamic-renderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as m, openBlock as r, createBlock as l, resolveDynamicComponent as k, mergeProps as d, withCtx as u, renderSlot as P, resolveComponent as B, normalizeProps as g, createElementBlock as $, Fragment as v, renderList as S, createCommentVNode as W } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import { g as R, a as b } from "./get-block-properties-
|
|
3
|
+
import { f, B as h, w } from "./index-_VfPZEOT.js";
|
|
4
|
+
import { g as R, a as b } from "./get-block-properties-jSTzat9q.js";
|
|
5
5
|
const I = m({
|
|
6
6
|
name: "interactive-element",
|
|
7
7
|
props: ["wrapperProps", "includeBlockProps", "block", "context", "Wrapper"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),p=require("./index-
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),p=require("./index-3lFzntkG.cjs"),a=require("./get-block-properties-iG0EdCc7.cjs"),u=o.defineComponent({name:"interactive-element",props:["wrapperProps","includeBlockProps","block","context","Wrapper"],data(){return{getBlockActions:a.getBlockActions,getBlockProperties:a.getBlockProperties}}});function d(e,t,c,l,n,s){return o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.mergeProps({attributes:e.includeBlockProps?{...e.getBlockProperties({block:e.block,context:e.context}),...e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}},e.wrapperProps),{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const m=p._export_sfc(u,[["render",d]]),B=({componentOptions:e,builderBlock:t,context:c,componentRef:l,includeBlockProps:n,isInteractive:s,contextValue:i})=>{const r={...e,...n?{attributes:a.getBlockProperties({block:t,context:i})}:{}};return s?{Wrapper:l,block:t,context:c,wrapperProps:e,includeBlockProps:n}:r},f=o.defineComponent({name:"component-ref",components:{Block:p.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?p.wrapComponentRef(m):this.componentRef,getWrapperProps:B}}});function b(e,t,c,l,n,s){const i=o.resolveComponent("block");return e.componentRef?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.normalizeProps(o.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.blockChildren,(r,k)=>(o.openBlock(),o.createBlock(i,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):o.createCommentVNode("",!0)}const C=p._export_sfc(f,[["render",b]]);exports.default=C;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BuilderAnimation } from '../../types/builder-block';
|
|
2
|
+
export declare const camelCaseToKebabCase: (str?: string) => string;
|
|
2
3
|
export declare function bindAnimations(animations: BuilderAnimation[]): void;
|
|
3
4
|
export declare function triggerAnimation(animation: BuilderAnimation): void;
|
|
4
|
-
export declare function bindHoverAnimation(animation: BuilderAnimation): void;
|
|
5
5
|
export declare function bindScrollInViewAnimation(animation: BuilderAnimation): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.22";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function initializes the SDK on a Node server. It handles importing the
|
|
3
|
+
* `isolated-vm` package which is needed for dynamic bindings.
|
|
4
|
+
*
|
|
5
|
+
* NOTE: this function cannot be called on the client. You must call this function
|
|
6
|
+
* from a server-only location, such as:
|
|
7
|
+
* - The NextJS Pages router's `_document.tsx`
|
|
8
|
+
* - Your Remix route's `loader`
|
|
9
|
+
*/
|
|
10
|
+
export declare const initializeNodeRuntime: () => void;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import type { ExecutorArgs } from '../helpers';
|
|
2
|
+
/**
|
|
3
|
+
* Set the `isolated-vm` instance to be used by the node runtime.
|
|
4
|
+
* This is useful for environments that are not able to rely on our
|
|
5
|
+
* `safeDynamicRequire` trick to import the `isolated-vm` package.
|
|
6
|
+
*/
|
|
7
|
+
export declare const setIvm: (ivm: typeof import('isolated-vm')) => void;
|
|
2
8
|
export declare const runInNode: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export interface GetContentOptions {
|
|
2
|
+
/** The model to get content for (required) */
|
|
3
|
+
model: string;
|
|
4
|
+
/** Your public API key (required) */
|
|
5
|
+
apiKey: string;
|
|
6
|
+
/** Number of items to fetch. Default is 1 */
|
|
7
|
+
limit?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Use to specify an offset for pagination of results. The default is 0.
|
|
10
|
+
*/
|
|
11
|
+
offset?: number;
|
|
12
|
+
/**
|
|
13
|
+
* User attribute key value pairs to be used for targeting
|
|
14
|
+
* https://www.builder.io/c/docs/custom-targeting-attributes
|
|
15
|
+
*
|
|
16
|
+
* e.g.
|
|
17
|
+
* ```js
|
|
18
|
+
* userAttributes: {
|
|
19
|
+
* urlPath: '/',
|
|
20
|
+
* returnVisitor: true,
|
|
21
|
+
* device: 'mobile'
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
userAttributes?: (Record<string, any> & {
|
|
26
|
+
urlPath?: string;
|
|
27
|
+
}) | null;
|
|
28
|
+
/**
|
|
29
|
+
* Mongodb style query of your data. E.g.:
|
|
30
|
+
*
|
|
31
|
+
* ```js
|
|
32
|
+
* query: {
|
|
33
|
+
* id: 'abc123',
|
|
34
|
+
* data: {
|
|
35
|
+
* myCustomField: { $gt: 20 },
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* See more info on MongoDB's query operators and format.
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://docs.mongodb.com/manual/reference/operator/query/}
|
|
43
|
+
*/
|
|
44
|
+
query?: Record<string, any>;
|
|
45
|
+
/**
|
|
46
|
+
* Any other API options.
|
|
47
|
+
* Accepts both a key/value object or a `URLSearchParams` instance
|
|
48
|
+
* */
|
|
49
|
+
options?: Record<string, any> | URLSearchParams;
|
|
50
|
+
/**
|
|
51
|
+
* If set to `false`, it will not use cookies to target content. Therefore, A/B Testing will be disabled and
|
|
52
|
+
* only the default variation will be returned to every user.
|
|
53
|
+
*
|
|
54
|
+
* Defaults to `true`.
|
|
55
|
+
*/
|
|
56
|
+
canTrack?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Include multilevel references in the response.
|
|
59
|
+
*/
|
|
60
|
+
enrich?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* If provided, the API will auto-resolve localized objects to the value of this `locale` key.
|
|
63
|
+
*/
|
|
64
|
+
locale?: string;
|
|
65
|
+
/**
|
|
66
|
+
* If provided, sets the Builder API version used to fetch content.
|
|
67
|
+
*
|
|
68
|
+
* Currently, the only available API version is `v3`.
|
|
69
|
+
*/
|
|
70
|
+
apiVersion?: 'v3';
|
|
71
|
+
/**
|
|
72
|
+
* Only include these fields.
|
|
73
|
+
* Note: 'omit' takes precedence over 'fields'
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```
|
|
77
|
+
* fields: 'id, name, data.customField'
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
fields?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Omit only these fields.
|
|
83
|
+
* Note: 'omit' takes precedence over 'fields'
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```
|
|
87
|
+
* omit: 'data.bigField,data.blocks'
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
omit?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Seconds to cache content. Sets the max-age of the cache-control header
|
|
93
|
+
* response header.
|
|
94
|
+
*
|
|
95
|
+
* Use a higher value for better performance, lower for content that will change more frequently
|
|
96
|
+
*
|
|
97
|
+
* @see {@link https://www.builder.io/c/docs/query-api#__next:~:text=%26includeRefs%3Dtrue-,cacheSeconds,-No}
|
|
98
|
+
*/
|
|
99
|
+
cacheSeconds?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Builder.io uses stale-while-revalidate caching at the CDN level. This means we always serve
|
|
102
|
+
* from edge cache and update caches in the background for maximum possible performance. This also
|
|
103
|
+
* means that the more frequently content is requested, the more fresh it will be. The longest we
|
|
104
|
+
* will ever hold something in stale cache is 1 day by default, and you can set this to be shorter
|
|
105
|
+
* yourself as well. We suggest keeping this high unless you have content that must change rapidly
|
|
106
|
+
* and gets very little traffic.
|
|
107
|
+
*
|
|
108
|
+
* @see {@link https://www.fastly.com/blog/prevent-application-network-instability-serve-stale-content}
|
|
109
|
+
*/
|
|
110
|
+
staleCacheSeconds?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Property to order results by.
|
|
113
|
+
* Use 1 for ascending and -1 for descending.
|
|
114
|
+
*
|
|
115
|
+
* The key is what you're sorting on, so the following example sorts by createdDate
|
|
116
|
+
* and because the value is 1, the sort is ascending.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```
|
|
120
|
+
* createdDate: 1
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
sort?: {
|
|
124
|
+
[key: string]: 1 | -1;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Include content entries in a response that are still in
|
|
128
|
+
* draft mode and un-archived. Default is false.
|
|
129
|
+
*/
|
|
130
|
+
includeUnpublished?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Optional override of the `fetch` function. (Defaults to global `fetch`)
|
|
133
|
+
*/
|
|
134
|
+
fetch?: (input: string, init?: object) => Promise<any>;
|
|
135
|
+
/**
|
|
136
|
+
* Optional fetch options to be passed as the second argument to the `fetch` function.
|
|
137
|
+
*/
|
|
138
|
+
fetchOptions?: object;
|
|
139
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Search } from '../helpers/search/search';
|
|
2
|
-
export declare function isPreviewing(
|
|
2
|
+
export declare function isPreviewing(_search?: Search): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=require("./style.css");const a=require("./index-
|
|
1
|
+
var d=require("./style.css");const a=require("./index-3lFzntkG.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1,enableCache:!0});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const s=r[o];let n=c(o);if(e.stripPrefix)switch(a.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(s,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { h as s, T as c, i, j as l } from "./index-_VfPZEOT.js";
|
|
3
|
+
const p = (e) => `v-on:${e.toLowerCase()}`, u = (e, t) => (r) => s({
|
|
4
4
|
code: e,
|
|
5
5
|
context: t.context,
|
|
6
6
|
localState: t.localState,
|
|
@@ -16,7 +16,7 @@ function m(e) {
|
|
|
16
16
|
if (!r.hasOwnProperty(a))
|
|
17
17
|
continue;
|
|
18
18
|
const n = r[a];
|
|
19
|
-
let o =
|
|
19
|
+
let o = p(a);
|
|
20
20
|
if (e.stripPrefix)
|
|
21
21
|
switch (c) {
|
|
22
22
|
case "vue":
|
|
@@ -26,11 +26,11 @@ function m(e) {
|
|
|
26
26
|
o = o.replace("on:", "");
|
|
27
27
|
break;
|
|
28
28
|
}
|
|
29
|
-
t[o] =
|
|
29
|
+
t[o] = u(n, e);
|
|
30
30
|
}
|
|
31
31
|
return t;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function f({
|
|
34
34
|
properties: e
|
|
35
35
|
}) {
|
|
36
36
|
return e;
|
|
@@ -53,7 +53,7 @@ function g({
|
|
|
53
53
|
}),
|
|
54
54
|
[l()]: [e.id, "builder-block", e.class, (a = e.properties) == null ? void 0 : a.class].filter(Boolean).join(" ")
|
|
55
55
|
};
|
|
56
|
-
return
|
|
56
|
+
return f({
|
|
57
57
|
properties: r,
|
|
58
58
|
context: t,
|
|
59
59
|
block: e
|