@snowui-design-system/components 0.3.0-alpha.2 → 0.3.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/client/blocks/Sidebar.js +56 -41
  2. package/dist/client/blocks/SidebarSection.js +3 -1
  3. package/dist/client/components/BarChart.js +1 -1
  4. package/dist/client/components/Breadcrumb.js +17 -11
  5. package/dist/client/components/CircularChart.js +2 -2
  6. package/dist/client/components/CodeBlock.js +278 -225
  7. package/dist/client/components/CopyButton.js +5 -2
  8. package/dist/client/components/ExpandButton.js +10 -3
  9. package/dist/client/components/Frame.js +15 -9
  10. package/dist/client/components/GaugeChart.js +2 -2
  11. package/dist/client/components/ImageViewer.js +51 -27
  12. package/dist/client/components/Indicator.js +5 -3
  13. package/dist/client/components/Input.js +27 -17
  14. package/dist/client/components/LineChart.js +1 -1
  15. package/dist/client/components/Link.d.ts +1 -1
  16. package/dist/client/components/Link.js +43 -22
  17. package/dist/client/components/Listbox.js +26 -15
  18. package/dist/client/components/OverflowAction.d.ts +2 -0
  19. package/dist/client/components/OverflowAction.js +146 -65
  20. package/dist/client/components/OverflowActions.d.ts +2 -0
  21. package/dist/client/components/OverflowActions.js +67 -16
  22. package/dist/client/components/Pagination.js +71 -48
  23. package/dist/client/components/Select.js +29 -18
  24. package/dist/client/components/SidePanel.js +76 -50
  25. package/dist/client/components/Tab.js +30 -31
  26. package/dist/client/components/TableBody.js +10 -4
  27. package/dist/client/components/TableCell.js +57 -32
  28. package/dist/client/components/TableHead.js +69 -38
  29. package/dist/client/components/TableToolbar.js +112 -79
  30. package/dist/client/components/Text.js +99 -59
  31. package/dist/client/components/Textarea.js +7 -1
  32. package/dist/client/components/Toast.js +8 -1
  33. package/dist/client/i18n/messages.d.ts +1 -1
  34. package/dist/client/i18n/messages.js +114 -0
  35. package/dist/client/index.d.ts +1 -1
  36. package/dist/client/index.js +1 -1
  37. package/dist/client/lib/number-format.js +6 -0
  38. package/dist/client/lib/progressive-blur.d.ts +13 -0
  39. package/dist/client/lib/progressive-blur.js +54 -0
  40. package/dist/client/logic/ComponentPartsBoundary.d.ts +7 -0
  41. package/dist/client/logic/ComponentPartsBoundary.js +15 -0
  42. package/dist/client/logic/overflow-actions.d.ts +3 -2
  43. package/dist/client/styles/layout.css +12 -2
  44. package/dist/server/blocks/Sidebar.js +19 -5
  45. package/dist/server/blocks/SidebarSection.js +3 -1
  46. package/dist/server/components/BarChart.js +1 -1
  47. package/dist/server/components/Breadcrumb.js +9 -2
  48. package/dist/server/components/CircularChart.js +2 -2
  49. package/dist/server/components/CodeBlock.js +25 -13
  50. package/dist/server/components/CopyButton.js +6 -2
  51. package/dist/server/components/ExpandButton.js +7 -3
  52. package/dist/server/components/Frame.js +10 -3
  53. package/dist/server/components/GaugeChart.js +2 -2
  54. package/dist/server/components/ImageViewer.js +6 -3
  55. package/dist/server/components/Indicator.js +5 -3
  56. package/dist/server/components/Input.js +14 -17
  57. package/dist/server/components/LineChart.js +1 -1
  58. package/dist/server/components/Link.d.ts +1 -1
  59. package/dist/server/components/Link.js +20 -3
  60. package/dist/server/components/Listbox.js +17 -4
  61. package/dist/server/components/OverflowAction.d.ts +2 -0
  62. package/dist/server/components/OverflowAction.js +70 -26
  63. package/dist/server/components/OverflowActions.d.ts +2 -0
  64. package/dist/server/components/OverflowActions.js +49 -14
  65. package/dist/server/components/Pagination.js +21 -10
  66. package/dist/server/components/Select.js +23 -11
  67. package/dist/server/components/SidePanel.js +28 -8
  68. package/dist/server/components/Tab.js +61 -52
  69. package/dist/server/components/TableBody.js +9 -2
  70. package/dist/server/components/TableCell.js +28 -7
  71. package/dist/server/components/TableHead.js +31 -7
  72. package/dist/server/components/TableToolbar.js +57 -30
  73. package/dist/server/components/Text.js +46 -10
  74. package/dist/server/components/Textarea.js +4 -1
  75. package/dist/server/components/Toast.js +4 -1
  76. package/dist/server/i18n/messages.d.ts +1 -1
  77. package/dist/server/i18n/messages.js +114 -0
  78. package/dist/server/index.d.ts +1 -1
  79. package/dist/server/index.js +1 -1
  80. package/dist/server/lib/number-format.js +6 -0
  81. package/dist/server/lib/progressive-blur.d.ts +13 -0
  82. package/dist/server/lib/progressive-blur.js +54 -0
  83. package/dist/server/logic/ComponentPartsBoundary.d.ts +7 -0
  84. package/dist/server/logic/ComponentPartsBoundary.js +12 -0
  85. package/dist/server/logic/overflow-actions.d.ts +3 -2
  86. package/dist/server/styles/layout.css +12 -2
  87. package/package.json +4 -3
@@ -4,8 +4,10 @@ import { formatCodeBlock } from "../internal/code-block/format.js";
4
4
  import Frame from "./Frame.js";
5
5
  import Indicator from "./Indicator.js";
6
6
  import CopyButton from "./CopyButton.js";
7
+ import { useLocale } from "../i18n/locale.js";
7
8
  import { resizeManager } from "../logic/observer.js";
8
9
  import { useOverlayScrollbar } from "../lib/overlay-scrollbar.js";
10
+ import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
9
11
  import { captureFlipRect, beginFlipEnter, applyFlipExit } from "../logic/layout-flip.js";
10
12
  import ExpandButton from "./ExpandButton.js";
11
13
  import { ComponentIcon } from "../internal/component-icon/index.js";
@@ -50,14 +52,14 @@ var root_10 = $.from_html(`<!> <!>`, 1);
50
52
  var root_11 = $.from_html(`<span class="snowui-code-block-line-number"></span>`);
51
53
  var root_12 = $.from_html(`<div class="snowui-code-block-gutter" aria-hidden="true"></div>`);
52
54
  var root_13 = $.from_html(`<span class="snowui-code-block-line"></span>`);
53
- var root_14 = $.from_html(`<div class="snowui-code-block-toolbar snowui-code-block-default-pin-top-right" data-as="pin-top-right" style="--pin-offset: var(--padding-3);"><!> <div class="snowui-code-block-actions"><!></div></div> <div class="snowui-code-block-scroll-shell"><div class="snowui-code-block-body snowui-overlay-scrollbar-viewport snowui-scroll-mask" data-scroll-axis="both"><!> <div class="snowui-code-block-pre-wrap"><pre class="snowui-code-block-pre"><code class="snowui-code-block-code"></code></pre></div></div></div> <div class="snowui-code-block-scrollbar snowui-overlay-scrollbar" data-axis="vertical" aria-hidden="true"><div class="snowui-overlay-scrollbar-thumb"></div></div> <!>`, 1);
55
+ var root_14 = $.from_html(`<div class="snowui-code-block-toolbar snowui-code-block-default-pin-top-right" data-as="pin-top-right" style="--pin-offset-y: var(--padding-2); --pin-offset-x: var(--padding-1);"><!> <div class="snowui-code-block-actions"><!></div></div> <div class="snowui-code-block-scroll-shell"><div class="snowui-code-block-body snowui-overlay-scrollbar-viewport snowui-scroll-mask" data-scroll-axis="both"><!> <div class="snowui-code-block-pre-wrap"><pre class="snowui-code-block-pre"><code class="snowui-code-block-code"></code></pre></div></div></div> <div class="snowui-code-block-scrollbar snowui-overlay-scrollbar" data-axis="vertical" aria-hidden="true"><div class="snowui-overlay-scrollbar-thumb"></div></div> <!>`, 1);
54
56
  var root_15 = $.from_html(`<div class="snowui-code-block-accessories" aria-hidden="true"><!></div>`);
55
57
  var root_16 = $.from_html(`<!> <div class="snowui-code-block-scrollbar snowui-overlay-scrollbar" data-axis="horizontal" aria-hidden="true"><div class="snowui-overlay-scrollbar-thumb"></div></div> <!>`, 1);
56
- var root_17 = $.from_html(`<div class="snowui-code-block-toolbar snowui-code-block-toolbar-fullscreen" data-as="pin-top-right" style="--pin-offset: var(--padding-3);"><!> <div class="snowui-code-block-actions"><!> <!></div></div> <div class="snowui-code-block-scroll-shell snowui-code-block-scroll-shell-fullscreen"><div class="snowui-code-block-body snowui-code-block-body-fullscreen snowui-overlay-scrollbar-viewport snowui-scroll-mask" data-scroll-axis="both"><!> <div class="snowui-code-block-pre-wrap"><pre class="snowui-code-block-pre"><code class="snowui-code-block-code"></code></pre></div></div></div> <div class="snowui-code-block-scrollbar snowui-overlay-scrollbar" data-axis="vertical" aria-hidden="true"><div class="snowui-overlay-scrollbar-thumb"></div></div> <div class="snowui-code-block-scrollbar snowui-overlay-scrollbar" data-axis="horizontal" aria-hidden="true"><div class="snowui-overlay-scrollbar-thumb"></div></div>`, 1);
58
+ var root_17 = $.from_html(`<div class="snowui-code-block-toolbar snowui-code-block-toolbar-fullscreen" data-as="pin-top-right" style="--pin-offset-y: var(--padding-2); --pin-offset-x: var(--padding-1);"><!> <div class="snowui-code-block-actions"><!> <!></div></div> <div class="snowui-code-block-scroll-shell snowui-code-block-scroll-shell-fullscreen"><div class="snowui-code-block-body snowui-code-block-body-fullscreen snowui-overlay-scrollbar-viewport snowui-scroll-mask" data-scroll-axis="both"><!> <div class="snowui-code-block-pre-wrap"><pre class="snowui-code-block-pre"><code class="snowui-code-block-code"></code></pre></div></div></div> <div class="snowui-code-block-scrollbar snowui-overlay-scrollbar" data-axis="vertical" aria-hidden="true"><div class="snowui-overlay-scrollbar-thumb"></div></div> <div class="snowui-code-block-scrollbar snowui-overlay-scrollbar" data-axis="horizontal" aria-hidden="true"><div class="snowui-overlay-scrollbar-thumb"></div></div>`, 1);
57
59
 
58
60
  const $$css = {
59
61
  hash: 'svelte-ipr7k2',
60
- code: '\n /* ─── Level 2:组件基类(降权 0,0,0) ─── */:where(.snowui-code-block) {--snowui-code-block-bg: var(--background-2, #f9f9fa);--snowui-code-block-fg: var(--black-100, #000000ff);--snowui-code-block-muted-fg: var(--black-40, #00000066);--snowui-code-block-gutter-fg: var(--black-20, #00000033);--snowui-code-block-btn-fg: var(--black-100, #000000ff);--snowui-code-block-keyword-fg: #ff32c6;--snowui-code-block-function-fg: #ffac60;--snowui-code-block-property-fg: #1ac69c;--snowui-code-block-string-fg: #3fa4ff;--snowui-code-block-variable-fg: #c478ff;--snowui-code-block-radius: var(--radius-4);--snowui-code-block-padding-x: var(--padding-5);--snowui-code-block-padding-y: var(--padding-5);--snowui-code-block-gap: var(--gap-2);--snowui-code-block-code-gap: var(--gap-3);--snowui-code-block-footer-height: var(--padding-3);--snowui-code-block-font-size: var(--text-12);--snowui-code-block-line-height: var(--leading-12);--snowui-code-block-font-family: inherit;--snowui-code-block-visible-lines: 5;--snowui-code-block-content-height: calc(\n var(--snowui-code-block-visible-lines) * 1lh\n );background-color:var(\n --snowui-code-block-bg-override,\n var(--snowui-code-block-bg)\n );color:var(\n --snowui-code-block-fg-override,\n var(--snowui-code-block-fg)\n );border-radius:var(\n --snowui-code-block-radius-override,\n var(--snowui-code-block-radius)\n );padding:var(\n --snowui-code-block-padding-override,\n var(\n --snowui-code-block-padding-y-override,\n var(--snowui-code-block-padding-y)\n )\n var(\n --snowui-code-block-padding-x-override,\n var(--snowui-code-block-padding-x)\n )\n );font-size:var(--snowui-code-block-font-size);line-height:var(--snowui-code-block-line-height);font-family:var(--snowui-code-block-font-family);overflow:hidden;position:relative;width:100%;}:where(.snowui-code-block[data-variant="default"]) {display:flex;flex-direction:column;gap:var(--gap-2);}\n\n /* singleLine:沿用 Input 的 Leading / Content / Trailing 三槽结构。 */:where(.snowui-code-block[data-variant="singleLine"]) {--snowui-code-block-padding-x: var(--padding-4);--snowui-code-block-padding-y: var(--padding-3);gap:var(\n --snowui-code-block-gap-override,\n var(--snowui-code-block-gap)\n );box-sizing:border-box;height:auto;}:where(.snowui-code-block-single-line-content) {grid-row:1;min-width:0;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;}:where(.snowui-code-block-single-line-content::-webkit-scrollbar) {display:none;}\n :where(\n .snowui-code-block[data-variant="singleLine"]\n > [data-as="leading"],\n .snowui-code-block[data-variant="singleLine"]\n > [data-as="trailing"]\n )\n {display:inline-flex;align-items:center;justify-content:center;min-width:0;white-space:nowrap;line-height:inherit;}:where(.snowui-code-block-fullscreen) {--snowui-code-block-bg: var(--background-2, #f9f9fa);--snowui-code-block-fg: var(--black-100, #000000ff);--snowui-code-block-muted-fg: var(--black-40, #00000066);--snowui-code-block-gutter-fg: var(--black-20, #00000033);--snowui-code-block-btn-fg: var(--black-100, #000000ff);--snowui-code-block-radius: var(--radius-4);--snowui-code-block-padding-x: var(--padding-5);--snowui-code-block-padding-y: var(--padding-5);--snowui-code-block-gap: var(--gap-2);--snowui-code-block-code-gap: var(--gap-3);--snowui-code-block-footer-height: var(--padding-3);--snowui-code-block-font-size: var(--text-12);--snowui-code-block-line-height: var(--leading-12);--snowui-code-block-font-family: inherit;--snowui-code-block-content-height: 5lh;}\n\n /* ─── 工具栏 ─── */:where(.snowui-code-block-toolbar) {display:flex;align-items:center;justify-content:space-between;gap:var(--gap-2);z-index:3;}:where(.snowui-code-block-lang) {color:var(--snowui-code-block-muted-fg);user-select:none;}:where(.snowui-code-block-actions) {display:flex;align-items:center;gap:var(\n --snowui-code-block-gap-override,\n var(--snowui-code-block-gap)\n );}\n\n /* ─── 图标按钮:统一使用 CopyButton / ExpandButton 的 bare 默认尺寸 ─── */:where(button).snowui-code-block-btn {--snowui-field-focus-ring-width: 0;color:var(--snowui-code-block-btn-fg);transition:color var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}\n :where(button).snowui-code-block-btn:focus,\n :where(button).snowui-code-block-btn:focus-visible\n {outline:none;box-shadow:none;}:where(button).snowui-code-block-btn:hover:not(:disabled) {background-image:none;box-shadow:none;}\n\n /* ─── 代码主体区域 ─── */:where(.snowui-code-block-scroll-shell) {position:relative;height:var(\n --snowui-code-block-content-height-override,\n var(--snowui-code-block-content-height)\n );min-height:0;overflow:clip;background:transparent;}:where(.snowui-code-block[data-resized="true"] .snowui-code-block-scroll-shell) {flex:1 1 0;height:auto;}\n\n /* 上下滚动渐隐:接入「内容渐隐层」通用能力的 CSS 静态形态(.snowui-scroll-mask,见 lib/edge-fade.md)。 */:where(.snowui-code-block-body) {--snowui-code-block-scroll-mask-size: var(\n --snowui-code-block-scroll-mask-size-override,\n 32px\n );display:flex;align-items:flex-start;gap:var(\n --snowui-code-block-code-gap-override,\n var(--snowui-code-block-code-gap)\n );flex:1 1 0;height:100%;overflow-x:auto;min-height:0;background:transparent;}\n\n /* ─── 行号槽 ─── */:where(.snowui-code-block-gutter) {display:block;flex-shrink:0;width:max-content;color:var(--snowui-code-block-gutter-fg);background:transparent;text-align:right;user-select:none;font:inherit;}:where(.snowui-code-block-line-number) {display:block;line-height:inherit;}:where(.snowui-code-block-pre-wrap) {flex:1 1 0;min-width:0;overflow:visible;background:transparent;}:where(.snowui-code-block-pre) {box-sizing:border-box;margin:0;tab-size:4;white-space:pre;overflow:visible;background:transparent;font:inherit;}:where(.snowui-code-block-code) {box-sizing:border-box;display:block;color:inherit;background:transparent;border-radius:0;font:inherit;margin:0;padding:0;}\n :where(\n .snowui-code-block[data-variant="singleLine"]\n .snowui-code-block-pre\n )\n {white-space:nowrap;}\n :where(\n .snowui-code-block[data-variant="singleLine"]\n .snowui-code-block-code\n )\n {display:inline;}:where(.snowui-code-block-line) {display:block;line-height:inherit;}:where(.snowui-code-block-token-comment) {color:var(--black-40, #00000066);}:where(.snowui-code-block-token-keyword) {color:#ff32c6;}:where(.snowui-code-block-token-function) {color:#ffac60;}:where(.snowui-code-block-token-property) {color:#1ac69c;}:where(.snowui-code-block-token-string) {color:#3fa4ff;}:where(.snowui-code-block-token-variable) {color:#c478ff;}\n\n /* ─── 全屏覆盖层 ─── */:where(.snowui-code-block-fullscreen) {position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;font-size:var(--snowui-code-block-font-size);line-height:var(--snowui-code-block-line-height);font-family:var(--snowui-code-block-font-family);background-color:var(\n --snowui-code-block-bg-override,\n var(--snowui-code-block-bg)\n );color:var(\n --snowui-code-block-fg-override,\n var(--snowui-code-block-fg)\n );border-radius:0;padding:var(\n --snowui-code-block-padding-override,\n var(\n --snowui-code-block-padding-y-override,\n var(--snowui-code-block-padding-y)\n )\n var(\n --snowui-code-block-padding-x-override,\n var(--snowui-code-block-padding-x)\n )\n );}\n\n /* 全屏工具栏与普通态保持一致:距上/右 8px。 */:where(.snowui-code-block-toolbar-fullscreen) {padding:0;}:where(.snowui-code-block-body-fullscreen) {padding-bottom:max(var(--padding-0), env(safe-area-inset-bottom));}:where(.snowui-code-block-scroll-shell-fullscreen) {flex:1 1 0;height:auto;}\n\n /* 组件只声明轨道定位;视觉样式由 scrollbar.css 的 .snowui-overlay-scrollbar 承接。 */\n /* 滚动条提升到根容器(position:relative),绕开 scroll-shell 的 overflow:clip 裁切。 */\n /* top/bottom 对齐 scroll-shell 上下边缘(即容器 padding-y 处),right: 4px 贴近右边缘。 */:where(.snowui-code-block-scrollbar[data-axis="vertical"]) {top:var(\n --snowui-code-block-padding-y-override,\n var(--snowui-code-block-padding-y)\n );right:4px;bottom:var(--snowui-code-block-footer-height);z-index:2;}:where(.snowui-code-block-accessories) {position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;opacity:0;}\n\n /* ─── 内置 SVG 图标基础样式 ─── */:where(.snowui-code-block-icon-builtin),\n :where(.snowui-code-block-icon-custom) {display:block;flex-shrink:0;color:inherit;}:where(.snowui-code-block-icon-custom > *) {display:block;}:where(.snowui-code-block-trailing-custom) {display:inline-flex;align-items:center;justify-content:center;color:inherit;}:where(.snowui-code-block-trailing-custom > *) {display:inline-flex;}'
62
+ code: '\n /* ─── Level 2:组件基类(降权 0,0,0) ─── */:where(.snowui-code-block) {--snowui-code-block-bg: var(--background-2, #f9f9fa);--snowui-code-block-fg: var(--black-100, #000000ff);--snowui-code-block-muted-fg: var(--black-40, #00000066);--snowui-code-block-gutter-fg: var(--black-20, #00000033);--snowui-code-block-btn-fg: var(--black-100, #000000ff);--snowui-code-block-keyword-fg: #ff32c6;--snowui-code-block-function-fg: #ffac60;--snowui-code-block-property-fg: #1ac69c;--snowui-code-block-string-fg: #3fa4ff;--snowui-code-block-variable-fg: #c478ff;--snowui-code-block-radius: var(--radius-4);--snowui-code-block-padding-x: var(--padding-5);--snowui-code-block-padding-y: var(--padding-5);--snowui-code-block-gap: var(--gap-2);--snowui-code-block-code-gap: var(--gap-3);--snowui-code-block-footer-height: var(--padding-3);--snowui-code-block-font-size: var(--text-12);--snowui-code-block-line-height: var(--leading-12);--snowui-code-block-font-family: inherit;--snowui-code-block-visible-lines: 5;--snowui-code-block-content-height: calc(\n var(--snowui-code-block-visible-lines) * 1lh\n );background-color:var(\n --snowui-code-block-bg-override,\n var(--snowui-code-block-bg)\n );color:var(\n --snowui-code-block-fg-override,\n var(--snowui-code-block-fg)\n );border-radius:var(\n --snowui-code-block-radius-override,\n var(--snowui-code-block-radius)\n );padding:var(\n --snowui-code-block-padding-override,\n var(\n --snowui-code-block-padding-y-override,\n var(--snowui-code-block-padding-y)\n )\n var(\n --snowui-code-block-padding-x-override,\n var(--snowui-code-block-padding-x)\n )\n );font-size:var(--snowui-code-block-font-size);line-height:var(--snowui-code-block-line-height);font-family:var(--snowui-code-block-font-family);overflow:hidden;position:relative;width:100%;}:where(.snowui-code-block[data-variant="default"]) {display:flex;flex-direction:column;gap:var(--gap-2);}\n\n /* singleLine:沿用 Input 的 Leading / Content / Trailing 三槽结构。 */:where(.snowui-code-block[data-variant="singleLine"]) {--snowui-code-block-padding-x: var(--padding-4);--snowui-code-block-padding-y: var(--padding-3);gap:var(\n --snowui-code-block-gap-override,\n var(--snowui-code-block-gap)\n );box-sizing:border-box;height:auto;}:where(.snowui-code-block-single-line-content) {grid-row:1;min-width:0;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;}:where(.snowui-code-block-single-line-content::-webkit-scrollbar) {display:none;}\n :where(\n .snowui-code-block[data-variant="singleLine"]\n > [data-as="leading"],\n .snowui-code-block[data-variant="singleLine"]\n > [data-as="trailing"]\n )\n {display:inline-flex;align-items:center;justify-content:center;min-width:0;white-space:nowrap;line-height:inherit;}:where(.snowui-code-block-fullscreen) {--snowui-code-block-bg: var(--background-2, #f9f9fa);--snowui-code-block-fg: var(--black-100, #000000ff);--snowui-code-block-muted-fg: var(--black-40, #00000066);--snowui-code-block-gutter-fg: var(--black-20, #00000033);--snowui-code-block-btn-fg: var(--black-100, #000000ff);--snowui-code-block-radius: var(--radius-4);--snowui-code-block-padding-x: var(--padding-5);--snowui-code-block-padding-y: var(--padding-5);--snowui-code-block-gap: var(--gap-2);--snowui-code-block-code-gap: var(--gap-3);--snowui-code-block-footer-height: var(--padding-3);--snowui-code-block-font-size: var(--text-12);--snowui-code-block-line-height: var(--leading-12);--snowui-code-block-font-family: inherit;--snowui-code-block-content-height: 5lh;}\n\n /* ─── 工具栏 ─── */:where(.snowui-code-block-toolbar) {display:flex;align-items:center;justify-content:space-between;gap:var(--gap-2);max-width:calc(100% - var(--size-3));z-index:3;}:where(.snowui-code-block-lang) {color:var(--snowui-code-block-muted-fg);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:none;}:where(.snowui-code-block-actions) {display:flex;align-items:center;flex-shrink:0;gap:var(\n --snowui-code-block-gap-override,\n var(--snowui-code-block-gap)\n );}\n\n /* 默认态与全屏态各按钮独立拥有背景与命中区;singleLine 保留行内 trailing。 */:where(.snowui-code-block-toolbar button).snowui-code-block-btn {--snowui-field-focus-ring-width: 0;--snowui-button-padding-override: var(--padding-1) var(--padding-2);--snowui-button-radius-override: var(--radius-2);--snowui-button-background-override: var(--black-20, #00000033);color:var(--snowui-code-block-btn-fg);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);transition:color var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}\n :where(.snowui-code-block-toolbar button).snowui-code-block-btn:focus-visible\n {outline:2px solid var(--brand, #33d1ffff);outline-offset:1px;}:where(.snowui-code-block-toolbar button).snowui-code-block-btn:hover:not(:disabled) {background-image:none;}\n\n /* ─── 代码主体区域 ─── */:where(.snowui-code-block-scroll-shell) {position:relative;height:var(\n --snowui-code-block-content-height-override,\n var(--snowui-code-block-content-height)\n );min-height:0;overflow:clip;background:transparent;}:where(.snowui-code-block[data-resized="true"] .snowui-code-block-scroll-shell) {flex:1 1 0;height:auto;}\n\n /* 上下滚动渐隐:接入「内容渐隐层」通用能力的 CSS 静态形态(.snowui-scroll-mask,见 lib/edge-fade.md)。 */:where(.snowui-code-block-body) {--snowui-code-block-scroll-mask-size: var(\n --snowui-code-block-scroll-mask-size-override,\n 32px\n );display:flex;align-items:flex-start;gap:var(\n --snowui-code-block-code-gap-override,\n var(--snowui-code-block-code-gap)\n );flex:1 1 0;height:100%;overflow-x:auto;min-height:0;background:transparent;}\n\n /* ─── 行号槽 ─── */:where(.snowui-code-block-gutter) {display:block;flex-shrink:0;width:max-content;color:var(--snowui-code-block-gutter-fg);background:transparent;text-align:right;user-select:none;font:inherit;}:where(.snowui-code-block-line-number) {display:block;line-height:inherit;}:where(.snowui-code-block-pre-wrap) {flex:1 1 0;min-width:0;overflow:visible;background:transparent;}:where(.snowui-code-block-pre) {box-sizing:border-box;margin:0;tab-size:4;white-space:pre;overflow:visible;background:transparent;font:inherit;}:where(.snowui-code-block-code) {box-sizing:border-box;display:block;color:inherit;background:transparent;border-radius:0;font:inherit;margin:0;padding:0;}\n :where(\n .snowui-code-block[data-variant="singleLine"]\n .snowui-code-block-pre\n )\n {white-space:nowrap;}\n :where(\n .snowui-code-block[data-variant="singleLine"]\n .snowui-code-block-code\n )\n {display:inline;}:where(.snowui-code-block-line) {display:block;line-height:inherit;}:where(.snowui-code-block-token-comment) {color:var(--black-40, #00000066);}:where(.snowui-code-block-token-keyword) {color:#ff32c6;}:where(.snowui-code-block-token-function) {color:#ffac60;}:where(.snowui-code-block-token-property) {color:#1ac69c;}:where(.snowui-code-block-token-string) {color:#3fa4ff;}:where(.snowui-code-block-token-variable) {color:#c478ff;}\n\n /* ─── 全屏覆盖层 ─── */:where(.snowui-code-block-fullscreen) {position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;font-size:var(--snowui-code-block-font-size);line-height:var(--snowui-code-block-line-height);font-family:var(--snowui-code-block-font-family);background-color:var(\n --snowui-code-block-bg-override,\n var(--snowui-code-block-bg)\n );color:var(\n --snowui-code-block-fg-override,\n var(--snowui-code-block-fg)\n );border-radius:0;padding:var(\n --snowui-code-block-padding-override,\n var(\n --snowui-code-block-padding-y-override,\n var(--snowui-code-block-padding-y)\n )\n var(\n --snowui-code-block-padding-x-override,\n var(--snowui-code-block-padding-x)\n )\n );}:where(.snowui-code-block[data-top-actions="true"]),\n :where(.snowui-code-block-fullscreen) {padding-top:calc(\n var(--snowui-code-block-padding-y-override, var(--snowui-code-block-padding-y))\n + var(--padding-4)\n );}\n\n /* 全屏工具栏与普通态保持一致:距上/右 8px。 */:where(.snowui-code-block-toolbar-fullscreen) {padding:0;}:where(.snowui-code-block-body-fullscreen) {padding-bottom:max(var(--padding-0), env(safe-area-inset-bottom));}:where(.snowui-code-block-scroll-shell-fullscreen) {flex:1 1 0;height:auto;}\n\n /* 组件只声明轨道定位;视觉样式由 scrollbar.css 的 .snowui-overlay-scrollbar 承接。 */\n /* 滚动条提升到根容器(position:relative),绕开 scroll-shell 的 overflow:clip 裁切。 */\n /* top/bottom 对齐 scroll-shell 上下边缘(即容器 padding-y 处),right: 4px 贴近右边缘。 */:where(.snowui-code-block-scrollbar[data-axis="vertical"]) {top:var(\n --snowui-code-block-padding-y-override,\n var(--snowui-code-block-padding-y)\n );right:4px;bottom:var(--snowui-code-block-footer-height);z-index:2;}:where(.snowui-code-block[data-top-actions="true"] .snowui-code-block-scrollbar[data-axis="vertical"]),\n :where(.snowui-code-block-fullscreen .snowui-code-block-scrollbar[data-axis="vertical"]) {top:calc(var(--padding-2) + var(--size-6) + var(--padding-1));}:where(.snowui-code-block-accessories) {position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;opacity:0;}\n\n /* ─── 内置 SVG 图标基础样式 ─── */:where(.snowui-code-block-icon-builtin),\n :where(.snowui-code-block-icon-custom) {display:block;flex-shrink:0;color:inherit;}:where(.snowui-code-block-icon-custom > *) {display:block;}:where(.snowui-code-block-trailing-custom) {display:inline-flex;align-items:center;justify-content:center;color:inherit;}:where(.snowui-code-block-trailing-custom > *) {display:inline-flex;}'
61
63
  };
62
64
 
63
65
  export default function CodeBlock($$anchor, $$props) {
@@ -252,6 +254,7 @@ export default function CodeBlock($$anchor, $$props) {
252
254
  /* ─── 内部状态 ─── */
253
255
  const fullscreenMotionId = `code-block-fullscreen-${++codeBlockInstanceSeed}`;
254
256
 
257
+ const localeContext = useLocale();
255
258
  let isFullscreen = $.state(false);
256
259
  let isExitingFullscreen = $.state(false);
257
260
 
@@ -672,7 +675,8 @@ export default function CodeBlock($$anchor, $$props) {
672
675
  className()
673
676
  ].filter(Boolean).join(" "));
674
677
 
675
- let $1 = $.derived(() => !$.get(isSingleLine) && $.get(resizeHeight) !== undefined ? "true" : undefined);
678
+ let $1 = $.derived(() => !$.get(isSingleLine) && (showLanguage() && language() || showCopyButton() || showExpandButton() || $.get(hasCustomTrailing)) ? "true" : undefined);
679
+ let $2 = $.derived(() => !$.get(isSingleLine) && $.get(resizeHeight) !== undefined ? "true" : undefined);
676
680
 
677
681
  Frame(node_3, $.spread_props(() => rest, {
678
682
  get enableResponsive() {
@@ -703,10 +707,14 @@ export default function CodeBlock($$anchor, $$props) {
703
707
  return variant();
704
708
  },
705
709
 
706
- get 'data-resized'() {
710
+ get 'data-top-actions'() {
707
711
  return $.get($1);
708
712
  },
709
713
 
714
+ get 'data-resized'() {
715
+ return $.get($2);
716
+ },
717
+
710
718
  get style() {
711
719
  return $.get(rootStyle);
712
720
  },
@@ -795,6 +803,7 @@ export default function CodeBlock($$anchor, $$props) {
795
803
  let $0 = $.derived(() => parts()?.CopyButton?.emphasis ?? "muted");
796
804
  let $1 = $.derived(() => $.get(hasCustomCopyIcon) ? normalizeActionSnippet(copyIconSnippet) : undefined);
797
805
  let $2 = $.derived(() => $.get(hasCustomCopiedIcon) ? normalizeActionSnippet(copiedIconSnippet) : undefined);
806
+ let $3 = $.derived(() => localeContext.t("codeBlock.copyCode"));
798
807
 
799
808
  CopyButton(node_7, {
800
809
  get text() {
@@ -817,7 +826,9 @@ export default function CodeBlock($$anchor, $$props) {
817
826
  return $.get($2);
818
827
  },
819
828
  class: 'snowui-code-block-btn snowui-hoverable',
820
- ariaLabel: '复制代码'
829
+ get ariaLabel() {
830
+ return $.get($3);
831
+ }
821
832
  });
822
833
  }
823
834
 
@@ -875,6 +886,7 @@ export default function CodeBlock($$anchor, $$props) {
875
886
  let $0 = $.derived(() => parts()?.CopyButton?.emphasis ?? "muted");
876
887
  let $1 = $.derived(() => $.get(hasCustomCopyIcon) ? normalizeActionSnippet(copyIconSnippet) : undefined);
877
888
  let $2 = $.derived(() => $.get(hasCustomCopiedIcon) ? normalizeActionSnippet(copiedIconSnippet) : undefined);
889
+ let $3 = $.derived(() => localeContext.t("codeBlock.copyCode"));
878
890
 
879
891
  CopyButton($$anchor, {
880
892
  get text() {
@@ -897,7 +909,9 @@ export default function CodeBlock($$anchor, $$props) {
897
909
  return $.get($2);
898
910
  },
899
911
  class: 'snowui-code-block-btn snowui-hoverable',
900
- ariaLabel: '复制代码'
912
+ get ariaLabel() {
913
+ return $.get($3);
914
+ }
901
915
  });
902
916
  }
903
917
  };
@@ -913,9 +927,11 @@ export default function CodeBlock($$anchor, $$props) {
913
927
  var consequent_9 = ($$anchor) => {
914
928
  {
915
929
  let $0 = $.derived(() => parts()?.ExpandButton?.emphasis ?? "muted");
916
- let $1 = $.derived(() => $.get(hasCustomExpandIcon) ? normalizeActionSnippet(expandIconSnippet) : undefined);
930
+ let $1 = $.derived(() => localeContext.t("codeBlock.fullscreen"));
931
+ let $2 = $.derived(() => localeContext.t("codeBlock.exitFullscreen"));
932
+ let $3 = $.derived(() => $.get(hasCustomExpandIcon) ? normalizeActionSnippet(expandIconSnippet) : undefined);
917
933
 
918
- let $2 = $.derived(() => $.get(hasCustomCollapseIcon)
934
+ let $4 = $.derived(() => $.get(hasCustomCollapseIcon)
919
935
  ? normalizeActionSnippet(collapseIconSnippet)
920
936
  : undefined);
921
937
 
@@ -928,15 +944,20 @@ export default function CodeBlock($$anchor, $$props) {
928
944
  return $.get($0);
929
945
  },
930
946
  class: 'snowui-code-block-btn',
931
- ariaLabel: '全屏查看',
932
- collapseAriaLabel: '退出全屏',
947
+ get ariaLabel() {
948
+ return $.get($1);
949
+ },
950
+
951
+ get collapseAriaLabel() {
952
+ return $.get($2);
953
+ },
933
954
  onclick: toggleFullscreen,
934
955
  get icon() {
935
- return $.get($1);
956
+ return $.get($3);
936
957
  },
937
958
 
938
959
  get collapseIcon() {
939
- return $.get($2);
960
+ return $.get($4);
940
961
  }
941
962
  });
942
963
  }
@@ -1022,20 +1043,26 @@ export default function CodeBlock($$anchor, $$props) {
1022
1043
 
1023
1044
  var node_13 = $.sibling(div_8, 2);
1024
1045
 
1025
- Indicator(node_13, {
1026
- get target() {
1027
- return $.get(hostElement);
1028
- },
1029
-
1030
- get revealTarget() {
1031
- return $.get(hostElement);
1032
- },
1033
- appearance: 'corner',
1034
- applySize: false,
1035
- minSize: 60,
1036
- ariaLabel: '调整代码块宽度和高度',
1037
- onSizeChange: handleResizeSize
1038
- });
1046
+ {
1047
+ let $0 = $.derived(() => localeContext.t("codeBlock.resize"));
1048
+
1049
+ Indicator(node_13, {
1050
+ get target() {
1051
+ return $.get(hostElement);
1052
+ },
1053
+
1054
+ get revealTarget() {
1055
+ return $.get(hostElement);
1056
+ },
1057
+ appearance: 'corner',
1058
+ applySize: false,
1059
+ minSize: 60,
1060
+ get ariaLabel() {
1061
+ return $.get($0);
1062
+ },
1063
+ onSizeChange: handleResizeSize
1064
+ });
1065
+ }
1039
1066
 
1040
1067
  $.template_effect(
1041
1068
  ($0) => {
@@ -1069,7 +1096,17 @@ export default function CodeBlock($$anchor, $$props) {
1069
1096
  var div_12 = root_15();
1070
1097
  var node_15 = $.child(div_12);
1071
1098
 
1072
- $.snippet(node_15, () => $$props.children);
1099
+ ComponentPartsBoundary(node_15, {
1100
+ children: ($$anchor, $$slotProps) => {
1101
+ var fragment_11 = $.comment();
1102
+ var node_16 = $.first_child(fragment_11);
1103
+
1104
+ $.snippet(node_16, () => $$props.children);
1105
+ $.append($$anchor, fragment_11);
1106
+ },
1107
+ $$slots: { default: true }
1108
+ });
1109
+
1073
1110
  $.reset(div_12);
1074
1111
  $.append($$anchor, div_12);
1075
1112
  };
@@ -1091,228 +1128,244 @@ export default function CodeBlock($$anchor, $$props) {
1091
1128
  }));
1092
1129
  }
1093
1130
 
1094
- var node_16 = $.sibling(node_3, 2);
1131
+ var node_17 = $.sibling(node_3, 2);
1095
1132
 
1096
1133
  {
1097
1134
  var consequent_17 = ($$anchor) => {
1098
- Frame($$anchor, {
1099
- get componentParts() {
1100
- return parts();
1101
- },
1102
- tag: 'div',
1103
- role: 'dialog',
1104
- 'aria-modal': 'true',
1105
- 'aria-label': '全屏代码查看',
1106
- enableResponsive: false,
1107
- enableContext: false,
1108
- enableScaleObserver: false,
1109
- class: 'snowui-code-block-fullscreen snowui-overlay-scrollbar-host',
1110
- get style() {
1111
- return $.get(fullscreenBackgroundStyle);
1112
- },
1113
- tabindex: -1,
1114
- get element() {
1115
- return $.get(fullscreenElement);
1116
- },
1117
-
1118
- set element($$value) {
1119
- $.set(fullscreenElement, $$value, true);
1120
- },
1121
-
1122
- children: ($$anchor, $$slotProps) => {
1123
- var fragment_12 = root_17();
1124
- var div_13 = $.first_child(fragment_12);
1125
- var node_17 = $.child(div_13);
1126
-
1127
- {
1128
- var consequent_12 = ($$anchor) => {
1129
- var span_12 = root_9();
1130
- var text_4 = $.child(span_12, true);
1131
-
1132
- $.reset(span_12);
1133
- $.template_effect(() => $.set_text(text_4, language()));
1134
- $.append($$anchor, span_12);
1135
- };
1136
-
1137
- $.if(node_17, ($$render) => {
1138
- if (showLanguage() && language()) $$render(consequent_12);
1139
- });
1140
- }
1141
-
1142
- var div_14 = $.sibling(node_17, 2);
1143
- var node_18 = $.child(div_14);
1144
-
1145
- {
1146
- var consequent_13 = ($$anchor) => {
1147
- var span_13 = root_6();
1148
-
1149
- $.html(span_13, () => $.get(customTrailingHtml), true);
1150
- $.reset(span_13);
1151
- $.append($$anchor, span_13);
1152
- };
1153
-
1154
- var consequent_14 = ($$anchor) => {
1155
- {
1156
- let $0 = $.derived(() => parts()?.CopyButton?.emphasis ?? "muted");
1157
- let $1 = $.derived(() => $.get(hasCustomCopyIcon) ? normalizeActionSnippet(copyIconSnippet) : undefined);
1158
- let $2 = $.derived(() => $.get(hasCustomCopiedIcon) ? normalizeActionSnippet(copiedIconSnippet) : undefined);
1159
-
1160
- CopyButton($$anchor, {
1161
- get text() {
1162
- return $.get(resolvedCode);
1163
- },
1164
- bare: true,
1165
- get emphasis() {
1166
- return $.get($0);
1167
- },
1168
- showText: false,
1169
- get feedbackDuration() {
1170
- return copyTimeout();
1171
- },
1172
-
1173
- get icon() {
1174
- return $.get($1);
1175
- },
1176
-
1177
- get successIcon() {
1178
- return $.get($2);
1179
- },
1180
- class: 'snowui-code-block-btn snowui-hoverable',
1181
- ariaLabel: '复制代码'
1182
- });
1183
- }
1184
- };
1135
+ {
1136
+ let $0 = $.derived(() => localeContext.t("codeBlock.fullscreenDialog"));
1137
+
1138
+ Frame($$anchor, {
1139
+ get componentParts() {
1140
+ return parts();
1141
+ },
1142
+ tag: 'div',
1143
+ role: 'dialog',
1144
+ 'aria-modal': 'true',
1145
+ get 'aria-label'() {
1146
+ return $.get($0);
1147
+ },
1148
+ enableResponsive: false,
1149
+ enableContext: false,
1150
+ enableScaleObserver: false,
1151
+ class: 'snowui-code-block-fullscreen snowui-overlay-scrollbar-host',
1152
+ get style() {
1153
+ return $.get(fullscreenBackgroundStyle);
1154
+ },
1155
+ tabindex: -1,
1156
+ get element() {
1157
+ return $.get(fullscreenElement);
1158
+ },
1159
+
1160
+ set element($$value) {
1161
+ $.set(fullscreenElement, $$value, true);
1162
+ },
1163
+
1164
+ children: ($$anchor, $$slotProps) => {
1165
+ var fragment_13 = root_17();
1166
+ var div_13 = $.first_child(fragment_13);
1167
+ var node_18 = $.child(div_13);
1185
1168
 
1186
- $.if(node_18, ($$render) => {
1187
- if ($.get(hasCustomTrailing)) $$render(consequent_13); else if (showCopyButton()) $$render(consequent_14, 1);
1188
- });
1189
- }
1190
-
1191
- var node_19 = $.sibling(node_18, 2);
1192
-
1193
- {
1194
- var consequent_15 = ($$anchor) => {
1195
- {
1196
- let $0 = $.derived(() => parts()?.ExpandButton?.emphasis ?? "muted");
1197
-
1198
- let $1 = $.derived(() => $.get(hasCustomCollapseIcon)
1199
- ? normalizeActionSnippet(collapseIconSnippet)
1200
- : undefined);
1201
-
1202
- ExpandButton($$anchor, {
1203
- expanded: true,
1204
- bare: true,
1205
- get emphasis() {
1206
- return $.get($0);
1207
- },
1208
- class: 'snowui-code-block-btn',
1209
- ariaLabel: '全屏查看',
1210
- collapseAriaLabel: '退出全屏',
1211
- onclick: exitFullscreen,
1212
- get collapseIcon() {
1213
- return $.get($1);
1214
- }
1215
- });
1216
- }
1217
- };
1169
+ {
1170
+ var consequent_12 = ($$anchor) => {
1171
+ var span_12 = root_9();
1172
+ var text_4 = $.child(span_12, true);
1218
1173
 
1219
- $.if(node_19, ($$render) => {
1220
- if (showExpandButton()) $$render(consequent_15);
1221
- });
1222
- }
1174
+ $.reset(span_12);
1175
+ $.template_effect(() => $.set_text(text_4, language()));
1176
+ $.append($$anchor, span_12);
1177
+ };
1178
+
1179
+ $.if(node_18, ($$render) => {
1180
+ if (showLanguage() && language()) $$render(consequent_12);
1181
+ });
1182
+ }
1183
+
1184
+ var div_14 = $.sibling(node_18, 2);
1185
+ var node_19 = $.child(div_14);
1186
+
1187
+ {
1188
+ var consequent_13 = ($$anchor) => {
1189
+ var span_13 = root_6();
1190
+
1191
+ $.html(span_13, () => $.get(customTrailingHtml), true);
1192
+ $.reset(span_13);
1193
+ $.append($$anchor, span_13);
1194
+ };
1195
+
1196
+ var consequent_14 = ($$anchor) => {
1197
+ {
1198
+ let $0 = $.derived(() => parts()?.CopyButton?.emphasis ?? "muted");
1199
+ let $1 = $.derived(() => $.get(hasCustomCopyIcon) ? normalizeActionSnippet(copyIconSnippet) : undefined);
1200
+ let $2 = $.derived(() => $.get(hasCustomCopiedIcon) ? normalizeActionSnippet(copiedIconSnippet) : undefined);
1201
+ let $3 = $.derived(() => localeContext.t("codeBlock.copyCode"));
1202
+
1203
+ CopyButton($$anchor, {
1204
+ get text() {
1205
+ return $.get(resolvedCode);
1206
+ },
1207
+ bare: true,
1208
+ get emphasis() {
1209
+ return $.get($0);
1210
+ },
1211
+ showText: false,
1212
+ get feedbackDuration() {
1213
+ return copyTimeout();
1214
+ },
1215
+
1216
+ get icon() {
1217
+ return $.get($1);
1218
+ },
1223
1219
 
1224
- $.reset(div_14);
1225
- $.reset(div_13);
1220
+ get successIcon() {
1221
+ return $.get($2);
1222
+ },
1223
+ class: 'snowui-code-block-btn snowui-hoverable',
1224
+ get ariaLabel() {
1225
+ return $.get($3);
1226
+ }
1227
+ });
1228
+ }
1229
+ };
1230
+
1231
+ $.if(node_19, ($$render) => {
1232
+ if ($.get(hasCustomTrailing)) $$render(consequent_13); else if (showCopyButton()) $$render(consequent_14, 1);
1233
+ });
1234
+ }
1235
+
1236
+ var node_20 = $.sibling(node_19, 2);
1237
+
1238
+ {
1239
+ var consequent_15 = ($$anchor) => {
1240
+ {
1241
+ let $0 = $.derived(() => parts()?.ExpandButton?.emphasis ?? "muted");
1242
+ let $1 = $.derived(() => localeContext.t("codeBlock.fullscreen"));
1243
+ let $2 = $.derived(() => localeContext.t("codeBlock.exitFullscreen"));
1226
1244
 
1227
- var div_15 = $.sibling(div_13, 2);
1228
- var div_16 = $.child(div_15);
1229
- var node_20 = $.child(div_16);
1245
+ let $3 = $.derived(() => $.get(hasCustomCollapseIcon)
1246
+ ? normalizeActionSnippet(collapseIconSnippet)
1247
+ : undefined);
1230
1248
 
1231
- {
1232
- var consequent_16 = ($$anchor) => {
1233
- var div_17 = root_12();
1249
+ ExpandButton($$anchor, {
1250
+ expanded: true,
1251
+ bare: true,
1252
+ get emphasis() {
1253
+ return $.get($0);
1254
+ },
1255
+ class: 'snowui-code-block-btn',
1256
+ get ariaLabel() {
1257
+ return $.get($1);
1258
+ },
1234
1259
 
1235
- $.each(div_17, 21, () => $.get(lines), $.index, ($$anchor, _, i) => {
1236
- var span_14 = root_11();
1260
+ get collapseAriaLabel() {
1261
+ return $.get($2);
1262
+ },
1263
+ onclick: exitFullscreen,
1264
+ get collapseIcon() {
1265
+ return $.get($3);
1266
+ }
1267
+ });
1268
+ }
1269
+ };
1237
1270
 
1238
- span_14.textContent = i + 1;
1239
- $.append($$anchor, span_14);
1271
+ $.if(node_20, ($$render) => {
1272
+ if (showExpandButton()) $$render(consequent_15);
1240
1273
  });
1274
+ }
1241
1275
 
1242
- $.reset(div_17);
1243
- $.append($$anchor, div_17);
1244
- };
1276
+ $.reset(div_14);
1277
+ $.reset(div_13);
1245
1278
 
1246
- $.if(node_20, ($$render) => {
1247
- if (showLineNumbers() && $.get(lines).length > 0) $$render(consequent_16);
1248
- });
1249
- }
1279
+ var div_15 = $.sibling(div_13, 2);
1280
+ var div_16 = $.child(div_15);
1281
+ var node_21 = $.child(div_16);
1250
1282
 
1251
- var div_18 = $.sibling(node_20, 2);
1252
- var pre_2 = $.child(div_18);
1253
- var code_3 = $.child(pre_2);
1283
+ {
1284
+ var consequent_16 = ($$anchor) => {
1285
+ var div_17 = root_12();
1254
1286
 
1255
- $.each(code_3, 21, () => $.get(highlightedLines), $.index, ($$anchor, line) => {
1256
- var span_15 = root_13();
1287
+ $.each(div_17, 21, () => $.get(lines), $.index, ($$anchor, _, i) => {
1288
+ var span_14 = root_11();
1257
1289
 
1258
- $.each(span_15, 21, () => $.get(line), $.index, ($$anchor, token) => {
1259
- var span_16 = root_5();
1260
- var text_5 = $.child(span_16, true);
1290
+ span_14.textContent = i + 1;
1291
+ $.append($$anchor, span_14);
1292
+ });
1261
1293
 
1262
- $.reset(span_16);
1294
+ $.reset(div_17);
1295
+ $.append($$anchor, div_17);
1296
+ };
1263
1297
 
1264
- $.template_effect(() => {
1265
- $.set_class(span_16, 1, `snowui-code-block-token snowui-code-block-token-${$.get(token).kind}`);
1266
- $.set_text(text_5, $.get(token).text);
1298
+ $.if(node_21, ($$render) => {
1299
+ if (showLineNumbers() && $.get(lines).length > 0) $$render(consequent_16);
1267
1300
  });
1301
+ }
1302
+
1303
+ var div_18 = $.sibling(node_21, 2);
1304
+ var pre_2 = $.child(div_18);
1305
+ var code_3 = $.child(pre_2);
1306
+
1307
+ $.each(code_3, 21, () => $.get(highlightedLines), $.index, ($$anchor, line) => {
1308
+ var span_15 = root_13();
1309
+
1310
+ $.each(span_15, 21, () => $.get(line), $.index, ($$anchor, token) => {
1311
+ var span_16 = root_5();
1312
+ var text_5 = $.child(span_16, true);
1268
1313
 
1269
- $.append($$anchor, span_16);
1314
+ $.reset(span_16);
1315
+
1316
+ $.template_effect(() => {
1317
+ $.set_class(span_16, 1, `snowui-code-block-token snowui-code-block-token-${$.get(token).kind}`);
1318
+ $.set_text(text_5, $.get(token).text);
1319
+ });
1320
+
1321
+ $.append($$anchor, span_16);
1322
+ });
1323
+
1324
+ $.reset(span_15);
1325
+ $.append($$anchor, span_15);
1270
1326
  });
1271
1327
 
1272
- $.reset(span_15);
1273
- $.append($$anchor, span_15);
1274
- });
1328
+ $.reset(code_3);
1329
+ $.reset(pre_2);
1330
+ $.reset(div_18);
1331
+ $.reset(div_16);
1332
+ $.bind_this(div_16, ($$value) => $.set(fullscreenViewportElement, $$value), () => $.get(fullscreenViewportElement));
1333
+ $.reset(div_15);
1275
1334
 
1276
- $.reset(code_3);
1277
- $.reset(pre_2);
1278
- $.reset(div_18);
1279
- $.reset(div_16);
1280
- $.bind_this(div_16, ($$value) => $.set(fullscreenViewportElement, $$value), () => $.get(fullscreenViewportElement));
1281
- $.reset(div_15);
1282
-
1283
- var div_19 = $.sibling(div_15, 2);
1284
- var div_20 = $.child(div_19);
1285
-
1286
- $.reset(div_19);
1287
- $.bind_this(div_19, ($$value) => $.set(fullscreenScrollbarElement, $$value), () => $.get(fullscreenScrollbarElement));
1288
-
1289
- var div_21 = $.sibling(div_19, 2);
1290
- var div_22 = $.child(div_21);
1291
-
1292
- $.reset(div_21);
1293
- $.bind_this(div_21, ($$value) => $.set(fullscreenHorizontalScrollbarElement, $$value), () => $.get(fullscreenHorizontalScrollbarElement));
1294
-
1295
- $.template_effect(
1296
- ($0) => {
1297
- $.set_attribute(div_16, 'data-scroll-mask', $0);
1298
- $.set_attribute(div_19, 'data-visible', fullscreenScrollbar.hasOverflow ? "true" : undefined);
1299
- $.set_style(div_20, `height: ${fullscreenScrollbar.thumbHeight ?? ''}px; transform: translate3d(0, ${fullscreenScrollbar.thumbY ?? ''}px, 0);`);
1300
- $.set_attribute(div_21, 'data-visibility', horizontalScrollbarVisibility());
1301
- $.set_attribute(div_21, 'data-visible', fullscreenHorizontalScrollbar.hasOverflow ? "true" : undefined);
1302
- $.set_style(div_22, `width: ${fullscreenHorizontalScrollbar.thumbSize ?? ''}px; transform: translate3d(${fullscreenHorizontalScrollbar.thumbOffset ?? ''}px, 0, 0);`);
1303
- },
1304
- [
1305
- () => resolveScrollMask($.get(showFullscreenTopFade), $.get(showFullscreenBottomFade))
1306
- ]
1307
- );
1308
-
1309
- $.append($$anchor, fragment_12);
1310
- },
1311
- $$slots: { default: true }
1312
- });
1335
+ var div_19 = $.sibling(div_15, 2);
1336
+ var div_20 = $.child(div_19);
1337
+
1338
+ $.reset(div_19);
1339
+ $.bind_this(div_19, ($$value) => $.set(fullscreenScrollbarElement, $$value), () => $.get(fullscreenScrollbarElement));
1340
+
1341
+ var div_21 = $.sibling(div_19, 2);
1342
+ var div_22 = $.child(div_21);
1343
+
1344
+ $.reset(div_21);
1345
+ $.bind_this(div_21, ($$value) => $.set(fullscreenHorizontalScrollbarElement, $$value), () => $.get(fullscreenHorizontalScrollbarElement));
1346
+
1347
+ $.template_effect(
1348
+ ($0) => {
1349
+ $.set_attribute(div_16, 'data-scroll-mask', $0);
1350
+ $.set_attribute(div_19, 'data-visible', fullscreenScrollbar.hasOverflow ? "true" : undefined);
1351
+ $.set_style(div_20, `height: ${fullscreenScrollbar.thumbHeight ?? ''}px; transform: translate3d(0, ${fullscreenScrollbar.thumbY ?? ''}px, 0);`);
1352
+ $.set_attribute(div_21, 'data-visibility', horizontalScrollbarVisibility());
1353
+ $.set_attribute(div_21, 'data-visible', fullscreenHorizontalScrollbar.hasOverflow ? "true" : undefined);
1354
+ $.set_style(div_22, `width: ${fullscreenHorizontalScrollbar.thumbSize ?? ''}px; transform: translate3d(${fullscreenHorizontalScrollbar.thumbOffset ?? ''}px, 0, 0);`);
1355
+ },
1356
+ [
1357
+ () => resolveScrollMask($.get(showFullscreenTopFade), $.get(showFullscreenBottomFade))
1358
+ ]
1359
+ );
1360
+
1361
+ $.append($$anchor, fragment_13);
1362
+ },
1363
+ $$slots: { default: true }
1364
+ });
1365
+ }
1313
1366
  };
1314
1367
 
1315
- $.if(node_16, ($$render) => {
1368
+ $.if(node_17, ($$render) => {
1316
1369
  if (!$.get(isSingleLine) && ($.get(isFullscreen) || $.get(isExitingFullscreen))) $$render(consequent_17);
1317
1370
  });
1318
1371
  }