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.
Files changed (96) hide show
  1. package/dist/_virtual/index.js +5 -3
  2. package/dist/_virtual/index2.js +5 -2
  3. package/dist/_virtual/index3.js +5 -5
  4. package/dist/_virtual/index4.js +2 -5
  5. package/dist/_virtual/index5.js +2 -5
  6. package/dist/_virtual/index7.js +3 -2
  7. package/dist/_virtual/prism-cpp.js +3 -0
  8. package/dist/_virtual/prism-cpp2.js +5 -0
  9. package/dist/_virtual/prism-java.js +3 -0
  10. package/dist/_virtual/prism-java2.js +5 -0
  11. package/dist/_virtual/prism-python.js +3 -0
  12. package/dist/_virtual/prism-python2.js +5 -0
  13. package/dist/_virtual/prism-rust.js +3 -0
  14. package/dist/_virtual/prism-rust2.js +5 -0
  15. package/dist/_virtual/prism-typescript.js +3 -0
  16. package/dist/_virtual/prism-typescript2.js +5 -0
  17. package/dist/_virtual/prism.js +3 -0
  18. package/dist/_virtual/prism2.js +5 -0
  19. package/dist/components/editor/context/toolbar-context.js +42 -0
  20. package/dist/components/editor/editor-hooks/use-modal.js +30 -0
  21. package/dist/components/editor/editor-hooks/use-update-toolbar.js +24 -0
  22. package/dist/components/editor/editor-ui/content-editable.js +26 -0
  23. package/dist/components/editor/plugins/actions/actions-plugin.js +7 -0
  24. package/dist/components/editor/plugins/actions/clear-editor-plugin.js +39 -0
  25. package/dist/components/editor/plugins/actions/counter-character-plugin.js +53 -0
  26. package/dist/components/editor/plugins/toolbar/block-format/block-format-data.js +52 -0
  27. package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +26 -0
  28. package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +26 -0
  29. package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +31 -0
  30. package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +26 -0
  31. package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +23 -0
  32. package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +24 -0
  33. package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +56 -0
  34. package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +50 -0
  35. package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +69 -0
  36. package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +34 -0
  37. package/dist/components/editor/themes/editor-theme.js +112 -0
  38. package/dist/components/ui/app-editor.js +150 -0
  39. package/dist/components/ui/app-multiple-select-dropdown.js +2 -2
  40. package/dist/components/ui/button.js +25 -24
  41. package/dist/components/ui/calendar.js +9 -9
  42. package/dist/components/ui/dialog.js +43 -37
  43. package/dist/components/ui/sidebar.js +20 -19
  44. package/dist/index.d.ts +23 -1
  45. package/dist/index.js +48 -44
  46. package/dist/laif-ds.css +1 -0
  47. package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +159 -0
  48. package/dist/node_modules/@lexical/code/LexicalCode.prod.js +236 -0
  49. package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +46 -0
  50. package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +89 -0
  51. package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +108 -0
  52. package/dist/node_modules/@lexical/link/LexicalLink.prod.js +187 -0
  53. package/dist/node_modules/@lexical/list/LexicalList.prod.js +729 -0
  54. package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +367 -0
  55. package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +11 -0
  56. package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +17 -0
  57. package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +45 -0
  58. package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +22 -0
  59. package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +55 -0
  60. package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +49 -0
  61. package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +15 -0
  62. package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +17 -0
  63. package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +16 -0
  64. package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +56 -0
  65. package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +21 -0
  66. package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +376 -0
  67. package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +107 -0
  68. package/dist/node_modules/@lexical/table/LexicalTable.prod.js +661 -0
  69. package/dist/node_modules/@lexical/text/LexicalText.prod.js +37 -0
  70. package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +102 -0
  71. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
  72. package/dist/node_modules/eventemitter3/index.js +1 -1
  73. package/dist/node_modules/eventemitter3/index2.js +1 -1
  74. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  75. package/dist/node_modules/lexical/Lexical.prod.js +4901 -0
  76. package/dist/node_modules/prismjs/components/prism-c.js +77 -0
  77. package/dist/node_modules/prismjs/components/prism-clike.js +32 -0
  78. package/dist/node_modules/prismjs/components/prism-cpp.js +93 -0
  79. package/dist/node_modules/prismjs/components/prism-css.js +56 -0
  80. package/dist/node_modules/prismjs/components/prism-java.js +122 -0
  81. package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
  82. package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
  83. package/dist/node_modules/prismjs/components/prism-markup.js +174 -0
  84. package/dist/node_modules/prismjs/components/prism-objectivec.js +11 -0
  85. package/dist/node_modules/prismjs/components/prism-powershell.js +56 -0
  86. package/dist/node_modules/prismjs/components/prism-python.js +69 -0
  87. package/dist/node_modules/prismjs/components/prism-rust.js +124 -0
  88. package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
  89. package/dist/node_modules/prismjs/components/prism-swift.js +114 -0
  90. package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
  91. package/dist/node_modules/prismjs/prism.js +1165 -0
  92. package/dist/node_modules/recharts/es6/util/Events.js +1 -1
  93. package/dist/node_modules/unified/lib/index.js +1 -1
  94. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  95. package/dist/styles.v3.css +1 -1
  96. package/package.json +12 -1
@@ -0,0 +1,124 @@
1
+ "use client";
2
+ import { __exports as r } from "../../../_virtual/prism-rust2.js";
3
+ var n;
4
+ function i() {
5
+ return n ? r : (n = 1, function(t) {
6
+ for (var e = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, a = 0; a < 2; a++)
7
+ e = e.replace(/<self>/g, function() {
8
+ return e;
9
+ });
10
+ e = e.replace(/<self>/g, function() {
11
+ return /[^\s\S]/.source;
12
+ }), t.languages.rust = {
13
+ comment: [
14
+ {
15
+ pattern: RegExp(/(^|[^\\])/.source + e),
16
+ lookbehind: !0,
17
+ greedy: !0
18
+ },
19
+ {
20
+ pattern: /(^|[^\\:])\/\/.*/,
21
+ lookbehind: !0,
22
+ greedy: !0
23
+ }
24
+ ],
25
+ string: {
26
+ pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,
27
+ greedy: !0
28
+ },
29
+ char: {
30
+ pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,
31
+ greedy: !0
32
+ },
33
+ attribute: {
34
+ pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,
35
+ greedy: !0,
36
+ alias: "attr-name",
37
+ inside: {
38
+ string: null
39
+ // see below
40
+ }
41
+ },
42
+ // Closure params should not be confused with bitwise OR |
43
+ "closure-params": {
44
+ pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,
45
+ lookbehind: !0,
46
+ greedy: !0,
47
+ inside: {
48
+ "closure-punctuation": {
49
+ pattern: /^\||\|$/,
50
+ alias: "punctuation"
51
+ },
52
+ rest: null
53
+ // see below
54
+ }
55
+ },
56
+ "lifetime-annotation": {
57
+ pattern: /'\w+/,
58
+ alias: "symbol"
59
+ },
60
+ "fragment-specifier": {
61
+ pattern: /(\$\w+:)[a-z]+/,
62
+ lookbehind: !0,
63
+ alias: "punctuation"
64
+ },
65
+ variable: /\$\w+/,
66
+ "function-definition": {
67
+ pattern: /(\bfn\s+)\w+/,
68
+ lookbehind: !0,
69
+ alias: "function"
70
+ },
71
+ "type-definition": {
72
+ pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
73
+ lookbehind: !0,
74
+ alias: "class-name"
75
+ },
76
+ "module-declaration": [
77
+ {
78
+ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
79
+ lookbehind: !0,
80
+ alias: "namespace"
81
+ },
82
+ {
83
+ pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
84
+ lookbehind: !0,
85
+ alias: "namespace",
86
+ inside: {
87
+ punctuation: /::/
88
+ }
89
+ }
90
+ ],
91
+ keyword: [
92
+ // https://github.com/rust-lang/reference/blob/master/src/keywords.md
93
+ /\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,
94
+ // primitives and str
95
+ // https://doc.rust-lang.org/stable/rust-by-example/primitives.html
96
+ /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/
97
+ ],
98
+ // functions can technically start with an upper-case letter, but this will introduce a lot of false positives
99
+ // and Rust's naming conventions recommend snake_case anyway.
100
+ // https://doc.rust-lang.org/1.0.0/style/style/naming/README.html
101
+ function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
102
+ macro: {
103
+ pattern: /\b\w+!/,
104
+ alias: "property"
105
+ },
106
+ constant: /\b[A-Z_][A-Z_\d]+\b/,
107
+ "class-name": /\b[A-Z]\w*\b/,
108
+ namespace: {
109
+ pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
110
+ inside: {
111
+ punctuation: /::/
112
+ }
113
+ },
114
+ // Hex, oct, bin, dec numbers with visual separators and type suffix
115
+ number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
116
+ boolean: /\b(?:false|true)\b/,
117
+ punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
118
+ operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
119
+ }, t.languages.rust["closure-params"].inside.rest = t.languages.rust, t.languages.rust.attribute.inside.string = t.languages.rust.string;
120
+ }(Prism), r);
121
+ }
122
+ export {
123
+ i as __require
124
+ };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ Prism.languages.sql = {
3
+ comment: {
4
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
5
+ lookbehind: !0
6
+ },
7
+ variable: [
8
+ {
9
+ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
10
+ greedy: !0
11
+ },
12
+ /@[\w.$]+/
13
+ ],
14
+ string: {
15
+ pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
16
+ greedy: !0,
17
+ lookbehind: !0
18
+ },
19
+ identifier: {
20
+ pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
21
+ greedy: !0,
22
+ lookbehind: !0,
23
+ inside: {
24
+ punctuation: /^`|`$/
25
+ }
26
+ },
27
+ function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,
28
+ // Should we highlight user defined functions too?
29
+ keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
30
+ boolean: /\b(?:FALSE|NULL|TRUE)\b/i,
31
+ number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
32
+ operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
33
+ punctuation: /[;[\]()`,.]/
34
+ };
@@ -0,0 +1,114 @@
1
+ "use client";
2
+ Prism.languages.swift = {
3
+ comment: {
4
+ // Nested comments are supported up to 2 levels
5
+ pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
6
+ lookbehind: !0,
7
+ greedy: !0
8
+ },
9
+ "string-literal": [
10
+ // https://docs.swift.org/swift-book/LanguageGuide/StringsAndCharacters.html
11
+ {
12
+ pattern: RegExp(
13
+ /(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source
14
+ ),
15
+ lookbehind: !0,
16
+ greedy: !0,
17
+ inside: {
18
+ interpolation: {
19
+ pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/,
20
+ lookbehind: !0,
21
+ inside: null
22
+ // see below
23
+ },
24
+ "interpolation-punctuation": {
25
+ pattern: /^\)|\\\($/,
26
+ alias: "punctuation"
27
+ },
28
+ punctuation: /\\(?=[\r\n])/,
29
+ string: /[\s\S]+/
30
+ }
31
+ },
32
+ {
33
+ pattern: RegExp(
34
+ /(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"
35
+ ),
36
+ lookbehind: !0,
37
+ greedy: !0,
38
+ inside: {
39
+ interpolation: {
40
+ pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,
41
+ lookbehind: !0,
42
+ inside: null
43
+ // see below
44
+ },
45
+ "interpolation-punctuation": {
46
+ pattern: /^\)|\\#+\($/,
47
+ alias: "punctuation"
48
+ },
49
+ string: /[\s\S]+/
50
+ }
51
+ }
52
+ ],
53
+ directive: {
54
+ // directives with conditions
55
+ pattern: RegExp(
56
+ /#/.source + "(?:" + (/(?:elseif|if)\b/.source + "(?:[ ]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+") + "|" + /(?:else|endif)\b/.source + ")"
57
+ ),
58
+ alias: "property",
59
+ inside: {
60
+ "directive-name": /^#\w+/,
61
+ boolean: /\b(?:false|true)\b/,
62
+ number: /\b\d+(?:\.\d+)*\b/,
63
+ operator: /!|&&|\|\||[<>]=?/,
64
+ punctuation: /[(),]/
65
+ }
66
+ },
67
+ literal: {
68
+ pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,
69
+ alias: "constant"
70
+ },
71
+ "other-directive": {
72
+ pattern: /#\w+\b/,
73
+ alias: "property"
74
+ },
75
+ attribute: {
76
+ pattern: /@\w+/,
77
+ alias: "atrule"
78
+ },
79
+ "function-definition": {
80
+ pattern: /(\bfunc\s+)\w+/,
81
+ lookbehind: !0,
82
+ alias: "function"
83
+ },
84
+ label: {
85
+ // https://docs.swift.org/swift-book/LanguageGuide/ControlFlow.html#ID141
86
+ pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,
87
+ lookbehind: !0,
88
+ alias: "important"
89
+ },
90
+ keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
91
+ boolean: /\b(?:false|true)\b/,
92
+ nil: {
93
+ pattern: /\bnil\b/,
94
+ alias: "constant"
95
+ },
96
+ "short-argument": /\$\d+\b/,
97
+ omit: {
98
+ pattern: /\b_\b/,
99
+ alias: "keyword"
100
+ },
101
+ number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
102
+ // A class name must start with an upper-case letter and be either 1 letter long or contain a lower-case letter.
103
+ "class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,
104
+ function: /\b[a-z_]\w*(?=\s*\()/i,
105
+ constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
106
+ // Operators are generic in Swift. Developers can even create new operators (e.g. +++).
107
+ // https://docs.swift.org/swift-book/ReferenceManual/zzSummaryOfTheGrammar.html#ID481
108
+ // This regex only supports ASCII operators.
109
+ operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,
110
+ punctuation: /[{}[\]();,.:\\]/
111
+ };
112
+ Prism.languages.swift["string-literal"].forEach(function(e) {
113
+ e.inside.interpolation.inside = Prism.languages.swift;
114
+ });
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { __exports as s } from "../../../_virtual/prism-typescript2.js";
3
+ var n;
4
+ function r() {
5
+ return n ? s : (n = 1, function(e) {
6
+ e.languages.typescript = e.languages.extend("javascript", {
7
+ "class-name": {
8
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
9
+ lookbehind: !0,
10
+ greedy: !0,
11
+ inside: null
12
+ // see below
13
+ },
14
+ builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
15
+ }), e.languages.typescript.keyword.push(
16
+ /\b(?:abstract|declare|is|keyof|readonly|require)\b/,
17
+ // keywords that have to be followed by an identifier
18
+ /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
19
+ // This is for `import type *, {}`
20
+ /\btype\b(?=\s*(?:[\{*]|$))/
21
+ ), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
22
+ var t = e.languages.extend("typescript", {});
23
+ delete t["class-name"], e.languages.typescript["class-name"].inside = t, e.languages.insertBefore("typescript", "function", {
24
+ decorator: {
25
+ pattern: /@[$\w\xA0-\uFFFF]+/,
26
+ inside: {
27
+ at: {
28
+ pattern: /^@/,
29
+ alias: "operator"
30
+ },
31
+ function: /^[\s\S]+/
32
+ }
33
+ },
34
+ "generic-function": {
35
+ // e.g. foo<T extends "bar" | "baz">( ...
36
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
37
+ greedy: !0,
38
+ inside: {
39
+ function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
40
+ generic: {
41
+ pattern: /<[\s\S]+/,
42
+ // everything after the first <
43
+ alias: "class-name",
44
+ inside: t
45
+ }
46
+ }
47
+ }
48
+ }), e.languages.ts = e.languages.typescript;
49
+ }(Prism), s);
50
+ }
51
+ export {
52
+ r as __require
53
+ };