@makeswift/runtime 0.29.3-canary.0 → 0.29.3-canary.2

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 (45) hide show
  1. package/dist/cjs/api/api-resources-client.js +4 -2
  2. package/dist/cjs/api/api-resources-client.js.map +1 -1
  3. package/dist/cjs/api/graphql-api-client.js +1 -1
  4. package/dist/cjs/api/rest-api-client.js +40 -6
  5. package/dist/cjs/api/rest-api-client.js.map +1 -1
  6. package/dist/cjs/api/types.js.map +1 -1
  7. package/dist/cjs/api-handler/handlers/manifest.js +1 -1
  8. package/dist/cjs/client/index.js +22 -19
  9. package/dist/cjs/client/index.js.map +1 -1
  10. package/dist/cjs/components/builtin/Form/Form.js +1 -1
  11. package/dist/cjs/components/builtin/Form/Form.js.map +1 -1
  12. package/dist/cjs/components/builtin/Form/components/Field/index.js +2 -2
  13. package/dist/cjs/components/builtin/Form/components/Field/index.js.map +1 -1
  14. package/dist/cjs/components/builtin/Form/types.js.map +1 -1
  15. package/dist/cjs/next/components/tests/controls/color-control/fixtures.js +19 -0
  16. package/dist/cjs/next/components/tests/controls/color-control/fixtures.js.map +1 -1
  17. package/dist/esm/api/api-resources-client.js +2 -1
  18. package/dist/esm/api/api-resources-client.js.map +1 -1
  19. package/dist/esm/api/graphql-api-client.js +1 -1
  20. package/dist/esm/api/rest-api-client.js +40 -6
  21. package/dist/esm/api/rest-api-client.js.map +1 -1
  22. package/dist/esm/api/types.js.map +1 -1
  23. package/dist/esm/api-handler/handlers/manifest.js +1 -1
  24. package/dist/esm/client/index.js +13 -10
  25. package/dist/esm/client/index.js.map +1 -1
  26. package/dist/esm/components/builtin/Form/Form.js +1 -1
  27. package/dist/esm/components/builtin/Form/Form.js.map +1 -1
  28. package/dist/esm/components/builtin/Form/components/Field/index.js +2 -2
  29. package/dist/esm/components/builtin/Form/components/Field/index.js.map +1 -1
  30. package/dist/esm/next/components/tests/controls/color-control/fixtures.js +16 -0
  31. package/dist/esm/next/components/tests/controls/color-control/fixtures.js.map +1 -1
  32. package/dist/types/api/api-resources-client.d.ts +3 -0
  33. package/dist/types/api/api-resources-client.d.ts.map +1 -1
  34. package/dist/types/api/rest-api-client.d.ts +3 -0
  35. package/dist/types/api/rest-api-client.d.ts.map +1 -1
  36. package/dist/types/api/types.d.ts +9 -1
  37. package/dist/types/api/types.d.ts.map +1 -1
  38. package/dist/types/client/index.d.ts +0 -1
  39. package/dist/types/client/index.d.ts.map +1 -1
  40. package/dist/types/components/builtin/Form/types.d.ts +9 -9
  41. package/dist/types/components/builtin/Form/types.d.ts.map +1 -1
  42. package/dist/types/controls/rich-text-v2/rich-text-v2.d.ts +4 -4
  43. package/dist/types/next/components/tests/controls/color-control/fixtures.d.ts +36 -2
  44. package/dist/types/next/components/tests/controls/color-control/fixtures.d.ts.map +1 -1
  45. package/package.json +3 -3
@@ -1,17 +1,17 @@
1
1
  export type SingleLineTextTableColumn = {
2
2
  id: string;
3
3
  name: string;
4
- __typename: 'SingleLineTextTableColumn';
4
+ type: 'SingleLineTextTableColumn';
5
5
  };
6
6
  export type LongTextTableColumn = {
7
7
  id: string;
8
8
  name: string;
9
- __typename: 'LongTextTableColumn';
9
+ type: 'LongTextTableColumn';
10
10
  };
11
11
  export type CheckboxTableColumn = {
12
12
  id: string;
13
13
  name: string;
14
- __typename: 'CheckboxTableColumn';
14
+ type: 'CheckboxTableColumn';
15
15
  };
16
16
  export type MultipleSelectTableColumnOption = {
17
17
  id: string;
@@ -21,7 +21,7 @@ export type MultipleSelectTableColumn = {
21
21
  id: string;
22
22
  name: string;
23
23
  options: Array<MultipleSelectTableColumnOption>;
24
- __typename: 'MultipleSelectTableColumn';
24
+ type: 'MultipleSelectTableColumn';
25
25
  };
26
26
  export type SingleSelectTableColumnOption = {
27
27
  id: string;
@@ -31,27 +31,27 @@ export type SingleSelectTableColumn = {
31
31
  id: string;
32
32
  name: string;
33
33
  options: Array<SingleSelectTableColumnOption>;
34
- __typename: 'SingleSelectTableColumn';
34
+ type: 'SingleSelectTableColumn';
35
35
  };
36
36
  export type PhoneNumberTableColumn = {
37
37
  id: string;
38
38
  name: string;
39
- __typename: 'PhoneNumberTableColumn';
39
+ type: 'PhoneNumberTableColumn';
40
40
  };
41
41
  export type EmailTableColumn = {
42
42
  id: string;
43
43
  name: string;
44
- __typename: 'EmailTableColumn';
44
+ type: 'EmailTableColumn';
45
45
  };
46
46
  export type URLTableColumn = {
47
47
  id: string;
48
48
  name: string;
49
- __typename: 'URLTableColumn';
49
+ type: 'URLTableColumn';
50
50
  };
51
51
  export type NumberTableColumn = {
52
52
  id: string;
53
53
  name: string;
54
- __typename: 'NumberTableColumn';
54
+ type: 'NumberTableColumn';
55
55
  };
56
56
  export type TableColumn = SingleLineTextTableColumn | LongTextTableColumn | CheckboxTableColumn | MultipleSelectTableColumn | SingleSelectTableColumn | PhoneNumberTableColumn | EmailTableColumn | URLTableColumn | NumberTableColumn;
57
57
  export type Table = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Form/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,2BAA2B,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,qBAAqB,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,qBAAqB,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG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EAAE,wBAAwB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,kBAAkB,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,gBAAgB,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,mBAAmB,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,WAAW,GACnB,yBAAyB,GACzB,mBAAmB,GACnB,mBAAmB,GACnB,yBAAyB,GACzB,uBAAuB,GACvB,sBAAsB,GACtB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,CAAA;AAErB,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CAC5B,CAAA"}
@@ -732,7 +732,7 @@ declare class Definition extends BaseRichTextDefinition<ReactNode, Config, Insta
732
732
  }>>>;
733
733
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
734
734
  }, "strip", z.ZodTypeAny, {
735
- object?: "value" | "text" | "block" | "inline" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
735
+ object?: "value" | "text" | "inline" | "block" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
736
736
  document?: {
737
737
  object?: "document" | undefined;
738
738
  nodes?: (any | {
@@ -854,7 +854,7 @@ declare class Definition extends BaseRichTextDefinition<ReactNode, Config, Insta
854
854
  }> | undefined;
855
855
  data?: Record<string, any> | undefined;
856
856
  }, {
857
- object?: "value" | "text" | "block" | "inline" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
857
+ object?: "value" | "text" | "inline" | "block" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
858
858
  document?: {
859
859
  object?: "document" | undefined;
860
860
  nodes?: (any | {
@@ -1230,7 +1230,7 @@ declare class Definition extends BaseRichTextDefinition<ReactNode, Config, Insta
1230
1230
  }>>>;
1231
1231
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1232
1232
  }, "strip", z.ZodTypeAny, {
1233
- object?: "value" | "text" | "block" | "inline" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
1233
+ object?: "value" | "text" | "inline" | "block" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
1234
1234
  document?: {
1235
1235
  object?: "document" | undefined;
1236
1236
  nodes?: (any | {
@@ -1352,7 +1352,7 @@ declare class Definition extends BaseRichTextDefinition<ReactNode, Config, Insta
1352
1352
  }> | undefined;
1353
1353
  data?: Record<string, any> | undefined;
1354
1354
  }, {
1355
- object?: "value" | "text" | "block" | "inline" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
1355
+ object?: "value" | "text" | "inline" | "block" | "document" | "leaf" | "selection" | "mark" | "range" | "decoration" | "annotation" | "point" | "operation" | undefined;
1356
1356
  document?: {
1357
1357
  object?: "document" | undefined;
1358
1358
  nodes?: (any | {
@@ -1,11 +1,45 @@
1
- import { type ValueType } from '@makeswift/controls';
2
- import { ColorDefinition } from '@makeswift/controls';
1
+ import { ColorDefinition, type ValueType } from '@makeswift/controls';
3
2
  import { type Swatch } from '../../../../../api';
4
3
  import { type CacheData } from '../../../../../api/api-resources-client';
5
4
  type SwatchData = Omit<Swatch, 'id'>;
6
5
  export declare const swatchId = "[swatch-test-id]";
7
6
  export declare const swatch: SwatchData;
8
7
  export declare const value: ValueType<ColorDefinition>;
8
+ export declare const inlineValue: ValueType<ColorDefinition>;
9
+ export declare const toDataV0: (value: ValueType<ColorDefinition>) => {
10
+ type: "swatch";
11
+ "@@makeswift/type": "color::v2";
12
+ swatchId: string;
13
+ alpha: number;
14
+ } | {
15
+ type: "inline";
16
+ "@@makeswift/type": "color::v2";
17
+ hue: number;
18
+ saturation: number;
19
+ lightness: number;
20
+ alpha: number;
21
+ } | {
22
+ swatchId: string;
23
+ alpha: number;
24
+ "@@makeswift/type"?: "color::v1" | undefined;
25
+ };
26
+ export declare const toDataV1: (value: ValueType<ColorDefinition>) => {
27
+ type: "swatch";
28
+ "@@makeswift/type": "color::v2";
29
+ swatchId: string;
30
+ alpha: number;
31
+ } | {
32
+ type: "inline";
33
+ "@@makeswift/type": "color::v2";
34
+ hue: number;
35
+ saturation: number;
36
+ lightness: number;
37
+ alpha: number;
38
+ } | {
39
+ swatchId: string;
40
+ alpha: number;
41
+ "@@makeswift/type"?: "color::v1" | undefined;
42
+ };
9
43
  export declare const cacheData: (swatch: SwatchData | null) => Partial<CacheData>;
10
44
  export {};
11
45
  //# sourceMappingURL=fixtures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../../../../src/next/components/tests/controls/color-control/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,KAAK,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAEpC,eAAO,MAAM,QAAQ,qBAAqB,CAAA;AAC1C,eAAO,MAAM,MAAM,EAAE,UAKpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,eAAe,CAG5C,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,QAAQ,UAAU,GAAG,IAAI,KAAG,OAAO,CAAC,SAAS,CAIrE,CAAA"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../../../../src/next/components/tests/controls/color-control/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAErE,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,KAAK,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAEpC,eAAO,MAAM,QAAQ,qBAAqB,CAAA;AAC1C,eAAO,MAAM,MAAM,EAAE,UAKpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,eAAe,CAI5C,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,CAAC,eAAe,CAMlD,CAAA;AAMD,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;CAA+B,CAAA;AACzF,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;CAA+B,CAAA;AAEzF,eAAO,MAAM,SAAS,GAAI,QAAQ,UAAU,GAAG,IAAI,KAAG,OAAO,CAAC,SAAS,CAIrE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makeswift/runtime",
3
- "version": "0.29.3-canary.0",
3
+ "version": "0.29.3-canary.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "url": "makeswift/makeswift",
@@ -242,9 +242,9 @@
242
242
  "use-sync-external-store": "^1.5.0",
243
243
  "uuid": "^9.0.0",
244
244
  "zod": "^3.21.4",
245
- "@makeswift/controls": "0.1.23",
245
+ "@makeswift/controls": "0.1.24-canary.0",
246
246
  "@makeswift/next-plugin": "0.6.1",
247
- "@makeswift/prop-controllers": "0.4.17"
247
+ "@makeswift/prop-controllers": "0.4.18-canary.0"
248
248
  },
249
249
  "devDependencies": {
250
250
  "@graphql-codegen/add": "^3.1.0",