@cortexkit/opencode-antigravity-auth 3.0.38 → 3.0.40
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/README.md +1 -1
- package/dist/cli.js +865 -357
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +136 -39
- package/dist/index.js +1509 -657
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +188 -49
- package/dist/server.js +1662 -803
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/common-auth-embedded/claustrum/availability.d.ts +7 -1
- package/dist/src/common-auth-embedded/claustrum/availability.js +9 -1
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +11 -2
- package/dist/src/common-auth-embedded/claustrum/custody.js +89 -31
- package/dist/src/common-auth-embedded/claustrum/enrollment.d.ts +29 -4
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +110 -2
- package/dist/src/common-auth-embedded/claustrum/host.js +11 -7
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/claustrum/index.js +1 -1
- package/dist/src/common-auth-embedded/fs/lock-record.js +55 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +148 -92
- package/dist/src/common-auth-embedded/fs/with-lock.js +19 -13
- package/dist/src/common-auth-embedded/quota-sidebar/index.d.ts +2 -36
- package/dist/src/common-auth-embedded/quota-sidebar/index.tsx +49 -607
- package/dist/src/common-auth-embedded/routing-accessor/cache-policy.d.ts +3 -0
- package/dist/src/common-auth-embedded/routing-accessor/cache-policy.js +11 -0
- package/dist/src/common-auth-embedded/routing-accessor/index.d.ts +48 -5
- package/dist/src/common-auth-embedded/routing-accessor/index.js +136 -5
- package/dist/src/common-auth-embedded/setup/command-error.d.ts +1 -1
- package/dist/src/common-auth-embedded/setup/command-error.js +3 -2
- package/dist/src/common-auth-embedded/setup/command.js +18 -5
- package/dist/src/common-auth-embedded/setup/enroll.d.ts +2 -2
- package/dist/src/common-auth-embedded/setup/enroll.js +14 -3
- package/dist/src/common-auth-embedded/setup/enrollment-access.js +77 -0
- package/dist/src/common-auth-embedded/setup/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/setup/types.d.ts +13 -1
- package/dist/src/common-auth-embedded/source-output.json +95 -79
- package/dist/src/ga/tui/host-ga.d.ts +20 -3
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +102 -25
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/__fixtures__/release-model-ids.d.ts.map +1 -1
- package/dist/src/plugin/__fixtures__/release-model-ids.js +1 -0
- package/dist/src/plugin/__fixtures__/release-model-ids.js.map +1 -1
- package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
- package/dist/src/plugin/ga-location-services.d.ts +1 -0
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +6 -0
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/logger.d.ts +3 -1
- package/dist/src/plugin/logger.d.ts.map +1 -1
- package/dist/src/plugin/logger.js +15 -7
- package/dist/src/plugin/logger.js.map +1 -1
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +3 -1
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +34 -9
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/src/plugin/shared/vault-billing.d.ts +30 -0
- package/dist/src/plugin/shared/vault-billing.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-billing.js +196 -0
- package/dist/src/plugin/shared/vault-billing.js.map +1 -0
- package/dist/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/src/plugin/vault-custody.js +3 -0
- package/dist/src/plugin/vault-custody.js.map +1 -1
- package/dist/src/setup.d.ts.map +1 -1
- package/dist/src/setup.js +14 -0
- package/dist/src/setup.js.map +1 -1
- package/dist/tui-build-map.json +19 -5
- package/dist/tui-ga-build-map.json +23 -9
- package/dist/types/src/common-auth-embedded/claustrum/availability.d.ts +7 -1
- package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +11 -2
- package/dist/types/src/common-auth-embedded/claustrum/enrollment.d.ts +29 -4
- package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/routing-accessor/cache-policy.d.ts +3 -0
- package/dist/types/src/common-auth-embedded/routing-accessor/index.d.ts +48 -5
- package/dist/types/src/common-auth-embedded/setup/command-error.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/setup/enroll.d.ts +2 -2
- package/dist/types/src/common-auth-embedded/setup/index.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/setup/types.d.ts +13 -1
- package/dist/types/src/plugin/ga-location-services.d.ts +1 -0
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/logger.d.ts +3 -1
- package/dist/types/src/plugin/logger.d.ts.map +1 -1
- package/dist/types/src/plugin/request.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-billing.d.ts +30 -0
- package/dist/types/src/plugin/shared/vault-billing.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/types/src/setup.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/common-auth-embedded/claustrum/availability.d.ts +7 -1
- package/src/common-auth-embedded/claustrum/availability.js +9 -1
- package/src/common-auth-embedded/claustrum/custody.d.ts +11 -2
- package/src/common-auth-embedded/claustrum/custody.js +89 -31
- package/src/common-auth-embedded/claustrum/enrollment.d.ts +29 -4
- package/src/common-auth-embedded/claustrum/enrollment.js +110 -2
- package/src/common-auth-embedded/claustrum/host.js +11 -7
- package/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/src/common-auth-embedded/claustrum/index.js +1 -1
- package/src/common-auth-embedded/fs/lock-record.js +55 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.js +148 -92
- package/src/common-auth-embedded/fs/with-lock.js +19 -13
- package/src/common-auth-embedded/quota-sidebar/index.d.ts +2 -36
- package/src/common-auth-embedded/quota-sidebar/index.tsx +49 -607
- package/src/common-auth-embedded/routing-accessor/cache-policy.d.ts +3 -0
- package/src/common-auth-embedded/routing-accessor/cache-policy.js +11 -0
- package/src/common-auth-embedded/routing-accessor/index.d.ts +48 -5
- package/src/common-auth-embedded/routing-accessor/index.js +136 -5
- package/src/common-auth-embedded/setup/command-error.d.ts +1 -1
- package/src/common-auth-embedded/setup/command-error.js +3 -2
- package/src/common-auth-embedded/setup/command.js +18 -5
- package/src/common-auth-embedded/setup/enroll.d.ts +2 -2
- package/src/common-auth-embedded/setup/enroll.js +14 -3
- package/src/common-auth-embedded/setup/enrollment-access.js +77 -0
- package/src/common-auth-embedded/setup/index.d.ts +1 -1
- package/src/common-auth-embedded/setup/types.d.ts +13 -1
- package/src/common-auth-embedded/source-output.json +95 -79
- package/src/tui-compiled/common-auth-embedded/quota-sidebar/index.js +36 -674
- package/src/tui-compiled/shared/a75d0d866c227b3f-index.js +678 -0
- package/src/tui-ga-compiled/host-ga.js +86 -26
- package/src/tui-ga-compiled/shared/a75d0d866c227b3f-index.js +678 -0
- package/src/tui-ga-compiled/shared/e4ec36f367492969-index.js +36 -674
- package/src/tui-ga-raw/host-ga.tsx +122 -25
- package/src/tui-ga-raw/shared/a75d0d866c227b3f-index.tsx +681 -0
- package/src/tui-ga-raw/shared/e4ec36f367492969-index.tsx +49 -607
- package/src/tui-raw/common-auth-embedded/quota-sidebar/index.tsx +49 -607
- package/src/tui-raw/shared/a75d0d866c227b3f-index.tsx +681 -0
|
@@ -1,683 +1,45 @@
|
|
|
1
|
-
import { createTextNode as _$createTextNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
2
1
|
import { createComponent as _$createComponent } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { insertNode as _$insertNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
7
|
-
import { insert as _$insert } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
8
|
-
import { setProp as _$setProp } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
9
|
-
import { createElement as _$createElement } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
10
|
-
import { createContext, createMemo, createSignal, For, Index, mergeProps, Show, useContext } from "opentui:runtime-module:solid-js";
|
|
2
|
+
import { mergeProps as _$mergeProps } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
3
|
+
import { SidebarFrame as Frame } from "../../shared/a75d0d866c227b3f-index.js";
|
|
4
|
+
import { mapArray, mergeProps } from "opentui:runtime-module:solid-js";
|
|
11
5
|
import { formatQuota, quotaWindowParts } from "../quota/format.js";
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
for (const char of text) {
|
|
28
|
-
const width = displayWidth(char);
|
|
29
|
-
if (used + width > columns - 1) break;
|
|
30
|
-
kept += char;
|
|
31
|
-
used += width;
|
|
32
|
-
}
|
|
33
|
-
return `${kept}\u2026`;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** A heading and its plugin-owned rows, with the frame's section spacing. */
|
|
37
|
-
export function SidebarSection(props) {
|
|
38
|
-
const context = frameContext();
|
|
39
|
-
return [(() => {
|
|
40
|
-
var _el$ = _$createElement("box"),
|
|
41
|
-
_el$2 = _$createElement("text"),
|
|
42
|
-
_el$3 = _$createElement("b");
|
|
43
|
-
_$insertNode(_el$, _el$2);
|
|
44
|
-
_$setProp(_el$, "width", '100%');
|
|
45
|
-
_$setProp(_el$, "marginTop", 1);
|
|
46
|
-
_$insertNode(_el$2, _el$3);
|
|
47
|
-
_$insert(_el$3, () => props.title);
|
|
48
|
-
_$effect(_$p => _$setProp(_el$2, "fg", context.theme.text, _$p));
|
|
49
|
-
return _el$;
|
|
50
|
-
})(), _$memo(() => props.children)];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** Keep labels whole and reserve one blank cell before an ellipsized value. */
|
|
54
|
-
export function SidebarStatRow(props) {
|
|
55
|
-
const context = frameContext();
|
|
56
|
-
const [width, setWidth] = createSignal(0);
|
|
57
|
-
let row;
|
|
58
|
-
const value = () => width() <= 0 ? props.value : fitText(props.value, width() - displayWidth(props.label) - 1);
|
|
59
|
-
return (() => {
|
|
60
|
-
var _el$4 = _$createElement("box"),
|
|
61
|
-
_el$5 = _$createElement("text"),
|
|
62
|
-
_el$6 = _$createElement("text"),
|
|
63
|
-
_el$7 = _$createElement("b");
|
|
64
|
-
_$insertNode(_el$4, _el$5);
|
|
65
|
-
_$insertNode(_el$4, _el$6);
|
|
66
|
-
_$use(element => {
|
|
67
|
-
row = element;
|
|
68
|
-
}, _el$4);
|
|
69
|
-
_$setProp(_el$4, "onSizeChange", () => setWidth(row?.width ?? 0));
|
|
70
|
-
_$setProp(_el$4, "width", '100%');
|
|
71
|
-
_$setProp(_el$4, "flexDirection", 'row');
|
|
72
|
-
_$setProp(_el$4, "justifyContent", 'space-between');
|
|
73
|
-
_$setProp(_el$4, "columnGap", 1);
|
|
74
|
-
_$setProp(_el$5, "wrapMode", 'none');
|
|
75
|
-
_$setProp(_el$5, "flexShrink", 0);
|
|
76
|
-
_$insert(_el$5, () => props.label);
|
|
77
|
-
_$insertNode(_el$6, _el$7);
|
|
78
|
-
_$setProp(_el$6, "wrapMode", 'none');
|
|
79
|
-
_$setProp(_el$6, "flexShrink", 1);
|
|
80
|
-
_$insert(_el$7, value);
|
|
81
|
-
_$effect(_p$ => {
|
|
82
|
-
var _v$ = context.theme.textMuted,
|
|
83
|
-
_v$2 = context.theme[props.tone ?? 'text'];
|
|
84
|
-
_v$ !== _p$.e && (_p$.e = _$setProp(_el$5, "fg", _v$, _p$.e));
|
|
85
|
-
_v$2 !== _p$.t && (_p$.t = _$setProp(_el$6, "fg", _v$2, _p$.t));
|
|
86
|
-
return _p$;
|
|
87
|
-
}, {
|
|
88
|
-
e: undefined,
|
|
89
|
-
t: undefined
|
|
90
|
-
});
|
|
91
|
-
return _el$4;
|
|
92
|
-
})();
|
|
93
|
-
}
|
|
94
|
-
export function SidebarTextRow(props) {
|
|
95
|
-
const context = frameContext();
|
|
96
|
-
return (() => {
|
|
97
|
-
var _el$8 = _$createElement("text");
|
|
98
|
-
_$insert(_el$8, () => props.text);
|
|
99
|
-
_$effect(_p$ => {
|
|
100
|
-
var _v$3 = context.theme[props.tone ?? 'textMuted'],
|
|
101
|
-
_v$4 = props.wrapMode;
|
|
102
|
-
_v$3 !== _p$.e && (_p$.e = _$setProp(_el$8, "fg", _v$3, _p$.e));
|
|
103
|
-
_v$4 !== _p$.t && (_p$.t = _$setProp(_el$8, "wrapMode", _v$4, _p$.t));
|
|
104
|
-
return _p$;
|
|
105
|
-
}, {
|
|
106
|
-
e: undefined,
|
|
107
|
-
t: undefined
|
|
108
|
-
});
|
|
109
|
-
return _el$8;
|
|
110
|
-
})();
|
|
111
|
-
}
|
|
112
|
-
function usageTone(used, appearance) {
|
|
113
|
-
if (used >= appearance.errorThreshold) return 'error';
|
|
114
|
-
if (used >= appearance.warnThreshold) return 'warning';
|
|
115
|
-
return 'success';
|
|
116
|
-
}
|
|
117
|
-
function barSegments(used, appearance, pace) {
|
|
118
|
-
const width = appearance.barWidth;
|
|
119
|
-
const cells = pct => Math.max(0, Math.min(Math.round(pct / 100 * width), width));
|
|
120
|
-
const usedCells = cells(used);
|
|
121
|
-
const tone = usageTone(used, appearance);
|
|
122
|
-
// Keep the overlay's slot even when empty so live pacing changes reuse nodes.
|
|
123
|
-
const plain = [{
|
|
124
|
-
text: appearance.barFilledChar.repeat(usedCells),
|
|
125
|
-
tone
|
|
126
|
-
}, {
|
|
127
|
-
text: '',
|
|
128
|
-
tone
|
|
129
|
-
}, {
|
|
130
|
-
text: appearance.barEmptyChar.repeat(width - usedCells),
|
|
131
|
-
tone
|
|
132
|
-
}];
|
|
133
|
-
const overlay = pace?.overlay;
|
|
134
|
-
if (!overlay) return plain;
|
|
135
|
-
const paceCells = cells(overlay.percent);
|
|
136
|
-
const lo = Math.min(usedCells, paceCells);
|
|
137
|
-
const hi = Math.max(usedCells, paceCells);
|
|
138
|
-
if (lo === hi) return plain;
|
|
139
|
-
return [{
|
|
140
|
-
text: appearance.barFilledChar.repeat(lo),
|
|
141
|
-
tone
|
|
142
|
-
}, {
|
|
143
|
-
text: (overlay.kind === 'deficit' ? '\u2593' : '\u2592').repeat(hi - lo),
|
|
144
|
-
tone: overlay.kind === 'deficit' ? 'error' : 'success'
|
|
145
|
-
}, {
|
|
146
|
-
text: appearance.barEmptyChar.repeat(width - hi),
|
|
147
|
-
tone
|
|
148
|
-
}];
|
|
149
|
-
}
|
|
150
|
-
function QuotaRow(props) {
|
|
151
|
-
const context = frameContext();
|
|
152
|
-
const [columns, setColumns] = createSignal(0);
|
|
153
|
-
let row;
|
|
154
|
-
const label = () => props.part.name + ' '.repeat(Math.max(0, props.labelWidth - displayWidth(props.part.name)));
|
|
155
|
-
const figure = () => ` ${props.part.kind === 'budget' && props.part.figure.startsWith(`${props.part.name} `) ? props.part.figure.slice(props.part.name.length + 1) : props.part.figure}`;
|
|
156
|
-
const hasReading = () => props.part.reading === 'known';
|
|
157
|
-
const used = () => 100 - (props.part.remainingPercent ?? 100);
|
|
158
|
-
// Size notifications can recompute an unchanged fit after text has been flushed
|
|
159
|
-
// for the frame. Keep equal segments, and update fixed slots in place when the
|
|
160
|
-
// bar changes, rather than replacing text nodes during layout.
|
|
161
|
-
const segments = createMemo(() => hasReading() ? barSegments(used(), {
|
|
162
|
-
...context.appearance,
|
|
163
|
-
barWidth: props.barCells
|
|
164
|
-
}, props.pace) : [], undefined, {
|
|
165
|
-
equals: (previous, next) => previous.length === next.length && previous.every((segment, index) => segment.text === next[index]?.text && segment.tone === next[index]?.tone)
|
|
166
|
-
});
|
|
167
|
-
const paceLine = () => {
|
|
168
|
-
const text = props.pace?.text;
|
|
169
|
-
if (!text || columns() <= 0) return text;
|
|
170
|
-
return fitText(text, columns() - props.labelWidth);
|
|
171
|
-
};
|
|
172
|
-
return [(() => {
|
|
173
|
-
var _el$9 = _$createElement("box"),
|
|
174
|
-
_el$0 = _$createElement("box");
|
|
175
|
-
_$insertNode(_el$9, _el$0);
|
|
176
|
-
_$use(element => {
|
|
177
|
-
row = element;
|
|
178
|
-
}, _el$9);
|
|
179
|
-
_$setProp(_el$9, "onSizeChange", () => setColumns(row?.width ?? 0));
|
|
180
|
-
_$setProp(_el$9, "width", '100%');
|
|
181
|
-
_$setProp(_el$9, "flexDirection", 'row');
|
|
182
|
-
_$setProp(_el$9, "justifyContent", 'space-between');
|
|
183
|
-
_$setProp(_el$0, "flexDirection", 'row');
|
|
184
|
-
_$insert(_el$0, _$createComponent(Show, {
|
|
185
|
-
get when() {
|
|
186
|
-
return props.labelWidth > 0;
|
|
187
|
-
},
|
|
188
|
-
get children() {
|
|
189
|
-
var _el$1 = _$createElement("text");
|
|
190
|
-
_$setProp(_el$1, "wrapMode", 'none');
|
|
191
|
-
_$setProp(_el$1, "flexShrink", 0);
|
|
192
|
-
_$insert(_el$1, label);
|
|
193
|
-
_$effect(_$p => _$setProp(_el$1, "fg", context.theme.textMuted, _$p));
|
|
194
|
-
return _el$1;
|
|
195
|
-
}
|
|
196
|
-
}), null);
|
|
197
|
-
_$insert(_el$0, _$createComponent(Show, {
|
|
198
|
-
get when() {
|
|
199
|
-
return hasReading();
|
|
200
|
-
},
|
|
201
|
-
get fallback() {
|
|
202
|
-
return (() => {
|
|
203
|
-
var _el$13 = _$createElement("text");
|
|
204
|
-
_$insertNode(_el$13, _$createTextNode(`no reading`));
|
|
205
|
-
_$setProp(_el$13, "wrapMode", 'none');
|
|
206
|
-
_$effect(_$p => _$setProp(_el$13, "fg", context.theme.textMuted, _$p));
|
|
207
|
-
return _el$13;
|
|
208
|
-
})();
|
|
209
|
-
},
|
|
210
|
-
get children() {
|
|
211
|
-
return _$createComponent(Show, {
|
|
212
|
-
get when() {
|
|
213
|
-
return !props.part.resetSinceReading;
|
|
214
|
-
},
|
|
215
|
-
get fallback() {
|
|
216
|
-
return (() => {
|
|
217
|
-
var _el$15 = _$createElement("text");
|
|
218
|
-
_$insertNode(_el$15, _$createTextNode(`reset since last check`));
|
|
219
|
-
_$setProp(_el$15, "wrapMode", 'none');
|
|
220
|
-
_$effect(_$p => _$setProp(_el$15, "fg", context.theme.textMuted, _$p));
|
|
221
|
-
return _el$15;
|
|
222
|
-
})();
|
|
223
|
-
},
|
|
224
|
-
get children() {
|
|
225
|
-
return [_$createComponent(Show, {
|
|
226
|
-
get when() {
|
|
227
|
-
return props.barCells > 0;
|
|
228
|
-
},
|
|
229
|
-
get children() {
|
|
230
|
-
return _$createComponent(Index, {
|
|
231
|
-
get each() {
|
|
232
|
-
return segments();
|
|
233
|
-
},
|
|
234
|
-
children: segment => (() => {
|
|
235
|
-
var _el$17 = _$createElement("text");
|
|
236
|
-
_$setProp(_el$17, "wrapMode", 'none');
|
|
237
|
-
_$insert(_el$17, () => segment().text);
|
|
238
|
-
_$effect(_p$ => {
|
|
239
|
-
var _v$5 = context.theme[segment().tone],
|
|
240
|
-
_v$6 = segment().text ? undefined : 0;
|
|
241
|
-
_v$5 !== _p$.e && (_p$.e = _$setProp(_el$17, "fg", _v$5, _p$.e));
|
|
242
|
-
_v$6 !== _p$.t && (_p$.t = _$setProp(_el$17, "width", _v$6, _p$.t));
|
|
243
|
-
return _p$;
|
|
244
|
-
}, {
|
|
245
|
-
e: undefined,
|
|
246
|
-
t: undefined
|
|
247
|
-
});
|
|
248
|
-
return _el$17;
|
|
249
|
-
})()
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
}), (() => {
|
|
253
|
-
var _el$10 = _$createElement("text");
|
|
254
|
-
_$setProp(_el$10, "wrapMode", 'none');
|
|
255
|
-
_$insert(_el$10, figure);
|
|
256
|
-
_$effect(_$p => _$setProp(_el$10, "fg", context.theme[usageTone(used(), context.appearance)], _$p));
|
|
257
|
-
return _el$10;
|
|
258
|
-
})()];
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
}), null);
|
|
263
|
-
_$insert(_el$9, _$createComponent(Show, {
|
|
264
|
-
get when() {
|
|
265
|
-
return _$memo(() => !!(hasReading() && props.showReset))() && !props.part.resetSinceReading;
|
|
266
|
-
},
|
|
267
|
-
get children() {
|
|
268
|
-
var _el$11 = _$createElement("box");
|
|
269
|
-
_$setProp(_el$11, "flexShrink", 0);
|
|
270
|
-
_$setProp(_el$11, "flexDirection", 'row');
|
|
271
|
-
_$setProp(_el$11, "justifyContent", 'flex-end');
|
|
272
|
-
_$insert(_el$11, _$createComponent(Show, {
|
|
273
|
-
get when() {
|
|
274
|
-
return props.part.resetIn;
|
|
275
|
-
},
|
|
276
|
-
get children() {
|
|
277
|
-
var _el$12 = _$createElement("text");
|
|
278
|
-
_$setProp(_el$12, "wrapMode", 'none');
|
|
279
|
-
_$insert(_el$12, () => props.part.resetIn);
|
|
280
|
-
_$effect(_$p => _$setProp(_el$12, "fg", context.theme.textMuted, _$p));
|
|
281
|
-
return _el$12;
|
|
282
|
-
}
|
|
283
|
-
}));
|
|
284
|
-
_$effect(_$p => _$setProp(_el$11, "width", props.resetWidth, _$p));
|
|
285
|
-
return _el$11;
|
|
286
|
-
}
|
|
287
|
-
}), null);
|
|
288
|
-
_$effect(_$p => _$setProp(_el$0, "flexShrink", props.part.resetSinceReading ? 1 : 0, _$p));
|
|
289
|
-
return _el$9;
|
|
290
|
-
})(), _$createComponent(Show, {
|
|
291
|
-
get when() {
|
|
292
|
-
return _$memo(() => !!(hasReading() && !props.part.resetSinceReading))() && paceLine();
|
|
293
|
-
},
|
|
294
|
-
keyed: true,
|
|
295
|
-
children: line => (() => {
|
|
296
|
-
var _el$18 = _$createElement("box"),
|
|
297
|
-
_el$20 = _$createElement("text");
|
|
298
|
-
_$insertNode(_el$18, _el$20);
|
|
299
|
-
_$setProp(_el$18, "width", '100%');
|
|
300
|
-
_$setProp(_el$18, "flexDirection", 'row');
|
|
301
|
-
_$insert(_el$18, _$createComponent(Show, {
|
|
302
|
-
get when() {
|
|
303
|
-
return props.labelWidth > 0;
|
|
304
|
-
},
|
|
305
|
-
get children() {
|
|
306
|
-
var _el$19 = _$createElement("text");
|
|
307
|
-
_$insert(_el$19, () => ''.padEnd(props.labelWidth));
|
|
308
|
-
_$effect(_$p => _$setProp(_el$19, "fg", context.theme.textMuted, _$p));
|
|
309
|
-
return _el$19;
|
|
310
|
-
}
|
|
311
|
-
}), _el$20);
|
|
312
|
-
_$setProp(_el$20, "wrapMode", 'none');
|
|
313
|
-
_$insert(_el$20, line);
|
|
314
|
-
_$effect(_$p => _$setProp(_el$20, "fg", context.theme[props.pace?.tone ?? 'textMuted'], _$p));
|
|
315
|
-
return _el$18;
|
|
316
|
-
})()
|
|
317
|
-
})];
|
|
318
|
-
}
|
|
319
|
-
function CollapsedAccountRow(props) {
|
|
320
|
-
const context = frameContext();
|
|
321
|
-
const [width, setWidth] = createSignal(0);
|
|
322
|
-
let row;
|
|
323
|
-
const hasQuota = () => quotaWindowParts(props.account.quota, {
|
|
324
|
-
now: context.now
|
|
325
|
-
}).windows.some(part => part.reading === 'known');
|
|
326
|
-
const text = () => hasQuota() ? formatQuota(props.account.quota, {
|
|
327
|
-
now: context.now,
|
|
328
|
-
form: 'narrow'
|
|
329
|
-
}) : props.account.emptyQuotaText?.collapsed ?? '\u2014';
|
|
330
|
-
// Reserve an ellipsis, a separator and the trailing indicator before keeping quota.
|
|
331
|
-
const showQuota = () => width() <= 0 || displayWidth(text()) + 4 <= width();
|
|
332
|
-
const label = () => {
|
|
333
|
-
if (width() <= 0) return props.account.label;
|
|
334
|
-
return fitText(props.account.label, width() - (showQuota() ? displayWidth(text()) + 3 : 2));
|
|
335
|
-
};
|
|
336
|
-
const muted = () => props.account.collapsed?.muted ?? false;
|
|
337
|
-
const quotaTone = () => muted() ? 'textMuted' : props.account.collapsed?.quotaTone ?? 'success';
|
|
338
|
-
return (() => {
|
|
339
|
-
var _el$21 = _$createElement("box"),
|
|
340
|
-
_el$23 = _$createElement("box"),
|
|
341
|
-
_el$26 = _$createElement("text");
|
|
342
|
-
_$insertNode(_el$21, _el$23);
|
|
343
|
-
_$use(element => {
|
|
344
|
-
row = element;
|
|
345
|
-
}, _el$21);
|
|
346
|
-
_$setProp(_el$21, "onSizeChange", () => setWidth(row?.width ?? 0));
|
|
347
|
-
_$setProp(_el$21, "width", '100%');
|
|
348
|
-
_$setProp(_el$21, "flexDirection", 'row');
|
|
349
|
-
_$setProp(_el$21, "justifyContent", 'space-between');
|
|
350
|
-
_$insert(_el$21, _$createComponent(Show, {
|
|
351
|
-
get when() {
|
|
352
|
-
return label();
|
|
353
|
-
},
|
|
354
|
-
get children() {
|
|
355
|
-
var _el$22 = _$createElement("text");
|
|
356
|
-
_$setProp(_el$22, "wrapMode", 'none');
|
|
357
|
-
_$setProp(_el$22, "flexShrink", 1);
|
|
358
|
-
_$insert(_el$22, label);
|
|
359
|
-
_$effect(_$p => _$setProp(_el$22, "fg", context.theme[muted() ? 'textMuted' : 'text'], _$p));
|
|
360
|
-
return _el$22;
|
|
361
|
-
}
|
|
362
|
-
}), _el$23);
|
|
363
|
-
_$insertNode(_el$23, _el$26);
|
|
364
|
-
_$setProp(_el$23, "flexDirection", 'row');
|
|
365
|
-
_$setProp(_el$23, "flexShrink", 0);
|
|
366
|
-
_$insert(_el$23, _$createComponent(Show, {
|
|
367
|
-
get when() {
|
|
368
|
-
return showQuota();
|
|
369
|
-
},
|
|
370
|
-
get children() {
|
|
371
|
-
return _$createComponent(Show, {
|
|
372
|
-
get when() {
|
|
373
|
-
return _$memo(() => !!hasQuota())() && !muted();
|
|
374
|
-
},
|
|
375
|
-
get fallback() {
|
|
376
|
-
return (() => {
|
|
377
|
-
var _el$27 = _$createElement("text");
|
|
378
|
-
_$insert(_el$27, text);
|
|
379
|
-
_$effect(_$p => _$setProp(_el$27, "fg", context.theme.textMuted, _$p));
|
|
380
|
-
return _el$27;
|
|
381
|
-
})();
|
|
382
|
-
},
|
|
383
|
-
get children() {
|
|
384
|
-
var _el$24 = _$createElement("text"),
|
|
385
|
-
_el$25 = _$createElement("b");
|
|
386
|
-
_$insertNode(_el$24, _el$25);
|
|
387
|
-
_$insert(_el$25, text);
|
|
388
|
-
_$effect(_$p => _$setProp(_el$24, "fg", context.theme[quotaTone()], _$p));
|
|
389
|
-
return _el$24;
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
}), _el$26);
|
|
394
|
-
_$insert(_el$26, () => showQuota() ? ' ' : '', null);
|
|
395
|
-
_$insert(_el$26, () => props.account.blocked ? '\u2298' : '\u25cf', null);
|
|
396
|
-
_$effect(_p$ => {
|
|
397
|
-
var _v$7 = label() ? 1 : 0,
|
|
398
|
-
_v$8 = context.theme[props.account.indicatorTone];
|
|
399
|
-
_v$7 !== _p$.e && (_p$.e = _$setProp(_el$21, "columnGap", _v$7, _p$.e));
|
|
400
|
-
_v$8 !== _p$.t && (_p$.t = _$setProp(_el$26, "fg", _v$8, _p$.t));
|
|
401
|
-
return _p$;
|
|
402
|
-
}, {
|
|
403
|
-
e: undefined,
|
|
404
|
-
t: undefined
|
|
405
|
-
});
|
|
406
|
-
return _el$21;
|
|
407
|
-
})();
|
|
408
|
-
}
|
|
409
|
-
function AccountBlock(props) {
|
|
410
|
-
const context = frameContext();
|
|
411
|
-
const [columns, setColumns] = createSignal(0);
|
|
412
|
-
let block;
|
|
413
|
-
const rows = () => props.account.groups.flatMap(group => group.rows);
|
|
414
|
-
const labelWidth = () => Math.max(0, ...rows().map(({
|
|
415
|
-
part
|
|
416
|
-
}) => part.name ? Math.max(3, displayWidth(part.name) + 1) : 0));
|
|
417
|
-
const resetWidth = () => Math.max(0, ...rows().map(({
|
|
418
|
-
part
|
|
419
|
-
}) => part.reading === 'unknown' || part.resetSinceReading ? 0 : displayWidth(part.resetIn ?? '')));
|
|
420
|
-
const figureWidth = createMemo(() => Math.max(10, ...rows().filter(({
|
|
421
|
-
part
|
|
422
|
-
}) => part.reading === 'known' && !part.resetSinceReading).map(({
|
|
423
|
-
part
|
|
424
|
-
}) => displayWidth(` ${part.kind === 'budget' && part.figure.startsWith(`${part.name} `) ? part.figure.slice(part.name.length + 1) : part.figure}`))));
|
|
425
|
-
const fit = rowLabelWidth => {
|
|
426
|
-
const desired = context.appearance.barWidth;
|
|
427
|
-
// Four cells still distinguish quarters of a window without sacrificing its reset.
|
|
428
|
-
const minimum = Math.min(4, desired);
|
|
429
|
-
if (columns() <= 0) return {
|
|
430
|
-
barCells: desired,
|
|
431
|
-
showReset: resetWidth() > 0
|
|
432
|
-
};
|
|
433
|
-
const room = columns() - rowLabelWidth - figureWidth();
|
|
434
|
-
const withReset = room - resetWidth() - 1;
|
|
435
|
-
const showReset = resetWidth() > 0 && withReset >= minimum;
|
|
436
|
-
const available = showReset ? withReset : room;
|
|
437
|
-
return {
|
|
438
|
-
barCells: available >= minimum ? Math.min(desired, available) : 0,
|
|
439
|
-
showReset
|
|
440
|
-
};
|
|
441
|
-
};
|
|
442
|
-
const label = () => {
|
|
443
|
-
const full = `${props.account.label}${props.account.titleSuffix ? ` · ${props.account.titleSuffix}` : ''}`;
|
|
444
|
-
return columns() <= 0 ? full : fitText(full, columns() - displayWidth(props.account.status.text) - 1);
|
|
445
|
-
};
|
|
446
|
-
const age = () => quotaWindowParts(props.account.quota, {
|
|
447
|
-
now: context.now
|
|
448
|
-
}).age;
|
|
449
|
-
const hasRows = () => props.account.groups.some(group => group.rows.length > 0);
|
|
450
|
-
return (() => {
|
|
451
|
-
var _el$28 = _$createElement("box"),
|
|
452
|
-
_el$29 = _$createElement("box"),
|
|
453
|
-
_el$30 = _$createElement("text"),
|
|
454
|
-
_el$31 = _$createElement("b"),
|
|
455
|
-
_el$32 = _$createElement("text"),
|
|
456
|
-
_el$33 = _$createElement("b");
|
|
457
|
-
_$insertNode(_el$28, _el$29);
|
|
458
|
-
_$use(element => {
|
|
459
|
-
block = element;
|
|
460
|
-
}, _el$28);
|
|
461
|
-
_$setProp(_el$28, "onSizeChange", () => setColumns(block?.width ?? 0));
|
|
462
|
-
_$setProp(_el$28, "width", '100%');
|
|
463
|
-
_$setProp(_el$28, "flexDirection", 'column');
|
|
464
|
-
_$insertNode(_el$29, _el$30);
|
|
465
|
-
_$insertNode(_el$29, _el$32);
|
|
466
|
-
_$setProp(_el$29, "width", '100%');
|
|
467
|
-
_$setProp(_el$29, "flexDirection", 'row');
|
|
468
|
-
_$setProp(_el$29, "justifyContent", 'space-between');
|
|
469
|
-
_$setProp(_el$29, "columnGap", 1);
|
|
470
|
-
_$insertNode(_el$30, _el$31);
|
|
471
|
-
_$setProp(_el$30, "wrapMode", 'none');
|
|
472
|
-
_$setProp(_el$30, "flexShrink", 1);
|
|
473
|
-
_$insert(_el$31, label);
|
|
474
|
-
_$insertNode(_el$32, _el$33);
|
|
475
|
-
_$setProp(_el$32, "wrapMode", 'none');
|
|
476
|
-
_$setProp(_el$32, "flexShrink", 0);
|
|
477
|
-
_$insert(_el$33, () => props.account.status.text);
|
|
478
|
-
_$insert(_el$28, () => context.beforeQuota?.(props.account), null);
|
|
479
|
-
_$insert(_el$28, _$createComponent(Show, {
|
|
480
|
-
get when() {
|
|
481
|
-
return hasRows();
|
|
482
|
-
},
|
|
483
|
-
get fallback() {
|
|
484
|
-
return _$createComponent(SidebarTextRow, {
|
|
485
|
-
get text() {
|
|
486
|
-
return props.account.emptyQuotaText?.expanded ?? '\u2014';
|
|
487
|
-
},
|
|
488
|
-
wrapMode: "none"
|
|
6
|
+
export { SidebarSection, SidebarStatRow, SidebarTextRow } from "../../shared/a75d0d866c227b3f-index.js";
|
|
7
|
+
export function SidebarFrame(props) {
|
|
8
|
+
const sources = new WeakMap();
|
|
9
|
+
const accounts = mapArray(() => props.accounts, account => {
|
|
10
|
+
// Keep account identity and live getters while the frame reads the caller's clock.
|
|
11
|
+
const adapted = mergeProps(account, {
|
|
12
|
+
get hasQuota() {
|
|
13
|
+
return quotaWindowParts(account.quota, {
|
|
14
|
+
now: props.now
|
|
15
|
+
}).windows.some(part => part.reading === 'known');
|
|
16
|
+
},
|
|
17
|
+
get collapsedQuotaText() {
|
|
18
|
+
return formatQuota(account.quota, {
|
|
19
|
+
now: props.now,
|
|
20
|
+
form: 'narrow'
|
|
489
21
|
});
|
|
490
22
|
},
|
|
491
|
-
get
|
|
492
|
-
return
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
},
|
|
496
|
-
children: group => [_$createComponent(Show, {
|
|
497
|
-
get when() {
|
|
498
|
-
return group.title;
|
|
499
|
-
},
|
|
500
|
-
get children() {
|
|
501
|
-
return _$createComponent(SidebarTextRow, {
|
|
502
|
-
get text() {
|
|
503
|
-
return group.title ?? '';
|
|
504
|
-
},
|
|
505
|
-
tone: "text",
|
|
506
|
-
wrapMode: "none"
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
}), _$createComponent(For, {
|
|
510
|
-
get each() {
|
|
511
|
-
return group.rows;
|
|
512
|
-
},
|
|
513
|
-
children: row => {
|
|
514
|
-
const rowLabelWidth = () => row.part.name ? labelWidth() : 0;
|
|
515
|
-
const rowFit = createMemo(() => fit(rowLabelWidth()));
|
|
516
|
-
return _$createComponent(QuotaRow, {
|
|
517
|
-
get part() {
|
|
518
|
-
return row.part;
|
|
519
|
-
},
|
|
520
|
-
get pace() {
|
|
521
|
-
return row.pace;
|
|
522
|
-
},
|
|
523
|
-
get labelWidth() {
|
|
524
|
-
return rowLabelWidth();
|
|
525
|
-
},
|
|
526
|
-
get barCells() {
|
|
527
|
-
return rowFit().barCells;
|
|
528
|
-
},
|
|
529
|
-
get resetWidth() {
|
|
530
|
-
return resetWidth();
|
|
531
|
-
},
|
|
532
|
-
get showReset() {
|
|
533
|
-
return rowFit().showReset;
|
|
534
|
-
}
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
})]
|
|
538
|
-
});
|
|
23
|
+
get quotaAge() {
|
|
24
|
+
return quotaWindowParts(account.quota, {
|
|
25
|
+
now: props.now
|
|
26
|
+
}).age;
|
|
539
27
|
}
|
|
540
|
-
}), null);
|
|
541
|
-
_$insert(_el$28, _$createComponent(Show, {
|
|
542
|
-
get when() {
|
|
543
|
-
return age();
|
|
544
|
-
},
|
|
545
|
-
children: text => _$createComponent(SidebarTextRow, {
|
|
546
|
-
get text() {
|
|
547
|
-
return text();
|
|
548
|
-
},
|
|
549
|
-
wrapMode: "none"
|
|
550
|
-
})
|
|
551
|
-
}), null);
|
|
552
|
-
_$insert(_el$28, () => context.afterQuota?.(props.account), null);
|
|
553
|
-
_$effect(_p$ => {
|
|
554
|
-
var _v$9 = props.marginTop,
|
|
555
|
-
_v$0 = context.theme.text,
|
|
556
|
-
_v$1 = context.theme[props.account.status.tone];
|
|
557
|
-
_v$9 !== _p$.e && (_p$.e = _$setProp(_el$28, "marginTop", _v$9, _p$.e));
|
|
558
|
-
_v$0 !== _p$.t && (_p$.t = _$setProp(_el$30, "fg", _v$0, _p$.t));
|
|
559
|
-
_v$1 !== _p$.a && (_p$.a = _$setProp(_el$32, "fg", _v$1, _p$.a));
|
|
560
|
-
return _p$;
|
|
561
|
-
}, {
|
|
562
|
-
e: undefined,
|
|
563
|
-
t: undefined,
|
|
564
|
-
a: undefined
|
|
565
28
|
});
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
/** Borderless, controlled presentation; host registration and provider policy stay in the plugin. */
|
|
571
|
-
export function SidebarFrame(props) {
|
|
572
|
-
const hasData = () => props.accounts.length > 0;
|
|
573
|
-
const headerLabel = () => !hasData() ? props.header.badge : `${props.collapsed ? '\u25b6' : '\u25bc'} ${props.header.badge}`;
|
|
574
|
-
// Missing semantic colors inherit normal text; an unset palette uses terminal defaults.
|
|
575
|
-
const context = mergeProps(props, {
|
|
576
|
-
get theme() {
|
|
577
|
-
const theme = props.theme;
|
|
578
|
-
return {
|
|
579
|
-
...theme,
|
|
580
|
-
textMuted: theme?.textMuted ?? theme?.text,
|
|
581
|
-
accent: theme?.accent ?? theme?.text,
|
|
582
|
-
success: theme?.success ?? theme?.text,
|
|
583
|
-
warning: theme?.warning ?? theme?.text,
|
|
584
|
-
error: theme?.error ?? theme?.text
|
|
585
|
-
};
|
|
586
|
-
}
|
|
29
|
+
sources.set(adapted, account);
|
|
30
|
+
return adapted;
|
|
587
31
|
});
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
_$setProp(_el$34, "width", '100%');
|
|
600
|
-
_$setProp(_el$34, "flexDirection", 'column');
|
|
601
|
-
_$insertNode(_el$35, _el$36);
|
|
602
|
-
_$setProp(_el$35, "width", '100%');
|
|
603
|
-
_$setProp(_el$35, "flexDirection", 'row');
|
|
604
|
-
_$setProp(_el$35, "justifyContent", 'space-between');
|
|
605
|
-
_$setProp(_el$35, "alignItems", 'center');
|
|
606
|
-
_$setProp(_el$35, "onMouseDown", () => {
|
|
607
|
-
if (hasData()) props.onToggle();
|
|
608
|
-
});
|
|
609
|
-
_$insertNode(_el$36, _el$37);
|
|
610
|
-
_$setProp(_el$36, "paddingLeft", 1);
|
|
611
|
-
_$setProp(_el$36, "paddingRight", 1);
|
|
612
|
-
_$insertNode(_el$37, _el$38);
|
|
613
|
-
_$insert(_el$38, headerLabel);
|
|
614
|
-
_$insert(_el$35, _$createComponent(Show, {
|
|
615
|
-
get when() {
|
|
616
|
-
return props.header.version;
|
|
617
|
-
},
|
|
618
|
-
get children() {
|
|
619
|
-
var _el$39 = _$createElement("text");
|
|
620
|
-
_$insert(_el$39, () => props.header.version);
|
|
621
|
-
_$effect(_$p => _$setProp(_el$39, "fg", context.theme.textMuted, _$p));
|
|
622
|
-
return _el$39;
|
|
623
|
-
}
|
|
624
|
-
}), null);
|
|
625
|
-
_$insert(_el$34, _$createComponent(Show, {
|
|
626
|
-
get when() {
|
|
627
|
-
return _$memo(() => !!props.collapsed)() && hasData();
|
|
628
|
-
},
|
|
629
|
-
get children() {
|
|
630
|
-
return [_$createComponent(For, {
|
|
631
|
-
get each() {
|
|
632
|
-
return props.accounts;
|
|
633
|
-
},
|
|
634
|
-
children: account => _$createComponent(CollapsedAccountRow, {
|
|
635
|
-
account: account
|
|
636
|
-
})
|
|
637
|
-
}), _$memo(() => props.collapsedSections?.())];
|
|
638
|
-
}
|
|
639
|
-
}), null);
|
|
640
|
-
_$insert(_el$34, _$createComponent(Show, {
|
|
641
|
-
get when() {
|
|
642
|
-
return !props.collapsed || !hasData();
|
|
643
|
-
},
|
|
644
|
-
get children() {
|
|
645
|
-
return [_$createComponent(Show, {
|
|
646
|
-
get when() {
|
|
647
|
-
return _$memo(() => !!props.showQuota)() && hasData();
|
|
648
|
-
},
|
|
649
|
-
get children() {
|
|
650
|
-
return _$createComponent(SidebarSection, {
|
|
651
|
-
title: "Quota",
|
|
652
|
-
get children() {
|
|
653
|
-
return _$createComponent(For, {
|
|
654
|
-
get each() {
|
|
655
|
-
return props.accounts;
|
|
656
|
-
},
|
|
657
|
-
children: (account, index) => _$createComponent(AccountBlock, {
|
|
658
|
-
account: account,
|
|
659
|
-
get marginTop() {
|
|
660
|
-
return index() === 0 ? 0 : 1;
|
|
661
|
-
}
|
|
662
|
-
})
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
}), _$memo(() => props.sections?.())];
|
|
668
|
-
}
|
|
669
|
-
}), null);
|
|
670
|
-
_$effect(_p$ => {
|
|
671
|
-
var _v$10 = invertBadge() ? props.theme?.accent : undefined,
|
|
672
|
-
_v$11 = invertBadge() ? props.theme?.background : context.theme.accent;
|
|
673
|
-
_v$10 !== _p$.e && (_p$.e = _$setProp(_el$36, "backgroundColor", _v$10, _p$.e));
|
|
674
|
-
_v$11 !== _p$.t && (_p$.t = _$setProp(_el$37, "fg", _v$11, _p$.t));
|
|
675
|
-
return _p$;
|
|
676
|
-
}, {
|
|
677
|
-
e: undefined,
|
|
678
|
-
t: undefined
|
|
679
|
-
});
|
|
680
|
-
return _el$34;
|
|
32
|
+
return _$createComponent(Frame, _$mergeProps(props, {
|
|
33
|
+
get accounts() {
|
|
34
|
+
return accounts();
|
|
35
|
+
},
|
|
36
|
+
beforeQuota: account => {
|
|
37
|
+
const source = sources.get(account);
|
|
38
|
+
return source && props.beforeQuota?.(source);
|
|
39
|
+
},
|
|
40
|
+
afterQuota: account => {
|
|
41
|
+
const source = sources.get(account);
|
|
42
|
+
return source && props.afterQuota?.(source);
|
|
681
43
|
}
|
|
682
|
-
});
|
|
44
|
+
}));
|
|
683
45
|
}
|