@promptbook/types 0.103.0-18 → 0.103.0-20
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/typings/src/_packages/components.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +4 -0
- package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +16 -0
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +26 -7
- package/esm/typings/src/types/typeAliases.d.ts +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/esm/typings/src/book-2.0/agent-source/padBookContent.d.ts +0 -10
|
@@ -7,6 +7,7 @@ import type { AvatarProfileProps } from '../book-components/AvatarProfile/Avatar
|
|
|
7
7
|
import { AvatarProfile } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
|
|
8
8
|
import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
|
9
9
|
import { AvatarProfileFromSource } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
|
10
|
+
import { DEFAULT_BOOK_EDITOR_HEIGHT } from '../book-components/BookEditor/BookEditor';
|
|
10
11
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
11
12
|
import { BookEditor } from '../book-components/BookEditor/BookEditor';
|
|
12
13
|
import { DEFAULT_BOOK_FONT_CLASS } from '../book-components/BookEditor/config';
|
|
@@ -61,6 +62,7 @@ export type { AvatarProfileProps };
|
|
|
61
62
|
export { AvatarProfile };
|
|
62
63
|
export type { AvatarProfileFromSourceProps };
|
|
63
64
|
export { AvatarProfileFromSource };
|
|
65
|
+
export { DEFAULT_BOOK_EDITOR_HEIGHT };
|
|
64
66
|
export type { BookEditorProps };
|
|
65
67
|
export { BookEditor };
|
|
66
68
|
export { DEFAULT_BOOK_FONT_CLASS };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
2
|
import { createAgentModelRequirements } from '../book-2.0/agent-source/createAgentModelRequirements';
|
|
3
3
|
import { createAgentModelRequirementsWithCommitments } from '../book-2.0/agent-source/createAgentModelRequirementsWithCommitments';
|
|
4
|
+
import { PADDING_LINES } from '../book-2.0/agent-source/padBook';
|
|
5
|
+
import { padBook } from '../book-2.0/agent-source/padBook';
|
|
4
6
|
import { parseAgentSource } from '../book-2.0/agent-source/parseAgentSource';
|
|
5
7
|
import { parseParameters } from '../book-2.0/agent-source/parseParameters';
|
|
6
8
|
import { isValidBook } from '../book-2.0/agent-source/string_book';
|
|
@@ -177,6 +179,8 @@ import { REMOTE_SERVER_URLS } from '../../servers';
|
|
|
177
179
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
178
180
|
export { createAgentModelRequirements };
|
|
179
181
|
export { createAgentModelRequirementsWithCommitments };
|
|
182
|
+
export { PADDING_LINES };
|
|
183
|
+
export { padBook };
|
|
180
184
|
export { parseAgentSource };
|
|
181
185
|
export { parseParameters };
|
|
182
186
|
export { isValidBook };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { string_book } from './string_book';
|
|
2
|
+
/**
|
|
3
|
+
* Number of padding lines to add at the end of the book content
|
|
4
|
+
*
|
|
5
|
+
* @public exported from `@promptbook/core`
|
|
6
|
+
*/
|
|
7
|
+
export declare const PADDING_LINES = 11;
|
|
8
|
+
/**
|
|
9
|
+
* A function that adds padding to the book content
|
|
10
|
+
*
|
|
11
|
+
* @public exported from `@promptbook/core`
|
|
12
|
+
*/
|
|
13
|
+
export declare function padBook(content: string_book): string_book;
|
|
14
|
+
/**
|
|
15
|
+
* TODO: [🧠] Maybe export
|
|
16
|
+
*/
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
|
-
import type
|
|
4
|
-
import type { string_knowledge_source_content } from '../../types/typeAliases';
|
|
3
|
+
import { type string_book } from '../../book-2.0/agent-source/string_book';
|
|
4
|
+
import type { number_percent, number_positive, string_css_value, string_knowledge_source_content } from '../../types/typeAliases';
|
|
5
|
+
/**
|
|
6
|
+
* Default height of the book editor
|
|
7
|
+
*
|
|
8
|
+
* Note: This height is computed based on the number of lines in the default book + padding multiplied by an estimated line height.
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/components`
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_BOOK_EDITOR_HEIGHT: number;
|
|
5
13
|
/**
|
|
6
14
|
* Props of `BookEditor`
|
|
7
15
|
*
|
|
@@ -20,6 +28,22 @@ export type BookEditorProps = {
|
|
|
20
28
|
* Optional CSS style which will be added to root <div/> element
|
|
21
29
|
*/
|
|
22
30
|
readonly style?: CSSProperties;
|
|
31
|
+
/**
|
|
32
|
+
* Height of the `BookEditor` component
|
|
33
|
+
*
|
|
34
|
+
* - You can use any valid CSS value, e.g., `500px`, `100%`, `50vh`, etc.
|
|
35
|
+
* - If not set, the default height is `DEFAULT_BOOK_EDITOR_HEIGHT`.
|
|
36
|
+
* - If set to `null`, the height should be controlled entirely via `className` or `style`, otherwise the editor will have zero height.
|
|
37
|
+
*
|
|
38
|
+
* @default `DEFAULT_BOOK_EDITOR_HEIGHT`
|
|
39
|
+
*/
|
|
40
|
+
readonly height?: string_css_value | null;
|
|
41
|
+
/**
|
|
42
|
+
* Zoom level of the editor
|
|
43
|
+
*
|
|
44
|
+
* @default 1 (100%)
|
|
45
|
+
*/
|
|
46
|
+
readonly zoom?: number_percent & number_positive;
|
|
23
47
|
/**
|
|
24
48
|
* The book which is being edited.
|
|
25
49
|
*/
|
|
@@ -40,11 +64,6 @@ export type BookEditorProps = {
|
|
|
40
64
|
* If true, disables border radius making the editor have sharp corners
|
|
41
65
|
*/
|
|
42
66
|
readonly isBorderRadiusDisabled?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* If true, shows the footer with book title and version information.
|
|
45
|
-
* By default, the footer is hidden.
|
|
46
|
-
*/
|
|
47
|
-
readonly isFooterShown?: boolean;
|
|
48
67
|
/**
|
|
49
68
|
* If true, the editor is in read-only mode
|
|
50
69
|
*
|
|
@@ -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.103.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.103.0-19`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/types",
|
|
3
|
-
"version": "0.103.0-
|
|
3
|
+
"version": "0.103.0-20",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
},
|
|
93
93
|
"typings": "./esm/typings/src/_packages/types.index.d.ts",
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@promptbook/core": "0.103.0-
|
|
95
|
+
"@promptbook/core": "0.103.0-20"
|
|
96
96
|
}
|
|
97
97
|
}
|