@builder.io/sdk-qwik 0.3.0 → 0.3.1
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 +118 -78
- package/lib/index.qwik.mjs +118 -78
- package/package.json +3 -6
- package/types/components/render-block/render-block.helpers.d.ts +0 -1
- package/types/components/render-block/render-component-with-context.d.ts +3 -0
- package/types/components/render-content/render-content.d.ts +1 -1
- package/types/components/render-content-variants/helpers.d.ts +12 -0
- package/types/components/render-content-variants/render-content-variants.d.ts +3 -0
- package/types/constants/sdk-version.d.ts +1 -0
- package/types/context/types.d.ts +17 -2
- package/types/functions/convert-style-object.d.ts +1 -0
- package/types/functions/evaluate.d.ts +4 -3
- package/types/functions/evaluate.test.d.ts +1 -0
- package/types/functions/get-block-actions-handler.d.ts +1 -1
- package/types/functions/get-block-actions.d.ts +1 -1
- package/types/functions/get-block-styles.d.ts +6 -0
- package/types/functions/get-block-tag.d.ts +3 -0
- package/types/functions/get-content/fn.test.d.ts +1 -0
- package/types/functions/get-processed-block.d.ts +2 -2
- package/types/functions/mark-mutable.d.ts +2 -0
- package/types/functions/sanitize-styles.d.ts +4 -0
- package/types/functions/track.d.ts +56 -0
- package/types/helpers/canTrack.d.ts +1 -0
- package/types/talk/generators-updated.d.ts +1 -0
- package/types/talk/generators.d.ts +6 -0
|
@@ -2,4 +2,4 @@ import type { BuilderContextInterface } from '../context/types.js';
|
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
3
|
export declare function createEventHandler(value: string, options: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
|
-
} & Pick<BuilderContextInterface, '
|
|
5
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): (event: Event) => any;
|
|
@@ -5,5 +5,5 @@ type Actions = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function getBlockActions(options: {
|
|
7
7
|
block: BuilderBlock;
|
|
8
|
-
} & Pick<BuilderContextInterface, '
|
|
8
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): Actions;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
-
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings,
|
|
3
|
+
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState, }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
/**
|
|
6
6
|
* In some cases, we want to avoid evaluating bindings and only want framework-specific block transformation. It is
|
|
7
7
|
* also sometimes too early to consider bindings, e.g. when we might be looking at a repeated block.
|
|
8
8
|
*/
|
|
9
9
|
shouldEvaluateBindings: boolean;
|
|
10
|
-
} & Pick<BuilderContextInterface, '
|
|
10
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): BuilderBlock;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDefaultCanTrack: (canTrack?: boolean) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
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;
|