@promptbook/remote-client 0.101.0-0 → 0.101.0-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 (38) hide show
  1. package/esm/index.es.js +13 -1
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/components.index.d.ts +12 -0
  4. package/esm/typings/src/book-components/Chat/Chat/Chat.d.ts +0 -5
  5. package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +8 -2
  6. package/esm/typings/src/book-components/Chat/Chat/constants.d.ts +8 -0
  7. package/esm/typings/src/book-components/Chat/examples/ChatMarkdownDemo.d.ts +16 -0
  8. package/esm/typings/src/book-components/Chat/utils/renderMarkdown.d.ts +21 -0
  9. package/esm/typings/src/book-components/Chat/utils/renderMarkdown.test.d.ts +1 -0
  10. package/esm/typings/src/book-components/icons/ArrowIcon.d.ts +9 -0
  11. package/esm/typings/src/book-components/icons/ResetIcon.d.ts +6 -0
  12. package/esm/typings/src/book-components/icons/SendIcon.d.ts +8 -0
  13. package/esm/typings/src/book-components/icons/TemplateIcon.d.ts +8 -0
  14. package/esm/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +2 -0
  15. package/esm/typings/src/utils/markdown/humanizeAiText.d.ts +1 -0
  16. package/esm/typings/src/utils/markdown/humanizeAiTextEllipsis.d.ts +1 -0
  17. package/esm/typings/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -0
  18. package/esm/typings/src/utils/markdown/humanizeAiTextQuotes.d.ts +1 -0
  19. package/esm/typings/src/utils/markdown/humanizeAiTextWhitespace.d.ts +1 -0
  20. package/esm/typings/src/utils/markdown/prettifyMarkdown.d.ts +8 -0
  21. package/esm/typings/src/utils/markdown/promptbookifyAiText.d.ts +1 -0
  22. package/esm/typings/src/utils/normalization/capitalize.d.ts +2 -0
  23. package/esm/typings/src/utils/normalization/decapitalize.d.ts +3 -1
  24. package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
  25. package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +2 -0
  26. package/esm/typings/src/utils/normalization/normalizeWhitespaces.d.ts +2 -0
  27. package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +2 -0
  28. package/esm/typings/src/utils/parseNumber.d.ts +1 -0
  29. package/esm/typings/src/utils/removeEmojis.d.ts +2 -0
  30. package/esm/typings/src/utils/removeQuotes.d.ts +1 -0
  31. package/esm/typings/src/utils/serialization/deepClone.d.ts +1 -0
  32. package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -0
  33. package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +1 -0
  34. package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -0
  35. package/esm/typings/src/version.d.ts +1 -1
  36. package/package.json +2 -2
  37. package/umd/index.umd.js +13 -1
  38. 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.101.0-0';
23
+ const PROMPTBOOK_ENGINE_VERSION = '0.101.0-2';
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
@@ -562,6 +562,7 @@ function deserializeError(error) {
562
562
  /**
563
563
  * Tests if given string is valid URL.
564
564
  *
565
+ * Note: [🔂] This function is idempotent.
565
566
  * Note: Dataurl are considered perfectly valid.
566
567
  * Note: There are two similar functions:
567
568
  * - `isValidUrl` which tests any URL
@@ -1009,6 +1010,8 @@ for (let i = 0; i < defaultDiacriticsRemovalMap.length; i++) {
1009
1010
  /**
1010
1011
  * Removes diacritic marks (accents) from characters in a string.
1011
1012
  *
1013
+ * Note: [🔂] This function is idempotent.
1014
+ *
1012
1015
  * @param input The string containing diacritics to be normalized.
1013
1016
  * @returns The string with diacritics removed or normalized.
1014
1017
  * @public exported from `@promptbook/utils`
@@ -1631,6 +1634,7 @@ const EXPECTATION_UNITS = ['CHARACTERS', 'WORDS', 'SENTENCES', 'LINES', 'PARAGRA
1631
1634
  /**
1632
1635
  * Function parseNumber will parse number from string
1633
1636
  *
1637
+ * Note: [🔂] This function is idempotent.
1634
1638
  * Unlike Number.parseInt, Number.parseFloat it will never ever result in NaN
1635
1639
  * Note: it also works only with decimal numbers
1636
1640
  *
@@ -2157,6 +2161,8 @@ const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser,
2157
2161
  /**
2158
2162
  * Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
2159
2163
  *
2164
+ * Note: [🔂] This function is idempotent.
2165
+ *
2160
2166
  * @param text The text string to be converted to SCREAMING_CASE format.
2161
2167
  * @returns The normalized text in SCREAMING_CASE format.
2162
2168
  * @example 'HELLO_WORLD'
@@ -2392,6 +2398,7 @@ function checkSerializableAsJson(options) {
2392
2398
  /**
2393
2399
  * Creates a deep clone of the given object
2394
2400
  *
2401
+ * Note: [🔂] This function is idempotent.
2395
2402
  * Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
2396
2403
  *
2397
2404
  * @param objectValue The object to clone.
@@ -2549,6 +2556,8 @@ function normalizeTo_camelCase(text, _isFirstLetterCapital = false) {
2549
2556
  /**
2550
2557
  * Removes emojis from a string and fix whitespaces
2551
2558
  *
2559
+ * Note: [🔂] This function is idempotent.
2560
+ *
2552
2561
  * @param text with emojis
2553
2562
  * @returns text without emojis
2554
2563
  * @public exported from `@promptbook/utils`
@@ -2565,6 +2574,7 @@ function removeEmojis(text) {
2565
2574
  /**
2566
2575
  * Removes quotes from a string
2567
2576
  *
2577
+ * Note: [🔂] This function is idempotent.
2568
2578
  * Tip: This is very useful for post-processing of the result of the LLM model
2569
2579
  * Note: This function removes only the same quotes from the beginning and the end of the string
2570
2580
  * Note: There are two similar functions:
@@ -4753,6 +4763,8 @@ function extractAllListItemsFromMarkdown(markdown) {
4753
4763
  /**
4754
4764
  * Makes first letter of a string uppercase
4755
4765
  *
4766
+ * Note: [🔂] This function is idempotent.
4767
+ *
4756
4768
  * @public exported from `@promptbook/utils`
4757
4769
  */
4758
4770
  function capitalize(word) {