@promptbook/node 0.112.0-24 → 0.112.0-25
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 +5 -13
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +47 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +5 -13
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +47 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -26,6 +26,45 @@ export type HoistedMenuItem = {
|
|
|
26
26
|
*/
|
|
27
27
|
isActive?: boolean;
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Shared actions provided to hoisted mobile menu-section renderers.
|
|
31
|
+
*
|
|
32
|
+
* @private mechanism inside Promptbook
|
|
33
|
+
*/
|
|
34
|
+
export type HoistedMobileMenuSectionRenderOptions = {
|
|
35
|
+
/**
|
|
36
|
+
* Closes the owning mobile header menu.
|
|
37
|
+
*/
|
|
38
|
+
readonly closeMenu: () => void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Mobile-only section hoisted into the shared application menu.
|
|
42
|
+
*
|
|
43
|
+
* @private mechanism inside Promptbook
|
|
44
|
+
*/
|
|
45
|
+
export type HoistedMobileMenuSection = {
|
|
46
|
+
/**
|
|
47
|
+
* Stable identifier used to preserve section open state.
|
|
48
|
+
*/
|
|
49
|
+
readonly key: string;
|
|
50
|
+
/**
|
|
51
|
+
* Visible section label rendered by the mobile menu.
|
|
52
|
+
*/
|
|
53
|
+
readonly label: ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the section should start expanded whenever the menu opens.
|
|
56
|
+
*/
|
|
57
|
+
readonly isDefaultOpen?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Lazily renders section content inside the mobile header menu.
|
|
60
|
+
*/
|
|
61
|
+
readonly renderContent: (options: HoistedMobileMenuSectionRenderOptions) => ReactNode;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Value exposed through the shared menu-hoisting context.
|
|
65
|
+
*
|
|
66
|
+
* @private mechanism inside Promptbook
|
|
67
|
+
*/
|
|
29
68
|
type MenuHoistingContextType = {
|
|
30
69
|
/**
|
|
31
70
|
* The currently hoisted menu items
|
|
@@ -35,6 +74,14 @@ type MenuHoistingContextType = {
|
|
|
35
74
|
* Set the hoisted menu items
|
|
36
75
|
*/
|
|
37
76
|
setMenu: (items: HoistedMenuItem[]) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Mobile-only sections hoisted into the shared application menu.
|
|
79
|
+
*/
|
|
80
|
+
mobileMenuSections: HoistedMobileMenuSection[];
|
|
81
|
+
/**
|
|
82
|
+
* Sets the mobile-only hoisted menu sections.
|
|
83
|
+
*/
|
|
84
|
+
setMobileMenuSections: (sections: HoistedMobileMenuSection[]) => void;
|
|
38
85
|
};
|
|
39
86
|
/**
|
|
40
87
|
* Provider for menu hoisting
|
package/esm/src/version.d.ts
CHANGED
|
@@ -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.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-24`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/node",
|
|
3
|
-
"version": "0.112.0-
|
|
3
|
+
"version": "0.112.0-25",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"module": "./esm/index.es.js",
|
|
97
97
|
"typings": "./esm/typings/src/_packages/node.index.d.ts",
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"@promptbook/core": "0.112.0-
|
|
99
|
+
"@promptbook/core": "0.112.0-25"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"@mozilla/readability": "0.6.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* @generated
|
|
49
49
|
* @see https://github.com/webgptorg/promptbook
|
|
50
50
|
*/
|
|
51
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
51
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-25';
|
|
52
52
|
/**
|
|
53
53
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
54
54
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -15039,10 +15039,10 @@
|
|
|
15039
15039
|
if (!trimmedContent) {
|
|
15040
15040
|
return requirements;
|
|
15041
15041
|
}
|
|
15042
|
-
//
|
|
15042
|
+
// Add goal to the system message
|
|
15043
15043
|
const goalSection = `Goal: ${trimmedContent}`;
|
|
15044
|
-
|
|
15045
|
-
return this.
|
|
15044
|
+
const requirementsWithGoal = this.appendToSystemMessage(requirements, goalSection, '\n\n');
|
|
15045
|
+
return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
|
|
15046
15046
|
}
|
|
15047
15047
|
}
|
|
15048
15048
|
/**
|
|
@@ -18074,15 +18074,7 @@
|
|
|
18074
18074
|
// Add rule to the system message
|
|
18075
18075
|
const ruleSection = `Rule: ${trimmedContent}`;
|
|
18076
18076
|
const requirementsWithRule = this.appendToSystemMessage(requirements, ruleSection, '\n\n');
|
|
18077
|
-
|
|
18078
|
-
.split(/\r?\n/)
|
|
18079
|
-
.map((line) => line.trim())
|
|
18080
|
-
.filter(Boolean)
|
|
18081
|
-
.map((line) => `- ${line}`);
|
|
18082
|
-
if (ruleLines.length === 0) {
|
|
18083
|
-
return requirementsWithRule;
|
|
18084
|
-
}
|
|
18085
|
-
return this.appendToPromptSuffix(requirementsWithRule, ruleLines.join('\n'));
|
|
18077
|
+
return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
|
|
18086
18078
|
}
|
|
18087
18079
|
}
|
|
18088
18080
|
/**
|