@promptbook/remote-server 0.8.0

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.
Files changed (190) hide show
  1. package/README.md +5 -0
  2. package/esm/index.es.js +160 -0
  3. package/esm/index.es.js.map +1 -0
  4. package/esm/typings/_packages/core.index.d.ts +17 -0
  5. package/esm/typings/_packages/execute-javascript.index.d.ts +3 -0
  6. package/esm/typings/_packages/openai.index.d.ts +3 -0
  7. package/esm/typings/_packages/remote-client.index.d.ts +4 -0
  8. package/esm/typings/_packages/remote-server.index.d.ts +3 -0
  9. package/esm/typings/_packages/types.index.d.ts +20 -0
  10. package/esm/typings/_packages/utils.index.d.ts +6 -0
  11. package/esm/typings/_packages/wizzard.index.d.ts +2 -0
  12. package/esm/typings/classes/PromptTemplatePipeline.d.ts +68 -0
  13. package/esm/typings/classes/PromptTemplatePipelineLibrary.d.ts +55 -0
  14. package/esm/typings/config.d.ts +10 -0
  15. package/esm/typings/conversion/_importPtp.d.ts +12 -0
  16. package/esm/typings/conversion/parseCommand.d.ts +6 -0
  17. package/esm/typings/conversion/parseCommand.test.d.ts +1 -0
  18. package/esm/typings/conversion/promptTemplatePipelineStringToJson.d.ts +12 -0
  19. package/esm/typings/conversion/promptTemplatePipelineStringToJson.test.d.ts +1 -0
  20. package/esm/typings/conversion/validatePromptTemplatePipelineJson.d.ts +26 -0
  21. package/esm/typings/conversion/validatePromptTemplatePipelineJson.test.d.ts +1 -0
  22. package/esm/typings/execution/CommonExecutionToolsOptions.d.ts +6 -0
  23. package/esm/typings/execution/ExecutionTools.d.ts +25 -0
  24. package/esm/typings/execution/NaturalExecutionTools.d.ts +22 -0
  25. package/esm/typings/execution/PromptResult.d.ts +38 -0
  26. package/esm/typings/execution/PtpExecutor.d.ts +19 -0
  27. package/esm/typings/execution/ScriptExecutionTools.d.ts +34 -0
  28. package/esm/typings/execution/UserInterfaceTools.d.ts +30 -0
  29. package/esm/typings/execution/createPtpExecutor.d.ts +18 -0
  30. package/esm/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -0
  31. package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -0
  32. package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -0
  33. package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +27 -0
  34. package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +11 -0
  35. package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -0
  36. package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +16 -0
  37. package/esm/typings/execution/plugins/natural-execution-tools/remote/createRemoteServer.d.ts +16 -0
  38. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Error.d.ts +3 -0
  39. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Progress.d.ts +4 -0
  40. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Request.d.ts +6 -0
  41. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Response.d.ts +4 -0
  42. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +20 -0
  43. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +19 -0
  44. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
  45. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -0
  46. package/esm/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -0
  47. package/esm/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +4 -0
  48. package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -0
  49. package/esm/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -0
  50. package/esm/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -0
  51. package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -0
  52. package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -0
  53. package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
  54. package/esm/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -0
  55. package/esm/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -0
  56. package/esm/typings/types/Command.d.ts +65 -0
  57. package/esm/typings/types/ExecutionTypes.d.ts +13 -0
  58. package/esm/typings/types/ModelRequirements.d.ts +28 -0
  59. package/esm/typings/types/Parameters.d.ts +14 -0
  60. package/esm/typings/types/Prompt.d.ts +35 -0
  61. package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +82 -0
  62. package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateParameterJson.d.ts +23 -0
  63. package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts +56 -0
  64. package/esm/typings/types/PromptTemplatePipelineString.d.ts +14 -0
  65. package/esm/typings/types/ScriptLanguage.d.ts +9 -0
  66. package/esm/typings/types/TaskProgress.d.ts +12 -0
  67. package/esm/typings/types/typeAliasEmoji.d.ts +9 -0
  68. package/esm/typings/types/typeAliases.d.ts +477 -0
  69. package/esm/typings/utils/emojis.d.ts +16 -0
  70. package/esm/typings/utils/just.d.ts +10 -0
  71. package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
  72. package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
  73. package/esm/typings/utils/markdown/extractBlocksFromMarkdown.d.ts +13 -0
  74. package/esm/typings/utils/markdown/extractBlocksFromMarkdown.test.d.ts +1 -0
  75. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +16 -0
  76. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
  77. package/esm/typings/utils/markdown/removeContentComments.d.ts +8 -0
  78. package/esm/typings/utils/markdown/removeContentComments.test.d.ts +1 -0
  79. package/esm/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
  80. package/esm/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
  81. package/esm/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -0
  82. package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -0
  83. package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -0
  84. package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -0
  85. package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -0
  86. package/esm/typings/utils/removeEmojis.d.ts +7 -0
  87. package/esm/typings/utils/removeEmojis.test.d.ts +1 -0
  88. package/esm/typings/utils/removeQuotes.d.ts +13 -0
  89. package/esm/typings/utils/removeQuotes.test.d.ts +1 -0
  90. package/esm/typings/utils/replaceParameters.d.ts +16 -0
  91. package/esm/typings/utils/replaceParameters.test.d.ts +1 -0
  92. package/esm/typings/utils/unwrapResult.d.ts +13 -0
  93. package/esm/typings/utils/unwrapResult.test.d.ts +1 -0
  94. package/esm/typings/wizzard/Wizzard.d.ts +1 -0
  95. package/esm/typings/wizzard/sample.d.ts +5 -0
  96. package/package.json +46 -0
  97. package/umd/index.umd.js +171 -0
  98. package/umd/index.umd.js.map +1 -0
  99. package/umd/typings/_packages/core.index.d.ts +17 -0
  100. package/umd/typings/_packages/execute-javascript.index.d.ts +3 -0
  101. package/umd/typings/_packages/openai.index.d.ts +3 -0
  102. package/umd/typings/_packages/remote-client.index.d.ts +4 -0
  103. package/umd/typings/_packages/remote-server.index.d.ts +3 -0
  104. package/umd/typings/_packages/types.index.d.ts +20 -0
  105. package/umd/typings/_packages/utils.index.d.ts +6 -0
  106. package/umd/typings/_packages/wizzard.index.d.ts +2 -0
  107. package/umd/typings/classes/PromptTemplatePipeline.d.ts +68 -0
  108. package/umd/typings/classes/PromptTemplatePipelineLibrary.d.ts +55 -0
  109. package/umd/typings/config.d.ts +10 -0
  110. package/umd/typings/conversion/_importPtp.d.ts +12 -0
  111. package/umd/typings/conversion/parseCommand.d.ts +6 -0
  112. package/umd/typings/conversion/parseCommand.test.d.ts +1 -0
  113. package/umd/typings/conversion/promptTemplatePipelineStringToJson.d.ts +12 -0
  114. package/umd/typings/conversion/promptTemplatePipelineStringToJson.test.d.ts +1 -0
  115. package/umd/typings/conversion/validatePromptTemplatePipelineJson.d.ts +26 -0
  116. package/umd/typings/conversion/validatePromptTemplatePipelineJson.test.d.ts +1 -0
  117. package/umd/typings/execution/CommonExecutionToolsOptions.d.ts +6 -0
  118. package/umd/typings/execution/ExecutionTools.d.ts +25 -0
  119. package/umd/typings/execution/NaturalExecutionTools.d.ts +22 -0
  120. package/umd/typings/execution/PromptResult.d.ts +38 -0
  121. package/umd/typings/execution/PtpExecutor.d.ts +19 -0
  122. package/umd/typings/execution/ScriptExecutionTools.d.ts +34 -0
  123. package/umd/typings/execution/UserInterfaceTools.d.ts +30 -0
  124. package/umd/typings/execution/createPtpExecutor.d.ts +18 -0
  125. package/umd/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -0
  126. package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -0
  127. package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -0
  128. package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +27 -0
  129. package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +11 -0
  130. package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -0
  131. package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +16 -0
  132. package/umd/typings/execution/plugins/natural-execution-tools/remote/createRemoteServer.d.ts +16 -0
  133. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Error.d.ts +3 -0
  134. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Progress.d.ts +4 -0
  135. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Request.d.ts +6 -0
  136. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Response.d.ts +4 -0
  137. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +20 -0
  138. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +19 -0
  139. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
  140. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -0
  141. package/umd/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -0
  142. package/umd/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +4 -0
  143. package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -0
  144. package/umd/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -0
  145. package/umd/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -0
  146. package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -0
  147. package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -0
  148. package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
  149. package/umd/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -0
  150. package/umd/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -0
  151. package/umd/typings/types/Command.d.ts +65 -0
  152. package/umd/typings/types/ExecutionTypes.d.ts +13 -0
  153. package/umd/typings/types/ModelRequirements.d.ts +28 -0
  154. package/umd/typings/types/Parameters.d.ts +14 -0
  155. package/umd/typings/types/Prompt.d.ts +35 -0
  156. package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +82 -0
  157. package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateParameterJson.d.ts +23 -0
  158. package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts +56 -0
  159. package/umd/typings/types/PromptTemplatePipelineString.d.ts +14 -0
  160. package/umd/typings/types/ScriptLanguage.d.ts +9 -0
  161. package/umd/typings/types/TaskProgress.d.ts +12 -0
  162. package/umd/typings/types/typeAliasEmoji.d.ts +9 -0
  163. package/umd/typings/types/typeAliases.d.ts +477 -0
  164. package/umd/typings/utils/emojis.d.ts +16 -0
  165. package/umd/typings/utils/just.d.ts +10 -0
  166. package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
  167. package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
  168. package/umd/typings/utils/markdown/extractBlocksFromMarkdown.d.ts +13 -0
  169. package/umd/typings/utils/markdown/extractBlocksFromMarkdown.test.d.ts +1 -0
  170. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +16 -0
  171. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
  172. package/umd/typings/utils/markdown/removeContentComments.d.ts +8 -0
  173. package/umd/typings/utils/markdown/removeContentComments.test.d.ts +1 -0
  174. package/umd/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
  175. package/umd/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
  176. package/umd/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -0
  177. package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -0
  178. package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -0
  179. package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -0
  180. package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -0
  181. package/umd/typings/utils/removeEmojis.d.ts +7 -0
  182. package/umd/typings/utils/removeEmojis.test.d.ts +1 -0
  183. package/umd/typings/utils/removeQuotes.d.ts +13 -0
  184. package/umd/typings/utils/removeQuotes.test.d.ts +1 -0
  185. package/umd/typings/utils/replaceParameters.d.ts +16 -0
  186. package/umd/typings/utils/replaceParameters.test.d.ts +1 -0
  187. package/umd/typings/utils/unwrapResult.d.ts +13 -0
  188. package/umd/typings/utils/unwrapResult.test.d.ts +1 -0
  189. package/umd/typings/wizzard/Wizzard.d.ts +1 -0
  190. package/umd/typings/wizzard/sample.d.ts +5 -0
@@ -0,0 +1,477 @@
1
+ /**
2
+ * Semantic helper
3
+ */
4
+ export type string_business_category_name = 'restaurant' | 'grocery' | 'person' | 'conference' | string;
5
+ /**
6
+ * Semantic helper
7
+ *
8
+ * For example `"gpt-4"`
9
+ */
10
+ export type string_model_name = 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k-0613' | string;
11
+ /**
12
+ * Semantic helper
13
+ *
14
+ * For example `"A cat wearing a hat"`
15
+ */
16
+ export type string_prompt = string;
17
+ /**
18
+ * Semantic helper
19
+ *
20
+ * For example `"A cat wearing a {ITEM}"`
21
+ */
22
+ export type string_template = string;
23
+ /**
24
+ * Semantic helper
25
+ *
26
+ * For example `"A cat wearing a hat"`
27
+ */
28
+ export type string_image_prompt = string_prompt;
29
+ /**
30
+ * Semantic helper
31
+ *
32
+ * For example `"A cat wearing a hat --wallpaper --v 5.2"`
33
+ */
34
+ export type string_midjourney_prompt = string_image_prompt;
35
+ /**
36
+ * Semantic helper
37
+ *
38
+ * For example `"How many hats does the cat wear?"`
39
+ */
40
+ export type string_text_prompt = string_prompt;
41
+ /**
42
+ * Semantic helper
43
+ *
44
+ * For example `"How many hats does the cat wear?"`
45
+ */
46
+ export type string_chat_prompt = string_text_prompt;
47
+ /**
48
+ * Semantic helper
49
+ *
50
+ * For example `"Following is a text about cats: Once upon a time there was a cat"`
51
+ */
52
+ export type string_completion_prompt = string_text_prompt;
53
+ /**
54
+ * Semantic helper
55
+ *
56
+ * For example `"index"` or `"explanation"`
57
+ * Always in kebab-case
58
+ */
59
+ export type string_page = 'index' | string;
60
+ /**
61
+ * Semantic helper
62
+ *
63
+ * For example `"text/plain"` or `"application/collboard"`
64
+ */
65
+ export type string_mime_type = string;
66
+ /**
67
+ * Semantic helper
68
+ *
69
+ * For example `"text/*"` or `"image/*"`
70
+ *
71
+ *
72
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers
73
+ */
74
+ export type string_mime_type_with_wildcard = string;
75
+ /**
76
+ * Semantic helper
77
+ *
78
+ * For example `"a"`
79
+ */
80
+ export type string_char = string;
81
+ /**
82
+ * Semantic helper
83
+ * Unique identifier of anything
84
+ *
85
+ * For example `"ainautes"`
86
+ */
87
+ export type string_name = string;
88
+ /**
89
+ * Semantic helper
90
+ * Title of anything
91
+ *
92
+ * For example `"Ai*nautes"`
93
+ */
94
+ export type string_title = string;
95
+ /**
96
+ * Semantic helper
97
+ *
98
+ * For example `"<div>Hello World!</div>"`
99
+ */
100
+ export type string_html = string;
101
+ /**
102
+ * Semantic helper
103
+ *
104
+ * For example `"<foo>bar</foo>"`
105
+ *
106
+ *
107
+ * TODO: [🎞️] Probbably use some object-based method for working with XMLs
108
+ */
109
+ export type string_xml = string;
110
+ /**
111
+ * Semantic helper
112
+ *
113
+ * For example `"**Hello** World!"`
114
+ */
115
+ export type string_markdown = string;
116
+ /**
117
+ * Semantic helper
118
+ *
119
+ * Markdown text without any structure like h1, h2, lists, blockquotes, blocks, etc.
120
+ * BUT with bold, italic, etc.
121
+ *
122
+ * For example `"**Hello** World!"`
123
+ */
124
+ export type string_markdown_text = string;
125
+ /**
126
+ * Semantic helper
127
+ *
128
+ * For example `"towns.cz"`
129
+ */
130
+ export type string_domain = string;
131
+ /**
132
+ * Semantic helper
133
+ *
134
+ * For example `"com"`
135
+ */
136
+ export type string_tdl = string;
137
+ /**
138
+ * Semantic helper
139
+ *
140
+ * For example `.foo{border: 1px solid red}`
141
+ */
142
+ export type string_css = string;
143
+ /**
144
+ * Semantic helper
145
+ *
146
+ * For example `"<svg><circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /></svg>"`
147
+ */
148
+ export type string_svg = string;
149
+ /**
150
+ * Semantic helper
151
+ *
152
+ * For example `console.info("Hello World!")` or `print("Hello World!")`
153
+ */
154
+ export type string_script = string;
155
+ /**
156
+ * Semantic helper
157
+ *
158
+ * For example `console.info("Hello World!")`
159
+ */
160
+ export type string_javascript = string;
161
+ /**
162
+ * Semantic helper
163
+ *
164
+ * For example `menu`
165
+ */
166
+ export type string_css_class = string;
167
+ /**
168
+ * Semantic helper
169
+ *
170
+ * For example `border`
171
+ */
172
+ export type string_css_property = string;
173
+ /**
174
+ * Semantic helper
175
+ *
176
+ * For example `13px`
177
+ */
178
+ export type string_css_value = string;
179
+ /**
180
+ * Semantic helper
181
+ *
182
+ * For example `.foo`
183
+ */
184
+ export type string_css_selector = string;
185
+ /**
186
+ * Semantic helper
187
+ *
188
+ * For example `"https://collboard.com/9SeSQTupmQHwuSrLi"`
189
+ */
190
+ export type string_url = string;
191
+ /**
192
+ * Semantic helper
193
+ *
194
+ * For example `"https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15"`
195
+ */
196
+ export type string_ptp_url = string;
197
+ /**
198
+ * Semantic helper
199
+ *
200
+ * For example `"https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15#keywords"`
201
+ */
202
+ export type string_ptp_url_with_hashtemplate = string;
203
+ /**
204
+ * Semantic helper
205
+ *
206
+ * For example `"data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="`
207
+ */
208
+ export type string_data_url = string;
209
+ /**
210
+ * Semantic helper
211
+ *
212
+ * For example `"https://collboard.com/9SeSQTupmQHwuSrLi"` OR `/9SeSQTupmQHwuSrLi`
213
+ */
214
+ export type string_href = string;
215
+ /**
216
+ * Semantic helper
217
+ *
218
+ * For example `"https://collboard.com/9SeSQTupmQHwuSrLi.png?width=1200&height=630"`
219
+ */
220
+ export type string_url_image = string;
221
+ /**
222
+ * Semantic helper
223
+ *
224
+ * For example `"/9SeSQTupmQHwuSrLi"`
225
+ */
226
+ export type string_uri = string;
227
+ /**
228
+ * Semantic helper
229
+ *
230
+ * For example `"9SeSQTupmQHwuSrLi"`
231
+ */
232
+ export type string_uri_part = string;
233
+ /**
234
+ * Semantic helper, ID of the board used in URL and API
235
+ *
236
+ * For example `"9SeSQTupmQHwuSrLi"` <- TODO: !! Update
237
+ */
238
+ export type string_uriid = string_uri_part;
239
+ /**
240
+ * Semantic helper
241
+ */
242
+ export type string_protocol = 'http:' | 'https:';
243
+ /**
244
+ * Semantic helper
245
+ *
246
+ * For example `"localhost"` or `"collboard.com"`
247
+ */
248
+ export type string_hostname = string;
249
+ /**
250
+ * Semantic helper
251
+ *
252
+ * For example `"localhost:9977"` or `"collboard.com"`
253
+ */
254
+ export type string_host = string;
255
+ /**
256
+ * Semantic helper
257
+ *
258
+ * For example `"pavol@hejny.org"`
259
+ */
260
+ export type string_email = string;
261
+ /**
262
+ * Branded type for UUIDs version 4
263
+ * This will not allow to pass some random string where should be only a valid UUID
264
+ *
265
+ * Use utils:
266
+ * - `randomUuid` to generate
267
+ * - `isValidUuid to check validity
268
+ *
269
+ * For example `"5a0a153d-7be9-4018-9eda-e0e2e2b89bd9"`
270
+ */
271
+ export type uuid = string & {
272
+ readonly __type: 'UUID';
273
+ };
274
+ /**
275
+ * Semantic helper
276
+ *
277
+ * For example `"5a0a153d-7be9-4018-9eda-e0e2e2b89bd9"`
278
+ */
279
+ export type string_wallpaper_id = uuid | string_uriid;
280
+ /**
281
+ * Semantic helper
282
+ * UUID with only the first part of the UUID
283
+ *
284
+ *
285
+ * For example `"5a0a153d"`
286
+ */
287
+ export type uuid_first_segment = string;
288
+ /**
289
+ * Semantic helper
290
+ *
291
+ * For example `"b126926439c5fcb83609888a11283723c1ef137c0ad599a77a1be81812bd221d"`
292
+ */
293
+ export type string_sha256 = string;
294
+ /**
295
+ * Semantic helper
296
+ *
297
+ * For example `"4.2.4"`
298
+ */
299
+ export type string_version = string;
300
+ /**
301
+ * Semantic helper
302
+ *
303
+ * For example `"^4.2.4"`
304
+ */
305
+ export type string_version_dependency = string;
306
+ /**
307
+ * Semantic helper
308
+ *
309
+ * For example `"png"`
310
+ */
311
+ export type string_file_extension = string;
312
+ /**
313
+ * Semantic helper
314
+ *
315
+ * For example `"C:/Users/me/work/collboard/modules-sdk/src/colldev/commands/develop/ColldevDevelop.tsx"`
316
+ */
317
+ export type string_file_absolute_path = string;
318
+ /**
319
+ * Semantic helper
320
+ *
321
+ * For example `"./src/colldev/commands/develop/ColldevDevelop.tsx"`
322
+ */
323
+ export type string_file_relative_path = string;
324
+ /**
325
+ * Semantic helper
326
+ */
327
+ export type string_file_path = string_file_absolute_path | string_file_relative_path;
328
+ /**
329
+ * Semantic helper
330
+ *
331
+ * For example `"C:/Users/me/work/collboard/modules-sdk/src/colldev/commands/develop/ColldevDevelop.tsx"`
332
+ */
333
+ export type string_folder_absolute_path = string;
334
+ /**
335
+ * Semantic helper
336
+ *
337
+ * For example `"./src/colldev/commands/develop/ColldevDevelop.tsx"`
338
+ */
339
+ export type string_folder_relative_path = string;
340
+ /**
341
+ * Semantic helper
342
+ */
343
+ export type string_folder_path = string_file_absolute_path | string_file_relative_path;
344
+ /**
345
+ * Semantic helper
346
+ */
347
+ export type string_filename = string;
348
+ /**
349
+ * Semantic helper
350
+ *
351
+ * For example `"John Smith"`
352
+ */
353
+ export type string_person_fullname = string;
354
+ /**
355
+ * Semantic helper
356
+ * Full profile of the person with his email and web (like in package.json)
357
+ *
358
+ * For example `"Pavol Hejný <pavol@hejny.org> (https://pavolhejny.com)"`
359
+ */
360
+ export type string_person_profile = string;
361
+ /**
362
+ * Full profile of the person with his email and web (like in package.json)
363
+ */
364
+ export interface IPersonProfile {
365
+ readonly name?: string_person_fullname;
366
+ /**
367
+ * Note: Photos are taken from Gravatar by email
368
+ */
369
+ readonly email?: string_email;
370
+ readonly url?: string_url;
371
+ }
372
+ /**
373
+ * Semantic helper
374
+ *
375
+ * For example `"MIT"`
376
+ */
377
+ export type string_license = string;
378
+ /**
379
+ * License with its type and url like in package.json
380
+ */
381
+ export interface ILicense {
382
+ readonly type?: string_license;
383
+ readonly url?: string;
384
+ }
385
+ /**
386
+ * Repository with its type and url like in package.json
387
+ */
388
+ export interface IRepository {
389
+ readonly type?: string | 'git';
390
+ readonly url?: string;
391
+ }
392
+ /**
393
+ * CSS cursor type
394
+ */
395
+ export type string_css_cursor = 'alias' | 'all-scroll' | 'auto' | 'cell' | 'context-menu' | 'col-resize' | 'copy' | 'crosshair' | 'default' | 'e-resize' | 'ew-resize' | 'grab' | 'grabbing' | 'help' | 'move' | 'n-resize' | 'ne-resize' | 'nesw-resize' | 'ns-resize' | 'nw-resize' | 'nwse-resize' | 'no-drop' | 'none' | 'not-allowed' | 'pointer' | 'progress' | 'row-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'text' | 'w-resize' | 'wait' | 'zoom-in' | 'zoom-out';
396
+ /**
397
+ * Semantic helper for attributes
398
+ *
399
+ * - case insensitive
400
+ *
401
+ * For example `"color"`
402
+ */
403
+ export type string_attribute = string;
404
+ /**
405
+ * Semantic helper for attributes context
406
+ * Each attribute value scope with a attribute name has its own current value
407
+ *
408
+ * - case insensitive
409
+ *
410
+ * For example `"tools"`
411
+ */
412
+ export type string_attribute_value_scope = string;
413
+ /**
414
+ * Semantic helper for css/html colors
415
+ *
416
+ * For example `"white"` or `"#009edd"`
417
+ */
418
+ export type string_color = string;
419
+ /**
420
+ * Semantic helper; For example "SHARE_ICON/EDIT_LINK"
421
+ */
422
+ export type string_translate_name = string;
423
+ /**
424
+ * Semantic helper; For example "ShareIcon/ edit link"
425
+ */
426
+ export type string_translate_name_not_normalized = string;
427
+ /**
428
+ * Semantic helper; For example "cs" or "en"
429
+ * Implementing ISO 639-1
430
+ *
431
+ * TODO: Probably use enum
432
+ * TODO: Rename - remove string_ prefix like ITranslateLanguageCode
433
+ */
434
+ export type string_translate_language = 'en' | 'cs';
435
+ /**
436
+ * Semantic helper; For example "callbackName" or "renderMe"
437
+ */
438
+ export type string_javascript_name = string;
439
+ export type string_token = string;
440
+ export type string_license_token = string_token;
441
+ export type string_password = string;
442
+ export type string_ssh_key = string;
443
+ export type string_pgp_key = string;
444
+ export type number_positive = number;
445
+ export type number_negative = number;
446
+ export type number_integer = number;
447
+ /**
448
+ * Semantic helper;
449
+ * Percentage from 0 to 1 (100%)
450
+ */
451
+ export type number_percent = number;
452
+ /**
453
+ * Likeness of the wallpaper
454
+ *
455
+ * - 👍 is eqivalent for 1
456
+ * - 👎 is eqivalent for -1
457
+ * - ❤ is eqivalent for more than 1
458
+ * - etc
459
+ */
460
+ export type number_likeness = number;
461
+ export type number_miliseconds = number_integer;
462
+ export type number_seconds = number;
463
+ export type number_minutes = number;
464
+ export type number_hours = number;
465
+ export type number_days = number;
466
+ export type number_weeks = number;
467
+ export type number_months = number;
468
+ export type number_years = number;
469
+ export type number_bytes = number_positive & number_integer;
470
+ export type number_kilobytes = number_positive;
471
+ export type number_megabytes = number_positive;
472
+ export type number_gigabytes = number_positive;
473
+ export type number_terabytes = number_positive;
474
+ /**
475
+ * TODO: !! Cleanup
476
+ * TODO: !! Change to branded types
477
+ */
@@ -0,0 +1,16 @@
1
+ import { string_char_emoji } from '../types/typeAliasEmoji';
2
+ /**
3
+ * All possible emoji chars like "🍆", "🍡", "🍤"...
4
+ * Note: this will be needed to update annually - now updated at 2022-01-19
5
+ *
6
+ * @see https://getemoji.com/
7
+ */
8
+ export declare const EMOJIS_IN_CATEGORIES: Record<string, Array<string_char_emoji>>;
9
+ /**
10
+ *
11
+ * All possible emoji chars like "🍆", "🍡", "🍤"...
12
+ */
13
+ export declare const EMOJIS: Set<string_char_emoji>;
14
+ /**
15
+ * TODO: Mirror from Collboard or some common library
16
+ */
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Returns the same value that is passed as argument.
3
+ * No side effects.
4
+ *
5
+ * Note: It can be usefull for leveling indentation
6
+ *
7
+ * @param value any values
8
+ * @returns the same values
9
+ */
10
+ export declare function just<T>(value?: T): T;
@@ -0,0 +1,15 @@
1
+ import { string_markdown, string_markdown_text } from '../.././types/typeAliases';
2
+ /**
3
+ * Utility function to extract all list items from markdown
4
+ *
5
+ * Note: It works with both ul and ol
6
+ * Note: It omits list items in code blocks
7
+ * Note: It flattens nested lists
8
+ * Note: It can not work with html syntax and comments
9
+ *
10
+ * @param markdown any valid markdown
11
+ * @returns
12
+ *
13
+ * @private within the library
14
+ */
15
+ export declare function extractAllListItemsFromMarkdown(markdown: string_markdown): string_markdown_text[];
@@ -0,0 +1,13 @@
1
+ import { string_markdown } from '../.././types/typeAliases';
2
+ /**
3
+ * Extracts all code blocks from markdown.
4
+ *
5
+ * @param markdown any valid markdown
6
+ * @returns code blocks with language and content
7
+ *
8
+ * @private within the library
9
+ */
10
+ export declare function extractBlocksFromMarkdown(markdown: string_markdown): Array<{
11
+ language: string | null;
12
+ content: string;
13
+ }>;
@@ -0,0 +1,16 @@
1
+ import { string_markdown } from '../.././types/typeAliases';
2
+ /**
3
+ * Extracts exactly ONE code block from markdown.
4
+ *
5
+ * Note: This function is similar to extractBlocksFromMarkdown but it validates that there is exactly one code block.
6
+ * Note: If there are multiple or no code blocks the function throws an error
7
+ *
8
+ * @param markdown any valid markdown
9
+ * @returns code block with language and content
10
+ *
11
+ * @private within the library
12
+ */
13
+ export declare function extractOneBlockFromMarkdown(markdown: string_markdown): {
14
+ language: string | null;
15
+ content: string;
16
+ };
@@ -0,0 +1,8 @@
1
+ import { string_html, string_markdown } from '../../types/typeAliases';
2
+ /**
3
+ * Removes HTML or Markdown comments from a string.
4
+ *
5
+ * @param {string} content - The string to remove comments from.
6
+ * @returns {string} The input string with all comments removed.
7
+ */
8
+ export declare function removeContentComments<TContent extends string_html | string_markdown>(content: TContent): TContent;
@@ -0,0 +1,8 @@
1
+ import { string_markdown_text } from '../../types/typeAliases';
2
+ /**
3
+ * Removes Markdown formatting tags from a string.
4
+ *
5
+ * @param {string} str - The string to remove Markdown tags from.
6
+ * @returns {string} The input string with all Markdown tags removed.
7
+ */
8
+ export declare function removeMarkdownFormatting(str: string_markdown_text): string;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Represents the structure of a markdown file.
3
+ *
4
+ * @private within the library
5
+ */
6
+ export interface MarkdownStructure {
7
+ /**
8
+ * The section level of the markdown file.
9
+ * h1 is level 1, h2 is level 2, etc.
10
+ */
11
+ level: number;
12
+ /**
13
+ * The title of the markdown file.
14
+ */
15
+ title: string;
16
+ /**
17
+ * Content of the section.
18
+ * It contains text, images, formatting, ul, ol, hr, blockquotes, etc. BUT not headings and sub-sections
19
+ */
20
+ content: string;
21
+ /**
22
+ * The sub-sections of current section which are recursively structured.
23
+ */
24
+ sections: MarkdownStructure[];
25
+ }
@@ -0,0 +1,7 @@
1
+ import { MarkdownStructure } from './MarkdownStructure';
2
+ /**
3
+ * Computes the deepness of the markdown structure.
4
+ *
5
+ * @private within the library
6
+ */
7
+ export declare function countMarkdownStructureDeepness(markdownStructure: MarkdownStructure): number;
@@ -0,0 +1,13 @@
1
+ import { MarkdownStructure } from './MarkdownStructure';
2
+ /**
3
+ * Parse a markdown string into a MarkdownStructure object.
4
+ *
5
+ * Note: This function does work with code blocks
6
+ * Note: This function does not work with markdown comments
7
+ *
8
+ * @param markdown The markdown string to parse.
9
+ * @returns The MarkdownStructure object.
10
+ *
11
+ * @private within the library
12
+ */
13
+ export declare function markdownToMarkdownStructure(markdown: string): MarkdownStructure;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Removes emojis from a string and fix whitespaces
3
+ *
4
+ * @param text with emojis
5
+ * @returns text without emojis
6
+ */
7
+ export declare function removeEmojis(text: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Removes quotes from a string
3
+ *
4
+ * Tip: This is very usefull for post-processing of the result of the LLM model
5
+ * Note: This function removes only the same quotes from the beginning and the end of the string
6
+ * Note: There are two simmilar functions:
7
+ * - `removeQuotes` which removes only bounding quotes
8
+ * - `unwrapResult` which removes whole introduce sentence
9
+ *
10
+ * @param text optionally quoted text
11
+ * @returns text without quotes
12
+ */
13
+ export declare function removeQuotes(text: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { string_template } from '.././types/typeAliases';
2
+ import { Parameters } from '../types/Parameters';
3
+ /**
4
+ * Replaces parameters in template with values from parameters object
5
+ *
6
+ * @param template the template with parameters in {curly} braces
7
+ * @param parameters the object with parameters
8
+ * @returns the template with replaced parameters
9
+ *
10
+ * @private within the library
11
+ */
12
+ export declare function replaceParameters(template: string_template, parameters: Parameters): string;
13
+ /**
14
+ * TODO: [🧠] More advanced templating
15
+ * TODO: [🧠] Maybe use some template engine / library not own simple implementation
16
+ */
@@ -0,0 +1 @@
1
+ export {};