@bedrock-layout/solid 0.12.1 → 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.
- package/lib/center.d.ts +2 -2
- package/lib/column-drop.d.ts +3 -3
- package/lib/columns.d.ts +7 -12
- package/lib/cover.d.ts +6 -7
- package/lib/frame.d.ts +3 -3
- package/lib/grid.d.ts +3 -3
- package/lib/index.cjs.js +219 -1
- package/lib/index.m.js +1021 -1008
- package/lib/index.umd.js +219 -1
- package/lib/inline-cluster.d.ts +1 -1
- package/lib/inline.d.ts +5 -6
- package/lib/padbox.d.ts +3 -3
- package/lib/reel.d.ts +1 -1
- package/lib/spacing-constants.d.ts +26 -26
- package/lib/split.d.ts +7 -9
- package/lib/stack.d.ts +1 -1
- package/lib/typeUtils.d.ts +13 -13
- package/package.json +3 -3
package/lib/typeUtils.d.ts
CHANGED
|
@@ -6,27 +6,27 @@
|
|
|
6
6
|
* attribute where its appropriate.
|
|
7
7
|
*/
|
|
8
8
|
import { JSX } from "solid-js";
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
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
|
|
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": "
|
|
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,10 +53,10 @@
|
|
|
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
60
|
"@bedrock-layout/register-resize-callback": "^2.0.0"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"bugs": {
|
|
73
73
|
"url": "https://github.com/Bedrock-Layouts/Solid-Bedrock/issues"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "c47016e5ede0f09fbc2f9ad42905ffd45c0b5c6a"
|
|
76
76
|
}
|