@assistant-ui/react 0.10.10 → 0.10.12
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/primitives/composer/ComposerAttachmentDropzone.d.ts +13 -0
- package/dist/primitives/composer/ComposerAttachmentDropzone.d.ts.map +1 -0
- package/dist/primitives/composer/ComposerAttachmentDropzone.js +56 -0
- package/dist/primitives/composer/ComposerAttachmentDropzone.js.map +1 -0
- package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js +10 -7
- package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
- package/dist/tests/setup.js +8 -8
- package/dist/tests/setup.js.map +1 -1
- package/package.json +9 -9
- package/src/primitives/composer/ComposerAttachmentDropzone.tsx +70 -0
- package/src/primitives/thread/useThreadViewportAutoScroll.tsx +11 -8
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from "react";
|
2
|
+
export declare namespace ComposerAttachmentDropzonePrimitive {
|
3
|
+
type Element = HTMLDivElement;
|
4
|
+
type Props = React.HTMLAttributes<HTMLDivElement> & {
|
5
|
+
asChild?: boolean | undefined;
|
6
|
+
disabled?: boolean | undefined;
|
7
|
+
};
|
8
|
+
}
|
9
|
+
export declare const ComposerAttachmentDropzone: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
10
|
+
asChild?: boolean | undefined;
|
11
|
+
disabled?: boolean | undefined;
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
13
|
+
//# sourceMappingURL=ComposerAttachmentDropzone.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ComposerAttachmentDropzone.d.ts","sourceRoot":"","sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,yBAAiB,mCAAmC,CAAC;IACnD,KAAY,OAAO,GAAG,cAAc,CAAC;IACrC,KAAY,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;QACzD,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC9B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAChC,CAAC;CACH;AAED,eAAO,MAAM,0BAA0B;cALzB,OAAO,GAAG,SAAS;eAClB,OAAO,GAAG,SAAS;wCAyDhC,CAAC"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
// src/primitives/composer/ComposerAttachmentDropzone.tsx
|
2
|
+
import { forwardRef, useCallback, useState } from "react";
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
4
|
+
import { useComposerRuntime } from "../../context/index.js";
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
6
|
+
var ComposerAttachmentDropzone = forwardRef(({ disabled, asChild = false, children, ...rest }, ref) => {
|
7
|
+
const [isDragging, setIsDragging] = useState(false);
|
8
|
+
const composerRuntime = useComposerRuntime();
|
9
|
+
const handleDrag = useCallback(
|
10
|
+
(e) => {
|
11
|
+
if (disabled) return;
|
12
|
+
e.preventDefault();
|
13
|
+
e.stopPropagation();
|
14
|
+
setIsDragging(e.type === "dragenter" || e.type === "dragover");
|
15
|
+
},
|
16
|
+
[disabled]
|
17
|
+
);
|
18
|
+
const handleDrop = useCallback(
|
19
|
+
async (e) => {
|
20
|
+
if (disabled) return;
|
21
|
+
e.preventDefault();
|
22
|
+
e.stopPropagation();
|
23
|
+
setIsDragging(false);
|
24
|
+
for (const file of e.dataTransfer.files) {
|
25
|
+
try {
|
26
|
+
await composerRuntime.addAttachment(file);
|
27
|
+
} catch (error) {
|
28
|
+
console.error("Failed to add attachment:", error);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
},
|
32
|
+
[disabled, composerRuntime]
|
33
|
+
);
|
34
|
+
const dragProps = {
|
35
|
+
onDragEnter: handleDrag,
|
36
|
+
onDragOver: handleDrag,
|
37
|
+
onDragLeave: handleDrag,
|
38
|
+
onDrop: handleDrop
|
39
|
+
};
|
40
|
+
const Comp = asChild ? Slot : "div";
|
41
|
+
return /* @__PURE__ */ jsx(
|
42
|
+
Comp,
|
43
|
+
{
|
44
|
+
...isDragging ? { "data-dragging": "true" } : null,
|
45
|
+
ref,
|
46
|
+
...dragProps,
|
47
|
+
...rest,
|
48
|
+
children
|
49
|
+
}
|
50
|
+
);
|
51
|
+
});
|
52
|
+
ComposerAttachmentDropzone.displayName = "ComposerPrimitive.AttachmentDropzone";
|
53
|
+
export {
|
54
|
+
ComposerAttachmentDropzone
|
55
|
+
};
|
56
|
+
//# sourceMappingURL=ComposerAttachmentDropzone.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"sourcesContent":["import { forwardRef, useCallback, useState } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport React from \"react\";\nimport { useComposerRuntime } from \"../../context\";\n\nexport namespace ComposerAttachmentDropzonePrimitive {\n export type Element = HTMLDivElement;\n export type Props = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean | undefined;\n disabled?: boolean | undefined;\n };\n}\n\nexport const ComposerAttachmentDropzone = forwardRef<\n HTMLDivElement,\n ComposerAttachmentDropzonePrimitive.Props\n>(({ disabled, asChild = false, children, ...rest }, ref) => {\n const [isDragging, setIsDragging] = useState(false);\n const composerRuntime = useComposerRuntime();\n\n const handleDrag = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n e.stopPropagation();\n setIsDragging(e.type === \"dragenter\" || e.type === \"dragover\");\n },\n [disabled],\n );\n\n const handleDrop = useCallback(\n async (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n e.stopPropagation();\n setIsDragging(false);\n for (const file of e.dataTransfer.files) {\n try {\n await composerRuntime.addAttachment(file);\n } catch (error) {\n console.error(\"Failed to add attachment:\", error);\n }\n }\n },\n [disabled, composerRuntime],\n );\n\n const dragProps = {\n onDragEnter: handleDrag,\n onDragOver: handleDrag,\n onDragLeave: handleDrag,\n onDrop: handleDrop,\n };\n\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp\n {...(isDragging ? { \"data-dragging\": \"true\" } : null)}\n ref={ref}\n {...dragProps}\n {...rest}\n >\n {children}\n </Comp>\n );\n});\n\nComposerAttachmentDropzone.displayName = \"ComposerPrimitive.AttachmentDropzone\";\n"],"mappings":";AAAA,SAAS,YAAY,aAAa,gBAAgB;AAElD,SAAS,YAAY;AAErB,SAAS,0BAA0B;AAsD/B;AA5CG,IAAM,6BAA6B,WAGxC,CAAC,EAAE,UAAU,UAAU,OAAO,UAAU,GAAG,KAAK,GAAG,QAAQ;AAC3D,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,kBAAkB,mBAAmB;AAE3C,QAAM,aAAa;AAAA,IACjB,CAAC,MAAuB;AACtB,UAAI,SAAU;AACd,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,oBAAc,EAAE,SAAS,eAAe,EAAE,SAAS,UAAU;AAAA,IAC/D;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,aAAa;AAAA,IACjB,OAAO,MAAuB;AAC5B,UAAI,SAAU;AACd,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,oBAAc,KAAK;AACnB,iBAAW,QAAQ,EAAE,aAAa,OAAO;AACvC,YAAI;AACF,gBAAM,gBAAgB,cAAc,IAAI;AAAA,QAC1C,SAAS,OAAO;AACd,kBAAQ,MAAM,6BAA6B,KAAK;AAAA,QAClD;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,UAAU,eAAe;AAAA,EAC5B;AAEA,QAAM,YAAY;AAAA,IAChB,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,QAAQ;AAAA,EACV;AAEA,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAI,aAAa,EAAE,iBAAiB,OAAO,IAAI;AAAA,MAChD;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,2BAA2B,cAAc;","names":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useThreadViewportAutoScroll.d.ts","sourceRoot":"","sources":["../../../src/primitives/thread/useThreadViewportAutoScroll.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,
|
1
|
+
{"version":3,"file":"useThreadViewportAutoScroll.d.ts","sourceRoot":"","sources":["../../../src/primitives/thread/useThreadViewportAutoScroll.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAkC,MAAM,OAAO,CAAC;AAQpE,yBAAiB,2BAA2B,CAAC;IAC3C,KAAY,OAAO,GAAG;QACpB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;CACH;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,SAAS,WAAW,EAAE,iBAEvE,2BAA2B,CAAC,OAAO,KAAG,WAAW,CAAC,QAAQ,CA6E5D,CAAC"}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
// src/primitives/thread/useThreadViewportAutoScroll.tsx
|
4
4
|
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
5
|
-
import { useEffect, useRef } from "react";
|
5
|
+
import { useCallback, useEffect, useRef } from "react";
|
6
6
|
import { useThreadRuntime } from "../../context/react/ThreadContext.js";
|
7
7
|
import { useOnResizeContent } from "../../utils/hooks/useOnResizeContent.js";
|
8
8
|
import { useOnScrollToBottom } from "../../utils/hooks/useOnScrollToBottom.js";
|
@@ -16,12 +16,15 @@ var useThreadViewportAutoScroll = ({
|
|
16
16
|
const threadViewportStore = useThreadViewportStore();
|
17
17
|
const lastScrollTop = useRef(0);
|
18
18
|
const isScrollingToBottomRef = useRef(false);
|
19
|
-
const scrollToBottom = (
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
const scrollToBottom = useCallback(
|
20
|
+
(behavior) => {
|
21
|
+
const div = divRef.current;
|
22
|
+
if (!div || !autoScroll) return;
|
23
|
+
isScrollingToBottomRef.current = true;
|
24
|
+
div.scrollTo({ top: div.scrollHeight, behavior });
|
25
|
+
},
|
26
|
+
[autoScroll]
|
27
|
+
);
|
25
28
|
const handleScroll = () => {
|
26
29
|
const div = divRef.current;
|
27
30
|
if (!div) return;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/thread/useThreadViewportAutoScroll.tsx"],"sourcesContent":["\"use client\";\n\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { RefCallback, useEffect, useRef } from \"react\";\nimport { useThreadRuntime } from \"../../context/react/ThreadContext\";\nimport { useOnResizeContent } from \"../../utils/hooks/useOnResizeContent\";\nimport { useOnScrollToBottom } from \"../../utils/hooks/useOnScrollToBottom\";\nimport { useManagedRef } from \"../../utils/hooks/useManagedRef\";\nimport { writableStore } from \"../../context/ReadonlyStore\";\nimport { useThreadViewportStore } from \"../../context/react/ThreadViewportContext\";\n\nexport namespace useThreadViewportAutoScroll {\n export type Options = {\n autoScroll?: boolean | undefined;\n };\n}\n\nexport const useThreadViewportAutoScroll = <TElement extends HTMLElement>({\n autoScroll = true,\n}: useThreadViewportAutoScroll.Options): RefCallback<TElement> => {\n const divRef = useRef<TElement>(null);\n\n const threadViewportStore = useThreadViewportStore();\n\n const lastScrollTop = useRef<number>(0);\n\n // bug: when ScrollToBottom's button changes its disabled state, the scroll stops\n // fix: delay the state change until the scroll is done\n const isScrollingToBottomRef = useRef(false);\n\n const scrollToBottom = (behavior: ScrollBehavior) => {\n
|
1
|
+
{"version":3,"sources":["../../../src/primitives/thread/useThreadViewportAutoScroll.tsx"],"sourcesContent":["\"use client\";\n\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { RefCallback, useCallback, useEffect, useRef } from \"react\";\nimport { useThreadRuntime } from \"../../context/react/ThreadContext\";\nimport { useOnResizeContent } from \"../../utils/hooks/useOnResizeContent\";\nimport { useOnScrollToBottom } from \"../../utils/hooks/useOnScrollToBottom\";\nimport { useManagedRef } from \"../../utils/hooks/useManagedRef\";\nimport { writableStore } from \"../../context/ReadonlyStore\";\nimport { useThreadViewportStore } from \"../../context/react/ThreadViewportContext\";\n\nexport namespace useThreadViewportAutoScroll {\n export type Options = {\n autoScroll?: boolean | undefined;\n };\n}\n\nexport const useThreadViewportAutoScroll = <TElement extends HTMLElement>({\n autoScroll = true,\n}: useThreadViewportAutoScroll.Options): RefCallback<TElement> => {\n const divRef = useRef<TElement>(null);\n\n const threadViewportStore = useThreadViewportStore();\n\n const lastScrollTop = useRef<number>(0);\n\n // bug: when ScrollToBottom's button changes its disabled state, the scroll stops\n // fix: delay the state change until the scroll is done\n const isScrollingToBottomRef = useRef(false);\n\n const scrollToBottom = useCallback(\n (behavior: ScrollBehavior) => {\n const div = divRef.current;\n if (!div || !autoScroll) return;\n\n isScrollingToBottomRef.current = true;\n div.scrollTo({ top: div.scrollHeight, behavior });\n },\n [autoScroll],\n );\n\n const handleScroll = () => {\n const div = divRef.current;\n if (!div) return;\n\n const isAtBottom = threadViewportStore.getState().isAtBottom;\n const newIsAtBottom =\n div.scrollHeight - div.scrollTop <= div.clientHeight + 1; // TODO figure out why +1 is needed\n\n if (!newIsAtBottom && lastScrollTop.current < div.scrollTop) {\n // ignore scroll down\n } else {\n if (newIsAtBottom) {\n isScrollingToBottomRef.current = false;\n }\n\n if (newIsAtBottom !== isAtBottom) {\n writableStore(threadViewportStore).setState({\n isAtBottom: newIsAtBottom,\n });\n }\n }\n\n lastScrollTop.current = div.scrollTop;\n };\n\n const resizeRef = useOnResizeContent(() => {\n if (\n isScrollingToBottomRef.current ||\n threadViewportStore.getState().isAtBottom\n ) {\n scrollToBottom(\"instant\");\n }\n\n handleScroll();\n });\n\n const scrollRef = useManagedRef<HTMLElement>((el) => {\n el.addEventListener(\"scroll\", handleScroll);\n return () => {\n el.removeEventListener(\"scroll\", handleScroll);\n };\n });\n\n useOnScrollToBottom(() => {\n scrollToBottom(\"auto\");\n });\n\n // autoscroll on run start\n const threadRuntime = useThreadRuntime();\n useEffect(() => {\n return threadRuntime.unstable_on(\"run-start\", () => scrollToBottom(\"auto\"));\n }, [scrollToBottom, threadRuntime]);\n\n const autoScrollRef = useComposedRefs<TElement>(resizeRef, scrollRef, divRef);\n return autoScrollRef as RefCallback<TElement>;\n};\n"],"mappings":";;;AAEA,SAAS,uBAAuB;AAChC,SAAsB,aAAa,WAAW,cAAc;AAC5D,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAQhC,IAAM,8BAA8B,CAA+B;AAAA,EACxE,aAAa;AACf,MAAkE;AAChE,QAAM,SAAS,OAAiB,IAAI;AAEpC,QAAM,sBAAsB,uBAAuB;AAEnD,QAAM,gBAAgB,OAAe,CAAC;AAItC,QAAM,yBAAyB,OAAO,KAAK;AAE3C,QAAM,iBAAiB;AAAA,IACrB,CAAC,aAA6B;AAC5B,YAAM,MAAM,OAAO;AACnB,UAAI,CAAC,OAAO,CAAC,WAAY;AAEzB,6BAAuB,UAAU;AACjC,UAAI,SAAS,EAAE,KAAK,IAAI,cAAc,SAAS,CAAC;AAAA,IAClD;AAAA,IACA,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,eAAe,MAAM;AACzB,UAAM,MAAM,OAAO;AACnB,QAAI,CAAC,IAAK;AAEV,UAAM,aAAa,oBAAoB,SAAS,EAAE;AAClD,UAAM,gBACJ,IAAI,eAAe,IAAI,aAAa,IAAI,eAAe;AAEzD,QAAI,CAAC,iBAAiB,cAAc,UAAU,IAAI,WAAW;AAAA,IAE7D,OAAO;AACL,UAAI,eAAe;AACjB,+BAAuB,UAAU;AAAA,MACnC;AAEA,UAAI,kBAAkB,YAAY;AAChC,sBAAc,mBAAmB,EAAE,SAAS;AAAA,UAC1C,YAAY;AAAA,QACd,CAAC;AAAA,MACH;AAAA,IACF;AAEA,kBAAc,UAAU,IAAI;AAAA,EAC9B;AAEA,QAAM,YAAY,mBAAmB,MAAM;AACzC,QACE,uBAAuB,WACvB,oBAAoB,SAAS,EAAE,YAC/B;AACA,qBAAe,SAAS;AAAA,IAC1B;AAEA,iBAAa;AAAA,EACf,CAAC;AAED,QAAM,YAAY,cAA2B,CAAC,OAAO;AACnD,OAAG,iBAAiB,UAAU,YAAY;AAC1C,WAAO,MAAM;AACX,SAAG,oBAAoB,UAAU,YAAY;AAAA,IAC/C;AAAA,EACF,CAAC;AAED,sBAAoB,MAAM;AACxB,mBAAe,MAAM;AAAA,EACvB,CAAC;AAGD,QAAM,gBAAgB,iBAAiB;AACvC,YAAU,MAAM;AACd,WAAO,cAAc,YAAY,aAAa,MAAM,eAAe,MAAM,CAAC;AAAA,EAC5E,GAAG,CAAC,gBAAgB,aAAa,CAAC;AAElC,QAAM,gBAAgB,gBAA0B,WAAW,WAAW,MAAM;AAC5E,SAAO;AACT;","names":[]}
|
package/dist/tests/setup.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
1
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/chunks/vi.ClIskdbk.js
|
2
2
|
import { equals, iterableEquality, subsetEquality, JestExtend, JestChaiExpect, JestAsymmetricMatchers, GLOBAL_EXPECT, ASYMMETRIC_MATCHERS_OBJECT, getState, setState, addCustomEqualityTesters, customMatchers } from "@vitest/expect.js";
|
3
3
|
import { getCurrentTest } from "@vitest/runner.js";
|
4
4
|
import { getNames, getTestName } from "@vitest/runner/utils.js";
|
5
5
|
import * as chai$1 from "chai.js";
|
6
6
|
|
7
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
7
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/chunks/utils.CgTj3MsC.js
|
8
8
|
import { getSafeTimers } from "@vitest/utils.js";
|
9
9
|
var NAME_WORKER_STATE = "__vitest_worker__";
|
10
10
|
function getWorkerState() {
|
@@ -61,22 +61,22 @@ async function waitForImportsToResolve() {
|
|
61
61
|
await waitForImportsToResolve();
|
62
62
|
}
|
63
63
|
|
64
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
64
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/chunks/vi.ClIskdbk.js
|
65
65
|
import { getSafeTimers as getSafeTimers2, assertTypes, createSimpleStackTrace } from "@vitest/utils.js";
|
66
66
|
|
67
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
67
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
|
68
68
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
69
69
|
function getDefaultExportFromCjs(x) {
|
70
70
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
71
71
|
}
|
72
72
|
|
73
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
73
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/chunks/vi.ClIskdbk.js
|
74
74
|
import { stripSnapshotIndentation, addSerializer, SnapshotClient } from "@vitest/snapshot.js";
|
75
75
|
import "@vitest/utils/error.js";
|
76
76
|
import { fn, spyOn, mocks, isMockFunction } from "@vitest/spy.js";
|
77
77
|
import { parseSingleStack } from "@vitest/utils/source-map.js";
|
78
78
|
|
79
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
79
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/chunks/date.CDOsz-HY.js
|
80
80
|
var RealDate = Date;
|
81
81
|
var now = null;
|
82
82
|
var MockDate = class _MockDate extends RealDate {
|
@@ -129,7 +129,7 @@ function resetDate() {
|
|
129
129
|
globalThis.Date = RealDate;
|
130
130
|
}
|
131
131
|
|
132
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
132
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/chunks/vi.ClIskdbk.js
|
133
133
|
var unsupported = [
|
134
134
|
"matchSnapshot",
|
135
135
|
"toMatchSnapshot",
|
@@ -2953,7 +2953,7 @@ function getImporter(name) {
|
|
2953
2953
|
return stack?.file || "";
|
2954
2954
|
}
|
2955
2955
|
|
2956
|
-
// ../../node_modules/.pnpm/vitest@3.1.
|
2956
|
+
// ../../node_modules/.pnpm/vitest@3.1.4_@types+debug@4.1.12_@types+node@22.15.21_jiti@2.4.2_lightningcss@1.30.1_tsx@4.19.4/node_modules/vitest/dist/index.js
|
2957
2957
|
import { expectTypeOf } from "expect-type.js";
|
2958
2958
|
import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from "@vitest/runner.js";
|
2959
2959
|
import * as chai2 from "chai.js";
|