laif-ds 0.1.76 → 0.1.80
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/index.js +5 -3
- package/dist/_virtual/index2.js +5 -2
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index5.js +2 -5
- package/dist/_virtual/index7.js +3 -2
- package/dist/_virtual/prism-cpp.js +3 -0
- package/dist/_virtual/prism-cpp2.js +5 -0
- package/dist/_virtual/prism-java.js +3 -0
- package/dist/_virtual/prism-java2.js +5 -0
- package/dist/_virtual/prism-python.js +3 -0
- package/dist/_virtual/prism-python2.js +5 -0
- package/dist/_virtual/prism-rust.js +3 -0
- package/dist/_virtual/prism-rust2.js +5 -0
- package/dist/_virtual/prism-typescript.js +3 -0
- package/dist/_virtual/prism-typescript2.js +5 -0
- package/dist/_virtual/prism.js +3 -0
- package/dist/_virtual/prism2.js +5 -0
- package/dist/components/editor/context/toolbar-context.js +42 -0
- package/dist/components/editor/editor-hooks/use-modal.js +30 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +24 -0
- package/dist/components/editor/editor-ui/content-editable.js +26 -0
- package/dist/components/editor/plugins/actions/actions-plugin.js +7 -0
- package/dist/components/editor/plugins/actions/clear-editor-plugin.js +39 -0
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +53 -0
- package/dist/components/editor/plugins/toolbar/block-format/block-format-data.js +52 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +31 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +23 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +24 -0
- package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +56 -0
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +50 -0
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +69 -0
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +34 -0
- package/dist/components/editor/themes/editor-theme.js +112 -0
- package/dist/components/ui/app-editor.js +150 -0
- package/dist/components/ui/app-multiple-select-dropdown.js +2 -2
- package/dist/components/ui/button.js +25 -24
- package/dist/components/ui/calendar.js +9 -9
- package/dist/components/ui/dialog.js +43 -37
- package/dist/components/ui/sidebar.js +20 -19
- package/dist/index.d.ts +23 -1
- package/dist/index.js +48 -44
- package/dist/laif-ds.css +1 -0
- package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +159 -0
- package/dist/node_modules/@lexical/code/LexicalCode.prod.js +236 -0
- package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +46 -0
- package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +89 -0
- package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +108 -0
- package/dist/node_modules/@lexical/link/LexicalLink.prod.js +187 -0
- package/dist/node_modules/@lexical/list/LexicalList.prod.js +729 -0
- package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +367 -0
- package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +11 -0
- package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +45 -0
- package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +22 -0
- package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +55 -0
- package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +49 -0
- package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +15 -0
- package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +16 -0
- package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +56 -0
- package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +21 -0
- package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +376 -0
- package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +107 -0
- package/dist/node_modules/@lexical/table/LexicalTable.prod.js +661 -0
- package/dist/node_modules/@lexical/text/LexicalText.prod.js +37 -0
- package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +102 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/lexical/Lexical.prod.js +4901 -0
- package/dist/node_modules/prismjs/components/prism-c.js +77 -0
- package/dist/node_modules/prismjs/components/prism-clike.js +32 -0
- package/dist/node_modules/prismjs/components/prism-cpp.js +93 -0
- package/dist/node_modules/prismjs/components/prism-css.js +56 -0
- package/dist/node_modules/prismjs/components/prism-java.js +122 -0
- package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
- package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
- package/dist/node_modules/prismjs/components/prism-markup.js +174 -0
- package/dist/node_modules/prismjs/components/prism-objectivec.js +11 -0
- package/dist/node_modules/prismjs/components/prism-powershell.js +56 -0
- package/dist/node_modules/prismjs/components/prism-python.js +69 -0
- package/dist/node_modules/prismjs/components/prism-rust.js +124 -0
- package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
- package/dist/node_modules/prismjs/components/prism-swift.js +114 -0
- package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
- package/dist/node_modules/prismjs/prism.js +1165 -0
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +12 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Prism.languages.c = Prism.languages.extend("clike", {
|
|
3
|
+
comment: {
|
|
4
|
+
pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
5
|
+
greedy: !0
|
|
6
|
+
},
|
|
7
|
+
string: {
|
|
8
|
+
// https://en.cppreference.com/w/c/language/string_literal
|
|
9
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
10
|
+
greedy: !0
|
|
11
|
+
},
|
|
12
|
+
"class-name": {
|
|
13
|
+
pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
|
|
14
|
+
lookbehind: !0
|
|
15
|
+
},
|
|
16
|
+
keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
|
|
17
|
+
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
18
|
+
number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
|
|
19
|
+
operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
|
|
20
|
+
});
|
|
21
|
+
Prism.languages.insertBefore("c", "string", {
|
|
22
|
+
char: {
|
|
23
|
+
// https://en.cppreference.com/w/c/language/character_constant
|
|
24
|
+
pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
|
|
25
|
+
greedy: !0
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Prism.languages.insertBefore("c", "string", {
|
|
29
|
+
macro: {
|
|
30
|
+
// allow for multiline macro definitions
|
|
31
|
+
// spaces after the # character compile fine with gcc
|
|
32
|
+
pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
|
|
33
|
+
lookbehind: !0,
|
|
34
|
+
greedy: !0,
|
|
35
|
+
alias: "property",
|
|
36
|
+
inside: {
|
|
37
|
+
string: [
|
|
38
|
+
{
|
|
39
|
+
// highlight the path of the include statement as a string
|
|
40
|
+
pattern: /^(#\s*include\s*)<[^>]+>/,
|
|
41
|
+
lookbehind: !0
|
|
42
|
+
},
|
|
43
|
+
Prism.languages.c.string
|
|
44
|
+
],
|
|
45
|
+
char: Prism.languages.c.char,
|
|
46
|
+
comment: Prism.languages.c.comment,
|
|
47
|
+
"macro-name": [
|
|
48
|
+
{
|
|
49
|
+
pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
|
|
50
|
+
lookbehind: !0
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
|
|
54
|
+
lookbehind: !0,
|
|
55
|
+
alias: "function"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
// highlight macro directives as keywords
|
|
59
|
+
directive: {
|
|
60
|
+
pattern: /^(#\s*)[a-z]+/,
|
|
61
|
+
lookbehind: !0,
|
|
62
|
+
alias: "keyword"
|
|
63
|
+
},
|
|
64
|
+
"directive-hash": /^#/,
|
|
65
|
+
punctuation: /##|\\(?=[\r\n])/,
|
|
66
|
+
expression: {
|
|
67
|
+
pattern: /\S[\s\S]*/,
|
|
68
|
+
inside: Prism.languages.c
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
Prism.languages.insertBefore("c", "function", {
|
|
74
|
+
// highlight predefined macros as constants
|
|
75
|
+
constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
|
|
76
|
+
});
|
|
77
|
+
delete Prism.languages.c.boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Prism.languages.clike = {
|
|
3
|
+
comment: [
|
|
4
|
+
{
|
|
5
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
6
|
+
lookbehind: !0,
|
|
7
|
+
greedy: !0
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
pattern: /(^|[^\\:])\/\/.*/,
|
|
11
|
+
lookbehind: !0,
|
|
12
|
+
greedy: !0
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
string: {
|
|
16
|
+
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
17
|
+
greedy: !0
|
|
18
|
+
},
|
|
19
|
+
"class-name": {
|
|
20
|
+
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
|
|
21
|
+
lookbehind: !0,
|
|
22
|
+
inside: {
|
|
23
|
+
punctuation: /[.\\]/
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
|
|
27
|
+
boolean: /\b(?:false|true)\b/,
|
|
28
|
+
function: /\b\w+(?=\()/,
|
|
29
|
+
number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
|
30
|
+
operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
|
|
31
|
+
punctuation: /[{}[\];(),.:]/
|
|
32
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exports as n } from "../../../_virtual/prism-cpp2.js";
|
|
3
|
+
var r;
|
|
4
|
+
function o() {
|
|
5
|
+
return r ? n : (r = 1, function(e) {
|
|
6
|
+
var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, a = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
|
|
7
|
+
return t.source;
|
|
8
|
+
});
|
|
9
|
+
e.languages.cpp = e.languages.extend("c", {
|
|
10
|
+
"class-name": [
|
|
11
|
+
{
|
|
12
|
+
pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
|
|
13
|
+
return t.source;
|
|
14
|
+
})),
|
|
15
|
+
lookbehind: !0
|
|
16
|
+
},
|
|
17
|
+
// This is intended to capture the class name of method implementations like:
|
|
18
|
+
// void foo::bar() const {}
|
|
19
|
+
// However! The `foo` in the above example could also be a namespace, so we only capture the class name if
|
|
20
|
+
// it starts with an uppercase letter. This approximation should give decent results.
|
|
21
|
+
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
|
|
22
|
+
// This will capture the class name before destructors like:
|
|
23
|
+
// Foo::~Foo() {}
|
|
24
|
+
/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
|
|
25
|
+
// This also intends to capture the class name of method implementations but here the class has template
|
|
26
|
+
// parameters, so it can't be a namespace (until C++ adds generic namespaces).
|
|
27
|
+
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
|
28
|
+
],
|
|
29
|
+
keyword: t,
|
|
30
|
+
number: {
|
|
31
|
+
pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
|
32
|
+
greedy: !0
|
|
33
|
+
},
|
|
34
|
+
operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
|
35
|
+
boolean: /\b(?:false|true)\b/
|
|
36
|
+
}), e.languages.insertBefore("cpp", "string", {
|
|
37
|
+
module: {
|
|
38
|
+
// https://en.cppreference.com/w/cpp/language/modules
|
|
39
|
+
pattern: RegExp(
|
|
40
|
+
/(\b(?:import|module)\s+)/.source + "(?:" + // header-name
|
|
41
|
+
/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + // module name or partition or both
|
|
42
|
+
/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
|
|
43
|
+
return a;
|
|
44
|
+
}) + ")"
|
|
45
|
+
),
|
|
46
|
+
lookbehind: !0,
|
|
47
|
+
greedy: !0,
|
|
48
|
+
inside: {
|
|
49
|
+
string: /^[<"][\s\S]+/,
|
|
50
|
+
operator: /:/,
|
|
51
|
+
punctuation: /\./
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"raw-string": {
|
|
55
|
+
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
|
56
|
+
alias: "string",
|
|
57
|
+
greedy: !0
|
|
58
|
+
}
|
|
59
|
+
}), e.languages.insertBefore("cpp", "keyword", {
|
|
60
|
+
"generic-function": {
|
|
61
|
+
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
|
62
|
+
inside: {
|
|
63
|
+
function: /^\w+/,
|
|
64
|
+
generic: {
|
|
65
|
+
pattern: /<[\s\S]+/,
|
|
66
|
+
alias: "class-name",
|
|
67
|
+
inside: e.languages.cpp
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}), e.languages.insertBefore("cpp", "operator", {
|
|
72
|
+
"double-colon": {
|
|
73
|
+
pattern: /::/,
|
|
74
|
+
alias: "punctuation"
|
|
75
|
+
}
|
|
76
|
+
}), e.languages.insertBefore("cpp", "class-name", {
|
|
77
|
+
// the base clause is an optional list of parent classes
|
|
78
|
+
// https://en.cppreference.com/w/cpp/language/class
|
|
79
|
+
"base-clause": {
|
|
80
|
+
pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
|
81
|
+
lookbehind: !0,
|
|
82
|
+
greedy: !0,
|
|
83
|
+
inside: e.languages.extend("cpp", {})
|
|
84
|
+
}
|
|
85
|
+
}), e.languages.insertBefore("inside", "double-colon", {
|
|
86
|
+
// All untokenized words that are not namespaces should be class names
|
|
87
|
+
"class-name": /\b[a-z_]\w*\b(?!\s*::)/i
|
|
88
|
+
}, e.languages.cpp["base-clause"]);
|
|
89
|
+
}(Prism), n);
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
o as __require
|
|
93
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
(function(s) {
|
|
3
|
+
var e = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
4
|
+
s.languages.css = {
|
|
5
|
+
comment: /\/\*[\s\S]*?\*\//,
|
|
6
|
+
atrule: {
|
|
7
|
+
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + e.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
8
|
+
inside: {
|
|
9
|
+
rule: /^@[\w-]+/,
|
|
10
|
+
"selector-function-argument": {
|
|
11
|
+
pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
|
|
12
|
+
lookbehind: !0,
|
|
13
|
+
alias: "selector"
|
|
14
|
+
},
|
|
15
|
+
keyword: {
|
|
16
|
+
pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
|
|
17
|
+
lookbehind: !0
|
|
18
|
+
}
|
|
19
|
+
// See rest below
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
url: {
|
|
23
|
+
// https://drafts.csswg.org/css-values-3/#urls
|
|
24
|
+
pattern: RegExp("\\burl\\((?:" + e.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
|
25
|
+
greedy: !0,
|
|
26
|
+
inside: {
|
|
27
|
+
function: /^url/i,
|
|
28
|
+
punctuation: /^\(|\)$/,
|
|
29
|
+
string: {
|
|
30
|
+
pattern: RegExp("^" + e.source + "$"),
|
|
31
|
+
alias: "url"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
selector: {
|
|
36
|
+
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + e.source + ")*(?=\\s*\\{)"),
|
|
37
|
+
lookbehind: !0
|
|
38
|
+
},
|
|
39
|
+
string: {
|
|
40
|
+
pattern: e,
|
|
41
|
+
greedy: !0
|
|
42
|
+
},
|
|
43
|
+
property: {
|
|
44
|
+
pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
|
|
45
|
+
lookbehind: !0
|
|
46
|
+
},
|
|
47
|
+
important: /!important\b/i,
|
|
48
|
+
function: {
|
|
49
|
+
pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
|
|
50
|
+
lookbehind: !0
|
|
51
|
+
},
|
|
52
|
+
punctuation: /[(){};:,]/
|
|
53
|
+
}, s.languages.css.atrule.inside.rest = s.languages.css;
|
|
54
|
+
var t = s.languages.markup;
|
|
55
|
+
t && (t.tag.addInlined("style", "css"), t.tag.addAttribute("style", "css"));
|
|
56
|
+
})(Prism);
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exports as n } from "../../../_virtual/prism-java2.js";
|
|
3
|
+
var r;
|
|
4
|
+
function o() {
|
|
5
|
+
return r ? n : (r = 1, function(t) {
|
|
6
|
+
var a = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, s = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, e = {
|
|
7
|
+
pattern: RegExp(/(^|[^\w.])/.source + s + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
8
|
+
lookbehind: !0,
|
|
9
|
+
inside: {
|
|
10
|
+
namespace: {
|
|
11
|
+
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
|
12
|
+
inside: {
|
|
13
|
+
punctuation: /\./
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
punctuation: /\./
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
t.languages.java = t.languages.extend("clike", {
|
|
20
|
+
string: {
|
|
21
|
+
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
|
22
|
+
lookbehind: !0,
|
|
23
|
+
greedy: !0
|
|
24
|
+
},
|
|
25
|
+
"class-name": [
|
|
26
|
+
e,
|
|
27
|
+
{
|
|
28
|
+
// variables, parameters, and constructor references
|
|
29
|
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
30
|
+
pattern: RegExp(/(^|[^\w.])/.source + s + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
|
|
31
|
+
lookbehind: !0,
|
|
32
|
+
inside: e.inside
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
// class names based on keyword
|
|
36
|
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
37
|
+
pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + s + /[A-Z]\w*\b/.source),
|
|
38
|
+
lookbehind: !0,
|
|
39
|
+
inside: e.inside
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
keyword: a,
|
|
43
|
+
function: [
|
|
44
|
+
t.languages.clike.function,
|
|
45
|
+
{
|
|
46
|
+
pattern: /(::\s*)[a-z_]\w*/,
|
|
47
|
+
lookbehind: !0
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
|
|
51
|
+
operator: {
|
|
52
|
+
pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
|
|
53
|
+
lookbehind: !0
|
|
54
|
+
},
|
|
55
|
+
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
56
|
+
}), t.languages.insertBefore("java", "string", {
|
|
57
|
+
"triple-quoted-string": {
|
|
58
|
+
// http://openjdk.java.net/jeps/355#Description
|
|
59
|
+
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
60
|
+
greedy: !0,
|
|
61
|
+
alias: "string"
|
|
62
|
+
},
|
|
63
|
+
char: {
|
|
64
|
+
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
|
65
|
+
greedy: !0
|
|
66
|
+
}
|
|
67
|
+
}), t.languages.insertBefore("java", "class-name", {
|
|
68
|
+
annotation: {
|
|
69
|
+
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
70
|
+
lookbehind: !0,
|
|
71
|
+
alias: "punctuation"
|
|
72
|
+
},
|
|
73
|
+
generics: {
|
|
74
|
+
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
75
|
+
inside: {
|
|
76
|
+
"class-name": e,
|
|
77
|
+
keyword: a,
|
|
78
|
+
punctuation: /[<>(),.:]/,
|
|
79
|
+
operator: /[?&|]/
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
import: [
|
|
83
|
+
{
|
|
84
|
+
pattern: RegExp(/(\bimport\s+)/.source + s + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
|
|
85
|
+
lookbehind: !0,
|
|
86
|
+
inside: {
|
|
87
|
+
namespace: e.inside.namespace,
|
|
88
|
+
punctuation: /\./,
|
|
89
|
+
operator: /\*/,
|
|
90
|
+
"class-name": /\w+/
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
pattern: RegExp(/(\bimport\s+static\s+)/.source + s + /(?:\w+|\*)(?=\s*;)/.source),
|
|
95
|
+
lookbehind: !0,
|
|
96
|
+
alias: "static",
|
|
97
|
+
inside: {
|
|
98
|
+
namespace: e.inside.namespace,
|
|
99
|
+
static: /\b\w+$/,
|
|
100
|
+
punctuation: /\./,
|
|
101
|
+
operator: /\*/,
|
|
102
|
+
"class-name": /\w+/
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
namespace: {
|
|
107
|
+
pattern: RegExp(
|
|
108
|
+
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
|
|
109
|
+
return a.source;
|
|
110
|
+
})
|
|
111
|
+
),
|
|
112
|
+
lookbehind: !0,
|
|
113
|
+
inside: {
|
|
114
|
+
punctuation: /\./
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}(Prism), n);
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
o as __require
|
|
122
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Prism.languages.javascript = Prism.languages.extend("clike", {
|
|
3
|
+
"class-name": [
|
|
4
|
+
Prism.languages.clike["class-name"],
|
|
5
|
+
{
|
|
6
|
+
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
|
7
|
+
lookbehind: !0
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
keyword: [
|
|
11
|
+
{
|
|
12
|
+
pattern: /((?:^|\})\s*)catch\b/,
|
|
13
|
+
lookbehind: !0
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
|
|
17
|
+
lookbehind: !0
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
|
|
21
|
+
function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
|
22
|
+
number: {
|
|
23
|
+
pattern: RegExp(
|
|
24
|
+
/(^|[^\w$])/.source + "(?:" + // constant
|
|
25
|
+
(/NaN|Infinity/.source + "|" + // binary integer
|
|
26
|
+
/0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
|
|
27
|
+
/0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
|
|
28
|
+
/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
|
|
29
|
+
/\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
|
|
30
|
+
/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
|
|
31
|
+
),
|
|
32
|
+
lookbehind: !0
|
|
33
|
+
},
|
|
34
|
+
operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
|
|
35
|
+
});
|
|
36
|
+
Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
|
|
37
|
+
Prism.languages.insertBefore("javascript", "keyword", {
|
|
38
|
+
regex: {
|
|
39
|
+
pattern: RegExp(
|
|
40
|
+
// lookbehind
|
|
41
|
+
// eslint-disable-next-line regexp/no-dupe-characters-character-class
|
|
42
|
+
/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
|
|
43
|
+
// There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
|
|
44
|
+
// classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
|
|
45
|
+
// with the only syntax, so we have to define 2 different regex patterns.
|
|
46
|
+
/\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
|
|
47
|
+
/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
|
|
48
|
+
/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
|
|
49
|
+
),
|
|
50
|
+
lookbehind: !0,
|
|
51
|
+
greedy: !0,
|
|
52
|
+
inside: {
|
|
53
|
+
"regex-source": {
|
|
54
|
+
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
|
|
55
|
+
lookbehind: !0,
|
|
56
|
+
alias: "language-regex",
|
|
57
|
+
inside: Prism.languages.regex
|
|
58
|
+
},
|
|
59
|
+
"regex-delimiter": /^\/|\/$/,
|
|
60
|
+
"regex-flags": /^[a-z]+$/
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
// This must be declared before keyword because we use "function" inside the look-forward
|
|
64
|
+
"function-variable": {
|
|
65
|
+
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
|
|
66
|
+
alias: "function"
|
|
67
|
+
},
|
|
68
|
+
parameter: [
|
|
69
|
+
{
|
|
70
|
+
pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
|
|
71
|
+
lookbehind: !0,
|
|
72
|
+
inside: Prism.languages.javascript
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
|
|
76
|
+
lookbehind: !0,
|
|
77
|
+
inside: Prism.languages.javascript
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
|
|
81
|
+
lookbehind: !0,
|
|
82
|
+
inside: Prism.languages.javascript
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
|
|
86
|
+
lookbehind: !0,
|
|
87
|
+
inside: Prism.languages.javascript
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
|
|
91
|
+
});
|
|
92
|
+
Prism.languages.insertBefore("javascript", "string", {
|
|
93
|
+
hashbang: {
|
|
94
|
+
pattern: /^#!.*/,
|
|
95
|
+
greedy: !0,
|
|
96
|
+
alias: "comment"
|
|
97
|
+
},
|
|
98
|
+
"template-string": {
|
|
99
|
+
pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
|
100
|
+
greedy: !0,
|
|
101
|
+
inside: {
|
|
102
|
+
"template-punctuation": {
|
|
103
|
+
pattern: /^`|`$/,
|
|
104
|
+
alias: "string"
|
|
105
|
+
},
|
|
106
|
+
interpolation: {
|
|
107
|
+
pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
108
|
+
lookbehind: !0,
|
|
109
|
+
inside: {
|
|
110
|
+
"interpolation-punctuation": {
|
|
111
|
+
pattern: /^\$\{|\}$/,
|
|
112
|
+
alias: "punctuation"
|
|
113
|
+
},
|
|
114
|
+
rest: Prism.languages.javascript
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
string: /[\s\S]+/
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"string-property": {
|
|
121
|
+
pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
|
122
|
+
lookbehind: !0,
|
|
123
|
+
greedy: !0,
|
|
124
|
+
alias: "property"
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
Prism.languages.insertBefore("javascript", "operator", {
|
|
128
|
+
"literal-property": {
|
|
129
|
+
pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
|
130
|
+
lookbehind: !0,
|
|
131
|
+
alias: "property"
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(
|
|
135
|
+
/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
|
|
136
|
+
"javascript"
|
|
137
|
+
));
|
|
138
|
+
Prism.languages.js = Prism.languages.javascript;
|