@celljs/ta-extensions 4.7.0 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web-src/style.ts DELETED
@@ -1,92 +0,0 @@
1
- import { MARKET_STYLE } from './market-style';
2
-
3
- /** The styles of the page; only the --ta-* variables of the page, so they follow its theme. */
4
- export const STYLE = `
5
- .tax-page { --tax-accent: var(--ta-green); position: relative; height: 100%; overflow: auto; color: var(--ta-text); font-size: 13.5px; }
6
- .tax-body { display: flex; flex-direction: column; gap: 32px; max-width: 760px; margin: 0 auto; padding: 28px 24px 56px; box-sizing: border-box; }
7
- .tax-hero { display: flex; flex-direction: column; gap: 10px; }
8
- .tax-hero h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
9
- .tax-hero h1 svg { color: var(--tax-accent); }
10
- .tax-hero > p { margin: 0 0 6px; color: var(--ta-muted); }
11
- .tax-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
12
- @media (max-width: 640px) { .tax-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
13
- .tax-kind { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms, background 140ms, transform 140ms var(--ta-ease); }
14
- .tax-kind:hover { border-color: color-mix(in srgb, var(--tax-accent) 55%, var(--ta-border)); background: var(--ta-hover); }
15
- .tax-kind:hover .tax-pic-accent { fill: color-mix(in srgb, var(--tax-accent) 26%, transparent); }
16
- .tax-kind:active { transform: scale(.98); }
17
- .tax-kind:disabled { opacity: .55; cursor: default; }
18
- .tax-kind-label { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 4px; min-width: 0; }
19
- .tax-kind-label strong { font-size: 13px; font-weight: 600; }
20
- .tax-kind-label span { overflow: hidden; color: var(--ta-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
21
- .tax-pic { display: block; width: 100%; height: auto; border-radius: 8px; }
22
- .tax-pic-frame { fill: var(--ta-raised); stroke: var(--ta-border-muted); stroke-width: 1; }
23
- .tax-pic-pane { fill: var(--ta-hover); }
24
- .tax-pic-line { fill: var(--ta-hover-strong); }
25
- .tax-pic-box { fill: none; stroke: var(--ta-border); stroke-width: 1; }
26
- .tax-pic-accent { fill: color-mix(in srgb, var(--tax-accent) 16%, transparent); stroke: color-mix(in srgb, var(--tax-accent) 70%, transparent); stroke-width: 1; transition: fill 140ms; }
27
- .tax-pic-mark { fill: var(--tax-accent); }
28
- .tax-pic-soft { opacity: .45; }
29
- .tax-pic-hand { fill: none; stroke: var(--ta-raised); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
30
- .tax-pic-text { fill: var(--tax-accent); font-family: var(--ta-mono); font-size: 8px; font-weight: 600; }
31
- .tax-section { display: flex; flex-direction: column; gap: 8px; }
32
- .tax-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
33
- .tax-section-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ta-secondary); font-size: 12.5px; font-weight: 600; }
34
- .tax-count { padding: 0 6px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-muted); font-size: 11px; font-weight: 500; line-height: 16px; }
35
- .tax-button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--ta-border-muted); border-radius: 8px; background: var(--ta-raised); color: var(--ta-text); font: inherit; font-size: 13px; cursor: pointer; transition: background 120ms, border-color 120ms; }
36
- .tax-button:hover { background: var(--ta-hover); border-color: var(--ta-border); }
37
- .tax-button:disabled { opacity: .55; cursor: default; }
38
- .tax-list { border: 1px solid var(--ta-border-muted); border-radius: 12px; overflow: hidden; }
39
- .tax-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
40
- .tax-row + .tax-row { border-top: 1px solid var(--ta-border-muted); }
41
- .tax-row:hover { background: var(--ta-hover); }
42
- .tax-row:hover .tax-icon, .tax-row:hover .tax-tag { background: var(--ta-hover-strong); }
43
- .tax-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--ta-chip); color: var(--tax-accent); transition: color 160ms; }
44
- .tax-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; transition: opacity 160ms; }
45
- .tax-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
46
- .tax-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
47
- .tax-version { flex: none; color: var(--ta-muted); font-size: 12px; font-weight: 400; }
48
- .tax-description { overflow: hidden; color: var(--ta-secondary); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
49
- .tax-tag { flex: none; padding: 0 6px; border-radius: 5px; background: var(--ta-chip); color: var(--ta-muted); font-size: 11px; font-weight: 400; line-height: 17px; }
50
- .tax-off .tax-main { opacity: .5; }
51
- .tax-off .tax-icon { color: var(--ta-muted); }
52
- .tax-actions { display: flex; gap: 2px; flex: none; opacity: 0; transition: opacity 120ms; }
53
- .tax-row:hover .tax-actions, .tax-row:focus-within .tax-actions { opacity: 1; }
54
- @media (hover: none) { .tax-actions { opacity: 1; } }
55
- .tax-action { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--ta-muted); cursor: pointer; }
56
- .tax-action:hover { background: var(--ta-hover-strong); color: var(--ta-text); }
57
- .tax-action.tax-danger:hover { color: var(--ta-red); }
58
- .tax-switch { appearance: none; -webkit-appearance: none; position: relative; width: 36px; height: 20px; flex: none; margin: 0 0 0 4px; border-radius: 10px; background: var(--ta-hover-strong); cursor: pointer; transition: background 160ms; }
59
- .tax-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform 180ms var(--ta-ease); }
60
- .tax-switch:checked { background: var(--ta-green); }
61
- .tax-switch:checked::after { transform: translateX(16px); }
62
- .tax-switch:focus-visible { outline: 2px solid var(--ta-border-focus); outline-offset: 2px; }
63
- .tax-empty { padding: 16px; border: 1px dashed var(--ta-border-muted); border-radius: 12px; color: var(--ta-muted); text-align: center; }
64
- .tax-share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px 16px; border: 1px solid var(--ta-border-muted); border-radius: 12px; }
65
- .tax-steps { display: flex; align-items: flex-start; justify-content: center; gap: 10px; width: 100%; }
66
- .tax-step { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; color: var(--ta-secondary); font-size: 12.5px; text-align: center; }
67
- .tax-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--tax-accent) 12%, transparent); color: var(--tax-accent); }
68
- .tax-step-arrow { display: inline-flex; align-items: center; height: 44px; color: var(--ta-muted); }
69
- .tax-note { color: var(--ta-muted); font-size: 12.5px; }
70
- .tax-note code { padding: 1px 5px; border-radius: 4px; background: var(--ta-code); font-family: var(--ta-mono); font-size: 12px; }
71
- .tax-drop-overlay { position: absolute; inset: 12px; z-index: 5; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--ta-border-focus); border-radius: 16px; background: color-mix(in srgb, var(--ta-main) 85%, transparent); color: var(--ta-text); font-size: 15px; font-weight: 600; pointer-events: none; }
72
- .tax-dialog { display: flex; flex-direction: column; gap: 14px; min-width: min(440px, 80vw); }
73
- .tax-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 1.5px dashed var(--ta-border); border-radius: 12px; color: var(--ta-secondary); text-align: center; transition: border-color 120ms, background 120ms; }
74
- .tax-drop.tax-over { border-color: var(--ta-border-focus); background: var(--ta-hover); }
75
- .tax-drop svg { color: var(--ta-muted); }
76
- .tax-link { padding: 0; border: 0; background: none; color: var(--ta-link); font: inherit; cursor: pointer; }
77
- .tax-link:hover { text-decoration: underline; }
78
- .tax-or { display: flex; align-items: center; gap: 10px; color: var(--ta-muted); font-size: 12px; }
79
- .tax-or::before, .tax-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border-muted); }
80
- .tax-source { display: flex; gap: 8px; }
81
- .tax-source input { flex: 1; min-width: 0; height: 34px; padding: 0 11px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); color: var(--ta-text); font: inherit; font-size: 13px; outline: none; box-sizing: border-box; }
82
- .tax-source input:focus { border-color: var(--ta-border-focus); }
83
- .tax-source .tax-button { height: 34px; }
84
- `;
85
-
86
- export function injectStyle(): () => void {
87
- const style = document.createElement('style');
88
- style.dataset.taPackage = 'ta-extensions';
89
- style.textContent = STYLE + MARKET_STYLE;
90
- document.head.appendChild(style);
91
- return () => style.remove();
92
- }