@makeswift/prop-controllers 0.2.0-canary.0 → 0.2.0-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.
Files changed (33) hide show
  1. package/dist/index.cjs +347 -222
  2. package/dist/types/grid/grid.d.ts +28 -28
  3. package/dist/types/image/date.d.ts +50 -0
  4. package/dist/types/image/date.d.ts.map +1 -0
  5. package/dist/types/image/date.test.d.ts +2 -0
  6. package/dist/types/image/date.test.d.ts.map +1 -0
  7. package/dist/types/image/image.d.ts +267 -0
  8. package/dist/types/image/image.d.ts.map +1 -0
  9. package/dist/types/image/image.test.d.ts +2 -0
  10. package/dist/types/image/image.test.d.ts.map +1 -0
  11. package/dist/types/image/index.d.ts +2 -0
  12. package/dist/types/image/index.d.ts.map +1 -0
  13. package/dist/types/image copy/image.d.ts +267 -0
  14. package/dist/types/image copy/image.d.ts.map +1 -0
  15. package/dist/types/image copy/image.test.d.ts +2 -0
  16. package/dist/types/image copy/image.test.d.ts.map +1 -0
  17. package/dist/types/image copy/index.d.ts +2 -0
  18. package/dist/types/image copy/index.d.ts.map +1 -0
  19. package/dist/types/images/image.d.ts +267 -0
  20. package/dist/types/images/image.d.ts.map +1 -0
  21. package/dist/types/images/image.test.d.ts +2 -0
  22. package/dist/types/images/image.test.d.ts.map +1 -0
  23. package/dist/types/images/images.d.ts +61 -0
  24. package/dist/types/images/images.d.ts.map +1 -0
  25. package/dist/types/images/images.test.d.ts +2 -0
  26. package/dist/types/images/images.test.d.ts.map +1 -0
  27. package/dist/types/images/index.d.ts +2 -0
  28. package/dist/types/images/index.d.ts.map +1 -0
  29. package/dist/types/index.d.ts +2 -0
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/prop-controllers.d.ts +55 -5
  32. package/dist/types/prop-controllers.d.ts.map +1 -1
  33. package/package.json +1 -1
@@ -0,0 +1,267 @@
1
+ import { z } from 'zod';
2
+ import { CopyContext, Options, Types } from '../prop-controllers';
3
+ import { ImageData, ImageDataV0 } from '../data';
4
+ export declare const ImagePropControllerDataV2Type = "prop-controllers::image::v2";
5
+ declare const imagePropControllerDataV2Schema: z.ZodObject<{
6
+ "@@makeswift/type": z.ZodLiteral<"prop-controllers::image::v2">;
7
+ value: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
8
+ version: z.ZodLiteral<1>;
9
+ type: z.ZodLiteral<"makeswift-file">;
10
+ id: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ version: 1;
13
+ type: "makeswift-file";
14
+ id: string;
15
+ }, {
16
+ version: 1;
17
+ type: "makeswift-file";
18
+ id: string;
19
+ }>, z.ZodObject<{
20
+ version: z.ZodLiteral<1>;
21
+ type: z.ZodLiteral<"external-file">;
22
+ url: z.ZodString;
23
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
24
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ version: 1;
27
+ type: "external-file";
28
+ url: string;
29
+ width?: number | null | undefined;
30
+ height?: number | null | undefined;
31
+ }, {
32
+ version: 1;
33
+ type: "external-file";
34
+ url: string;
35
+ width?: number | null | undefined;
36
+ height?: number | null | undefined;
37
+ }>]>]>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ value: string | {
40
+ version: 1;
41
+ type: "makeswift-file";
42
+ id: string;
43
+ } | {
44
+ version: 1;
45
+ type: "external-file";
46
+ url: string;
47
+ width?: number | null | undefined;
48
+ height?: number | null | undefined;
49
+ } | (string & {
50
+ version: 1;
51
+ type: "makeswift-file";
52
+ id: string;
53
+ }) | (string & {
54
+ version: 1;
55
+ type: "external-file";
56
+ url: string;
57
+ width?: number | null | undefined;
58
+ height?: number | null | undefined;
59
+ }) | ({
60
+ version: 1;
61
+ type: "makeswift-file";
62
+ id: string;
63
+ } & string) | ({
64
+ version: 1;
65
+ type: "external-file";
66
+ url: string;
67
+ width?: number | null | undefined;
68
+ height?: number | null | undefined;
69
+ } & string);
70
+ "@@makeswift/type": "prop-controllers::image::v2";
71
+ }, {
72
+ value: string | {
73
+ version: 1;
74
+ type: "makeswift-file";
75
+ id: string;
76
+ } | {
77
+ version: 1;
78
+ type: "external-file";
79
+ url: string;
80
+ width?: number | null | undefined;
81
+ height?: number | null | undefined;
82
+ } | (string & {
83
+ version: 1;
84
+ type: "makeswift-file";
85
+ id: string;
86
+ }) | (string & {
87
+ version: 1;
88
+ type: "external-file";
89
+ url: string;
90
+ width?: number | null | undefined;
91
+ height?: number | null | undefined;
92
+ }) | ({
93
+ version: 1;
94
+ type: "makeswift-file";
95
+ id: string;
96
+ } & string) | ({
97
+ version: 1;
98
+ type: "external-file";
99
+ url: string;
100
+ width?: number | null | undefined;
101
+ height?: number | null | undefined;
102
+ } & string);
103
+ "@@makeswift/type": "prop-controllers::image::v2";
104
+ }>;
105
+ export type ImagePropControllerDataV2 = z.infer<typeof imagePropControllerDataV2Schema>;
106
+ export declare const imagePropControllerDataSchema: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
107
+ version: z.ZodLiteral<1>;
108
+ type: z.ZodLiteral<"makeswift-file">;
109
+ id: z.ZodString;
110
+ }, "strip", z.ZodTypeAny, {
111
+ version: 1;
112
+ type: "makeswift-file";
113
+ id: string;
114
+ }, {
115
+ version: 1;
116
+ type: "makeswift-file";
117
+ id: string;
118
+ }>, z.ZodObject<{
119
+ version: z.ZodLiteral<1>;
120
+ type: z.ZodLiteral<"external-file">;
121
+ url: z.ZodString;
122
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
123
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ version: 1;
126
+ type: "external-file";
127
+ url: string;
128
+ width?: number | null | undefined;
129
+ height?: number | null | undefined;
130
+ }, {
131
+ version: 1;
132
+ type: "external-file";
133
+ url: string;
134
+ width?: number | null | undefined;
135
+ height?: number | null | undefined;
136
+ }>]>]>, z.ZodObject<{
137
+ "@@makeswift/type": z.ZodLiteral<"prop-controllers::image::v2">;
138
+ value: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
139
+ version: z.ZodLiteral<1>;
140
+ type: z.ZodLiteral<"makeswift-file">;
141
+ id: z.ZodString;
142
+ }, "strip", z.ZodTypeAny, {
143
+ version: 1;
144
+ type: "makeswift-file";
145
+ id: string;
146
+ }, {
147
+ version: 1;
148
+ type: "makeswift-file";
149
+ id: string;
150
+ }>, z.ZodObject<{
151
+ version: z.ZodLiteral<1>;
152
+ type: z.ZodLiteral<"external-file">;
153
+ url: z.ZodString;
154
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
155
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ version: 1;
158
+ type: "external-file";
159
+ url: string;
160
+ width?: number | null | undefined;
161
+ height?: number | null | undefined;
162
+ }, {
163
+ version: 1;
164
+ type: "external-file";
165
+ url: string;
166
+ width?: number | null | undefined;
167
+ height?: number | null | undefined;
168
+ }>]>]>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ value: string | {
171
+ version: 1;
172
+ type: "makeswift-file";
173
+ id: string;
174
+ } | {
175
+ version: 1;
176
+ type: "external-file";
177
+ url: string;
178
+ width?: number | null | undefined;
179
+ height?: number | null | undefined;
180
+ } | (string & {
181
+ version: 1;
182
+ type: "makeswift-file";
183
+ id: string;
184
+ }) | (string & {
185
+ version: 1;
186
+ type: "external-file";
187
+ url: string;
188
+ width?: number | null | undefined;
189
+ height?: number | null | undefined;
190
+ }) | ({
191
+ version: 1;
192
+ type: "makeswift-file";
193
+ id: string;
194
+ } & string) | ({
195
+ version: 1;
196
+ type: "external-file";
197
+ url: string;
198
+ width?: number | null | undefined;
199
+ height?: number | null | undefined;
200
+ } & string);
201
+ "@@makeswift/type": "prop-controllers::image::v2";
202
+ }, {
203
+ value: string | {
204
+ version: 1;
205
+ type: "makeswift-file";
206
+ id: string;
207
+ } | {
208
+ version: 1;
209
+ type: "external-file";
210
+ url: string;
211
+ width?: number | null | undefined;
212
+ height?: number | null | undefined;
213
+ } | (string & {
214
+ version: 1;
215
+ type: "makeswift-file";
216
+ id: string;
217
+ }) | (string & {
218
+ version: 1;
219
+ type: "external-file";
220
+ url: string;
221
+ width?: number | null | undefined;
222
+ height?: number | null | undefined;
223
+ }) | ({
224
+ version: 1;
225
+ type: "makeswift-file";
226
+ id: string;
227
+ } & string) | ({
228
+ version: 1;
229
+ type: "external-file";
230
+ url: string;
231
+ width?: number | null | undefined;
232
+ height?: number | null | undefined;
233
+ } & string);
234
+ "@@makeswift/type": "prop-controllers::image::v2";
235
+ }>]>;
236
+ export type ImagePropControllerData = z.infer<typeof imagePropControllerDataSchema>;
237
+ export type ImageOptions = Options<{
238
+ label?: string;
239
+ hidden?: boolean;
240
+ }>;
241
+ type ImageDescriptorV0<_T = ImageDataV0> = {
242
+ type: typeof Types.Image;
243
+ options: ImageOptions;
244
+ };
245
+ type ImageDescriptorV1<_T = ImageData> = {
246
+ type: typeof Types.Image;
247
+ version: 1;
248
+ options: ImageOptions;
249
+ };
250
+ type ImageDescriptorV2<_T = ImagePropControllerData> = {
251
+ type: typeof Types.Image;
252
+ version: 2;
253
+ options: ImageOptions;
254
+ };
255
+ export type ImageDescriptor<_T = ImagePropControllerData> = ImageDescriptorV0 | ImageDescriptorV1 | ImageDescriptorV2;
256
+ export type ResolveImagePropControllerValue<T extends ImageDescriptor> = T extends ImageDescriptor ? ImageData | undefined : never;
257
+ /**
258
+ * @deprecated Imports from @makeswift/prop-controllers are deprecated. Use
259
+ * @makeswift/runtime/controls instead.
260
+ */
261
+ export declare function Image(options?: ImageOptions): ImageDescriptorV2;
262
+ export declare function getImagePropControllerDataImageData(data: ImagePropControllerData | undefined): ImageData | undefined;
263
+ export declare function createImagePropControllerDataFromImageData(data: ImageData, definition: ImageDescriptor): ImagePropControllerData;
264
+ export declare function getImagePropControllerFileIds(data: ImagePropControllerData | undefined): string[];
265
+ export declare function copyImagePropControllerData(data: ImagePropControllerData | undefined, context: CopyContext): ImagePropControllerData | undefined;
266
+ export {};
267
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/image copy/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAEL,WAAW,EACX,OAAO,EACP,KAAK,EACN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,SAAS,EACT,WAAW,EAGZ,MAAM,SAAS,CAAA;AAMhB,eAAO,MAAM,6BAA6B,gCAAgC,CAAA;AAE1E,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAA;AAExE,KAAK,iBAAiB,CAAC,EAAE,GAAG,WAAW,IAAI;IACzC,IAAI,EAAE,OAAO,KAAK,CAAC,KAAK,CAAA;IACxB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,CAAC,EAAE,GAAG,SAAS,IAAI;IACvC,IAAI,EAAE,OAAO,KAAK,CAAC,KAAK,CAAA;IACxB,OAAO,EAAE,CAAC,CAAA;IACV,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,CAAC,EAAE,GAAG,uBAAuB,IAAI;IACrD,IAAI,EAAE,OAAO,KAAK,CAAC,KAAK,CAAA;IACxB,OAAO,EAAE,CAAC,CAAA;IACV,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,EAAE,GAAG,uBAAuB,IACpD,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,CAAA;AAErB,MAAM,MAAM,+BAA+B,CAAC,CAAC,SAAS,eAAe,IACnE,CAAC,SAAS,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,CAAA;AAE3D;;;GAGG;AACH,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,iBAAiB,CAEnE;AAED,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,uBAAuB,GAAG,SAAS,GACxC,SAAS,GAAG,SAAS,CAOvB;AAED,wBAAgB,0CAA0C,CACxD,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,eAAe,GAC1B,uBAAuB,CAWzB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,uBAAuB,GAAG,SAAS,GACxC,MAAM,EAAE,CASV;AAeD,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,uBAAuB,GAAG,SAAS,EACzC,OAAO,EAAE,WAAW,GACnB,uBAAuB,GAAG,SAAS,CAcrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.test.d.ts","sourceRoot":"","sources":["../../../src/image copy/image.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './image';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/image copy/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,267 @@
1
+ import { z } from 'zod';
2
+ import { CopyContext, Options, Types } from '../prop-controllers';
3
+ import { ImageData, ImageDataV0 } from '../data';
4
+ export declare const ImagePropControllerDataV2Type = "prop-controllers::image::v2";
5
+ declare const imagePropControllerDataV2Schema: z.ZodObject<{
6
+ "@@makeswift/type": z.ZodLiteral<"prop-controllers::image::v2">;
7
+ value: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
8
+ version: z.ZodLiteral<1>;
9
+ type: z.ZodLiteral<"makeswift-file">;
10
+ id: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ version: 1;
13
+ type: "makeswift-file";
14
+ id: string;
15
+ }, {
16
+ version: 1;
17
+ type: "makeswift-file";
18
+ id: string;
19
+ }>, z.ZodObject<{
20
+ version: z.ZodLiteral<1>;
21
+ type: z.ZodLiteral<"external-file">;
22
+ url: z.ZodString;
23
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
24
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ version: 1;
27
+ type: "external-file";
28
+ url: string;
29
+ width?: number | null | undefined;
30
+ height?: number | null | undefined;
31
+ }, {
32
+ version: 1;
33
+ type: "external-file";
34
+ url: string;
35
+ width?: number | null | undefined;
36
+ height?: number | null | undefined;
37
+ }>]>]>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ value: string | {
40
+ version: 1;
41
+ type: "makeswift-file";
42
+ id: string;
43
+ } | {
44
+ version: 1;
45
+ type: "external-file";
46
+ url: string;
47
+ width?: number | null | undefined;
48
+ height?: number | null | undefined;
49
+ } | (string & {
50
+ version: 1;
51
+ type: "makeswift-file";
52
+ id: string;
53
+ }) | (string & {
54
+ version: 1;
55
+ type: "external-file";
56
+ url: string;
57
+ width?: number | null | undefined;
58
+ height?: number | null | undefined;
59
+ }) | ({
60
+ version: 1;
61
+ type: "makeswift-file";
62
+ id: string;
63
+ } & string) | ({
64
+ version: 1;
65
+ type: "external-file";
66
+ url: string;
67
+ width?: number | null | undefined;
68
+ height?: number | null | undefined;
69
+ } & string);
70
+ "@@makeswift/type": "prop-controllers::image::v2";
71
+ }, {
72
+ value: string | {
73
+ version: 1;
74
+ type: "makeswift-file";
75
+ id: string;
76
+ } | {
77
+ version: 1;
78
+ type: "external-file";
79
+ url: string;
80
+ width?: number | null | undefined;
81
+ height?: number | null | undefined;
82
+ } | (string & {
83
+ version: 1;
84
+ type: "makeswift-file";
85
+ id: string;
86
+ }) | (string & {
87
+ version: 1;
88
+ type: "external-file";
89
+ url: string;
90
+ width?: number | null | undefined;
91
+ height?: number | null | undefined;
92
+ }) | ({
93
+ version: 1;
94
+ type: "makeswift-file";
95
+ id: string;
96
+ } & string) | ({
97
+ version: 1;
98
+ type: "external-file";
99
+ url: string;
100
+ width?: number | null | undefined;
101
+ height?: number | null | undefined;
102
+ } & string);
103
+ "@@makeswift/type": "prop-controllers::image::v2";
104
+ }>;
105
+ export type ImagePropControllerDataV2 = z.infer<typeof imagePropControllerDataV2Schema>;
106
+ export declare const imagePropControllerDataSchema: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
107
+ version: z.ZodLiteral<1>;
108
+ type: z.ZodLiteral<"makeswift-file">;
109
+ id: z.ZodString;
110
+ }, "strip", z.ZodTypeAny, {
111
+ version: 1;
112
+ type: "makeswift-file";
113
+ id: string;
114
+ }, {
115
+ version: 1;
116
+ type: "makeswift-file";
117
+ id: string;
118
+ }>, z.ZodObject<{
119
+ version: z.ZodLiteral<1>;
120
+ type: z.ZodLiteral<"external-file">;
121
+ url: z.ZodString;
122
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
123
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ version: 1;
126
+ type: "external-file";
127
+ url: string;
128
+ width?: number | null | undefined;
129
+ height?: number | null | undefined;
130
+ }, {
131
+ version: 1;
132
+ type: "external-file";
133
+ url: string;
134
+ width?: number | null | undefined;
135
+ height?: number | null | undefined;
136
+ }>]>]>, z.ZodObject<{
137
+ "@@makeswift/type": z.ZodLiteral<"prop-controllers::image::v2">;
138
+ value: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
139
+ version: z.ZodLiteral<1>;
140
+ type: z.ZodLiteral<"makeswift-file">;
141
+ id: z.ZodString;
142
+ }, "strip", z.ZodTypeAny, {
143
+ version: 1;
144
+ type: "makeswift-file";
145
+ id: string;
146
+ }, {
147
+ version: 1;
148
+ type: "makeswift-file";
149
+ id: string;
150
+ }>, z.ZodObject<{
151
+ version: z.ZodLiteral<1>;
152
+ type: z.ZodLiteral<"external-file">;
153
+ url: z.ZodString;
154
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
155
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ version: 1;
158
+ type: "external-file";
159
+ url: string;
160
+ width?: number | null | undefined;
161
+ height?: number | null | undefined;
162
+ }, {
163
+ version: 1;
164
+ type: "external-file";
165
+ url: string;
166
+ width?: number | null | undefined;
167
+ height?: number | null | undefined;
168
+ }>]>]>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ value: string | {
171
+ version: 1;
172
+ type: "makeswift-file";
173
+ id: string;
174
+ } | {
175
+ version: 1;
176
+ type: "external-file";
177
+ url: string;
178
+ width?: number | null | undefined;
179
+ height?: number | null | undefined;
180
+ } | (string & {
181
+ version: 1;
182
+ type: "makeswift-file";
183
+ id: string;
184
+ }) | (string & {
185
+ version: 1;
186
+ type: "external-file";
187
+ url: string;
188
+ width?: number | null | undefined;
189
+ height?: number | null | undefined;
190
+ }) | ({
191
+ version: 1;
192
+ type: "makeswift-file";
193
+ id: string;
194
+ } & string) | ({
195
+ version: 1;
196
+ type: "external-file";
197
+ url: string;
198
+ width?: number | null | undefined;
199
+ height?: number | null | undefined;
200
+ } & string);
201
+ "@@makeswift/type": "prop-controllers::image::v2";
202
+ }, {
203
+ value: string | {
204
+ version: 1;
205
+ type: "makeswift-file";
206
+ id: string;
207
+ } | {
208
+ version: 1;
209
+ type: "external-file";
210
+ url: string;
211
+ width?: number | null | undefined;
212
+ height?: number | null | undefined;
213
+ } | (string & {
214
+ version: 1;
215
+ type: "makeswift-file";
216
+ id: string;
217
+ }) | (string & {
218
+ version: 1;
219
+ type: "external-file";
220
+ url: string;
221
+ width?: number | null | undefined;
222
+ height?: number | null | undefined;
223
+ }) | ({
224
+ version: 1;
225
+ type: "makeswift-file";
226
+ id: string;
227
+ } & string) | ({
228
+ version: 1;
229
+ type: "external-file";
230
+ url: string;
231
+ width?: number | null | undefined;
232
+ height?: number | null | undefined;
233
+ } & string);
234
+ "@@makeswift/type": "prop-controllers::image::v2";
235
+ }>]>;
236
+ export type ImagePropControllerData = z.infer<typeof imagePropControllerDataSchema>;
237
+ export type ImageOptions = Options<{
238
+ label?: string;
239
+ hidden?: boolean;
240
+ }>;
241
+ type ImageDescriptorV0<_T = ImageDataV0> = {
242
+ type: typeof Types.Image;
243
+ options: ImageOptions;
244
+ };
245
+ type ImageDescriptorV1<_T = ImageData> = {
246
+ type: typeof Types.Image;
247
+ version: 1;
248
+ options: ImageOptions;
249
+ };
250
+ type ImageDescriptorV2<_T = ImagePropControllerData> = {
251
+ type: typeof Types.Image;
252
+ version: 2;
253
+ options: ImageOptions;
254
+ };
255
+ export type ImageDescriptor<_T = ImagePropControllerData> = ImageDescriptorV0 | ImageDescriptorV1 | ImageDescriptorV2;
256
+ export type ResolveImagePropControllerValue<T extends ImageDescriptor> = T extends ImageDescriptor ? ImageData | undefined : never;
257
+ /**
258
+ * @deprecated Imports from @makeswift/prop-controllers are deprecated. Use
259
+ * @makeswift/runtime/controls instead.
260
+ */
261
+ export declare function Image(options?: ImageOptions): ImageDescriptorV2;
262
+ export declare function getImagePropControllerDataImageData(data: ImagePropControllerData | undefined): ImageData | undefined;
263
+ export declare function createImagePropControllerDataFromImageData(data: ImageData, definition: ImageDescriptor): ImagePropControllerData;
264
+ export declare function getImagePropControllerFileIds(data: ImagePropControllerData | undefined): string[];
265
+ export declare function copyImagePropControllerData(data: ImagePropControllerData | undefined, context: CopyContext): ImagePropControllerData | undefined;
266
+ export {};
267
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/images/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAEL,WAAW,EACX,OAAO,EACP,KAAK,EACN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,SAAS,EACT,WAAW,EAGZ,MAAM,SAAS,CAAA;AAMhB,eAAO,MAAM,6BAA6B,gCAAgC,CAAA;AAE1E,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;IAAE,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G,SAAS,CAcrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.test.d.ts","sourceRoot":"","sources":["../../../src/images/image.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,61 @@
1
+ import { z } from 'zod';
2
+ import { CopyContext, Options, Types } from '../prop-controllers';
3
+ import { ImagesData, ImagesDataV0 } from '../data';
4
+ export declare const ImagesPropControllerDataV2Type = "prop-controllers::images::v2";
5
+ declare const imagesPropControllerDataV2Schema: z.ZodObject<{
6
+ "@@makeswift/type": z.ZodLiteral<"prop-controllers::images::v2">;
7
+ value: any;
8
+ }, "strip", z.ZodTypeAny, {
9
+ [x: string]: any;
10
+ "@@makeswift/type"?: "prop-controllers::images::v2" | undefined;
11
+ value?: any;
12
+ }, {
13
+ [x: string]: any;
14
+ "@@makeswift/type"?: "prop-controllers::images::v2" | undefined;
15
+ value?: any;
16
+ }>;
17
+ export type ImagesPropControllerDataV2 = z.infer<typeof imagesPropControllerDataV2Schema>;
18
+ export declare const imagesPropControllerDataSchema: z.ZodUnion<[any, any, z.ZodObject<{
19
+ "@@makeswift/type": z.ZodLiteral<"prop-controllers::images::v2">;
20
+ value: any;
21
+ }, "strip", z.ZodTypeAny, {
22
+ [x: string]: any;
23
+ "@@makeswift/type"?: "prop-controllers::images::v2" | undefined;
24
+ value?: any;
25
+ }, {
26
+ [x: string]: any;
27
+ "@@makeswift/type"?: "prop-controllers::images::v2" | undefined;
28
+ value?: any;
29
+ }>]>;
30
+ export type ImagesPropControllerData = z.infer<typeof imagesPropControllerDataSchema>;
31
+ export type ImagesOptions = Options<{
32
+ label?: string;
33
+ hidden?: boolean;
34
+ }>;
35
+ type ImagesDescriptorV0<_T = ImagesDataV0> = {
36
+ type: typeof Types.Images;
37
+ options: ImagesOptions;
38
+ };
39
+ type ImagesDescriptorV1<_T = ImagesData> = {
40
+ type: typeof Types.Images;
41
+ version: 1;
42
+ options: ImagesOptions;
43
+ };
44
+ type ImagesDescriptorV2<_T = ImagesPropControllerData> = {
45
+ type: typeof Types.Images;
46
+ version: 2;
47
+ options: ImagesOptions;
48
+ };
49
+ export type ImagesDescriptor<_T = ImagesPropControllerData> = ImagesDescriptorV0 | ImagesDescriptorV1 | ImagesDescriptorV2;
50
+ export type ResolveImagesPropControllerValue<T extends ImagesDescriptor> = T extends ImagesDescriptor ? ImagesData | undefined : never;
51
+ /**
52
+ * @deprecated Imports from @makeswift/prop-controllers are deprecated. Use
53
+ * @makeswift/runtime/controls instead.
54
+ */
55
+ export declare function Images(options?: ImagesOptions): ImagesDescriptorV2;
56
+ export declare function getImagesPropControllerDataImagesData(data: ImagesPropControllerData | undefined): ImagesData | undefined;
57
+ export declare function createImagesPropControllerDataFromImagesData(data: ImagesData, definition: ImagesDescriptor): ImagesPropControllerData;
58
+ export declare function getImagesPropControllerFileIds(data: ImagesPropControllerData | undefined): string[];
59
+ export declare function copyImagesPropControllerData(data: ImagesPropControllerData | undefined, context: CopyContext): ImagesPropControllerData | undefined;
60
+ export {};
61
+ //# sourceMappingURL=images.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/images/images.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAEL,WAAW,EACX,OAAO,EACP,KAAK,EACN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,UAAU,EACV,YAAY,EAGb,MAAM,SAAS,CAAA;AAMhB,eAAO,MAAM,8BAA8B,iCAAiC,CAAA;AAE5E,QAAA,MAAM,gCAAgC;;;;;;;;;;;EAGpC,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;IAIzC,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,C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ASV;AAeD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,wBAAwB,GAAG,SAAS,EAC1C,OAAO,EAAE,WAAW,GACnB,wBAAwB,GAAG,SAAS,CActC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=images.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"images.test.d.ts","sourceRoot":"","sources":["../../../src/images/images.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './images';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/images/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
@@ -16,6 +16,8 @@ export { GapX, gapXPropControllerDataSchema, getGapXPropControllerDataResponsive
16
16
  export type { ResolveGapXPropControllerValue, GapXDescriptor, GapXPropControllerData, } from './gap-x';
17
17
  export { GapY, gapYPropControllerDataSchema, getGapYPropControllerDataResponsiveGapData, createGapYPropControllerDataFromResponsiveGapData, } from './gap-y';
18
18
  export type { ResolveGapYPropControllerValue, GapYDescriptor, GapYPropControllerData, } from './gap-y';
19
+ export { Grid, gridPropControllerDataSchema, getGridPropControllerDataGridData, createGridPropControllerDataFromGridData, mergeGridPropControllerTranslatedData, getGridPropControllerElementChildren, copyGridPropControllerData, getGridPropControllerGetElementPath, } from './grid';
20
+ export type { GridData, GridDescriptor, GridOptions, GridPropControllerData, ResolveGridPropControllerValue, } from './grid';
19
21
  export { Link, linkDataSchema, linkPropControllerDataSchema, getLinkPropControllerDataLinkData, createLinkPropControllerDataFromLinkData, getLinkPropControllerPageIds, copyLinkPropControllerData, } from './link';
20
22
  export type { LinkData, LinkDescriptor, LinkPropControllerData, ResolveLinkPropControllerValue, } from './link';
21
23
  export { Margin, MarginPropControllerFormat, marginPropControllerDataSchema, getMarginPropControllerDataResponsiveMarginData, createMarginPropControllerDataFromResponsiveMarginData, } from './margin';