@promptbook/templates 0.103.0-34 → 0.103.0-36
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/README.md +57 -21
- package/esm/index.es.js +527 -570
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/cli.index.d.ts +3 -1
- package/esm/typings/src/_packages/core.index.d.ts +3 -1
- package/esm/typings/src/_packages/wizard.index.d.ts +3 -1
- package/esm/typings/src/book-components/_common/Tooltip/Tooltip.d.ts +47 -0
- package/esm/typings/src/transpilers/_common/BookTranspiler.d.ts +2 -1
- package/esm/typings/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.d.ts +13 -0
- package/esm/typings/src/transpilers/formatted-book-in-markdown/register.d.ts +15 -0
- package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.test.d.ts +1 -0
- package/esm/typings/src/transpilers/{openai → openai-sdk}/register.d.ts +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +527 -570
- package/umd/index.umd.js.map +1 -1
- /package/esm/typings/src/transpilers/{openai → openai-sdk}/OpenAiSdkTranspiler.d.ts +0 -0
- /package/esm/typings/src/{playground/permanent/transpilers-playground.d.ts → transpilers/openai-sdk/playground/playground.d.ts} +0 -0
|
@@ -30,7 +30,8 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
|
|
|
30
30
|
import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
|
|
31
31
|
import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
|
|
32
32
|
import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
|
|
33
|
-
import {
|
|
33
|
+
import { _FormattedBookInMarkdownTranspilerRegistration } from '../transpilers/formatted-book-in-markdown/register';
|
|
34
|
+
import { _OpenAiSdkTranspilerRegistration } from '../transpilers/openai-sdk/register';
|
|
34
35
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
35
36
|
export { _CLI };
|
|
36
37
|
export { _AnthropicClaudeMetadataRegistration };
|
|
@@ -63,4 +64,5 @@ export { _PdfScraperRegistration };
|
|
|
63
64
|
export { _PdfScraperMetadataRegistration };
|
|
64
65
|
export { _WebsiteScraperRegistration };
|
|
65
66
|
export { _WebsiteScraperMetadataRegistration };
|
|
67
|
+
export { _FormattedBookInMarkdownTranspilerRegistration };
|
|
66
68
|
export { _OpenAiSdkTranspilerRegistration };
|
|
@@ -172,7 +172,8 @@ import { BlackholeStorage } from '../storage/blackhole/BlackholeStorage';
|
|
|
172
172
|
import { MemoryStorage } from '../storage/memory/MemoryStorage';
|
|
173
173
|
import { PrefixStorage } from '../storage/utils/PrefixStorage';
|
|
174
174
|
import { $bookTranspilersRegister } from '../transpilers/_common/register/$bookTranspilersRegister';
|
|
175
|
-
import {
|
|
175
|
+
import { FormattedBookInMarkdownTranspiler } from '../transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler';
|
|
176
|
+
import { OpenAiSdkTranspiler } from '../transpilers/openai-sdk/OpenAiSdkTranspiler';
|
|
176
177
|
import { MODEL_VARIANTS } from '../types/ModelVariant';
|
|
177
178
|
import { NonTaskSectionTypes } from '../types/SectionType';
|
|
178
179
|
import { SectionTypes } from '../types/SectionType';
|
|
@@ -353,6 +354,7 @@ export { BlackholeStorage };
|
|
|
353
354
|
export { MemoryStorage };
|
|
354
355
|
export { PrefixStorage };
|
|
355
356
|
export { $bookTranspilersRegister };
|
|
357
|
+
export { FormattedBookInMarkdownTranspiler };
|
|
356
358
|
export { OpenAiSdkTranspiler };
|
|
357
359
|
export { MODEL_VARIANTS };
|
|
358
360
|
export { NonTaskSectionTypes };
|
|
@@ -29,7 +29,8 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
|
|
|
29
29
|
import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
|
|
30
30
|
import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
|
|
31
31
|
import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
|
|
32
|
-
import {
|
|
32
|
+
import { _FormattedBookInMarkdownTranspilerRegistration } from '../transpilers/formatted-book-in-markdown/register';
|
|
33
|
+
import { _OpenAiSdkTranspilerRegistration } from '../transpilers/openai-sdk/register';
|
|
33
34
|
import { wizard } from '../wizard/wizard';
|
|
34
35
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
35
36
|
export { _AnthropicClaudeMetadataRegistration };
|
|
@@ -62,5 +63,6 @@ export { _PdfScraperRegistration };
|
|
|
62
63
|
export { _PdfScraperMetadataRegistration };
|
|
63
64
|
export { _WebsiteScraperRegistration };
|
|
64
65
|
export { _WebsiteScraperMetadataRegistration };
|
|
66
|
+
export { _FormattedBookInMarkdownTranspilerRegistration };
|
|
65
67
|
export { _OpenAiSdkTranspilerRegistration };
|
|
66
68
|
export { wizard };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type TooltipProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The content to display in the tooltip
|
|
5
|
+
*/
|
|
6
|
+
content: string;
|
|
7
|
+
/**
|
|
8
|
+
* The element that triggers the tooltip
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The position of the tooltip relative to the trigger element
|
|
13
|
+
* @default "top"
|
|
14
|
+
*/
|
|
15
|
+
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
16
|
+
/**
|
|
17
|
+
* Optional delay before showing the tooltip (in milliseconds)
|
|
18
|
+
* @default 0
|
|
19
|
+
*/
|
|
20
|
+
delay?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Render the tooltip wrapper as a block-level element that spans full width.
|
|
23
|
+
* Useful when wrapping grid/list items so the clickable area matches the visual card.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
block?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Enable tooltip on touch devices. By default tooltips are disabled on touch to avoid
|
|
29
|
+
* stealing clicks from the underlying element (eg. agent card selection).
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
isEnabledOnTouch?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* If true, the tooltip will not be displayed but the content will still be rendered.
|
|
35
|
+
* In this case <Tooltip> is equivalent to a <React.Fragment> with the content.
|
|
36
|
+
*
|
|
37
|
+
* Note: Tooltip sometimes breaks the hover, temporarily disable via this prop
|
|
38
|
+
*/
|
|
39
|
+
isDisabled?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A tooltip component that displays additional information when hovering over an element
|
|
43
|
+
*
|
|
44
|
+
* @private Used internally in book components
|
|
45
|
+
*/
|
|
46
|
+
export declare function Tooltip({ content, children, position, delay, block, isEnabledOnTouch: enableOnTouch, isDisabled, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Promisable } from 'type-fest';
|
|
1
2
|
import { BookTranspilerOptions, ExecutionTools, Registered, string_book, string_name, string_script, string_title } from '../../_packages/types.index';
|
|
2
3
|
/**
|
|
3
4
|
* Transpiler takes a book and transpiles it into another format (e.g., Langchain).
|
|
@@ -24,5 +25,5 @@ export type BookTranspiler = Registered & {
|
|
|
24
25
|
* @param options additional options for the transpiler
|
|
25
26
|
* @returns transpiled book
|
|
26
27
|
*/
|
|
27
|
-
transpileBook(book: string_book, tools: ExecutionTools, options?: BookTranspilerOptions):
|
|
28
|
+
transpileBook(book: string_book, tools: ExecutionTools, options?: BookTranspilerOptions): Promisable<string_script>;
|
|
28
29
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BookTranspilerOptions, ExecutionTools, string_book, string_markdown } from '../../_packages/types.index';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a book into a 1:1 formatted markdown
|
|
4
|
+
*
|
|
5
|
+
* @public exported from `@promptbook/core`
|
|
6
|
+
*/
|
|
7
|
+
export declare const FormattedBookInMarkdownTranspiler: {
|
|
8
|
+
readonly name: "formatted-book-in-markdown";
|
|
9
|
+
readonly title: "Formatted Book in Markdown";
|
|
10
|
+
readonly packageName: "@promptbook/core";
|
|
11
|
+
readonly className: "FormattedBookInMarkdownTranspiler";
|
|
12
|
+
readonly transpileBook: (book: string_book, tools: ExecutionTools, options?: BookTranspilerOptions) => string_markdown;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Registration } from '../../_packages/types.index';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of transpiler
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/wizard`
|
|
8
|
+
* @public exported from `@promptbook/cli`
|
|
9
|
+
*
|
|
10
|
+
* TODO: !!!! Which package should export this?
|
|
11
|
+
*/
|
|
12
|
+
export declare const _FormattedBookInMarkdownTranspilerRegistration: Registration;
|
|
13
|
+
/**
|
|
14
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
15
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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-35`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/templates",
|
|
3
|
-
"version": "0.103.0-
|
|
3
|
+
"version": "0.103.0-36",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
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/templates.index.d.ts",
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@promptbook/core": "0.103.0-
|
|
98
|
+
"@promptbook/core": "0.103.0-36"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"spacetrim": "0.11.60"
|