@builder.io/sdk-qwik 0.9.0 → 0.11.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/lib/browser/index.qwik.cjs +7 -9
- package/lib/browser/index.qwik.mjs +7 -9
- package/lib/edge/index.qwik.cjs +7 -9
- package/lib/edge/index.qwik.mjs +7 -9
- package/lib/node/index.qwik.cjs +7 -9
- package/lib/node/index.qwik.mjs +7 -9
- package/package.json +1 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/get-content/index.d.ts +2 -2
- package/types/src/types/targets.d.ts +1 -1
|
@@ -490,8 +490,7 @@ function getBlockActions(options) {
|
|
|
490
490
|
let eventHandlerName = getEventHandlerName(key);
|
|
491
491
|
if (options.stripPrefix)
|
|
492
492
|
switch (TARGET) {
|
|
493
|
-
case "
|
|
494
|
-
case "vue3":
|
|
493
|
+
case "vue":
|
|
495
494
|
eventHandlerName = eventHandlerName.replace("v-on:", "");
|
|
496
495
|
break;
|
|
497
496
|
case "svelte":
|
|
@@ -533,8 +532,7 @@ function getBlockProperties({ block, context }) {
|
|
|
533
532
|
function getStyleAttribute(style) {
|
|
534
533
|
switch (TARGET) {
|
|
535
534
|
case "svelte":
|
|
536
|
-
case "
|
|
537
|
-
case "vue3":
|
|
535
|
+
case "vue":
|
|
538
536
|
case "solid":
|
|
539
537
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
540
538
|
case "qwik":
|
|
@@ -2958,7 +2956,7 @@ async function fetchOneEntry(options) {
|
|
|
2958
2956
|
limit: 1
|
|
2959
2957
|
});
|
|
2960
2958
|
if (allContent)
|
|
2961
|
-
return allContent
|
|
2959
|
+
return allContent[0] || null;
|
|
2962
2960
|
return null;
|
|
2963
2961
|
}
|
|
2964
2962
|
const getContent = fetchOneEntry;
|
|
@@ -2972,9 +2970,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
2972
2970
|
const canTrack = getDefaultCanTrack(options.canTrack);
|
|
2973
2971
|
url.search.includes(`preview=`);
|
|
2974
2972
|
if (!canTrack)
|
|
2975
|
-
return content;
|
|
2973
|
+
return content.results;
|
|
2976
2974
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
2977
|
-
return content;
|
|
2975
|
+
return content.results;
|
|
2978
2976
|
try {
|
|
2979
2977
|
const newResults = [];
|
|
2980
2978
|
for (const item of content.results)
|
|
@@ -2986,7 +2984,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
2986
2984
|
} catch (e) {
|
|
2987
2985
|
logger.error("Could not process A/B tests. ", e);
|
|
2988
2986
|
}
|
|
2989
|
-
return content;
|
|
2987
|
+
return content.results;
|
|
2990
2988
|
};
|
|
2991
2989
|
async function fetchEntries(options) {
|
|
2992
2990
|
try {
|
|
@@ -3206,7 +3204,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
3206
3204
|
}
|
|
3207
3205
|
};
|
|
3208
3206
|
};
|
|
3209
|
-
const SDK_VERSION = "0.
|
|
3207
|
+
const SDK_VERSION = "0.11.0";
|
|
3210
3208
|
const registry = {};
|
|
3211
3209
|
function register(type, info) {
|
|
3212
3210
|
let typeList = registry[type];
|
|
@@ -488,8 +488,7 @@ function getBlockActions(options) {
|
|
|
488
488
|
let eventHandlerName = getEventHandlerName(key);
|
|
489
489
|
if (options.stripPrefix)
|
|
490
490
|
switch (TARGET) {
|
|
491
|
-
case "
|
|
492
|
-
case "vue3":
|
|
491
|
+
case "vue":
|
|
493
492
|
eventHandlerName = eventHandlerName.replace("v-on:", "");
|
|
494
493
|
break;
|
|
495
494
|
case "svelte":
|
|
@@ -531,8 +530,7 @@ function getBlockProperties({ block, context }) {
|
|
|
531
530
|
function getStyleAttribute(style) {
|
|
532
531
|
switch (TARGET) {
|
|
533
532
|
case "svelte":
|
|
534
|
-
case "
|
|
535
|
-
case "vue3":
|
|
533
|
+
case "vue":
|
|
536
534
|
case "solid":
|
|
537
535
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
538
536
|
case "qwik":
|
|
@@ -2956,7 +2954,7 @@ async function fetchOneEntry(options) {
|
|
|
2956
2954
|
limit: 1
|
|
2957
2955
|
});
|
|
2958
2956
|
if (allContent)
|
|
2959
|
-
return allContent
|
|
2957
|
+
return allContent[0] || null;
|
|
2960
2958
|
return null;
|
|
2961
2959
|
}
|
|
2962
2960
|
const getContent = fetchOneEntry;
|
|
@@ -2970,9 +2968,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
2970
2968
|
const canTrack = getDefaultCanTrack(options.canTrack);
|
|
2971
2969
|
url.search.includes(`preview=`);
|
|
2972
2970
|
if (!canTrack)
|
|
2973
|
-
return content;
|
|
2971
|
+
return content.results;
|
|
2974
2972
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
2975
|
-
return content;
|
|
2973
|
+
return content.results;
|
|
2976
2974
|
try {
|
|
2977
2975
|
const newResults = [];
|
|
2978
2976
|
for (const item of content.results)
|
|
@@ -2984,7 +2982,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
2984
2982
|
} catch (e) {
|
|
2985
2983
|
logger.error("Could not process A/B tests. ", e);
|
|
2986
2984
|
}
|
|
2987
|
-
return content;
|
|
2985
|
+
return content.results;
|
|
2988
2986
|
};
|
|
2989
2987
|
async function fetchEntries(options) {
|
|
2990
2988
|
try {
|
|
@@ -3204,7 +3202,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
3204
3202
|
}
|
|
3205
3203
|
};
|
|
3206
3204
|
};
|
|
3207
|
-
const SDK_VERSION = "0.
|
|
3205
|
+
const SDK_VERSION = "0.11.0";
|
|
3208
3206
|
const registry = {};
|
|
3209
3207
|
function register(type, info) {
|
|
3210
3208
|
let typeList = registry[type];
|
package/lib/edge/index.qwik.cjs
CHANGED
|
@@ -3721,8 +3721,7 @@ function getBlockActions(options) {
|
|
|
3721
3721
|
let eventHandlerName = getEventHandlerName(key);
|
|
3722
3722
|
if (options.stripPrefix)
|
|
3723
3723
|
switch (TARGET) {
|
|
3724
|
-
case "
|
|
3725
|
-
case "vue3":
|
|
3724
|
+
case "vue":
|
|
3726
3725
|
eventHandlerName = eventHandlerName.replace("v-on:", "");
|
|
3727
3726
|
break;
|
|
3728
3727
|
case "svelte":
|
|
@@ -3764,8 +3763,7 @@ function getBlockProperties({ block, context }) {
|
|
|
3764
3763
|
function getStyleAttribute(style) {
|
|
3765
3764
|
switch (TARGET) {
|
|
3766
3765
|
case "svelte":
|
|
3767
|
-
case "
|
|
3768
|
-
case "vue3":
|
|
3766
|
+
case "vue":
|
|
3769
3767
|
case "solid":
|
|
3770
3768
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
3771
3769
|
case "qwik":
|
|
@@ -6189,7 +6187,7 @@ async function fetchOneEntry(options) {
|
|
|
6189
6187
|
limit: 1
|
|
6190
6188
|
});
|
|
6191
6189
|
if (allContent)
|
|
6192
|
-
return allContent
|
|
6190
|
+
return allContent[0] || null;
|
|
6193
6191
|
return null;
|
|
6194
6192
|
}
|
|
6195
6193
|
const getContent = fetchOneEntry;
|
|
@@ -6203,9 +6201,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
6203
6201
|
const canTrack = getDefaultCanTrack(options.canTrack);
|
|
6204
6202
|
url.search.includes(`preview=`);
|
|
6205
6203
|
if (!canTrack)
|
|
6206
|
-
return content;
|
|
6204
|
+
return content.results;
|
|
6207
6205
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
6208
|
-
return content;
|
|
6206
|
+
return content.results;
|
|
6209
6207
|
try {
|
|
6210
6208
|
const newResults = [];
|
|
6211
6209
|
for (const item of content.results)
|
|
@@ -6217,7 +6215,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
6217
6215
|
} catch (e) {
|
|
6218
6216
|
logger.error("Could not process A/B tests. ", e);
|
|
6219
6217
|
}
|
|
6220
|
-
return content;
|
|
6218
|
+
return content.results;
|
|
6221
6219
|
};
|
|
6222
6220
|
async function fetchEntries(options) {
|
|
6223
6221
|
try {
|
|
@@ -6437,7 +6435,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
6437
6435
|
}
|
|
6438
6436
|
};
|
|
6439
6437
|
};
|
|
6440
|
-
const SDK_VERSION = "0.
|
|
6438
|
+
const SDK_VERSION = "0.11.0";
|
|
6441
6439
|
const registry = {};
|
|
6442
6440
|
function register(type, info) {
|
|
6443
6441
|
let typeList = registry[type];
|
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -3719,8 +3719,7 @@ function getBlockActions(options) {
|
|
|
3719
3719
|
let eventHandlerName = getEventHandlerName(key);
|
|
3720
3720
|
if (options.stripPrefix)
|
|
3721
3721
|
switch (TARGET) {
|
|
3722
|
-
case "
|
|
3723
|
-
case "vue3":
|
|
3722
|
+
case "vue":
|
|
3724
3723
|
eventHandlerName = eventHandlerName.replace("v-on:", "");
|
|
3725
3724
|
break;
|
|
3726
3725
|
case "svelte":
|
|
@@ -3762,8 +3761,7 @@ function getBlockProperties({ block, context }) {
|
|
|
3762
3761
|
function getStyleAttribute(style) {
|
|
3763
3762
|
switch (TARGET) {
|
|
3764
3763
|
case "svelte":
|
|
3765
|
-
case "
|
|
3766
|
-
case "vue3":
|
|
3764
|
+
case "vue":
|
|
3767
3765
|
case "solid":
|
|
3768
3766
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
3769
3767
|
case "qwik":
|
|
@@ -6187,7 +6185,7 @@ async function fetchOneEntry(options) {
|
|
|
6187
6185
|
limit: 1
|
|
6188
6186
|
});
|
|
6189
6187
|
if (allContent)
|
|
6190
|
-
return allContent
|
|
6188
|
+
return allContent[0] || null;
|
|
6191
6189
|
return null;
|
|
6192
6190
|
}
|
|
6193
6191
|
const getContent = fetchOneEntry;
|
|
@@ -6201,9 +6199,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
6201
6199
|
const canTrack = getDefaultCanTrack(options.canTrack);
|
|
6202
6200
|
url.search.includes(`preview=`);
|
|
6203
6201
|
if (!canTrack)
|
|
6204
|
-
return content;
|
|
6202
|
+
return content.results;
|
|
6205
6203
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
6206
|
-
return content;
|
|
6204
|
+
return content.results;
|
|
6207
6205
|
try {
|
|
6208
6206
|
const newResults = [];
|
|
6209
6207
|
for (const item of content.results)
|
|
@@ -6215,7 +6213,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
6215
6213
|
} catch (e) {
|
|
6216
6214
|
logger.error("Could not process A/B tests. ", e);
|
|
6217
6215
|
}
|
|
6218
|
-
return content;
|
|
6216
|
+
return content.results;
|
|
6219
6217
|
};
|
|
6220
6218
|
async function fetchEntries(options) {
|
|
6221
6219
|
try {
|
|
@@ -6435,7 +6433,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
6435
6433
|
}
|
|
6436
6434
|
};
|
|
6437
6435
|
};
|
|
6438
|
-
const SDK_VERSION = "0.
|
|
6436
|
+
const SDK_VERSION = "0.11.0";
|
|
6439
6437
|
const registry = {};
|
|
6440
6438
|
function register(type, info) {
|
|
6441
6439
|
let typeList = registry[type];
|
package/lib/node/index.qwik.cjs
CHANGED
|
@@ -591,8 +591,7 @@ function getBlockActions(options) {
|
|
|
591
591
|
let eventHandlerName = getEventHandlerName(key);
|
|
592
592
|
if (options.stripPrefix)
|
|
593
593
|
switch (TARGET) {
|
|
594
|
-
case "
|
|
595
|
-
case "vue3":
|
|
594
|
+
case "vue":
|
|
596
595
|
eventHandlerName = eventHandlerName.replace("v-on:", "");
|
|
597
596
|
break;
|
|
598
597
|
case "svelte":
|
|
@@ -634,8 +633,7 @@ function getBlockProperties({ block, context }) {
|
|
|
634
633
|
function getStyleAttribute(style) {
|
|
635
634
|
switch (TARGET) {
|
|
636
635
|
case "svelte":
|
|
637
|
-
case "
|
|
638
|
-
case "vue3":
|
|
636
|
+
case "vue":
|
|
639
637
|
case "solid":
|
|
640
638
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
641
639
|
case "qwik":
|
|
@@ -3059,7 +3057,7 @@ async function fetchOneEntry(options) {
|
|
|
3059
3057
|
limit: 1
|
|
3060
3058
|
});
|
|
3061
3059
|
if (allContent)
|
|
3062
|
-
return allContent
|
|
3060
|
+
return allContent[0] || null;
|
|
3063
3061
|
return null;
|
|
3064
3062
|
}
|
|
3065
3063
|
const getContent = fetchOneEntry;
|
|
@@ -3073,9 +3071,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
3073
3071
|
const canTrack = getDefaultCanTrack(options.canTrack);
|
|
3074
3072
|
url.search.includes(`preview=`);
|
|
3075
3073
|
if (!canTrack)
|
|
3076
|
-
return content;
|
|
3074
|
+
return content.results;
|
|
3077
3075
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
3078
|
-
return content;
|
|
3076
|
+
return content.results;
|
|
3079
3077
|
try {
|
|
3080
3078
|
const newResults = [];
|
|
3081
3079
|
for (const item of content.results)
|
|
@@ -3087,7 +3085,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
3087
3085
|
} catch (e) {
|
|
3088
3086
|
logger.error("Could not process A/B tests. ", e);
|
|
3089
3087
|
}
|
|
3090
|
-
return content;
|
|
3088
|
+
return content.results;
|
|
3091
3089
|
};
|
|
3092
3090
|
async function fetchEntries(options) {
|
|
3093
3091
|
try {
|
|
@@ -3307,7 +3305,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
3307
3305
|
}
|
|
3308
3306
|
};
|
|
3309
3307
|
};
|
|
3310
|
-
const SDK_VERSION = "0.
|
|
3308
|
+
const SDK_VERSION = "0.11.0";
|
|
3311
3309
|
const registry = {};
|
|
3312
3310
|
function register(type, info) {
|
|
3313
3311
|
let typeList = registry[type];
|
package/lib/node/index.qwik.mjs
CHANGED
|
@@ -589,8 +589,7 @@ function getBlockActions(options) {
|
|
|
589
589
|
let eventHandlerName = getEventHandlerName(key);
|
|
590
590
|
if (options.stripPrefix)
|
|
591
591
|
switch (TARGET) {
|
|
592
|
-
case "
|
|
593
|
-
case "vue3":
|
|
592
|
+
case "vue":
|
|
594
593
|
eventHandlerName = eventHandlerName.replace("v-on:", "");
|
|
595
594
|
break;
|
|
596
595
|
case "svelte":
|
|
@@ -632,8 +631,7 @@ function getBlockProperties({ block, context }) {
|
|
|
632
631
|
function getStyleAttribute(style) {
|
|
633
632
|
switch (TARGET) {
|
|
634
633
|
case "svelte":
|
|
635
|
-
case "
|
|
636
|
-
case "vue3":
|
|
634
|
+
case "vue":
|
|
637
635
|
case "solid":
|
|
638
636
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
639
637
|
case "qwik":
|
|
@@ -3057,7 +3055,7 @@ async function fetchOneEntry(options) {
|
|
|
3057
3055
|
limit: 1
|
|
3058
3056
|
});
|
|
3059
3057
|
if (allContent)
|
|
3060
|
-
return allContent
|
|
3058
|
+
return allContent[0] || null;
|
|
3061
3059
|
return null;
|
|
3062
3060
|
}
|
|
3063
3061
|
const getContent = fetchOneEntry;
|
|
@@ -3071,9 +3069,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
3071
3069
|
const canTrack = getDefaultCanTrack(options.canTrack);
|
|
3072
3070
|
url.search.includes(`preview=`);
|
|
3073
3071
|
if (!canTrack)
|
|
3074
|
-
return content;
|
|
3072
|
+
return content.results;
|
|
3075
3073
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
3076
|
-
return content;
|
|
3074
|
+
return content.results;
|
|
3077
3075
|
try {
|
|
3078
3076
|
const newResults = [];
|
|
3079
3077
|
for (const item of content.results)
|
|
@@ -3085,7 +3083,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
3085
3083
|
} catch (e) {
|
|
3086
3084
|
logger.error("Could not process A/B tests. ", e);
|
|
3087
3085
|
}
|
|
3088
|
-
return content;
|
|
3086
|
+
return content.results;
|
|
3089
3087
|
};
|
|
3090
3088
|
async function fetchEntries(options) {
|
|
3091
3089
|
try {
|
|
@@ -3305,7 +3303,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
3305
3303
|
}
|
|
3306
3304
|
};
|
|
3307
3305
|
};
|
|
3308
|
-
const SDK_VERSION = "0.
|
|
3306
|
+
const SDK_VERSION = "0.11.0";
|
|
3309
3307
|
const registry = {};
|
|
3310
3308
|
function register(type, info) {
|
|
3311
3309
|
let typeList = registry[type];
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.0";
|
|
@@ -16,11 +16,11 @@ type ContentResults = {
|
|
|
16
16
|
/**
|
|
17
17
|
* @internal Exported only for testing purposes. Do not use.
|
|
18
18
|
*/
|
|
19
|
-
export declare const _processContentResult: (options: GetContentOptions, content: ContentResults, url?: URL) => Promise<
|
|
19
|
+
export declare const _processContentResult: (options: GetContentOptions, content: ContentResults, url?: URL) => Promise<BuilderContent[]>;
|
|
20
20
|
/**
|
|
21
21
|
* Returns a paginated array of entries that match the given options.
|
|
22
22
|
*/
|
|
23
|
-
export declare function fetchEntries(options: GetContentOptions): Promise<
|
|
23
|
+
export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[] | null>;
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated `getAllContent` was renamed to `fetchEntries`. This is a temporary alias to avoid breaking changes.
|
|
26
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Target = '
|
|
1
|
+
export type Target = 'vue' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid' | 'rsc';
|