@promptbook/editable 0.100.4-0 → 0.101.0-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.
- package/esm/index.es.js +11 -1
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/components.index.d.ts +4 -0
- package/esm/typings/src/_packages/core.index.d.ts +4 -2
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +14 -0
- package/esm/typings/src/_packages/types.index.d.ts +4 -6
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +21 -0
- package/esm/typings/src/book-2.0/{commitments/_misc → agent-source}/AgentModelRequirements.d.ts +1 -1
- package/esm/typings/src/book-2.0/{commitments/_misc → agent-source}/AgentSourceParseResult.d.ts +3 -1
- package/esm/typings/src/book-2.0/{commitments/_misc → agent-source}/createAgentModelRequirements.d.ts +2 -2
- package/esm/typings/src/book-2.0/{commitments/_misc → agent-source}/createAgentModelRequirementsWithCommitments.d.ts +3 -3
- package/esm/typings/src/book-2.0/{commitments/_misc → agent-source}/createCommitmentRegex.d.ts +2 -2
- package/esm/typings/src/book-2.0/agent-source/extractMetaLinks.d.ts +8 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.d.ts +4 -19
- package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.d.ts +9 -0
- package/esm/typings/src/book-2.0/commitments/ACTION/ACTION.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/FORMAT/FORMAT.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/META_IMAGE/META_IMAGE.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/META_LINK/META_LINK.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/MODEL/MODEL.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/NOTE/NOTE.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/PERSONA/PERSONA.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/RULE/RULE.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/SAMPLE/SAMPLE.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/STYLE/STYLE.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/_base/BaseCommitmentDefinition.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/_base/CommitmentDefinition.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/_base/NotYetImplementedCommitmentDefinition.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/{_misc → _base}/ParsedCommitment.d.ts +1 -1
- package/esm/typings/src/book-2.0/commitments/_base/createEmptyAgentModelRequirements.d.ts +1 -1
- package/esm/typings/src/book-2.0/utils/extractAgentMetadata.d.ts +17 -0
- package/esm/typings/src/book-2.0/utils/extractProfileImageFromSystemMessage.d.ts +12 -0
- package/esm/typings/src/book-2.0/utils/generateGravatarUrl.d.ts +10 -0
- package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +10 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +1 -1
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +2 -8
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/examples/ChatMarkdownDemo.d.ts +16 -0
- package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/utils/renderMarkdown.d.ts +21 -0
- package/esm/typings/src/book-components/Chat/utils/renderMarkdown.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/_common/profiles/llmProviderProfiles.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/countLines.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/countPages.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countWords.d.ts +3 -1
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +2 -0
- package/esm/typings/src/utils/markdown/humanizeAiText.d.ts +13 -0
- package/esm/typings/src/utils/markdown/humanizeAiText.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/humanizeAiTextEllipsis.d.ts +13 -0
- package/esm/typings/src/utils/markdown/humanizeAiTextEmdashed.d.ts +13 -0
- package/esm/typings/src/utils/markdown/humanizeAiTextQuotes.d.ts +13 -0
- package/esm/typings/src/utils/markdown/humanizeAiTextWhitespace.d.ts +13 -0
- package/esm/typings/src/utils/markdown/prettifyMarkdown.d.ts +8 -0
- package/esm/typings/src/utils/markdown/promptbookifyAiText.d.ts +12 -0
- package/esm/typings/src/utils/markdown/promptbookifyAiText.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeMarkdownLinks.d.ts +11 -0
- package/esm/typings/src/utils/markdown/removeMarkdownLinks.test.d.ts +4 -0
- package/esm/typings/src/utils/normalization/capitalize.d.ts +2 -0
- package/esm/typings/src/utils/normalization/decapitalize.d.ts +3 -1
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +2 -0
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.d.ts +2 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +2 -0
- package/esm/typings/src/utils/parseNumber.d.ts +1 -0
- package/esm/typings/src/utils/removeEmojis.d.ts +2 -0
- package/esm/typings/src/utils/removeQuotes.d.ts +1 -0
- package/esm/typings/src/utils/serialization/deepClone.d.ts +1 -0
- package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +1 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +11 -1
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/book-2.0/commitments/_misc/parseAgentSourceWithCommitments.d.ts +0 -24
- package/esm/typings/src/book-2.0/utils/profileImageUtils.d.ts +0 -39
- /package/esm/typings/src/book-2.0/{commitments/_misc → agent-source}/removeCommentsFromSystemMessage.d.ts +0 -0
@@ -9,6 +9,8 @@ export type string_SCREAMING_CASE = string;
|
|
9
9
|
/**
|
10
10
|
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
11
11
|
*
|
12
|
+
* Note: [🔂] This function is idempotent.
|
13
|
+
*
|
12
14
|
* @param text The text string to be converted to SCREAMING_CASE format.
|
13
15
|
* @returns The normalized text in SCREAMING_CASE format.
|
14
16
|
* @example 'HELLO_WORLD'
|
@@ -8,6 +8,8 @@ export type string_snake_case = string;
|
|
8
8
|
/**
|
9
9
|
* Normalizes a text string to snake_case format.
|
10
10
|
*
|
11
|
+
* Note: [🔂] This function is idempotent.
|
12
|
+
*
|
11
13
|
* @param text The text string to be converted to snake_case format.
|
12
14
|
* @returns The normalized text in snake_case format.
|
13
15
|
* @example 'hello_world'
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* Removes diacritic marks (accents) from characters in a string.
|
3
3
|
*
|
4
|
+
* Note: [🔂] This function is idempotent.
|
5
|
+
*
|
4
6
|
* @param input The string containing diacritics to be normalized.
|
5
7
|
* @returns The string with diacritics removed or normalized.
|
6
8
|
* @public exported from `@promptbook/utils`
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Removes quotes from a string
|
3
3
|
*
|
4
|
+
* Note: [🔂] This function is idempotent.
|
4
5
|
* Tip: This is very useful for post-processing of the result of the LLM model
|
5
6
|
* Note: This function removes only the same quotes from the beginning and the end of the string
|
6
7
|
* Note: There are two similar functions:
|
@@ -2,6 +2,7 @@ import type { WritableDeep } from 'type-fest';
|
|
2
2
|
/**
|
3
3
|
* Creates a deep clone of the given object
|
4
4
|
*
|
5
|
+
* Note: [🔂] This function is idempotent.
|
5
6
|
* Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
|
6
7
|
*
|
7
8
|
* @param objectValue The object to clone.
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Function trimCodeBlock will trim starting and ending code block from the string if it is present.
|
3
3
|
*
|
4
|
+
* Note: [🔂] This function is idempotent.
|
4
5
|
* Note: This is useful for post-processing of the result of the chat LLM model
|
5
6
|
* when the model wraps the result in the (markdown) code block.
|
6
7
|
*
|
@@ -3,6 +3,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
3
3
|
/**
|
4
4
|
* Tests if given string is valid URL.
|
5
5
|
*
|
6
|
+
* Note: [🔂] This function is idempotent.
|
6
7
|
* Note: Dataurl are considered perfectly valid.
|
7
8
|
* Note: There are two similar functions:
|
8
9
|
* - `isValidUrl` which tests any URL
|
@@ -3,6 +3,8 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
3
3
|
/**
|
4
4
|
* Checks if value is valid uuid
|
5
5
|
*
|
6
|
+
* Note: [🔂] This function is idempotent.
|
7
|
+
*
|
6
8
|
* @public exported from `@promptbook/utils`
|
7
9
|
*/
|
8
10
|
export declare function isValidUuid(value: really_unknown): value is string_uuid;
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
16
16
|
/**
|
17
17
|
* Represents the version string of the Promptbook engine.
|
18
|
-
* It follows semantic versioning (e.g., `0.
|
18
|
+
* It follows semantic versioning (e.g., `0.101.0-0`).
|
19
19
|
*
|
20
20
|
* @generated
|
21
21
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@promptbook/editable",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.101.0-1",
|
4
4
|
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
5
5
|
"private": false,
|
6
6
|
"sideEffects": false,
|
@@ -95,7 +95,7 @@
|
|
95
95
|
"module": "./esm/index.es.js",
|
96
96
|
"typings": "./esm/typings/src/_packages/editable.index.d.ts",
|
97
97
|
"peerDependencies": {
|
98
|
-
"@promptbook/core": "0.
|
98
|
+
"@promptbook/core": "0.101.0-1"
|
99
99
|
},
|
100
100
|
"dependencies": {
|
101
101
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
* @generated
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
25
25
|
*/
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.101.0-1';
|
27
27
|
/**
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -493,6 +493,7 @@
|
|
493
493
|
/**
|
494
494
|
* Function parseNumber will parse number from string
|
495
495
|
*
|
496
|
+
* Note: [🔂] This function is idempotent.
|
496
497
|
* Unlike Number.parseInt, Number.parseFloat it will never ever result in NaN
|
497
498
|
* Note: it also works only with decimal numbers
|
498
499
|
*
|
@@ -1049,6 +1050,8 @@
|
|
1049
1050
|
/**
|
1050
1051
|
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
1051
1052
|
*
|
1053
|
+
* Note: [🔂] This function is idempotent.
|
1054
|
+
*
|
1052
1055
|
* @param text The text string to be converted to SCREAMING_CASE format.
|
1053
1056
|
* @returns The normalized text in SCREAMING_CASE format.
|
1054
1057
|
* @example 'HELLO_WORLD'
|
@@ -1284,6 +1287,7 @@
|
|
1284
1287
|
/**
|
1285
1288
|
* Creates a deep clone of the given object
|
1286
1289
|
*
|
1290
|
+
* Note: [🔂] This function is idempotent.
|
1287
1291
|
* Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
|
1288
1292
|
*
|
1289
1293
|
* @param objectValue The object to clone.
|
@@ -1671,6 +1675,8 @@
|
|
1671
1675
|
/**
|
1672
1676
|
* Removes diacritic marks (accents) from characters in a string.
|
1673
1677
|
*
|
1678
|
+
* Note: [🔂] This function is idempotent.
|
1679
|
+
*
|
1674
1680
|
* @param input The string containing diacritics to be normalized.
|
1675
1681
|
* @returns The string with diacritics removed or normalized.
|
1676
1682
|
* @public exported from `@promptbook/utils`
|
@@ -1688,6 +1694,8 @@
|
|
1688
1694
|
/**
|
1689
1695
|
* Removes emojis from a string and fix whitespaces
|
1690
1696
|
*
|
1697
|
+
* Note: [🔂] This function is idempotent.
|
1698
|
+
*
|
1691
1699
|
* @param text with emojis
|
1692
1700
|
* @returns text without emojis
|
1693
1701
|
* @public exported from `@promptbook/utils`
|
@@ -1704,6 +1712,7 @@
|
|
1704
1712
|
/**
|
1705
1713
|
* Removes quotes from a string
|
1706
1714
|
*
|
1715
|
+
* Note: [🔂] This function is idempotent.
|
1707
1716
|
* Tip: This is very useful for post-processing of the result of the LLM model
|
1708
1717
|
* Note: This function removes only the same quotes from the beginning and the end of the string
|
1709
1718
|
* Note: There are two similar functions:
|
@@ -2535,6 +2544,7 @@
|
|
2535
2544
|
/**
|
2536
2545
|
* Tests if given string is valid URL.
|
2537
2546
|
*
|
2547
|
+
* Note: [🔂] This function is idempotent.
|
2538
2548
|
* Note: Dataurl are considered perfectly valid.
|
2539
2549
|
* Note: There are two similar functions:
|
2540
2550
|
* - `isValidUrl` which tests any URL
|