@pentoshi/clai 3.8.17 → 3.8.18
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/dist/tui-v2/components/toast/toast-anim.d.ts +2 -3
- package/dist/tui-v2/components/toast/toast-anim.js +2 -3
- package/dist/tui-v2/components/toast/toast-anim.js.map +1 -1
- package/dist/tui-v2/components/toast/toast-host.d.ts +5 -3
- package/dist/tui-v2/components/toast/toast-host.js +32 -53
- package/dist/tui-v2/components/toast/toast-host.js.map +1 -1
- package/dist/tui-v2/controllers/toast-controller.d.ts +5 -2
- package/dist/tui-v2/controllers/toast-controller.js +5 -2
- package/dist/tui-v2/controllers/toast-controller.js.map +1 -1
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/package.json +1 -1
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { easeInCubic, easeOutCubic } from "../../motion/ease.js";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* 3
|
|
9
|
-
* Surface lives on the INNER well only so grey never paints under border cells.
|
|
7
|
+
* Toast chip height — keep in sync with host.
|
|
8
|
+
* 3 rows: padding + bold label row + padding (roomier “larger text” feel).
|
|
10
9
|
*/
|
|
11
10
|
export declare const TOAST_BOX_HEIGHT = 3;
|
|
12
11
|
/** Resting top row when fully visible (1 = just under terminal top edge). */
|
|
@@ -6,9 +6,8 @@ import { TOAST_ENTER_MS, TOAST_EXIT_MS, } from "../../controllers/toast-controll
|
|
|
6
6
|
import { easeInCubic, easeOutCubic } from "../../motion/ease.js";
|
|
7
7
|
export { easeInCubic, easeOutCubic } from "../../motion/ease.js";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* 3
|
|
11
|
-
* Surface lives on the INNER well only so grey never paints under border cells.
|
|
9
|
+
* Toast chip height — keep in sync with host.
|
|
10
|
+
* 3 rows: padding + bold label row + padding (roomier “larger text” feel).
|
|
12
11
|
*/
|
|
13
12
|
export const TOAST_BOX_HEIGHT = 3;
|
|
14
13
|
/** Resting top row when fully visible (1 = just under terminal top edge). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-anim.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/toast/toast-anim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,cAAc,EACd,aAAa,GACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEjE
|
|
1
|
+
{"version":3,"file":"toast-anim.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/toast/toast-anim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,cAAc,EACd,aAAa,GACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,gBAAgB,CAAC;AAelD;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,MAAc;IACvD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,cAAc,CAAC;IAChC,MAAM,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC;IAChC,MAAM,OAAO,GAAG,OAAO,GAAG,aAAa,CAAC;IAExC,IAAI,GAAG,GAAG,QAAQ,EAAE,CAAC;QACnB,MAAM,CAAC,GAAG,YAAY,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC;QAC1D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,gBAAgB,GAAG,CAAC,cAAc,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAC3D,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IAChD,CAAC;IACD,IAAI,GAAG,GAAG,OAAO,EAAE,CAAC;QAClB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IAC/D,CAAC;IACD,IAAI,GAAG,GAAG,OAAO,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;QACpE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,cAAc,GAAG,CAAC,gBAAgB,GAAG,cAAc,CAAC,GAAG,CAAC,CACzD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Notification toasts — top-center, slide in / hold / slide out.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Solid message-chip style (no border): intro "AGENT MODE" plate (`theme.mode`)
|
|
6
|
+
* with white bold text. Roomier height + full message (no visual truncation).
|
|
7
7
|
*/
|
|
8
8
|
import { type ReactNode } from "react";
|
|
9
|
-
import type { ToastController } from "../../controllers/toast-controller.js";
|
|
9
|
+
import type { ToastController, ToastLevel } from "../../controllers/toast-controller.js";
|
|
10
10
|
import type { Theme } from "../../rendering/theme.js";
|
|
11
11
|
export interface ToastHostProps {
|
|
12
12
|
readonly toast: ToastController;
|
|
@@ -14,4 +14,6 @@ export interface ToastHostProps {
|
|
|
14
14
|
readonly termWidth: number;
|
|
15
15
|
readonly termHeight: number;
|
|
16
16
|
}
|
|
17
|
+
/** Full label with side padding — never clips the message body. */
|
|
18
|
+
export declare function toastLabel(level: ToastLevel, message: string): string;
|
|
17
19
|
export declare function ToastHost(props: ToastHostProps): ReactNode;
|
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "@opentui/react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @opentui/react */
|
|
3
3
|
/**
|
|
4
4
|
* Notification toasts — top-center, slide in / hold / slide out.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Solid message-chip style (no border): intro "AGENT MODE" plate (`theme.mode`)
|
|
7
|
+
* with white bold text. Roomier height + full message (no visual truncation).
|
|
8
8
|
*/
|
|
9
9
|
import { useEffect, useState } from "react";
|
|
10
10
|
import { TextAttributes } from "@opentui/core";
|
|
11
11
|
import { useToastState } from "../../state/use-toast.js";
|
|
12
12
|
import { TOAST_BOX_HEIGHT, toastAnimAt, } from "./toast-anim.js";
|
|
13
|
-
/** Soft elevated surface — slight whitish shade on near-black. */
|
|
14
|
-
const TOAST_SURFACE_DARK = "#1c2028";
|
|
15
|
-
const TOAST_SURFACE_LIGHT = "#f4f5f7";
|
|
16
13
|
/** Vertical gap between stacked toasts at rest. */
|
|
17
14
|
const TOAST_STACK_GAP = 1;
|
|
18
15
|
/** Animation repaint interval (~30 fps). */
|
|
19
16
|
const TICK_MS = 33;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const isDark = bg.startsWith("#0") ||
|
|
23
|
-
bg.startsWith("#1") ||
|
|
24
|
-
bg === "#0b0e14" ||
|
|
25
|
-
bg === "#11151c";
|
|
26
|
-
return isDark ? TOAST_SURFACE_DARK : TOAST_SURFACE_LIGHT;
|
|
27
|
-
}
|
|
17
|
+
/** Horizontal padding spaces each side of the label (larger readable chip). */
|
|
18
|
+
const H_PAD = 3;
|
|
28
19
|
function levelGlyph(level) {
|
|
29
20
|
switch (level) {
|
|
30
21
|
case "success":
|
|
@@ -37,30 +28,33 @@ function levelGlyph(level) {
|
|
|
37
28
|
return "·";
|
|
38
29
|
}
|
|
39
30
|
}
|
|
31
|
+
/** Full label with side padding — never clips the message body. */
|
|
32
|
+
export function toastLabel(level, message) {
|
|
33
|
+
const pad = " ".repeat(H_PAD);
|
|
34
|
+
return `${pad}${levelGlyph(level)} ${message}${pad}`;
|
|
35
|
+
}
|
|
40
36
|
function ToastPill(props) {
|
|
41
37
|
const { item, theme, top, left, width, visibility } = props;
|
|
42
38
|
if (visibility <= 0.02)
|
|
43
39
|
return null;
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
const textFg = theme.
|
|
47
|
-
const label =
|
|
48
|
-
// Approximate “fade” with DIM when sliding in/out — always keep BOLD.
|
|
40
|
+
// Same plate as intro "AGENT MODE" badge; white bold label.
|
|
41
|
+
const plate = theme.mode;
|
|
42
|
+
const textFg = theme.white;
|
|
43
|
+
const label = toastLabel(item.level, item.message);
|
|
49
44
|
const dim = visibility < 0.85;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
return (
|
|
45
|
+
const attrs = dim
|
|
46
|
+
? TextAttributes.BOLD | TextAttributes.DIM
|
|
47
|
+
: TextAttributes.BOLD;
|
|
48
|
+
// Vertical pad rows so the label sits centered in a taller chip.
|
|
49
|
+
const blank = " ".repeat(Math.max(1, width));
|
|
50
|
+
return (_jsxs("box", { style: {
|
|
56
51
|
position: "absolute",
|
|
57
52
|
top,
|
|
58
53
|
left,
|
|
59
54
|
width,
|
|
60
55
|
height: TOAST_BOX_HEIGHT,
|
|
61
56
|
zIndex: 1000,
|
|
62
|
-
|
|
63
|
-
backgroundColor: theme.background,
|
|
57
|
+
backgroundColor: plate,
|
|
64
58
|
flexDirection: "column",
|
|
65
59
|
justifyContent: "center",
|
|
66
60
|
alignItems: "stretch",
|
|
@@ -68,31 +62,18 @@ function ToastPill(props) {
|
|
|
68
62
|
paddingRight: 0,
|
|
69
63
|
paddingTop: 0,
|
|
70
64
|
paddingBottom: 0,
|
|
71
|
-
}, children: _jsx("
|
|
72
|
-
flexGrow: 1,
|
|
73
|
-
width: "100%",
|
|
74
|
-
minHeight: 1,
|
|
75
|
-
backgroundColor: surface,
|
|
76
|
-
flexDirection: "row",
|
|
77
|
-
// Vertical + horizontal center of the single label line.
|
|
78
|
-
alignItems: "center",
|
|
79
|
-
justifyContent: "center",
|
|
80
|
-
paddingLeft: 2,
|
|
81
|
-
paddingRight: 2,
|
|
82
|
-
}, children: _jsx("text", { selectable: false, content: label, style: {
|
|
65
|
+
}, children: [_jsx("text", { selectable: false, content: blank, style: { fg: plate, bg: plate, height: 1, width } }), _jsx("text", { selectable: false, content: label.padEnd(width).slice(0, width), style: {
|
|
83
66
|
fg: textFg,
|
|
84
|
-
bg:
|
|
67
|
+
bg: plate,
|
|
85
68
|
height: 1,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
} }) }) }));
|
|
69
|
+
width,
|
|
70
|
+
attributes: attrs,
|
|
71
|
+
} }), _jsx("text", { selectable: false, content: blank, style: { fg: plate, bg: plate, height: 1, width } })] }));
|
|
90
72
|
}
|
|
91
73
|
export function ToastHost(props) {
|
|
92
74
|
const { toast, theme, termWidth, termHeight } = props;
|
|
93
75
|
const items = useToastState(toast);
|
|
94
76
|
const [now, setNow] = useState(() => Date.now());
|
|
95
|
-
// Drive enter/hold/exit motion while any toast is alive.
|
|
96
77
|
useEffect(() => {
|
|
97
78
|
if (items.length === 0)
|
|
98
79
|
return;
|
|
@@ -102,24 +83,22 @@ export function ToastHost(props) {
|
|
|
102
83
|
}, [items.length > 0]);
|
|
103
84
|
if (items.length === 0)
|
|
104
85
|
return null;
|
|
105
|
-
// Wide enough for full messages
|
|
106
|
-
const maxWidth = Math.
|
|
107
|
-
// Newest on top of stack (drawn first in reverse so later paint on top).
|
|
86
|
+
// Wide enough for full messages; leave small terminal margins only.
|
|
87
|
+
const maxWidth = Math.max(24, Math.min(termWidth - 4, termWidth));
|
|
108
88
|
const ordered = [...items].reverse();
|
|
109
89
|
const maxStack = Math.max(1, Math.min(3, Math.floor((termHeight - 4) / (TOAST_BOX_HEIGHT + TOAST_STACK_GAP))));
|
|
110
90
|
const visible = ordered.slice(0, maxStack);
|
|
111
91
|
return (_jsx(_Fragment, { children: visible.map((item, index) => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
//
|
|
92
|
+
const label = toastLabel(item.level, item.message);
|
|
93
|
+
// Size chip to the full label — do not shrink/truncate for maxWidth
|
|
94
|
+
// unless the terminal is narrower than the text (then use full width).
|
|
95
|
+
const toastWidth = Math.min(maxWidth, Math.max(label.length, 16));
|
|
115
96
|
const left = Math.max(0, Math.floor((termWidth - toastWidth) / 2));
|
|
116
97
|
const anim = toastAnimAt(now - item.createdAt, item.durationMs);
|
|
117
98
|
if (anim.phase === "gone")
|
|
118
99
|
return null;
|
|
119
|
-
// Stack older toasts below the primary (rest) slot.
|
|
120
100
|
const stackOffset = index * (TOAST_BOX_HEIGHT + TOAST_STACK_GAP);
|
|
121
101
|
const top = anim.top + stackOffset;
|
|
122
|
-
// Skip if fully above the viewport after stack offset.
|
|
123
102
|
if (top + TOAST_BOX_HEIGHT < 0)
|
|
124
103
|
return null;
|
|
125
104
|
return (_jsx(ToastPill, { item: item, theme: theme, top: top, left: left, width: toastWidth, visibility: anim.visibility }, item.id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-host.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/toast/toast-host.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAO/C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,WAAW,GACZ,MAAM,iBAAiB,CAAC;AASzB,
|
|
1
|
+
{"version":3,"file":"toast-host.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/toast/toast-host.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAO/C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,WAAW,GACZ,MAAM,iBAAiB,CAAC;AASzB,mDAAmD;AACnD,MAAM,eAAe,GAAG,CAAC,CAAC;AAE1B,4CAA4C;AAC5C,MAAM,OAAO,GAAG,EAAE,CAAC;AAEnB,+EAA+E;AAC/E,MAAM,KAAK,GAAG,CAAC,CAAC;AAEhB,SAAS,UAAU,CAAC,KAAiB;IACnC,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,SAAS;YACZ,OAAO,GAAG,CAAC;QACb,KAAK,MAAM;YACT,OAAO,GAAG,CAAC;QACb,KAAK,OAAO;YACV,OAAO,GAAG,CAAC;QACb;YACE,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAED,mEAAmE;AACnE,MAAM,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CAAC,CAAC;YAChE,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM;gBAAE,OAAO,IAAI,CAAC;YACvC,MAAM,WAAW,GAAG,KAAK,GAAG,CAAC,gBAAgB,GAAG,eAAe,CAAC,CAAC;YACjE,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,WAAW,CAAC;YACnC,IAAI,GAAG,GAAG,gBAAgB,GAAG,CAAC;gBAAE,OAAO,IAAI,CAAC;YAC5C,OAAO,CACL,KAAC,SAAS,IAER,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,IANtB,IAAI,CAAC,EAAE,CAOZ,CACH,CAAC;QACJ,CAAC,CAAC,GACD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -34,8 +34,11 @@ export declare const DEFAULT_TOAST_DURATION_MS = 2000;
|
|
|
34
34
|
export declare const TOAST_ENTER_MS = 200;
|
|
35
35
|
/** Slide-out back to top. */
|
|
36
36
|
export declare const TOAST_EXIT_MS = 200;
|
|
37
|
-
/**
|
|
38
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Safety cap only (pathological multi-KB dumps). Normal status lines are not
|
|
39
|
+
* truncated for display — host sizes the chip to the full message.
|
|
40
|
+
*/
|
|
41
|
+
export declare const MAX_TOAST_MESSAGE_CHARS = 400;
|
|
39
42
|
export declare function toastTotalLifetimeMs(holdMs: number): number;
|
|
40
43
|
export declare class ToastController {
|
|
41
44
|
private items;
|
|
@@ -13,8 +13,11 @@ export const TOAST_ENTER_MS = 200;
|
|
|
13
13
|
/** Slide-out back to top. */
|
|
14
14
|
export const TOAST_EXIT_MS = 200;
|
|
15
15
|
const MAX_VISIBLE_TOASTS = 3;
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Safety cap only (pathological multi-KB dumps). Normal status lines are not
|
|
18
|
+
* truncated for display — host sizes the chip to the full message.
|
|
19
|
+
*/
|
|
20
|
+
export const MAX_TOAST_MESSAGE_CHARS = 400;
|
|
18
21
|
const MAX_MESSAGE_CHARS = MAX_TOAST_MESSAGE_CHARS;
|
|
19
22
|
export function toastTotalLifetimeMs(holdMs) {
|
|
20
23
|
return TOAST_ENTER_MS + Math.max(0, holdMs) + TOAST_EXIT_MS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-controller.js","sourceRoot":"","sources":["../../../src/tui-v2/controllers/toast-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,oDAAoD;AACpD,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,yBAAyB;AACzB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,6BAA6B;AAC7B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B
|
|
1
|
+
{"version":3,"file":"toast-controller.js","sourceRoot":"","sources":["../../../src/tui-v2/controllers/toast-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,oDAAoD;AACpD,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,yBAAyB;AACzB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,6BAA6B;AAC7B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAElD,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,OAAO,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC;AAC9D,CAAC;AAED,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IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,OAAO;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,KAAK;QACH,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QAC9D,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QACpC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,OAAO;QACL,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAEO,IAAI;QACV,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS;YAAE,QAAQ,EAAE,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* AUTO-GENERATED by scripts/sync-version.mjs — do not edit by hand.
|
|
3
3
|
* Source of truth: package.json "version".
|
|
4
4
|
*/
|
|
5
|
-
export declare const VERSION: "3.8.
|
|
6
|
-
export declare const VERSION_TAG: "v3.8.
|
|
5
|
+
export declare const VERSION: "3.8.18";
|
|
6
|
+
export declare const VERSION_TAG: "v3.8.18";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* AUTO-GENERATED by scripts/sync-version.mjs — do not edit by hand.
|
|
3
3
|
* Source of truth: package.json "version".
|
|
4
4
|
*/
|
|
5
|
-
export const VERSION = "3.8.
|
|
6
|
-
export const VERSION_TAG = "v3.8.
|
|
5
|
+
export const VERSION = "3.8.18";
|
|
6
|
+
export const VERSION_TAG = "v3.8.18";
|
|
7
7
|
//# sourceMappingURL=version.generated.js.map
|
package/package.json
CHANGED