@builder.io/sdk-qwik 0.12.2 → 0.12.4

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.
Files changed (27) hide show
  1. package/lib/browser/index.qwik.cjs +255 -128
  2. package/lib/browser/index.qwik.mjs +256 -129
  3. package/lib/edge/index.qwik.cjs +255 -128
  4. package/lib/edge/index.qwik.mjs +256 -129
  5. package/lib/node/index.qwik.cjs +255 -128
  6. package/lib/node/index.qwik.mjs +256 -129
  7. package/package.json +1 -1
  8. package/types/src/blocks/button/button.d.ts +0 -1
  9. package/types/src/blocks/button/button.types.d.ts +2 -1
  10. package/types/src/blocks/columns/columns.d.ts +1 -1
  11. package/types/src/blocks/columns/columns.types.d.ts +3 -3
  12. package/types/src/blocks/symbol/symbol.types.d.ts +2 -2
  13. package/types/src/components/block/block.d.ts +1 -0
  14. package/types/src/components/block/components/block-wrapper.d.ts +1 -0
  15. package/types/src/components/block/components/component-ref/component-ref.helpers.d.ts +2 -2
  16. package/types/src/components/block/components/repeated-block.d.ts +3 -5
  17. package/types/src/components/blocks/blocks.types.d.ts +1 -0
  18. package/types/src/components/content-variants/content-variants.types.d.ts +6 -2
  19. package/types/src/constants/sdk-version.d.ts +1 -1
  20. package/types/src/functions/get-block-properties.d.ts +1 -2
  21. package/types/src/functions/get-class-prop-name.d.ts +1 -0
  22. package/types/src/functions/get-style.d.ts +12 -0
  23. package/types/src/functions/transform-block-properties.d.ts +2 -2
  24. package/types/src/functions/transform-style-property.d.ts +7 -0
  25. package/types/src/helpers/omit.d.ts +1 -0
  26. package/types/src/types/builder-block.d.ts +1 -0
  27. package/types/src/types/builder-props.d.ts +3 -0
@@ -1,4 +1,5 @@
1
- export interface ButtonProps {
1
+ import type { BuilderLinkComponentProp } from '../../types/builder-props.js';
2
+ export interface ButtonProps extends BuilderLinkComponentProp {
2
3
  attributes?: any;
3
4
  text?: string;
4
5
  link?: string;
@@ -17,4 +17,4 @@ export declare const columnCssVars: (props: any, state: any, index: number) => D
17
17
  export declare const getWidthForBreakpointSize: (props: any, state: any, size: SizeName) => number;
18
18
  export declare const Columns: import("@builder.io/qwik").Component<PropsWithBuilderData<ColumnProps>>;
19
19
  export default Columns;
20
- export declare const STYLES = "\n.div-Columns {\n display: flex;\n line-height: normal;\n}\n.div-Columns-2 {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n";
20
+ export declare const STYLES = "\n.div-Columns {\n display: flex;\n line-height: normal;\n}\n";
@@ -1,13 +1,13 @@
1
1
  import type { BuilderBlock } from '../../types/builder-block.js';
2
- import type { BuilderComponentsProp } from '../../types/builder-props.js';
2
+ import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
3
3
  type Column = {
4
4
  blocks: BuilderBlock[];
5
5
  width?: number;
6
+ link?: string;
6
7
  };
7
8
  type StackColumnsAt = 'tablet' | 'mobile' | 'never';
8
- export interface ColumnProps extends BuilderComponentsProp {
9
+ export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp {
9
10
  columns?: Column[];
10
- builderBlock: BuilderBlock;
11
11
  space?: number;
12
12
  stackColumnsAt?: StackColumnsAt;
13
13
  reverseColumnsWhenStacked?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { BuilderContent } from '../../types/builder-content.js';
2
- import type { BuilderComponentsProp } from '../../types/builder-props.js';
2
+ import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
3
3
  interface SymbolInfo {
4
4
  model?: string;
5
5
  entry?: string;
@@ -8,7 +8,7 @@ interface SymbolInfo {
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
10
  }
11
- export interface SymbolProps extends BuilderComponentsProp {
11
+ export interface SymbolProps extends BuilderComponentsProp, BuilderLinkComponentProp {
12
12
  symbol?: SymbolInfo;
13
13
  dataOnly?: boolean;
14
14
  dynamic?: boolean;
@@ -4,6 +4,7 @@ export type BlockProps = {
4
4
  block: BuilderBlock;
5
5
  context: BuilderContextInterface;
6
6
  registeredComponents: RegisteredComponents;
7
+ linkComponent: any;
7
8
  };
8
9
  export declare const Block: import("@builder.io/qwik").Component<BlockProps>;
9
10
  export default Block;
@@ -5,6 +5,7 @@ type BlockWrapperProps = {
5
5
  Wrapper: string;
6
6
  block: BuilderBlock;
7
7
  context: BuilderContextInterface;
8
+ linkComponent: any;
8
9
  };
9
10
  /**
10
11
  * This component renders a block's wrapper HTML element (from the block's `tagName` property).
@@ -14,6 +14,7 @@ export interface ComponentProps {
14
14
  blockChildren: BuilderBlock[];
15
15
  context: BuilderContextInterface;
16
16
  registeredComponents: RegisteredComponents;
17
+ linkComponent: any;
17
18
  builderBlock: BuilderBlock;
18
19
  includeBlockProps: boolean;
19
20
  isInteractive: boolean | undefined;
@@ -23,8 +24,7 @@ export declare const getWrapperProps: ({ componentOptions, builderBlock, context
23
24
  }) => InteractiveElementProps | {
24
25
  attributes?: {
25
26
  'builder-id': string | undefined;
26
- style: string | Partial<CSSStyleDeclaration> | undefined;
27
- class: string;
27
+ style: string | Partial<CSSStyleDeclaration>;
28
28
  href: any;
29
29
  } | {
30
30
  [index: string]: any;
@@ -1,9 +1,7 @@
1
- import { BuilderContextInterface, RegisteredComponents } from "../../../context/types.js";
2
- import { BuilderBlock } from "../../../types/builder-block.js";
3
- type Props = {
4
- block: BuilderBlock;
1
+ import { BuilderContextInterface } from "../../../context/types.js";
2
+ import { BlockProps } from "../block.jsx";
3
+ type Props = Omit<BlockProps, "context"> & {
5
4
  repeatContext: BuilderContextInterface;
6
- registeredComponents: RegisteredComponents;
7
5
  };
8
6
  export declare const RepeatedBlock: import("@builder.io/qwik").Component<Props>;
9
7
  export default RepeatedBlock;
@@ -3,4 +3,5 @@ import type { BlocksWrapperProps } from './blocks-wrapper.jsx';
3
3
  export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
4
4
  context?: BuilderContextInterface;
5
5
  registeredComponents?: RegisteredComponents;
6
+ linkComponent?: any;
6
7
  };
@@ -30,6 +30,10 @@ export interface ContentVariantsPrps {
30
30
  * An array of custom components to register (optional).
31
31
  */
32
32
  customComponents?: RegisteredComponent[];
33
+ /**
34
+ * The component to use for rendering links. Defaults to anchor element `<a>`.
35
+ */
36
+ linkComponent?: any;
33
37
  /**
34
38
  * A boolean to enable or disable tracking (optional). Defaults to `true`.
35
39
  */
@@ -47,7 +51,7 @@ export interface ContentVariantsPrps {
47
51
  */
48
52
  enrich?: boolean;
49
53
  /**
50
- * The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
54
+ * The element that wraps your content. Defaults to `<div>` ('ScrollView' in React Native).
51
55
  */
52
56
  contentWrapper?: any;
53
57
  /**
@@ -55,7 +59,7 @@ export interface ContentVariantsPrps {
55
59
  */
56
60
  contentWrapperProps?: any;
57
61
  /**
58
- * The element that wraps your blocks. Defaults to `div` ('ScrollView' in React Native).
62
+ * The element that wraps your blocks. Defaults to `<div>` ('ScrollView' in React Native).
59
63
  */
60
64
  blocksWrapper?: any;
61
65
  /**
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.12.2";
1
+ export declare const SDK_VERSION = "0.12.4";
@@ -5,7 +5,6 @@ export declare function getBlockProperties({ block, context }: {
5
5
  context: BuilderContextInterface;
6
6
  }): {
7
7
  'builder-id': string | undefined;
8
- style: string | Partial<CSSStyleDeclaration> | undefined;
9
- class: string;
8
+ style: string | Partial<CSSStyleDeclaration>;
10
9
  href: any;
11
10
  };
@@ -0,0 +1 @@
1
+ export declare const getClassPropName: () => "className" | "class";
@@ -0,0 +1,12 @@
1
+ import type { BuilderContextInterface } from '../context/types.js';
2
+ import type { BuilderBlock } from '../types/builder-block.js';
3
+ export declare const getStyle: ({ block, context }: {
4
+ block: BuilderBlock;
5
+ context: BuilderContextInterface;
6
+ }) => string | Partial<CSSStyleDeclaration>;
7
+ /**
8
+ * Svelte does not support style attribute as an object so we need to flatten it.
9
+ *
10
+ * Additionally, Svelte, Vue and other frameworks use kebab-case styles, so we need to convert them.
11
+ */
12
+ export declare function mapStyleObjToStrIfNeeded(style: Partial<CSSStyleDeclaration>): string | Partial<CSSStyleDeclaration>;
@@ -1,5 +1,5 @@
1
- import type { BuilderContextInterface } from '../context/types';
2
- import type { BuilderBlock } from '../types/builder-block';
1
+ import type { BuilderContextInterface } from '../context/types.js';
2
+ import type { BuilderBlock } from '../types/builder-block.js';
3
3
  export declare function transformBlockProperties<T>({ properties }: {
4
4
  properties: T;
5
5
  context: BuilderContextInterface;
@@ -0,0 +1,7 @@
1
+ import type { BuilderContextInterface } from '../context/types.js';
2
+ import type { BuilderBlock } from '../types/builder-block.js';
3
+ export declare function transformStyleProperty({ style }: {
4
+ style: Partial<CSSStyleDeclaration>;
5
+ context: BuilderContextInterface;
6
+ block: BuilderBlock;
7
+ }): Partial<CSSStyleDeclaration>;
@@ -0,0 +1 @@
1
+ export declare function omit<T extends object>(obj: T, ...values: (keyof T)[]): Partial<T>;
@@ -54,6 +54,7 @@ export interface BuilderBlock {
54
54
  } | null;
55
55
  animations?: any[];
56
56
  style?: Partial<CSSStyleDeclaration>;
57
+ href?: string;
57
58
  /**
58
59
  * generated by the "Hide If" binding
59
60
  */
@@ -7,3 +7,6 @@ export type PropsWithBuilderData<T> = T & {
7
7
  export type BuilderComponentsProp = {
8
8
  builderComponents: RegisteredComponents;
9
9
  };
10
+ export type BuilderLinkComponentProp = {
11
+ builderLinkComponent?: any;
12
+ };