@builder.io/sdk-qwik 0.5.9 → 0.6.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/README.md +0 -4
- package/lib/browser/index.qwik.cjs +4270 -0
- package/lib/browser/index.qwik.mjs +4270 -0
- package/lib/edge/index.qwik.cjs +7474 -0
- package/lib/edge/index.qwik.mjs +7474 -0
- package/lib/index.qwik.cjs +1492 -211
- package/lib/index.qwik.mjs +1493 -212
- package/lib/node/index.qwik.cjs +4270 -0
- package/lib/node/index.qwik.mjs +4270 -0
- package/package.json +83 -13
- package/types/components/blocks/deopt.d.ts +4 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/edge-runtime/edge-runtime.d.ts +2 -0
- package/types/functions/evaluate/edge-runtime/index.d.ts +1 -0
- package/types/functions/evaluate/helpers.d.ts +1 -1
- package/types/functions/evaluate/placeholder-runtime.d.ts +2 -0
- package/types/functions/fetch-builder-props.d.ts +2 -1
- package/types/functions/get-content/index.d.ts +4 -5
- package/types/functions/is-edge-runtime.d.ts +4 -0
- package/types/src/components/blocks/deopt.d.ts +4 -0
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/deopt.d.ts +4 -0
- package/types/src/functions/evaluate/edge-runtime/edge-runtime.d.ts +2 -0
- package/types/src/functions/evaluate/edge-runtime/index.d.ts +1 -0
- package/types/src/functions/evaluate/non-node-runtime/index.d.ts +1 -1
- package/types/src/functions/fetch-builder-props.d.ts +2 -1
- package/types/src/functions/get-content/index.d.ts +4 -5
- package/types/src/functions/is-edge-runtime.d.ts +4 -0
- package/types/src/index-helpers/blocks-exports.d.ts +2 -2
- package/types/functions/evaluate/types.d.ts +0 -11
- package/types/functions/if-target.d.ts +0 -7
- package/types/src/functions/evaluate/node-runtime/node-runtime.d.ts +0 -2
- package/types/src/functions/evaluate/types.d.ts +0 -11
- package/types/src/functions/if-target.d.ts +0 -7
- /package/types/functions/evaluate/{acorn-interpreter.d.ts → edge-runtime/acorn-interpreter.d.ts} +0 -0
- /package/types/src/functions/evaluate/{acorn-interpreter.d.ts → edge-runtime/acorn-interpreter.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-qwik",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Builder.io Qwik SDK",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./lib/index.qwik.cjs",
|
|
7
|
-
"module": "./lib/index.qwik.mjs",
|
|
8
|
-
"qwik": "./lib/index.qwik.mjs",
|
|
9
|
-
"types": "./types/index.d.ts",
|
|
6
|
+
"main": "./lib/edge/index.qwik.cjs",
|
|
7
|
+
"module": "./lib/edge/index.qwik.mjs",
|
|
8
|
+
"qwik": "./lib/browser/index.qwik.mjs",
|
|
9
|
+
"types": "./types/src/index.d.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"README.md",
|
|
12
12
|
"package.json",
|
|
@@ -16,16 +16,90 @@
|
|
|
16
16
|
],
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
|
-
"
|
|
20
|
-
|
|
19
|
+
"node": {
|
|
20
|
+
"types": "./types/src/index.d.ts",
|
|
21
|
+
"import": "./lib/node/index.qwik.mjs",
|
|
22
|
+
"require": "./lib/node/index.qwik.cjs"
|
|
23
|
+
},
|
|
24
|
+
"browser": {
|
|
25
|
+
"types": "./types/src/index.d.ts",
|
|
26
|
+
"import": "./lib/browser/index.qwik.mjs",
|
|
27
|
+
"require": "./lib/browser/index.qwik.cjs"
|
|
28
|
+
},
|
|
29
|
+
"edge-routine": {
|
|
30
|
+
"types": "./types/src/index.d.ts",
|
|
31
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
32
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
33
|
+
},
|
|
34
|
+
"workerd": {
|
|
35
|
+
"types": "./types/src/index.d.ts",
|
|
36
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
37
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
38
|
+
},
|
|
39
|
+
"deno": {
|
|
40
|
+
"types": "./types/src/index.d.ts",
|
|
41
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
42
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
43
|
+
},
|
|
44
|
+
"lagon": {
|
|
45
|
+
"types": "./types/src/index.d.ts",
|
|
46
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
47
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
48
|
+
},
|
|
49
|
+
"netlify": {
|
|
50
|
+
"types": "./types/src/index.d.ts",
|
|
51
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
52
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
53
|
+
},
|
|
54
|
+
"edge-light": {
|
|
55
|
+
"types": "./types/src/index.d.ts",
|
|
56
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
57
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
58
|
+
},
|
|
59
|
+
"bun": {
|
|
60
|
+
"types": "./types/src/index.d.ts",
|
|
61
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
62
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
63
|
+
},
|
|
64
|
+
"electron": {
|
|
65
|
+
"types": "./types/src/index.d.ts",
|
|
66
|
+
"import": "./lib/node/index.qwik.mjs",
|
|
67
|
+
"require": "./lib/node/index.qwik.cjs"
|
|
68
|
+
},
|
|
69
|
+
"default": {
|
|
70
|
+
"types": "./types/src/index.d.ts",
|
|
71
|
+
"import": "./lib/browser/index.qwik.mjs",
|
|
72
|
+
"require": "./lib/browser/index.qwik.cjs"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"./edge": {
|
|
76
|
+
"types": "./types/src/index.d.ts",
|
|
77
|
+
"import": "./lib/edge/index.qwik.mjs",
|
|
78
|
+
"require": "./lib/edge/index.qwik.cjs"
|
|
79
|
+
},
|
|
80
|
+
"./node": {
|
|
81
|
+
"types": "./types/src/index.d.ts",
|
|
82
|
+
"import": "./lib/node/index.qwik.mjs",
|
|
83
|
+
"require": "./lib/node/index.qwik.cjs"
|
|
84
|
+
},
|
|
85
|
+
"./browser": {
|
|
86
|
+
"types": "./types/src/index.d.ts",
|
|
87
|
+
"import": "./lib/browser/index.qwik.mjs",
|
|
88
|
+
"require": "./lib/browser/index.qwik.cjs"
|
|
21
89
|
}
|
|
22
90
|
},
|
|
23
91
|
"scripts": {
|
|
24
92
|
"typecheck": "tsc --noEmit",
|
|
25
|
-
"
|
|
93
|
+
"tsc": "tsc",
|
|
94
|
+
"build": "nx run-many -p @builder.io/sdk-qwik -t tsc build:node build:edge build:browser",
|
|
95
|
+
"build:one": "vite build --mode lib",
|
|
96
|
+
"build:node": "SDK_ENV=node yarn build:one",
|
|
97
|
+
"build:edge": "SDK_ENV=edge yarn build:one",
|
|
98
|
+
"build:browser": "SDK_ENV=browser yarn build:one"
|
|
26
99
|
},
|
|
27
100
|
"devDependencies": {
|
|
28
101
|
"@builder.io/qwik": "^1.2.6",
|
|
102
|
+
"@builder.io/sdks": "workspace:*",
|
|
29
103
|
"@types/node": "latest",
|
|
30
104
|
"nx": "^16.6.0",
|
|
31
105
|
"nx-cloud": "^16.2.0",
|
|
@@ -37,9 +111,6 @@
|
|
|
37
111
|
"undici": "^5.14.0"
|
|
38
112
|
},
|
|
39
113
|
"nx": {
|
|
40
|
-
"implicitDependencies": [
|
|
41
|
-
"@builder.io/sdks"
|
|
42
|
-
],
|
|
43
114
|
"targets": {
|
|
44
115
|
"build": {
|
|
45
116
|
"dependsOn": [
|
|
@@ -48,8 +119,7 @@
|
|
|
48
119
|
],
|
|
49
120
|
"outputs": [
|
|
50
121
|
"{projectRoot}/lib",
|
|
51
|
-
"{projectRoot}/types"
|
|
52
|
-
"{projectRoot}/dist"
|
|
122
|
+
"{projectRoot}/types"
|
|
53
123
|
]
|
|
54
124
|
}
|
|
55
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.8";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { runInEdge as evaluator } from './edge-runtime.js';
|
|
@@ -15,4 +15,4 @@ export type Executor = (args: ExecutorArgs) => any;
|
|
|
15
15
|
export type FunctionArguments = ReturnType<typeof getFunctionArguments>;
|
|
16
16
|
export declare const getFunctionArguments: ({ builder, context, event, state }: Pick<ExecutorArgs, "context" | "builder" | "event"> & {
|
|
17
17
|
state: BuilderRenderState;
|
|
18
|
-
}) => [string, Event |
|
|
18
|
+
}) => [string, Event | import("../../context/types.js").BuilderRenderContext | BuilderRenderState | BuilderGlobals | undefined][];
|
|
@@ -33,7 +33,8 @@ type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
|
|
|
33
33
|
searchParams?: undefined;
|
|
34
34
|
});
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Given an `apiKey` and `url` (or `path` + `searchParams`), provides all props that `Content` needs to render Builder Content.
|
|
37
|
+
*
|
|
37
38
|
*/
|
|
38
39
|
export declare const fetchBuilderProps: (_args: GetBuilderPropsOptions) => Promise<ContentVariantsPrps>;
|
|
39
40
|
export {};
|
|
@@ -5,17 +5,16 @@ import type { GetContentOptions } from './types.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function fetchOneEntry(options: GetContentOptions): Promise<BuilderContent | null>;
|
|
7
7
|
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
* Consider using `fetchBuilderProps` instead for easier setup.
|
|
8
|
+
* @deprecated `getContent` was renamed to `fetchOneEntry`. This is a temporary alias to avoid breaking changes.
|
|
10
9
|
*
|
|
11
|
-
* NOTE:
|
|
10
|
+
* NOTE: consider using `fetchBuilderProps` instead for easier setup.
|
|
12
11
|
*/
|
|
13
12
|
export declare const getContent: typeof fetchOneEntry;
|
|
14
13
|
type ContentResults = {
|
|
15
14
|
results: BuilderContent[];
|
|
16
15
|
};
|
|
17
16
|
/**
|
|
18
|
-
* Exported only for testing purposes.
|
|
17
|
+
* @internal Exported only for testing purposes. Do not use.
|
|
19
18
|
*/
|
|
20
19
|
export declare const _processContentResult: (options: GetContentOptions, content: ContentResults, url?: URL) => Promise<ContentResults>;
|
|
21
20
|
/**
|
|
@@ -23,7 +22,7 @@ export declare const _processContentResult: (options: GetContentOptions, content
|
|
|
23
22
|
*/
|
|
24
23
|
export declare function fetchEntries(options: GetContentOptions): Promise<ContentResults | null>;
|
|
25
24
|
/**
|
|
26
|
-
* @deprecated
|
|
25
|
+
* @deprecated `getAllContent` was renamed to `fetchEntries`. This is a temporary alias to avoid breaking changes.
|
|
27
26
|
*/
|
|
28
27
|
export declare const getAllContent: typeof fetchEntries;
|
|
29
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.6.1";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { runInEdge as evaluator } from './edge-runtime.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInNonNode
|
|
1
|
+
export { runInNonNode } from './non-node-runtime.js';
|
|
@@ -33,7 +33,8 @@ type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
|
|
|
33
33
|
searchParams?: undefined;
|
|
34
34
|
});
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Given an `apiKey` and `url` (or `path` + `searchParams`), provides all props that `Content` needs to render Builder Content.
|
|
37
|
+
*
|
|
37
38
|
*/
|
|
38
39
|
export declare const fetchBuilderProps: (_args: GetBuilderPropsOptions) => Promise<ContentVariantsPrps>;
|
|
39
40
|
export {};
|
|
@@ -5,17 +5,16 @@ import type { GetContentOptions } from './types.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function fetchOneEntry(options: GetContentOptions): Promise<BuilderContent | null>;
|
|
7
7
|
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
* Consider using `fetchBuilderProps` instead for easier setup.
|
|
8
|
+
* @deprecated `getContent` was renamed to `fetchOneEntry`. This is a temporary alias to avoid breaking changes.
|
|
10
9
|
*
|
|
11
|
-
* NOTE:
|
|
10
|
+
* NOTE: consider using `fetchBuilderProps` instead for easier setup.
|
|
12
11
|
*/
|
|
13
12
|
export declare const getContent: typeof fetchOneEntry;
|
|
14
13
|
type ContentResults = {
|
|
15
14
|
results: BuilderContent[];
|
|
16
15
|
};
|
|
17
16
|
/**
|
|
18
|
-
* Exported only for testing purposes.
|
|
17
|
+
* @internal Exported only for testing purposes. Do not use.
|
|
19
18
|
*/
|
|
20
19
|
export declare const _processContentResult: (options: GetContentOptions, content: ContentResults, url?: URL) => Promise<ContentResults>;
|
|
21
20
|
/**
|
|
@@ -23,7 +22,7 @@ export declare const _processContentResult: (options: GetContentOptions, content
|
|
|
23
22
|
*/
|
|
24
23
|
export declare function fetchEntries(options: GetContentOptions): Promise<ContentResults | null>;
|
|
25
24
|
/**
|
|
26
|
-
* @deprecated
|
|
25
|
+
* @deprecated `getAllContent` was renamed to `fetchEntries`. This is a temporary alias to avoid breaking changes.
|
|
27
26
|
*/
|
|
28
27
|
export declare const getAllContent: typeof fetchEntries;
|
|
29
28
|
export {};
|
|
@@ -10,11 +10,11 @@ import { default as Blocks } from '../components/blocks/blocks.jsx';
|
|
|
10
10
|
import { default as Content } from '../components/content-variants/content-variants.jsx';
|
|
11
11
|
export { Blocks, Content };
|
|
12
12
|
/**
|
|
13
|
-
* @deprecated
|
|
13
|
+
* @deprecated Renamed to `Blocks`.
|
|
14
14
|
*/
|
|
15
15
|
export declare const RenderBlocks: import("@builder.io/qwik").Component<import("../components/blocks/blocks.jsx").BlocksProps>;
|
|
16
16
|
/**
|
|
17
|
-
* @deprecated
|
|
17
|
+
* @deprecated Renamed to `Content`.
|
|
18
18
|
*/
|
|
19
19
|
export declare const RenderContent: import("@builder.io/qwik").Component<import("../components/content-variants/content-variants.types.js").ContentVariantsPrps & {
|
|
20
20
|
__isNestedRender?: boolean | undefined;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../../context/types';
|
|
2
|
-
export type ExecutorArgs = Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'> & {
|
|
3
|
-
useCode: string;
|
|
4
|
-
builder: {
|
|
5
|
-
isEditing: boolean | undefined;
|
|
6
|
-
isBrowser: boolean | undefined;
|
|
7
|
-
isServer: boolean | undefined;
|
|
8
|
-
};
|
|
9
|
-
event: Event | undefined;
|
|
10
|
-
};
|
|
11
|
-
export type Executor = (args: ExecutorArgs) => any;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../../context/types';
|
|
2
|
-
export type ExecutorArgs = Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'> & {
|
|
3
|
-
useCode: string;
|
|
4
|
-
builder: {
|
|
5
|
-
isEditing: boolean | undefined;
|
|
6
|
-
isBrowser: boolean | undefined;
|
|
7
|
-
isServer: boolean | undefined;
|
|
8
|
-
};
|
|
9
|
-
event: Event | undefined;
|
|
10
|
-
};
|
|
11
|
-
export type Executor = (args: ExecutorArgs) => any;
|
/package/types/functions/evaluate/{acorn-interpreter.d.ts → edge-runtime/acorn-interpreter.d.ts}
RENAMED
|
File without changes
|
/package/types/src/functions/evaluate/{acorn-interpreter.d.ts → edge-runtime/acorn-interpreter.d.ts}
RENAMED
|
File without changes
|