mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'main' of https://github.com/Textualize/Textual into placeholder
This commit is contained in:
@@ -6807,6 +6807,324 @@
|
||||
|
||||
'''
|
||||
# ---
|
||||
# name: test_order_independence
|
||||
'''
|
||||
<svg class="rich-terminal" viewBox="0 0 994 635.5999999999999" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- Generated with Rich https://www.textualize.io -->
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: "Fira Code";
|
||||
src: local("FiraCode-Regular"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Fira Code";
|
||||
src: local("FiraCode-Bold"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff");
|
||||
font-style: bold;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.terminal-404849936-matrix {
|
||||
font-family: Fira Code, monospace;
|
||||
font-size: 20px;
|
||||
line-height: 24.4px;
|
||||
font-variant-east-asian: full-width;
|
||||
}
|
||||
|
||||
.terminal-404849936-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-family: arial;
|
||||
}
|
||||
|
||||
.terminal-404849936-r1 { fill: #ffff00 }
|
||||
.terminal-404849936-r2 { fill: #c5c8c6 }
|
||||
.terminal-404849936-r3 { fill: #e8e7e5 }
|
||||
.terminal-404849936-r4 { fill: #e1e1e1 }
|
||||
.terminal-404849936-r5 { fill: #dde8f3;font-weight: bold }
|
||||
.terminal-404849936-r6 { fill: #ddedf9 }
|
||||
</style>
|
||||
|
||||
<defs>
|
||||
<clipPath id="terminal-404849936-clip-terminal">
|
||||
<rect x="0" y="0" width="975.0" height="584.5999999999999" />
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-0">
|
||||
<rect x="0" y="1.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-1">
|
||||
<rect x="0" y="25.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-2">
|
||||
<rect x="0" y="50.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-3">
|
||||
<rect x="0" y="74.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-4">
|
||||
<rect x="0" y="99.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-5">
|
||||
<rect x="0" y="123.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-6">
|
||||
<rect x="0" y="147.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-7">
|
||||
<rect x="0" y="172.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-8">
|
||||
<rect x="0" y="196.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-9">
|
||||
<rect x="0" y="221.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-10">
|
||||
<rect x="0" y="245.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-11">
|
||||
<rect x="0" y="269.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-12">
|
||||
<rect x="0" y="294.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-13">
|
||||
<rect x="0" y="318.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-14">
|
||||
<rect x="0" y="343.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-15">
|
||||
<rect x="0" y="367.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-16">
|
||||
<rect x="0" y="391.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-17">
|
||||
<rect x="0" y="416.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-18">
|
||||
<rect x="0" y="440.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-19">
|
||||
<rect x="0" y="465.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-20">
|
||||
<rect x="0" y="489.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-21">
|
||||
<rect x="0" y="513.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-404849936-line-22">
|
||||
<rect x="0" y="538.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
<rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="992" height="633.6" rx="8"/><text class="terminal-404849936-title" fill="#c5c8c6" text-anchor="middle" x="496" y="27">Layers</text>
|
||||
<g transform="translate(26,22)">
|
||||
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
|
||||
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
|
||||
<circle cx="44" cy="0" r="7" fill="#28c840"/>
|
||||
</g>
|
||||
|
||||
<g transform="translate(9, 41)" clip-path="url(#terminal-404849936-clip-terminal)">
|
||||
<rect fill="#ff0000" x="0" y="1.5" width="97.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="97.6" y="1.5" width="414.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="512.4" y="1.5" width="341.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="854" y="1.5" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="866.2" y="1.5" width="0" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="866.2" y="1.5" width="109.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="25.9" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="25.9" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="25.9" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="25.9" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="50.3" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="50.3" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="50.3" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="50.3" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="74.7" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="74.7" width="24.4" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="36.6" y="74.7" width="366" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="402.6" y="74.7" width="97.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="74.7" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="74.7" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="99.1" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="99.1" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="99.1" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="99.1" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="123.5" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="123.5" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="123.5" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="123.5" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="147.9" width="512.4" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="147.9" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="172.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="196.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="221.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="245.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="269.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="294.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="318.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="343.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="367.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="391.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="416.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="440.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="465.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="489.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="513.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="538.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#0053aa" x="0" y="562.7" width="36.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#0178d4" x="36.6" y="562.7" width="183" height="24.65" shape-rendering="crispEdges"/><rect fill="#0178d4" x="219.6" y="562.7" width="756.4" height="24.65" shape-rendering="crispEdges"/>
|
||||
<g class="terminal-404849936-matrix">
|
||||
<text class="terminal-404849936-r1" x="0" y="20" textLength="97.6" clip-path="url(#terminal-404849936-line-0)">┌───────</text><text class="terminal-404849936-r1" x="97.6" y="20" textLength="414.8" clip-path="url(#terminal-404849936-line-0)">─────────────────────────────────┐</text><text class="terminal-404849936-r2" x="976" y="20" textLength="12.2" clip-path="url(#terminal-404849936-line-0)">
|
||||
</text><text class="terminal-404849936-r1" x="0" y="44.4" textLength="12.2" clip-path="url(#terminal-404849936-line-1)">│</text><text class="terminal-404849936-r1" x="500.2" y="44.4" textLength="12.2" clip-path="url(#terminal-404849936-line-1)">│</text><text class="terminal-404849936-r4" x="512.4" y="44.4" textLength="463.6" clip-path="url(#terminal-404849936-line-1)">ull of stars! My God! It's full of sta</text><text class="terminal-404849936-r2" x="976" y="44.4" textLength="12.2" clip-path="url(#terminal-404849936-line-1)">
|
||||
</text><text class="terminal-404849936-r1" x="0" y="68.8" textLength="12.2" clip-path="url(#terminal-404849936-line-2)">│</text><text class="terminal-404849936-r1" x="500.2" y="68.8" textLength="12.2" clip-path="url(#terminal-404849936-line-2)">│</text><text class="terminal-404849936-r2" x="976" y="68.8" textLength="12.2" clip-path="url(#terminal-404849936-line-2)">
|
||||
</text><text class="terminal-404849936-r1" x="0" y="93.2" textLength="12.2" clip-path="url(#terminal-404849936-line-3)">│</text><text class="terminal-404849936-r1" x="36.6" y="93.2" textLength="366" clip-path="url(#terminal-404849936-line-3)">This should float over the top</text><text class="terminal-404849936-r1" x="500.2" y="93.2" textLength="12.2" clip-path="url(#terminal-404849936-line-3)">│</text><text class="terminal-404849936-r2" x="976" y="93.2" textLength="12.2" clip-path="url(#terminal-404849936-line-3)">
|
||||
</text><text class="terminal-404849936-r1" x="0" y="117.6" textLength="12.2" clip-path="url(#terminal-404849936-line-4)">│</text><text class="terminal-404849936-r1" x="500.2" y="117.6" textLength="12.2" clip-path="url(#terminal-404849936-line-4)">│</text><text class="terminal-404849936-r2" x="976" y="117.6" textLength="12.2" clip-path="url(#terminal-404849936-line-4)">
|
||||
</text><text class="terminal-404849936-r1" x="0" y="142" textLength="12.2" clip-path="url(#terminal-404849936-line-5)">│</text><text class="terminal-404849936-r1" x="500.2" y="142" textLength="12.2" clip-path="url(#terminal-404849936-line-5)">│</text><text class="terminal-404849936-r2" x="976" y="142" textLength="12.2" clip-path="url(#terminal-404849936-line-5)">
|
||||
</text><text class="terminal-404849936-r1" x="0" y="166.4" textLength="512.4" clip-path="url(#terminal-404849936-line-6)">└────────────────────────────────────────┘</text><text class="terminal-404849936-r2" x="976" y="166.4" textLength="12.2" clip-path="url(#terminal-404849936-line-6)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="190.8" textLength="12.2" clip-path="url(#terminal-404849936-line-7)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="215.2" textLength="12.2" clip-path="url(#terminal-404849936-line-8)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="239.6" textLength="12.2" clip-path="url(#terminal-404849936-line-9)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="264" textLength="12.2" clip-path="url(#terminal-404849936-line-10)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="288.4" textLength="12.2" clip-path="url(#terminal-404849936-line-11)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="312.8" textLength="12.2" clip-path="url(#terminal-404849936-line-12)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="337.2" textLength="12.2" clip-path="url(#terminal-404849936-line-13)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="361.6" textLength="12.2" clip-path="url(#terminal-404849936-line-14)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="386" textLength="12.2" clip-path="url(#terminal-404849936-line-15)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="410.4" textLength="12.2" clip-path="url(#terminal-404849936-line-16)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="434.8" textLength="12.2" clip-path="url(#terminal-404849936-line-17)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="459.2" textLength="12.2" clip-path="url(#terminal-404849936-line-18)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="483.6" textLength="12.2" clip-path="url(#terminal-404849936-line-19)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="508" textLength="12.2" clip-path="url(#terminal-404849936-line-20)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="532.4" textLength="12.2" clip-path="url(#terminal-404849936-line-21)">
|
||||
</text><text class="terminal-404849936-r2" x="976" y="556.8" textLength="12.2" clip-path="url(#terminal-404849936-line-22)">
|
||||
</text><text class="terminal-404849936-r5" x="0" y="581.2" textLength="36.6" clip-path="url(#terminal-404849936-line-23)"> T </text><text class="terminal-404849936-r6" x="36.6" y="581.2" textLength="183" clip-path="url(#terminal-404849936-line-23)"> Toggle Screen </text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
'''
|
||||
# ---
|
||||
# name: test_order_independence_toggle
|
||||
'''
|
||||
<svg class="rich-terminal" viewBox="0 0 994 635.5999999999999" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- Generated with Rich https://www.textualize.io -->
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: "Fira Code";
|
||||
src: local("FiraCode-Regular"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Fira Code";
|
||||
src: local("FiraCode-Bold"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff");
|
||||
font-style: bold;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.terminal-1654293578-matrix {
|
||||
font-family: Fira Code, monospace;
|
||||
font-size: 20px;
|
||||
line-height: 24.4px;
|
||||
font-variant-east-asian: full-width;
|
||||
}
|
||||
|
||||
.terminal-1654293578-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-family: arial;
|
||||
}
|
||||
|
||||
.terminal-1654293578-r1 { fill: #ffff00 }
|
||||
.terminal-1654293578-r2 { fill: #c5c8c6 }
|
||||
.terminal-1654293578-r3 { fill: #e8e7e5 }
|
||||
.terminal-1654293578-r4 { fill: #e1e1e1 }
|
||||
.terminal-1654293578-r5 { fill: #dde8f3;font-weight: bold }
|
||||
.terminal-1654293578-r6 { fill: #ddedf9 }
|
||||
</style>
|
||||
|
||||
<defs>
|
||||
<clipPath id="terminal-1654293578-clip-terminal">
|
||||
<rect x="0" y="0" width="975.0" height="584.5999999999999" />
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-0">
|
||||
<rect x="0" y="1.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-1">
|
||||
<rect x="0" y="25.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-2">
|
||||
<rect x="0" y="50.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-3">
|
||||
<rect x="0" y="74.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-4">
|
||||
<rect x="0" y="99.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-5">
|
||||
<rect x="0" y="123.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-6">
|
||||
<rect x="0" y="147.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-7">
|
||||
<rect x="0" y="172.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-8">
|
||||
<rect x="0" y="196.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-9">
|
||||
<rect x="0" y="221.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-10">
|
||||
<rect x="0" y="245.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-11">
|
||||
<rect x="0" y="269.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-12">
|
||||
<rect x="0" y="294.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-13">
|
||||
<rect x="0" y="318.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-14">
|
||||
<rect x="0" y="343.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-15">
|
||||
<rect x="0" y="367.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-16">
|
||||
<rect x="0" y="391.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-17">
|
||||
<rect x="0" y="416.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-18">
|
||||
<rect x="0" y="440.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-19">
|
||||
<rect x="0" y="465.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-20">
|
||||
<rect x="0" y="489.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-21">
|
||||
<rect x="0" y="513.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1654293578-line-22">
|
||||
<rect x="0" y="538.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
<rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="992" height="633.6" rx="8"/><text class="terminal-1654293578-title" fill="#c5c8c6" text-anchor="middle" x="496" y="27">Layers</text>
|
||||
<g transform="translate(26,22)">
|
||||
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
|
||||
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
|
||||
<circle cx="44" cy="0" r="7" fill="#28c840"/>
|
||||
</g>
|
||||
|
||||
<g transform="translate(9, 41)" clip-path="url(#terminal-1654293578-clip-terminal)">
|
||||
<rect fill="#ff0000" x="0" y="1.5" width="97.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="97.6" y="1.5" width="414.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="512.4" y="1.5" width="341.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="854" y="1.5" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="866.2" y="1.5" width="0" height="24.65" shape-rendering="crispEdges"/><rect fill="#534838" x="866.2" y="1.5" width="109.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="25.9" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="25.9" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="25.9" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="25.9" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="50.3" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="50.3" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="50.3" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="50.3" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="74.7" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="74.7" width="24.4" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="36.6" y="74.7" width="366" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="402.6" y="74.7" width="97.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="74.7" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="74.7" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="99.1" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="99.1" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="99.1" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="99.1" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="123.5" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="12.2" y="123.5" width="488" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="500.2" y="123.5" width="12.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="123.5" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#ff0000" x="0" y="147.9" width="512.4" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="512.4" y="147.9" width="463.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="172.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="196.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="221.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="245.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="269.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="294.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="318.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="343.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="367.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="391.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="416.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="440.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="465.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="489.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="513.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#1e1e1e" x="0" y="538.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#0053aa" x="0" y="562.7" width="36.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#0178d4" x="36.6" y="562.7" width="183" height="24.65" shape-rendering="crispEdges"/><rect fill="#0178d4" x="219.6" y="562.7" width="756.4" height="24.65" shape-rendering="crispEdges"/>
|
||||
<g class="terminal-1654293578-matrix">
|
||||
<text class="terminal-1654293578-r1" x="0" y="20" textLength="97.6" clip-path="url(#terminal-1654293578-line-0)">┌───────</text><text class="terminal-1654293578-r1" x="97.6" y="20" textLength="414.8" clip-path="url(#terminal-1654293578-line-0)">─────────────────────────────────┐</text><text class="terminal-1654293578-r2" x="976" y="20" textLength="12.2" clip-path="url(#terminal-1654293578-line-0)">
|
||||
</text><text class="terminal-1654293578-r1" x="0" y="44.4" textLength="12.2" clip-path="url(#terminal-1654293578-line-1)">│</text><text class="terminal-1654293578-r1" x="500.2" y="44.4" textLength="12.2" clip-path="url(#terminal-1654293578-line-1)">│</text><text class="terminal-1654293578-r4" x="512.4" y="44.4" textLength="463.6" clip-path="url(#terminal-1654293578-line-1)">t. I'm sorry, Dave. I'm afraid I can't</text><text class="terminal-1654293578-r2" x="976" y="44.4" textLength="12.2" clip-path="url(#terminal-1654293578-line-1)">
|
||||
</text><text class="terminal-1654293578-r1" x="0" y="68.8" textLength="12.2" clip-path="url(#terminal-1654293578-line-2)">│</text><text class="terminal-1654293578-r1" x="500.2" y="68.8" textLength="12.2" clip-path="url(#terminal-1654293578-line-2)">│</text><text class="terminal-1654293578-r2" x="976" y="68.8" textLength="12.2" clip-path="url(#terminal-1654293578-line-2)">
|
||||
</text><text class="terminal-1654293578-r1" x="0" y="93.2" textLength="12.2" clip-path="url(#terminal-1654293578-line-3)">│</text><text class="terminal-1654293578-r1" x="36.6" y="93.2" textLength="366" clip-path="url(#terminal-1654293578-line-3)">This should float over the top</text><text class="terminal-1654293578-r1" x="500.2" y="93.2" textLength="12.2" clip-path="url(#terminal-1654293578-line-3)">│</text><text class="terminal-1654293578-r2" x="976" y="93.2" textLength="12.2" clip-path="url(#terminal-1654293578-line-3)">
|
||||
</text><text class="terminal-1654293578-r1" x="0" y="117.6" textLength="12.2" clip-path="url(#terminal-1654293578-line-4)">│</text><text class="terminal-1654293578-r1" x="500.2" y="117.6" textLength="12.2" clip-path="url(#terminal-1654293578-line-4)">│</text><text class="terminal-1654293578-r2" x="976" y="117.6" textLength="12.2" clip-path="url(#terminal-1654293578-line-4)">
|
||||
</text><text class="terminal-1654293578-r1" x="0" y="142" textLength="12.2" clip-path="url(#terminal-1654293578-line-5)">│</text><text class="terminal-1654293578-r1" x="500.2" y="142" textLength="12.2" clip-path="url(#terminal-1654293578-line-5)">│</text><text class="terminal-1654293578-r2" x="976" y="142" textLength="12.2" clip-path="url(#terminal-1654293578-line-5)">
|
||||
</text><text class="terminal-1654293578-r1" x="0" y="166.4" textLength="512.4" clip-path="url(#terminal-1654293578-line-6)">└────────────────────────────────────────┘</text><text class="terminal-1654293578-r2" x="976" y="166.4" textLength="12.2" clip-path="url(#terminal-1654293578-line-6)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="190.8" textLength="12.2" clip-path="url(#terminal-1654293578-line-7)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="215.2" textLength="12.2" clip-path="url(#terminal-1654293578-line-8)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="239.6" textLength="12.2" clip-path="url(#terminal-1654293578-line-9)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="264" textLength="12.2" clip-path="url(#terminal-1654293578-line-10)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="288.4" textLength="12.2" clip-path="url(#terminal-1654293578-line-11)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="312.8" textLength="12.2" clip-path="url(#terminal-1654293578-line-12)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="337.2" textLength="12.2" clip-path="url(#terminal-1654293578-line-13)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="361.6" textLength="12.2" clip-path="url(#terminal-1654293578-line-14)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="386" textLength="12.2" clip-path="url(#terminal-1654293578-line-15)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="410.4" textLength="12.2" clip-path="url(#terminal-1654293578-line-16)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="434.8" textLength="12.2" clip-path="url(#terminal-1654293578-line-17)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="459.2" textLength="12.2" clip-path="url(#terminal-1654293578-line-18)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="483.6" textLength="12.2" clip-path="url(#terminal-1654293578-line-19)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="508" textLength="12.2" clip-path="url(#terminal-1654293578-line-20)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="532.4" textLength="12.2" clip-path="url(#terminal-1654293578-line-21)">
|
||||
</text><text class="terminal-1654293578-r2" x="976" y="556.8" textLength="12.2" clip-path="url(#terminal-1654293578-line-22)">
|
||||
</text><text class="terminal-1654293578-r5" x="0" y="581.2" textLength="36.6" clip-path="url(#terminal-1654293578-line-23)"> T </text><text class="terminal-1654293578-r6" x="36.6" y="581.2" textLength="183" clip-path="url(#terminal-1654293578-line-23)"> Toggle Screen </text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
'''
|
||||
# ---
|
||||
# name: test_textlog_max_lines
|
||||
'''
|
||||
<svg class="rich-terminal" viewBox="0 0 994 635.5999999999999" xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -6962,6 +7280,162 @@
|
||||
|
||||
'''
|
||||
# ---
|
||||
# name: test_tree_example
|
||||
'''
|
||||
<svg class="rich-terminal" viewBox="0 0 994 635.5999999999999" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- Generated with Rich https://www.textualize.io -->
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: "Fira Code";
|
||||
src: local("FiraCode-Regular"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Fira Code";
|
||||
src: local("FiraCode-Bold"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"),
|
||||
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff");
|
||||
font-style: bold;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.terminal-1345646321-matrix {
|
||||
font-family: Fira Code, monospace;
|
||||
font-size: 20px;
|
||||
line-height: 24.4px;
|
||||
font-variant-east-asian: full-width;
|
||||
}
|
||||
|
||||
.terminal-1345646321-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-family: arial;
|
||||
}
|
||||
|
||||
.terminal-1345646321-r1 { fill: #e2e3e3 }
|
||||
.terminal-1345646321-r2 { fill: #c5c8c6 }
|
||||
.terminal-1345646321-r3 { fill: #008139 }
|
||||
</style>
|
||||
|
||||
<defs>
|
||||
<clipPath id="terminal-1345646321-clip-terminal">
|
||||
<rect x="0" y="0" width="975.0" height="584.5999999999999" />
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-0">
|
||||
<rect x="0" y="1.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-1">
|
||||
<rect x="0" y="25.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-2">
|
||||
<rect x="0" y="50.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-3">
|
||||
<rect x="0" y="74.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-4">
|
||||
<rect x="0" y="99.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-5">
|
||||
<rect x="0" y="123.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-6">
|
||||
<rect x="0" y="147.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-7">
|
||||
<rect x="0" y="172.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-8">
|
||||
<rect x="0" y="196.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-9">
|
||||
<rect x="0" y="221.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-10">
|
||||
<rect x="0" y="245.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-11">
|
||||
<rect x="0" y="269.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-12">
|
||||
<rect x="0" y="294.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-13">
|
||||
<rect x="0" y="318.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-14">
|
||||
<rect x="0" y="343.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-15">
|
||||
<rect x="0" y="367.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-16">
|
||||
<rect x="0" y="391.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-17">
|
||||
<rect x="0" y="416.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-18">
|
||||
<rect x="0" y="440.7" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-19">
|
||||
<rect x="0" y="465.1" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-20">
|
||||
<rect x="0" y="489.5" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-21">
|
||||
<rect x="0" y="513.9" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
<clipPath id="terminal-1345646321-line-22">
|
||||
<rect x="0" y="538.3" width="976" height="24.65"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
<rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="992" height="633.6" rx="8"/><text class="terminal-1345646321-title" fill="#c5c8c6" text-anchor="middle" x="496" y="27">TreeApp</text>
|
||||
<g transform="translate(26,22)">
|
||||
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
|
||||
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
|
||||
<circle cx="44" cy="0" r="7" fill="#28c840"/>
|
||||
</g>
|
||||
|
||||
<g transform="translate(9, 41)" clip-path="url(#terminal-1345646321-clip-terminal)">
|
||||
<rect fill="#24292f" x="0" y="1.5" width="24.4" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="24.4" y="1.5" width="48.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="73.2" y="1.5" width="902.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="25.9" width="48.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="48.8" y="25.9" width="24.4" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="73.2" y="25.9" width="122" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="195.2" y="25.9" width="780.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="50.3" width="97.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="97.6" y="50.3" width="48.8" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="146.4" y="50.3" width="829.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="74.7" width="97.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="97.6" y="74.7" width="85.4" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="183" y="74.7" width="793" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="99.1" width="97.6" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="97.6" y="99.1" width="73.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="170.8" y="99.1" width="805.2" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="123.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="147.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="172.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="196.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="221.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="245.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="269.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="294.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="318.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="343.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="367.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="391.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="416.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="440.7" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="465.1" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="489.5" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="513.9" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="538.3" width="976" height="24.65" shape-rendering="crispEdges"/><rect fill="#24292f" x="0" y="562.7" width="976" height="24.65" shape-rendering="crispEdges"/>
|
||||
<g class="terminal-1345646321-matrix">
|
||||
<text class="terminal-1345646321-r1" x="0" y="20" textLength="24.4" clip-path="url(#terminal-1345646321-line-0)">▼ </text><text class="terminal-1345646321-r1" x="24.4" y="20" textLength="48.8" clip-path="url(#terminal-1345646321-line-0)">Dune</text><text class="terminal-1345646321-r2" x="976" y="20" textLength="12.2" clip-path="url(#terminal-1345646321-line-0)">
|
||||
</text><text class="terminal-1345646321-r3" x="0" y="44.4" textLength="48.8" clip-path="url(#terminal-1345646321-line-1)">└── </text><text class="terminal-1345646321-r1" x="48.8" y="44.4" textLength="24.4" clip-path="url(#terminal-1345646321-line-1)">▼ </text><text class="terminal-1345646321-r1" x="73.2" y="44.4" textLength="122" clip-path="url(#terminal-1345646321-line-1)">Characters</text><text class="terminal-1345646321-r2" x="976" y="44.4" textLength="12.2" clip-path="url(#terminal-1345646321-line-1)">
|
||||
</text><text class="terminal-1345646321-r3" x="0" y="68.8" textLength="97.6" clip-path="url(#terminal-1345646321-line-2)">    ├── </text><text class="terminal-1345646321-r1" x="97.6" y="68.8" textLength="48.8" clip-path="url(#terminal-1345646321-line-2)">Paul</text><text class="terminal-1345646321-r2" x="976" y="68.8" textLength="12.2" clip-path="url(#terminal-1345646321-line-2)">
|
||||
</text><text class="terminal-1345646321-r3" x="0" y="93.2" textLength="97.6" clip-path="url(#terminal-1345646321-line-3)">    ├── </text><text class="terminal-1345646321-r1" x="97.6" y="93.2" textLength="85.4" clip-path="url(#terminal-1345646321-line-3)">Jessica</text><text class="terminal-1345646321-r2" x="976" y="93.2" textLength="12.2" clip-path="url(#terminal-1345646321-line-3)">
|
||||
</text><text class="terminal-1345646321-r3" x="0" y="117.6" textLength="97.6" clip-path="url(#terminal-1345646321-line-4)">    └── </text><text class="terminal-1345646321-r1" x="97.6" y="117.6" textLength="73.2" clip-path="url(#terminal-1345646321-line-4)">Channi</text><text class="terminal-1345646321-r2" x="976" y="117.6" textLength="12.2" clip-path="url(#terminal-1345646321-line-4)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="142" textLength="12.2" clip-path="url(#terminal-1345646321-line-5)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="166.4" textLength="12.2" clip-path="url(#terminal-1345646321-line-6)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="190.8" textLength="12.2" clip-path="url(#terminal-1345646321-line-7)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="215.2" textLength="12.2" clip-path="url(#terminal-1345646321-line-8)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="239.6" textLength="12.2" clip-path="url(#terminal-1345646321-line-9)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="264" textLength="12.2" clip-path="url(#terminal-1345646321-line-10)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="288.4" textLength="12.2" clip-path="url(#terminal-1345646321-line-11)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="312.8" textLength="12.2" clip-path="url(#terminal-1345646321-line-12)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="337.2" textLength="12.2" clip-path="url(#terminal-1345646321-line-13)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="361.6" textLength="12.2" clip-path="url(#terminal-1345646321-line-14)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="386" textLength="12.2" clip-path="url(#terminal-1345646321-line-15)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="410.4" textLength="12.2" clip-path="url(#terminal-1345646321-line-16)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="434.8" textLength="12.2" clip-path="url(#terminal-1345646321-line-17)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="459.2" textLength="12.2" clip-path="url(#terminal-1345646321-line-18)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="483.6" textLength="12.2" clip-path="url(#terminal-1345646321-line-19)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="508" textLength="12.2" clip-path="url(#terminal-1345646321-line-20)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="532.4" textLength="12.2" clip-path="url(#terminal-1345646321-line-21)">
|
||||
</text><text class="terminal-1345646321-r2" x="976" y="556.8" textLength="12.2" clip-path="url(#terminal-1345646321-line-22)">
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
'''
|
||||
# ---
|
||||
# name: test_vertical_layout
|
||||
'''
|
||||
<svg class="rich-terminal" viewBox="0 0 994 635.5999999999999" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
71
tests/snapshot_tests/snapshot_apps/order_independence.py
Normal file
71
tests/snapshot_tests/snapshot_apps/order_independence.py
Normal file
@@ -0,0 +1,71 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.screen import Screen
|
||||
from textual.widgets import Header, Footer, Label
|
||||
from textual.containers import Vertical, Container
|
||||
|
||||
|
||||
class Overlay(Container):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Label("This should float over the top")
|
||||
|
||||
|
||||
class Body1(Vertical):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Label("My God! It's full of stars! " * 300)
|
||||
|
||||
|
||||
class Body2(Vertical):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Label("I'm sorry, Dave. I'm afraid I can't do that. " * 300)
|
||||
|
||||
|
||||
class Good(Screen):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Overlay()
|
||||
yield Body1()
|
||||
yield Footer()
|
||||
|
||||
|
||||
class Bad(Screen):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Overlay()
|
||||
yield Header()
|
||||
yield Body2()
|
||||
yield Footer()
|
||||
|
||||
|
||||
class Layers(App[None]):
|
||||
|
||||
CSS = """
|
||||
Screen {
|
||||
layers: base higher;
|
||||
}
|
||||
|
||||
Overlay {
|
||||
layer: higher;
|
||||
dock: top;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 2;
|
||||
border: solid yellow;
|
||||
background: red;
|
||||
color: yellow;
|
||||
}
|
||||
"""
|
||||
|
||||
SCREENS = {"good": Good, "bad": Bad}
|
||||
|
||||
BINDINGS = [("t", "toggle", "Toggle Screen")]
|
||||
|
||||
def on_mount(self):
|
||||
self.push_screen("good")
|
||||
|
||||
def action_toggle(self):
|
||||
self.switch_screen(
|
||||
"bad" if self.screen.__class__.__name__ == "Good" else "good"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Layers().run()
|
||||
@@ -13,6 +13,7 @@ SNAPSHOT_APPS_DIR = Path("./snapshot_apps")
|
||||
|
||||
# --- Layout related stuff ---
|
||||
|
||||
|
||||
def test_grid_layout_basic(snap_compare):
|
||||
assert snap_compare(LAYOUT_EXAMPLES_DIR / "grid_layout1.py")
|
||||
|
||||
@@ -50,6 +51,7 @@ def test_dock_layout_sidebar(snap_compare):
|
||||
# When adding a new widget, ideally we should also create a snapshot test
|
||||
# from these examples which test rendering and simple interactions with it.
|
||||
|
||||
|
||||
def test_checkboxes(snap_compare):
|
||||
"""Tests checkboxes but also acts a regression test for using
|
||||
width: auto in a Horizontal layout context."""
|
||||
@@ -106,6 +108,10 @@ def test_fr_units(snap_compare):
|
||||
assert snap_compare("snapshot_apps/fr_units.py")
|
||||
|
||||
|
||||
def test_tree_example(snap_compare):
|
||||
assert snap_compare(WIDGET_EXAMPLES_DIR / "tree.py")
|
||||
|
||||
|
||||
# --- CSS properties ---
|
||||
# We have a canonical example for each CSS property that is shown in their docs.
|
||||
# If any of these change, something has likely broken, so snapshot each of them.
|
||||
@@ -128,7 +134,18 @@ def test_multiple_css(snap_compare):
|
||||
assert snap_compare("snapshot_apps/multiple_css/multiple_css.py")
|
||||
|
||||
|
||||
def test_order_independence(snap_compare):
|
||||
# Interaction between multiple CSS files and app-level/classvar CSS
|
||||
assert snap_compare("snapshot_apps/order_independence.py")
|
||||
|
||||
|
||||
def test_order_independence_toggle(snap_compare):
|
||||
# Interaction between multiple CSS files and app-level/classvar CSS
|
||||
assert snap_compare("snapshot_apps/order_independence.py", press="t,_")
|
||||
|
||||
|
||||
# --- Other ---
|
||||
|
||||
|
||||
def test_key_display(snap_compare):
|
||||
assert snap_compare(SNAPSHOT_APPS_DIR / "key_display.py")
|
||||
|
||||
Reference in New Issue
Block a user