@bedrock-layout/solid 0.12.0 → 1.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.
@@ -6,27 +6,27 @@
6
6
  * attribute where its appropriate.
7
7
  */
8
8
  import { JSX } from "solid-js";
9
- export declare type OmitAndMerge<A, B> = A & Omit<B, keyof A>;
10
- export declare type Accessor<T = unknown> = () => T;
11
- export declare type Maybe<T> = NonNullable<T> | undefined;
12
- export declare type ValidElements = keyof JSX.IntrinsicElements;
13
- export declare type ValidComponent<P> = (props: P) => JSX.Element;
14
- export declare type ValidConstructor = ValidElements | ValidComponent<any> | (string & {});
15
- export declare type DynamicProps<T extends ValidConstructor> = T extends ValidElements ? JSX.IntrinsicElements[T] : T extends ValidComponent<infer U> ? U : Record<string, unknown>;
16
- declare type UnboxIntrinsicElements<T> = T extends JSX.HTMLAttributes<infer U> ? U : never;
17
- declare type RefCallback<T> = (el: T) => void;
18
- declare type RefField<T> = T | RefCallback<T>;
19
- declare type UnboxComponentProp<U> = U extends {
9
+ export type OmitAndMerge<A, B> = A & Omit<B, keyof A>;
10
+ export type Accessor<T = unknown> = () => T;
11
+ export type Maybe<T> = NonNullable<T> | undefined;
12
+ export type ValidElements = keyof JSX.IntrinsicElements;
13
+ export type ValidComponent<P> = (props: P) => JSX.Element;
14
+ export type ValidConstructor = ValidElements | ValidComponent<any> | (string & {});
15
+ export type DynamicProps<T extends ValidConstructor> = T extends ValidElements ? JSX.IntrinsicElements[T] : T extends ValidComponent<infer U> ? U : Record<string, unknown>;
16
+ type UnboxIntrinsicElements<T> = T extends JSX.HTMLAttributes<infer U> ? U : never;
17
+ type RefCallback<T> = (el: T) => void;
18
+ type RefField<T> = T | RefCallback<T>;
19
+ type UnboxComponentProp<U> = U extends {
20
20
  ref: infer X;
21
21
  } ? X : never;
22
- export declare type DynamicNode<T extends ValidConstructor> = T extends ValidElements ? UnboxIntrinsicElements<JSX.IntrinsicElements[T]> : T extends ValidComponent<infer U> ? UnboxComponentProp<U> : never;
22
+ export type DynamicNode<T extends ValidConstructor> = T extends ValidElements ? UnboxIntrinsicElements<JSX.IntrinsicElements[T]> : T extends ValidComponent<infer U> ? UnboxComponentProp<U> : never;
23
23
  export interface WithRef<T extends ValidConstructor> {
24
24
  ref?: RefField<DynamicNode<T>>;
25
25
  }
26
26
  export interface DynamicComponentWithRef<T extends ValidConstructor> extends WithRef<T> {
27
27
  as?: T;
28
28
  }
29
- export declare type HeadlessPropsWithRef<T extends ValidConstructor, V = {}> = OmitAndMerge<V & DynamicComponentWithRef<T>, DynamicProps<T>>;
29
+ export type HeadlessPropsWithRef<T extends ValidConstructor, V = {}> = OmitAndMerge<V & DynamicComponentWithRef<T>, DynamicProps<T>>;
30
30
  export declare function convertToMaybe<T extends unknown>(value: T): Maybe<T>;
31
31
  export declare function omitProps<T extends Record<string, any>, K extends keyof T>(value: T, keys: K[]): Omit<T, K>;
32
32
  export default function createDynamic<T extends ValidConstructor>(source: () => T, props: DynamicProps<T>): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrock-layout/solid",
3
- "version": "0.12.0",
3
+ "version": "1.1.0",
4
4
  "description": "Solid Foundational Layout Primitives for your Solid-js App",
5
5
  "info": "Solid Bedrock Layout is a Solid.js port of the Bedrock Layout primitives written for react. Bedrock primitives are built to allow you to compose them together to create your own custom layouts. Many 'complex' layouts can be created by composing Bedrock Layout Primitives",
6
6
  "sideEffects": false,
@@ -53,11 +53,11 @@
53
53
  "url": "git+https://github.com/Bedrock-Layouts/Solid-Bedrock.git"
54
54
  },
55
55
  "peerDependencies": {
56
+ "@bedrock-layout/css": "^2.1.0",
56
57
  "solid-js": "^1.3.7"
57
58
  },
58
59
  "dependencies": {
59
- "@bedrock-layout/bedrock-layout-css": "^2.0.3",
60
- "@bedrock-layout/register-resize-callback": "^1.1.0"
60
+ "@bedrock-layout/register-resize-callback": "^2.0.0"
61
61
  },
62
62
  "scripts": {
63
63
  "test": "echo \"Error: run tests from root\" && exit 1",
@@ -72,5 +72,5 @@
72
72
  "bugs": {
73
73
  "url": "https://github.com/Bedrock-Layouts/Solid-Bedrock/issues"
74
74
  },
75
- "gitHead": "15a3f6fd90d8503427248b2c9f941f241876156b"
75
+ "gitHead": "c47016e5ede0f09fbc2f9ad42905ffd45c0b5c6a"
76
76
  }