@makeswift/runtime 0.1.4 → 0.1.5
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/dist/Box2.cjs.js +54 -0
- package/dist/Box2.cjs.js.map +1 -0
- package/dist/Box2.es.js +52 -0
- package/dist/Box2.es.js.map +1 -0
- package/dist/grid-item.cjs.js +594 -0
- package/dist/grid-item.cjs.js.map +1 -0
- package/dist/grid-item.es.js +585 -0
- package/dist/grid-item.es.js.map +1 -0
- package/dist/index.cjs.js +3 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -1
- package/dist/index.es.js.map +1 -1
- package/dist/slot.cjs.js +130 -0
- package/dist/slot.cjs.js.map +1 -0
- package/dist/slot.es.js +123 -0
- package/dist/slot.es.js.map +1 -0
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/components/builtin/Box/Box2.d.ts +8 -0
- package/dist/types/components/builtin/Box/Box2.d.ts.map +1 -0
- package/dist/types/components/experimental/box-placeholder.d.ts +2 -0
- package/dist/types/components/experimental/box-placeholder.d.ts.map +1 -0
- package/dist/types/components/experimental/box.d.ts +9 -0
- package/dist/types/components/experimental/box.d.ts.map +1 -0
- package/dist/types/components/experimental/index.d.ts +2 -0
- package/dist/types/components/experimental/index.d.ts.map +1 -0
- package/dist/types/components/hooks/useTable.d.ts +66 -0
- package/dist/types/components/hooks/useTable.d.ts.map +1 -0
- package/dist/types/components/shared/grid-item.d.ts +17 -0
- package/dist/types/components/shared/grid-item.d.ts.map +1 -0
- package/dist/types/controls/slot.d.ts +42 -0
- package/dist/types/controls/slot.d.ts.map +1 -0
- package/dist/types/css/border-radius.d.ts +20 -0
- package/dist/types/css/border-radius.d.ts.map +1 -0
- package/dist/types/css/border.d.ts +31 -0
- package/dist/types/css/border.d.ts.map +1 -0
- package/dist/types/css/box-shadow.d.ts +19 -0
- package/dist/types/css/box-shadow.d.ts.map +1 -0
- package/dist/types/css/color.d.ts +5 -0
- package/dist/types/css/color.d.ts.map +1 -0
- package/dist/types/css/length-percentage.d.ts +10 -0
- package/dist/types/css/length-percentage.d.ts.map +1 -0
- package/dist/types/css/length.d.ts +14 -0
- package/dist/types/css/length.d.ts.map +1 -0
- package/dist/types/css/margin.d.ts +20 -0
- package/dist/types/css/margin.d.ts.map +1 -0
- package/dist/types/css/padding.d.ts +20 -0
- package/dist/types/css/padding.d.ts.map +1 -0
- package/dist/types/runtimes/react/controls/slot.d.ts +26 -0
- package/dist/types/runtimes/react/controls/slot.d.ts.map +1 -0
- package/dist/types/runtimes/react/use-style.d.ts +3 -0
- package/dist/types/runtimes/react/use-style.d.ts.map +1 -0
- package/dist/types/use-global-style.d.ts +3 -0
- package/dist/types/use-global-style.d.ts.map +1 -0
- package/dist/types/use-grid-item-style.d.ts +1 -0
- package/dist/types/use-grid-item-style.d.ts.map +1 -0
- package/dist/types/use-style.d.ts +3 -0
- package/dist/types/use-style.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/css';
|
|
2
|
+
import { MarginBottomProperty, MarginLeftProperty, MarginRightProperty, MarginTopProperty } from 'csstype';
|
|
3
|
+
import { LengthData } from './length';
|
|
4
|
+
/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */
|
|
5
|
+
export declare type MarginLonghandPropertyData = LengthData | 'auto';
|
|
6
|
+
/**
|
|
7
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin
|
|
8
|
+
*
|
|
9
|
+
* @todos
|
|
10
|
+
* - Remove `null` from possible values
|
|
11
|
+
* - Remove `undefined` from possible values and make fields optional
|
|
12
|
+
*/
|
|
13
|
+
export declare type MarginPropertyData = {
|
|
14
|
+
marginTop: MarginLonghandPropertyData | MarginTopProperty<string | number> | null | undefined;
|
|
15
|
+
marginRight: MarginLonghandPropertyData | MarginRightProperty<string | number> | null | undefined;
|
|
16
|
+
marginBottom: MarginLonghandPropertyData | MarginBottomProperty<string | number> | null | undefined;
|
|
17
|
+
marginLeft: MarginLonghandPropertyData | MarginLeftProperty<string | number> | null | undefined;
|
|
18
|
+
};
|
|
19
|
+
export declare function marginPropertyDataToStyle(data: MarginPropertyData, defaultValue?: MarginPropertyData): CSSObject;
|
|
20
|
+
//# sourceMappingURL=margin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"margin.d.ts","sourceRoot":"","sources":["../../../src/css/margin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,UAAU,EAAsB,MAAM,UAAU,CAAA;AAEzD,0FAA0F;AAC1F,oBAAY,0BAA0B,GAAG,UAAU,GAAG,MAAM,CAAA;AAE5D;;;;;;GAMG;AACH,oBAAY,kBAAkB,GAAG;IAC/B,SAAS,EAAE,0BAA0B,GAAG,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;IAC7F,WAAW,EAAE,0BAA0B,GAAG,mBAAmB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;IACjG,YAAY,EACR,0BAA0B,GAC1B,oBAAoB,CAAC,MAAM,GAAG,MAAM,CAAC,GACrC,IAAI,GACJ,SAAS,CAAA;IACb,UAAU,EAAE,0BAA0B,GAAG,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;CAChG,CAAA;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,kBAAkB,EACxB,YAAY,GAAE,kBAA6C,GAC1D,SAAS,CAaX"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/css';
|
|
2
|
+
import { LengthData } from './length';
|
|
3
|
+
import { PaddingTopProperty, PaddingRightProperty, PaddingBottomProperty, PaddingLeftProperty } from 'csstype';
|
|
4
|
+
/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */
|
|
5
|
+
export declare type PaddingLonghandPropertyData = LengthData;
|
|
6
|
+
/**
|
|
7
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding
|
|
8
|
+
*
|
|
9
|
+
* @todos
|
|
10
|
+
* - Remove `null` from possible values
|
|
11
|
+
* - Remove `undefined` from possible values and make fields optional
|
|
12
|
+
*/
|
|
13
|
+
export declare type PaddingPropertyData = {
|
|
14
|
+
paddingTop: PaddingLonghandPropertyData | PaddingTopProperty<number | string> | null | undefined;
|
|
15
|
+
paddingRight: PaddingLonghandPropertyData | PaddingRightProperty<number | string> | null | undefined;
|
|
16
|
+
paddingBottom: PaddingLonghandPropertyData | PaddingBottomProperty<number | string> | null | undefined;
|
|
17
|
+
paddingLeft: PaddingLonghandPropertyData | PaddingLeftProperty<number | string> | null | undefined;
|
|
18
|
+
};
|
|
19
|
+
export declare function paddingPropertyDataToStyle(data: PaddingPropertyData, defaultValue?: PaddingPropertyData): CSSObject;
|
|
20
|
+
//# sourceMappingURL=padding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"padding.d.ts","sourceRoot":"","sources":["../../../src/css/padding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,UAAU,EAAsB,MAAM,UAAU,CAAA;AACzD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAEhB,2FAA2F;AAC3F,oBAAY,2BAA2B,GAAG,UAAU,CAAA;AAEpD;;;;;;GAMG;AACH,oBAAY,mBAAmB,GAAG;IAChC,UAAU,EAAE,2BAA2B,GAAG,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;IAChG,YAAY,EACR,2BAA2B,GAC3B,oBAAoB,CAAC,MAAM,GAAG,MAAM,CAAC,GACrC,IAAI,GACJ,SAAS,CAAA;IACb,aAAa,EACT,2BAA2B,GAC3B,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,GACtC,IAAI,GACJ,SAAS,CAAA;IACb,WAAW,EAAE,2BAA2B,GAAG,mBAAmB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;CACnG,CAAA;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,mBAAmB,EACzB,YAAY,GAAE,mBAA+C,GAC5D,SAAS,CAaX"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SlotControl, SlotControlData } from '../../../controls';
|
|
3
|
+
export declare type SlotControlValue = ReactNode;
|
|
4
|
+
export declare function useSlot(data: SlotControlData, control: SlotControl | null): JSX.Element;
|
|
5
|
+
declare type SlotProps = {
|
|
6
|
+
control: SlotControl | null;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare function Slot({ control, children }: SlotProps): JSX.Element;
|
|
10
|
+
export declare namespace Slot {
|
|
11
|
+
var Placeholder: typeof SlotPlaceholder;
|
|
12
|
+
var Item: typeof SlotItem;
|
|
13
|
+
}
|
|
14
|
+
declare type SlotItemProps = {
|
|
15
|
+
control: SlotControl | null;
|
|
16
|
+
grid: SlotControlData['columns'];
|
|
17
|
+
index: number;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
declare function SlotItem({ control, grid, index, children }: SlotItemProps): JSX.Element;
|
|
21
|
+
declare type SlotPlaceholderProps = {
|
|
22
|
+
control: SlotControl | null;
|
|
23
|
+
};
|
|
24
|
+
declare function SlotPlaceholder({ control }: SlotPlaceholderProps): JSX.Element;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/controls/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAShE,oBAAY,gBAAgB,GAAG,SAAS,CAAA;AAExC,wBAAgB,OAAO,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,eAczE;AAED,aAAK,SAAS,GAAG;IACf,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAGD,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,eAsBpD;yBAtBe,IAAI;;;;AA4BpB,aAAK,aAAa,GAAG;IACnB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAGD,iBAAS,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CA2BhF;AAED,aAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;CAC5B,CAAA;AAED,iBAAS,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAavE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-style.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/react/use-style.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,SAAS,EAAE,MAAM,cAAc,CAAA;AAS/C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAYjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-global-style.d.ts","sourceRoot":"","sources":["../../src/use-global-style.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAA;AAStE,wBAAgB,cAAc,CAAC,GAAG,IAAI,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAmEhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=use-grid-item-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-grid-item-style.d.ts","sourceRoot":"","sources":["../../src/use-grid-item-style.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-style.d.ts","sourceRoot":"","sources":["../../src/use-style.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,SAAS,EAAE,MAAM,cAAc,CAAA;AAS/C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAYjD"}
|