@builder.io/sdk-qwik 0.11.1 → 0.11.3

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 (31) hide show
  1. package/lib/browser/index.qwik.cjs +230 -254
  2. package/lib/browser/index.qwik.mjs +230 -254
  3. package/lib/edge/index.qwik.cjs +230 -254
  4. package/lib/edge/index.qwik.mjs +230 -254
  5. package/lib/node/index.qwik.cjs +230 -254
  6. package/lib/node/index.qwik.mjs +230 -254
  7. package/package.json +1 -1
  8. package/types/src/blocks/button/button.d.ts +1 -9
  9. package/types/src/blocks/button/button.types.d.ts +6 -0
  10. package/types/src/blocks/columns/columns.d.ts +2 -14
  11. package/types/src/blocks/columns/columns.types.d.ts +15 -0
  12. package/types/src/blocks/fragment/fragment.d.ts +1 -5
  13. package/types/src/blocks/fragment/fragment.types.d.ts +5 -0
  14. package/types/src/blocks/image/image.d.ts +1 -19
  15. package/types/src/blocks/image/image.types.d.ts +19 -0
  16. package/types/src/blocks/section/section.d.ts +1 -9
  17. package/types/src/blocks/section/section.types.d.ts +6 -0
  18. package/types/src/blocks/symbol/symbol.d.ts +2 -23
  19. package/types/src/blocks/symbol/symbol.types.d.ts +18 -0
  20. package/types/src/blocks/text/text.d.ts +1 -3
  21. package/types/src/blocks/text/text.types.d.ts +3 -0
  22. package/types/src/blocks/video/video.d.ts +1 -21
  23. package/types/src/blocks/video/video.types.d.ts +21 -0
  24. package/types/src/components/blocks/blocks.d.ts +1 -6
  25. package/types/src/components/blocks/blocks.types.d.ts +6 -0
  26. package/types/src/components/content-variants/content-variants.types.d.ts +30 -1
  27. package/types/src/constants/sdk-version.d.ts +1 -1
  28. package/types/src/functions/get-content/index.d.ts +1 -1
  29. package/types/src/functions/get-content/types.d.ts +2 -2
  30. package/types/src/index-helpers/blocks-exports.d.ts +2 -2
  31. package/types/src/server-index.d.ts +10 -1
@@ -1,11 +1,3 @@
1
- /**
2
- * This import is used by the Svelte SDK. Do not remove.
3
- */
4
- export interface SectionProps {
5
- maxWidth?: number;
6
- attributes?: any;
7
- children?: any;
8
- builderBlock?: any;
9
- }
1
+ import { SectionProps } from "./section.types.js";
10
2
  export declare const SectionComponent: import("@builder.io/qwik").Component<SectionProps>;
11
3
  export default SectionComponent;
@@ -0,0 +1,6 @@
1
+ export interface SectionProps {
2
+ maxWidth?: number;
3
+ attributes?: any;
4
+ children?: any;
5
+ builderBlock?: any;
6
+ }
@@ -1,26 +1,5 @@
1
- import { BuilderContent } from "../../types/builder-content.js";
2
- import { BuilderComponentsProp, PropsWithBuilderData } from "../../types/builder-props.js";
3
- /**
4
- * This import is used by the Svelte SDK. Do not remove.
5
- */
6
- export interface SymbolInfo {
7
- model?: string;
8
- entry?: string;
9
- data?: any;
10
- content?: BuilderContent;
11
- inline?: boolean;
12
- dynamic?: boolean;
13
- }
14
- /**
15
- * This import is used by the Svelte SDK. Do not remove.
16
- */
17
- export interface SymbolProps extends BuilderComponentsProp {
18
- symbol?: SymbolInfo;
19
- dataOnly?: boolean;
20
- dynamic?: boolean;
21
- attributes?: any;
22
- inheritState?: boolean;
23
- }
1
+ import { PropsWithBuilderData } from "../../types/builder-props.js";
2
+ import { SymbolProps } from "./symbol.types.js";
24
3
  export declare const setContent: (props: any, state: any) => void;
25
4
  export declare const Symbol: import("@builder.io/qwik").Component<PropsWithBuilderData<SymbolProps>>;
26
5
  export default Symbol;
@@ -0,0 +1,18 @@
1
+ import type { BuilderContent } from '../../types/builder-content.js';
2
+ import type { BuilderComponentsProp } from '../../types/builder-props.js';
3
+ interface SymbolInfo {
4
+ model?: string;
5
+ entry?: string;
6
+ data?: any;
7
+ content?: BuilderContent;
8
+ inline?: boolean;
9
+ dynamic?: boolean;
10
+ }
11
+ export interface SymbolProps extends BuilderComponentsProp {
12
+ symbol?: SymbolInfo;
13
+ dataOnly?: boolean;
14
+ dynamic?: boolean;
15
+ attributes?: any;
16
+ inheritState?: boolean;
17
+ }
18
+ export {};
@@ -1,5 +1,3 @@
1
- export interface TextProps {
2
- text?: string;
3
- }
1
+ import { TextProps } from "./text.types.js";
4
2
  export declare const Text: import("@builder.io/qwik").Component<TextProps>;
5
3
  export default Text;
@@ -0,0 +1,3 @@
1
+ export type TextProps = {
2
+ text?: string;
3
+ };
@@ -1,23 +1,3 @@
1
- import { BuilderBlock } from "../../types/builder-block.js";
2
- export interface VideoProps {
3
- attributes?: any;
4
- video?: string;
5
- autoPlay?: boolean;
6
- controls?: boolean;
7
- muted?: boolean;
8
- loop?: boolean;
9
- playsInline?: boolean;
10
- aspectRatio?: number;
11
- width?: number;
12
- height?: number;
13
- fit?: "contain" | "cover" | "fill";
14
- preload?: "auto" | "metadata" | "none";
15
- position?: "center" | "top" | "left" | "right" | "bottom" | "top left" | "top right" | "bottom left" | "bottom right";
16
- posterImage?: string;
17
- lazyLoad?: boolean;
18
- children?: any;
19
- fitContent?: boolean;
20
- builderBlock?: BuilderBlock;
21
- }
1
+ import { VideoProps } from "./video.types.js";
22
2
  export declare const Video: import("@builder.io/qwik").Component<VideoProps>;
23
3
  export default Video;
@@ -0,0 +1,21 @@
1
+ import type { BuilderBlock } from '../../types/builder-block.js';
2
+ export interface VideoProps {
3
+ attributes?: any;
4
+ video?: string;
5
+ autoPlay?: boolean;
6
+ controls?: boolean;
7
+ muted?: boolean;
8
+ loop?: boolean;
9
+ playsInline?: boolean;
10
+ aspectRatio?: number;
11
+ width?: number;
12
+ height?: number;
13
+ fit?: 'contain' | 'cover' | 'fill';
14
+ preload?: 'auto' | 'metadata' | 'none';
15
+ position?: 'center' | 'top' | 'left' | 'right' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
16
+ posterImage?: string;
17
+ lazyLoad?: boolean;
18
+ children?: any;
19
+ fitContent?: boolean;
20
+ builderBlock?: BuilderBlock;
21
+ }
@@ -1,8 +1,3 @@
1
- import { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
2
- import { BlocksWrapperProps } from "./blocks-wrapper.jsx";
3
- export type BlocksProps = Partial<Omit<BlocksWrapperProps, "BlocksWrapper" | "BlocksWrapperProps">> & {
4
- context?: BuilderContextInterface;
5
- registeredComponents?: RegisteredComponents;
6
- };
1
+ import { BlocksProps } from "./blocks.types.js";
7
2
  export declare const Blocks: import("@builder.io/qwik").Component<BlocksProps>;
8
3
  export default Blocks;
@@ -0,0 +1,6 @@
1
+ import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
2
+ import type { BlocksWrapperProps } from './blocks-wrapper.jsx';
3
+ export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
4
+ context?: BuilderContextInterface;
5
+ registeredComponents?: RegisteredComponents;
6
+ };
@@ -3,19 +3,48 @@ import type { ApiVersion } from '../../types/api-version.js';
3
3
  import type { BuilderContent } from '../../types/builder-content.js';
4
4
  import type { Nullable } from '../../types/typescript.js';
5
5
  export interface ContentVariantsPrps {
6
+ /**
7
+ * The Builder content JSON to render (required).
8
+ */
6
9
  content?: Nullable<BuilderContent>;
10
+ /**
11
+ * The Builder content `model` to render (required).
12
+ */
7
13
  model?: string;
14
+ /**
15
+ * Additional data to inject into your Builder content (optional).
16
+ */
8
17
  data?: {
9
18
  [key: string]: any;
10
19
  };
20
+ /**
21
+ *
22
+ */
11
23
  context?: BuilderRenderContext;
24
+ /**
25
+ * Your API Key: needed to dynamically fetch symbols (required).
26
+ */
12
27
  apiKey: string;
13
28
  apiVersion?: ApiVersion;
29
+ /**
30
+ * An array of custom components to register (optional).
31
+ */
14
32
  customComponents?: RegisteredComponent[];
33
+ /**
34
+ * A boolean to enable or disable tracking (optional). Defaults to `true`.
35
+ */
15
36
  canTrack?: boolean;
37
+ /**
38
+ * If provided, the API will auto-resolve localized objects to the value of this `locale` key (optional).
39
+ */
16
40
  locale?: string;
17
- /** @deprecated use `enrich` instead **/
41
+ /** @deprecated use `enrich` instead */
18
42
  includeRefs?: boolean;
43
+ /**
44
+ * A boolean to enable or disable enriching API content (optional).
45
+ *
46
+ * Enriching will Include multilevel references in the response. Defaults to `false`.
47
+ */
19
48
  enrich?: boolean;
20
49
  /**
21
50
  * The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.11.1";
1
+ export declare const SDK_VERSION = "0.11.3";
@@ -1,7 +1,7 @@
1
1
  import type { BuilderContent } from '../../types/builder-content.js';
2
2
  import type { GetContentOptions } from './types.js';
3
3
  /**
4
- * Returns a the first entry that matches the given options.
4
+ * Returns the first content entry that matches the given options.
5
5
  */
6
6
  export declare function fetchOneEntry(options: GetContentOptions): Promise<BuilderContent | null>;
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  export interface GetContentOptions {
2
- /** The model to get content for */
2
+ /** The model to get content for (required) */
3
3
  model: string;
4
- /** Your public API key */
4
+ /** Your public API key (required) */
5
5
  apiKey: string;
6
6
  /** Number of items to fetch. Default is 1 */
7
7
  limit?: number;
@@ -12,10 +12,10 @@ export { Blocks, Content };
12
12
  /**
13
13
  * @deprecated Renamed to `Blocks`.
14
14
  */
15
- export declare const RenderBlocks: import("@builder.io/qwik").Component<import("../components/blocks/blocks.jsx").BlocksProps>;
15
+ export declare const RenderBlocks: import("@builder.io/qwik").Component<import("../server-index.js").BlocksProps>;
16
16
  /**
17
17
  * @deprecated Renamed to `Content`.
18
18
  */
19
- export declare const RenderContent: import("@builder.io/qwik").Component<import("../components/content-variants/content-variants.types.js").ContentVariantsPrps & {
19
+ export declare const RenderContent: import("@builder.io/qwik").Component<import("../server-index.js").ContentProps & {
20
20
  __isNestedRender?: boolean | undefined;
21
21
  }>;
@@ -1,4 +1,14 @@
1
1
  export * from './index-helpers/top-of-file.js';
2
+ export type { ButtonProps } from './blocks/button/button.types.js';
3
+ export type { ColumnProps } from './blocks/columns/columns.types.js';
4
+ export type { FragmentProps } from './blocks/fragment/fragment.types.js';
5
+ export type { ImageProps } from './blocks/image/image.types.js';
6
+ export type { SectionProps } from './blocks/section/section.types.js';
7
+ export type { SymbolProps } from './blocks/symbol/symbol.types.js';
8
+ export type { TextProps } from './blocks/text/text.types.js';
9
+ export type { VideoProps } from './blocks/video/video.types.js';
10
+ export type { BlocksProps } from './components/blocks/blocks.types.js';
11
+ export type { ContentVariantsPrps as ContentProps } from './components/content-variants/content-variants.types.js';
2
12
  export { isEditing } from './functions/is-editing.js';
3
13
  export { isPreviewing } from './functions/is-previewing.js';
4
14
  export { createRegisterComponentMessage } from './functions/register-component.js';
@@ -9,7 +19,6 @@ export type { Settings } from './functions/set-editor-settings.js';
9
19
  export { _processContentResult, fetchEntries, fetchOneEntry, getAllContent, getContent } from './functions/get-content/index.js';
10
20
  export { getBuilderSearchParams } from './functions/get-builder-search-params/index.js';
11
21
  export { track } from './functions/track/index.js';
12
- export type { ContentProps } from './components/content/content.types.js';
13
22
  export type { RegisteredComponent } from './context/types.js';
14
23
  export type { ComponentInfo } from './types/components.js';
15
24
  export { fetchBuilderProps } from './functions/fetch-builder-props.js';