@promptbook/remote-client 0.102.0-12 → 0.102.0-17
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/esm/index.es.js +11 -2
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/components.index.d.ts +2 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +4 -0
- package/esm/typings/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +43 -5
- package/esm/typings/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +6 -2
- package/esm/typings/src/book-components/Chat/save/index.d.ts +38 -8
- package/esm/typings/src/book-components/Chat/save/json/jsonSaveFormatDefinition.d.ts +6 -2
- package/esm/typings/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +5 -1
- package/esm/typings/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +6 -2
- package/esm/typings/src/book-components/Chat/save/react/reactSaveFormatDefinition.d.ts +16 -0
- package/esm/typings/src/book-components/Chat/save/text/txtSaveFormatDefinition.d.ts +5 -1
- package/esm/typings/src/utils/color/Color.d.ts +7 -0
- package/esm/typings/src/utils/serialization/serializeToPromptbookJavascript.d.ts +22 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +11 -2
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
20
20
|
* @generated
|
|
21
21
|
* @see https://github.com/webgptorg/promptbook
|
|
22
22
|
*/
|
|
23
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-
|
|
23
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-17';
|
|
24
24
|
/**
|
|
25
25
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
26
26
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -557,7 +557,7 @@ class Color {
|
|
|
557
557
|
return Color.fromString(CSS_COLORS[color]);
|
|
558
558
|
// -----
|
|
559
559
|
}
|
|
560
|
-
else if (
|
|
560
|
+
else if (Color.isHexColorString(color)) {
|
|
561
561
|
return Color.fromHex(color);
|
|
562
562
|
// -----
|
|
563
563
|
}
|
|
@@ -816,6 +816,15 @@ class Color {
|
|
|
816
816
|
}
|
|
817
817
|
return true;
|
|
818
818
|
}
|
|
819
|
+
/**
|
|
820
|
+
* Checks if the given value is a valid hex color string
|
|
821
|
+
*
|
|
822
|
+
* @param value - value to check
|
|
823
|
+
* @returns true if the value is a valid hex color string (e.g., `#009edd`, `#fff`, etc.)
|
|
824
|
+
*/
|
|
825
|
+
static isHexColorString(value) {
|
|
826
|
+
return typeof value === 'string' && /^#(?:[0-9a-fA-F]{3}){1,2}$/.test(value);
|
|
827
|
+
}
|
|
819
828
|
/**
|
|
820
829
|
* Creates new Color object
|
|
821
830
|
*
|