dsh-diff-approval 0.4.0 → 0.5.0
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/lib/client.js +357 -102
- package/lib/types/client/highlight.d.ts +11 -1
- package/lib/types/client/locales.d.ts +4 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -11296,6 +11296,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11296
11296
|
//#endregion
|
|
11297
11297
|
//#region node_modules/.pnpm/@shikijs+langs@4.4.3/node_modules/@shikijs/langs/dist/scss.mjs
|
|
11298
11298
|
const lang$1 = Object.freeze(JSON.parse("{\"displayName\":\"SCSS\",\"name\":\"scss\",\"patterns\":[{\"include\":\"#variable_setting\"},{\"include\":\"#at_rule_forward\"},{\"include\":\"#at_rule_use\"},{\"include\":\"#at_rule_include\"},{\"include\":\"#at_rule_import\"},{\"include\":\"#general\"},{\"include\":\"#flow_control\"},{\"include\":\"#rules\"},{\"include\":\"#property_list\"},{\"include\":\"#at_rule_mixin\"},{\"include\":\"#at_rule_media\"},{\"include\":\"#at_rule_function\"},{\"include\":\"#at_rule_charset\"},{\"include\":\"#at_rule_option\"},{\"include\":\"#at_rule_namespace\"},{\"include\":\"#at_rule_fontface\"},{\"include\":\"#at_rule_page\"},{\"include\":\"#at_rule_keyframes\"},{\"include\":\"#at_rule_at_root\"},{\"include\":\"#at_rule_supports\"},{\"match\":\";\",\"name\":\"punctuation.terminator.rule.css\"}],\"repository\":{\"at_rule_at_root\":{\"begin\":\"\\\\s*((@)(at-root))(\\\\s+|$)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.at-rule.at-root.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.at-root.scss\",\"patterns\":[{\"include\":\"#function_attributes\"},{\"include\":\"#functions\"},{\"include\":\"#selectors\"}]},\"at_rule_charset\":{\"begin\":\"\\\\s*((@)charset)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.charset.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*((?=;|$))\",\"name\":\"meta.at-rule.charset.scss\",\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#string_single\"},{\"include\":\"#string_double\"}]},\"at_rule_content\":{\"begin\":\"\\\\s*((@)content)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.content.scss\"}},\"end\":\"\\\\s*((?=;))\",\"name\":\"meta.content.scss\",\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#selectors\"},{\"include\":\"#property_values\"}]},\"at_rule_each\":{\"begin\":\"\\\\s*((@)each)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.each.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*((?=}))\",\"name\":\"meta.at-rule.each.scss\",\"patterns\":[{\"match\":\"\\\\b(in|,)\\\\b\",\"name\":\"keyword.control.operator\"},{\"include\":\"#variable\"},{\"include\":\"#property_values\"},{\"include\":\"$self\"}]},\"at_rule_else\":{\"begin\":\"\\\\s*((@)else(\\\\s*(if)?))\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.else.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.else.scss\",\"patterns\":[{\"include\":\"#conditional_operators\"},{\"include\":\"#variable\"},{\"include\":\"#property_values\"}]},\"at_rule_extend\":{\"begin\":\"\\\\s*((@)extend)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.extend.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=;)\",\"name\":\"meta.at-rule.extend.scss\",\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#selectors\"},{\"include\":\"#property_values\"}]},\"at_rule_fontface\":{\"patterns\":[{\"begin\":\"^\\\\s*((@)font-face)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.at-rule.fontface.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.fontface.scss\",\"patterns\":[{\"include\":\"#function_attributes\"}]}]},\"at_rule_for\":{\"begin\":\"\\\\s*((@)for)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.for.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.for.scss\",\"patterns\":[{\"match\":\"(==|!=|<=|>=|[<>]|from|to|through)\",\"name\":\"keyword.control.operator\"},{\"include\":\"#variable\"},{\"include\":\"#property_values\"},{\"include\":\"$self\"}]},\"at_rule_forward\":{\"begin\":\"\\\\s*((@)forward)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.forward.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=;)\",\"name\":\"meta.at-rule.forward.scss\",\"patterns\":[{\"match\":\"\\\\b(as|hide|show)\\\\b\",\"name\":\"keyword.control.operator\"},{\"captures\":{\"1\":{\"name\":\"entity.other.attribute-name.module.scss\"},\"2\":{\"name\":\"punctuation.definition.wildcard.scss\"}},\"match\":\"\\\\b([-\\\\w]+)(\\\\*)\"},{\"match\":\"\\\\b[-\\\\w]+\\\\b\",\"name\":\"entity.name.function.scss\"},{\"include\":\"#variable\"},{\"include\":\"#string_single\"},{\"include\":\"#string_double\"},{\"include\":\"#comment_line\"},{\"include\":\"#comment_block\"}]},\"at_rule_function\":{\"patterns\":[{\"begin\":\"\\\\s*((@)function)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.function.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"},\"3\":{\"name\":\"entity.name.function.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.function.scss\",\"patterns\":[{\"include\":\"#function_attributes\"}]},{\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.function.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"},\"3\":{\"name\":\"entity.name.function.scss\"}},\"match\":\"\\\\s*((@)function)\\\\b\\\\s*\",\"name\":\"meta.at-rule.function.scss\"}]},\"at_rule_if\":{\"begin\":\"\\\\s*((@)if)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.if.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.if.scss\",\"patterns\":[{\"include\":\"#conditional_operators\"},{\"include\":\"#variable\"},{\"include\":\"#property_values\"}]},\"at_rule_import\":{\"begin\":\"\\\\s*((@)import)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.import.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*((?=;)|(?=}))\",\"name\":\"meta.at-rule.import.scss\",\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#string_single\"},{\"include\":\"#string_double\"},{\"include\":\"#functions\"},{\"include\":\"#comment_line\"}]},\"at_rule_include\":{\"patterns\":[{\"begin\":\"(?<=@include)\\\\s+(?:([-\\\\w]+)\\\\s*(\\\\.))?([-\\\\w]+)\\\\s*(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"variable.scss\"},\"2\":{\"name\":\"punctuation.access.module.scss\"},\"3\":{\"name\":\"entity.name.function.scss\"},\"4\":{\"name\":\"punctuation.definition.parameters.begin.bracket.round.scss\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.end.bracket.round.scss\"}},\"name\":\"meta.at-rule.include.scss\",\"patterns\":[{\"include\":\"#function_attributes\"}]},{\"captures\":{\"0\":{\"name\":\"meta.at-rule.include.scss\"},\"1\":{\"name\":\"variable.scss\"},\"2\":{\"name\":\"punctuation.access.module.scss\"},\"3\":{\"name\":\"entity.name.function.scss\"}},\"match\":\"(?<=@include)\\\\s+(?:([-\\\\w]+)\\\\s*(\\\\.))?([-\\\\w]+)\"},{\"captures\":{\"0\":{\"name\":\"meta.at-rule.include.scss\"},\"1\":{\"name\":\"keyword.control.at-rule.include.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"match\":\"((@)include)\\\\b\"}]},\"at_rule_keyframes\":{\"begin\":\"(?<=^|\\\\s)(@)(?:-(?:webkit|moz)-)?keyframes\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.control.at-rule.keyframes.scss\"},\"1\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"(?<=})\",\"name\":\"meta.at-rule.keyframes.scss\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"entity.name.function.scss\"}},\"match\":\"(?<=@keyframes)\\\\s+((?:[A-Z_a-z][-\\\\w]|-[A-Z_a-z])[-\\\\w]*)\"},{\"begin\":\"(?<=@keyframes)\\\\s+(\\\")\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.string.begin.scss\"}},\"contentName\":\"entity.name.function.scss\",\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.scss\"}},\"name\":\"string.quoted.double.scss\",\"patterns\":[{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"include\":\"#interpolation\"}]},{\"begin\":\"(?<=@keyframes)\\\\s+(')\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.string.begin.scss\"}},\"contentName\":\"entity.name.function.scss\",\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.scss\"}},\"name\":\"string.quoted.single.scss\",\"patterns\":[{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"include\":\"#interpolation\"}]},{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.keyframes.begin.scss\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.keyframes.end.scss\"}},\"patterns\":[{\"match\":\"\\\\b(?:(?:100|[1-9]\\\\d|\\\\d)%|from|to)(?=\\\\s*\\\\{)\",\"name\":\"entity.other.attribute-name.scss\"},{\"include\":\"#flow_control\"},{\"include\":\"#interpolation\"},{\"include\":\"#property_list\"},{\"include\":\"#rules\"}]}]},\"at_rule_media\":{\"patterns\":[{\"begin\":\"^\\\\s*((@)media)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.at-rule.media.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.media.scss\",\"patterns\":[{\"include\":\"#comment_docblock\"},{\"include\":\"#comment_block\"},{\"include\":\"#comment_line\"},{\"match\":\"\\\\b(only)\\\\b\",\"name\":\"keyword.control.operator.css.scss\"},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.media-query.begin.bracket.round.scss\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.media-query.end.bracket.round.scss\"}},\"name\":\"meta.property-list.media-query.scss\",\"patterns\":[{\"begin\":\"(?<![-a-z])(?=[-a-z])\",\"end\":\"$|(?![-a-z])\",\"name\":\"meta.property-name.media-query.scss\",\"patterns\":[{\"include\":\"source.css#media-features\"},{\"include\":\"source.css#property-names\"}]},{\"begin\":\"(:)\\\\s*(?!(\\\\s*\\\\{))\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.separator.key-value.scss\"}},\"contentName\":\"meta.property-value.media-query.scss\",\"end\":\"\\\\s*(;|(?=[)}]))\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.terminator.rule.scss\"}},\"patterns\":[{\"include\":\"#general\"},{\"include\":\"#property_values\"}]}]},{\"include\":\"#variable\"},{\"include\":\"#conditional_operators\"},{\"include\":\"source.css#media-types\"}]}]},\"at_rule_mixin\":{\"patterns\":[{\"begin\":\"(?<=@mixin)\\\\s+([-\\\\w]+)\\\\s*(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.scss\"},\"2\":{\"name\":\"punctuation.definition.parameters.begin.bracket.round.scss\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.end.bracket.round.scss\"}},\"name\":\"meta.at-rule.mixin.scss\",\"patterns\":[{\"include\":\"#function_attributes\"}]},{\"captures\":{\"1\":{\"name\":\"entity.name.function.scss\"}},\"match\":\"(?<=@mixin)\\\\s+([-\\\\w]+)\",\"name\":\"meta.at-rule.mixin.scss\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.mixin.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"match\":\"((@)mixin)\\\\b\",\"name\":\"meta.at-rule.mixin.scss\"}]},\"at_rule_namespace\":{\"patterns\":[{\"begin\":\"(?<=@namespace)\\\\s+(?=url)\",\"end\":\"(?=;|$)\",\"name\":\"meta.at-rule.namespace.scss\",\"patterns\":[{\"include\":\"#property_values\"},{\"include\":\"#string_single\"},{\"include\":\"#string_double\"}]},{\"begin\":\"(?<=@namespace)\\\\s+([-\\\\w]*)\",\"captures\":{\"1\":{\"name\":\"entity.name.namespace-prefix.scss\"}},\"end\":\"(?=;|$)\",\"name\":\"meta.at-rule.namespace.scss\",\"patterns\":[{\"include\":\"#variables\"},{\"include\":\"#property_values\"},{\"include\":\"#string_single\"},{\"include\":\"#string_double\"}]},{\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.namespace.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"match\":\"((@)namespace)\\\\b\",\"name\":\"meta.at-rule.namespace.scss\"}]},\"at_rule_option\":{\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.charset.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"match\":\"^\\\\s*((@)option)\\\\b\\\\s*\",\"name\":\"meta.at-rule.option.scss\"},\"at_rule_page\":{\"patterns\":[{\"begin\":\"^\\\\s*((@)page)(?=[:\\\\s])\\\\s*([-:\\\\w]*)\",\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.page.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"},\"3\":{\"name\":\"entity.name.function.scss\"}},\"end\":\"\\\\s*(?=\\\\{)\",\"name\":\"meta.at-rule.page.scss\"}]},\"at_rule_return\":{\"begin\":\"\\\\s*((@)(return))\\\\b\",\"captures\":{\"1\":{\"name\":\"keyword.control.return.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*((?=;))\",\"name\":\"meta.at-rule.return.scss\",\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#property_values\"}]},\"at_rule_supports\":{\"begin\":\"(?<=^|\\\\s)(@)supports\\\\b\",\"captures\":{\"0\":{\"name\":\"keyword.control.at-rule.supports.scss\"},\"1\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"(?=\\\\{)|$\",\"name\":\"meta.at-rule.supports.scss\",\"patterns\":[{\"include\":\"#logical_operators\"},{\"include\":\"#properties\"},{\"match\":\"\\\\(\",\"name\":\"punctuation.definition.condition.begin.bracket.round.scss\"},{\"match\":\"\\\\)\",\"name\":\"punctuation.definition.condition.end.bracket.round.scss\"}]},\"at_rule_use\":{\"begin\":\"\\\\s*((@)use)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.at-rule.use.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=;)\",\"name\":\"meta.at-rule.use.scss\",\"patterns\":[{\"match\":\"\\\\b(as|with)\\\\b\",\"name\":\"keyword.control.operator\"},{\"match\":\"\\\\b[-\\\\w]+\\\\b\",\"name\":\"variable.scss\"},{\"match\":\"\\\\*\",\"name\":\"variable.language.expanded-namespace.scss\"},{\"include\":\"#string_single\"},{\"include\":\"#string_double\"},{\"include\":\"#comment_line\"},{\"include\":\"#comment_block\"},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.begin.bracket.round.scss\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.end.bracket.round.scss\"}},\"patterns\":[{\"include\":\"#function_attributes\"}]}]},\"at_rule_warn\":{\"begin\":\"\\\\s*((@)(warn|debug|error))\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.warn.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=;)\",\"name\":\"meta.at-rule.warn.scss\",\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#string_double\"},{\"include\":\"#string_single\"}]},\"at_rule_while\":{\"begin\":\"\\\\s*((@)while)\\\\b\\\\s*\",\"captures\":{\"1\":{\"name\":\"keyword.control.while.scss\"},\"2\":{\"name\":\"punctuation.definition.keyword.scss\"}},\"end\":\"\\\\s*(?=})\",\"name\":\"meta.at-rule.while.scss\",\"patterns\":[{\"include\":\"#conditional_operators\"},{\"include\":\"#variable\"},{\"include\":\"#property_values\"},{\"include\":\"$self\"}]},\"comment_block\":{\"begin\":\"/\\\\*\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.scss\"}},\"end\":\"\\\\*/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.scss\"}},\"name\":\"comment.block.scss\"},\"comment_docblock\":{\"begin\":\"///\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.scss\"}},\"end\":\"(?=$)\",\"name\":\"comment.block.documentation.scss\",\"patterns\":[{\"include\":\"source.sassdoc\"}]},\"comment_line\":{\"begin\":\"//\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.scss\"}},\"end\":\"\\\\n\",\"name\":\"comment.line.scss\"},\"comparison_operators\":{\"match\":\"==|!=|<=|>=|[<>]\",\"name\":\"keyword.operator.comparison.scss\"},\"conditional_operators\":{\"patterns\":[{\"include\":\"#comparison_operators\"},{\"include\":\"#logical_operators\"}]},\"constant_default\":{\"match\":\"!default\",\"name\":\"keyword.other.default.scss\"},\"constant_functions\":{\"begin\":\"(?:([-\\\\w]+)(\\\\.))?([-\\\\w]+)(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"variable.scss\"},\"2\":{\"name\":\"punctuation.access.module.scss\"},\"3\":{\"name\":\"support.function.misc.scss\"},\"4\":{\"name\":\"punctuation.section.function.scss\"}},\"end\":\"(\\\\))\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.section.function.scss\"}},\"patterns\":[{\"include\":\"#parameters\"}]},\"constant_important\":{\"match\":\"!important\",\"name\":\"keyword.other.important.scss\"},\"constant_mathematical_symbols\":{\"match\":\"\\\\b([-*+/])\\\\b\",\"name\":\"support.constant.mathematical-symbols.scss\"},\"constant_optional\":{\"match\":\"!optional\",\"name\":\"keyword.other.optional.scss\"},\"constant_sass_functions\":{\"begin\":\"(headings|stylesheet-url|rgba?|hsla?|ie-hex-str|red|green|blue|alpha|opacity|hue|saturation|lightness|prefixed|prefix|-moz|-svg|-css2|-pie|-webkit|-ms|font-(?:files|url)|grid-image|image-(?:width|height|url|color)|sprites?|sprite-(?:map|map-name|file|url|position)|inline-(?:font-files|image)|opposite-position|grad-point|grad-end-position|color-stops|color-stops-in-percentages|grad-color-stops|(?:radial|linear)-(?:|svg-)gradient|opacify|fade-?in|transparentize|fade-?out|lighten|darken|saturate|desaturate|grayscale|adjust-(?:hue|lightness|saturation|color)|scale-(?:lightness|saturation|color)|change-color|spin|complement|invert|mix|-compass-(?:list|space-list|slice|nth|list-size)|blank|compact|nth|first-value-of|join|length|append|nest|append-selector|headers|enumerate|range|percentage|unitless|unit|if|type-of|comparable|elements-of-type|quote|unquote|escape|e|sin|cos|tan|abs|round|ceil|floor|pi|translate[XY])(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.misc.scss\"},\"2\":{\"name\":\"punctuation.section.function.scss\"}},\"end\":\"(\\\\))\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.section.function.scss\"}},\"patterns\":[{\"include\":\"#parameters\"}]},\"flow_control\":{\"patterns\":[{\"include\":\"#at_rule_if\"},{\"include\":\"#at_rule_else\"},{\"include\":\"#at_rule_warn\"},{\"include\":\"#at_rule_for\"},{\"include\":\"#at_rule_while\"},{\"include\":\"#at_rule_each\"},{\"include\":\"#at_rule_return\"}]},\"function_attributes\":{\"patterns\":[{\"match\":\":\",\"name\":\"punctuation.separator.key-value.scss\"},{\"include\":\"#general\"},{\"include\":\"#property_values\"},{\"match\":\"[;=?@{}]\",\"name\":\"invalid.illegal.scss\"}]},\"functions\":{\"patterns\":[{\"begin\":\"([-\\\\w]+)(\\\\()\\\\s*\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.misc.scss\"},\"2\":{\"name\":\"punctuation.section.function.scss\"}},\"end\":\"(\\\\))\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.section.function.scss\"}},\"patterns\":[{\"include\":\"#parameters\"}]},{\"match\":\"([-\\\\w]+)\",\"name\":\"support.function.misc.scss\"}]},\"general\":{\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#comment_docblock\"},{\"include\":\"#comment_block\"},{\"include\":\"#comment_line\"}]},\"interpolation\":{\"begin\":\"#\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.interpolation.begin.bracket.curly.scss\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.interpolation.end.bracket.curly.scss\"}},\"name\":\"variable.interpolation.scss\",\"patterns\":[{\"include\":\"#variable\"},{\"include\":\"#property_values\"}]},\"logical_operators\":{\"match\":\"\\\\b(not|or|and)\\\\b\",\"name\":\"keyword.operator.logical.scss\"},\"map\":{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.map.begin.bracket.round.scss\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.map.end.bracket.round.scss\"}},\"name\":\"meta.definition.variable.map.scss\",\"patterns\":[{\"include\":\"#comment_docblock\"},{\"include\":\"#comment_block\"},{\"include\":\"#comment_line\"},{\"captures\":{\"1\":{\"name\":\"support.type.map.key.scss\"},\"2\":{\"name\":\"punctuation.separator.key-value.scss\"}},\"match\":\"\\\\b([-\\\\w]+)\\\\s*(:)\"},{\"match\":\",\",\"name\":\"punctuation.separator.delimiter.scss\"},{\"include\":\"#map\"},{\"include\":\"#variable\"},{\"include\":\"#property_values\"}]},\"operators\":{\"match\":\"[-*+/](?!\\\\s*[-*+/])\",\"name\":\"keyword.operator.css\"},\"parameters\":{\"patterns\":[{\"include\":\"#variable\"},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.begin.bracket.round.scss\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.end.bracket.round.scss\"}},\"patterns\":[{\"include\":\"#function_attributes\"}]},{\"include\":\"#property_values\"},{\"include\":\"#comment_block\"},{\"match\":\"[^\\\\t \\\"'),]+\",\"name\":\"variable.parameter.url.scss\"},{\"match\":\",\",\"name\":\"punctuation.separator.delimiter.scss\"}]},\"parent_selector_suffix\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.entity.css\"},\"2\":{\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.identifier.scss\"}]}},\"match\":\"(?<=&)((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)|#\\\\{|[$}])+)(?=$|[#)+,.:>\\\\[{|~\\\\s]|/\\\\*)\",\"name\":\"entity.other.attribute-name.parent-selector-suffix.css\"},\"properties\":{\"patterns\":[{\"begin\":\"(?<![-a-z])(?=[-a-z])\",\"end\":\"$|(?![-a-z])\",\"name\":\"meta.property-name.scss\",\"patterns\":[{\"include\":\"source.css#property-names\"},{\"include\":\"#at_rule_include\"}]},{\"begin\":\"(:)\\\\s*(?!(\\\\s*\\\\{))\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.separator.key-value.scss\"}},\"contentName\":\"meta.property-value.scss\",\"end\":\"\\\\s*(;|(?=[)}]))\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.terminator.rule.scss\"}},\"patterns\":[{\"include\":\"#general\"},{\"include\":\"#property_values\"}]}]},\"property_list\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.property-list.begin.bracket.curly.scss\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.property-list.end.bracket.curly.scss\"}},\"name\":\"meta.property-list.scss\",\"patterns\":[{\"include\":\"#flow_control\"},{\"include\":\"#rules\"},{\"include\":\"#properties\"},{\"include\":\"$self\"}]},\"property_values\":{\"patterns\":[{\"include\":\"#string_single\"},{\"include\":\"#string_double\"},{\"include\":\"#constant_functions\"},{\"include\":\"#constant_sass_functions\"},{\"include\":\"#constant_important\"},{\"include\":\"#constant_default\"},{\"include\":\"#constant_optional\"},{\"include\":\"source.css#numeric-values\"},{\"include\":\"source.css#property-keywords\"},{\"include\":\"source.css#color-keywords\"},{\"include\":\"source.css#property-names\"},{\"include\":\"#constant_mathematical_symbols\"},{\"include\":\"#operators\"},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.begin.bracket.round.scss\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.end.bracket.round.scss\"}},\"patterns\":[{\"include\":\"#general\"},{\"include\":\"#property_values\"}]}]},\"rules\":{\"patterns\":[{\"include\":\"#general\"},{\"include\":\"#at_rule_extend\"},{\"include\":\"#at_rule_content\"},{\"include\":\"#at_rule_include\"},{\"include\":\"#at_rule_media\"},{\"include\":\"#selectors\"}]},\"selector_attribute\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.attribute-selector.begin.bracket.square.scss\"},\"2\":{\"name\":\"entity.other.attribute-name.attribute.scss\",\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.scss\"}]},\"3\":{\"name\":\"keyword.operator.scss\"},\"4\":{\"name\":\"string.unquoted.attribute-value.scss\",\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.scss\"}]},\"5\":{\"name\":\"string.quoted.double.attribute-value.scss\"},\"6\":{\"name\":\"punctuation.definition.string.begin.scss\"},\"7\":{\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.scss\"}]},\"8\":{\"name\":\"punctuation.definition.string.end.scss\"},\"9\":{\"name\":\"string.quoted.single.attribute-value.scss\"},\"10\":{\"name\":\"punctuation.definition.string.begin.scss\"},\"11\":{\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.scss\"}]},\"12\":{\"name\":\"punctuation.definition.string.end.scss\"},\"13\":{\"name\":\"punctuation.definition.attribute-selector.end.bracket.square.scss\"}},\"match\":\"(?i)(\\\\[)\\\\s*((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)|#\\\\{|\\\\.?\\\\$|})+?)(?:\\\\s*([$*^|~]?=)\\\\s*(?:((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)|#\\\\{|\\\\.?\\\\$|})+)|((\\\")(.*?)(\\\"))|((')(.*?)('))))?\\\\s*(])\",\"name\":\"meta.attribute-selector.scss\"},\"selector_class\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.entity.css\"},\"2\":{\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.scss\"}]}},\"match\":\"(\\\\.)((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)|#\\\\{|\\\\.?\\\\$|})+)(?=$|[#)+,:>\\\\[{|~\\\\s]|\\\\.[^$]|/\\\\*|;)\",\"name\":\"entity.other.attribute-name.class.css\"},\"selector_custom\":{\"match\":\"\\\\b([0-9A-Za-z]+(-[0-9A-Za-z]+)+)(?=\\\\.|\\\\s++[^:]|\\\\s*[,\\\\[{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-((?:|last-)(?:child|of-type))|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\\\([0-9A-Za-z]*\\\\))?)\",\"name\":\"entity.name.tag.custom.scss\"},\"selector_id\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.entity.css\"},\"2\":{\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.identifier.scss\"}]}},\"match\":\"(#)((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)|#\\\\{|\\\\.?\\\\$|})+)(?=$|[#)+,:>\\\\[{|~\\\\s]|\\\\.[^$]|/\\\\*)\",\"name\":\"entity.other.attribute-name.id.css\"},\"selector_placeholder\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.entity.css\"},\"2\":{\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"match\":\"[$}]\",\"name\":\"invalid.illegal.identifier.scss\"}]}},\"match\":\"(%)((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)|#\\\\{|\\\\.\\\\$|[$}])+)(?=;|$|[#)+,:>\\\\[{|~\\\\s]|\\\\.[^$]|/\\\\*)\",\"name\":\"entity.other.attribute-name.placeholder.css\"},\"selector_pseudo_class\":{\"patterns\":[{\"begin\":\"((:)\\\\bnth-(?:|last-)(?:child|of-type))(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"entity.other.attribute-name.pseudo-class.css\"},\"2\":{\"name\":\"punctuation.definition.entity.css\"},\"3\":{\"name\":\"punctuation.definition.pseudo-class.begin.bracket.round.css\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.pseudo-class.end.bracket.round.css\"}},\"patterns\":[{\"include\":\"#interpolation\"},{\"match\":\"\\\\d+\",\"name\":\"constant.numeric.css\"},{\"match\":\"(?:(?<=\\\\d)n|\\\\b(n|even|odd))\\\\b\",\"name\":\"constant.other.scss\"},{\"match\":\"\\\\w+\",\"name\":\"invalid.illegal.scss\"}]},{\"include\":\"source.css#pseudo-classes\"},{\"include\":\"source.css#pseudo-elements\"},{\"include\":\"source.css#functional-pseudo-classes\"}]},\"selectors\":{\"patterns\":[{\"include\":\"source.css#tag-names\"},{\"include\":\"#selector_custom\"},{\"include\":\"#selector_class\"},{\"include\":\"#selector_id\"},{\"include\":\"#selector_pseudo_class\"},{\"include\":\"#tag_wildcard\"},{\"include\":\"#tag_parent_reference\"},{\"include\":\"source.css#pseudo-elements\"},{\"include\":\"#selector_attribute\"},{\"include\":\"#selector_placeholder\"},{\"include\":\"#parent_selector_suffix\"}]},\"string_double\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.scss\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.scss\"}},\"name\":\"string.quoted.double.scss\",\"patterns\":[{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"include\":\"#interpolation\"}]},\"string_single\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.scss\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.scss\"}},\"name\":\"string.quoted.single.scss\",\"patterns\":[{\"match\":\"\\\\\\\\(\\\\h{1,6}|.)\",\"name\":\"constant.character.escape.scss\"},{\"include\":\"#interpolation\"}]},\"tag_parent_reference\":{\"match\":\"&\",\"name\":\"entity.name.tag.reference.scss\"},\"tag_wildcard\":{\"match\":\"\\\\*\",\"name\":\"entity.name.tag.wildcard.scss\"},\"variable\":{\"patterns\":[{\"include\":\"#variables\"},{\"include\":\"#interpolation\"}]},\"variable_setting\":{\"begin\":\"(?=\\\\$[-\\\\w]+\\\\s*:)\",\"contentName\":\"meta.definition.variable.scss\",\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.terminator.rule.scss\"}},\"patterns\":[{\"match\":\"\\\\$[-\\\\w]+(?=\\\\s*:)\",\"name\":\"variable.scss\"},{\"begin\":\":\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.separator.key-value.scss\"}},\"end\":\"(?=;)\",\"patterns\":[{\"include\":\"#comment_docblock\"},{\"include\":\"#comment_block\"},{\"include\":\"#comment_line\"},{\"include\":\"#map\"},{\"include\":\"#property_values\"},{\"include\":\"#variable\"},{\"match\":\",\",\"name\":\"punctuation.separator.delimiter.scss\"}]}]},\"variables\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"variable.scss\"},\"2\":{\"name\":\"punctuation.access.module.scss\"},\"3\":{\"name\":\"variable.scss\"}},\"match\":\"\\\\b([-\\\\w]+)(\\\\.)(\\\\$[-\\\\w]+)\\\\b\"},{\"match\":\"(\\\\$|--)[-0-9A-Z_a-z]+\\\\b\",\"name\":\"variable.scss\"}]}},\"scopeName\":\"source.css.scss\",\"embeddedLangs\":[\"css\"]}"));
|
|
11299
|
+
var scss_default = [...css_default, lang$1];
|
|
11300
|
+
var toml_default = [Object.freeze(JSON.parse("{\"displayName\":\"TOML\",\"fileTypes\":[\"toml\"],\"name\":\"toml\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#groups\"},{\"include\":\"#key_pair\"},{\"include\":\"#invalid\"}],\"repository\":{\"comments\":{\"begin\":\"(^[\\\\t ]+)?(?=#)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.whitespace.comment.leading.toml\"}},\"end\":\"(?!\\\\G)\",\"patterns\":[{\"begin\":\"#\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.toml\"}},\"end\":\"\\\\n\",\"name\":\"comment.line.number-sign.toml\"}]},\"groups\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"punctuation.definition.section.begin.toml\"},\"2\":{\"patterns\":[{\"match\":\"[^.\\\\s]+\",\"name\":\"entity.name.section.toml\"}]},\"3\":{\"name\":\"punctuation.definition.section.begin.toml\"}},\"match\":\"^\\\\s*(\\\\[)([^]\\\\[]*)(])\",\"name\":\"meta.group.toml\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.section.begin.toml\"},\"2\":{\"patterns\":[{\"match\":\"[^.\\\\s]+\",\"name\":\"entity.name.section.toml\"}]},\"3\":{\"name\":\"punctuation.definition.section.begin.toml\"}},\"match\":\"^\\\\s*(\\\\[\\\\[)([^]\\\\[]*)(]])\",\"name\":\"meta.group.double.toml\"}]},\"invalid\":{\"match\":\"\\\\S+(\\\\s*(?=\\\\S))?\",\"name\":\"invalid.illegal.not-allowed-here.toml\"},\"key_pair\":{\"patterns\":[{\"begin\":\"([-0-9A-Z_a-z]+)\\\\s*(=)\\\\s*\",\"captures\":{\"1\":{\"name\":\"variable.other.key.toml\"},\"2\":{\"name\":\"punctuation.separator.key-value.toml\"}},\"end\":\"(?<=\\\\S)(?<!=)|$\",\"patterns\":[{\"include\":\"#primatives\"}]},{\"begin\":\"((\\\")(.*?)(\\\"))\\\\s*(=)\\\\s*\",\"captures\":{\"1\":{\"name\":\"variable.other.key.toml\"},\"2\":{\"name\":\"punctuation.definition.variable.begin.toml\"},\"3\":{\"patterns\":[{\"match\":\"\\\\\\\\([\\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})\",\"name\":\"constant.character.escape.toml\"},{\"match\":\"\\\\\\\\[^\\\"\\\\\\\\bfnrt]\",\"name\":\"invalid.illegal.escape.toml\"},{\"match\":\"\\\"\",\"name\":\"invalid.illegal.not-allowed-here.toml\"}]},\"4\":{\"name\":\"punctuation.definition.variable.end.toml\"},\"5\":{\"name\":\"punctuation.separator.key-value.toml\"}},\"end\":\"(?<=\\\\S)(?<!=)|$\",\"patterns\":[{\"include\":\"#primatives\"}]},{\"begin\":\"((')([^']*)('))\\\\s*(=)\\\\s*\",\"captures\":{\"1\":{\"name\":\"variable.other.key.toml\"},\"2\":{\"name\":\"punctuation.definition.variable.begin.toml\"},\"4\":{\"name\":\"punctuation.definition.variable.end.toml\"},\"5\":{\"name\":\"punctuation.separator.key-value.toml\"}},\"end\":\"(?<=\\\\S)(?<!=)|$\",\"patterns\":[{\"include\":\"#primatives\"}]},{\"begin\":\"(((?:[-0-9A-Z_a-z]+|\\\"(?:[^\\\"\\\\\\\\]|\\\\\\\\.)*\\\"|'[^']*')(?:\\\\s*\\\\.\\\\s*|(?=\\\\s*=))){2,})\\\\s*(=)\\\\s*\",\"captures\":{\"1\":{\"name\":\"variable.other.key.toml\",\"patterns\":[{\"match\":\"\\\\.\",\"name\":\"punctuation.separator.variable.toml\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.variable.begin.toml\"},\"2\":{\"patterns\":[{\"match\":\"\\\\\\\\([\\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})\",\"name\":\"constant.character.escape.toml\"},{\"match\":\"\\\\\\\\[^\\\"\\\\\\\\bfnrt]\",\"name\":\"invalid.illegal.escape.toml\"}]},\"3\":{\"name\":\"punctuation.definition.variable.end.toml\"}},\"match\":\"(\\\")((?:[^\\\"\\\\\\\\]|\\\\\\\\.)*)(\\\")\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.variable.begin.toml\"},\"2\":{\"name\":\"punctuation.definition.variable.end.toml\"}},\"match\":\"(')[^']*(')\"}]},\"3\":{\"name\":\"punctuation.separator.key-value.toml\"}},\"end\":\"(?<=\\\\S)(?<!=)|$\",\"patterns\":[{\"include\":\"#primatives\"}]}]},\"primatives\":{\"patterns\":[{\"begin\":\"\\\\G\\\"\\\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.toml\"}},\"end\":\"\\\"{3,5}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.toml\"}},\"name\":\"string.quoted.triple.double.toml\",\"patterns\":[{\"match\":\"\\\\\\\\([\\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})\",\"name\":\"constant.character.escape.toml\"},{\"match\":\"\\\\\\\\[^\\\\n\\\"\\\\\\\\bfnrt]\",\"name\":\"invalid.illegal.escape.toml\"}]},{\"begin\":\"\\\\G\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.toml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.toml\"}},\"name\":\"string.quoted.double.toml\",\"patterns\":[{\"match\":\"\\\\\\\\([\\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})\",\"name\":\"constant.character.escape.toml\"},{\"match\":\"\\\\\\\\[^\\\"\\\\\\\\bfnrt]\",\"name\":\"invalid.illegal.escape.toml\"}]},{\"begin\":\"\\\\G'''\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.toml\"}},\"end\":\"'{3,5}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.toml\"}},\"name\":\"string.quoted.triple.single.toml\"},{\"begin\":\"\\\\G'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.toml\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.toml\"}},\"name\":\"string.quoted.single.toml\"},{\"match\":\"\\\\G[0-9]{4}-(0[1-9]|1[012])-(?!00|3[2-9])[0-3][0-9]([ Tt](?!2[5-9])[012][0-9]:[0-5][0-9]:(?!6[1-9])[0-6][0-9](\\\\.[0-9]+)?(Z|[-+](?!2[5-9])[012][0-9]:[0-5][0-9])?)?\",\"name\":\"constant.other.date.toml\"},{\"match\":\"\\\\G(?!2[5-9])[012][0-9]:[0-5][0-9]:(?!6[1-9])[0-6][0-9](\\\\.[0-9]+)?\",\"name\":\"constant.other.time.toml\"},{\"match\":\"\\\\G(true|false)\",\"name\":\"constant.language.boolean.toml\"},{\"match\":\"\\\\G0x\\\\h(_??\\\\h)*\",\"name\":\"constant.numeric.hex.toml\"},{\"match\":\"\\\\G0o[0-7]([0-7]|_[0-7])*\",\"name\":\"constant.numeric.octal.toml\"},{\"match\":\"\\\\G0b[01]([01]|_[01])*\",\"name\":\"constant.numeric.binary.toml\"},{\"match\":\"\\\\G[-+]?(inf|nan)\",\"name\":\"constant.numeric.toml\"},{\"match\":\"\\\\G([-+]?(0|([1-9](([0-9]|_[0-9])+)?)))(?=[.Ee])(\\\\.([0-9](([0-9]|_[0-9])+)?))?([Ee]([-+]?[0-9](([0-9]|_[0-9])+)?))?\",\"name\":\"constant.numeric.float.toml\"},{\"match\":\"\\\\G([-+]?(0|([1-9](([0-9]|_[0-9])+)?)))\",\"name\":\"constant.numeric.integer.toml\"},{\"begin\":\"\\\\G\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.array.begin.toml\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.array.end.toml\"}},\"name\":\"meta.array.toml\",\"patterns\":[{\"begin\":\"(?=[\\\"']|[-+]?[0-9]|[-+]?(inf|nan)|true|false|[\\\\[{])\",\"end\":\",|(?=])\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.separator.array.toml\"}},\"patterns\":[{\"include\":\"#primatives\"},{\"include\":\"#comments\"},{\"include\":\"#invalid\"}]},{\"include\":\"#comments\"},{\"include\":\"#invalid\"}]},{\"begin\":\"\\\\G\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.inline-table.begin.toml\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.inline-table.end.toml\"}},\"name\":\"meta.inline-table.toml\",\"patterns\":[{\"begin\":\"(?=\\\\S)\",\"end\":\",|(?=})\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.separator.inline-table.toml\"}},\"patterns\":[{\"include\":\"#key_pair\"}]},{\"include\":\"#comments\"}]}]}},\"scopeName\":\"source.toml\"}"))];
|
|
11299
11301
|
//#endregion
|
|
11300
11302
|
//#region lib/types/client/highlight.js
|
|
11301
11303
|
/**
|
|
@@ -11309,6 +11311,34 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11309
11311
|
* never an error.
|
|
11310
11312
|
* @module dsh-diff-approval/client/highlight
|
|
11311
11313
|
*/
|
|
11314
|
+
/**
|
|
11315
|
+
* Tokenize guards: the viewer must never let the synchronous JS-regex engine
|
|
11316
|
+
* block the main thread on a hostile file. Lines above the length cap are
|
|
11317
|
+
* returned plain by shiki, the per-line budget caps a single pathological
|
|
11318
|
+
* line, and whole files above the size/line caps skip highlighting entirely
|
|
11319
|
+
* (the diff still shows its added/deleted coloring). Company-workload files
|
|
11320
|
+
* (generated bundles, minified output, huge data dumps) otherwise stall the
|
|
11321
|
+
* tab for tens of seconds and can OOM it.
|
|
11322
|
+
*/
|
|
11323
|
+
const MAX_LINE_LENGTH = 2e3;
|
|
11324
|
+
const TOKENIZE_TIME_LIMIT_MS = 100;
|
|
11325
|
+
const MAX_HIGHLIGHT_CHARS = 3e5;
|
|
11326
|
+
const MAX_HIGHLIGHT_LINES = 1e4;
|
|
11327
|
+
/**
|
|
11328
|
+
* Bounded tokenize cache keyed by the code string: reselecting a recently
|
|
11329
|
+
* viewed file (or a file whose content reference reappears) reuses the runs
|
|
11330
|
+
* instead of re-running the engine. Insertion-ordered, so the oldest entry is
|
|
11331
|
+
* evicted first; 16 codes bounds both memory and the eviction cost.
|
|
11332
|
+
*/
|
|
11333
|
+
const TOKENIZE_CACHE_MAX = 16;
|
|
11334
|
+
const tokenizeCache = /* @__PURE__ */ new Map();
|
|
11335
|
+
/** Whether `code` is too large to highlight safely (short-circuits fast). */
|
|
11336
|
+
function tooLargeToHighlight(code) {
|
|
11337
|
+
if (code.length > MAX_HIGHLIGHT_CHARS) return true;
|
|
11338
|
+
let newlines = 0;
|
|
11339
|
+
for (let index = 0; index < code.length; index++) if (code.charCodeAt(index) === 10 && ++newlines > MAX_HIGHLIGHT_LINES) return true;
|
|
11340
|
+
return false;
|
|
11341
|
+
}
|
|
11312
11342
|
/** All grammars this bundle registers; each entry's own `name` is the tokenize id. */
|
|
11313
11343
|
const LANGS = [
|
|
11314
11344
|
c_default,
|
|
@@ -11325,16 +11355,75 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11325
11355
|
python_default,
|
|
11326
11356
|
ruby_default,
|
|
11327
11357
|
rust_default,
|
|
11328
|
-
|
|
11358
|
+
scss_default,
|
|
11329
11359
|
shellscript_default,
|
|
11330
11360
|
sql_default,
|
|
11331
|
-
|
|
11361
|
+
toml_default,
|
|
11332
11362
|
typescript_default,
|
|
11333
11363
|
xml_default,
|
|
11334
11364
|
yaml_default
|
|
11335
11365
|
];
|
|
11336
|
-
/**
|
|
11337
|
-
|
|
11366
|
+
/**
|
|
11367
|
+
* Primary grammar ids offered in the viewer's language selector, in picker
|
|
11368
|
+
* order (alphabetical). Kept explicit instead of deriving from `LANGS`: some
|
|
11369
|
+
* `@shikijs/langs` modules are composite grammars whose `.name` arrays expose
|
|
11370
|
+
* embedded sub-grammars (e.g. C++ → `[regexp, glsl, cpp-macro, cpp]`,
|
|
11371
|
+
* TypeScript → `[typescript, jsx, tsx, graphql]`), which would otherwise leak
|
|
11372
|
+
* ids like `regexp`, `glsl`, `haml` into the menu. `LANGS` still registers the
|
|
11373
|
+
* full grammars (including their embedded languages) for highlighting.
|
|
11374
|
+
*/
|
|
11375
|
+
const HIGHLIGHT_LANGS = [
|
|
11376
|
+
"c",
|
|
11377
|
+
"cpp",
|
|
11378
|
+
"csharp",
|
|
11379
|
+
"css",
|
|
11380
|
+
"go",
|
|
11381
|
+
"html",
|
|
11382
|
+
"ini",
|
|
11383
|
+
"java",
|
|
11384
|
+
"json",
|
|
11385
|
+
"lua",
|
|
11386
|
+
"markdown",
|
|
11387
|
+
"python",
|
|
11388
|
+
"ruby",
|
|
11389
|
+
"rust",
|
|
11390
|
+
"scss",
|
|
11391
|
+
"shellscript",
|
|
11392
|
+
"sql",
|
|
11393
|
+
"toml",
|
|
11394
|
+
"typescript",
|
|
11395
|
+
"xml",
|
|
11396
|
+
"yaml"
|
|
11397
|
+
];
|
|
11398
|
+
/** Display names for the grammar ids: shiki ids are lowercase, so the picker
|
|
11399
|
+
and trigger show conventional casing ("TypeScript", "C#", "Shell", …). */
|
|
11400
|
+
const LANGUAGE_DISPLAY_NAMES = {
|
|
11401
|
+
c: "C",
|
|
11402
|
+
cpp: "C++",
|
|
11403
|
+
csharp: "C#",
|
|
11404
|
+
css: "CSS",
|
|
11405
|
+
go: "Go",
|
|
11406
|
+
html: "HTML",
|
|
11407
|
+
ini: "INI",
|
|
11408
|
+
java: "Java",
|
|
11409
|
+
json: "JSON",
|
|
11410
|
+
lua: "Lua",
|
|
11411
|
+
markdown: "Markdown",
|
|
11412
|
+
python: "Python",
|
|
11413
|
+
ruby: "Ruby",
|
|
11414
|
+
rust: "Rust",
|
|
11415
|
+
scss: "SCSS",
|
|
11416
|
+
shellscript: "Shell",
|
|
11417
|
+
sql: "SQL",
|
|
11418
|
+
toml: "TOML",
|
|
11419
|
+
typescript: "TypeScript",
|
|
11420
|
+
xml: "XML",
|
|
11421
|
+
yaml: "YAML"
|
|
11422
|
+
};
|
|
11423
|
+
/** Conventional display name for a grammar id, falling back to the id itself. */
|
|
11424
|
+
function languageDisplayName(id) {
|
|
11425
|
+
return LANGUAGE_DISPLAY_NAMES[id] ?? id;
|
|
11426
|
+
}
|
|
11338
11427
|
/** All token colors resolve through `--shiki-*` custom properties (theme package sheets). */
|
|
11339
11428
|
const cssVariablesTheme = createCssVariablesTheme({
|
|
11340
11429
|
name: "css-variables",
|
|
@@ -11402,15 +11491,31 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11402
11491
|
function highlightLines(code, lang) {
|
|
11403
11492
|
if (lang === void 0 || code === "") return void 0;
|
|
11404
11493
|
if (!highlighter().getLoadedLanguages().includes(lang)) return void 0;
|
|
11494
|
+
if (tooLargeToHighlight(code)) return void 0;
|
|
11495
|
+
const cached = tokenizeCache.get(code)?.get(lang);
|
|
11496
|
+
if (cached !== void 0) return cached;
|
|
11405
11497
|
const { tokens } = highlighter().codeToTokens(code, {
|
|
11406
11498
|
lang,
|
|
11407
|
-
theme: "css-variables"
|
|
11499
|
+
theme: "css-variables",
|
|
11500
|
+
tokenizeTimeLimit: TOKENIZE_TIME_LIMIT_MS,
|
|
11501
|
+
tokenizeMaxLineLength: MAX_LINE_LENGTH
|
|
11408
11502
|
});
|
|
11409
11503
|
const last = tokens[tokens.length - 1];
|
|
11410
|
-
|
|
11504
|
+
const runs = (tokens.length > 1 && last !== void 0 && last.length === 0 ? tokens.slice(0, -1) : tokens).map((line) => line.map((token) => ({
|
|
11411
11505
|
text: token.content,
|
|
11412
11506
|
style: { color: token.color }
|
|
11413
11507
|
})));
|
|
11508
|
+
let byLang = tokenizeCache.get(code);
|
|
11509
|
+
if (byLang === void 0) {
|
|
11510
|
+
if (tokenizeCache.size >= TOKENIZE_CACHE_MAX) {
|
|
11511
|
+
const oldest = tokenizeCache.keys().next().value;
|
|
11512
|
+
if (oldest !== void 0) tokenizeCache.delete(oldest);
|
|
11513
|
+
}
|
|
11514
|
+
byLang = /* @__PURE__ */ new Map();
|
|
11515
|
+
tokenizeCache.set(code, byLang);
|
|
11516
|
+
}
|
|
11517
|
+
byLang.set(lang, runs);
|
|
11518
|
+
return runs;
|
|
11414
11519
|
}
|
|
11415
11520
|
//#endregion
|
|
11416
11521
|
//#region lib/types/client/lang.js
|
|
@@ -11525,7 +11630,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11525
11630
|
}
|
|
11526
11631
|
//#endregion
|
|
11527
11632
|
//#region \0dsh-css:/home/runner/work/dsh-diff-approval/dsh-diff-approval/src/client/PendingPanel.module.css.mjs
|
|
11528
|
-
const css = ".F1KBNa_layer{flex:none;align-items:center;width:calc(100% + 8px);height:
|
|
11633
|
+
const css = ".F1KBNa_layer{box-sizing:border-box;flex:none;align-items:center;width:calc(100% + 8px);height:42px;margin:4px -4px;display:flex;position:relative}.F1KBNa_footerButtons{align-items:center;width:100%;display:flex}.F1KBNa_badge{box-sizing:border-box;width:100%;height:42px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:12px;align-items:center;gap:8px;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.F1KBNa_badge:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_badge[data-active]{background:var(--dsw-alias-interactive-bg-hover-solid)}.F1KBNa_badgeLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.F1KBNa_badgeCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;margin-left:auto;font-size:12px;line-height:16px}.F1KBNa_layer.F1KBNa_rail{width:36px;height:36px;margin:8px 0 10px}.F1KBNa_rail .F1KBNa_badge{border-radius:50%;justify-content:center;gap:0;width:36px;height:36px;padding:0}.F1KBNa_rail .F1KBNa_badgeLabel{display:none}.F1KBNa_rail .F1KBNa_badgeCount{box-sizing:border-box;background:var(--dsw-alias-state-business-primary);min-width:18px;height:18px;color:var(--dsw-alias-label-primary-foreground);font-variant-numeric:tabular-nums;border-radius:9px;justify-content:center;align-items:center;padding:0 4px;font-size:11px;line-height:18px;display:flex;position:absolute;top:-3px;right:-7px}.F1KBNa_panel{z-index:30;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);width:auto;max-width:none;box-shadow:var(--dsw-shadow-lv2);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:12px;flex-direction:column;display:flex;position:fixed;inset:8px 8px 128px;overflow:hidden}.F1KBNa_header{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);flex:none;justify-content:space-between;align-items:center;min-height:44px;padding:10px 12px;display:flex}.F1KBNa_headerActions{align-items:center;gap:2px;display:flex}.F1KBNa_states{flex:1;min-height:0;padding:4px 12px 12px;overflow-y:auto}.F1KBNa_split{flex:1;align-items:stretch;min-height:0;display:flex}.F1KBNa_fileList{box-sizing:border-box;border-right:1px solid var(--dsw-alias-border-l2);flex:none;width:240px;min-height:0;padding:4px 8px 12px;overflow-y:auto}.F1KBNa_resizeHandle{cursor:col-resize;background:0 0;flex:none;width:5px;margin:0 -2px}.F1KBNa_resizeHandle:hover{background:var(--dsw-alias-border-l2)}.F1KBNa_detail{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.F1KBNa_detailEmpty{color:var(--dsw-alias-label-tertiary);text-align:center;flex:1;justify-content:center;align-items:center;margin:0;padding:24px;font-size:12px;line-height:18px;display:flex}.F1KBNa_title{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}.F1KBNa_note,.F1KBNa_readError,.F1KBNa_hint{color:var(--dsw-alias-label-tertiary);margin:4px 0;font-size:12px;line-height:18px}.F1KBNa_readError{color:var(--dsw-alias-state-error-primary)}.F1KBNa_group{color:var(--dsw-alias-label-tertiary);margin:8px 0 4px;font-size:12px;font-weight:500;line-height:16px}.F1KBNa_rows{margin:0;padding:0;list-style:none}.F1KBNa_row{border:1px solid #0000;border-radius:10px;margin:2px 0}.F1KBNa_rowHead{width:100%;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:10px;align-items:baseline;gap:8px;padding:6px 8px;display:flex}.F1KBNa_rowHead:hover{background:var(--dsw-alias-interactive-bg-hover-solid)}.F1KBNa_rowHead[data-selected]{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_rowPath{text-overflow:ellipsis;white-space:nowrap;min-width:0;font:var(--dsw-font-markdown-code-block);overflow:hidden}.F1KBNa_kindTag{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);white-space:nowrap;border-radius:6px;flex:none;padding:1px 6px;font-size:11px;line-height:14px}.F1KBNa_kindHint{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:16px}.F1KBNa_divergedHint,.F1KBNa_missingHint{border-bottom:1px solid var(--dsw-alias-border-l2);margin:0;padding:6px 8px;font-size:12px;line-height:18px}.F1KBNa_missing{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-label,var(--dsw-alias-state-warn-primary));white-space:nowrap;border-radius:6px;flex:none;padding:1px 6px;font-size:11px;line-height:14px}.F1KBNa_missingHint{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-state-warn-primary))}.F1KBNa_rowMeta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;gap:6px;margin-left:auto;font-size:12px;line-height:16px;display:inline-flex}.F1KBNa_addCount{color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 60%, var(--dsw-alias-label-primary))}.F1KBNa_delCount{color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 60%, var(--dsw-alias-label-primary))}.F1KBNa_diff{background:var(--dsw-alias-markdown-code-block);flex-direction:column;flex:1;min-height:0;display:flex;position:relative;overflow:hidden}.F1KBNa_diffHeader{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:6px 8px;display:flex}.F1KBNa_diffPath{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);font:var(--dsw-font-markdown-code-block);flex:1;font-size:12px;line-height:18px;overflow:hidden}.F1KBNa_diffActions{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:6px 8px;display:flex}.F1KBNa_diffStats{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;line-height:16px}.F1KBNa_flexSpacer{flex:1}.F1KBNa_action{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px}.F1KBNa_action:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_action:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.F1KBNa_iconAction{justify-content:center;align-items:center;padding:4px 6px;display:inline-flex}.F1KBNa_close{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.F1KBNa_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.F1KBNa_expand{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.F1KBNa_expand:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.F1KBNa_expandExpanded svg{transform:rotate(180deg)}.F1KBNa_diffBodyWrap{flex:1;min-height:0;display:flex;position:relative}.F1KBNa_diffBody{min-width:0;font:var(--dsw-font-markdown-code-block);flex:1;padding:8px 10px;overflow:auto}.F1KBNa_overviewRuler{pointer-events:none;opacity:.5;width:8px;position:absolute;top:0;bottom:0;right:0}.F1KBNa_overviewMarker{border-radius:2px;width:100%;min-height:2px;position:absolute;right:0}.F1KBNa_markerDel{background-color:var(--dsw-alias-state-error-primary)}.F1KBNa_markerAdd{background-color:var(--dsw-alias-state-success-primary)}.F1KBNa_lines{border-spacing:0;width:max-content;min-width:100%;display:table}.F1KBNa_line{height:22px;line-height:22px;display:table-row}.F1KBNa_vSpacer{display:table-row}.F1KBNa_gutter{box-sizing:border-box;text-align:right;width:44px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;user-select:none;padding-right:10px;display:table-cell}.F1KBNa_code{white-space:pre;display:table-cell}.F1KBNa_context{color:var(--dsw-alias-label-primary)}.F1KBNa_del{background-color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)}.F1KBNa_add{background-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent)}.F1KBNa_statusBar{box-sizing:border-box;border-top:1px solid var(--dsw-alias-border-l2);height:34px;color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-markdown-code-block);font-variant-numeric:tabular-nums;flex:none;align-items:center;padding:0 8px;font-size:12px;line-height:18px;display:flex}.F1KBNa_statusAction{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border-radius:8px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px}.F1KBNa_statusAction:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_langSelect{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;flex:none;align-items:center;gap:4px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px;display:inline-flex}.F1KBNa_langSelect:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_langLabel{text-overflow:ellipsis;white-space:nowrap;max-width:140px;overflow:hidden}";
|
|
11529
11634
|
const tagId = "dsh-diff-approval/PendingPanel.module.css";
|
|
11530
11635
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
11531
11636
|
const tag = document.createElement("style");
|
|
@@ -11535,58 +11640,67 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11535
11640
|
document.head.appendChild(tag);
|
|
11536
11641
|
}
|
|
11537
11642
|
var PendingPanel_module_css_default = {
|
|
11538
|
-
"
|
|
11643
|
+
"code": "F1KBNa_code",
|
|
11644
|
+
"diffBodyWrap": "F1KBNa_diffBodyWrap",
|
|
11539
11645
|
"badge": "F1KBNa_badge",
|
|
11540
11646
|
"readError": "F1KBNa_readError",
|
|
11541
|
-
"
|
|
11542
|
-
"
|
|
11543
|
-
"
|
|
11544
|
-
"
|
|
11545
|
-
"
|
|
11546
|
-
"
|
|
11547
|
-
"split": "F1KBNa_split",
|
|
11548
|
-
"missingHint": "F1KBNa_missingHint",
|
|
11549
|
-
"add": "F1KBNa_add",
|
|
11647
|
+
"diff": "F1KBNa_diff",
|
|
11648
|
+
"markerDel": "F1KBNa_markerDel",
|
|
11649
|
+
"group": "F1KBNa_group",
|
|
11650
|
+
"divergedHint": "F1KBNa_divergedHint",
|
|
11651
|
+
"detailEmpty": "F1KBNa_detailEmpty",
|
|
11652
|
+
"iconAction": "F1KBNa_iconAction",
|
|
11550
11653
|
"diffBody": "F1KBNa_diffBody",
|
|
11551
|
-
"
|
|
11552
|
-
"
|
|
11654
|
+
"rowPath": "F1KBNa_rowPath",
|
|
11655
|
+
"addCount": "F1KBNa_addCount",
|
|
11656
|
+
"vSpacer": "F1KBNa_vSpacer",
|
|
11657
|
+
"add": "F1KBNa_add",
|
|
11658
|
+
"overviewMarker": "F1KBNa_overviewMarker",
|
|
11659
|
+
"panel": "F1KBNa_panel",
|
|
11660
|
+
"del": "F1KBNa_del",
|
|
11661
|
+
"row": "F1KBNa_row",
|
|
11553
11662
|
"kindHint": "F1KBNa_kindHint",
|
|
11554
|
-
"
|
|
11555
|
-
"fileList": "F1KBNa_fileList",
|
|
11663
|
+
"layer": "F1KBNa_layer",
|
|
11556
11664
|
"rowMeta": "F1KBNa_rowMeta",
|
|
11557
|
-
"
|
|
11558
|
-
"
|
|
11559
|
-
"
|
|
11665
|
+
"resizeHandle": "F1KBNa_resizeHandle",
|
|
11666
|
+
"footerButtons": "F1KBNa_footerButtons",
|
|
11667
|
+
"rowHead": "F1KBNa_rowHead",
|
|
11668
|
+
"close": "F1KBNa_close",
|
|
11560
11669
|
"title": "F1KBNa_title",
|
|
11561
|
-
"
|
|
11562
|
-
"
|
|
11563
|
-
"
|
|
11670
|
+
"overviewRuler": "F1KBNa_overviewRuler",
|
|
11671
|
+
"lines": "F1KBNa_lines",
|
|
11672
|
+
"missingHint": "F1KBNa_missingHint",
|
|
11673
|
+
"diffPath": "F1KBNa_diffPath",
|
|
11674
|
+
"detail": "F1KBNa_detail",
|
|
11564
11675
|
"states": "F1KBNa_states",
|
|
11676
|
+
"headerActions": "F1KBNa_headerActions",
|
|
11677
|
+
"fileList": "F1KBNa_fileList",
|
|
11678
|
+
"langSelect": "F1KBNa_langSelect",
|
|
11679
|
+
"expand": "F1KBNa_expand",
|
|
11680
|
+
"langLabel": "F1KBNa_langLabel",
|
|
11565
11681
|
"statusAction": "F1KBNa_statusAction",
|
|
11682
|
+
"badgeLabel": "F1KBNa_badgeLabel",
|
|
11683
|
+
"diffActions": "F1KBNa_diffActions",
|
|
11684
|
+
"flexSpacer": "F1KBNa_flexSpacer",
|
|
11566
11685
|
"kindTag": "F1KBNa_kindTag",
|
|
11567
|
-
"footerButtons": "F1KBNa_footerButtons",
|
|
11568
11686
|
"gutter": "F1KBNa_gutter",
|
|
11569
|
-
"
|
|
11570
|
-
"
|
|
11571
|
-
"statusBar": "F1KBNa_statusBar",
|
|
11572
|
-
"detail": "F1KBNa_detail",
|
|
11573
|
-
"missing": "F1KBNa_missing",
|
|
11574
|
-
"resizeHandle": "F1KBNa_resizeHandle",
|
|
11575
|
-
"diffHeader": "F1KBNa_diffHeader",
|
|
11576
|
-
"group": "F1KBNa_group",
|
|
11577
|
-
"rail": "F1KBNa_rail",
|
|
11578
|
-
"iconAction": "F1KBNa_iconAction",
|
|
11579
|
-
"header": "F1KBNa_header",
|
|
11580
|
-
"row": "F1KBNa_row",
|
|
11687
|
+
"markerAdd": "F1KBNa_markerAdd",
|
|
11688
|
+
"rows": "F1KBNa_rows",
|
|
11581
11689
|
"delCount": "F1KBNa_delCount",
|
|
11690
|
+
"context": "F1KBNa_context",
|
|
11582
11691
|
"action": "F1KBNa_action",
|
|
11583
|
-
"
|
|
11692
|
+
"statusBar": "F1KBNa_statusBar",
|
|
11584
11693
|
"badgeCount": "F1KBNa_badgeCount",
|
|
11585
|
-
"
|
|
11586
|
-
"
|
|
11587
|
-
"
|
|
11694
|
+
"diffHeader": "F1KBNa_diffHeader",
|
|
11695
|
+
"diffStats": "F1KBNa_diffStats",
|
|
11696
|
+
"split": "F1KBNa_split",
|
|
11697
|
+
"line": "F1KBNa_line",
|
|
11698
|
+
"expandExpanded": "F1KBNa_expandExpanded",
|
|
11699
|
+
"rail": "F1KBNa_rail",
|
|
11588
11700
|
"note": "F1KBNa_note",
|
|
11589
|
-
"
|
|
11701
|
+
"missing": "F1KBNa_missing",
|
|
11702
|
+
"header": "F1KBNa_header",
|
|
11703
|
+
"hint": "F1KBNa_hint"
|
|
11590
11704
|
};
|
|
11591
11705
|
//#endregion
|
|
11592
11706
|
//#region lib/types/client/PendingPanel.js
|
|
@@ -11602,6 +11716,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11602
11716
|
const FALLBACK_BOTTOM_PX = 128;
|
|
11603
11717
|
/** Gap kept between the composer's top edge and the panel bottom, in px. */
|
|
11604
11718
|
const COMPOSER_GAP_PX = 12;
|
|
11719
|
+
/** Fixed window-edge inset used when expanded, mirroring `.panel`'s top/left/right. */
|
|
11720
|
+
const PANEL_INSET_PX = 8;
|
|
11605
11721
|
/** The harness composer seat (conversation scroll body + seat div). */
|
|
11606
11722
|
const SCROLL_SELECTOR = "[data-conversation-scroll]";
|
|
11607
11723
|
const SEAT_SELECTOR = "[data-composer-seat]";
|
|
@@ -11616,6 +11732,10 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11616
11732
|
/** File-list pane width bounds for the manual split drag, in px. */
|
|
11617
11733
|
const MIN_LIST_WIDTH_PX = 160;
|
|
11618
11734
|
const MAX_LIST_WIDTH_PX = 560;
|
|
11735
|
+
/** Fixed diff-row height in px; the virtual window and jump math are built on it. */
|
|
11736
|
+
const ROW_HEIGHT_PX = 22;
|
|
11737
|
+
/** Rows rendered beyond the visible window in each direction. */
|
|
11738
|
+
const OVERSCAN_ROWS = 8;
|
|
11619
11739
|
/** The trailing file-name segment of a path, used for row display. */
|
|
11620
11740
|
function basenameOf(path) {
|
|
11621
11741
|
const index = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
|
|
@@ -11627,6 +11747,41 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11627
11747
|
del: PendingPanel_module_css_default.del,
|
|
11628
11748
|
add: PendingPanel_module_css_default.add
|
|
11629
11749
|
};
|
|
11750
|
+
/**
|
|
11751
|
+
* One rendered diff row, memoized so a poll or an unrelated state change
|
|
11752
|
+
* does not re-render rows whose content, highlight, and focus are unchanged.
|
|
11753
|
+
*/
|
|
11754
|
+
const DiffRow = (0, react.memo)(function DiffRow(props) {
|
|
11755
|
+
const { index, row, runs, focused } = props;
|
|
11756
|
+
const lineNumber = row.kind === "del" ? row.oldLine : row.newLine;
|
|
11757
|
+
const sideRuns = row.kind === "del" ? runs?.oldRuns : runs?.newRuns;
|
|
11758
|
+
const lineRuns = lineNumber === void 0 ? void 0 : sideRuns?.[lineNumber - 1];
|
|
11759
|
+
const content = lineRuns === void 0 || lineRuns.length === 0 ? row.text === "" ? "\xA0" : row.text : lineRuns.map((span, spanIndex) => (0, react_jsx_runtime.jsx)("span", {
|
|
11760
|
+
style: span.style,
|
|
11761
|
+
children: span.text
|
|
11762
|
+
}, spanIndex));
|
|
11763
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
11764
|
+
className: `${PendingPanel_module_css_default.line} ${ROW_CLASS[row.kind]}`,
|
|
11765
|
+
"data-diff-line": row.kind,
|
|
11766
|
+
"data-diff-row": index,
|
|
11767
|
+
"data-diff-focused": focused ? "" : void 0,
|
|
11768
|
+
children: [
|
|
11769
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
11770
|
+
className: PendingPanel_module_css_default.gutter,
|
|
11771
|
+
children: row.oldLine ?? ""
|
|
11772
|
+
}),
|
|
11773
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
11774
|
+
className: PendingPanel_module_css_default.gutter,
|
|
11775
|
+
children: row.newLine ?? ""
|
|
11776
|
+
}),
|
|
11777
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
11778
|
+
className: PendingPanel_module_css_default.code,
|
|
11779
|
+
"data-diff-code": true,
|
|
11780
|
+
children: content
|
|
11781
|
+
})
|
|
11782
|
+
]
|
|
11783
|
+
});
|
|
11784
|
+
});
|
|
11630
11785
|
/** Split a row list into maximal runs of non-context rows. */
|
|
11631
11786
|
function changeBlocksOf(diff) {
|
|
11632
11787
|
const blocks = [];
|
|
@@ -11760,11 +11915,11 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11760
11915
|
label: t("action.langAuto")
|
|
11761
11916
|
}, ...HIGHLIGHT_LANGS.map((language) => ({
|
|
11762
11917
|
id: language,
|
|
11763
|
-
label: language
|
|
11918
|
+
label: languageDisplayName(language)
|
|
11764
11919
|
}))], [t]);
|
|
11765
11920
|
const detectedLang = (0, react.useMemo)(() => langFromPath(file.path), [file.path]);
|
|
11766
11921
|
const lang = (0, react.useMemo)(() => langOverride ?? detectedLang, [detectedLang, langOverride]);
|
|
11767
|
-
const langLabel = langOverride
|
|
11922
|
+
const langLabel = langOverride === void 0 ? detectedLang === void 0 ? t("action.langAuto") : t("action.langAutoDetected", { lang: languageDisplayName(detectedLang) }) : languageDisplayName(langOverride);
|
|
11768
11923
|
const model = (0, react.useMemo)(() => {
|
|
11769
11924
|
const diff = computeWholeFileDiff(file.oldText, file.newText);
|
|
11770
11925
|
return {
|
|
@@ -11772,6 +11927,41 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11772
11927
|
blocks: changeBlocksOf(diff)
|
|
11773
11928
|
};
|
|
11774
11929
|
}, [file.oldText, file.newText]);
|
|
11930
|
+
const rulerMarkers = (0, react.useMemo)(() => {
|
|
11931
|
+
const rows = model.diff.rows;
|
|
11932
|
+
const total = rows.length;
|
|
11933
|
+
if (total === 0) return [];
|
|
11934
|
+
const markers = [];
|
|
11935
|
+
let runStart = -1;
|
|
11936
|
+
let runKind = "del";
|
|
11937
|
+
const flush = (end) => {
|
|
11938
|
+
const span = end - runStart + 1;
|
|
11939
|
+
markers.push({
|
|
11940
|
+
top: runStart / total * 100,
|
|
11941
|
+
height: span / total * 100,
|
|
11942
|
+
kind: runKind
|
|
11943
|
+
});
|
|
11944
|
+
};
|
|
11945
|
+
rows.forEach((row, index) => {
|
|
11946
|
+
if (row.kind === "context") {
|
|
11947
|
+
if (runStart !== -1) {
|
|
11948
|
+
flush(index - 1);
|
|
11949
|
+
runStart = -1;
|
|
11950
|
+
}
|
|
11951
|
+
return;
|
|
11952
|
+
}
|
|
11953
|
+
if (runStart === -1) {
|
|
11954
|
+
runStart = index;
|
|
11955
|
+
runKind = row.kind;
|
|
11956
|
+
} else if (row.kind !== runKind) {
|
|
11957
|
+
flush(index - 1);
|
|
11958
|
+
runStart = index;
|
|
11959
|
+
runKind = row.kind;
|
|
11960
|
+
}
|
|
11961
|
+
});
|
|
11962
|
+
if (runStart !== -1) flush(rows.length - 1);
|
|
11963
|
+
return markers;
|
|
11964
|
+
}, [model]);
|
|
11775
11965
|
const [runs, setRuns] = (0, react.useState)(void 0);
|
|
11776
11966
|
(0, react.useEffect)(() => {
|
|
11777
11967
|
setRuns(void 0);
|
|
@@ -11790,41 +11980,81 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11790
11980
|
file.newText,
|
|
11791
11981
|
lang
|
|
11792
11982
|
]);
|
|
11793
|
-
const rowRefs = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
11794
11983
|
const bodyRef = (0, react.useRef)(null);
|
|
11795
11984
|
const [focus, setFocus] = (0, react.useState)(0);
|
|
11985
|
+
const [scrollTick, setScrollTick] = (0, react.useState)(0);
|
|
11986
|
+
const [scrollTop, setScrollTop] = (0, react.useState)(0);
|
|
11987
|
+
const [viewportHeight, setViewportHeight] = (0, react.useState)(0);
|
|
11796
11988
|
const [selection, setSelection] = (0, react.useState)(void 0);
|
|
11797
11989
|
const [copied, setCopied] = (0, react.useState)(false);
|
|
11798
11990
|
(0, react.useEffect)(() => {
|
|
11799
11991
|
setFocus(0);
|
|
11992
|
+
setScrollTop(0);
|
|
11993
|
+
if (bodyRef.current !== null) bodyRef.current.scrollTop = 0;
|
|
11800
11994
|
setSelection(void 0);
|
|
11801
11995
|
setLangOverride(void 0);
|
|
11802
11996
|
setLangMenuOpen(false);
|
|
11803
11997
|
setCopied(false);
|
|
11804
11998
|
}, [file.id]);
|
|
11999
|
+
const rows = model.diff.rows;
|
|
12000
|
+
const rowCount = rows.length;
|
|
12001
|
+
const viewport = viewportHeight > 0 ? viewportHeight : rowCount * ROW_HEIGHT_PX;
|
|
12002
|
+
const start = Math.max(0, Math.floor(scrollTop / ROW_HEIGHT_PX) - OVERSCAN_ROWS);
|
|
12003
|
+
const end = Math.min(rowCount, Math.ceil((scrollTop + viewport) / ROW_HEIGHT_PX) + OVERSCAN_ROWS);
|
|
12004
|
+
const visibleRows = rows.slice(start, end);
|
|
12005
|
+
const widestLine = (0, react.useMemo)(() => {
|
|
12006
|
+
let widest = 0;
|
|
12007
|
+
for (const row of model.diff.rows) if (row.text.length > widest) widest = row.text.length;
|
|
12008
|
+
return widest;
|
|
12009
|
+
}, [model]);
|
|
11805
12010
|
(0, react.useEffect)(() => {
|
|
11806
|
-
|
|
12011
|
+
const body = bodyRef.current;
|
|
12012
|
+
if (body === null) return;
|
|
12013
|
+
const measure = () => {
|
|
12014
|
+
setViewportHeight(body.clientHeight);
|
|
12015
|
+
};
|
|
12016
|
+
measure();
|
|
12017
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
12018
|
+
observer?.observe(body);
|
|
12019
|
+
return () => {
|
|
12020
|
+
observer?.disconnect();
|
|
12021
|
+
};
|
|
12022
|
+
}, [file.id]);
|
|
12023
|
+
(0, react.useEffect)(() => {
|
|
12024
|
+
if (rowCount === 0) return;
|
|
11807
12025
|
const block = model.blocks[focus];
|
|
11808
12026
|
if (block === void 0) return;
|
|
11809
|
-
|
|
11810
|
-
|
|
12027
|
+
const body = bodyRef.current;
|
|
12028
|
+
if (body === null) return;
|
|
12029
|
+
const target = block.start * ROW_HEIGHT_PX + ROW_HEIGHT_PX / 2 - body.clientHeight / 2;
|
|
12030
|
+
const clamped = Math.max(0, Math.min(target, body.scrollHeight - body.clientHeight));
|
|
12031
|
+
if (body.scrollTop !== clamped) body.scrollTop = clamped;
|
|
12032
|
+
setScrollTop(clamped);
|
|
12033
|
+
}, [
|
|
12034
|
+
model,
|
|
12035
|
+
focus,
|
|
12036
|
+
scrollTick,
|
|
12037
|
+
rowCount
|
|
12038
|
+
]);
|
|
11811
12039
|
const jump = (direction) => {
|
|
12040
|
+
if (rowCount === 0) return;
|
|
11812
12041
|
setFocus((current) => {
|
|
11813
|
-
if (model.blocks.length === 0) return current;
|
|
11814
12042
|
if (direction === -1) return (current - 1 + model.blocks.length) % model.blocks.length;
|
|
11815
|
-
const
|
|
12043
|
+
const top = bodyRef.current?.scrollTop ?? 0;
|
|
11816
12044
|
for (let index = current + 1; index < model.blocks.length; index++) {
|
|
11817
12045
|
const block = model.blocks[index];
|
|
11818
12046
|
if (block === void 0) continue;
|
|
11819
|
-
|
|
11820
|
-
if (row === void 0 || bodyRect === void 0 || row.getBoundingClientRect().top >= bodyRect.top) return index;
|
|
12047
|
+
if (block.start * ROW_HEIGHT_PX >= top) return index;
|
|
11821
12048
|
}
|
|
11822
12049
|
return 0;
|
|
11823
12050
|
});
|
|
12051
|
+
setScrollTick((tick) => tick + 1);
|
|
11824
12052
|
};
|
|
11825
|
-
const
|
|
11826
|
-
|
|
11827
|
-
|
|
12053
|
+
const onScroll = () => {
|
|
12054
|
+
const body = bodyRef.current;
|
|
12055
|
+
if (body === null) return;
|
|
12056
|
+
setScrollTop(body.scrollTop);
|
|
12057
|
+
setViewportHeight(body.clientHeight);
|
|
11828
12058
|
};
|
|
11829
12059
|
(0, react.useEffect)(() => {
|
|
11830
12060
|
const update = () => setSelection(rowRangeOf(window.getSelection()));
|
|
@@ -11861,17 +12091,6 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11861
12091
|
document.removeEventListener("keydown", onKeyDown);
|
|
11862
12092
|
};
|
|
11863
12093
|
}, [copySelection]);
|
|
11864
|
-
/** One line's text: token spans when highlighted, plain text otherwise. */
|
|
11865
|
-
const renderLine = (row) => {
|
|
11866
|
-
const lineNumber = row.kind === "del" ? row.oldLine : row.newLine;
|
|
11867
|
-
const sideRuns = row.kind === "del" ? runs?.oldRuns : runs?.newRuns;
|
|
11868
|
-
const lineRuns = lineNumber === void 0 ? void 0 : sideRuns?.[lineNumber - 1];
|
|
11869
|
-
if (lineRuns === void 0 || lineRuns.length === 0) return row.text === "" ? "\xA0" : row.text;
|
|
11870
|
-
return lineRuns.map((span, index) => (0, react_jsx_runtime.jsx)("span", {
|
|
11871
|
-
style: span.style,
|
|
11872
|
-
children: span.text
|
|
11873
|
-
}, index));
|
|
11874
|
-
};
|
|
11875
12094
|
const focusedBlock = model.blocks.length > 0 ? model.blocks[focus] : void 0;
|
|
11876
12095
|
const inFocusedBlock = (index) => focusedBlock !== void 0 && index >= focusedBlock.start && index <= focusedBlock.end;
|
|
11877
12096
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -11973,34 +12192,51 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11973
12192
|
className: PendingPanel_module_css_default.missingHint,
|
|
11974
12193
|
children: t("panel.missingHint")
|
|
11975
12194
|
}),
|
|
11976
|
-
(0, react_jsx_runtime.
|
|
11977
|
-
className: PendingPanel_module_css_default.
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
"data-diff-focused": inFocusedBlock(index) ? "" : void 0,
|
|
12195
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
12196
|
+
className: PendingPanel_module_css_default.diffBodyWrap,
|
|
12197
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
12198
|
+
className: PendingPanel_module_css_default.diffBody,
|
|
12199
|
+
ref: bodyRef,
|
|
12200
|
+
onScroll,
|
|
12201
|
+
"data-diff-body": true,
|
|
12202
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
12203
|
+
className: PendingPanel_module_css_default.lines,
|
|
12204
|
+
style: { minWidth: `max(100%, ${widestLine}ch)` },
|
|
11987
12205
|
children: [
|
|
11988
|
-
(0, react_jsx_runtime.jsx)("
|
|
11989
|
-
className: PendingPanel_module_css_default.
|
|
11990
|
-
|
|
12206
|
+
start > 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
12207
|
+
className: PendingPanel_module_css_default.vSpacer,
|
|
12208
|
+
style: { height: start * ROW_HEIGHT_PX },
|
|
12209
|
+
"aria-hidden": "true"
|
|
11991
12210
|
}),
|
|
11992
|
-
(
|
|
11993
|
-
|
|
11994
|
-
|
|
12211
|
+
visibleRows.map((row, offset) => {
|
|
12212
|
+
const index = start + offset;
|
|
12213
|
+
return (0, react_jsx_runtime.jsx)(DiffRow, {
|
|
12214
|
+
index,
|
|
12215
|
+
row,
|
|
12216
|
+
runs,
|
|
12217
|
+
focused: inFocusedBlock(index)
|
|
12218
|
+
}, index);
|
|
11995
12219
|
}),
|
|
11996
|
-
(0, react_jsx_runtime.jsx)("
|
|
11997
|
-
className: PendingPanel_module_css_default.
|
|
11998
|
-
|
|
11999
|
-
|
|
12220
|
+
end < rowCount && (0, react_jsx_runtime.jsx)("div", {
|
|
12221
|
+
className: PendingPanel_module_css_default.vSpacer,
|
|
12222
|
+
style: { height: (rowCount - end) * ROW_HEIGHT_PX },
|
|
12223
|
+
"aria-hidden": "true"
|
|
12000
12224
|
})
|
|
12001
12225
|
]
|
|
12226
|
+
})
|
|
12227
|
+
}), rulerMarkers.length > 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
12228
|
+
className: PendingPanel_module_css_default.overviewRuler,
|
|
12229
|
+
"data-diff-approval-ruler": true,
|
|
12230
|
+
"aria-hidden": "true",
|
|
12231
|
+
children: rulerMarkers.map((marker, index) => (0, react_jsx_runtime.jsx)("div", {
|
|
12232
|
+
className: `${PendingPanel_module_css_default.overviewMarker} ${marker.kind === "del" ? PendingPanel_module_css_default.markerDel : PendingPanel_module_css_default.markerAdd}`,
|
|
12233
|
+
"data-diff-ruler-marker": marker.kind,
|
|
12234
|
+
style: {
|
|
12235
|
+
top: `${marker.top}%`,
|
|
12236
|
+
height: `${marker.height}%`
|
|
12237
|
+
}
|
|
12002
12238
|
}, index))
|
|
12003
|
-
})
|
|
12239
|
+
})]
|
|
12004
12240
|
}),
|
|
12005
12241
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
12006
12242
|
className: PendingPanel_module_css_default.statusBar,
|
|
@@ -12068,6 +12304,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12068
12304
|
const [openedCount, setOpenedCount] = (0, react.useState)(0);
|
|
12069
12305
|
/** Bottom offset tracking the chat composer's top edge so the input stays visible. */
|
|
12070
12306
|
const [bottomPx, setBottomPx] = (0, react.useState)(FALLBACK_BOTTOM_PX);
|
|
12307
|
+
/** Fullscreen expanded: the panel bottom pins to the window edge, ignoring the composer offset. */
|
|
12308
|
+
const [expanded, setExpanded] = (0, react.useState)(false);
|
|
12071
12309
|
/** File-list pane width, adjustable by dragging the divider. */
|
|
12072
12310
|
const [listWidth, setListWidth] = (0, react.useState)(240);
|
|
12073
12311
|
const resizeDrag = (0, react.useRef)(null);
|
|
@@ -12190,7 +12428,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12190
12428
|
className: wide ? PendingPanel_module_css_default.layer : `${PendingPanel_module_css_default.layer} ${PendingPanel_module_css_default.rail}`,
|
|
12191
12429
|
children: [open && (0, react_jsx_runtime.jsxs)("section", {
|
|
12192
12430
|
className: PendingPanel_module_css_default.panel,
|
|
12193
|
-
style: { bottom: bottomPx },
|
|
12431
|
+
style: { bottom: expanded ? PANEL_INSET_PX : bottomPx },
|
|
12194
12432
|
"data-diff-approval-panel": true,
|
|
12195
12433
|
"aria-label": t("panel.title"),
|
|
12196
12434
|
children: [(0, react_jsx_runtime.jsxs)("header", {
|
|
@@ -12198,16 +12436,29 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12198
12436
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
12199
12437
|
className: PendingPanel_module_css_default.title,
|
|
12200
12438
|
children: t("panel.title")
|
|
12201
|
-
}), (0, react_jsx_runtime.
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12439
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
12440
|
+
className: PendingPanel_module_css_default.headerActions,
|
|
12441
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
12442
|
+
type: "button",
|
|
12443
|
+
className: expanded ? `${PendingPanel_module_css_default.expand} ${PendingPanel_module_css_default.expandExpanded}` : PendingPanel_module_css_default.expand,
|
|
12444
|
+
"data-diff-approval-expand": true,
|
|
12445
|
+
"aria-label": t(expanded ? "action.exitFullscreen" : "action.expand"),
|
|
12446
|
+
title: t(expanded ? "action.exitFullscreen" : "action.expand"),
|
|
12447
|
+
onClick: () => {
|
|
12448
|
+
setExpanded((value) => !value);
|
|
12449
|
+
},
|
|
12450
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFullscreenOutline16, { size: 14 })
|
|
12451
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
12452
|
+
type: "button",
|
|
12453
|
+
className: PendingPanel_module_css_default.close,
|
|
12454
|
+
"data-diff-approval-close": true,
|
|
12455
|
+
"aria-label": t("action.close"),
|
|
12456
|
+
title: t("action.close"),
|
|
12457
|
+
onClick: () => {
|
|
12458
|
+
setOpen(false);
|
|
12459
|
+
},
|
|
12460
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutline16, { size: 14 })
|
|
12461
|
+
})]
|
|
12211
12462
|
})]
|
|
12212
12463
|
}), snapshot.error !== void 0 || !snapshot.read || files.length === 0 ? (0, react_jsx_runtime.jsxs)("div", {
|
|
12213
12464
|
className: PendingPanel_module_css_default.states,
|
|
@@ -12532,6 +12783,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12532
12783
|
"action.langAuto": "自动",
|
|
12533
12784
|
"action.langAutoDetected": "自动:{lang}",
|
|
12534
12785
|
"action.langSelect": "高亮语言",
|
|
12786
|
+
"action.expand": "展开全屏",
|
|
12787
|
+
"action.exitFullscreen": "退出全屏",
|
|
12535
12788
|
"action.close": "关闭",
|
|
12536
12789
|
"status.kept": "已保留",
|
|
12537
12790
|
"status.reverted": "已回退",
|
|
@@ -12566,6 +12819,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12566
12819
|
"action.langAuto": "Auto",
|
|
12567
12820
|
"action.langAutoDetected": "Auto: {lang}",
|
|
12568
12821
|
"action.langSelect": "Highlight language",
|
|
12822
|
+
"action.expand": "Expand fullscreen",
|
|
12823
|
+
"action.exitFullscreen": "Exit fullscreen",
|
|
12569
12824
|
"action.close": "Close",
|
|
12570
12825
|
"status.kept": "Kept",
|
|
12571
12826
|
"status.reverted": "Reverted",
|
|
@@ -15,8 +15,18 @@ export interface HighlightSpan {
|
|
|
15
15
|
text: string;
|
|
16
16
|
style: CSSProperties;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Primary grammar ids offered in the viewer's language selector, in picker
|
|
20
|
+
* order (alphabetical). Kept explicit instead of deriving from `LANGS`: some
|
|
21
|
+
* `@shikijs/langs` modules are composite grammars whose `.name` arrays expose
|
|
22
|
+
* embedded sub-grammars (e.g. C++ → `[regexp, glsl, cpp-macro, cpp]`,
|
|
23
|
+
* TypeScript → `[typescript, jsx, tsx, graphql]`), which would otherwise leak
|
|
24
|
+
* ids like `regexp`, `glsl`, `haml` into the menu. `LANGS` still registers the
|
|
25
|
+
* full grammars (including their embedded languages) for highlighting.
|
|
26
|
+
*/
|
|
19
27
|
export declare const HIGHLIGHT_LANGS: string[];
|
|
28
|
+
/** Conventional display name for a grammar id, falling back to the id itself. */
|
|
29
|
+
export declare function languageDisplayName(id: string): string;
|
|
20
30
|
/**
|
|
21
31
|
* Tokenize `code` into per-line highlighted runs when `lang` names a
|
|
22
32
|
* registered grammar; `undefined` means the caller renders its plain fallback.
|
|
@@ -29,6 +29,8 @@ export declare const zh: {
|
|
|
29
29
|
'action.langAuto': string;
|
|
30
30
|
'action.langAutoDetected': string;
|
|
31
31
|
'action.langSelect': string;
|
|
32
|
+
'action.expand': string;
|
|
33
|
+
'action.exitFullscreen': string;
|
|
32
34
|
'action.close': string;
|
|
33
35
|
'status.kept': string;
|
|
34
36
|
'status.reverted': string;
|
|
@@ -71,6 +73,8 @@ export declare const en: {
|
|
|
71
73
|
'action.langAuto': string;
|
|
72
74
|
'action.langAutoDetected': string;
|
|
73
75
|
'action.langSelect': string;
|
|
76
|
+
'action.expand': string;
|
|
77
|
+
'action.exitFullscreen': string;
|
|
74
78
|
'action.close': string;
|
|
75
79
|
'status.kept': string;
|
|
76
80
|
'status.reverted': string;
|
package/package.json
CHANGED