zudoku 0.66.6 → 0.66.7
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/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/components/Pagination.js +2 -2
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/index.d.ts +3 -0
- package/dist/lib/components/index.js +4 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/core/react-query.d.ts +1 -0
- package/dist/lib/core/react-query.js +2 -0
- package/dist/lib/core/react-query.js.map +1 -0
- package/dist/lib/oas/graphql/circular.d.ts +1 -0
- package/dist/lib/oas/graphql/circular.js +15 -8
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/circular.test.d.ts +1 -0
- package/dist/lib/oas/graphql/circular.test.js +152 -0
- package/dist/lib/oas/graphql/circular.test.js.map +1 -0
- package/dist/vite/config.js +2 -0
- package/dist/vite/config.js.map +1 -1
- package/lib/{ClaudeLogo-BpqHBMS8.js → ClaudeLogo-DHxJUhN_.js} +20 -20
- package/lib/ClaudeLogo-DHxJUhN_.js.map +1 -0
- package/lib/HydrationBoundary-CNF2ZV3E.js +601 -0
- package/lib/HydrationBoundary-CNF2ZV3E.js.map +1 -0
- package/lib/Input-Cx-GeKoF.js +22 -0
- package/lib/Input-Cx-GeKoF.js.map +1 -0
- package/lib/{MdxPage-CeFSxGb_.js → MdxPage-CD36PJ17.js} +7 -7
- package/lib/{MdxPage-CeFSxGb_.js.map → MdxPage-CD36PJ17.js.map} +1 -1
- package/lib/{Mermaid-COVtAqcZ.js → Mermaid-Koc3z8mU.js} +3 -3
- package/lib/{Mermaid-COVtAqcZ.js.map → Mermaid-Koc3z8mU.js.map} +1 -1
- package/lib/{OAuthErrorPage-XTPBOMN8.js → OAuthErrorPage-4mN5DA86.js} +23 -22
- package/lib/{OAuthErrorPage-XTPBOMN8.js.map → OAuthErrorPage-4mN5DA86.js.map} +1 -1
- package/lib/{OasProvider-BS4rdzZC.js → OasProvider-DSe-hk5Y.js} +3 -3
- package/lib/{OasProvider-BS4rdzZC.js.map → OasProvider-DSe-hk5Y.js.map} +1 -1
- package/lib/{OperationList-Dg0Nm1tg.js → OperationList-CaknPbvq.js} +32 -31
- package/lib/{OperationList-Dg0Nm1tg.js.map → OperationList-CaknPbvq.js.map} +1 -1
- package/lib/{RouteGuard-kCicqF3x.js → RouteGuard--A04ESy8.js} +3 -3
- package/lib/{RouteGuard-kCicqF3x.js.map → RouteGuard--A04ESy8.js.map} +1 -1
- package/lib/{SchemaList-DZKBH2WC.js → SchemaList-Dw3-CJPb.js} +7 -7
- package/lib/{SchemaList-DZKBH2WC.js.map → SchemaList-Dw3-CJPb.js.map} +1 -1
- package/lib/{SchemaView-DBaqV2yU.js → SchemaView-DyJkiQkD.js} +3 -3
- package/lib/{SchemaView-DBaqV2yU.js.map → SchemaView-DyJkiQkD.js.map} +1 -1
- package/lib/{SignUp-DNmOFbLD.js → SignUp-DRvN-8cq.js} +3 -3
- package/lib/{SignUp-DNmOFbLD.js.map → SignUp-DRvN-8cq.js.map} +1 -1
- package/lib/{SyntaxHighlight-C75W8uCn.js → SyntaxHighlight-klTH8c6-.js} +2 -2
- package/lib/{SyntaxHighlight-C75W8uCn.js.map → SyntaxHighlight-klTH8c6-.js.map} +1 -1
- package/lib/{Toc-ICilS65g.js → Toc-PbuF-u9x.js} +2 -2
- package/lib/{Toc-ICilS65g.js.map → Toc-PbuF-u9x.js.map} +1 -1
- package/lib/ZudokuContext-BZB1TWdT.js +387 -0
- package/lib/ZudokuContext-BZB1TWdT.js.map +1 -0
- package/lib/{circular-DleWPaPP.js → circular-DFquXeY2.js} +21 -19
- package/lib/{circular-DleWPaPP.js.map → circular-DFquXeY2.js.map} +1 -1
- package/lib/{createServer-nqMW9kro.js → createServer-BXZ0CAUn.js} +4 -4
- package/lib/{createServer-nqMW9kro.js.map → createServer-BXZ0CAUn.js.map} +1 -1
- package/lib/{errors-D2FbERKl.js → errors-rWHkzVTd.js} +2 -2
- package/lib/{errors-D2FbERKl.js.map → errors-rWHkzVTd.js.map} +1 -1
- package/lib/{firebase-Cn9CmB6h.js → firebase-BmGU1FuD.js} +17 -15
- package/lib/{firebase-Cn9CmB6h.js.map → firebase-BmGU1FuD.js.map} +1 -1
- package/lib/{hook-B2nmfmYN.js → hook-BGlHBdET.js} +2 -2
- package/lib/{hook-B2nmfmYN.js.map → hook-BGlHBdET.js.map} +1 -1
- package/lib/{index-D5NeW2z6.js → index-BDsEwofZ.js} +1709 -1707
- package/lib/index-BDsEwofZ.js.map +1 -0
- package/lib/{index-CSDW7CHl.js → index-BQB9hb6n.js} +151 -149
- package/lib/{index-CSDW7CHl.js.map → index-BQB9hb6n.js.map} +1 -1
- package/lib/{index-CC4L3gtM.js → index-DBjOT2H1.js} +3 -3
- package/lib/{index-CC4L3gtM.js.map → index-DBjOT2H1.js.map} +1 -1
- package/lib/{index-DSKBOdpT.js → index-DRBOFufT.js} +2 -2
- package/lib/{index-DSKBOdpT.js.map → index-DRBOFufT.js.map} +1 -1
- package/lib/{index.esm-B35e7P83.js → index.esm-Cx8B1YJQ.js} +2 -2
- package/lib/index.esm-Cx8B1YJQ.js.map +1 -0
- package/lib/{mutation-BOYnEDf6.js → mutation-BISOc7OM.js} +2 -2
- package/lib/{mutation-BOYnEDf6.js.map → mutation-BISOc7OM.js.map} +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/{Input-B6YcAPv-.js → useMutation-CFMGlAMW.js} +23 -40
- package/lib/useMutation-CFMGlAMW.js.map +1 -0
- package/lib/useSuspenseQuery-CSB_rVek.js +1226 -0
- package/lib/useSuspenseQuery-CSB_rVek.js.map +1 -0
- package/lib/zudoku.__internal.js +928 -1457
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +4 -4
- package/lib/zudoku.auth-openid.js +4 -4
- package/lib/zudoku.auth-supabase.js +4 -4
- package/lib/zudoku.components.js +21 -18
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +3 -3
- package/lib/zudoku.mermaid.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js +6 -5
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +23 -21
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +29 -28
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.react-query.js +440 -0
- package/lib/zudoku.react-query.js.map +1 -0
- package/package.json +5 -1
- package/src/lib/components/Pagination.tsx +4 -5
- package/src/lib/components/index.ts +4 -0
- package/src/lib/components/navigation/NavigationItem.tsx +9 -3
- package/src/lib/core/react-query.ts +1 -0
- package/src/lib/oas/graphql/circular.test.ts +186 -0
- package/src/lib/oas/graphql/circular.ts +22 -16
- package/lib/ClaudeLogo-BpqHBMS8.js.map +0 -1
- package/lib/Input-B6YcAPv-.js.map +0 -1
- package/lib/ZudokuContext-Ea7gxmGq.js +0 -1581
- package/lib/ZudokuContext-Ea7gxmGq.js.map +0 -1
- package/lib/index-D5NeW2z6.js.map +0 -1
- package/lib/index.esm-B35e7P83.js.map +0 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
CIRCULAR_REF,
|
|
4
|
+
handleCircularRefs,
|
|
5
|
+
SCHEMA_REF_PREFIX,
|
|
6
|
+
} from "./circular.js";
|
|
7
|
+
|
|
8
|
+
describe("handleCircularRefs", () => {
|
|
9
|
+
it("should return primitives unchanged", () => {
|
|
10
|
+
expect(handleCircularRefs(null)).toBe(null);
|
|
11
|
+
expect(handleCircularRefs(undefined)).toBe(undefined);
|
|
12
|
+
expect(handleCircularRefs(42)).toBe(42);
|
|
13
|
+
expect(handleCircularRefs("hello")).toBe("hello");
|
|
14
|
+
expect(handleCircularRefs(true)).toBe(true);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it("should handle simple objects without refs", () => {
|
|
18
|
+
const obj = { type: "string", description: "A string" };
|
|
19
|
+
const result = handleCircularRefs(obj);
|
|
20
|
+
expect(result).toEqual(obj);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("should handle arrays", () => {
|
|
24
|
+
const arr = [{ type: "string" }, { type: "number" }];
|
|
25
|
+
const result = handleCircularRefs(arr);
|
|
26
|
+
expect(result).toEqual(arr);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it("should detect true circular references via object identity", () => {
|
|
30
|
+
const obj: Record<string, unknown> = { type: "object" };
|
|
31
|
+
obj.self = obj;
|
|
32
|
+
|
|
33
|
+
const result = handleCircularRefs(obj);
|
|
34
|
+
expect(result.type).toBe("object");
|
|
35
|
+
expect(result.self).toContain(CIRCULAR_REF);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("should detect circular refs via __$ref path", () => {
|
|
39
|
+
const inner = { __$ref: "#/components/schemas/Node", type: "object" };
|
|
40
|
+
const obj = {
|
|
41
|
+
__$ref: "#/components/schemas/Node",
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
child: inner,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
(inner as Record<string, unknown>).properties = { parent: obj };
|
|
48
|
+
|
|
49
|
+
const result = handleCircularRefs(obj);
|
|
50
|
+
expect(result.properties.child).toBe(
|
|
51
|
+
`${SCHEMA_REF_PREFIX}#/components/schemas/Node`,
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Regression test for #1869
|
|
56
|
+
it("should NOT mark sibling refs to the same schema as circular", () => {
|
|
57
|
+
const timestampSchema1 = {
|
|
58
|
+
__$ref: "#/components/schemas/timestamp",
|
|
59
|
+
type: "string",
|
|
60
|
+
format: "date-time",
|
|
61
|
+
};
|
|
62
|
+
const timestampSchema2 = {
|
|
63
|
+
__$ref: "#/components/schemas/timestamp",
|
|
64
|
+
type: "string",
|
|
65
|
+
format: "date-time",
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const obj = {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
created_at: timestampSchema1,
|
|
72
|
+
updated_at: timestampSchema2,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const result = handleCircularRefs(obj);
|
|
77
|
+
|
|
78
|
+
expect(result.properties.created_at).toEqual({
|
|
79
|
+
__$ref: "#/components/schemas/timestamp",
|
|
80
|
+
type: "string",
|
|
81
|
+
format: "date-time",
|
|
82
|
+
});
|
|
83
|
+
expect(result.properties.updated_at).toEqual({
|
|
84
|
+
__$ref: "#/components/schemas/timestamp",
|
|
85
|
+
type: "string",
|
|
86
|
+
format: "date-time",
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it("should allow same ref path in different branches of the tree", () => {
|
|
91
|
+
const obj = {
|
|
92
|
+
type: "object",
|
|
93
|
+
properties: {
|
|
94
|
+
user: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {
|
|
97
|
+
id: { __$ref: "#/components/schemas/identifier", type: "string" },
|
|
98
|
+
name: { type: "string" },
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
post: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
id: { __$ref: "#/components/schemas/identifier", type: "string" },
|
|
105
|
+
title: { type: "string" },
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const result = handleCircularRefs(obj);
|
|
112
|
+
|
|
113
|
+
expect(result.properties.user.properties.id.type).toBe("string");
|
|
114
|
+
expect(result.properties.post.properties.id.type).toBe("string");
|
|
115
|
+
expect(result.properties.user.properties.id).not.toBe(
|
|
116
|
+
expect.stringContaining(SCHEMA_REF_PREFIX),
|
|
117
|
+
);
|
|
118
|
+
expect(result.properties.post.properties.id).not.toBe(
|
|
119
|
+
expect.stringContaining(SCHEMA_REF_PREFIX),
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it("should handle shared object instances (same object, multiple references)", () => {
|
|
124
|
+
const sharedSchema = { type: "string", description: "Shared" };
|
|
125
|
+
const obj = {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: { field1: sharedSchema, field2: sharedSchema },
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const result = handleCircularRefs(obj);
|
|
131
|
+
|
|
132
|
+
expect(result.properties.field1).toEqual({
|
|
133
|
+
type: "string",
|
|
134
|
+
description: "Shared",
|
|
135
|
+
});
|
|
136
|
+
expect(result.properties.field2).toEqual({
|
|
137
|
+
type: "string",
|
|
138
|
+
description: "Shared",
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("should handle nested arrays with refs", () => {
|
|
143
|
+
const obj = {
|
|
144
|
+
type: "object",
|
|
145
|
+
allOf: [
|
|
146
|
+
{ __$ref: "#/components/schemas/Base", type: "object" },
|
|
147
|
+
{ type: "object", properties: { extra: { type: "string" } } },
|
|
148
|
+
],
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const result = handleCircularRefs(obj);
|
|
152
|
+
|
|
153
|
+
expect(result.allOf[0]).toEqual({
|
|
154
|
+
__$ref: "#/components/schemas/Base",
|
|
155
|
+
type: "object",
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it("should deduplicate shared object instances with __$ref", () => {
|
|
160
|
+
const shared = { __$ref: "#/components/schemas/Foo", type: "string" };
|
|
161
|
+
const obj = { a: shared, b: shared };
|
|
162
|
+
const result = handleCircularRefs(obj);
|
|
163
|
+
|
|
164
|
+
expect(result.a).toEqual({
|
|
165
|
+
__$ref: "#/components/schemas/Foo",
|
|
166
|
+
type: "string",
|
|
167
|
+
});
|
|
168
|
+
expect(result.b).toBe(`${SCHEMA_REF_PREFIX}#/components/schemas/Foo`);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
it("should mark circular ref with property name from path", () => {
|
|
172
|
+
const parent: Record<string, unknown> = {
|
|
173
|
+
type: "object",
|
|
174
|
+
properties: {} as Record<string, unknown>,
|
|
175
|
+
};
|
|
176
|
+
const child: Record<string, unknown> = {
|
|
177
|
+
type: "object",
|
|
178
|
+
properties: { back: parent },
|
|
179
|
+
};
|
|
180
|
+
(parent.properties as Record<string, unknown>).child = child;
|
|
181
|
+
|
|
182
|
+
const result = handleCircularRefs(parent);
|
|
183
|
+
|
|
184
|
+
expect(result.properties.child.properties.back).toContain(CIRCULAR_REF);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
@@ -14,7 +14,7 @@ const OPENAPI_PROPS = new Set([
|
|
|
14
14
|
"oneOf",
|
|
15
15
|
]);
|
|
16
16
|
|
|
17
|
-
const handleCircularRefs = (
|
|
17
|
+
export const handleCircularRefs = (
|
|
18
18
|
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
19
19
|
obj: any,
|
|
20
20
|
visited = new WeakSet(),
|
|
@@ -49,8 +49,15 @@ const handleCircularRefs = (
|
|
|
49
49
|
|
|
50
50
|
visited.add(obj);
|
|
51
51
|
|
|
52
|
+
// Add refPath BEFORE recursing to detect cycles within this branch
|
|
53
|
+
// This will be removed after processing to allow siblings with the same ref
|
|
54
|
+
if (typeof refPath === "string") {
|
|
55
|
+
seenRefPaths.add(refPath);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
let result: RecordAny | RecordAny[];
|
|
52
59
|
if (Array.isArray(obj)) {
|
|
53
|
-
|
|
60
|
+
result = obj.map((item, index) =>
|
|
54
61
|
handleCircularRefs(
|
|
55
62
|
item,
|
|
56
63
|
visited,
|
|
@@ -59,24 +66,23 @@ const handleCircularRefs = (
|
|
|
59
66
|
seenRefPaths,
|
|
60
67
|
),
|
|
61
68
|
);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
seenRefPaths,
|
|
74
|
-
);
|
|
69
|
+
} else {
|
|
70
|
+
result = {};
|
|
71
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
72
|
+
result[key] = handleCircularRefs(
|
|
73
|
+
value,
|
|
74
|
+
visited,
|
|
75
|
+
refs,
|
|
76
|
+
[...path, key],
|
|
77
|
+
seenRefPaths,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
81
|
refs.set(obj, result);
|
|
77
82
|
|
|
83
|
+
// Remove refPath after processing so sibling refs aren't incorrectly marked
|
|
78
84
|
if (typeof refPath === "string") {
|
|
79
|
-
seenRefPaths.
|
|
85
|
+
seenRefPaths.delete(refPath);
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
return result;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClaudeLogo-BpqHBMS8.js","sources":["../src/lib/components/Pagination.tsx","../src/lib/plugins/markdown/assets/ChatGPTLogo.tsx","../src/lib/plugins/markdown/assets/ClaudeLogo.tsx"],"sourcesContent":["import { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\nimport { Link } from \"react-router\";\nimport { cn } from \"../util/cn.js\";\nimport { Button } from \"./index.js\";\n\nexport const Pagination = ({\n prev,\n next,\n className,\n}: {\n prev: { to: string; label: string } | undefined;\n next: { to: string; label: string } | undefined;\n className?: string;\n}) => {\n const linkClass =\n \"group transition-all p-5 space-x-1 rtl:space-x-reverse transition-all hover:text-foreground\";\n\n return (\n <div\n className={cn(\n \"flex -mx-4 text-muted-foreground font-semibold\",\n prev ? \"justify-between\" : \"justify-end\",\n className,\n )}\n data-pagefind-ignore=\"all\"\n >\n {prev && (\n <Button variant=\"ghost\" asChild>\n <Link to={prev.to} relative=\"path\" className={linkClass}>\n <ArrowLeftIcon size={14} strokeWidth={2.5} />\n <span className=\"text-lg truncate\">{prev.label}</span>\n </Link>\n </Button>\n )}\n {next && (\n <Button variant=\"ghost\" asChild>\n <Link to={next.to} relative=\"path\" className={linkClass}>\n <span className=\"text-lg truncate\">{next.label}</span>\n <ArrowRightIcon size={14} strokeWidth={2.5} />\n </Link>\n </Button>\n )}\n </div>\n );\n};\n","import type { SVGProps } from \"react\";\n\nexport const ChatGPTLogo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 320\" {...props}>\n <title>ChatGPT</title>\n <path\n fill=\"currentColor\"\n d=\"M297.06 130.97a79.712 79.712 0 0 0-6.85-65.48c-17.46-30.4-52.56-46.04-86.84-38.68A79.747 79.747 0 0 0 143.24 0C108.2-.08 77.11 22.48 66.33 55.82a79.754 79.754 0 0 0-53.31 38.67c-17.59 30.32-13.58 68.54 9.92 94.54a79.712 79.712 0 0 0 6.85 65.48c17.46 30.4 52.56 46.04 86.84 38.68a79.687 79.687 0 0 0 60.13 26.8c35.06.09 66.16-22.49 76.94-55.86a79.754 79.754 0 0 0 53.31-38.67c17.57-30.32 13.55-68.51-9.94-94.51zM176.78 299.08a59.77 59.77 0 0 1-38.39-13.88c.49-.26 1.34-.73 1.89-1.07l63.72-36.8a10.36 10.36 0 0 0 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zM47.94 244.05a59.71 59.71 0 0 1-7.15-40.18c.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83L129.87 266c-28.69 16.52-65.33 6.7-81.92-21.95zM31.17 104.96c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91L118.44 224c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94a59.94 59.94 0 0 1-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8a10.375 10.375 0 0 0-10.47 0l-77.79 44.92V92c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22a59.95 59.95 0 0 1 7.15 40.1zm-168.51 55.43-26.94-15.55a.943.943 0 0 1-.52-.74V80.86c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07L116 72.67a10.344 10.344 0 0 0-5.24 9.06l-.04 89.79zM125.35 140 160 119.99l34.65 20V180L160 200l-34.65-20z\"\n />\n </svg>\n);\n","import type { SVGProps } from \"react\";\n\nexport const ClaudeLogo = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <title>Claude</title>\n <path\n fill=\"#D97757\"\n d=\"m4.709 15.955 4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 0 1-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312z\"\n />\n </svg>\n);\n"],"names":["Pagination","prev","next","className","linkClass","jsxs","cn","jsx","Button","Link","ArrowLeftIcon","ArrowRightIcon","ChatGPTLogo","props","ClaudeLogo"],"mappings":";;;;;AAKO,MAAMA,IAAa,CAAC;AAAA,EACzB,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AACF,MAIM;AACJ,QAAMC,IACJ;AAEF,SACEC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAA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A,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;AAAA,IACL,UAAS;AAAA,IACT,SAAQ;AAAA,IACP,GAAGQ;AAAA,IAEJ,UAAA;AAAA,MAAAN,gBAAAA,EAAAA,IAAC,WAAM,UAAA,SAAA,CAAM;AAAA,MACbA,gBAAAA,EAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IACJ;AAAA,EAAA;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input-B6YcAPv-.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.90.12/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/.pnpm/@tanstack+react-query@5.90.12_react@19.2.3/node_modules/@tanstack/react-query/build/modern/useMutation.js","../src/lib/ui/Input.tsx"],"sourcesContent":["// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { hashKey, shallowEqualObjects } from \"./utils.js\";\nvar MutationObserver = class extends Subscribable {\n #client;\n #currentResult = void 0;\n #currentMutation;\n #mutateOptions;\n constructor(client, options) {\n super();\n this.#client = client;\n this.setOptions(options);\n this.bindMethods();\n this.#updateResult();\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n this.options = this.#client.defaultMutationOptions(options);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: this.#currentMutation,\n observer: this\n });\n }\n if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {\n this.reset();\n } else if (this.#currentMutation?.state.status === \"pending\") {\n this.#currentMutation.setOptions(this.options);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#currentMutation?.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n this.#updateResult();\n this.#notify(action);\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n reset() {\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = void 0;\n this.#updateResult();\n this.#notify();\n }\n mutate(variables, options) {\n this.#mutateOptions = options;\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n this.#currentMutation.addObserver(this);\n return this.#currentMutation.execute(variables);\n }\n #updateResult() {\n const state = this.#currentMutation?.state ?? getDefaultState();\n this.#currentResult = {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n };\n }\n #notify(action) {\n notifyManager.batch(() => {\n if (this.#mutateOptions && this.hasListeners()) {\n const variables = this.#currentResult.variables;\n const onMutateResult = this.#currentResult.context;\n const context = {\n client: this.#client,\n meta: this.options.meta,\n mutationKey: this.options.mutationKey\n };\n if (action?.type === \"success\") {\n this.#mutateOptions.onSuccess?.(\n action.data,\n variables,\n onMutateResult,\n context\n );\n this.#mutateOptions.onSettled?.(\n action.data,\n null,\n variables,\n onMutateResult,\n context\n );\n } else if (action?.type === \"error\") {\n this.#mutateOptions.onError?.(\n action.error,\n variables,\n onMutateResult,\n context\n );\n this.#mutateOptions.onSettled?.(\n void 0,\n action.error,\n variables,\n onMutateResult,\n context\n );\n }\n }\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n });\n }\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\n\n// src/useMutation.ts\nimport * as React from \"react\";\nimport {\n MutationObserver,\n noop,\n notifyManager,\n shouldThrowError\n} from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction useMutation(options, queryClient) {\n const client = useQueryClient(queryClient);\n const [observer] = React.useState(\n () => new MutationObserver(\n client,\n options\n )\n );\n React.useEffect(() => {\n observer.setOptions(options);\n }, [observer, options]);\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n const mutate = React.useCallback(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop);\n },\n [observer]\n );\n if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {\n throw result.error;\n }\n return { ...result, mutate, mutateAsync: result.mutate };\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map","import * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\ntype InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"names":["MutationObserver","Subscribable","#client","#currentResult","#currentMutation","#mutateOptions","client","options","#updateResult","prevOptions","shallowEqualObjects","hashKey","action","#notify","variables","state","getDefaultState","notifyManager","onMutateResult","context","listener","useMutation","queryClient","useQueryClient","observer","React","result","onStoreChange","mutate","mutateOptions","noop","shouldThrowError","Input","className","type","props","ref","jsx","cn"],"mappings":";;;;;AAKA,IAAIA,IAAmB,cAAcC,EAAa;AAAA,EAChDC;AAAA,EACAC,KAAiB;AAAA,EACjBC;AAAA,EACAC;AAAA,EACA,YAAYC,GAAQC,GAAS;AAC3B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