@builder.io/sdk-vue 1.0.14 → 1.0.16

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 (63) hide show
  1. package/lib/browser/{block-styles-z7sGkBTw.js → block-styles-6TCYHFhw.js} +6 -5
  2. package/lib/browser/block-styles-Ms1wQqgK.cjs +1 -0
  3. package/lib/browser/{block-wrapper-R9MDSksK.cjs → block-wrapper-8w1ok_04.cjs} +1 -1
  4. package/lib/browser/{block-wrapper-OUFH1h7n.js → block-wrapper-TDrSjeun.js} +3 -3
  5. package/lib/browser/{component-ref-LhEgM7QI.js → component-ref-3TnMqFsh.js} +2 -2
  6. package/lib/browser/{component-ref-cnl1wJ7V.cjs → component-ref-piWtyJuS.cjs} +1 -1
  7. package/lib/browser/components/content-variants/content-variants.vue.d.ts +1 -1
  8. package/lib/browser/components/content-variants/helpers.d.ts +1 -1
  9. package/lib/browser/constants/sdk-version.d.ts +1 -1
  10. package/lib/browser/{get-block-properties-8me_ULV1.js → get-block-properties-swAAqr5Q.js} +1 -1
  11. package/lib/browser/{get-block-properties-MB_CAVzA.cjs → get-block-properties-znBNJG9m.cjs} +1 -1
  12. package/lib/browser/{index-lxlrEO9W.js → index-JoCrt5Mj.js} +33 -19
  13. package/lib/browser/index-ZID1XPKY.cjs +166 -0
  14. package/lib/browser/index.cjs +1 -1
  15. package/lib/browser/index.js +1 -1
  16. package/lib/browser/{repeated-block-5r2RNm5K.js → repeated-block-0mjIhErN.js} +2 -2
  17. package/lib/browser/{repeated-block-LUwQWzPp.cjs → repeated-block-Aag6lq7R.cjs} +1 -1
  18. package/lib/browser/style.css +1 -1
  19. package/lib/edge/block-styles-gsIg0xFp.cjs +1 -0
  20. package/lib/{node/block-styles-XgGq-J65.js → edge/block-styles-wHtoAtTy.js} +6 -5
  21. package/lib/edge/{block-wrapper-y2793ZN5.js → block-wrapper-CHWNqOBk.js} +3 -3
  22. package/lib/{node/block-wrapper-sv0gfrKF.cjs → edge/block-wrapper-y134R03K.cjs} +1 -1
  23. package/lib/edge/{component-ref-znPa_yPg.js → component-ref-Jjo_mmFM.js} +2 -2
  24. package/lib/{node/component-ref-rsCbGdca.cjs → edge/component-ref-dz-_8Rct.cjs} +1 -1
  25. package/lib/edge/components/content-variants/content-variants.vue.d.ts +1 -1
  26. package/lib/edge/components/content-variants/helpers.d.ts +1 -1
  27. package/lib/edge/constants/sdk-version.d.ts +1 -1
  28. package/lib/edge/{get-block-properties-wnBoh6NI.cjs → get-block-properties-nuJvnYlI.cjs} +1 -1
  29. package/lib/{node/get-block-properties-jJY9Yegb.js → edge/get-block-properties-pA4T7Rp3.js} +1 -1
  30. package/lib/edge/{index-xBtUJWIQ.js → index-cQ_3UsPy.js} +33 -19
  31. package/lib/edge/{index-17AnhyKn.cjs → index-jlM1T4Q0.cjs} +12 -12
  32. package/lib/edge/index.cjs +1 -1
  33. package/lib/edge/index.js +1 -1
  34. package/lib/edge/{repeated-block-7K33zRnk.cjs → repeated-block-CRyZSIkn.cjs} +1 -1
  35. package/lib/edge/{repeated-block-e19DbJ9g.js → repeated-block-rzrX2Oxi.js} +2 -2
  36. package/lib/edge/style.css +1 -1
  37. package/lib/node/block-styles-VEtxLEov.cjs +1 -0
  38. package/lib/{edge/block-styles-B3awvzyT.js → node/block-styles-_FqGGl6q.js} +6 -5
  39. package/lib/{edge/block-wrapper-xCm3uEEu.cjs → node/block-wrapper-7jTb1ywg.cjs} +1 -1
  40. package/lib/node/{block-wrapper-I1JmYM5e.js → block-wrapper-L7vUm63u.js} +3 -3
  41. package/lib/node/{component-ref--eSEr7Gt.js → component-ref-KGHZuMWD.js} +2 -2
  42. package/lib/{edge/component-ref-wcbtAeIh.cjs → node/component-ref-abZqErrZ.cjs} +1 -1
  43. package/lib/node/components/content-variants/content-variants.vue.d.ts +1 -1
  44. package/lib/node/components/content-variants/helpers.d.ts +1 -1
  45. package/lib/node/constants/sdk-version.d.ts +1 -1
  46. package/lib/{edge/get-block-properties-abyvkMNc.js → node/get-block-properties-VsjMrc1l.js} +1 -1
  47. package/lib/node/{get-block-properties-FOFsIVzD.cjs → get-block-properties-xYp_r32a.cjs} +1 -1
  48. package/lib/node/{index-IFSblmpH.js → index-t3tNER21.js} +37 -23
  49. package/lib/node/index-vItLZEt6.cjs +206 -0
  50. package/lib/node/index.cjs +1 -1
  51. package/lib/node/index.js +1 -1
  52. package/lib/node/{repeated-block-buhSqMYu.cjs → repeated-block-v33kirpq.cjs} +1 -1
  53. package/lib/node/{repeated-block-lNY93wED.js → repeated-block-xPkQgRw-.js} +2 -2
  54. package/lib/node/style.css +1 -1
  55. package/package.json +1 -1
  56. package/lib/browser/block-styles-FdmS__fC.cjs +0 -1
  57. package/lib/browser/functions/get-content/types.d.ts +0 -131
  58. package/lib/browser/index-ad1QjFMU.cjs +0 -166
  59. package/lib/edge/block-styles-Xju5355Z.cjs +0 -1
  60. package/lib/edge/functions/get-content/types.d.ts +0 -131
  61. package/lib/node/block-styles-YqghwSbU.cjs +0 -1
  62. package/lib/node/functions/get-content/types.d.ts +0 -131
  63. package/lib/node/index-5GO07feh.cjs +0 -206
@@ -1,131 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index-5GO07feh.cjs"),h=o.defineComponent({name:"block-styles",components:{InlinedStyles:t._sfc_main},props:["block","context"],data(){return{TARGET:t.TARGET}},computed:{canShowBlock(){const e=t.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return t.checkIsDefined(e.hide)?!e.hide:t.checkIsDefined(e.show)?e.show:!0},css(){var d;const e=t.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),s=e.responsiveStyles,n=this.context.content,r=t.getSizesForBreakpoints(((d=n==null?void 0:n.meta)==null?void 0:d.breakpoints)||{}),a=s==null?void 0:s.large,i=s==null?void 0:s.medium,c=s==null?void 0:s.small,l=e.id;if(!l)return"";const u=a?t.createCssClass({className:l,styles:a}):"",S=i?t.createCssClass({className:l,styles:i,mediaQuery:t.getMaxWidthQueryForSize("medium",r)}):"",m=c?t.createCssClass({className:l,styles:c,mediaQuery:t.getMaxWidthQueryForSize("small",r)}):"";return[u,S,m].join(" ")}}});function k(e,s,n,r,a,i){const c=o.resolveComponent("inlined-styles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(o.openBlock(),o.createBlock(c,{key:0,styles:e.css},null,8,["styles"])):o.createCommentVNode("",!0)}const p=t._export_sfc(h,[["render",k]]);exports.default=p;
@@ -1,131 +0,0 @@
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
- }