@promptbook/markdown-utils 0.81.0-15 → 0.81.0-17

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.
@@ -19,7 +19,7 @@ import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFr
19
19
  import { flattenMarkdown } from '../utils/markdown/flattenMarkdown';
20
20
  import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection';
21
21
  import { parseMarkdownSection } from '../utils/markdown/parseMarkdownSection';
22
- import { removeContentComments } from '../utils/markdown/removeContentComments';
22
+ import { removeMarkdownComments } from '../utils/markdown/removeMarkdownComments';
23
23
  import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
24
24
  import { splitMarkdownIntoSections } from '../utils/markdown/splitMarkdownIntoSections';
25
25
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
@@ -43,6 +43,6 @@ export { extractOneBlockFromMarkdown };
43
43
  export { flattenMarkdown };
44
44
  export type { MarkdownSection };
45
45
  export { parseMarkdownSection };
46
- export { removeContentComments };
46
+ export { removeMarkdownComments };
47
47
  export { removeMarkdownFormatting };
48
48
  export { splitMarkdownIntoSections };
@@ -5,15 +5,20 @@
5
5
  */
6
6
  export declare const GeneratorFormfactorDefinition: {
7
7
  readonly name: "GENERATOR";
8
- readonly description: "@@@";
8
+ readonly description: "Generates any kind (in HTML with possible scripts and css format) of content from input message";
9
9
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/184";
10
10
  readonly pipelineInterface: {
11
11
  readonly inputParameters: readonly [{
12
- readonly name: "nonce";
13
- readonly description: "Just to prevent GENERATOR to be set as implicit formfactor";
12
+ readonly name: "inputMessage";
13
+ readonly description: "Input message to be image made from";
14
14
  readonly isInput: true;
15
15
  readonly isOutput: false;
16
16
  }];
17
- readonly outputParameters: readonly [];
17
+ readonly outputParameters: readonly [{
18
+ readonly name: "result";
19
+ readonly description: "Result in HTML to be shown to user";
20
+ readonly isInput: false;
21
+ readonly isOutput: true;
22
+ }];
18
23
  };
19
24
  };
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export declare const ImageGeneratorFormfactorDefinition: {
7
7
  readonly name: "IMAGE_GENERATOR";
8
- readonly description: "@@@";
8
+ readonly description: "Generates prompt for image generation from input message";
9
9
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/184";
10
10
  readonly pipelineInterface: {
11
11
  readonly inputParameters: readonly [{
@@ -105,20 +105,25 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
105
105
  };
106
106
  }, {
107
107
  readonly name: "GENERATOR";
108
- readonly description: "@@@";
108
+ readonly description: "Generates any kind (in HTML with possible scripts and css format) of content from input message";
109
109
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/184";
110
110
  readonly pipelineInterface: {
111
111
  readonly inputParameters: readonly [{
112
- readonly name: "nonce";
113
- readonly description: "Just to prevent GENERATOR to be set as implicit formfactor";
112
+ readonly name: "inputMessage";
113
+ readonly description: "Input message to be image made from";
114
114
  readonly isInput: true;
115
115
  readonly isOutput: false;
116
116
  }];
117
- readonly outputParameters: readonly [];
117
+ readonly outputParameters: readonly [{
118
+ readonly name: "result";
119
+ readonly description: "Result in HTML to be shown to user";
120
+ readonly isInput: false;
121
+ readonly isOutput: true;
122
+ }];
118
123
  };
119
124
  }, {
120
125
  readonly name: "IMAGE_GENERATOR";
121
- readonly description: "@@@";
126
+ readonly description: "Generates prompt for image generation from input message";
122
127
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/184";
123
128
  readonly pipelineInterface: {
124
129
  readonly inputParameters: readonly [{
@@ -8,3 +8,6 @@ export declare const QuickChatbotHla: {
8
8
  type: "SYNC";
9
9
  $applyToPipelineJson($pipelineJson: $PipelineJson): void;
10
10
  };
11
+ /**
12
+ * TODO: [🧠][📛] Should this be here?
13
+ */
@@ -1,10 +1,10 @@
1
1
  import type { string_html } from '../../types/typeAliases';
2
2
  import type { string_markdown } from '../../types/typeAliases';
3
3
  /**
4
- * Removes HTML or Markdown comments from a string.
4
+ * Removes Markdown (or HTML) comments
5
5
  *
6
6
  * @param {string} content - The string to remove comments from.
7
7
  * @returns {string} The input string with all comments removed.
8
8
  * @public exported from `@promptbook/markdown-utils`
9
9
  */
10
- export declare function removeContentComments<TContent extends string_html | string_markdown>(content: TContent): TContent;
10
+ export declare function removeMarkdownComments<TContent extends string_html | string_markdown>(content: TContent): TContent;
@@ -1,4 +1,4 @@
1
- import { JsonValue } from 'type-fest';
1
+ import type { JsonValue } from 'type-fest';
2
2
  /**
3
3
  * Tests if the value is [🚉] serializable as JSON
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/markdown-utils",
3
- "version": "0.81.0-15",
3
+ "version": "0.81.0-17",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "--note-0": " <- [🐊]",
6
6
  "private": false,
package/umd/index.umd.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * @generated
25
25
  * @see https://github.com/webgptorg/promptbook
26
26
  */
27
- var PROMPTBOOK_ENGINE_VERSION = '0.81.0-14';
27
+ var PROMPTBOOK_ENGINE_VERSION = '0.81.0-16';
28
28
  /**
29
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
30
30
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -969,7 +969,6 @@
969
969
  function deepClone(objectValue) {
970
970
  return JSON.parse(JSON.stringify(objectValue));
971
971
  /*
972
- !!!!!!!!
973
972
  TODO: [🧠] Is there a better implementation?
974
973
  > const propertyNames = Object.getOwnPropertyNames(objectValue);
975
974
  > for (const propertyName of propertyNames) {
@@ -6138,13 +6137,13 @@
6138
6137
  */
6139
6138
 
6140
6139
  /**
6141
- * Removes HTML or Markdown comments from a string.
6140
+ * Removes Markdown (or HTML) comments
6142
6141
  *
6143
6142
  * @param {string} content - The string to remove comments from.
6144
6143
  * @returns {string} The input string with all comments removed.
6145
6144
  * @public exported from `@promptbook/markdown-utils`
6146
6145
  */
6147
- function removeContentComments(content) {
6146
+ function removeMarkdownComments(content) {
6148
6147
  return spaceTrim.spaceTrim(content.replace(/<!--(.*?)-->/gs, ''));
6149
6148
  }
6150
6149
 
@@ -6163,7 +6162,7 @@
6163
6162
  return content.replace(sectionRegex, contentToInsert);
6164
6163
  }
6165
6164
  // Note: Following is the case when the section is not found in the file so we add it there
6166
- var placeForSection = removeContentComments(content).match(/^##.*$/im);
6165
+ var placeForSection = removeMarkdownComments(content).match(/^##.*$/im);
6167
6166
  if (placeForSection !== null) {
6168
6167
  var _a = __read(placeForSection, 1), heading_1 = _a[0];
6169
6168
  return content.replace(heading_1, spaceTrim.spaceTrim(function (block) { return "\n ".concat(block(contentToInsert), "\n\n ").concat(block(heading_1), "\n "); }));
@@ -6477,7 +6476,7 @@
6477
6476
  exports.extractOneBlockFromMarkdown = extractOneBlockFromMarkdown;
6478
6477
  exports.flattenMarkdown = flattenMarkdown;
6479
6478
  exports.parseMarkdownSection = parseMarkdownSection;
6480
- exports.removeContentComments = removeContentComments;
6479
+ exports.removeMarkdownComments = removeMarkdownComments;
6481
6480
  exports.removeMarkdownFormatting = removeMarkdownFormatting;
6482
6481
  exports.splitMarkdownIntoSections = splitMarkdownIntoSections;
6483
6482