intlayer-editor 5.8.1 → 6.0.0-canary.1
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/client/dist/assets/Figtree-VariableFont-CuCnmeMh.ttf +0 -0
- package/client/dist/assets/{andromeeda-C3khCPGq.js → andromeeda-C-Jbm3Hp.js} +1 -1
- package/client/dist/assets/asciidoc-Dv7Oe6Be.js +1 -0
- package/client/dist/assets/catppuccin-frappe-BBxmzUt6.js +1 -0
- package/client/dist/assets/catppuccin-latte-Jep7L2Wt.js +1 -0
- package/client/dist/assets/catppuccin-macchiato-CIUZ1G5V.js +1 -0
- package/client/dist/assets/catppuccin-mocha-NBseiqgx.js +1 -0
- package/client/dist/assets/cobol-DwXMNnPA.js +1 -0
- package/client/dist/assets/{erlang-wwlo35G_.js → erlang-DsQrWhSR.js} +1 -1
- package/client/dist/assets/fsharp-CufqaIoK.js +1 -0
- package/client/dist/assets/{gdresource-CUnzuGD_.js → gdresource-B7Tvp0Sc.js} +1 -1
- package/client/dist/assets/{gdscript-CU1B2r8a.js → gdscript-DTMYz4Jt.js} +1 -1
- package/client/dist/assets/index-BMlcL898.css +1 -0
- package/client/dist/assets/index-fmAV9I4T.js +338 -0
- package/client/dist/assets/{latex-DyVrc4Oz.js → latex-CPEt12BK.js} +1 -1
- package/client/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/client/dist/assets/marko-BM38lbjI.js +1 -0
- package/client/dist/assets/{mdc-Cpja7t1H.js → mdc-DvHMhoCT.js} +1 -1
- package/client/dist/assets/{nextflow-Bk5OV074.js → nextflow-CUEJCptM.js} +1 -1
- package/client/dist/assets/{nim-IFkVVqAN.js → nim-BZI_8mFl.js} +1 -1
- package/client/dist/assets/swift-Ccdh7vHB.js +1 -0
- package/client/dist/assets/{templ-Dh73Zvim.js → templ-0CNLO7il.js} +1 -1
- package/client/dist/index.html +2 -2
- package/package.json +26 -22
- package/server/dist/controllers/dictionary.controller.cjs +4 -4
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.d.ts +2 -1
- package/server/dist/controllers/dictionary.controller.d.ts.map +1 -1
- package/server/dist/controllers/dictionary.controller.mjs +4 -4
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
- package/client/dist/assets/Inter-VariableFont-c8O0ljhh.ttf +0 -0
- package/client/dist/assets/asciidoc-CdggvHu8.js +0 -1
- package/client/dist/assets/catppuccin-frappe-Btyk0a-E.js +0 -1
- package/client/dist/assets/catppuccin-latte-q-j0iyEw.js +0 -1
- package/client/dist/assets/catppuccin-macchiato-brDaU2vB.js +0 -1
- package/client/dist/assets/catppuccin-mocha-BR7mELCv.js +0 -1
- package/client/dist/assets/cobol-CCPHrsME.js +0 -1
- package/client/dist/assets/fsharp-JpbdA51a.js +0 -1
- package/client/dist/assets/index-DwE379Qp.js +0 -338
- package/client/dist/assets/index-sJ_ZGxPn.css +0 -1
- package/client/dist/assets/markdown-B_HjzqPZ.js +0 -1
- package/client/dist/assets/marko-DIP14Aik.js +0 -1
- package/client/dist/assets/swift-ByDN_Krv.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./go-Dn2_MT6a.js";import t from"./javascript-BMMyXqK5.js";import n from"./css-DPfMkruS.js";const i=Object.freeze(JSON.parse(`{"displayName":"Templ","name":"templ","patterns":[{"include":"#script-template"},{"include":"#css-template"},{"include":"#html-template"},{"include":"source.go"}],"repository":{"block-element":{"begin":"(</?)((?i:address|blockquote|dd|div|section|article|aside|header|footer|nav|menu|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|pre)(?=[>\\\\\\\\\\\\s]))","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.block.any.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.block.any.html","patterns":[{"include":"#tag-stuff"}]},"call-expression":{"begin":"(\\\\{!)\\\\s+","beginCaptures":{"0":{"name":"start.call-expression.templ"},"1":{"name":"punctuation.brace.open"}},"end":"(})","endCaptures":{"0":{"name":"end.call-expression.templ"},"1":{"name":"punctuation.brace.close"}},"name":"call-expression.templ","patterns":[{"include":"source.go"}]},"case-expression":{"begin":"^\\\\s*case .+?:$","captures":{"0":{"name":"case.switch.html-template.templ","patterns":[{"include":"source.go"}]}},"end":"(?:^(\\\\s*case .+?:)|^(\\\\s*default:)|(\\\\s*))$","patterns":[{"include":"#template-node"}]},"close-element":{"begin":"(</?)([-0-:A-Za-z]+)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.other.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.html","patterns":[{"include":"#tag-stuff"}]},"css-template":{"begin":"^(css) ([A-z][0-9A-z]*\\\\()","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=^}$)","name":"css-template.templ","patterns":[{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.css-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s*(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.css-template.templ","patterns":[{"begin":"\\\\s*((?:-(?:webkit|moz|o|ms|khtml)-)?(?:zoom|z-index|[xy]|writing-mode|wrap|wrap-through|wrap-inside|wrap-flow|wrap-before|wrap-after|word-wrap|word-spacing|word-break|word|will-change|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|vector-effect|variant|user-zoom|user-select|up|unicode-(bidi|range)|trim|translate|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform-box|transform|touch-action|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|text-wrap|text-underline-position|text-transform|text-spacing|text-space-trim|text-space-collapse|text-size-adjust|text-shadow|text-replace|text-rendering|text-overflow|text-outline|text-orientation|text-justify|text-indent|text-height|text-emphasis-style|text-emphasis-skip|text-emphasis-position|text-emphasis-color|text-emphasis|text-decoration-style|text-decoration-stroke|text-decoration-skip|text-decoration-line|text-decoration-fill|text-decoration-color|text-decoration|text-combine-upright|text-anchor|text-align-last|text-align-all|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|system|symbols|suffix|style-type|style-position|style-image|style|stroke-width|stroke-opacity|stroke-miterlimit|stroke-linejoin|stroke-linecap|stroke-dashoffset|stroke-dasharray|stroke|string-set|stretch|stress|stop-opacity|stop-color|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak-as|speak|span|spacing|space-collapse|space|solid-opacity|solid-color|sizing|size-adjust|size|shape-rendering|shape-padding|shape-outside|shape-margin|shape-inside|shape-image-threshold|shadow|scroll-snap-type|scroll-snap-points-y|scroll-snap-points-x|scroll-snap-destination|scroll-snap-coordinate|scroll-behavior|scale|ry|rx|respond-to|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-merge|ruby-align|ruby|rows|rotation-point|rotation|rotate|role|right-width|right-style|right-color|right|richness|rest-before|rest-after|rest|resource|resolution|resize|reset|replace|repeat|rendering-intent|region-fragment|rate|range|radius|r|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|prefix|position|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|perspective-origin|perspective|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-inline-start|padding-inline-end|padding-bottom|padding-block-start|padding-block-end|padding|pad|pack|overhang|overflow-y|overflow-x|overflow-wrap|overflow-style|overflow-inline|overflow-block|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|order|opacity|offset-start|offset-inline-start|offset-inline-end|offset-end|offset-block-start|offset-block-end|offset-before|offset-after|offset|object-position|object-fit|numeral|new|negative|nav-up|nav-right|nav-left|nav-index|nav-down|nav|name|move-to|motion-rotation|motion-path|motion-offset|motion|model|mix-blend-mode|min-zoom|min-width|min-inline-size|min-height|min-block-size|min|max-zoom|max-width|max-lines|max-inline-size|max-height|max-block-size|max|mask-type|mask-size|mask-repeat|mask-position|mask-origin|mask-mode|mask-image|mask-composite|mask-clip|mask-border-width|mask-border-source|mask-border-slice|mask-border-repeat|mask-border-outset|mask-border-mode|mask-border|mask|marquee-style|marquee-speed|marquee-play-count|marquee-loop|marquee-direction|marquee|marks|marker-start|marker-side|marker-mid|marker-end|marker|margin-top|margin-right|margin-left|margin-inline-start|margin-inline-end|margin-bottom|margin-block-start|margin-block-end|margin|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-snap|line-height|line-grid|line-break|line|lighting-color|level|letter-spacing|length|left-width|left-style|left-color|left|label|kerning|justify-self|justify-items|justify-content|justify|iteration-count|isolation|inline-size|inline-box-align|initial-value|initial-size|initial-letter-wrap|initial-letter-align|initial-letter|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-rendering|image-resolution|image-orientation|image|icon|hyphens|hyphenate-limit-zone|hyphenate-limit-lines|hyphenate-limit-last|hyphenate-limit-chars|hyphenate-character|hyphenate|height|header|hanging-punctuation|grid-template-rows|grid-template-columns|grid-template-areas|grid-template|grid-row-start|grid-row-gap|grid-row-end|grid-rows??|grid-gap|grid-column-start|grid-column-gap|grid-column-end|grid-columns??|grid-auto-rows|grid-auto-flow|grid-auto-columns|grid-area|grid|glyph-orientation-vertical|glyph-orientation-horizontal|gap|font-weight|font-variant-position|font-variant-numeric|font-variant-ligatures|font-variant-east-asian|font-variant-caps|font-variant-alternates|font-variant|font-synthesis|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|flow-into|flow-from|flow|flood-opacity|flood-color|float-offset|float|flex-wrap|flex-shrink|flex-grow|flex-group|flex-flow|flex-direction|flex-basis|flex|fit-position|fit|filter|fill-rule|fill-opacity|fill|family|fallback|enable-background|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-model|display|direction|delay|decoration-break|decoration|cy|cx|cursor|cue-before|cue-after|cue|crop|counter-set|counter-reset|counter-increment|counter|count|corner-shape|corners|continue|content|contain|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-rendering|color-profile|color-interpolation-filters|color-interpolation|color-adjust|color|collapse|clip-rule|clip-path|clip|clear|character|caret-shape|caret-color|caret|caption-side|buffered-rendering|break-inside|break-before|break-after|break|box-suppress|box-snap|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom-width|bottom-style|bottom-right-radius|bottom-left-radius|bottom-color|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-limit|border-length|border-left-width|border-left-style|border-left-color|border-left|border-inline-start-width|border-inline-start-style|border-inline-start-color|border-inline-start|border-inline-end-width|border-inline-end-style|border-inline-end-color|border-inline-end|border-image-width|border-image-transform|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-clip-top|border-clip-right|border-clip-left|border-clip-bottom|border-clip|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border-block-start-width|border-block-start-style|border-block-start-color|border-block-start|border-block-end-width|border-block-end-style|border-block-end-color|border-block-end|border|bookmark-target|bookmark-level|bookmark-label|bookmark|block-size|binding|bidi|before|baseline-shift|baseline|balance|background-size|background-repeat|background-position-y|background-position-x|background-position-inline|background-position-block|background-position|background-origin|background-image|background-color|background-clip|background-blend-mode|background-attachment|background|backface-visibility|backdrop-filter|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|alt|all|alignment-baseline|alignment-adjust|alignment|align-last|align-self|align-items|align-content|align|after|adjust|additive-symbols)):\\\\s+","beginCaptures":{"1":{"name":"support.type.property-name.css"}},"end":"(?<=;$)","name":"property.css-template.templ","patterns":[{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"(})(;)$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"},"2":{"name":"punctuation.terminator.rule.css"}},"name":"expression.property.css-template.templ","patterns":[{"include":"source.go"}]},{"captures":{"1":{"name":"support.type.property-value.css"},"2":{"name":"punctuation.terminator.rule.css"}},"match":"(.*)(;)$","name":"constant.property.css-template.templ"}]}]}]},"default-expression":{"begin":"^\\\\s*default:$","captures":{"0":{"name":"default.switch.html-template.templ","patterns":[{"include":"source.go"}]}},"end":"(?:^(\\\\s*case .+?:)|^(\\\\s*default:)|(\\\\s*))$","patterns":[{"include":"#template-node"}]},"element":{"begin":"(<)([-0-:A-Za-z]++)(?=[^>]*></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"}},"end":"(>(<)/)(\\\\2)(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"meta.scope.between-tag-pair.html"},"3":{"name":"entity.name.tag.html"},"4":{"name":"punctuation.definition.tag.html"}},"name":"meta.tag.any.html","patterns":[{"include":"#tag-stuff"}]},"else-expression":{"begin":"\\\\s+(else)\\\\s+(\\\\{)\\\\s*$","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^\\\\s*(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"else.html-template.templ","patterns":[{"include":"#template-node"}]},"else-if-expression":{"begin":"\\\\s(else if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"else-if.html-template.templ","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"name":"expression.else-if.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.else-if.html-template.templ","patterns":[{"include":"#template-node"}]}]},"entities":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)([0-9A-Za-z]+|#[0-9]+|#[Xx]\\\\h+)(;)","name":"constant.character.entity.html"},{"match":"&","name":"invalid.illegal.bad-ampersand.html"}]},"for-expression":{"begin":"^\\\\s*for .+\\\\{","captures":{"0":{"name":"meta.embedded.block.go","patterns":[{"include":"source.go"}]}},"end":"\\\\s*}\\\\s*\\\\n","name":"for.html-template.templ","patterns":[{"include":"#template-node"}]},"go-comment-block":{"begin":"(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"end":"(\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"name":"comment.block.go"},"go-comment-double-slash":{"begin":"(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"end":"\\\\n|$","name":"comment.line.double-slash.go"},"html-comment":{"begin":"<!--","beginCaptures":{"0":{"name":"punctuation.definition.comment.html"}},"end":"-->","endCaptures":{"0":{"name":"punctuation.definition.comment.html"}},"name":"comment.block.html"},"html-template":{"begin":"^(templ) ((?:\\\\([A-z][0-9A-z]* \\\\*?[A-z][0-9A-z]*\\\\) )?[A-z][0-9A-z]*([(\\\\[]))","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=^}$)","name":"html-template.templ","patterns":[{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\[)","end":"(])","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.square.go"}},"name":"type-params.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s*(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.html-template.templ","patterns":[{"include":"#template-node"}]}]},"if-expression":{"begin":"^\\\\s*(if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"if.html-template.templ","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"name":"expression.if.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.if.html-template.templ","patterns":[{"include":"#template-node"}]}]},"import-expression":{"patterns":[{"begin":"(@)((?:[A-z][0-9A-z]*\\\\.)?[A-z][0-9A-z]*(?:[({]|$))","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=\\\\))$|(?<=})$|(?<=$)","name":"import-expression.templ","patterns":[{"begin":"(?<=[0-9A-z]\\\\{)","end":"\\\\s*(})(\\\\.[A-z][0-9A-z]*\\\\()","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"},"2":{"patterns":[{"include":"source.go"}]}},"name":"struct-method.import-expression.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.import-expression.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.brace.open"}},"end":"^\\\\s*(})$","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"children.import-expression.templ","patterns":[{"include":"#template-node"}]}]}]},"inline-element":{"begin":"(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|[qs]|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)(?=[>\\\\\\\\\\\\s]))","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.inline.any.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.any.html","patterns":[{"include":"#tag-stuff"}]},"raw-go":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"start.raw-go.templ"},"1":{"name":"punctuation.brace.open"}},"end":"}}","endCaptures":{"0":{"name":"end.raw-go.templ"},"1":{"name":"punctuation.brace.open"}},"name":"raw-go.templ","patterns":[{"include":"source.go"}]},"script-element":{"begin":"(<)(script)([^>]*)(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.html"}},"end":"<\/script>","endCaptures":{"0":{"patterns":[{"include":"#close-element"}]}},"name":"meta.tag.script.html","patterns":[{"include":"source.js"}]},"script-template":{"begin":"^(script) ([A-z][0-9A-z]*\\\\()","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=^}$)","name":"script-template.templ","patterns":[{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.script-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s*(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.script-template.templ","patterns":[{"include":"source.js"}]}]},"sgml":{"begin":"<!","captures":{"0":{"name":"punctuation.definition.tag.html"}},"end":">","name":"meta.tag.sgml.html","patterns":[{"begin":"(?i:DOCTYPE)","captures":{"1":{"name":"entity.name.tag.doctype.html"}},"end":"(?=>)","name":"meta.tag.sgml.doctype.html","patterns":[{"match":"\\"[^\\">]*\\"","name":"string.quoted.double.doctype.identifiers-and-DTDs.html"}]},{"begin":"\\\\[CDATA\\\\[","end":"]](?=>)","name":"constant.other.inline-data.html"},{"match":"(\\\\s*)(?!--|>)\\\\S(\\\\s*)","name":"invalid.illegal.bad-comments-or-CDATA.html"}]},"string-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},"string-expression":{"begin":"\\\\{\\\\s+","beginCaptures":{"0":{"name":"start.string-expression.templ"}},"end":"}","endCaptures":{"0":{"name":"end.string-expression.templ"}},"name":"expression.html-template.templ","patterns":[{"include":"source.go"}]},"style-element":{"begin":"(<)(style)([^>]*)(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.html"}},"end":"</style>","endCaptures":{"0":{"patterns":[{"include":"#close-element"}]}},"name":"meta.tag.style.html","patterns":[{"include":"source.css"}]},"switch-expression":{"begin":"^\\\\s*switch .+?\\\\{$","captures":{"0":{"name":"meta.embedded.block.go","patterns":[{"include":"source.go"}]}},"end":"^\\\\s*}$","name":"switch.html-template.templ","patterns":[{"include":"#template-node"},{"include":"#case-expression"},{"include":"#default-expression"}]},"tag-else-attribute":{"begin":"\\\\s(else)\\\\s(\\\\{)$","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"name":"punctuation.brace.open"}},"end":"^\\\\s*(})$","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"else.attribute.html","patterns":[{"include":"#tag-stuff"}]},"tag-else-if-attribute":{"begin":"\\\\s(else if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"else-if.attribute.html","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.brace.open"}},"name":"expression.else-if.attribute.html","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"block.else-if.attribute.html","patterns":[{"include":"#tag-stuff"}]}]},"tag-generic-attribute":{"match":"(?<=[^=])\\\\b([-0-:A-Za-z]+)","name":"entity.other.attribute-name.html"},"tag-id-attribute":{"begin":"\\\\b(id)\\\\b\\\\s*(=)","captures":{"1":{"name":"entity.other.attribute-name.id.html"},"2":{"name":"punctuation.separator.key-value.html"}},"end":"(?!\\\\G)(?<=[\\"'[^/<>\\\\s]])","name":"meta.attribute-with-value.id.html","patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#entities"}]},{"captures":{"0":{"name":"meta.toc-list.id.html"}},"match":"(?<==)(?:[^\\"'/<>{}\\\\s]|/(?!>))+","name":"string.unquoted.html"}]},"tag-if-attribute":{"begin":"^\\\\s*(if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"if.attribute.html","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.brace.open"}},"name":"expression.if.attribute.html","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"block.if.attribute.html","patterns":[{"include":"#tag-stuff"}]}]},"tag-stuff":{"patterns":[{"include":"#tag-id-attribute"},{"include":"#tag-generic-attribute"},{"include":"#string-double-quoted"},{"include":"#string-expression"},{"include":"#tag-if-attribute"},{"include":"#tag-else-if-attribute"},{"include":"#tag-else-attribute"}]},"template-node":{"patterns":[{"include":"#string-expression"},{"include":"#call-expression"},{"include":"#import-expression"},{"include":"#script-element"},{"include":"#style-element"},{"include":"#element"},{"include":"#html-comment"},{"include":"#go-comment-block"},{"include":"#go-comment-double-slash"},{"include":"#sgml"},{"include":"#block-element"},{"include":"#inline-element"},{"include":"#close-element"},{"include":"#else-if-expression"},{"include":"#if-expression"},{"include":"#else-expression"},{"include":"#for-expression"},{"include":"#switch-expression"},{"include":"#raw-go"}]}},"scopeName":"source.templ","embeddedLangs":["go","javascript","css"]}`)),s=[...e,...t,...n,i];export{s as default};
|
|
1
|
+
import e from"./go-Dn2_MT6a.js";import t from"./javascript-BMMyXqK5.js";import n from"./css-DPfMkruS.js";const i=Object.freeze(JSON.parse(`{"displayName":"Templ","name":"templ","patterns":[{"include":"#script-template"},{"include":"#css-template"},{"include":"#html-template"},{"include":"source.go"}],"repository":{"block-element":{"begin":"(</?)((?i:address|blockquote|dd|div|section|article|aside|header|footer|nav|menu|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|pre)(?=[>\\\\\\\\\\\\s]))","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.block.any.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.block.any.html","patterns":[{"include":"#tag-stuff"}]},"call-expression":{"begin":"(\\\\{!)\\\\s+","beginCaptures":{"0":{"name":"start.call-expression.templ"},"1":{"name":"punctuation.brace.open"}},"end":"(})","endCaptures":{"0":{"name":"end.call-expression.templ"},"1":{"name":"punctuation.brace.close"}},"name":"call-expression.templ","patterns":[{"include":"source.go"}]},"case-expression":{"begin":"^\\\\s*case .+?:$","captures":{"0":{"name":"case.switch.html-template.templ","patterns":[{"include":"source.go"}]}},"end":"(?:^(\\\\s*case .+?:)|^(\\\\s*default:)|(\\\\s*))$","patterns":[{"include":"#template-node"}]},"close-element":{"begin":"(</?)([-0-:A-Za-z]+)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.other.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.html","patterns":[{"include":"#tag-stuff"}]},"css-template":{"begin":"^(css) ([A-z][0-9A-z]*\\\\()","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=^}$)","name":"css-template.templ","patterns":[{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.css-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s*(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.css-template.templ","patterns":[{"begin":"\\\\s*((?:-(?:webkit|moz|o|ms|khtml)-)?(?:zoom|z-index|[xy]|writing-mode|wrap|wrap-through|wrap-inside|wrap-flow|wrap-before|wrap-after|word-wrap|word-spacing|word-break|word|will-change|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|vector-effect|variant|user-zoom|user-select|up|unicode-(bidi|range)|trim|translate|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform-box|transform|touch-action|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|text-wrap|text-underline-position|text-transform|text-spacing|text-space-trim|text-space-collapse|text-size-adjust|text-shadow|text-replace|text-rendering|text-overflow|text-outline|text-orientation|text-justify|text-indent|text-height|text-emphasis-style|text-emphasis-skip|text-emphasis-position|text-emphasis-color|text-emphasis|text-decoration-style|text-decoration-stroke|text-decoration-skip|text-decoration-line|text-decoration-fill|text-decoration-color|text-decoration|text-combine-upright|text-anchor|text-align-last|text-align-all|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|system|symbols|suffix|style-type|style-position|style-image|style|stroke-width|stroke-opacity|stroke-miterlimit|stroke-linejoin|stroke-linecap|stroke-dashoffset|stroke-dasharray|stroke|string-set|stretch|stress|stop-opacity|stop-color|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak-as|speak|span|spacing|space-collapse|space|solid-opacity|solid-color|sizing|size-adjust|size|shape-rendering|shape-padding|shape-outside|shape-margin|shape-inside|shape-image-threshold|shadow|scroll-snap-type|scroll-snap-points-y|scroll-snap-points-x|scroll-snap-destination|scroll-snap-coordinate|scroll-behavior|scale|ry|rx|respond-to|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-merge|ruby-align|ruby|rows|rotation-point|rotation|rotate|role|right-width|right-style|right-color|right|richness|rest-before|rest-after|rest|resource|resolution|resize|reset|replace|repeat|rendering-intent|region-fragment|rate|range|radius|r|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|prefix|position|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|perspective-origin|perspective|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-inline-start|padding-inline-end|padding-bottom|padding-block-start|padding-block-end|padding|pad|pack|overhang|overflow-y|overflow-x|overflow-wrap|overflow-style|overflow-inline|overflow-block|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|order|opacity|offset-start|offset-inline-start|offset-inline-end|offset-end|offset-block-start|offset-block-end|offset-before|offset-after|offset|object-position|object-fit|numeral|new|negative|nav-up|nav-right|nav-left|nav-index|nav-down|nav|name|move-to|motion-rotation|motion-path|motion-offset|motion|model|mix-blend-mode|min-zoom|min-width|min-inline-size|min-height|min-block-size|min|max-zoom|max-width|max-lines|max-inline-size|max-height|max-block-size|max|mask-type|mask-size|mask-repeat|mask-position|mask-origin|mask-mode|mask-image|mask-composite|mask-clip|mask-border-width|mask-border-source|mask-border-slice|mask-border-repeat|mask-border-outset|mask-border-mode|mask-border|mask|marquee-style|marquee-speed|marquee-play-count|marquee-loop|marquee-direction|marquee|marks|marker-start|marker-side|marker-mid|marker-end|marker|margin-top|margin-right|margin-left|margin-inline-start|margin-inline-end|margin-bottom|margin-block-start|margin-block-end|margin|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-snap|line-height|line-grid|line-break|line|lighting-color|level|letter-spacing|length|left-width|left-style|left-color|left|label|kerning|justify-self|justify-items|justify-content|justify|iteration-count|isolation|inline-size|inline-box-align|initial-value|initial-size|initial-letter-wrap|initial-letter-align|initial-letter|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-rendering|image-resolution|image-orientation|image|icon|hyphens|hyphenate-limit-zone|hyphenate-limit-lines|hyphenate-limit-last|hyphenate-limit-chars|hyphenate-character|hyphenate|height|header|hanging-punctuation|grid-template-rows|grid-template-columns|grid-template-areas|grid-template|grid-row-start|grid-row-gap|grid-row-end|grid-rows??|grid-gap|grid-column-start|grid-column-gap|grid-column-end|grid-columns??|grid-auto-rows|grid-auto-flow|grid-auto-columns|grid-area|grid|glyph-orientation-vertical|glyph-orientation-horizontal|gap|font-weight|font-variant-position|font-variant-numeric|font-variant-ligatures|font-variant-east-asian|font-variant-caps|font-variant-alternates|font-variant|font-synthesis|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|flow-into|flow-from|flow|flood-opacity|flood-color|float-offset|float|flex-wrap|flex-shrink|flex-grow|flex-group|flex-flow|flex-direction|flex-basis|flex|fit-position|fit|filter|fill-rule|fill-opacity|fill|family|fallback|enable-background|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-model|display|direction|delay|decoration-break|decoration|cy|cx|cursor|cue-before|cue-after|cue|crop|counter-set|counter-reset|counter-increment|counter|count|corner-shape|corners|continue|content|contain|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-rendering|color-profile|color-interpolation-filters|color-interpolation|color-adjust|color|collapse|clip-rule|clip-path|clip|clear|character|caret-shape|caret-color|caret|caption-side|buffered-rendering|break-inside|break-before|break-after|break|box-suppress|box-snap|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom-width|bottom-style|bottom-right-radius|bottom-left-radius|bottom-color|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-limit|border-length|border-left-width|border-left-style|border-left-color|border-left|border-inline-start-width|border-inline-start-style|border-inline-start-color|border-inline-start|border-inline-end-width|border-inline-end-style|border-inline-end-color|border-inline-end|border-image-width|border-image-transform|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-clip-top|border-clip-right|border-clip-left|border-clip-bottom|border-clip|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border-block-start-width|border-block-start-style|border-block-start-color|border-block-start|border-block-end-width|border-block-end-style|border-block-end-color|border-block-end|border|bookmark-target|bookmark-level|bookmark-label|bookmark|block-size|binding|bidi|before|baseline-shift|baseline|balance|background-size|background-repeat|background-position-y|background-position-x|background-position-inline|background-position-block|background-position|background-origin|background-image|background-color|background-clip|background-blend-mode|background-attachment|background|backface-visibility|backdrop-filter|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|alt|all|alignment-baseline|alignment-adjust|alignment|align-last|align-self|align-items|align-content|align|after|adjust|additive-symbols)):\\\\s+","beginCaptures":{"1":{"name":"support.type.property-name.css"}},"end":"(?<=;$)","name":"property.css-template.templ","patterns":[{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"(})(;)$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"},"2":{"name":"punctuation.terminator.rule.css"}},"name":"expression.property.css-template.templ","patterns":[{"include":"source.go"}]},{"captures":{"1":{"name":"support.type.property-value.css"},"2":{"name":"punctuation.terminator.rule.css"}},"match":"(.*)(;)$","name":"constant.property.css-template.templ"}]}]}]},"default-expression":{"begin":"^\\\\s*default:$","captures":{"0":{"name":"default.switch.html-template.templ","patterns":[{"include":"source.go"}]}},"end":"(?:^(\\\\s*case .+?:)|^(\\\\s*default:)|(\\\\s*))$","patterns":[{"include":"#template-node"}]},"element":{"begin":"(<)([-0-:A-Za-z]++)(?=[^>]*></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"}},"end":"(>(<)/)(\\\\2)(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"meta.scope.between-tag-pair.html"},"3":{"name":"entity.name.tag.html"},"4":{"name":"punctuation.definition.tag.html"}},"name":"meta.tag.any.html","patterns":[{"include":"#tag-stuff"}]},"else-expression":{"begin":"\\\\s+(else)\\\\s+(\\\\{)\\\\s*$","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^\\\\s*(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"else.html-template.templ","patterns":[{"include":"#template-node"}]},"else-if-expression":{"begin":"\\\\s(else if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"else-if.html-template.templ","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"name":"expression.else-if.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.else-if.html-template.templ","patterns":[{"include":"#template-node"}]}]},"entities":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)([0-9A-Za-z]+|#[0-9]+|#[Xx]\\\\h+)(;)","name":"constant.character.entity.html"},{"match":"&","name":"invalid.illegal.bad-ampersand.html"}]},"for-expression":{"begin":"^\\\\s*for .+\\\\{","captures":{"0":{"name":"meta.embedded.block.go","patterns":[{"include":"source.go"}]}},"end":"\\\\s*}\\\\s*\\\\n","name":"for.html-template.templ","patterns":[{"include":"#template-node"}]},"go-comment-block":{"begin":"(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"end":"(\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"name":"comment.block.go"},"go-comment-double-slash":{"begin":"(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"end":"\\\\n|$","name":"comment.line.double-slash.go"},"html-comment":{"begin":"<!--","beginCaptures":{"0":{"name":"punctuation.definition.comment.html"}},"end":"-->","endCaptures":{"0":{"name":"punctuation.definition.comment.html"}},"name":"comment.block.html"},"html-template":{"begin":"^(templ) ((?:\\\\((?:[A-Z_a-z][0-9A-Z_a-z]*\\\\s+\\\\*?[A-Z_a-z][0-9A-Z_a-z]*|\\\\*?[A-Z_a-z][0-9A-Z_a-z]*)\\\\)\\\\s*)?[A-Z_a-z][0-9A-Z_a-z]*([(\\\\[]))","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=^}$)","name":"html-template.templ","patterns":[{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\[)","end":"(])","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.square.go"}},"name":"type-params.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s*(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.html-template.templ","patterns":[{"include":"#template-node"}]}]},"if-expression":{"begin":"^\\\\s*(if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"if.html-template.templ","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"name":"expression.if.html-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.if.html-template.templ","patterns":[{"include":"#template-node"}]}]},"import-expression":{"patterns":[{"begin":"(@)((?:[A-z][0-9A-z]*\\\\.)?[A-z][0-9A-z]*(?:[({]|$))","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=\\\\))$|(?<=})$|(?<=$)","name":"import-expression.templ","patterns":[{"begin":"(?<=[0-9A-z]\\\\{)","end":"\\\\s*(})(\\\\.[A-z][0-9A-z]*\\\\()","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"},"2":{"patterns":[{"include":"source.go"}]}},"name":"struct-method.import-expression.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.import-expression.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.brace.open"}},"end":"^\\\\s*(})$","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"children.import-expression.templ","patterns":[{"include":"#template-node"}]}]}]},"inline-element":{"begin":"(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|[qs]|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)(?=[>\\\\\\\\\\\\s]))","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.inline.any.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.any.html","patterns":[{"include":"#tag-stuff"}]},"raw-go":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"start.raw-go.templ"},"1":{"name":"punctuation.brace.open"}},"end":"}}","endCaptures":{"0":{"name":"end.raw-go.templ"},"1":{"name":"punctuation.brace.open"}},"name":"raw-go.templ","patterns":[{"include":"source.go"}]},"script-element":{"begin":"(<)(script)([^>]*)(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.html"}},"end":"<\/script>","endCaptures":{"0":{"patterns":[{"include":"#close-element"}]}},"name":"meta.tag.script.html","patterns":[{"include":"source.js"}]},"script-template":{"begin":"^(script) ([A-z][0-9A-z]*\\\\()","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"source.go"}]}},"end":"(?<=^}$)","name":"script-template.templ","patterns":[{"begin":"(?<=\\\\()","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.round.go"}},"name":"params.script-template.templ","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\))\\\\s*(\\\\{)$","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"^(})$","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.curly.go"}},"name":"block.script-template.templ","patterns":[{"include":"source.js"}]}]},"sgml":{"begin":"<!","captures":{"0":{"name":"punctuation.definition.tag.html"}},"end":">","name":"meta.tag.sgml.html","patterns":[{"begin":"(?i:DOCTYPE)","captures":{"1":{"name":"entity.name.tag.doctype.html"}},"end":"(?=>)","name":"meta.tag.sgml.doctype.html","patterns":[{"match":"\\"[^\\">]*\\"","name":"string.quoted.double.doctype.identifiers-and-DTDs.html"}]},{"begin":"\\\\[CDATA\\\\[","end":"]](?=>)","name":"constant.other.inline-data.html"},{"match":"(\\\\s*)(?!--|>)\\\\S(\\\\s*)","name":"invalid.illegal.bad-comments-or-CDATA.html"}]},"string-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},"string-expression":{"begin":"\\\\{\\\\s+","beginCaptures":{"0":{"name":"start.string-expression.templ"}},"end":"}","endCaptures":{"0":{"name":"end.string-expression.templ"}},"name":"expression.html-template.templ","patterns":[{"include":"source.go"}]},"style-element":{"begin":"(<)(style)([^>]*)(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.html"}},"end":"</style>","endCaptures":{"0":{"patterns":[{"include":"#close-element"}]}},"name":"meta.tag.style.html","patterns":[{"include":"source.css"}]},"switch-expression":{"begin":"^\\\\s*switch .+?\\\\{$","captures":{"0":{"name":"meta.embedded.block.go","patterns":[{"include":"source.go"}]}},"end":"^\\\\s*}$","name":"switch.html-template.templ","patterns":[{"include":"#template-node"},{"include":"#case-expression"},{"include":"#default-expression"}]},"tag-else-attribute":{"begin":"\\\\s(else)\\\\s(\\\\{)$","beginCaptures":{"1":{"name":"keyword.control.go"},"2":{"name":"punctuation.brace.open"}},"end":"^\\\\s*(})$","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"else.attribute.html","patterns":[{"include":"#tag-stuff"}]},"tag-else-if-attribute":{"begin":"\\\\s(else if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"else-if.attribute.html","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.brace.open"}},"name":"expression.else-if.attribute.html","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"block.else-if.attribute.html","patterns":[{"include":"#tag-stuff"}]}]},"tag-generic-attribute":{"match":"(?<=[^=])\\\\b([-0-:A-Za-z]+)","name":"entity.other.attribute-name.html"},"tag-id-attribute":{"begin":"\\\\b(id)\\\\b\\\\s*(=)","captures":{"1":{"name":"entity.other.attribute-name.id.html"},"2":{"name":"punctuation.separator.key-value.html"}},"end":"(?!\\\\G)(?<=[\\"'[^/<>\\\\s]])","name":"meta.attribute-with-value.id.html","patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#entities"}]},{"captures":{"0":{"name":"meta.toc-list.id.html"}},"match":"(?<==)(?:[^\\"'/<>{}\\\\s]|/(?!>))+","name":"string.unquoted.html"}]},"tag-if-attribute":{"begin":"^\\\\s*(if)\\\\s","beginCaptures":{"1":{"name":"keyword.control.go"}},"end":"(?<=})","name":"if.attribute.html","patterns":[{"begin":"(?<=if\\\\s)","end":"(\\\\{)$","endCaptures":{"1":{"name":"punctuation.brace.open"}},"name":"expression.if.attribute.html","patterns":[{"include":"source.go"}]},{"begin":"(?<=\\\\{)$","end":"^\\\\s*(})","endCaptures":{"1":{"name":"punctuation.brace.close"}},"name":"block.if.attribute.html","patterns":[{"include":"#tag-stuff"}]}]},"tag-stuff":{"patterns":[{"include":"#tag-id-attribute"},{"include":"#tag-generic-attribute"},{"include":"#string-double-quoted"},{"include":"#string-expression"},{"include":"#tag-if-attribute"},{"include":"#tag-else-if-attribute"},{"include":"#tag-else-attribute"}]},"template-node":{"patterns":[{"include":"#string-expression"},{"include":"#call-expression"},{"include":"#import-expression"},{"include":"#script-element"},{"include":"#style-element"},{"include":"#element"},{"include":"#html-comment"},{"include":"#go-comment-block"},{"include":"#go-comment-double-slash"},{"include":"#sgml"},{"include":"#block-element"},{"include":"#inline-element"},{"include":"#close-element"},{"include":"#else-if-expression"},{"include":"#if-expression"},{"include":"#else-expression"},{"include":"#for-expression"},{"include":"#switch-expression"},{"include":"#raw-go"}]}},"scopeName":"source.templ","embeddedLangs":["go","javascript","css"]}`)),s=[...e,...t,...n,i];export{s as default};
|
package/client/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-fmAV9I4T.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BMlcL898.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-canary.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -61,6 +61,9 @@
|
|
|
61
61
|
"./package.json"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
+
"@tanstack/query-persist-client-core": "^5.85.5",
|
|
65
|
+
"@tanstack/query-sync-storage-persister": "^5.85.5",
|
|
66
|
+
"@tanstack/react-query": "^5.85.5",
|
|
64
67
|
"@types/node": "^24.2.1",
|
|
65
68
|
"compression": "^1.8.0",
|
|
66
69
|
"cookie-parser": "^1.4.7",
|
|
@@ -74,14 +77,15 @@
|
|
|
74
77
|
"react-dom": "^19.1.1",
|
|
75
78
|
"react-router-dom": "^7.4.0",
|
|
76
79
|
"rimraf": "^6.0.1",
|
|
77
|
-
"@intlayer/
|
|
78
|
-
"@intlayer/
|
|
79
|
-
"@intlayer/api": "
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
80
|
+
"@intlayer/core": "6.0.0-canary.1",
|
|
81
|
+
"@intlayer/config": "6.0.0-canary.1",
|
|
82
|
+
"@intlayer/api": "6.0.0-canary.1",
|
|
83
|
+
"express-intlayer": "6.0.0-canary.1",
|
|
84
|
+
"react-intlayer": "6.0.0-canary.1",
|
|
85
|
+
"vite-intlayer": "6.0.0-canary.1",
|
|
86
|
+
"@intlayer/design-system": "6.0.0-canary.1",
|
|
87
|
+
"@intlayer/editor-react": "6.0.0-canary.1",
|
|
88
|
+
"@intlayer/unmerged-dictionaries-entry": "6.0.0-canary.1"
|
|
85
89
|
},
|
|
86
90
|
"devDependencies": {
|
|
87
91
|
"@tailwindcss/vite": "^4.0.14",
|
|
@@ -91,7 +95,7 @@
|
|
|
91
95
|
"@types/react-dom": "^19.1.6",
|
|
92
96
|
"@vitejs/plugin-react": "^5.0.0",
|
|
93
97
|
"autoprefixer": "^10.4.21",
|
|
94
|
-
"eslint": "^9.
|
|
98
|
+
"eslint": "^9.34.0",
|
|
95
99
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
96
100
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
97
101
|
"globals": "^16.2.0",
|
|
@@ -102,11 +106,10 @@
|
|
|
102
106
|
"typescript": "~5.8.2",
|
|
103
107
|
"typescript-eslint": "^8.27.0",
|
|
104
108
|
"vite": "^7.1.2",
|
|
105
|
-
"vitest": "^3.2.
|
|
106
|
-
"@intlayer/backend": "5.8.1"
|
|
109
|
+
"vitest": "^3.2.4"
|
|
107
110
|
},
|
|
108
111
|
"peerDependencies": {
|
|
109
|
-
"@types/compression": "^1.
|
|
112
|
+
"@types/compression": "^1.8.1",
|
|
110
113
|
"@types/cookie-parser": "^1.4.8",
|
|
111
114
|
"clsx": "^2.1.1",
|
|
112
115
|
"framer-motion": "^12.16.0",
|
|
@@ -114,15 +117,16 @@
|
|
|
114
117
|
"react-dom": ">=16.0.0",
|
|
115
118
|
"react-router-dom": ">=6.0.0",
|
|
116
119
|
"tailwind-merge": "^3.3.0",
|
|
117
|
-
"@intlayer/core": "
|
|
118
|
-
"@intlayer/
|
|
119
|
-
"@intlayer/
|
|
120
|
-
"react
|
|
121
|
-
"@intlayer/
|
|
122
|
-
"intlayer": "
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"@intlayer/
|
|
120
|
+
"@intlayer/core": "6.0.0-canary.1",
|
|
121
|
+
"@intlayer/dictionaries-entry": "6.0.0-canary.1",
|
|
122
|
+
"@intlayer/chokidar": "6.0.0-canary.1",
|
|
123
|
+
"@intlayer/editor-react": "6.0.0-canary.1",
|
|
124
|
+
"@intlayer/unmerged-dictionaries-entry": "6.0.0-canary.1",
|
|
125
|
+
"@intlayer/design-system": "6.0.0-canary.1",
|
|
126
|
+
"intlayer": "6.0.0-canary.1",
|
|
127
|
+
"vite-intlayer": "6.0.0-canary.1",
|
|
128
|
+
"@intlayer/config": "6.0.0-canary.1",
|
|
129
|
+
"react-intlayer": "6.0.0-canary.1"
|
|
126
130
|
},
|
|
127
131
|
"engines": {
|
|
128
132
|
"node": ">=14.18"
|
|
@@ -34,13 +34,13 @@ __export(dictionary_controller_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(dictionary_controller_exports);
|
|
35
35
|
var import_chokidar = require("@intlayer/chokidar");
|
|
36
36
|
var import_config = require("@intlayer/config");
|
|
37
|
-
var
|
|
37
|
+
var import_unmerged_dictionaries_entry = __toESM(require("@intlayer/unmerged-dictionaries-entry"), 1);
|
|
38
38
|
var import_responseData = require('./../utils/responseData.cjs');
|
|
39
39
|
var import_express_intlayer = require("express-intlayer");
|
|
40
40
|
const getDictionaries = async (_req, res, _next) => {
|
|
41
41
|
try {
|
|
42
42
|
const formattedResponse = (0, import_responseData.formatResponse)({
|
|
43
|
-
data:
|
|
43
|
+
data: import_unmerged_dictionaries_entry.default
|
|
44
44
|
});
|
|
45
45
|
res.json(formattedResponse);
|
|
46
46
|
return;
|
|
@@ -84,9 +84,9 @@ const writeContentDeclaration = async (req, res, _next) => {
|
|
|
84
84
|
});
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
|
-
case "
|
|
87
|
+
case "new content file": {
|
|
88
88
|
description = (0, import_express_intlayer.t)({
|
|
89
|
-
en: "Content declaration
|
|
89
|
+
en: "Content declaration new content file successfully",
|
|
90
90
|
fr: "D\xE9claration de contenu r\xE9import\xE9e dans un nouveau emplacement avec succ\xE8s",
|
|
91
91
|
es: "Declaraci\xF3n de contenido reimportada en un nuevo lugar con \xE9xito"
|
|
92
92
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n writeContentDeclaration as writeContentDeclarationEditor,\n type DictionaryStatus,\n} from '@intlayer/chokidar';\nimport { getConfiguration } from '@intlayer/config';\nimport { type Dictionary } from '@intlayer/core';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n writeContentDeclaration as writeContentDeclarationEditor,\n type DictionaryStatus,\n} from '@intlayer/chokidar';\nimport { getConfiguration } from '@intlayer/config';\nimport { type Dictionary } from '@intlayer/core';\nimport unmergedDictionaries from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { NextFunction, Request, Response } from 'express';\nimport { t } from 'express-intlayer';\n\ntype GetDictionariesResult = ResponseData<typeof unmergedDictionaries>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getDictionaries = async (\n _req: Request,\n res: Response<GetDictionariesResult>,\n _next: NextFunction\n): Promise<void> => {\n try {\n const formattedResponse = formatResponse<typeof unmergedDictionaries>({\n data: unmergedDictionaries,\n });\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<typeof unmergedDictionaries>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n res.json(formattedErrorResponse);\n return;\n }\n};\n\nexport type WriteContentDeclarationBody = { dictionary: Dictionary };\ntype WriteContentDeclarationResultData = {\n status: DictionaryStatus;\n path: string;\n};\nexport type WriteContentDeclarationResult =\n ResponseData<WriteContentDeclarationResultData>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const writeContentDeclaration = async (\n req: Request<any, any, WriteContentDeclarationBody>,\n res: Response<WriteContentDeclarationResult>,\n _next: NextFunction\n): Promise<void> => {\n try {\n const dictionaryData = req.body.dictionary;\n\n const config = getConfiguration();\n\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n let description = '';\n\n switch (result.status) {\n case 'updated': {\n description = t({\n en: 'Content declaration updated successfully',\n fr: 'Déclaration de contenu mise à jour avec succès',\n es: 'Declaración de contenido actualizada con éxito',\n });\n break;\n }\n case 'reimported in JSON': {\n description = t({\n en: 'Content declaration reimported in JSON successfully',\n fr: 'Déclaration de contenu réimportée en JSON avec succès',\n es: 'Declaración de contenido reimportada en JSON con éxito',\n });\n break;\n }\n case 'new content file': {\n description = t({\n en: 'Content declaration new content file successfully',\n fr: 'Déclaration de contenu réimportée dans un nouveau emplacement avec succès',\n es: 'Declaración de contenido reimportada en un nuevo lugar con éxito',\n });\n break;\n }\n default: {\n description = t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n });\n break;\n }\n }\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n message: t({\n en: 'Content declaration written',\n fr: 'Déclaration de contenu écrite',\n es: 'Declaración de contenido escrita',\n }),\n description: t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n }),\n }\n );\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n console.error(errorMessage);\n\n const formattedErrorResponse =\n formatResponse<WriteContentDeclarationResultData>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n res.json(formattedErrorResponse);\n return;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAGO;AACP,oBAAiC;AAEjC,yCAAiC;AACjC,0BAAkD;AAElD,8BAAkB;AAOX,MAAM,kBAAkB,OAC7B,MACA,KACA,UACkB;AAClB,MAAI;AACF,UAAM,wBAAoB,oCAA4C;AAAA,MACpE,MAAM,mCAAAA;AAAA,IACR,CAAC;AAED,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eAAgB,OAAiD;AAAA,MACrE,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAEA,UAAM,6BAAyB,oCAA4C;AAAA,MACzE,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAED,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;AAaO,MAAM,0BAA0B,OACrC,KACA,KACA,UACkB;AAClB,MAAI;AACF,UAAM,iBAAiB,IAAI,KAAK;AAEhC,UAAM,aAAS,gCAAiB;AAEhC,UAAM,SAAS,UAAM,gBAAAC,yBAA8B,gBAAgB,MAAM;AAEzE,QAAI,cAAc;AAElB,YAAQ,OAAO,QAAQ;AAAA,MACrB,KAAK,WAAW;AACd,0BAAc,2BAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,MACA,KAAK,sBAAsB;AACzB,0BAAc,2BAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,MACA,KAAK,oBAAoB;AACvB,0BAAc,2BAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,MACA,SAAS;AACP,0BAAc,2BAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,IACF;AAEA,UAAM,wBAAoB;AAAA,MACxB;AAAA,QACE,MAAM;AAAA,QACN,aAAS,2BAAE;AAAA,UACT,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AAAA,QACD,iBAAa,2BAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AAAA,MACH;AAAA,IACF;AAEA,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eAAgB,OAAiD;AAAA,MACrE,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAEA,YAAQ,MAAM,YAAY;AAE1B,UAAM,6BACJ,oCAAkD;AAAA,MAChD,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAEH,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;","names":["unmergedDictionaries","writeContentDeclarationEditor"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type DictionaryStatus } from '@intlayer/chokidar';
|
|
2
2
|
import { type Dictionary } from '@intlayer/core';
|
|
3
|
+
import unmergedDictionaries from '@intlayer/unmerged-dictionaries-entry';
|
|
3
4
|
import { type ResponseData } from '../utils/responseData';
|
|
4
5
|
import type { NextFunction, Request, Response } from 'express';
|
|
5
|
-
type GetDictionariesResult = ResponseData<
|
|
6
|
+
type GetDictionariesResult = ResponseData<typeof unmergedDictionaries>;
|
|
6
7
|
/**
|
|
7
8
|
* Get the Intlayer configuration
|
|
8
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/dictionary.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"dictionary.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/dictionary.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,oBAAoB,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG/D,KAAK,qBAAqB,GAAG,YAAY,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,OAAO,EACb,KAAK,QAAQ,CAAC,qBAAqB,CAAC,EACpC,OAAO,YAAY,KAClB,OAAO,CAAC,IAAI,CA0Bd,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC;AACrE,KAAK,iCAAiC,GAAG;IACvC,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,6BAA6B,GACvC,YAAY,CAAC,iCAAiC,CAAC,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,KAAK,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,2BAA2B,CAAC,EACnD,KAAK,QAAQ,CAAC,6BAA6B,CAAC,EAC5C,OAAO,YAAY,KAClB,OAAO,CAAC,IAAI,CAoFd,CAAC"}
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
writeContentDeclaration as writeContentDeclarationEditor
|
|
3
3
|
} from "@intlayer/chokidar";
|
|
4
4
|
import { getConfiguration } from "@intlayer/config";
|
|
5
|
-
import
|
|
5
|
+
import unmergedDictionaries from "@intlayer/unmerged-dictionaries-entry";
|
|
6
6
|
import { formatResponse } from "./../utils/responseData.mjs";
|
|
7
7
|
import { t } from "express-intlayer";
|
|
8
8
|
const getDictionaries = async (_req, res, _next) => {
|
|
9
9
|
try {
|
|
10
10
|
const formattedResponse = formatResponse({
|
|
11
|
-
data:
|
|
11
|
+
data: unmergedDictionaries
|
|
12
12
|
});
|
|
13
13
|
res.json(formattedResponse);
|
|
14
14
|
return;
|
|
@@ -52,9 +52,9 @@ const writeContentDeclaration = async (req, res, _next) => {
|
|
|
52
52
|
});
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
|
-
case "
|
|
55
|
+
case "new content file": {
|
|
56
56
|
description = t({
|
|
57
|
-
en: "Content declaration
|
|
57
|
+
en: "Content declaration new content file successfully",
|
|
58
58
|
fr: "D\xE9claration de contenu r\xE9import\xE9e dans un nouveau emplacement avec succ\xE8s",
|
|
59
59
|
es: "Declaraci\xF3n de contenido reimportada en un nuevo lugar con \xE9xito"
|
|
60
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n writeContentDeclaration as writeContentDeclarationEditor,\n type DictionaryStatus,\n} from '@intlayer/chokidar';\nimport { getConfiguration } from '@intlayer/config';\nimport { type Dictionary } from '@intlayer/core';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n writeContentDeclaration as writeContentDeclarationEditor,\n type DictionaryStatus,\n} from '@intlayer/chokidar';\nimport { getConfiguration } from '@intlayer/config';\nimport { type Dictionary } from '@intlayer/core';\nimport unmergedDictionaries from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { NextFunction, Request, Response } from 'express';\nimport { t } from 'express-intlayer';\n\ntype GetDictionariesResult = ResponseData<typeof unmergedDictionaries>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getDictionaries = async (\n _req: Request,\n res: Response<GetDictionariesResult>,\n _next: NextFunction\n): Promise<void> => {\n try {\n const formattedResponse = formatResponse<typeof unmergedDictionaries>({\n data: unmergedDictionaries,\n });\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<typeof unmergedDictionaries>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n res.json(formattedErrorResponse);\n return;\n }\n};\n\nexport type WriteContentDeclarationBody = { dictionary: Dictionary };\ntype WriteContentDeclarationResultData = {\n status: DictionaryStatus;\n path: string;\n};\nexport type WriteContentDeclarationResult =\n ResponseData<WriteContentDeclarationResultData>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const writeContentDeclaration = async (\n req: Request<any, any, WriteContentDeclarationBody>,\n res: Response<WriteContentDeclarationResult>,\n _next: NextFunction\n): Promise<void> => {\n try {\n const dictionaryData = req.body.dictionary;\n\n const config = getConfiguration();\n\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n let description = '';\n\n switch (result.status) {\n case 'updated': {\n description = t({\n en: 'Content declaration updated successfully',\n fr: 'Déclaration de contenu mise à jour avec succès',\n es: 'Declaración de contenido actualizada con éxito',\n });\n break;\n }\n case 'reimported in JSON': {\n description = t({\n en: 'Content declaration reimported in JSON successfully',\n fr: 'Déclaration de contenu réimportée en JSON avec succès',\n es: 'Declaración de contenido reimportada en JSON con éxito',\n });\n break;\n }\n case 'new content file': {\n description = t({\n en: 'Content declaration new content file successfully',\n fr: 'Déclaration de contenu réimportée dans un nouveau emplacement avec succès',\n es: 'Declaración de contenido reimportada en un nuevo lugar con éxito',\n });\n break;\n }\n default: {\n description = t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n });\n break;\n }\n }\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n message: t({\n en: 'Content declaration written',\n fr: 'Déclaration de contenu écrite',\n es: 'Declaración de contenido escrita',\n }),\n description: t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n }),\n }\n );\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n console.error(errorMessage);\n\n const formattedErrorResponse =\n formatResponse<WriteContentDeclarationResultData>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n res.json(formattedErrorResponse);\n return;\n }\n};\n"],"mappings":"AAAA;AAAA,EACE,2BAA2B;AAAA,OAEtB;AACP,SAAS,wBAAwB;AAEjC,OAAO,0BAA0B;AACjC,SAAS,sBAAyC;AAElD,SAAS,SAAS;AAOX,MAAM,kBAAkB,OAC7B,MACA,KACA,UACkB;AAClB,MAAI;AACF,UAAM,oBAAoB,eAA4C;AAAA,MACpE,MAAM;AAAA,IACR,CAAC;AAED,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eAAgB,OAAiD;AAAA,MACrE,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAEA,UAAM,yBAAyB,eAA4C;AAAA,MACzE,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAED,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;AAaO,MAAM,0BAA0B,OACrC,KACA,KACA,UACkB;AAClB,MAAI;AACF,UAAM,iBAAiB,IAAI,KAAK;AAEhC,UAAM,SAAS,iBAAiB;AAEhC,UAAM,SAAS,MAAM,8BAA8B,gBAAgB,MAAM;AAEzE,QAAI,cAAc;AAElB,YAAQ,OAAO,QAAQ;AAAA,MACrB,KAAK,WAAW;AACd,sBAAc,EAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,MACA,KAAK,sBAAsB;AACzB,sBAAc,EAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,MACA,KAAK,oBAAoB;AACvB,sBAAc,EAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,MACA,SAAS;AACP,sBAAc,EAAE;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AACD;AAAA,MACF;AAAA,IACF;AAEA,UAAM,oBAAoB;AAAA,MACxB;AAAA,QACE,MAAM;AAAA,QACN,SAAS,EAAE;AAAA,UACT,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AAAA,QACD,aAAa,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN,CAAC;AAAA,MACH;AAAA,IACF;AAEA,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eAAgB,OAAiD;AAAA,MACrE,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAEA,YAAQ,MAAM,YAAY;AAE1B,UAAM,yBACJ,eAAkD;AAAA,MAChD,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAEH,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;","names":[]}
|
|
Binary file
|