@builder.io/sdk-qwik 0.8.0 → 0.9.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.
@@ -17,4 +17,20 @@ export interface ContentVariantsPrps {
17
17
  /** @deprecated use `enrich` instead **/
18
18
  includeRefs?: boolean;
19
19
  enrich?: boolean;
20
+ /**
21
+ * The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
22
+ */
23
+ contentWrapper?: any;
24
+ /**
25
+ * Additonal props to pass to `contentWrapper`. Defaults to `{}`.
26
+ */
27
+ contentWrapperProps?: any;
28
+ /**
29
+ * The element that wraps your blocks. Defaults to `div` ('ScrollView' in React Native).
30
+ */
31
+ blocksWrapper?: any;
32
+ /**
33
+ * Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
34
+ */
35
+ blocksWrapperProps?: any;
20
36
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.8.0";
1
+ export declare const SDK_VERSION = "0.9.0";
@@ -1,3 +1,4 @@
1
+ import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper.jsx';
1
2
  import type { ApiVersion } from '../types/api-version.js';
2
3
  import type { BuilderContent } from '../types/builder-content.js';
3
4
  import type { ComponentInfo } from '../types/components.js';
@@ -8,7 +9,7 @@ export type RegisteredComponent = ComponentInfo & {
8
9
  export type RegisteredComponents = Dictionary<RegisteredComponent>;
9
10
  export type BuilderRenderState = Record<string, unknown>;
10
11
  export type BuilderRenderContext = Record<string, unknown>;
11
- export interface BuilderContextInterface {
12
+ export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
12
13
  content: Nullable<BuilderContent>;
13
14
  context: BuilderRenderContext;
14
15
  /**
@@ -1,5 +1 @@
1
- /**
2
- * We use the less hacky, but more modern `createRequire` API. That's because the `eval('require')` trick does
3
- * not work with for this framework.
4
- */
5
1
  export declare let safeDynamicRequire: typeof require;
@@ -1 +1,7 @@
1
- export declare function transformBlockProperties<T>(properties: T): T;
1
+ import type { BuilderContextInterface } from '../context/types';
2
+ import type { BuilderBlock } from '../types/builder-block';
3
+ export declare function transformBlockProperties<T>({ properties }: {
4
+ properties: T;
5
+ context: BuilderContextInterface;
6
+ block: BuilderBlock;
7
+ }): T;
@@ -1,9 +1,14 @@
1
1
  import type { Prettify } from './typescript.js';
2
+ /**
3
+ * Lol Typescript
4
+ * https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
5
+ */
6
+ type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
2
7
  type OptionalFieldsOnly<T> = {
3
- [K in keyof T as T[K] extends Required<T>[K] ? never : K]: T[K];
8
+ [K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], K, never> : K]: T[K];
4
9
  };
5
10
  type RequiredFieldsOnly<T> = {
6
- [K in keyof T as T[K] extends Required<T>[K] ? K : never]: T[K];
11
+ [K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], never, K> : never]: T[K];
7
12
  };
8
13
  type Enforced<T> = {
9
14
  [K in keyof T]-?: T[K];
@@ -1,7 +0,0 @@
1
- import type { BuilderContextInterface } from '../context/types.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
3
- export declare function getReactNativeBlockStyles({ block, context, blockStyles }: {
4
- block: BuilderBlock;
5
- context: BuilderContextInterface;
6
- blockStyles: any;
7
- }): CSSStyleDeclaration | Record<string, string | undefined>;
@@ -1,3 +0,0 @@
1
- type Styles = Record<string, string | number>;
2
- export declare const sanitizeReactNativeBlockStyles: (styles: Styles) => Styles;
3
- export {};