@builder.io/sdk-qwik 0.5.0 → 0.5.1-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 +20 -11
- package/lib/index.qwik.mjs +21 -12
- package/package.json +1 -1
- package/types/components/block/components/component-ref/component-ref.helpers.d.ts +1 -1
- package/types/components/blocks/blocks.d.ts +2 -2
- package/types/components/content/index.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/components.context.d.ts +2 -0
- package/types/index-helpers/blocks-exports.d.ts +10 -10
package/lib/index.qwik.cjs
CHANGED
|
@@ -38,6 +38,8 @@ const STYLES$3 = `
|
|
|
38
38
|
all: unset;
|
|
39
39
|
}
|
|
40
40
|
`;
|
|
41
|
+
const builderContext = qwik.createContextId("Builder");
|
|
42
|
+
const ComponentsContext = qwik.createContextId("Components");
|
|
41
43
|
function getBlockComponentOptions(block) {
|
|
42
44
|
return {
|
|
43
45
|
...block.component?.options,
|
|
@@ -8667,7 +8669,6 @@ const ComponentRef = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8667
8669
|
}, 0, "z6_0") : null
|
|
8668
8670
|
}, 1, "z6_1");
|
|
8669
8671
|
}, "ComponentRef_component_tFQoBV6UFdc"));
|
|
8670
|
-
const builderContext = qwik.createContextId("Builder");
|
|
8671
8672
|
const RepeatedBlock = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
8672
8673
|
const state = qwik.useStore({
|
|
8673
8674
|
store: props.repeatContext
|
|
@@ -8971,6 +8972,8 @@ const STYLES$2 = `
|
|
|
8971
8972
|
}
|
|
8972
8973
|
`;
|
|
8973
8974
|
const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
8975
|
+
const builderContext$1 = qwik.useContext(builderContext);
|
|
8976
|
+
const componentsContext = qwik.useContext(ComponentsContext);
|
|
8974
8977
|
return /* @__PURE__ */ qwik._jsxC(BlocksWrapper, {
|
|
8975
8978
|
get blocks() {
|
|
8976
8979
|
return props.blocks;
|
|
@@ -8989,18 +8992,20 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
8989
8992
|
return /* @__PURE__ */ qwik._jsxC(Block, {
|
|
8990
8993
|
block,
|
|
8991
8994
|
get context() {
|
|
8992
|
-
return props.context;
|
|
8995
|
+
return props.context || builderContext$1;
|
|
8993
8996
|
},
|
|
8994
8997
|
get registeredComponents() {
|
|
8995
|
-
return props.registeredComponents;
|
|
8998
|
+
return props.registeredComponents || componentsContext.registeredComponents;
|
|
8996
8999
|
},
|
|
8997
9000
|
[qwik._IMMUTABLE]: {
|
|
8998
|
-
context: qwik._fnSignal((p0) =>
|
|
9001
|
+
context: qwik._fnSignal((p0, p1) => p1.context || p0, [
|
|
9002
|
+
builderContext$1,
|
|
8999
9003
|
props
|
|
9000
|
-
], "
|
|
9001
|
-
registeredComponents: qwik._fnSignal((p0) => p0.registeredComponents, [
|
|
9004
|
+
], "p1.context||p0"),
|
|
9005
|
+
registeredComponents: qwik._fnSignal((p0, p1) => p1.registeredComponents || p0.registeredComponents, [
|
|
9006
|
+
componentsContext,
|
|
9002
9007
|
props
|
|
9003
|
-
], "p0.registeredComponents")
|
|
9008
|
+
], "p1.registeredComponents||p0.registeredComponents")
|
|
9004
9009
|
}
|
|
9005
9010
|
}, 3, "render-block-" + block.id);
|
|
9006
9011
|
}) : null,
|
|
@@ -9008,12 +9013,13 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
9008
9013
|
return /* @__PURE__ */ qwik._jsxC(BlockStyles, {
|
|
9009
9014
|
block,
|
|
9010
9015
|
get context() {
|
|
9011
|
-
return props.context;
|
|
9016
|
+
return props.context || builderContext$1;
|
|
9012
9017
|
},
|
|
9013
9018
|
[qwik._IMMUTABLE]: {
|
|
9014
|
-
context: qwik._fnSignal((p0) =>
|
|
9019
|
+
context: qwik._fnSignal((p0, p1) => p1.context || p0, [
|
|
9020
|
+
builderContext$1,
|
|
9015
9021
|
props
|
|
9016
|
-
], "
|
|
9022
|
+
], "p1.context||p0")
|
|
9017
9023
|
}
|
|
9018
9024
|
}, 3, "block-style-" + block.id);
|
|
9019
9025
|
}) : null
|
|
@@ -11109,7 +11115,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
11109
11115
|
}
|
|
11110
11116
|
};
|
|
11111
11117
|
};
|
|
11112
|
-
const SDK_VERSION = "0.5.0";
|
|
11118
|
+
const SDK_VERSION = "0.5.1-0";
|
|
11113
11119
|
const registry = {};
|
|
11114
11120
|
function register(type, info) {
|
|
11115
11121
|
let typeList = registry[type];
|
|
@@ -11655,6 +11661,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
11655
11661
|
}, {
|
|
11656
11662
|
deep: true
|
|
11657
11663
|
});
|
|
11664
|
+
qwik.useContextProvider(ComponentsContext, qwik.useStore({
|
|
11665
|
+
registeredComponents: state.registeredComponents
|
|
11666
|
+
}));
|
|
11658
11667
|
return /* @__PURE__ */ qwik._jsxC(EnableEditor, {
|
|
11659
11668
|
get content() {
|
|
11660
11669
|
return props.content;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { componentQrl, inlinedQrl, useStylesScopedQrl, _jsxC, _jsxS, _fnSignal, _jsxQ, _jsxBranch, useStore, useComputedQrl, useLexicalScope, _IMMUTABLE, Slot,
|
|
1
|
+
import { componentQrl, inlinedQrl, useStylesScopedQrl, _jsxC, _jsxS, _fnSignal, createContextId, _jsxQ, _jsxBranch, useStore, useComputedQrl, useLexicalScope, _IMMUTABLE, Slot, useContextProvider, _wrapProp, useContext, createElement, Fragment as Fragment$1, useSignal, useTaskQrl, useVisibleTaskQrl } from "@builder.io/qwik";
|
|
2
2
|
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
3
3
|
const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
4
4
|
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$3, "Button_component_useStylesScoped_a1JZ0Q0Q2Oc"));
|
|
@@ -36,6 +36,8 @@ const STYLES$3 = `
|
|
|
36
36
|
all: unset;
|
|
37
37
|
}
|
|
38
38
|
`;
|
|
39
|
+
const builderContext = createContextId("Builder");
|
|
40
|
+
const ComponentsContext = createContextId("Components");
|
|
39
41
|
function getBlockComponentOptions(block) {
|
|
40
42
|
return {
|
|
41
43
|
...block.component?.options,
|
|
@@ -8665,7 +8667,6 @@ const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8665
8667
|
}, 0, "z6_0") : null
|
|
8666
8668
|
}, 1, "z6_1");
|
|
8667
8669
|
}, "ComponentRef_component_tFQoBV6UFdc"));
|
|
8668
|
-
const builderContext = createContextId("Builder");
|
|
8669
8670
|
const RepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
8670
8671
|
const state = useStore({
|
|
8671
8672
|
store: props.repeatContext
|
|
@@ -8969,6 +8970,8 @@ const STYLES$2 = `
|
|
|
8969
8970
|
}
|
|
8970
8971
|
`;
|
|
8971
8972
|
const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
8973
|
+
const builderContext$1 = useContext(builderContext);
|
|
8974
|
+
const componentsContext = useContext(ComponentsContext);
|
|
8972
8975
|
return /* @__PURE__ */ _jsxC(BlocksWrapper, {
|
|
8973
8976
|
get blocks() {
|
|
8974
8977
|
return props.blocks;
|
|
@@ -8987,18 +8990,20 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
8987
8990
|
return /* @__PURE__ */ _jsxC(Block, {
|
|
8988
8991
|
block,
|
|
8989
8992
|
get context() {
|
|
8990
|
-
return props.context;
|
|
8993
|
+
return props.context || builderContext$1;
|
|
8991
8994
|
},
|
|
8992
8995
|
get registeredComponents() {
|
|
8993
|
-
return props.registeredComponents;
|
|
8996
|
+
return props.registeredComponents || componentsContext.registeredComponents;
|
|
8994
8997
|
},
|
|
8995
8998
|
[_IMMUTABLE]: {
|
|
8996
|
-
context: _fnSignal((p0) =>
|
|
8999
|
+
context: _fnSignal((p0, p1) => p1.context || p0, [
|
|
9000
|
+
builderContext$1,
|
|
8997
9001
|
props
|
|
8998
|
-
], "
|
|
8999
|
-
registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
|
|
9002
|
+
], "p1.context||p0"),
|
|
9003
|
+
registeredComponents: _fnSignal((p0, p1) => p1.registeredComponents || p0.registeredComponents, [
|
|
9004
|
+
componentsContext,
|
|
9000
9005
|
props
|
|
9001
|
-
], "p0.registeredComponents")
|
|
9006
|
+
], "p1.registeredComponents||p0.registeredComponents")
|
|
9002
9007
|
}
|
|
9003
9008
|
}, 3, "render-block-" + block.id);
|
|
9004
9009
|
}) : null,
|
|
@@ -9006,12 +9011,13 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
9006
9011
|
return /* @__PURE__ */ _jsxC(BlockStyles, {
|
|
9007
9012
|
block,
|
|
9008
9013
|
get context() {
|
|
9009
|
-
return props.context;
|
|
9014
|
+
return props.context || builderContext$1;
|
|
9010
9015
|
},
|
|
9011
9016
|
[_IMMUTABLE]: {
|
|
9012
|
-
context: _fnSignal((p0) =>
|
|
9017
|
+
context: _fnSignal((p0, p1) => p1.context || p0, [
|
|
9018
|
+
builderContext$1,
|
|
9013
9019
|
props
|
|
9014
|
-
], "
|
|
9020
|
+
], "p1.context||p0")
|
|
9015
9021
|
}
|
|
9016
9022
|
}, 3, "block-style-" + block.id);
|
|
9017
9023
|
}) : null
|
|
@@ -11107,7 +11113,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
11107
11113
|
}
|
|
11108
11114
|
};
|
|
11109
11115
|
};
|
|
11110
|
-
const SDK_VERSION = "0.5.0";
|
|
11116
|
+
const SDK_VERSION = "0.5.1-0";
|
|
11111
11117
|
const registry = {};
|
|
11112
11118
|
function register(type, info) {
|
|
11113
11119
|
let typeList = registry[type];
|
|
@@ -11653,6 +11659,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
11653
11659
|
}, {
|
|
11654
11660
|
deep: true
|
|
11655
11661
|
});
|
|
11662
|
+
useContextProvider(ComponentsContext, useStore({
|
|
11663
|
+
registeredComponents: state.registeredComponents
|
|
11664
|
+
}));
|
|
11656
11665
|
return /* @__PURE__ */ _jsxC(EnableEditor, {
|
|
11657
11666
|
get content() {
|
|
11658
11667
|
return props.content;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
|
|
2
2
|
import type { BuilderBlock } from '../../../../types/builder-block.js';
|
|
3
3
|
import type { PropsWithBuilderData } from '../../../../types/builder-props.js';
|
|
4
|
-
import type { InteractiveElementProps } from '../interactive-element';
|
|
4
|
+
import type { InteractiveElementProps } from '../interactive-element.js';
|
|
5
5
|
type ComponentOptions = PropsWithBuilderData<{
|
|
6
6
|
[index: string]: any;
|
|
7
7
|
attributes?: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
2
2
|
import { BlocksWrapperProps } from "./blocks-wrapper";
|
|
3
3
|
export type BlocksProps = Partial<BlocksWrapperProps> & {
|
|
4
|
-
context
|
|
5
|
-
registeredComponents
|
|
4
|
+
context?: BuilderContextInterface;
|
|
5
|
+
registeredComponents?: RegisteredComponents;
|
|
6
6
|
};
|
|
7
7
|
export declare const Blocks: import("@builder.io/qwik").Component<BlocksProps>;
|
|
8
8
|
export default Blocks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './content';
|
|
1
|
+
export { default } from './content.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.0";
|
|
1
|
+
export declare const SDK_VERSION = "0.5.1-0";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { default as Button } from '../blocks/button/button';
|
|
2
|
-
export { default as Columns } from '../blocks/columns/columns';
|
|
3
|
-
export { default as Fragment } from '../blocks/fragment/fragment';
|
|
4
|
-
export { default as Image } from '../blocks/image/image';
|
|
5
|
-
export { default as RenderBlocks } from '../components/blocks/blocks';
|
|
6
|
-
export { default as Section } from '../blocks/section/section';
|
|
7
|
-
export { default as Symbol } from '../blocks/symbol/symbol';
|
|
8
|
-
export { default as Text } from '../blocks/text/text';
|
|
9
|
-
export { default as Video } from '../blocks/video/video';
|
|
10
|
-
export { default as RenderContent } from '../components/content-variants/content-variants';
|
|
1
|
+
export { default as Button } from '../blocks/button/button.js';
|
|
2
|
+
export { default as Columns } from '../blocks/columns/columns.js';
|
|
3
|
+
export { default as Fragment } from '../blocks/fragment/fragment.js';
|
|
4
|
+
export { default as Image } from '../blocks/image/image.js';
|
|
5
|
+
export { default as RenderBlocks } from '../components/blocks/blocks.js';
|
|
6
|
+
export { default as Section } from '../blocks/section/section.js';
|
|
7
|
+
export { default as Symbol } from '../blocks/symbol/symbol.js';
|
|
8
|
+
export { default as Text } from '../blocks/text/text.js';
|
|
9
|
+
export { default as Video } from '../blocks/video/video.js';
|
|
10
|
+
export { default as RenderContent } from '../components/content-variants/content-variants.js';
|