@prokodo/ui 0.0.53 → 0.0.54
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/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/common.js +7 -0
- package/dist/components/post-item/PostItem.client.js +3 -4
- package/dist/components/post-item/PostItem.server.js +3 -4
- package/dist/components/post-item/PostItem.view.js +2 -2
- package/dist/components/post-teaser/PostTeaser.client.js +5 -6
- package/dist/components/post-teaser/PostTeaser.server.js +3 -4
- package/dist/components/post-teaser/PostTeaser.view.js +4 -4
- package/dist/components/rich-text/RichText.client.js +175 -10
- package/dist/components/rich-text/RichText.module.scss.js +1 -1
- package/dist/constants/project.js +1 -1
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/common.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/common.js +90 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1629 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/bash.js +407 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/c.js +307 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/cpp.js +556 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/csharp.js +413 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/css.js +950 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/diff.js +66 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/go.js +167 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/graphql.js +83 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ini.js +129 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/java.js +268 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/javascript.js +715 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/json.js +53 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/kotlin.js +268 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/less.js +1031 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/lua.js +74 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/makefile.js +84 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/markdown.js +245 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/objectivec.js +256 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/perl.js +498 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php-template.js +59 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php.js +614 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/plaintext.js +25 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python-repl.js +38 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python.js +428 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/r.js +223 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ruby.js +426 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/rust.js +326 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/scss.js +935 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/shell.js +37 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/sql.js +658 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/swift.js +893 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/typescript.js +829 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/vbnet.js +146 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/wasm.js +134 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/xml.js +239 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/yaml.js +214 -0
- package/dist/node_modules/.pnpm/marked-highlight@2.2.2_marked@15.0.12/node_modules/marked-highlight/src/index.js +93 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/post-item/PostItem.model.d.ts +1 -1
- package/dist/types/components/post-teaser/PostTeaser.model.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.client.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.d.ts +5 -0
- package/dist/types/components/rich-text/RichText.lazy.d.ts +5 -0
- package/dist/types/components/rich-text/RichText.model.d.ts +5 -0
- package/dist/ui.css +38 -30
- package/package.json +3 -1
- package/dist/helpers/calculation.js +0 -6
package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/yaml.js
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
var yaml_1;
|
|
4
|
+
var hasRequiredYaml;
|
|
5
|
+
function requireYaml() {
|
|
6
|
+
if (hasRequiredYaml) return yaml_1;
|
|
7
|
+
hasRequiredYaml = 1;
|
|
8
|
+
function yaml(hljs) {
|
|
9
|
+
const LITERALS = "true false yes no null";
|
|
10
|
+
const URI_CHARACTERS = "[\\w#;/?:@&=+$,.~*'()[\\]]+";
|
|
11
|
+
const KEY = {
|
|
12
|
+
className: "attr",
|
|
13
|
+
variants: [
|
|
14
|
+
// added brackets support and special char support
|
|
15
|
+
{ begin: /[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/ },
|
|
16
|
+
{
|
|
17
|
+
// double quoted keys - with brackets and special char support
|
|
18
|
+
begin: /"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
// single quoted keys - with brackets and special char support
|
|
22
|
+
begin: /'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
const TEMPLATE_VARIABLES = {
|
|
27
|
+
className: "template-variable",
|
|
28
|
+
variants: [
|
|
29
|
+
{
|
|
30
|
+
// jinja templates Ansible
|
|
31
|
+
begin: /\{\{/,
|
|
32
|
+
end: /\}\}/
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
// Ruby i18n
|
|
36
|
+
begin: /%\{/,
|
|
37
|
+
end: /\}/
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
const SINGLE_QUOTE_STRING = {
|
|
42
|
+
className: "string",
|
|
43
|
+
relevance: 0,
|
|
44
|
+
begin: /'/,
|
|
45
|
+
end: /'/,
|
|
46
|
+
contains: [
|
|
47
|
+
{
|
|
48
|
+
match: /''/,
|
|
49
|
+
scope: "char.escape",
|
|
50
|
+
relevance: 0
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
};
|
|
54
|
+
const STRING = {
|
|
55
|
+
className: "string",
|
|
56
|
+
relevance: 0,
|
|
57
|
+
variants: [
|
|
58
|
+
{
|
|
59
|
+
begin: /"/,
|
|
60
|
+
end: /"/
|
|
61
|
+
},
|
|
62
|
+
{ begin: /\S+/ }
|
|
63
|
+
],
|
|
64
|
+
contains: [
|
|
65
|
+
hljs.BACKSLASH_ESCAPE,
|
|
66
|
+
TEMPLATE_VARIABLES
|
|
67
|
+
]
|
|
68
|
+
};
|
|
69
|
+
const CONTAINER_STRING = hljs.inherit(STRING, { variants: [
|
|
70
|
+
{
|
|
71
|
+
begin: /'/,
|
|
72
|
+
end: /'/,
|
|
73
|
+
contains: [
|
|
74
|
+
{
|
|
75
|
+
begin: /''/,
|
|
76
|
+
relevance: 0
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
begin: /"/,
|
|
82
|
+
end: /"/
|
|
83
|
+
},
|
|
84
|
+
{ begin: /[^\s,{}[\]]+/ }
|
|
85
|
+
] });
|
|
86
|
+
const DATE_RE = "[0-9]{4}(-[0-9][0-9]){0,2}";
|
|
87
|
+
const TIME_RE = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?";
|
|
88
|
+
const FRACTION_RE = "(\\.[0-9]*)?";
|
|
89
|
+
const ZONE_RE = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?";
|
|
90
|
+
const TIMESTAMP = {
|
|
91
|
+
className: "number",
|
|
92
|
+
begin: "\\b" + DATE_RE + TIME_RE + FRACTION_RE + ZONE_RE + "\\b"
|
|
93
|
+
};
|
|
94
|
+
const VALUE_CONTAINER = {
|
|
95
|
+
end: ",",
|
|
96
|
+
endsWithParent: true,
|
|
97
|
+
excludeEnd: true,
|
|
98
|
+
keywords: LITERALS,
|
|
99
|
+
relevance: 0
|
|
100
|
+
};
|
|
101
|
+
const OBJECT = {
|
|
102
|
+
begin: /\{/,
|
|
103
|
+
end: /\}/,
|
|
104
|
+
contains: [VALUE_CONTAINER],
|
|
105
|
+
illegal: "\\n",
|
|
106
|
+
relevance: 0
|
|
107
|
+
};
|
|
108
|
+
const ARRAY = {
|
|
109
|
+
begin: "\\[",
|
|
110
|
+
end: "\\]",
|
|
111
|
+
contains: [VALUE_CONTAINER],
|
|
112
|
+
illegal: "\\n",
|
|
113
|
+
relevance: 0
|
|
114
|
+
};
|
|
115
|
+
const MODES = [
|
|
116
|
+
KEY,
|
|
117
|
+
{
|
|
118
|
+
className: "meta",
|
|
119
|
+
begin: "^---\\s*$",
|
|
120
|
+
relevance: 10
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
// multi line string
|
|
124
|
+
// Blocks start with a | or > followed by a newline
|
|
125
|
+
//
|
|
126
|
+
// Indentation of subsequent lines must be the same to
|
|
127
|
+
// be considered part of the block
|
|
128
|
+
className: "string",
|
|
129
|
+
begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
// Ruby/Rails erb
|
|
133
|
+
begin: "<%[%=-]?",
|
|
134
|
+
end: "[%-]?%>",
|
|
135
|
+
subLanguage: "ruby",
|
|
136
|
+
excludeBegin: true,
|
|
137
|
+
excludeEnd: true,
|
|
138
|
+
relevance: 0
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
// named tags
|
|
142
|
+
className: "type",
|
|
143
|
+
begin: "!\\w+!" + URI_CHARACTERS
|
|
144
|
+
},
|
|
145
|
+
// https://yaml.org/spec/1.2/spec.html#id2784064
|
|
146
|
+
{
|
|
147
|
+
// verbatim tags
|
|
148
|
+
className: "type",
|
|
149
|
+
begin: "!<" + URI_CHARACTERS + ">"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
// primary tags
|
|
153
|
+
className: "type",
|
|
154
|
+
begin: "!" + URI_CHARACTERS
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
// secondary tags
|
|
158
|
+
className: "type",
|
|
159
|
+
begin: "!!" + URI_CHARACTERS
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
// fragment id &ref
|
|
163
|
+
className: "meta",
|
|
164
|
+
begin: "&" + hljs.UNDERSCORE_IDENT_RE + "$"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
// fragment reference *ref
|
|
168
|
+
className: "meta",
|
|
169
|
+
begin: "\\*" + hljs.UNDERSCORE_IDENT_RE + "$"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
// array listing
|
|
173
|
+
className: "bullet",
|
|
174
|
+
// TODO: remove |$ hack when we have proper look-ahead support
|
|
175
|
+
begin: "-(?=[ ]|$)",
|
|
176
|
+
relevance: 0
|
|
177
|
+
},
|
|
178
|
+
hljs.HASH_COMMENT_MODE,
|
|
179
|
+
{
|
|
180
|
+
beginKeywords: LITERALS,
|
|
181
|
+
keywords: { literal: LITERALS }
|
|
182
|
+
},
|
|
183
|
+
TIMESTAMP,
|
|
184
|
+
// numbers are any valid C-style number that
|
|
185
|
+
// sit isolated from other words
|
|
186
|
+
{
|
|
187
|
+
className: "number",
|
|
188
|
+
begin: hljs.C_NUMBER_RE + "\\b",
|
|
189
|
+
relevance: 0
|
|
190
|
+
},
|
|
191
|
+
OBJECT,
|
|
192
|
+
ARRAY,
|
|
193
|
+
SINGLE_QUOTE_STRING,
|
|
194
|
+
STRING
|
|
195
|
+
];
|
|
196
|
+
const VALUE_MODES = [...MODES];
|
|
197
|
+
VALUE_MODES.pop();
|
|
198
|
+
VALUE_MODES.push(CONTAINER_STRING);
|
|
199
|
+
VALUE_CONTAINER.contains = VALUE_MODES;
|
|
200
|
+
return {
|
|
201
|
+
name: "YAML",
|
|
202
|
+
case_insensitive: true,
|
|
203
|
+
aliases: ["yml"],
|
|
204
|
+
contains: MODES
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
__name(yaml, "yaml");
|
|
208
|
+
yaml_1 = yaml;
|
|
209
|
+
return yaml_1;
|
|
210
|
+
}
|
|
211
|
+
__name(requireYaml, "requireYaml");
|
|
212
|
+
export {
|
|
213
|
+
requireYaml as __require
|
|
214
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function markedHighlight(options) {
|
|
4
|
+
if (typeof options === "function") {
|
|
5
|
+
options = {
|
|
6
|
+
highlight: options
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
if (!options || typeof options.highlight !== "function") {
|
|
10
|
+
throw new Error("Must provide highlight function");
|
|
11
|
+
}
|
|
12
|
+
if (typeof options.langPrefix !== "string") {
|
|
13
|
+
options.langPrefix = "language-";
|
|
14
|
+
}
|
|
15
|
+
if (typeof options.emptyLangClass !== "string") {
|
|
16
|
+
options.emptyLangClass = "";
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
async: !!options.async,
|
|
20
|
+
walkTokens(token) {
|
|
21
|
+
if (token.type !== "code") {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const lang = getLang(token.lang);
|
|
25
|
+
if (options.async) {
|
|
26
|
+
return Promise.resolve(options.highlight(token.text, lang, token.lang || "")).then(updateToken(token));
|
|
27
|
+
}
|
|
28
|
+
const code = options.highlight(token.text, lang, token.lang || "");
|
|
29
|
+
if (code instanceof Promise) {
|
|
30
|
+
throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");
|
|
31
|
+
}
|
|
32
|
+
updateToken(token)(code);
|
|
33
|
+
},
|
|
34
|
+
useNewRenderer: true,
|
|
35
|
+
renderer: {
|
|
36
|
+
code(code, infoString, escaped) {
|
|
37
|
+
if (typeof code === "object") {
|
|
38
|
+
escaped = code.escaped;
|
|
39
|
+
infoString = code.lang;
|
|
40
|
+
code = code.text;
|
|
41
|
+
}
|
|
42
|
+
const lang = getLang(infoString);
|
|
43
|
+
const classValue = lang ? options.langPrefix + escape(lang) : options.emptyLangClass;
|
|
44
|
+
const classAttr = classValue ? ` class="${classValue}"` : "";
|
|
45
|
+
code = code.replace(/\n$/, "");
|
|
46
|
+
return `<pre><code${classAttr}>${escaped ? code : escape(code, true)}
|
|
47
|
+
</code></pre>`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
__name(markedHighlight, "markedHighlight");
|
|
53
|
+
function getLang(lang) {
|
|
54
|
+
return (lang || "").match(/\S*/)[0];
|
|
55
|
+
}
|
|
56
|
+
__name(getLang, "getLang");
|
|
57
|
+
function updateToken(token) {
|
|
58
|
+
return (code) => {
|
|
59
|
+
if (typeof code === "string" && code !== token.text) {
|
|
60
|
+
token.escaped = true;
|
|
61
|
+
token.text = code;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
__name(updateToken, "updateToken");
|
|
66
|
+
const escapeTest = /[&<>"']/;
|
|
67
|
+
const escapeReplace = new RegExp(escapeTest.source, "g");
|
|
68
|
+
const escapeTestNoEncode = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/;
|
|
69
|
+
const escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, "g");
|
|
70
|
+
const escapeReplacements = {
|
|
71
|
+
"&": "&",
|
|
72
|
+
"<": "<",
|
|
73
|
+
">": ">",
|
|
74
|
+
'"': """,
|
|
75
|
+
"'": "'"
|
|
76
|
+
};
|
|
77
|
+
const getEscapeReplacement = /* @__PURE__ */ __name((ch) => escapeReplacements[ch], "getEscapeReplacement");
|
|
78
|
+
function escape(html, encode) {
|
|
79
|
+
if (encode) {
|
|
80
|
+
if (escapeTest.test(html)) {
|
|
81
|
+
return html.replace(escapeReplace, getEscapeReplacement);
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
if (escapeTestNoEncode.test(html)) {
|
|
85
|
+
return html.replace(escapeReplaceNoEncode, getEscapeReplacement);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return html;
|
|
89
|
+
}
|
|
90
|
+
__name(escape, "escape");
|
|
91
|
+
export {
|
|
92
|
+
markedHighlight
|
|
93
|
+
};
|