@makeswift/runtime 0.10.14 → 0.10.15
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/index.cjs.js +18 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +18 -12
- package/dist/index.es.js.map +1 -1
- package/dist/react-page.cjs.js +9 -4
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +9 -4
- package/dist/react-page.es.js.map +1 -1
- package/dist/types/src/controls/image.d.ts +16 -1
- package/dist/types/src/controls/image.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/image.d.ts.map +1 -1
- package/dist/types/types/locale.d.ts +1 -1
- package/package.json +1 -1
package/dist/react-page.cjs.js
CHANGED
|
@@ -814,14 +814,19 @@ const ImageControlValueFormat = {
|
|
|
814
814
|
WithDimensions: "makeswift::controls::image::format::with-dimensions"
|
|
815
815
|
};
|
|
816
816
|
function Image(config = {}) {
|
|
817
|
-
return { type: ImageControlType, config };
|
|
817
|
+
return { type: ImageControlType, config, version: 1 };
|
|
818
818
|
}
|
|
819
819
|
Image.Format = ImageControlValueFormat;
|
|
820
820
|
function copyImageData(value, context) {
|
|
821
|
-
var _a;
|
|
822
821
|
if (value == null)
|
|
823
822
|
return value;
|
|
824
|
-
return (
|
|
823
|
+
return tsPattern.match(value).with(tsPattern.P.string, (id) => {
|
|
824
|
+
var _a;
|
|
825
|
+
return (_a = context.replacementContext.fileIds.get(id)) != null ? _a : id;
|
|
826
|
+
}).with({ type: "makeswift-file" }, ({ id }) => {
|
|
827
|
+
var _a;
|
|
828
|
+
return (_a = context.replacementContext.fileIds.get(id)) != null ? _a : id;
|
|
829
|
+
}).otherwise((val) => val);
|
|
825
830
|
}
|
|
826
831
|
if (void 0) {
|
|
827
832
|
const { describe, test, expect } = void 0;
|
|
@@ -4381,7 +4386,7 @@ function getFileIds(descriptor, prop) {
|
|
|
4381
4386
|
}
|
|
4382
4387
|
case ImageControlType: {
|
|
4383
4388
|
const value = prop;
|
|
4384
|
-
return value
|
|
4389
|
+
return tsPattern.match(value).with(tsPattern.P.string, (f) => [f]).with({ type: "makeswift-file" }, (f) => [f.id]).with({ type: "external-file" }, () => []).otherwise(() => []);
|
|
4385
4390
|
}
|
|
4386
4391
|
case ShapeControlType: {
|
|
4387
4392
|
return getShapeFileIds(descriptor, prop);
|