@gkucmierz/nano-ui 1.7.8 → 1.8.9

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.
@@ -0,0 +1,246 @@
1
+ //#region node_modules/highlight.js/es/languages/python.js
2
+ function e(e) {
3
+ let t = e.regex, n = /[\p{XID_Start}_]\p{XID_Continue}*/u, r = /* @__PURE__ */ "and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield".split("."), i = {
4
+ $pattern: /[A-Za-z]\w+|__\w+__/,
5
+ keyword: r,
6
+ built_in: /* @__PURE__ */ "__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip".split("."),
7
+ literal: [
8
+ "__debug__",
9
+ "Ellipsis",
10
+ "False",
11
+ "None",
12
+ "NotImplemented",
13
+ "True"
14
+ ],
15
+ type: [
16
+ "Any",
17
+ "Callable",
18
+ "Coroutine",
19
+ "Dict",
20
+ "List",
21
+ "Literal",
22
+ "Generic",
23
+ "Optional",
24
+ "Sequence",
25
+ "Set",
26
+ "Tuple",
27
+ "Type",
28
+ "Union"
29
+ ]
30
+ }, a = {
31
+ className: "meta",
32
+ begin: /^(>>>|\.\.\.) /
33
+ }, o = {
34
+ className: "subst",
35
+ begin: /\{/,
36
+ end: /\}/,
37
+ keywords: i,
38
+ illegal: /#/
39
+ }, s = {
40
+ begin: /\{\{/,
41
+ relevance: 0
42
+ }, c = {
43
+ className: "string",
44
+ contains: [e.BACKSLASH_ESCAPE],
45
+ variants: [
46
+ {
47
+ begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
48
+ end: /'''/,
49
+ contains: [e.BACKSLASH_ESCAPE, a],
50
+ relevance: 10
51
+ },
52
+ {
53
+ begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
54
+ end: /"""/,
55
+ contains: [e.BACKSLASH_ESCAPE, a],
56
+ relevance: 10
57
+ },
58
+ {
59
+ begin: /([fF][rR]|[rR][fF]|[fF])'''/,
60
+ end: /'''/,
61
+ contains: [
62
+ e.BACKSLASH_ESCAPE,
63
+ a,
64
+ s,
65
+ o
66
+ ]
67
+ },
68
+ {
69
+ begin: /([fF][rR]|[rR][fF]|[fF])"""/,
70
+ end: /"""/,
71
+ contains: [
72
+ e.BACKSLASH_ESCAPE,
73
+ a,
74
+ s,
75
+ o
76
+ ]
77
+ },
78
+ {
79
+ begin: /([uU]|[rR])'/,
80
+ end: /'/,
81
+ relevance: 10
82
+ },
83
+ {
84
+ begin: /([uU]|[rR])"/,
85
+ end: /"/,
86
+ relevance: 10
87
+ },
88
+ {
89
+ begin: /([bB]|[bB][rR]|[rR][bB])'/,
90
+ end: /'/
91
+ },
92
+ {
93
+ begin: /([bB]|[bB][rR]|[rR][bB])"/,
94
+ end: /"/
95
+ },
96
+ {
97
+ begin: /([fF][rR]|[rR][fF]|[fF])'/,
98
+ end: /'/,
99
+ contains: [
100
+ e.BACKSLASH_ESCAPE,
101
+ s,
102
+ o
103
+ ]
104
+ },
105
+ {
106
+ begin: /([fF][rR]|[rR][fF]|[fF])"/,
107
+ end: /"/,
108
+ contains: [
109
+ e.BACKSLASH_ESCAPE,
110
+ s,
111
+ o
112
+ ]
113
+ },
114
+ e.APOS_STRING_MODE,
115
+ e.QUOTE_STRING_MODE
116
+ ]
117
+ }, l = "[0-9](_?[0-9])*", u = `(\\b(${l}))?\\.(${l})|\\b(${l})\\.`, d = `\\b|${r.join("|")}`, f = {
118
+ className: "number",
119
+ relevance: 0,
120
+ variants: [
121
+ { begin: `(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})` },
122
+ { begin: `(${u})[jJ]?` },
123
+ { begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})` },
124
+ { begin: `\\b0[bB](_?[01])+[lL]?(?=${d})` },
125
+ { begin: `\\b0[oO](_?[0-7])+[lL]?(?=${d})` },
126
+ { begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})` },
127
+ { begin: `\\b(${l})[jJ](?=${d})` }
128
+ ]
129
+ }, p = {
130
+ className: "comment",
131
+ begin: t.lookahead(/# type:/),
132
+ end: /$/,
133
+ keywords: i,
134
+ contains: [{ begin: /# type:/ }, {
135
+ begin: /#/,
136
+ end: /\b\B/,
137
+ endsWithParent: !0
138
+ }]
139
+ }, m = {
140
+ className: "params",
141
+ variants: [{
142
+ className: "",
143
+ begin: /\(\s*\)/,
144
+ skip: !0
145
+ }, {
146
+ begin: /\(/,
147
+ end: /\)/,
148
+ excludeBegin: !0,
149
+ excludeEnd: !0,
150
+ keywords: i,
151
+ contains: [
152
+ "self",
153
+ a,
154
+ f,
155
+ c,
156
+ e.HASH_COMMENT_MODE
157
+ ]
158
+ }]
159
+ };
160
+ return o.contains = [
161
+ c,
162
+ f,
163
+ a
164
+ ], {
165
+ name: "Python",
166
+ aliases: [
167
+ "py",
168
+ "gyp",
169
+ "ipython"
170
+ ],
171
+ unicodeRegex: !0,
172
+ keywords: i,
173
+ illegal: /(<\/|\?)|=>/,
174
+ contains: [
175
+ a,
176
+ f,
177
+ {
178
+ scope: "variable.language",
179
+ match: /\bself\b/
180
+ },
181
+ {
182
+ beginKeywords: "if",
183
+ relevance: 0
184
+ },
185
+ {
186
+ match: /\bor\b/,
187
+ scope: "keyword"
188
+ },
189
+ c,
190
+ p,
191
+ e.HASH_COMMENT_MODE,
192
+ {
193
+ match: [
194
+ /\bdef/,
195
+ /\s+/,
196
+ n
197
+ ],
198
+ scope: {
199
+ 1: "keyword",
200
+ 3: "title.function"
201
+ },
202
+ contains: [m]
203
+ },
204
+ {
205
+ variants: [{ match: [
206
+ /\bclass/,
207
+ /\s+/,
208
+ n,
209
+ /\s*/,
210
+ /\(\s*/,
211
+ n,
212
+ /\s*\)/
213
+ ] }, { match: [
214
+ /\bclass/,
215
+ /\s+/,
216
+ n
217
+ ] }],
218
+ scope: {
219
+ 1: "keyword",
220
+ 3: "title.class",
221
+ 6: "title.class.inherited"
222
+ }
223
+ },
224
+ {
225
+ className: "meta",
226
+ begin: /^[\t ]*@/,
227
+ end: /(?=#)|$/,
228
+ contains: [
229
+ f,
230
+ m,
231
+ c
232
+ ]
233
+ }
234
+ ]
235
+ };
236
+ }
237
+ //#endregion
238
+ //#region src/parsers/python.js
239
+ var t = {
240
+ id: "python",
241
+ name: "Python",
242
+ aliases: ["py", "python"],
243
+ grammar: e
244
+ };
245
+ //#endregion
246
+ export { t };
@@ -0,0 +1,177 @@
1
+ //#region node_modules/highlight.js/es/languages/rust.js
2
+ function e(e) {
3
+ let t = e.regex, n = /(r#)?/, r = t.concat(n, e.UNDERSCORE_IDENT_RE), i = t.concat(n, e.IDENT_RE), a = {
4
+ className: "title.function.invoke",
5
+ relevance: 0,
6
+ begin: t.concat(/\b/, /(?!let|for|while|if|else|match\b)/, i, t.lookahead(/\s*\(/))
7
+ }, o = "([ui](8|16|32|64|128|size)|f(32|64))?", s = /* @__PURE__ */ "abstract.as.async.await.become.box.break.const.continue.crate.do.dyn.else.enum.extern.false.final.fn.for.if.impl.in.let.loop.macro.match.mod.move.mut.override.priv.pub.ref.return.self.Self.static.struct.super.trait.true.try.type.typeof.union.unsafe.unsized.use.virtual.where.while.yield".split("."), c = [
8
+ "true",
9
+ "false",
10
+ "Some",
11
+ "None",
12
+ "Ok",
13
+ "Err"
14
+ ], l = /* @__PURE__ */ "drop .Copy.Send.Sized.Sync.Drop.Fn.FnMut.FnOnce.ToOwned.Clone.Debug.PartialEq.PartialOrd.Eq.Ord.AsRef.AsMut.Into.From.Default.Iterator.Extend.IntoIterator.DoubleEndedIterator.ExactSizeIterator.SliceConcatExt.ToString.assert!.assert_eq!.bitflags!.bytes!.cfg!.col!.concat!.concat_idents!.debug_assert!.debug_assert_eq!.env!.eprintln!.panic!.file!.format!.format_args!.include_bytes!.include_str!.line!.local_data_key!.module_path!.option_env!.print!.println!.select!.stringify!.try!.unimplemented!.unreachable!.vec!.write!.writeln!.macro_rules!.assert_ne!.debug_assert_ne!".split("."), u = [
15
+ "i8",
16
+ "i16",
17
+ "i32",
18
+ "i64",
19
+ "i128",
20
+ "isize",
21
+ "u8",
22
+ "u16",
23
+ "u32",
24
+ "u64",
25
+ "u128",
26
+ "usize",
27
+ "f32",
28
+ "f64",
29
+ "str",
30
+ "char",
31
+ "bool",
32
+ "Box",
33
+ "Option",
34
+ "Result",
35
+ "String",
36
+ "Vec"
37
+ ];
38
+ return {
39
+ name: "Rust",
40
+ aliases: ["rs"],
41
+ keywords: {
42
+ $pattern: e.IDENT_RE + "!?",
43
+ type: u,
44
+ keyword: s,
45
+ literal: c,
46
+ built_in: l
47
+ },
48
+ illegal: "</",
49
+ contains: [
50
+ e.C_LINE_COMMENT_MODE,
51
+ e.COMMENT("/\\*", "\\*/", { contains: ["self"] }),
52
+ e.inherit(e.QUOTE_STRING_MODE, {
53
+ begin: /b?"/,
54
+ illegal: null
55
+ }),
56
+ {
57
+ className: "symbol",
58
+ begin: /'[a-zA-Z_][a-zA-Z0-9_]*(?!')/
59
+ },
60
+ {
61
+ scope: "string",
62
+ variants: [{ begin: /b?r(#*)"(.|\n)*?"\1(?!#)/ }, {
63
+ begin: /b?'/,
64
+ end: /'/,
65
+ contains: [{
66
+ scope: "char.escape",
67
+ match: /\\('|\w|x\w{2}|u\w{4}|U\w{8})/
68
+ }]
69
+ }]
70
+ },
71
+ {
72
+ className: "number",
73
+ variants: [
74
+ { begin: "\\b0b([01_]+)" + o },
75
+ { begin: "\\b0o([0-7_]+)" + o },
76
+ { begin: "\\b0x([A-Fa-f0-9_]+)" + o },
77
+ { begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)" + o }
78
+ ],
79
+ relevance: 0
80
+ },
81
+ {
82
+ begin: [
83
+ /fn/,
84
+ /\s+/,
85
+ r
86
+ ],
87
+ className: {
88
+ 1: "keyword",
89
+ 3: "title.function"
90
+ }
91
+ },
92
+ {
93
+ className: "meta",
94
+ begin: "#!?\\[",
95
+ end: "\\]",
96
+ contains: [{
97
+ className: "string",
98
+ begin: /"/,
99
+ end: /"/,
100
+ contains: [e.BACKSLASH_ESCAPE]
101
+ }]
102
+ },
103
+ {
104
+ begin: [
105
+ /let/,
106
+ /\s+/,
107
+ /(?:mut\s+)?/,
108
+ r
109
+ ],
110
+ className: {
111
+ 1: "keyword",
112
+ 3: "keyword",
113
+ 4: "variable"
114
+ }
115
+ },
116
+ {
117
+ begin: [
118
+ /for/,
119
+ /\s+/,
120
+ r,
121
+ /\s+/,
122
+ /in/
123
+ ],
124
+ className: {
125
+ 1: "keyword",
126
+ 3: "variable",
127
+ 5: "keyword"
128
+ }
129
+ },
130
+ {
131
+ begin: [
132
+ /type/,
133
+ /\s+/,
134
+ r
135
+ ],
136
+ className: {
137
+ 1: "keyword",
138
+ 3: "title.class"
139
+ }
140
+ },
141
+ {
142
+ begin: [
143
+ /(?:trait|enum|struct|union|impl|for)/,
144
+ /\s+/,
145
+ r
146
+ ],
147
+ className: {
148
+ 1: "keyword",
149
+ 3: "title.class"
150
+ }
151
+ },
152
+ {
153
+ begin: e.IDENT_RE + "::",
154
+ keywords: {
155
+ keyword: "Self",
156
+ built_in: l,
157
+ type: u
158
+ }
159
+ },
160
+ {
161
+ className: "punctuation",
162
+ begin: "->"
163
+ },
164
+ a
165
+ ]
166
+ };
167
+ }
168
+ //#endregion
169
+ //#region src/parsers/rust.js
170
+ var t = {
171
+ id: "rust",
172
+ name: "Rust",
173
+ aliases: ["rs", "rust"],
174
+ grammar: e
175
+ };
176
+ //#endregion
177
+ export { t };
@@ -0,0 +1,131 @@
1
+ //#region node_modules/highlight.js/es/languages/sql.js
2
+ function e(e) {
3
+ let t = e.regex, n = e.COMMENT("--", "$"), r = {
4
+ scope: "string",
5
+ variants: [{
6
+ begin: /'/,
7
+ end: /'/,
8
+ contains: [{ match: /''/ }]
9
+ }]
10
+ }, i = {
11
+ begin: /"/,
12
+ end: /"/,
13
+ contains: [{ match: /""/ }]
14
+ }, a = [
15
+ "true",
16
+ "false",
17
+ "unknown"
18
+ ], o = [
19
+ "double precision",
20
+ "large object",
21
+ "with timezone",
22
+ "without timezone"
23
+ ], s = /* @__PURE__ */ "bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary".split("."), c = [
24
+ "add",
25
+ "asc",
26
+ "collation",
27
+ "desc",
28
+ "final",
29
+ "first",
30
+ "last",
31
+ "view"
32
+ ], l = /* @__PURE__ */ "abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year".split("."), u = /* @__PURE__ */ "abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket".split("."), d = [
33
+ "current_catalog",
34
+ "current_date",
35
+ "current_default_transform_group",
36
+ "current_path",
37
+ "current_role",
38
+ "current_schema",
39
+ "current_transform_group_for_type",
40
+ "current_user",
41
+ "session_user",
42
+ "system_time",
43
+ "system_user",
44
+ "current_time",
45
+ "localtime",
46
+ "current_timestamp",
47
+ "localtimestamp"
48
+ ], f = [
49
+ "create table",
50
+ "insert into",
51
+ "primary key",
52
+ "foreign key",
53
+ "not null",
54
+ "alter table",
55
+ "add constraint",
56
+ "grouping sets",
57
+ "on overflow",
58
+ "character set",
59
+ "respect nulls",
60
+ "ignore nulls",
61
+ "nulls first",
62
+ "nulls last",
63
+ "depth first",
64
+ "breadth first"
65
+ ], p = u, m = [...l, ...c].filter((e) => !u.includes(e)), h = {
66
+ scope: "variable",
67
+ match: /@[a-z0-9][a-z0-9_]*/
68
+ }, g = {
69
+ scope: "operator",
70
+ match: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
71
+ relevance: 0
72
+ }, _ = {
73
+ match: t.concat(/\b/, t.either(...p), /\s*\(/),
74
+ relevance: 0,
75
+ keywords: { built_in: p }
76
+ };
77
+ function v(e) {
78
+ return t.concat(/\b/, t.either(...e.map((e) => e.replace(/\s+/, "\\s+"))), /\b/);
79
+ }
80
+ let y = {
81
+ scope: "keyword",
82
+ match: v(f),
83
+ relevance: 0
84
+ };
85
+ function b(e, { exceptions: t, when: n } = {}) {
86
+ let r = n;
87
+ return t ||= [], e.map((e) => e.match(/\|\d+$/) || t.includes(e) ? e : r(e) ? `${e}|0` : e);
88
+ }
89
+ return {
90
+ name: "SQL",
91
+ case_insensitive: !0,
92
+ illegal: /[{}]|<\//,
93
+ keywords: {
94
+ $pattern: /\b[\w\.]+/,
95
+ keyword: b(m, { when: (e) => e.length < 3 }),
96
+ literal: a,
97
+ type: s,
98
+ built_in: d
99
+ },
100
+ contains: [
101
+ {
102
+ scope: "type",
103
+ match: v(o)
104
+ },
105
+ y,
106
+ _,
107
+ h,
108
+ r,
109
+ i,
110
+ e.C_NUMBER_MODE,
111
+ e.C_BLOCK_COMMENT_MODE,
112
+ n,
113
+ g
114
+ ]
115
+ };
116
+ }
117
+ //#endregion
118
+ //#region src/parsers/sql.js
119
+ var t = {
120
+ id: "sql",
121
+ name: "SQL",
122
+ aliases: [
123
+ "sql",
124
+ "sqlite",
125
+ "postgres",
126
+ "postgresql"
127
+ ],
128
+ grammar: e
129
+ };
130
+ //#endregion
131
+ export { t };