@makeswift/runtime 0.20.3 → 0.20.4-canary.1
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/cjs/next/api-handler/handlers/manifest.js +1 -1
- package/dist/cjs/runtimes/react/controls.js +59 -475
- package/dist/cjs/runtimes/react/controls.js.map +1 -1
- package/dist/cjs/runtimes/react/legacy-controls.js +344 -0
- package/dist/cjs/runtimes/react/legacy-controls.js.map +1 -0
- package/dist/cjs/utils/deepEqual.js +2 -29
- package/dist/cjs/utils/deepEqual.js.map +1 -1
- package/dist/cjs/utils/is.js +3 -6
- package/dist/cjs/utils/is.js.map +1 -1
- package/dist/cjs/utils/partition.js +48 -0
- package/dist/cjs/utils/partition.js.map +1 -0
- package/dist/cjs/utils/shallowEqual.js +2 -28
- package/dist/cjs/utils/shallowEqual.js.map +1 -1
- package/dist/esm/next/api-handler/handlers/manifest.js +1 -1
- package/dist/esm/runtimes/react/controls.js +58 -507
- package/dist/esm/runtimes/react/controls.js.map +1 -1
- package/dist/esm/runtimes/react/legacy-controls.js +356 -0
- package/dist/esm/runtimes/react/legacy-controls.js.map +1 -0
- package/dist/esm/utils/deepEqual.js +1 -18
- package/dist/esm/utils/deepEqual.js.map +1 -1
- package/dist/esm/utils/is.js +3 -6
- package/dist/esm/utils/is.js.map +1 -1
- package/dist/esm/utils/partition.js +23 -0
- package/dist/esm/utils/partition.js.map +1 -0
- package/dist/esm/utils/shallowEqual.js +1 -17
- package/dist/esm/utils/shallowEqual.js.map +1 -1
- package/dist/types/runtimes/react/controls.d.ts +0 -6
- package/dist/types/runtimes/react/controls.d.ts.map +1 -1
- package/dist/types/runtimes/react/legacy-controls.d.ts +7 -0
- package/dist/types/runtimes/react/legacy-controls.d.ts.map +1 -0
- package/dist/types/utils/__tests__/partition.test.d.ts +2 -0
- package/dist/types/utils/__tests__/partition.test.d.ts.map +1 -0
- package/dist/types/utils/deepEqual.d.ts +1 -1
- package/dist/types/utils/deepEqual.d.ts.map +1 -1
- package/dist/types/utils/is.d.ts +2 -1
- package/dist/types/utils/is.d.ts.map +1 -1
- package/dist/types/utils/partition.d.ts +19 -0
- package/dist/types/utils/partition.d.ts.map +1 -0
- package/dist/types/utils/shallowEqual.d.ts +1 -1
- package/dist/types/utils/shallowEqual.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/react/controls.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/react/controls.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAA;AA0CnD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC,WAAW,CAAA;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,GAAG,CAAC,OAAO,CAAA;CACtD,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAkH9E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ColorValue } from '../../components/utils/types';
|
|
3
|
+
import { ResponsiveValue } from '@makeswift/prop-controllers';
|
|
4
|
+
import { LegacyDescriptor } from '../../prop-controllers/descriptors';
|
|
5
|
+
export type ResponsiveColor = ResponsiveValue<ColorValue>;
|
|
6
|
+
export declare function resolveLegacyDescriptorProp(descriptor: LegacyDescriptor, propName: string, propData: any, props: Record<string, any>, renderFn: (props: Record<string, unknown>) => JSX.Element): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=legacy-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-controls.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/react/legacy-controls.tsx"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAa9D,OAAO,EAKL,eAAe,EAwBhB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAiBrE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,UAAU,CAAC,CAAA;AA0CzD,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,OAAO,2CAyW1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partition.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/partition.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepEqual.d.ts","sourceRoot":"","sources":["../../../src/utils/deepEqual.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deepEqual.d.ts","sourceRoot":"","sources":["../../../src/utils/deepEqual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,eAAe,SAAS,CAAA"}
|
package/dist/types/utils/is.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../../src/utils/is.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../../src/utils/is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAExC,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Predicate<T, U extends T> = (value: T) => value is U;
|
|
2
|
+
/**
|
|
3
|
+
* Splits the array into two based on the predicate's result. Returns a tuple of arrays with
|
|
4
|
+
* matching and non-matching elements, maintaining the original order within each group.
|
|
5
|
+
*
|
|
6
|
+
* If the predicate includes a type assertion, the resulting arrays will be typed accordingly.
|
|
7
|
+
*/
|
|
8
|
+
export declare function partition<T, U extends T>(array: readonly T[], predicate: Predicate<T, U>): [U[], Exclude<T, U>[]];
|
|
9
|
+
export declare function partition<T>(array: readonly T[], predicate: (value: T) => boolean): [T[], T[]];
|
|
10
|
+
/**
|
|
11
|
+
* Splits the record into two based on the predicate's result. Returns a tuple of records with
|
|
12
|
+
* matching and non-matching elements.
|
|
13
|
+
*
|
|
14
|
+
* If the predicate includes a type assertion, the resulting records will be typed accordingly.
|
|
15
|
+
*/
|
|
16
|
+
export declare function partitionRecord<T, U extends T>(obj: Record<string, T>, predicate: Predicate<T, U>): [Record<string, U>, Record<string, Exclude<T, U>>];
|
|
17
|
+
export declare function partitionRecord<T>(obj: Record<string, T>, predicate: (value: T) => boolean): [Record<string, T>, Record<string, T>];
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=partition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../src/utils/partition.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAA;AAEzD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GACzB,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;AAEzB,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAA;AAiB/F;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAC5C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACtB,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GACzB,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;AAErD,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACtB,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAC/B,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shallowEqual.d.ts","sourceRoot":"","sources":["../../../src/utils/shallowEqual.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shallowEqual.d.ts","sourceRoot":"","sources":["../../../src/utils/shallowEqual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,eAAe,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makeswift/runtime",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.4-canary.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -149,9 +149,9 @@
|
|
|
149
149
|
"use-sync-external-store": "^1.0.0-rc.0",
|
|
150
150
|
"uuid": "^9.0.0",
|
|
151
151
|
"zod": "^3.21.4",
|
|
152
|
-
"@makeswift/controls": "0.1.
|
|
152
|
+
"@makeswift/controls": "0.1.3-canary.0",
|
|
153
153
|
"@makeswift/next-plugin": "0.3.0",
|
|
154
|
-
"@makeswift/prop-controllers": "0.3.
|
|
154
|
+
"@makeswift/prop-controllers": "0.3.4-canary.0"
|
|
155
155
|
},
|
|
156
156
|
"devDependencies": {
|
|
157
157
|
"@emotion/jest": "^11.11.0",
|