@builder.io/sdk-qwik 0.2.2 → 0.3.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/index.qwik.cjs +9 -3
- package/lib/index.qwik.mjs +9 -3
- package/package.json +2 -2
- package/types/blocks/image/image.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/components/render-block/render-component-with-context.d.ts +0 -3
- package/types/components/render-content-variants/helpers.d.ts +0 -6
- package/types/components/render-content-variants/render-content-variants.d.ts +0 -3
- package/types/functions/convert-style-object.d.ts +0 -1
- package/types/functions/get-block-styles.d.ts +0 -6
- package/types/functions/get-block-tag.d.ts +0 -3
- package/types/functions/get-content/fn.test.d.ts +0 -1
- package/types/functions/mark-mutable.d.ts +0 -2
- package/types/functions/sanitize-styles.d.ts +0 -4
- package/types/functions/track.d.ts +0 -56
- package/types/talk/generators-updated.d.ts +0 -1
- package/types/talk/generators.d.ts +0 -6
package/lib/index.qwik.cjs
CHANGED
|
@@ -455,7 +455,8 @@ const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qw
|
|
|
455
455
|
context: props.repeatContext.context,
|
|
456
456
|
apiKey: props.repeatContext.apiKey,
|
|
457
457
|
registeredComponents: props.repeatContext.registeredComponents,
|
|
458
|
-
inheritedStyles: props.repeatContext.inheritedStyles
|
|
458
|
+
inheritedStyles: props.repeatContext.inheritedStyles,
|
|
459
|
+
apiVersion: props.repeatContext.apiVersion
|
|
459
460
|
}));
|
|
460
461
|
return /* @__PURE__ */ qwik._jsxC(RenderBlock, {
|
|
461
462
|
get block() {
|
|
@@ -1878,7 +1879,11 @@ async function getAllContent(options) {
|
|
|
1878
1879
|
const res = await fetch$1(url.href);
|
|
1879
1880
|
const content = await res.json();
|
|
1880
1881
|
if ("status" in content && !("results" in content)) {
|
|
1881
|
-
logger.error("Error fetching data. ",
|
|
1882
|
+
logger.error("Error fetching data. ", {
|
|
1883
|
+
url,
|
|
1884
|
+
content,
|
|
1885
|
+
options
|
|
1886
|
+
});
|
|
1882
1887
|
return content;
|
|
1883
1888
|
}
|
|
1884
1889
|
const canTrack = options.canTrack !== false;
|
|
@@ -3113,7 +3118,8 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
|
|
|
3113
3118
|
context: props.context || {},
|
|
3114
3119
|
apiKey: props.apiKey,
|
|
3115
3120
|
apiVersion: props.apiVersion,
|
|
3116
|
-
registeredComponents: state.allRegisteredComponents
|
|
3121
|
+
registeredComponents: state.allRegisteredComponents,
|
|
3122
|
+
inheritedStyles: {}
|
|
3117
3123
|
}));
|
|
3118
3124
|
qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
3119
3125
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -453,7 +453,8 @@ const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlined
|
|
|
453
453
|
context: props.repeatContext.context,
|
|
454
454
|
apiKey: props.repeatContext.apiKey,
|
|
455
455
|
registeredComponents: props.repeatContext.registeredComponents,
|
|
456
|
-
inheritedStyles: props.repeatContext.inheritedStyles
|
|
456
|
+
inheritedStyles: props.repeatContext.inheritedStyles,
|
|
457
|
+
apiVersion: props.repeatContext.apiVersion
|
|
457
458
|
}));
|
|
458
459
|
return /* @__PURE__ */ _jsxC(RenderBlock, {
|
|
459
460
|
get block() {
|
|
@@ -1876,7 +1877,11 @@ async function getAllContent(options) {
|
|
|
1876
1877
|
const res = await fetch$1(url.href);
|
|
1877
1878
|
const content = await res.json();
|
|
1878
1879
|
if ("status" in content && !("results" in content)) {
|
|
1879
|
-
logger.error("Error fetching data. ",
|
|
1880
|
+
logger.error("Error fetching data. ", {
|
|
1881
|
+
url,
|
|
1882
|
+
content,
|
|
1883
|
+
options
|
|
1884
|
+
});
|
|
1880
1885
|
return content;
|
|
1881
1886
|
}
|
|
1882
1887
|
const canTrack = options.canTrack !== false;
|
|
@@ -3111,7 +3116,8 @@ const RenderContent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
3111
3116
|
context: props.context || {},
|
|
3112
3117
|
apiKey: props.apiKey,
|
|
3113
3118
|
apiVersion: props.apiVersion,
|
|
3114
|
-
registeredComponents: state.allRegisteredComponents
|
|
3119
|
+
registeredComponents: state.allRegisteredComponents,
|
|
3120
|
+
inheritedStyles: {}
|
|
3115
3121
|
}));
|
|
3116
3122
|
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
3117
3123
|
const [elementRef2, props2, state2] = useLexicalScope();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-qwik",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Builder.io Qwik SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.qwik.cjs",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"vite": "^3.0.4"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@builder.io/qwik": ">=0.
|
|
37
|
+
"@builder.io/qwik": ">=1.0.0"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export * from './functions/get-builder-search-params/index.js';
|
|
|
10
10
|
export { track } from './functions/track/index.js';
|
|
11
11
|
export type { RegisteredComponent } from './context/types';
|
|
12
12
|
export type { ComponentInfo } from './types/components';
|
|
13
|
+
export type { RenderContentProps } from './components/render-content/render-content.types.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertStyleObject: (obj: Partial<CSSStyleDeclaration>) => Partial<CSSStyleDeclaration>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
-
export declare function getBlockStyles({ block, context, }: {
|
|
4
|
-
block: BuilderBlock;
|
|
5
|
-
context: BuilderContextInterface;
|
|
6
|
-
}): Partial<CSSStyleDeclaration>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track.js';
|
|
2
|
-
interface Event {
|
|
3
|
-
/**
|
|
4
|
-
* The type of your event.
|
|
5
|
-
*
|
|
6
|
-
* Examples: `click`, `conversion`, `pageview`, `impression`
|
|
7
|
-
*/
|
|
8
|
-
type: string;
|
|
9
|
-
data: {
|
|
10
|
-
/**
|
|
11
|
-
* (Optional) The content's ID. Useful if this event pertains to a specific piece of content.
|
|
12
|
-
*/
|
|
13
|
-
contentId?: string;
|
|
14
|
-
/**
|
|
15
|
-
* This is the ID of the space that the content belongs to.
|
|
16
|
-
*/
|
|
17
|
-
ownerId: string;
|
|
18
|
-
/**
|
|
19
|
-
* Stringified JSON object containing any additional metadata you want to track.
|
|
20
|
-
*/
|
|
21
|
-
metadata?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Session ID of the user. This is provided by the SDK by checking session storage.
|
|
24
|
-
*/
|
|
25
|
-
sessionId: string | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Visitor ID of the user. This is provided by the SDK by checking cookies.
|
|
28
|
-
*/
|
|
29
|
-
visitorId: string | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* (Optional) If running an A/B test, the ID of the variation that the user is in.
|
|
32
|
-
*/
|
|
33
|
-
variationId?: string;
|
|
34
|
-
[index: string]: any;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
declare type EventProperties = Pick<Event, 'type'> & Pick<Event['data'], 'contentId' | 'variationId'> & {
|
|
38
|
-
/**
|
|
39
|
-
* Your organization's API key.
|
|
40
|
-
*/
|
|
41
|
-
apiKey: Event['data']['ownerId'];
|
|
42
|
-
/**
|
|
43
|
-
* (Optional) metadata that you want to provide with your event.
|
|
44
|
-
*/
|
|
45
|
-
metadata?: {
|
|
46
|
-
[index: string]: any;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* (Optional) Any additional (non-metadata) properties to add to the event.
|
|
50
|
-
*/
|
|
51
|
-
[index: string]: any;
|
|
52
|
-
};
|
|
53
|
-
export declare type EventProps = EventProperties & CanTrack;
|
|
54
|
-
export declare function _track(eventProps: EventProps): Promise<void | Response>;
|
|
55
|
-
export declare const track: (args: EventProperties) => Promise<void | Response>;
|
|
56
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const ON_MOUNT_CODE: "\n Object.values(props.customComponents).forEach((registeredComponent) => {\n sendComponentToVisualEditor(registeredComponent);\n });\n";
|
|
2
|
-
declare const REACT_CODE: string;
|
|
3
|
-
declare const VUE_CODE: string;
|
|
4
|
-
declare const SVELTE_CODE: string;
|
|
5
|
-
declare const SOLIDJS_CODE: string;
|
|
6
|
-
declare const QWIK_CODE: string;
|