@uniformdev/mesh-sdk 19.118.1-alpha.0 → 19.118.1-alpha.10

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.d.mts CHANGED
@@ -1017,6 +1017,12 @@ type OpenDialogResult = {
1017
1017
  dialogLocation?: string;
1018
1018
  };
1019
1019
  type DialogSizes = 'narrow' | 'medium' | 'wide';
1020
+ /**
1021
+ * Here we are using a trick to allow arbitrary max width values, also prioritizing enum from maxWidth.
1022
+ */
1023
+ type ArbitraryMaxWidth = string & {
1024
+ neverEverLetYouGo?: never;
1025
+ };
1020
1026
  interface DialogOptions<TDialogParams = DialogParams> {
1021
1027
  /**
1022
1028
  * By default, dialogs will be closed when they set a value.
@@ -1028,9 +1034,12 @@ interface DialogOptions<TDialogParams = DialogParams> {
1028
1034
  disableCloseDialogOnSetValue?: boolean;
1029
1035
  /**
1030
1036
  * Options for setting the max width of the dialog.
1037
+ *
1038
+ * Custom string can be used for specific custom width .e.g "clamp(300px, 50%, 600px)"
1039
+ *
1031
1040
  * @deprecated Use `width` instead. This property will become ignored in a future release.
1032
1041
  */
1033
- maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full';
1042
+ maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full' | ArbitraryMaxWidth;
1034
1043
  /**
1035
1044
  * Options for setting the width of the dialog.
1036
1045
  */
@@ -1040,6 +1049,10 @@ interface DialogOptions<TDialogParams = DialogParams> {
1040
1049
  * the `metadata` object for the dialog location, e.g. `metadata.dialogParams`.
1041
1050
  * Parameters should be simple (serializable) types, not functions or DOM
1042
1051
  * elements or similar non-serializable objects.
1052
+ *
1053
+ * Best practice is to keep size of the params as small as possible.
1054
+ *
1055
+ * @see https://surma.dev/things/is-postmessage-slow/
1043
1056
  */
1044
1057
  params?: TDialogParams;
1045
1058
  /**
@@ -1291,11 +1304,11 @@ type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> = CommonMet
1291
1304
  prompt: string;
1292
1305
  promptMetadata: Record<string, unknown>;
1293
1306
  /** Useful to differentiate AI Generate UI between text and image */
1294
- promptOutputType: 'text' | 'image';
1307
+ promptOutputType: 'text' | 'image' | 'json';
1295
1308
  }, TIntegrationConfiguration>;
1296
1309
  type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
1297
1310
  /** Useful to differentiate metadata settings between text and image generation */
1298
- promptOutputType: 'text' | 'image';
1311
+ promptOutputType: 'text' | 'image' | 'json';
1299
1312
  }, TIntegrationConfiguration>;
1300
1313
  type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'aiGenerate'>;
1301
1314
  type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, PromptSettingsLocationMetadata, Record<string, unknown>, 'aiMetadata'>;
package/dist/index.d.ts CHANGED
@@ -1017,6 +1017,12 @@ type OpenDialogResult = {
1017
1017
  dialogLocation?: string;
1018
1018
  };
1019
1019
  type DialogSizes = 'narrow' | 'medium' | 'wide';
1020
+ /**
1021
+ * Here we are using a trick to allow arbitrary max width values, also prioritizing enum from maxWidth.
1022
+ */
1023
+ type ArbitraryMaxWidth = string & {
1024
+ neverEverLetYouGo?: never;
1025
+ };
1020
1026
  interface DialogOptions<TDialogParams = DialogParams> {
1021
1027
  /**
1022
1028
  * By default, dialogs will be closed when they set a value.
@@ -1028,9 +1034,12 @@ interface DialogOptions<TDialogParams = DialogParams> {
1028
1034
  disableCloseDialogOnSetValue?: boolean;
1029
1035
  /**
1030
1036
  * Options for setting the max width of the dialog.
1037
+ *
1038
+ * Custom string can be used for specific custom width .e.g "clamp(300px, 50%, 600px)"
1039
+ *
1031
1040
  * @deprecated Use `width` instead. This property will become ignored in a future release.
1032
1041
  */
1033
- maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full';
1042
+ maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full' | ArbitraryMaxWidth;
1034
1043
  /**
1035
1044
  * Options for setting the width of the dialog.
1036
1045
  */
@@ -1040,6 +1049,10 @@ interface DialogOptions<TDialogParams = DialogParams> {
1040
1049
  * the `metadata` object for the dialog location, e.g. `metadata.dialogParams`.
1041
1050
  * Parameters should be simple (serializable) types, not functions or DOM
1042
1051
  * elements or similar non-serializable objects.
1052
+ *
1053
+ * Best practice is to keep size of the params as small as possible.
1054
+ *
1055
+ * @see https://surma.dev/things/is-postmessage-slow/
1043
1056
  */
1044
1057
  params?: TDialogParams;
1045
1058
  /**
@@ -1291,11 +1304,11 @@ type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> = CommonMet
1291
1304
  prompt: string;
1292
1305
  promptMetadata: Record<string, unknown>;
1293
1306
  /** Useful to differentiate AI Generate UI between text and image */
1294
- promptOutputType: 'text' | 'image';
1307
+ promptOutputType: 'text' | 'image' | 'json';
1295
1308
  }, TIntegrationConfiguration>;
1296
1309
  type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
1297
1310
  /** Useful to differentiate metadata settings between text and image generation */
1298
- promptOutputType: 'text' | 'image';
1311
+ promptOutputType: 'text' | 'image' | 'json';
1299
1312
  }, TIntegrationConfiguration>;
1300
1313
  type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'aiGenerate'>;
1301
1314
  type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, PromptSettingsLocationMetadata, Record<string, unknown>, 'aiMetadata'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "19.118.1-alpha.0+cf7370c980",
3
+ "version": "19.118.1-alpha.10+578491e54b",
4
4
  "description": "Uniform Mesh Framework SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -33,14 +33,14 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@uniformdev/canvas": "19.118.1-alpha.0+cf7370c980",
37
- "@uniformdev/context": "19.118.1-alpha.0+cf7370c980",
38
- "@uniformdev/project-map": "19.118.1-alpha.0+cf7370c980",
36
+ "@uniformdev/canvas": "19.118.1-alpha.10+578491e54b",
37
+ "@uniformdev/context": "19.118.1-alpha.10+578491e54b",
38
+ "@uniformdev/project-map": "19.118.1-alpha.10+578491e54b",
39
39
  "imagesloaded": "^5.0.0",
40
40
  "mitt": "^3.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/imagesloaded": "^4.1.2"
44
44
  },
45
- "gitHead": "cf7370c9807feb6b6a19764c8c3c82c62eaa8315"
45
+ "gitHead": "578491e54b389231b3508d7ff92507d9f71d4c60"
46
46
  }