@kong-ui-public/documentation 0.4.13 → 0.4.15
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/arc-COsOHw50-D7E-_XLT.js +86 -0
- package/dist/{astro-D4FIwVxr-CovDYZfT.js → astro-U6b0KI4d-Bfq8RcMV.js} +1 -1
- package/dist/{blockDiagram-6b2b5046-BabM1eIl-BiFw3WJ6.js → blockDiagram-91b80b7a-BKGTNNj9-DPDwkz4t.js} +24 -24
- package/dist/{c4Diagram-b947cdbb-BBGJ9ivn-BA4nSYfd.js → c4Diagram-b2a90758-BL_2KQjG-DaGASxNN.js} +133 -132
- package/dist/channel-ByAWxImn-f765KETj.js +5 -0
- package/dist/{classDiagram-35230388-CRYNduH8-CLsxllrW.js → classDiagram-30eddba6-k40qxgte-CyhC7xkz.js} +8 -7
- package/dist/{classDiagram-v2-412acd34-5HbyJrnL-DB1xO44x.js → classDiagram-v2-f2df5561-Bhszhjj1-C4F9RBij.js} +7 -7
- package/dist/{clone-BoeTe_OS-CQarmEZE.js → clone-B9jLUWz8-1hK-sDX-.js} +1 -1
- package/dist/{createText-423428c9-Q0HfccbL-Bwaom8lh.js → createText-6b48ae7d-CwDinsnJ-CAWP3GNM.js} +2 -1
- package/dist/documentation.es.js +5 -5
- package/dist/documentation.umd.js +991 -720
- package/dist/{edges-d417c7a0-DEJA2PwU-BX5bd8a1.js → edges-d32062c0-D81gGEnb-BSSWdCZc.js} +28 -27
- package/dist/{erDiagram-0ea73325-C3DQ6B1e-GwhT3lGQ.js → erDiagram-47591fe2-Ct0H1qRr-_AGdmUQQ.js} +38 -38
- package/dist/{flowDb-d35e309a-RvFFqjek-t_Dexseh.js → flowDb-4b19a42f-DUQIsrJ6-DCwHR8f-.js} +45 -45
- package/dist/{flowDiagram-d949d7c1-Boa20b_n-CJ3aILFD.js → flowDiagram-5540d9b9-lDK0hXfd-Bdkj8eFj.js} +317 -309
- package/dist/{flowDiagram-v2-49332944-BJtijxhz-Cgd4t08U.js → flowDiagram-v2-3b53844e-C-MZcHj1-D__kxFEB.js} +5 -5
- package/dist/{flowchart-elk-definition-27cc417a-BBD3LS9k-Bb9_HTfE.js → flowchart-elk-definition-5fe447d6-Cl1YzK8W-CId-TpNq.js} +10626 -10624
- package/dist/{ganttDiagram-5c869e3b-CRDFjzTp-lNK9bq-O.js → ganttDiagram-9a3bba1f-DgegevHg-DZ_QmRCe.js} +488 -477
- package/dist/{git-rebase-sR-yVH_J-D5M2oE9O.js → git-rebase-B7sc3yJp-BPxHM_r2.js} +1 -1
- package/dist/gitGraphDiagram-96e6b4ee-B544kZVD-qe2_EQ9q.js +1264 -0
- package/dist/{graph-BIq67vWs-Bc3nX8P0.js → graph-nSQNMZNt-mH_8BQHy.js} +64 -64
- package/dist/{haml-BT5dFrjs-CmYUmNQ_.js → haml-DsuMo-J7-DWhF2QrW.js} +1 -1
- package/dist/{http-DSIFYUfg-BZm1KGvb.js → http-ClrjZLFz-gNFfL9hE.js} +1 -1
- package/dist/{index-Bh6WVkCI.js → index-D5pPsg1E.js} +2826 -2744
- package/dist/{index-8fae9850-CaUboB89-B0nma_3r.js → index-fc10efb0-BQFKNTyl-JVOq35xY.js} +11 -11
- package/dist/{infoDiagram-db7b18fc-DKsewKnu-CWVarnHo.js → infoDiagram-bcd20f53-DA00HiLo-BGr4Dz2T.js} +12 -12
- package/dist/{journeyDiagram-d5636530-ClddNDmR-ywsNZNTr.js → journeyDiagram-4fe6b3dc-Dy2VexAM-NIeKHdta.js} +42 -42
- package/dist/katex-BQC_klMa-CaeA20wX.js +11636 -0
- package/dist/{latex-QX-FNvxY-DfqkUAVR.js → latex-9g43iAzl-B3VseW3K.js} +1 -1
- package/dist/{layout-Cz0dAJah-C3YaSszT.js → layout-CsrWmvDo-DTw5CAfp.js} +132 -132
- package/dist/{line-BCVITS7s-Du1xeoK-.js → line-_Hv2N8bu-DmtYY3xM.js} +1 -1
- package/dist/{linear-CLHAbj67-1tzRLAFO.js → linear-Bq62Qb31-CO-Jqi9k.js} +35 -35
- package/dist/{mindmap-definition-377f8f1f-BwEJ-DVg-DeBewnKQ.js → mindmap-definition-f354de21-6GdeE-da-DM2y_OOl.js} +6647 -6414
- package/dist/{pieDiagram-b0208e96-Cyz2Kcfu-B1Q8dscS.js → pieDiagram-79897490--sueuFsN-DtjjX42X.js} +68 -68
- package/dist/{quadrantDiagram-0332be45-CDMkEQj0-D0ioHd_P.js → quadrantDiagram-62f64e94-B45V10Ws-Ndfd04fG.js} +2 -2
- package/dist/{requirementDiagram-bf7890df-Jk3SQ-Q1-BB9UHuUh.js → requirementDiagram-05bf5f74-DKrzFj3--D6oca5bf.js} +30 -30
- package/dist/{rst-Bm1i8IkK-C9EaDq6g.js → rst-iTJmEY_6-AgWIzPqn.js} +2 -2
- package/dist/{ruby-CZZKXaz8-BxaDEkRP.js → ruby-3Bt2I2On--AixRnjJ.js} +1 -1
- package/dist/{sankeyDiagram-0acdec17-BJuIUJd_-Ce7q-NNk.js → sankeyDiagram-97764748-Cal39XvH-BOP-mysV.js} +22 -22
- package/dist/{sequenceDiagram-c18d009d-B4IxGCEM-DgvEmabG.js → sequenceDiagram-acc0e65c-C7SBKcFC-x6hQBmQa.js} +917 -884
- package/dist/shellscript-DQ1J75ow-DQ1J75ow.js +7 -0
- package/dist/{shellsession-BIPXtZci-D6avbCwN.js → shellsession-btSM7PAE-lMmUmCMx.js} +1 -1
- package/dist/{stateDiagram-43596fc0-0xEMkbt_-jFUk_xdU.js → stateDiagram-0ff1cf1a-CeTkJw-0-ClBBBO40.js} +5 -5
- package/dist/{stateDiagram-v2-2ead4f9c-DS4afpcC-jDCqPtGk.js → stateDiagram-v2-9a9d610d-B6v4YFRe-CKL2DHOu.js} +12 -12
- package/dist/{styles-7383a064-C7WyH3qz-B1ftH-y8.js → styles-3ed67cfa-BKhmbt4H-1C0K2oHO.js} +140 -137
- package/dist/{styles-6860f46c-ZdhsT5S9-Du_QdneE.js → styles-991ebdfc-D52vcIGN-z8Dw_NvD.js} +19 -19
- package/dist/{styles-b2c874b6-BFg-Nblp-B0z_umAE.js → styles-d20c7d72-0tQ-upPv-BfgJ1gvQ.js} +24 -24
- package/dist/{svgDrawCommon-0ee1b4e9-CpOZq9bS-BwyJFwu6.js → svgDrawCommon-5ccd53ef-CUtig_WQ-BXE0zXmR.js} +4 -4
- package/dist/{timeline-definition-d977decf-BqZwyTB6-qFhObMdA.js → timeline-definition-fea2a41d-DMC1sAGv-CgGK3eeA.js} +2 -2
- package/dist/{twig-B_Gr-ODl-Cl9Q0GWo.js → twig-Dcp9VbaI-FN48_KCA.js} +1 -1
- package/dist/{xychartDiagram-e50adddc-C1fuuOEQ-DHvZ99O1.js → xychartDiagram-ab372869-BsavOqc0-Cni7765l.js} +30 -30
- package/package.json +4 -4
- package/dist/arc-C2t0ExPw-DLpexKUK.js +0 -86
- package/dist/channel-DXyvEer2-Do9TwFFf.js +0 -5
- package/dist/gitGraphDiagram-b9d81de9-D1rNIGL0-DDkwKLsk.js +0 -1262
- package/dist/shellscript-CUUTQKn5-CUUTQKn5.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const e = Object.freeze({ displayName: "Shell", name: "shellscript", patterns: [{ include: "#initial_context" }], repository: { alias_statement: { begin: "(?:(alias)(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*))(?:(?:[ \\t]*+)(?:(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*)))?)(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?))(?:(?:(\\=)|(\\+\\=))|(\\-\\=))))", beginCaptures: { 1: { name: "storage.type.alias.shell" }, 2: { patterns: [{ match: "(?<!\\w)-\\w+\\b", name: "string.unquoted.argument.shell constant.other.option.shell" }] }, 3: { name: "string.unquoted.argument.shell constant.other.option.shell" }, 4: { name: "storage.modifier.$4.shell" }, 5: { patterns: [{ match: "(?<!\\w)-\\w+\\b", name: "string.unquoted.argument.shell constant.other.option.shell" }] }, 6: { name: "string.unquoted.argument.shell constant.other.option.shell" }, 7: { name: "variable.other.assignment.shell" }, 8: { name: "punctuation.definition.array.access.shell" }, 9: { name: "variable.other.assignment.shell" }, 10: { name: "constant.numeric.shell constant.numeric.integer.shell" }, 11: { name: "punctuation.definition.array.access.shell" }, 12: { name: "keyword.operator.assignment.shell" }, 13: { name: "keyword.operator.assignment.compound.shell" }, 14: { name: "keyword.operator.assignment.compound.shell" } }, end: "(?:(?= |\\t|$)|(?:(?:(?:(;)|(&&))|(\\|\\|))|(&)))", endCaptures: { 1: { name: "punctuation.terminator.statement.semicolon.shell" }, 2: { name: "punctuation.separator.statement.and.shell" }, 3: { name: "punctuation.separator.statement.or.shell" }, 4: { name: "punctuation.separator.statement.background.shell" } }, name: "meta.expression.assignment.shell", patterns: [{ include: "#normal_statement_context" }] }, argument: { begin: "(?:[ \\t]++)(?!(?:&|\\||\\(|\\[|#|\\n|$|;))", beginCaptures: {}, end: "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", endCaptures: {}, name: "meta.argument.shell", patterns: [{ include: "#argument_context" }, { include: "#line_continuation" }] }, argument_context: { patterns: [{ captures: { 1: { name: "string.unquoted.argument.shell", patterns: [{ match: "\\*", name: "variable.language.special.wildcard.shell" }, { include: "#variable" }, { include: "#numeric_literal" }, { captures: { 1: { name: "constant.language.$1.shell" } }, match: "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, match: "(?:[ \\t]*+)((?:[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+)(?!>))" }, { include: "#normal_statement_context" }] }, array_value: { begin: "(?:[ \\t]*+)(?:(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*)))?)(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?))(?:(?:(\\=)|(\\+\\=))|(\\-\\=))(?:[ \\t]*+)(\\()", beginCaptures: { 1: { name: "storage.modifier.$1.shell" }, 2: { patterns: [{ match: "(?<!\\w)-\\w+\\b", name: "string.unquoted.argument.shell constant.other.option.shell" }] }, 3: { name: "string.unquoted.argument.shell constant.other.option.shell" }, 4: { name: "variable.other.assignment.shell" }, 5: { name: "punctuation.definition.array.access.shell" }, 6: { name: "variable.other.assignment.shell" }, 7: { name: "constant.numeric.shell constant.numeric.integer.shell" }, 8: { name: "punctuation.definition.array.access.shell" }, 9: { name: "keyword.operator.assignment.shell" }, 10: { name: "keyword.operator.assignment.compound.shell" }, 11: { name: "keyword.operator.assignment.compound.shell" }, 12: { name: "punctuation.definition.array.shell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.array.shell" } }, patterns: [{ include: "#comment" }, { captures: { 1: { name: "punctuation.definition.bracket.shell" }, 2: { name: "string.unquoted.shell entity.other.attribute-name.shell" }, 3: { name: "punctuation.definition.bracket.shell" }, 4: { name: "punctuation.definition.assignment.shell" } }, match: "(?:(\\[)(.+?)(\\])(\\=))" }, { include: "#normal_statement_context" }, { include: "#simple_unquoted" }] }, assignment: { patterns: [{ include: "#array_value" }, { begin: "(?:[ \\t]*+)(?:(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*)))?)(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?))(?:(?:(\\=)|(\\+\\=))|(\\-\\=))", beginCaptures: { 1: { name: "storage.modifier.$1.shell" }, 2: { patterns: [{ match: "(?<!\\w)-\\w+\\b", name: "string.unquoted.argument.shell constant.other.option.shell" }] }, 3: { name: "string.unquoted.argument.shell constant.other.option.shell" }, 4: { name: "variable.other.assignment.shell" }, 5: { name: "punctuation.definition.array.access.shell" }, 6: { name: "variable.other.assignment.shell" }, 7: { name: "constant.numeric.shell constant.numeric.integer.shell" }, 8: { name: "punctuation.definition.array.access.shell" }, 9: { name: "keyword.operator.assignment.shell" }, 10: { name: "keyword.operator.assignment.compound.shell" }, 11: { name: "keyword.operator.assignment.compound.shell" } }, end: "(?:(?= |\\t|$)|(?:(?:(?:(;)|(&&))|(\\|\\|))|(&)))", endCaptures: { 1: { name: "punctuation.terminator.statement.semicolon.shell" }, 2: { name: "punctuation.separator.statement.and.shell" }, 3: { name: "punctuation.separator.statement.or.shell" }, 4: { name: "punctuation.separator.statement.background.shell" } }, name: "meta.expression.assignment.shell", patterns: [{ include: "#comment" }, { include: "#argument_context" }] }] }, basic_command_name: { captures: { 1: { name: "storage.modifier.$1.shell" }, 2: { name: "entity.name.function.call.shell entity.name.command.shell", patterns: [{ match: "(?<!\\w)(?:continue|return|break)(?!\\w)", name: "keyword.control.$0.shell" }, { match: "(?<!\\w)(?:(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/))(?!\\w)", name: "support.function.builtin.shell" }, { include: "#variable" }] } }, match: `(?:(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/)))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!"|'|\\\\\\n?$)(?:[^!'" \\t\\n\\r]+?)))(?:(?= |\\t)|(?:(?=;|\\||&|\\n|\\)|\\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))))`, name: "meta.statement.command.name.basic.shell" }, block_comment: { begin: "(?:(?:\\s*+)(\\/\\*))", beginCaptures: { 1: { name: "punctuation.definition.comment.begin.shell" } }, end: "\\*\\/", endCaptures: { 0: { name: "punctuation.definition.comment.end.shell" } }, name: "comment.block.shell" }, boolean: { match: "\\b(?:true|false)\\b", name: "constant.language.$0.shell" }, case_statement: { begin: "(?:(\\bcase\\b)(?:[ \\t]*+)(.+)(?:[ \\t]*+)(\\bin\\b))", beginCaptures: { 1: { name: "keyword.control.case.shell" }, 2: { patterns: [{ include: "#initial_context" }] }, 3: { name: "keyword.control.in.shell" } }, end: "\\besac\\b", endCaptures: { 0: { name: "keyword.control.esac.shell" } }, name: "meta.case.shell", patterns: [{ include: "#comment" }, { captures: { 1: { name: "keyword.operator.pattern.case.default.shell" } }, match: "(?:[ \\t]*+)(\\* *\\))" }, { begin: "(?<!\\))(?!(?:[ \\t]*+)(?:esac\\b|$))", beginCaptures: {}, end: "(?:(?=\\besac\\b)|(\\)))", endCaptures: { 1: { name: "keyword.operator.pattern.case.shell" } }, name: "meta.case.entry.pattern.shell", patterns: [{ include: "#case_statement_context" }] }, { begin: "(?<=\\))", beginCaptures: {}, end: "(?:(;;)|(?=\\besac\\b))", endCaptures: { 1: { name: "punctuation.terminator.statement.case.shell" } }, name: "meta.case.entry.body.shell", patterns: [{ include: "#normal_statement_inner" }, { include: "#initial_context" }] }] }, case_statement_context: { patterns: [{ match: "\\*", name: "variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell" }, { match: "\\+", name: "variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell" }, { match: "\\?", name: "variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell" }, { match: "@", name: "variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell" }, { match: "\\|", name: "keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell" }, { begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.group.shell punctuation.definition.regex.group.shell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.group.shell punctuation.definition.regex.group.shell" } }, name: "meta.parenthese.shell", patterns: [{ include: "#case_statement_context" }] }, { begin: "\\[", beginCaptures: { 0: { name: "punctuation.definition.character-class.shell" } }, end: "\\]", endCaptures: { 0: { name: "punctuation.definition.character-class.shell" } }, name: "string.regexp.character-class.shell", patterns: [{ match: "\\\\.", name: "constant.character.escape.shell" }] }, { include: "#string" }, { match: "[^) \\t\\n\\[\\?\\*\\|\\@]", name: "string.unquoted.pattern.shell string.regexp.unquoted.shell" }] }, comment: { captures: { 1: { name: "comment.line.number-sign.shell meta.shebang.shell" }, 2: { name: "punctuation.definition.comment.shebang.shell" }, 3: { name: "comment.line.number-sign.shell" }, 4: { name: "punctuation.definition.comment.shell" } }, match: "(?:(?:^|(?:[ \\t]++))(?:((?:(#!)(?:.*)))|((?:(#)(?:.*)))))" }, comments: { patterns: [{ include: "#block_comment" }, { include: "#line_comment" }] }, "compound-command": { patterns: [{ begin: "\\[{1,2}", beginCaptures: { 0: { name: "punctuation.definition.logical-expression.shell" } }, end: "\\]{1,2}", endCaptures: { 0: { name: "punctuation.definition.logical-expression.shell" } }, name: "meta.scope.logical-expression.shell", patterns: [{ include: "#logical-expression" }, { include: "#initial_context" }] }, { captures: { 1: { name: "punctuation.definition.evaluation.arithmetic.begin.shell" }, 2: { name: "string.other.math.shell", patterns: [{ include: "#math" }] }, 3: { name: "punctuation.definition.evaluation.arithmetic.end.shell" } }, match: "(\\$\\({2})(.+)(\\)\\s*\\))" }, { begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.subshell.shell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.subshell.shell" } }, name: "meta.scope.subshell.shell", patterns: [{ include: "#initial_context" }] }, { begin: "(?<=\\s|^){(?=\\s|$)", beginCaptures: { 0: { name: "punctuation.definition.group.shell" } }, end: "(?<=^|;)\\s*(})", endCaptures: { 1: { name: "punctuation.definition.group.shell" } }, name: "meta.scope.group.shell", patterns: [{ include: "#initial_context" }] }] }, continuation_of_double_quoted_command_name: { begin: '(?:\\G(?<="))', beginCaptures: {}, contentName: "meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command", end: '"', endCaptures: { 0: { name: "string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" } }, patterns: [{ match: '\\\\[\\$\\n`"\\\\]', name: "constant.character.escape.shell" }, { include: "#variable" }, { include: "#interpolation" }] }, continuation_of_single_quoted_command_name: { begin: "(?:\\G(?<='))", beginCaptures: {}, contentName: "meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command", end: "'", endCaptures: { 0: { name: "string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" } } }, custom_command_names: { patterns: [] }, custom_commands: { patterns: [] }, double_quote_context: { patterns: [{ match: '\\\\[\\$`"\\\\\\n]', name: "constant.character.escape.shell" }, { include: "#variable" }, { include: "#interpolation" }] }, double_quote_escape_char: { match: '\\\\[\\$`"\\\\\\n]', name: "constant.character.escape.shell" }, function_definition: { applyEndPatternLast: 1, begin: `(?:[ \\t]*+)(?:(?:(\\bfunction\\b)(?:[ \\t]*+)([^ \\t\\n\\r\\(\\)="']+)(?:(?:(\\()(?:[ \\t]*+)(\\)))?))|(?:([^ \\t\\n\\r\\(\\)="']+)(?:[ \\t]*+)(\\()(?:[ \\t]*+)(\\))))`, beginCaptures: { 1: { name: "storage.type.function.shell" }, 2: { name: "entity.name.function.shell" }, 3: { name: "punctuation.definition.arguments.shell" }, 4: { name: "punctuation.definition.arguments.shell" }, 5: { name: "entity.name.function.shell" }, 6: { name: "punctuation.definition.arguments.shell" }, 7: { name: "punctuation.definition.arguments.shell" } }, end: "(?<=\\}|\\))", endCaptures: {}, name: "meta.function.shell", patterns: [{ match: "(?:\\G(?:\\t| |\\n))" }, { begin: "\\{", beginCaptures: { 0: { name: "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, end: "\\}", endCaptures: { 0: { name: "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, name: "meta.function.body.shell", patterns: [{ include: "#initial_context" }] }, { begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, name: "meta.function.body.shell", patterns: [{ include: "#initial_context" }] }, { include: "#initial_context" }] }, heredoc: { patterns: [{ begin: `(?:((?<!<)(?:<<-))(?:[ \\t]*+)("|')(?:[ \\t]*+)([^"']+?)(?=\\s|;|&|<|"|')(?:\\2)(.*))`, beginCaptures: { 1: { name: "keyword.operator.heredoc.shell" }, 2: {}, 3: { name: "punctuation.definition.string.heredoc.shell" }, 4: { patterns: [{ include: "#redirect_fix" }, { include: "#normal_statement_inner" }] } }, contentName: "string.quoted.heredoc.indent", end: "(?:(?:^\\t*)(?:\\3)(?=\\s|;|&|$))", endCaptures: { 0: { name: "punctuation.definition.string.heredoc.shell" } }, patterns: [] }, { begin: `(?:((?<!<)(?:<<)(?!<))(?:[ \\t]*+)("|')(?:[ \\t]*+)([^"']+?)(?=\\s|;|&|<|"|')(?:\\2)(.*))`, beginCaptures: { 1: { name: "keyword.operator.heredoc.shell" }, 2: {}, 3: { name: "punctuation.definition.string.heredoc.shell" }, 4: { patterns: [{ include: "#redirect_fix" }, { include: "#normal_statement_inner" }] } }, contentName: "string.quoted.heredoc.no-indent", end: "(?:^(?:\\3)(?=\\s|;|&|$))", endCaptures: { 0: { name: "punctuation.definition.string.heredoc.shell" } }, patterns: [] }, { begin: `(?:((?<!<)(?:<<-))(?:[ \\t]*+)([^"' \\t]+)(?=\\s|;|&|<|"|')(.*))`, beginCaptures: { 1: { name: "keyword.operator.heredoc.shell" }, 2: { name: "punctuation.definition.string.heredoc.shell" }, 3: { patterns: [{ include: "#redirect_fix" }, { include: "#normal_statement_inner" }] } }, contentName: "string.unquoted.heredoc.indent", end: "(?:(?:^\\t*)(?:\\2)(?=\\s|;|&|$))", endCaptures: { 0: { name: "punctuation.definition.string.heredoc.shell" } }, patterns: [{ include: "#double_quote_escape_char" }, { include: "#variable" }, { include: "#interpolation" }] }, { begin: `(?:((?<!<)(?:<<)(?!<))(?:[ \\t]*+)([^"' \\t]+)(?=\\s|;|&|<|"|')(.*))`, beginCaptures: { 1: { name: "keyword.operator.heredoc.shell" }, 2: { name: "punctuation.definition.string.heredoc.shell" }, 3: { patterns: [{ include: "#redirect_fix" }, { include: "#normal_statement_inner" }] } }, contentName: "string.unquoted.heredoc.no-indent", end: "(?:^(?:\\2)(?=\\s|;|&|$))", endCaptures: { 0: { name: "punctuation.definition.string.heredoc.shell" } }, patterns: [{ include: "#double_quote_escape_char" }, { include: "#variable" }, { include: "#interpolation" }] }] }, herestring: { patterns: [{ begin: "(<<<)\\s*(('))", beginCaptures: { 1: { name: "keyword.operator.herestring.shell" }, 2: { name: "string.quoted.single.shell" }, 3: { name: "punctuation.definition.string.begin.shell" } }, contentName: "string.quoted.single.shell", end: "(')", endCaptures: { 0: { name: "string.quoted.single.shell" }, 1: { name: "punctuation.definition.string.end.shell" } }, name: "meta.herestring.shell" }, { begin: '(<<<)\\s*(("))', beginCaptures: { 1: { name: "keyword.operator.herestring.shell" }, 2: { name: "string.quoted.double.shell" }, 3: { name: "punctuation.definition.string.begin.shell" } }, contentName: "string.quoted.double.shell", end: '(")', endCaptures: { 0: { name: "string.quoted.double.shell" }, 1: { name: "punctuation.definition.string.end.shell" } }, name: "meta.herestring.shell", patterns: [{ include: "#double_quote_context" }] }, { captures: { 1: { name: "keyword.operator.herestring.shell" }, 2: { name: "string.unquoted.herestring.shell", patterns: [{ include: "#initial_context" }] } }, match: "(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)", name: "meta.herestring.shell" }] }, initial_context: { patterns: [{ include: "#comment" }, { include: "#pipeline" }, { include: "#normal_statement_seperator" }, { include: "#logical_expression_double" }, { include: "#logical_expression_single" }, { include: "#keyword_var_statement" }, { include: "#case_statement" }, { include: "#misc_ranges" }, { include: "#loop" }, { include: "#function_definition" }, { include: "#variable" }, { include: "#interpolation" }, { include: "#heredoc" }, { include: "#herestring" }, { include: "#redirection" }, { include: "#pathname" }, { include: "#keyword" }, { include: "#alias_statement" }, { include: "#normal_statement" }, { include: "#string" }, { include: "#support" }] }, inline_comment: { captures: { 1: { name: "comment.block.shell punctuation.definition.comment.begin.shell" }, 2: { name: "comment.block.shell" }, 3: { patterns: [{ match: "\\*\\/", name: "comment.block.shell punctuation.definition.comment.end.shell" }, { match: "\\*", name: "comment.block.shell" }] } }, match: "(\\/\\*)((?:(?:[^\\*]|(?:(?:\\*++)[^\\/]))*+)((?:(?:\\*++)\\/)))" }, interpolation: { patterns: [{ captures: { 1: { name: "punctuation.definition.evaluation.arithmetic.begin.shell" }, 2: { name: "string.other.math.shell", patterns: [{ include: "#math" }] }, 3: { name: "punctuation.definition.evaluation.arithmetic.end.shell" } }, match: "(\\$\\({2})(.+)(\\)\\s*\\))" }, { begin: "`", beginCaptures: { 0: { name: "punctuation.definition.evaluation.backticks.shell" } }, end: "`", endCaptures: { 0: { name: "punctuation.definition.evaluation.backticks.shell" } }, name: "string.interpolated.backtick.shell", patterns: [{ match: "\\\\[`\\\\$]", name: "constant.character.escape.shell" }, { begin: "(?<=\\W)(?=#)(?!#{)", beginCaptures: { 1: { name: "punctuation.whitespace.comment.leading.shell" } }, end: "(?!\\G)", patterns: [{ begin: "#", beginCaptures: { 0: { name: "punctuation.definition.comment.shell" } }, end: "(?=`)", name: "comment.line.number-sign.shell" }] }, { include: "#initial_context" }] }, { begin: "\\$\\(", beginCaptures: { 0: { name: "punctuation.definition.evaluation.parens.begin.shell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.evaluation.parens.end.shell" } }, name: "string.interpolated.dollar.shell", patterns: [{ include: "#initial_context" }] }] }, keyword: { patterns: [{ match: "(?<=^|;|&| |\\t)(?:continue|foreach|return|select|repeat|break|until|while|case|done|elif|else|esac|then|for|end|do|if|fi|in)(?= |\\t|;|&|$)", name: "keyword.control.$0.shell" }] }, keyword_var_statement: { begin: "(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)", beginCaptures: { 0: { name: "storage.modifier.$0.shell" } }, end: "\\n", endCaptures: {}, name: "meta.statement.shell meta.expression.assignment.shell", patterns: [{ match: "(?<!\\w)-\\w+\\b", name: "string.unquoted.argument.shell constant.other.option.shell" }, { include: "#array_value" }, { captures: { 1: { name: "variable.other.assignment.shell" }, 2: { name: "punctuation.definition.array.access.shell" }, 3: { name: "variable.other.assignment.shell" }, 4: { name: "constant.numeric.shell constant.numeric.integer.shell" }, 5: { name: "punctuation.definition.array.access.shell" }, 6: { name: "keyword.operator.assignment.shell" }, 7: { name: "keyword.operator.assignment.compound.shell" }, 8: { name: "keyword.operator.assignment.compound.shell" }, 9: { name: "constant.numeric.shell constant.numeric.hex.shell" }, 10: { name: "constant.numeric.shell constant.numeric.octal.shell" }, 11: { name: "constant.numeric.shell constant.numeric.other.shell" }, 12: { name: "constant.numeric.shell constant.numeric.decimal.shell" }, 13: { name: "constant.numeric.shell constant.numeric.version.shell" }, 14: { name: "constant.numeric.shell constant.numeric.integer.shell" } }, match: "(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?)(?:(?:(?:(\\=)|(\\+\\=))|(\\-\\=))?)(?:(?:(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+(?:\\.\\d+)))|(-?\\d+(?:\\.\\d+)+))|(-?\\d+))(?= |\\t|$|\\}|\\)|;))?))" }, { include: "#normal_statement_context" }] }, line_comment: { begin: "(?:\\s*+)(\\/\\/)", beginCaptures: { 1: { name: "punctuation.definition.comment.shell" } }, end: "(?<=\\n)(?<!\\\\\\n)", endCaptures: {}, name: "comment.line.double-slash.shell", patterns: [{ include: "#line_continuation_character" }] }, line_continuation: { match: "\\\\(?=\\n)", name: "constant.character.escape.line-continuation.shell" }, "logical-expression": { patterns: [{ comment: "do we want a special rule for ( expr )?", match: "=[=~]?|!=?|<|>|&&|\\|\\|", name: "keyword.operator.logical.shell" }, { match: "(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\\b", name: "keyword.operator.logical.shell" }] }, logical_expression_context: { patterns: [{ include: "#regex_comparison" }, { include: "#logical-expression" }, { include: "#logical_expression_single" }, { include: "#logical_expression_double" }, { include: "#comment" }, { include: "#boolean" }, { include: "#redirect_number" }, { include: "#numeric_literal" }, { include: "#pipeline" }, { include: "#normal_statement_seperator" }, { include: "#string" }, { include: "#variable" }, { include: "#interpolation" }, { include: "#heredoc" }, { include: "#herestring" }, { include: "#pathname" }, { include: "#keyword" }, { include: "#support" }] }, logical_expression_double: { begin: "\\[\\[", beginCaptures: { 0: { name: "punctuation.definition.logical-expression.shell" } }, end: "\\]\\]", endCaptures: { 0: { name: "punctuation.definition.logical-expression.shell" } }, name: "meta.scope.logical-expression.shell", patterns: [{ include: "#logical_expression_context" }] }, logical_expression_single: { begin: "\\[", beginCaptures: { 0: { name: "punctuation.definition.logical-expression.shell" } }, end: "\\]", endCaptures: { 0: { name: "punctuation.definition.logical-expression.shell" } }, name: "meta.scope.logical-expression.shell", patterns: [{ include: "#logical_expression_context" }] }, loop: { patterns: [{ begin: "(?<=^|;|&|\\s)(for)\\s+(?=\\({2})", beginCaptures: { 1: { name: "keyword.control.shell" } }, end: "(?<=^|;|&|\\s)(?:done|(?=\\)))(?=\\s|;|&|$|\\))", endCaptures: { 0: { name: "keyword.control.shell" } }, name: "meta.scope.for-loop.shell", patterns: [{ include: "#initial_context" }] }, { begin: "(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)", beginCaptures: { 1: { name: "keyword.control.shell" }, 2: { name: "variable.other.loop.shell", patterns: [{ include: "#string" }] }, 3: { name: "keyword.control.shell" } }, end: "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", endCaptures: { 0: { name: "keyword.control.shell" } }, name: "meta.scope.for-in-loop.shell", patterns: [{ include: "#initial_context" }] }, { begin: "(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)", beginCaptures: { 1: { name: "keyword.control.shell" } }, end: "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", endCaptures: { 0: { name: "keyword.control.shell" } }, name: "meta.scope.while-loop.shell", patterns: [{ include: "#initial_context" }] }, { begin: "(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)", beginCaptures: { 1: { name: "keyword.control.shell" }, 2: { name: "variable.other.loop.shell" } }, end: "(?<=^|;|&|\\s)(done)(?=\\s|;|&|$|\\))", endCaptures: { 1: { name: "keyword.control.shell" } }, name: "meta.scope.select-block.shell", patterns: [{ include: "#initial_context" }] }, { begin: "(?<=^|;|&|\\s)if(?=\\s|;|&|$)", beginCaptures: { 0: { name: "keyword.control.shell" } }, end: "(?<=^|;|&|\\s)fi(?=\\s|;|&|$)", endCaptures: { 0: { name: "keyword.control.shell" } }, name: "meta.scope.if-block.shell", patterns: [{ include: "#initial_context" }] }] }, math: { patterns: [{ include: "#variable" }, { match: "\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=", name: "keyword.operator.arithmetic.shell" }, { match: "0[xX][0-9A-Fa-f]+", name: "constant.numeric.hex.shell" }, { match: "0\\d+", name: "constant.numeric.octal.shell" }, { match: "\\d{1,2}#[0-9a-zA-Z@_]+", name: "constant.numeric.other.shell" }, { match: "\\d+", name: "constant.numeric.integer.shell" }, { match: "(?<!\\w)(?:[a-zA-Z_0-9]+)(?!\\w)", name: "variable.other.normal.shell" }] }, misc_ranges: { patterns: [{ include: "#logical_expression_single" }, { include: "#logical_expression_double" }, { begin: "\\(\\(", beginCaptures: { 0: { name: "punctuation.section.arithmetic.shell" } }, end: "\\)\\)", endCaptures: { 0: { name: "punctuation.section.arithmetic.shell" } }, name: "meta.arithmetic.shell", patterns: [{ include: "#math" }] }, { begin: "(?<!=)\\(", beginCaptures: { 0: { name: "punctuation.definition.subshell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.subshell" } }, name: "meta.scope.subshell", patterns: [{ include: "#initial_context" }] }, { begin: "(?<![^ \\t])({)", beginCaptures: { 1: { name: "punctuation.definition.group.shell" } }, end: "}", endCaptures: { 0: { name: "punctuation.definition.group.shell" } }, name: "meta.scope.group.shell", patterns: [{ include: "#initial_context" }] }] }, modifiers: { match: "(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)", name: "storage.modifier.$0.shell" }, normal_statement: { begin: "(?:(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|;|\\||&|!|\\(|\\{|\\`)))(?:[ \\t]*+)(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$))", beginCaptures: {}, end: "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", endCaptures: {}, name: "meta.statement.shell", patterns: [{ include: "#normal_statement_inner" }] }, normal_statement_context: { patterns: [{ include: "#comment" }, { include: "#pipeline" }, { include: "#normal_statement_seperator" }, { include: "#misc_ranges" }, { include: "#boolean" }, { include: "#redirect_number" }, { include: "#numeric_literal" }, { include: "#string" }, { include: "#variable" }, { include: "#interpolation" }, { include: "#heredoc" }, { include: "#herestring" }, { include: "#redirection" }, { include: "#pathname" }, { include: "#keyword" }, { include: "#support" }] }, normal_statement_inner: { patterns: [{ include: "#keyword_var_statement" }, { include: "#case_statement" }, { include: "#function_definition" }, { include: "#assignment" }, { begin: "(?:(?:[ \\t]*+)(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)))", beginCaptures: {}, end: "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", endCaptures: {}, name: "meta.statement.command.shell", patterns: [{ begin: "\\G", beginCaptures: {}, end: "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", endCaptures: {}, name: "meta.statement.command.name.shell", patterns: [{ include: "#modifiers" }, { match: "(?<!\\w)(?:continue|return|break)(?!\\w)", name: "entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell" }, { match: "(?<!\\w)(?:(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/))(?!\\w)", name: "entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell" }, { include: "#variable" }, { captures: { 1: { name: "entity.name.function.call.shell entity.name.command.shell" } }, match: `(?:(?<=\\G|'|"|\\}|\\))([^ \\n\\t\\r"'=;&\\|\`\\)\\{]+))` }, { begin: `(?:(?:\\G|(?<! |\\t|;|\\||&|\\n|\\{|#))(?:(\\$?)((?:(")|(')))))`, beginCaptures: { 1: { name: "meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell" }, 2: {}, 3: { name: "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, 4: { name: "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" } }, end: "(?<!\\G)(?<=(?:\\2))", endCaptures: {}, patterns: [{ include: "#continuation_of_single_quoted_command_name" }, { include: "#continuation_of_double_quoted_command_name" }] }, { include: "#line_continuation" }] }, { include: "#line_continuation" }, { include: "#option" }, { include: "#argument" }, { include: "#string" }] }, { include: "#line_continuation" }, { include: "#normal_statement_context" }] }, normal_statement_seperator: { captures: { 1: { name: "punctuation.terminator.statement.semicolon.shell" }, 2: { name: "punctuation.separator.statement.and.shell" }, 3: { name: "punctuation.separator.statement.or.shell" }, 4: { name: "punctuation.separator.statement.background.shell" } }, match: "(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))" }, numeric_literal: { captures: { 1: { name: "constant.numeric.shell constant.numeric.hex.shell" }, 2: { name: "constant.numeric.shell constant.numeric.octal.shell" }, 3: { name: "constant.numeric.shell constant.numeric.other.shell" }, 4: { name: "constant.numeric.shell constant.numeric.decimal.shell" }, 5: { name: "constant.numeric.shell constant.numeric.version.shell" }, 6: { name: "constant.numeric.shell constant.numeric.integer.shell" } }, match: "(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+(?:\\.\\d+)))|(-?\\d+(?:\\.\\d+)+))|(-?\\d+))(?= |\\t|$|\\}|\\)|;)" }, option: { begin: "(?:(?:[ \\t]++)(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))))", beginCaptures: { 1: { name: "string.unquoted.argument.shell constant.other.option.dash.shell" }, 2: { name: "string.unquoted.argument.shell constant.other.option.shell" } }, contentName: "string.unquoted.argument constant.other.option", end: "(?:(?=[ \\t])|(?:(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)))", endCaptures: {}, patterns: [{ include: "#option_context" }] }, option_context: { patterns: [{ include: "#misc_ranges" }, { include: "#string" }, { include: "#variable" }, { include: "#interpolation" }, { include: "#heredoc" }, { include: "#herestring" }, { include: "#redirection" }, { include: "#pathname" }, { include: "#keyword" }, { include: "#support" }] }, pathname: { patterns: [{ match: "(?<=\\s|:|=|^)~", name: "keyword.operator.tilde.shell" }, { match: "\\*|\\?", name: "keyword.operator.glob.shell" }, { begin: "([?*+@!])(\\()", beginCaptures: { 1: { name: "keyword.operator.extglob.shell" }, 2: { name: "punctuation.definition.extglob.shell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.extglob.shell" } }, name: "meta.structure.extglob.shell", patterns: [{ include: "#initial_context" }] }] }, pipeline: { patterns: [{ match: "(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)", name: "keyword.other.shell" }, { match: "[|!]", name: "keyword.operator.pipe.shell" }] }, redirect_fix: { captures: { 1: { name: "keyword.operator.redirect.shell" }, 2: { name: "string.unquoted.argument.shell" } }, match: "(?:(>>?)(?:[ \\t]*+)([^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+))" }, redirect_number: { captures: { 1: { name: "keyword.operator.redirect.stdout.shell" }, 2: { name: "keyword.operator.redirect.stderr.shell" }, 3: { name: "keyword.operator.redirect.$3.shell" } }, match: "(?<=[ \\t])(?:(?:(1)|(2)|(\\d+))(?=>))" }, redirection: { patterns: [{ begin: "[><]\\(", beginCaptures: { 0: { name: "punctuation.definition.string.begin.shell" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.string.end.shell" } }, name: "string.interpolated.process-substitution.shell", patterns: [{ include: "#initial_context" }] }, { match: "(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])", name: "keyword.operator.redirect.shell" }] }, regex_comparison: { match: "\\=~", name: "keyword.operator.logical.regex.shell" }, regexp: { patterns: [{ match: "(?:.+)" }] }, simple_options: { captures: { 0: { patterns: [{ captures: { 1: { name: "string.unquoted.argument.shell constant.other.option.dash.shell" }, 2: { name: "string.unquoted.argument.shell constant.other.option.shell" } }, match: "(?:[ \\t]++)(\\-)(\\w+)" }] } }, match: "(?:(?:[ \\t]++)\\-(?:\\w+))*" }, simple_unquoted: { match: "[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]", name: "string.unquoted.shell" }, start_of_command: { match: "(?:(?:[ \\t]*+)(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)))" }, start_of_double_quoted_command_name: { captures: { 1: { name: "entity.name.function.call.shell entity.name.command.shell", patterns: [{ match: "\\*", name: "variable.language.special.wildcard.shell" }, { include: "#variable" }, { include: "#numeric_literal" }, { captures: { 1: { name: "constant.language.$1.shell" } }, match: "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, match: '(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \\t\\n\'&;<>\\(\\)\\$`\\\\"\\|]+)(?!>)))?)(?:(?:\\$")|"))', name: "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, start_of_single_quoted_command_name: { captures: { 1: { name: "entity.name.function.call.shell entity.name.command.shell", patterns: [{ match: "\\*", name: "variable.language.special.wildcard.shell" }, { include: "#variable" }, { include: "#numeric_literal" }, { captures: { 1: { name: "constant.language.$1.shell" } }, match: "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, match: "(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+)(?!>)))?)(?:(?:\\$')|'))", name: "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, string: { patterns: [{ match: "\\\\.", name: "constant.character.escape.shell" }, { begin: "'", beginCaptures: { 0: { name: "punctuation.definition.string.begin.shell" } }, end: "'", endCaptures: { 0: { name: "punctuation.definition.string.end.shell" } }, name: "string.quoted.single.shell" }, { begin: '\\$?"', beginCaptures: { 0: { name: "punctuation.definition.string.begin.shell" } }, end: '"', endCaptures: { 0: { name: "punctuation.definition.string.end.shell" } }, name: "string.quoted.double.shell", patterns: [{ match: '\\\\[\\$\\n`"\\\\]', name: "constant.character.escape.shell" }, { include: "#variable" }, { include: "#interpolation" }] }, { begin: "\\$'", beginCaptures: { 0: { name: "punctuation.definition.string.begin.shell" } }, end: "'", endCaptures: { 0: { name: "punctuation.definition.string.end.shell" } }, name: "string.quoted.single.dollar.shell", patterns: [{ match: "\\\\(?:a|b|e|f|n|r|t|v|\\\\|')", name: "constant.character.escape.ansi-c.shell" }, { match: '\\\\[0-9]{3}"', name: "constant.character.escape.octal.shell" }, { match: '\\\\x[0-9a-fA-F]{2}"', name: "constant.character.escape.hex.shell" }, { match: '\\\\c."', name: "constant.character.escape.control-char.shell" }] }] }, support: { patterns: [{ match: "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)", name: "support.function.builtin.shell" }] }, variable: { patterns: [{ captures: { 1: { name: "punctuation.definition.variable.shell variable.parameter.positional.all.shell" }, 2: { name: "variable.parameter.positional.all.shell" } }, match: "(?:(\\$)(\\@(?!\\w)))" }, { captures: { 1: { name: "punctuation.definition.variable.shell variable.parameter.positional.shell" }, 2: { name: "variable.parameter.positional.shell" } }, match: "(?:(\\$)([0-9](?!\\w)))" }, { captures: { 1: { name: "punctuation.definition.variable.shell variable.language.special.shell" }, 2: { name: "variable.language.special.shell" } }, match: "(?:(\\$)([-*#?$!0_](?!\\w)))" }, { begin: "(?:(\\$)(\\{)(?:[ \\t]*+)(?=\\d))", beginCaptures: { 1: { name: "punctuation.definition.variable.shell variable.parameter.positional.shell" }, 2: { name: "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, contentName: "meta.parameter-expansion", end: "\\}", endCaptures: { 0: { name: "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, patterns: [{ match: "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", name: "keyword.operator.expansion.shell" }, { captures: { 1: { name: "punctuation.section.array.shell" }, 2: { name: "punctuation.section.array.shell" } }, match: "(?:(\\[)(?:[^\\]]+)(\\]))" }, { match: "[0-9]+", name: "variable.parameter.positional.shell" }, { match: "(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w)", name: "variable.other.normal.shell" }, { include: "#variable" }, { include: "#string" }] }, { begin: "(?:(\\$)(\\{))", beginCaptures: { 1: { name: "punctuation.definition.variable.shell" }, 2: { name: "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell" } }, contentName: "meta.parameter-expansion", end: "\\}", endCaptures: { 0: { name: "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell" } }, patterns: [{ match: "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", name: "keyword.operator.expansion.shell" }, { captures: { 1: { name: "punctuation.section.array.shell" }, 2: { name: "punctuation.section.array.shell" } }, match: "(?:(\\[)(?:[^\\]]+)(\\]))" }, { match: "(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w)", name: "variable.other.normal.shell" }, { include: "#variable" }, { include: "#string" }] }, { captures: { 1: { name: "punctuation.definition.variable.shell variable.other.normal.shell" }, 2: { name: "variable.other.normal.shell" } }, match: "(?:(\\$)((?:\\w+)(?!\\w)))" }] } }, scopeName: "source.shell", aliases: ["bash", "sh", "shell", "zsh"] });
|
|
2
|
+
var n = [
|
|
3
|
+
e
|
|
4
|
+
];
|
|
5
|
+
export {
|
|
6
|
+
n as default
|
|
7
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "./shellscript-
|
|
1
|
+
import e from "./shellscript-DQ1J75ow-DQ1J75ow.js";
|
|
2
2
|
const s = Object.freeze({ displayName: "Shell Session", fileTypes: ["sh-session"], name: "shellsession", patterns: [{ captures: { 1: { name: "entity.other.prompt-prefix.shell-session" }, 2: { name: "punctuation.separator.prompt.shell-session" }, 3: { name: "source.shell", patterns: [{ include: "source.shell" }] } }, match: "(?x) ^ (?: ( (?:\\(\\S+\\)\\s*)? (?: sh\\S*? | \\w+\\S+[@:]\\S+(?:\\s+\\S+)? | \\[\\S+?[@:][^\\n]+?\\].*? ) ) \\s* )? ( [>$#%❯➜] | \\p{Greek} ) \\s+ (.*) $" }, { match: "^.+$", name: "meta.output.shell-session" }], scopeName: "text.shell-session", embeddedLangs: ["shellscript"], aliases: ["console"] });
|
|
3
3
|
var l = [
|
|
4
4
|
...e,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as T, v as N, A as G } from "./styles-
|
|
2
|
-
import { c as t, h as M, l as k, i as L, j as z,
|
|
3
|
-
import { Z as U } from "./graph-
|
|
4
|
-
import { A as I } from "./layout-
|
|
5
|
-
import { P as R } from "./line-
|
|
1
|
+
import { D as T, v as N, A as G } from "./styles-d20c7d72-0tQ-upPv-BfgJ1gvQ.js";
|
|
2
|
+
import { c as t, h as M, l as k, i as L, j as z, ap as O, z as P } from "./index-D5pPsg1E.js";
|
|
3
|
+
import { Z as U } from "./graph-nSQNMZNt-mH_8BQHy.js";
|
|
4
|
+
import { A as I } from "./layout-CsrWmvDo-DTw5CAfp.js";
|
|
5
|
+
import { P as R } from "./line-_Hv2N8bu-DmtYY3xM.js";
|
|
6
6
|
const C = (e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), W = (e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), $ = (e, i) => {
|
|
7
7
|
const g = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), s = g.node().getBBox();
|
|
8
8
|
return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", s.width + 2 * t().state.padding).attr("height", s.height + 2 * t().state.padding).attr("rx", t().state.radius), g;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as U, v as I, A as Y, E as M, t as F, I as H, _ as Q, C as X } from "./styles-
|
|
2
|
-
import { Z as tt } from "./graph-
|
|
3
|
-
import { l as p, c as S, h as A,
|
|
4
|
-
import { b as ot } from "./index-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { D as U, v as I, A as Y, E as M, t as F, I as H, _ as Q, C as X } from "./styles-d20c7d72-0tQ-upPv-BfgJ1gvQ.js";
|
|
2
|
+
import { Z as tt } from "./graph-nSQNMZNt-mH_8BQHy.js";
|
|
3
|
+
import { l as p, c as S, h as A, z as et, i as st, j as B } from "./index-D5pPsg1E.js";
|
|
4
|
+
import { b as ot } from "./index-fc10efb0-BQFKNTyl-JVOq35xY.js";
|
|
5
|
+
import "./layout-CsrWmvDo-DTw5CAfp.js";
|
|
6
6
|
const w = "rect", k = "rectWithTitle", at = "start", it = "end", rt = "divider", nt = "roundedWithTitle", dt = "note", lt = "noteGroup", u = "statediagram", ct = "state", pt = `${u}-${ct}`, j = "transition", gt = "note", bt = "note-edge", ht = `${j} ${bt}`, ut = `${u}-${gt}`, yt = "cluster", ft = `${u}-${yt}`, $t = "cluster-alt", mt = `${u}-${$t}`, O = "parent", P = "note", xt = "state", E = "----", wt = `${E}${P}`, L = `${E}${O}`, W = "fill:none", G = "fill: #333", q = "c", Z = "text", J = "normal";
|
|
7
7
|
let T = {}, c = 0;
|
|
8
8
|
const Tt = function(t) {
|
|
@@ -157,20 +157,20 @@ const x = (t, a, e, i, r, n) => {
|
|
|
157
157
|
et.insertTitle(l, "statediagramTitleText", n.titleTopMargin, i.db.getDiagramTitle());
|
|
158
158
|
const $ = l.node().getBBox(), R = $.width + g * 2, V = $.height + g * 2;
|
|
159
159
|
l.attr("class", u);
|
|
160
|
-
const
|
|
160
|
+
const z = l.node().getBBox();
|
|
161
161
|
st(l, V, R, n.useMaxWidth);
|
|
162
|
-
const
|
|
163
|
-
p.debug(`viewBox ${
|
|
162
|
+
const N = `${z.x - g} ${z.y - g} ${R} ${V}`;
|
|
163
|
+
p.debug(`viewBox ${N}`), l.attr("viewBox", N);
|
|
164
164
|
const K = document.querySelectorAll('[id="' + a + '"] .edgeLabel .label');
|
|
165
165
|
for (const D of K) {
|
|
166
|
-
const
|
|
167
|
-
m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width",
|
|
166
|
+
const _ = D.getBBox(), m = document.createElementNS("http://www.w3.org/2000/svg", w);
|
|
167
|
+
m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width", _.width), m.setAttribute("height", _.height), D.insertBefore(m, D.firstChild);
|
|
168
168
|
}
|
|
169
169
|
}, vt = {
|
|
170
170
|
setConf: Tt,
|
|
171
171
|
getClasses: St,
|
|
172
172
|
draw: kt
|
|
173
|
-
},
|
|
173
|
+
}, zt = {
|
|
174
174
|
parser: U,
|
|
175
175
|
db: I,
|
|
176
176
|
renderer: vt,
|
|
@@ -180,5 +180,5 @@ const x = (t, a, e, i, r, n) => {
|
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
182
|
export {
|
|
183
|
-
|
|
183
|
+
zt as diagram
|
|
184
184
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { Z as
|
|
2
|
-
import { o as
|
|
3
|
-
import { b as
|
|
4
|
-
import { t as
|
|
5
|
-
function
|
|
6
|
-
return typeof e == "string" ? new
|
|
1
|
+
import { Z as F } from "./graph-nSQNMZNt-mH_8BQHy.js";
|
|
2
|
+
import { o as E, l as g, p as V, c as v, j as z, r as I, q as C, t as A, h as _, z as G, u as M, ah as D, ai as R, aj as Z, ak as K, al as U, K as W } from "./index-D5pPsg1E.js";
|
|
3
|
+
import { b as X } from "./index-fc10efb0-BQFKNTyl-JVOq35xY.js";
|
|
4
|
+
import { t as H } from "./channel-ByAWxImn-f765KETj.js";
|
|
5
|
+
function J(e) {
|
|
6
|
+
return typeof e == "string" ? new D([document.querySelectorAll(e)], [document.documentElement]) : new D([Z(e)], R);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function de(e, o) {
|
|
9
9
|
return !!e.children(o).length;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function pe(e) {
|
|
12
|
+
return B(e.v) + ":" + B(e.w) + ":" + B(e.name);
|
|
13
13
|
}
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
return e ? String(e).replace(
|
|
14
|
+
var Q = /:/g;
|
|
15
|
+
function B(e) {
|
|
16
|
+
return e ? String(e).replace(Q, "\\:") : "";
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Y(e, o) {
|
|
19
19
|
o && e.attr("style", o);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function be(e, o, c) {
|
|
22
22
|
o && e.attr("class", o).attr("class", c + " " + e.attr("class"));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function we(e, o) {
|
|
25
25
|
var c = o.graph();
|
|
26
26
|
if (U(c)) {
|
|
27
27
|
var a = c.transition;
|
|
28
|
-
if (
|
|
28
|
+
if (W(a))
|
|
29
29
|
return a(e);
|
|
30
30
|
}
|
|
31
31
|
return e;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ee(e, o) {
|
|
34
34
|
var c = e.append("foreignObject").attr("width", "100000"), a = c.append("xhtml:div");
|
|
35
35
|
a.attr("xmlns", "http://www.w3.org/1999/xhtml");
|
|
36
36
|
var i = o.label;
|
|
@@ -46,46 +46,42 @@ function K(e, o) {
|
|
|
46
46
|
default:
|
|
47
47
|
a.html(i);
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
return c.attr("width",
|
|
49
|
+
Y(a, o.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap");
|
|
50
|
+
var p = a.node().getBoundingClientRect();
|
|
51
|
+
return c.attr("width", p.width).attr("height", p.height), c;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
53
|
+
const O = {}, te = function(e) {
|
|
54
54
|
const o = Object.keys(e);
|
|
55
55
|
for (const c of o)
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const r = e[
|
|
61
|
-
let
|
|
62
|
-
r.classes.length > 0 && (
|
|
63
|
-
const
|
|
64
|
-
let
|
|
56
|
+
O[c] = e[c];
|
|
57
|
+
}, P = async function(e, o, c, a, i, p) {
|
|
58
|
+
const u = a.select(`[id="${c}"]`), n = Object.keys(e);
|
|
59
|
+
for (const b of n) {
|
|
60
|
+
const r = e[b];
|
|
61
|
+
let y = "default";
|
|
62
|
+
r.classes.length > 0 && (y = r.classes.join(" ")), y = y + " flowchart-label";
|
|
63
|
+
const f = E(r.styles);
|
|
64
|
+
let t = r.text !== void 0 ? r.text : r.id, s;
|
|
65
65
|
if (g.info("vertex", r, r.labelType), r.labelType === "markdown")
|
|
66
66
|
g.info("vertex", r, r.labelType);
|
|
67
|
-
else if (
|
|
68
|
-
|
|
69
|
-
label:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const S = y.split(D.lineBreakRegex);
|
|
79
|
-
for (const m of S) {
|
|
80
|
-
const x = i.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
81
|
-
x.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), x.setAttribute("dy", "1em"), x.setAttribute("x", "1"), x.textContent = m, w.appendChild(x);
|
|
67
|
+
else if (V(v().flowchart.htmlLabels))
|
|
68
|
+
s = ee(u, {
|
|
69
|
+
label: t
|
|
70
|
+
}).node(), s.parentNode.removeChild(s);
|
|
71
|
+
else {
|
|
72
|
+
const k = i.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
73
|
+
k.setAttribute("style", f.labelStyle.replace("color:", "fill:"));
|
|
74
|
+
const T = t.split(z.lineBreakRegex);
|
|
75
|
+
for (const $ of T) {
|
|
76
|
+
const d = i.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
77
|
+
d.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), d.setAttribute("dy", "1em"), d.setAttribute("x", "1"), d.textContent = $, k.appendChild(d);
|
|
82
78
|
}
|
|
83
|
-
|
|
79
|
+
s = k;
|
|
84
80
|
}
|
|
85
|
-
let
|
|
81
|
+
let w = 0, l = "";
|
|
86
82
|
switch (r.type) {
|
|
87
83
|
case "round":
|
|
88
|
-
|
|
84
|
+
w = 5, l = "rect";
|
|
89
85
|
break;
|
|
90
86
|
case "square":
|
|
91
87
|
l = "rect";
|
|
@@ -138,58 +134,59 @@ const z = {}, ee = function(e) {
|
|
|
138
134
|
default:
|
|
139
135
|
l = "rect";
|
|
140
136
|
}
|
|
137
|
+
const S = await I(t, v());
|
|
141
138
|
o.setNode(r.id, {
|
|
142
|
-
labelStyle:
|
|
139
|
+
labelStyle: f.labelStyle,
|
|
143
140
|
shape: l,
|
|
144
|
-
labelText:
|
|
141
|
+
labelText: S,
|
|
145
142
|
labelType: r.labelType,
|
|
146
|
-
rx:
|
|
147
|
-
ry:
|
|
148
|
-
class:
|
|
149
|
-
style:
|
|
143
|
+
rx: w,
|
|
144
|
+
ry: w,
|
|
145
|
+
class: y,
|
|
146
|
+
style: f.style,
|
|
150
147
|
id: r.id,
|
|
151
148
|
link: r.link,
|
|
152
149
|
linkTarget: r.linkTarget,
|
|
153
|
-
tooltip:
|
|
154
|
-
domId:
|
|
150
|
+
tooltip: p.db.getTooltip(r.id) || "",
|
|
151
|
+
domId: p.db.lookUpDomId(r.id),
|
|
155
152
|
haveCallback: r.haveCallback,
|
|
156
153
|
width: r.type === "group" ? 500 : void 0,
|
|
157
154
|
dir: r.dir,
|
|
158
155
|
type: r.type,
|
|
159
156
|
props: r.props,
|
|
160
|
-
padding:
|
|
157
|
+
padding: v().flowchart.padding
|
|
161
158
|
}), g.info("setNode", {
|
|
162
|
-
labelStyle:
|
|
159
|
+
labelStyle: f.labelStyle,
|
|
163
160
|
labelType: r.labelType,
|
|
164
161
|
shape: l,
|
|
165
|
-
labelText:
|
|
166
|
-
rx:
|
|
167
|
-
ry:
|
|
168
|
-
class:
|
|
169
|
-
style:
|
|
162
|
+
labelText: S,
|
|
163
|
+
rx: w,
|
|
164
|
+
ry: w,
|
|
165
|
+
class: y,
|
|
166
|
+
style: f.style,
|
|
170
167
|
id: r.id,
|
|
171
|
-
domId:
|
|
168
|
+
domId: p.db.lookUpDomId(r.id),
|
|
172
169
|
width: r.type === "group" ? 500 : void 0,
|
|
173
170
|
type: r.type,
|
|
174
171
|
dir: r.dir,
|
|
175
172
|
props: r.props,
|
|
176
|
-
padding:
|
|
173
|
+
padding: v().flowchart.padding
|
|
177
174
|
});
|
|
178
|
-
}
|
|
179
|
-
}, q = function(e, o, c) {
|
|
175
|
+
}
|
|
176
|
+
}, q = async function(e, o, c) {
|
|
180
177
|
g.info("abc78 edges = ", e);
|
|
181
|
-
let a = 0, i = {},
|
|
178
|
+
let a = 0, i = {}, p, u;
|
|
182
179
|
if (e.defaultStyle !== void 0) {
|
|
183
|
-
const n =
|
|
184
|
-
|
|
180
|
+
const n = E(e.defaultStyle);
|
|
181
|
+
p = n.style, u = n.labelStyle;
|
|
185
182
|
}
|
|
186
|
-
|
|
183
|
+
for (const n of e) {
|
|
187
184
|
a++;
|
|
188
|
-
const
|
|
189
|
-
i[
|
|
190
|
-
let
|
|
191
|
-
g.info("abc78 new link id to be used is",
|
|
192
|
-
const
|
|
185
|
+
const b = "L-" + n.start + "-" + n.end;
|
|
186
|
+
i[b] === void 0 ? (i[b] = 0, g.info("abc78 new entry", b, i[b])) : (i[b]++, g.info("abc78 new entry", b, i[b]));
|
|
187
|
+
let r = b + "-" + i[b];
|
|
188
|
+
g.info("abc78 new link id to be used is", b, r, i[b]);
|
|
189
|
+
const y = "LS-" + n.start, f = "LE-" + n.end, t = { style: "", labelStyle: "" };
|
|
193
190
|
switch (t.minlen = n.length || 1, n.type === "arrow_open" ? t.arrowhead = "none" : t.arrowhead = "normal", t.arrowTypeStart = "arrow_open", t.arrowTypeEnd = "arrow_open", n.type) {
|
|
194
191
|
case "double_arrow_cross":
|
|
195
192
|
t.arrowTypeStart = "arrow_cross";
|
|
@@ -207,10 +204,10 @@ const z = {}, ee = function(e) {
|
|
|
207
204
|
t.arrowTypeEnd = "arrow_circle";
|
|
208
205
|
break;
|
|
209
206
|
}
|
|
210
|
-
let s = "",
|
|
207
|
+
let s = "", w = "";
|
|
211
208
|
switch (n.stroke) {
|
|
212
209
|
case "normal":
|
|
213
|
-
s = "fill:none;",
|
|
210
|
+
s = "fill:none;", p !== void 0 && (s = p), u !== void 0 && (w = u), t.thickness = "normal", t.pattern = "solid";
|
|
214
211
|
break;
|
|
215
212
|
case "dotted":
|
|
216
213
|
t.thickness = "normal", t.pattern = "dotted", t.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
|
|
@@ -223,38 +220,38 @@ const z = {}, ee = function(e) {
|
|
|
223
220
|
break;
|
|
224
221
|
}
|
|
225
222
|
if (n.style !== void 0) {
|
|
226
|
-
const
|
|
227
|
-
s =
|
|
223
|
+
const l = E(n.style);
|
|
224
|
+
s = l.style, w = l.labelStyle;
|
|
228
225
|
}
|
|
229
|
-
t.style = t.style += s, t.labelStyle = t.labelStyle +=
|
|
230
|
-
`), n.style === void 0 && (t.style = t.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), t.labelStyle = t.labelStyle.replace("color:", "fill:"), t.id =
|
|
231
|
-
}
|
|
232
|
-
},
|
|
226
|
+
t.style = t.style += s, t.labelStyle = t.labelStyle += w, n.interpolate !== void 0 ? t.curve = C(n.interpolate, A) : e.defaultInterpolate !== void 0 ? t.curve = C(e.defaultInterpolate, A) : t.curve = C(O.curve, A), n.text === void 0 ? n.style !== void 0 && (t.arrowheadStyle = "fill: #333") : (t.arrowheadStyle = "fill: #333", t.labelpos = "c"), t.labelType = n.labelType, t.label = await I(n.text.replace(z.lineBreakRegex, `
|
|
227
|
+
`), v()), n.style === void 0 && (t.style = t.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), t.labelStyle = t.labelStyle.replace("color:", "fill:"), t.id = r, t.classes = "flowchart-link " + y + " " + f, o.setEdge(n.start, n.end, t, a);
|
|
228
|
+
}
|
|
229
|
+
}, re = function(e, o) {
|
|
233
230
|
return o.db.getClasses();
|
|
234
|
-
},
|
|
231
|
+
}, oe = async function(e, o, c, a) {
|
|
235
232
|
g.info("Drawing flowchart");
|
|
236
233
|
let i = a.db.getDirection();
|
|
237
234
|
i === void 0 && (i = "TD");
|
|
238
|
-
const { securityLevel:
|
|
239
|
-
let
|
|
240
|
-
|
|
241
|
-
const
|
|
235
|
+
const { securityLevel: p, flowchart: u } = v(), n = u.nodeSpacing || 50, b = u.rankSpacing || 50;
|
|
236
|
+
let r;
|
|
237
|
+
p === "sandbox" && (r = _("#i" + o));
|
|
238
|
+
const y = p === "sandbox" ? _(r.nodes()[0].contentDocument.body) : _("body"), f = p === "sandbox" ? r.nodes()[0].contentDocument : document, t = new F({
|
|
242
239
|
multigraph: !0,
|
|
243
240
|
compound: !0
|
|
244
241
|
}).setGraph({
|
|
245
242
|
rankdir: i,
|
|
246
243
|
nodesep: n,
|
|
247
|
-
ranksep:
|
|
244
|
+
ranksep: b,
|
|
248
245
|
marginx: 0,
|
|
249
246
|
marginy: 0
|
|
250
247
|
}).setDefaultEdgeLabel(function() {
|
|
251
248
|
return {};
|
|
252
249
|
});
|
|
253
250
|
let s;
|
|
254
|
-
const
|
|
255
|
-
g.info("Subgraphs - ",
|
|
256
|
-
for (let
|
|
257
|
-
s =
|
|
251
|
+
const w = a.db.getSubGraphs();
|
|
252
|
+
g.info("Subgraphs - ", w);
|
|
253
|
+
for (let d = w.length - 1; d >= 0; d--)
|
|
254
|
+
s = w[d], g.info("Subgraph - ", s), a.db.addVertex(
|
|
258
255
|
s.id,
|
|
259
256
|
{ text: s.title, type: s.labelType },
|
|
260
257
|
"group",
|
|
@@ -262,52 +259,52 @@ const z = {}, ee = function(e) {
|
|
|
262
259
|
s.classes,
|
|
263
260
|
s.dir
|
|
264
261
|
);
|
|
265
|
-
const
|
|
262
|
+
const l = a.db.getVertices(), S = a.db.getEdges();
|
|
266
263
|
g.info("Edges", S);
|
|
267
|
-
let
|
|
268
|
-
for (
|
|
269
|
-
s =
|
|
270
|
-
for (let
|
|
271
|
-
g.info("Setting up subgraphs", s.nodes[
|
|
264
|
+
let k = 0;
|
|
265
|
+
for (k = w.length - 1; k >= 0; k--) {
|
|
266
|
+
s = w[k], J("cluster").append("text");
|
|
267
|
+
for (let d = 0; d < s.nodes.length; d++)
|
|
268
|
+
g.info("Setting up subgraphs", s.nodes[d], s.id), t.setParent(s.nodes[d], s.id);
|
|
272
269
|
}
|
|
273
|
-
|
|
274
|
-
const
|
|
275
|
-
if (await
|
|
276
|
-
const
|
|
277
|
-
for (const
|
|
278
|
-
const
|
|
279
|
-
|
|
270
|
+
await P(l, t, o, y, f, a), await q(S, t);
|
|
271
|
+
const T = y.select(`[id="${o}"]`), $ = y.select("#" + o + " g");
|
|
272
|
+
if (await X($, t, ["point", "circle", "cross"], "flowchart", o), G.insertTitle(T, "flowchartTitleText", u.titleTopMargin, a.db.getDiagramTitle()), M(t, T, u.diagramPadding, u.useMaxWidth), a.db.indexNodes("subGraph" + k), !u.htmlLabels) {
|
|
273
|
+
const d = f.querySelectorAll('[id="' + o + '"] .edgeLabel .label');
|
|
274
|
+
for (const x of d) {
|
|
275
|
+
const m = x.getBBox(), h = f.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
276
|
+
h.setAttribute("rx", 0), h.setAttribute("ry", 0), h.setAttribute("width", m.width), h.setAttribute("height", m.height), x.insertBefore(h, x.firstChild);
|
|
280
277
|
}
|
|
281
278
|
}
|
|
282
|
-
Object.keys(
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
285
|
-
const
|
|
286
|
-
if (
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
return
|
|
291
|
-
}, ":first-child"),
|
|
292
|
-
|
|
293
|
-
return L.node();
|
|
294
|
-
});
|
|
295
|
-
const N = v.select(".label");
|
|
296
|
-
N && B.append(function() {
|
|
279
|
+
Object.keys(l).forEach(function(d) {
|
|
280
|
+
const x = l[d];
|
|
281
|
+
if (x.link) {
|
|
282
|
+
const m = _("#" + o + ' [id="' + d + '"]');
|
|
283
|
+
if (m) {
|
|
284
|
+
const h = f.createElementNS("http://www.w3.org/2000/svg", "a");
|
|
285
|
+
h.setAttributeNS("http://www.w3.org/2000/svg", "class", x.classes.join(" ")), h.setAttributeNS("http://www.w3.org/2000/svg", "href", x.link), h.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), p === "sandbox" ? h.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : x.linkTarget && h.setAttributeNS("http://www.w3.org/2000/svg", "target", x.linkTarget);
|
|
286
|
+
const L = m.insert(function() {
|
|
287
|
+
return h;
|
|
288
|
+
}, ":first-child"), N = m.select(".label-container");
|
|
289
|
+
N && L.append(function() {
|
|
297
290
|
return N.node();
|
|
298
291
|
});
|
|
292
|
+
const j = m.select(".label");
|
|
293
|
+
j && L.append(function() {
|
|
294
|
+
return j.node();
|
|
295
|
+
});
|
|
299
296
|
}
|
|
300
297
|
}
|
|
301
298
|
});
|
|
302
299
|
}, ue = {
|
|
303
|
-
setConf:
|
|
304
|
-
addVertices:
|
|
300
|
+
setConf: te,
|
|
301
|
+
addVertices: P,
|
|
305
302
|
addEdges: q,
|
|
306
|
-
getClasses:
|
|
307
|
-
draw:
|
|
308
|
-
},
|
|
309
|
-
const c =
|
|
310
|
-
return
|
|
303
|
+
getClasses: re,
|
|
304
|
+
draw: oe
|
|
305
|
+
}, ae = (e, o) => {
|
|
306
|
+
const c = H, a = c(e, "r"), i = c(e, "g"), p = c(e, "b");
|
|
307
|
+
return K(a, i, p, o);
|
|
311
308
|
}, le = (e) => `.label {
|
|
312
309
|
font-family: ${e.fontFamily};
|
|
313
310
|
color: ${e.nodeTextColor || e.textColor};
|
|
@@ -343,6 +340,12 @@ const z = {}, ee = function(e) {
|
|
|
343
340
|
// text-anchor: start;
|
|
344
341
|
// }
|
|
345
342
|
|
|
343
|
+
.node .katex path {
|
|
344
|
+
fill: #000;
|
|
345
|
+
stroke: #000;
|
|
346
|
+
stroke-width: 1px;
|
|
347
|
+
}
|
|
348
|
+
|
|
346
349
|
.node .label {
|
|
347
350
|
text-align: center;
|
|
348
351
|
}
|
|
@@ -376,7 +379,7 @@ const z = {}, ee = function(e) {
|
|
|
376
379
|
|
|
377
380
|
/* For html labels only */
|
|
378
381
|
.labelBkg {
|
|
379
|
-
background-color: ${
|
|
382
|
+
background-color: ${ae(e.edgeLabelBackground, 0.5)};
|
|
380
383
|
// background-color:
|
|
381
384
|
}
|
|
382
385
|
|
|
@@ -416,15 +419,15 @@ const z = {}, ee = function(e) {
|
|
|
416
419
|
font-size: 18px;
|
|
417
420
|
fill: ${e.textColor};
|
|
418
421
|
}
|
|
419
|
-
`,
|
|
422
|
+
`, fe = le;
|
|
420
423
|
export {
|
|
421
|
-
|
|
422
|
-
X as Q,
|
|
423
|
-
H as Z,
|
|
424
|
+
J as Z,
|
|
424
425
|
pe as b,
|
|
425
|
-
|
|
426
|
+
Y as e,
|
|
426
427
|
be as f,
|
|
428
|
+
fe as h,
|
|
427
429
|
de as p,
|
|
428
|
-
|
|
429
|
-
we as
|
|
430
|
+
ee as t,
|
|
431
|
+
we as u,
|
|
432
|
+
ue as w
|
|
430
433
|
};
|