@promptbook/javascript 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 +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 +1 -1
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +47 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
18
18
|
* @generated
|
|
19
19
|
* @see https://github.com/webgptorg/promptbook
|
|
20
20
|
*/
|
|
21
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
21
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-25';
|
|
22
22
|
/**
|
|
23
23
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
24
24
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -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/javascript",
|
|
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,
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"module": "./esm/index.es.js",
|
|
98
98
|
"typings": "./esm/typings/src/_packages/javascript.index.d.ts",
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@promptbook/core": "0.112.0-
|
|
100
|
+
"@promptbook/core": "0.112.0-25"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"crypto": "1.0.1",
|
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @generated
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
25
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-25';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -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/umd/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
|
*/
|