@frontera-sdk/chat-ui 1.50.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.
Files changed (148) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +348 -0
  3. package/dist/af-DK_CjRn6-OPBHDTNZ.js +197 -0
  4. package/dist/agent-picker.d.ts +38 -0
  5. package/dist/agent-picker.js +8 -0
  6. package/dist/as-BPtSu6VN-O4ZZEAJG.js +11 -0
  7. package/dist/be-CrQ0smca-5HIE5K27.js +11 -0
  8. package/dist/bg-CrQqGwni-3IRVPZQ7.js +11 -0
  9. package/dist/bn-NCLZcWHi-XOZJFNIB.js +11 -0
  10. package/dist/ca-SUf6Y2Om-V6F2EBCA.js +38 -0
  11. package/dist/capture-NO5ZIGP6.js +1652 -0
  12. package/dist/chat.css +3555 -0
  13. package/dist/chat.d.ts +161 -0
  14. package/dist/chat.js +60498 -0
  15. package/dist/chunk-2KEBRV3W.js +191 -0
  16. package/dist/chunk-6BPHEBCF.js +639 -0
  17. package/dist/chunk-6HYPVNVA.js +25 -0
  18. package/dist/chunk-7ADM3CKD.js +10 -0
  19. package/dist/chunk-AFVU5VT6.js +5601 -0
  20. package/dist/chunk-BEJ3HQG4.js +93 -0
  21. package/dist/chunk-CCVPZVFK.js +28 -0
  22. package/dist/chunk-DGDHKMDB.js +10 -0
  23. package/dist/chunk-FXKXDR5K.js +2166 -0
  24. package/dist/chunk-GTQH7MPF.js +129 -0
  25. package/dist/chunk-I7SXWUAN.js +1258 -0
  26. package/dist/chunk-IQRPGFLI.js +234 -0
  27. package/dist/chunk-IXDM5R55.js +23 -0
  28. package/dist/chunk-JD6ETTXC.js +178 -0
  29. package/dist/chunk-OP4MLJDA.js +215 -0
  30. package/dist/chunk-PQZ2CS26.js +2315 -0
  31. package/dist/chunk-PR4QN5HX.js +38 -0
  32. package/dist/chunk-PUIVKDV5.js +271 -0
  33. package/dist/chunk-QSSFBZAS.js +6914 -0
  34. package/dist/chunk-RAKKA3WU.js +5896 -0
  35. package/dist/chunk-RB2Y4NYC.js +681 -0
  36. package/dist/chunk-VDZH5Z3K.js +72 -0
  37. package/dist/chunk-WMN6BPPS.js +49 -0
  38. package/dist/chunk-WO6DJLFE.js +10857 -0
  39. package/dist/chunk-X5E2DJVO.js +47634 -0
  40. package/dist/chunk-XJFTVKLW.js +2687 -0
  41. package/dist/chunk-ZS6PXIZP.js +187 -0
  42. package/dist/client.d.ts +89 -0
  43. package/dist/client.js +20 -0
  44. package/dist/composer.d.ts +23 -0
  45. package/dist/composer.js +89 -0
  46. package/dist/cop-C3sk0IUo-CIZA2H43.js +11 -0
  47. package/dist/credential.d.ts +75 -0
  48. package/dist/credential.js +3 -0
  49. package/dist/cs-CmAteokq-HAKEQPB4.js +17 -0
  50. package/dist/cu-CBUlrW6Y-QTZ6ZLA4.js +32 -0
  51. package/dist/cy-BBPa6z2x-MX6DGDNW.js +11 -0
  52. package/dist/da-CCDXfXtG-5YEOHMG3.js +11 -0
  53. package/dist/de-1901-CWoAOigE-63QFSF2A.js +11 -0
  54. package/dist/de-1996-BL6awyxG-R2PHKMAB.js +11 -0
  55. package/dist/de-ch-1901-hVThVHVb-JSDB53OZ.js +11 -0
  56. package/dist/el-monoton-D3aKqTz2-2V4OOFBB.js +11 -0
  57. package/dist/el-polyton-ogVWcTzh-3U7NGQMT.js +11 -0
  58. package/dist/en-gb-B7Al27b_-UKCBQFSU.js +21 -0
  59. package/dist/es-DcaaHPU_-NOBXSOZK.js +11 -0
  60. package/dist/esm-MHF25KDL.js +3 -0
  61. package/dist/et-B_spaleu-5UAYIW62.js +11 -0
  62. package/dist/eu-Ctv_kq9Z-V5DREOPN.js +11 -0
  63. package/dist/fi-RW5VB8Yp-YSXBK7LW.js +11 -0
  64. package/dist/fr-BC2onEz9-7KH5T76G.js +11 -0
  65. package/dist/frame.d.ts +59 -0
  66. package/dist/frame.js +111 -0
  67. package/dist/fur-AC12wySk-4PD2Y72H.js +11 -0
  68. package/dist/ga-Cn6LkudM-RRAAJT3N.js +58 -0
  69. package/dist/gl-DZGc-K_G-KYSXXTCY.js +11 -0
  70. package/dist/grc-DOlGgO8T-2HXBZVJ5.js +11 -0
  71. package/dist/gu-Bjl0l-cf-4CFSVZHZ.js +11 -0
  72. package/dist/header.d.ts +78 -0
  73. package/dist/header.js +18 -0
  74. package/dist/hi-DsAaTPCC-KMCFBWK7.js +11 -0
  75. package/dist/hr-DT1SBBes-X2TIX6EI.js +11 -0
  76. package/dist/hsb-DC_ITc1e-PXLERA7R.js +46 -0
  77. package/dist/hu-DVk7Y_ka-PJPVU54B.js +11 -0
  78. package/dist/hy-e995ysyO-MZBRFX52.js +11 -0
  79. package/dist/ia-Cr4TJH0c-D3O2FHGP.js +22 -0
  80. package/dist/id-DifDyWg9-MZ2BGHWI.js +58 -0
  81. package/dist/is-BT8UVRze-CZZCKEFI.js +11 -0
  82. package/dist/it-Bt_Meacx-T4Y5JYV6.js +11 -0
  83. package/dist/ka-jyoLzyDE-ES6EXZLW.js +11 -0
  84. package/dist/kmr-Cfwhwuff-TSW2R2KS.js +11 -0
  85. package/dist/kn-C6Lov-DP-B4BL47CE.js +11 -0
  86. package/dist/la-DuvHjUWw-6K7TFU6X.js +11 -0
  87. package/dist/la-x-classic-yTyAOQEt-YWTKMM2L.js +11 -0
  88. package/dist/la-x-liturgic-CXeQb4FY-B772L5E7.js +11 -0
  89. package/dist/lib-3ZKX25RJ.js +4511 -0
  90. package/dist/lt-BBe8DlDF-4YINVOZR.js +11 -0
  91. package/dist/lv-Q2BBHnzp-TMVQ3MX2.js +11 -0
  92. package/dist/message.d.ts +64 -0
  93. package/dist/message.js +18 -0
  94. package/dist/ml-2xLVYkVY-NGZLAPIN.js +11 -0
  95. package/dist/mn-cyrl-lHM4n0oC-DGBYYUT3.js +11 -0
  96. package/dist/mn-cyrl-x-lmc-3aetruI8-QHJABMOO.js +11 -0
  97. package/dist/mr-CjWJPVmH-X5UHV65O.js +11 -0
  98. package/dist/mul-ethi-D_CMSMEq-H7UMQSOQ.js +11 -0
  99. package/dist/nb-DI8u59ch-J4CAVI4Y.js +122 -0
  100. package/dist/new-session-Dw7JOgzu.d.ts +141 -0
  101. package/dist/new-session.d.ts +4 -0
  102. package/dist/new-session.js +10 -0
  103. package/dist/nl-BHQJ6Gvn-7BH55RA7.js +52 -0
  104. package/dist/nn-ntZvarUK-KKNCHHJ4.js +122 -0
  105. package/dist/no-B8ItS0F3-3ZXIRJ6U.js +120 -0
  106. package/dist/oauth-callback.d.ts +35 -0
  107. package/dist/oauth-callback.js +18 -0
  108. package/dist/oc-P_i3-xLA-XZM6E5YZ.js +11 -0
  109. package/dist/or-50rxpoq4-5VELAFMJ.js +11 -0
  110. package/dist/pa-C54UG8eN-WEJPMZ6Z.js +11 -0
  111. package/dist/parts.d.ts +49 -0
  112. package/dist/parts.js +106 -0
  113. package/dist/pdf-cover-thumbnail-inner-4N2Q5AAG.js +36 -0
  114. package/dist/pdf-deck-view-inner-FZVLAEQR.js +575 -0
  115. package/dist/pdf-document-view-inner-6DF54JWK.js +585 -0
  116. package/dist/pdf-viewer-inner-GPES3KG2.js +256 -0
  117. package/dist/pending-cards.d.ts +26 -0
  118. package/dist/pending-cards.js +9 -0
  119. package/dist/pi-B9cgjyG1-GD5ASDDU.js +11 -0
  120. package/dist/pl-9fg-ESVt-UMX7MCJM.js +32 -0
  121. package/dist/platform.css +4013 -0
  122. package/dist/pms-BRGfm5gS-SSE3AUW5.js +11 -0
  123. package/dist/pt-Cum2_NUC-W35JYVR4.js +11 -0
  124. package/dist/rm-C0MIK9N4-IWL4YTNT.js +11 -0
  125. package/dist/ro-0fmdH0HA-46WUTOYH.js +11 -0
  126. package/dist/ru-v4l-ayaq-BUGK6XCN.js +196 -0
  127. package/dist/sa-CKY9c_Vq-4KIJOI5Y.js +11 -0
  128. package/dist/sh-cyrl-BpCRFOmq-DSLQ4UY2.js +128 -0
  129. package/dist/sh-latn-sRy4Tuaj-UNQOR63V.js +128 -0
  130. package/dist/sk-_iOeDNrQ-NCTQKH25.js +17 -0
  131. package/dist/sl-DpiklF-D-6GG5TDVN.js +11 -0
  132. package/dist/sr-cyrl-Dpzrbd0W-4Q5226YJ.js +142 -0
  133. package/dist/sv-CFm5y56M-VTWNPZ7I.js +11 -0
  134. package/dist/ta-BcghgTbD-NRT35DW6.js +11 -0
  135. package/dist/te-B5Spl2Jk-5VE6CLN4.js +11 -0
  136. package/dist/th-DWX5iPSo-N5GMOQOP.js +11 -0
  137. package/dist/theme.d.ts +49 -0
  138. package/dist/theme.js +3 -0
  139. package/dist/tk-BMbKB10q-HGWWY5L3.js +11 -0
  140. package/dist/tr-CIHIuzqc-6ISBNYLV.js +11 -0
  141. package/dist/types-BDqLaBfH.d.ts +60 -0
  142. package/dist/uk-Dir3oxLs-YQ3QZRI4.js +11 -0
  143. package/dist/univer-workbook-BSSUE5TG.css +3555 -0
  144. package/dist/univer-workbook-N5IIN7CH.js +290849 -0
  145. package/dist/vega-chart-block-NQADYNWQ.js +2857 -0
  146. package/dist/zh-latn-pinyin-BdYb-Ey_-RB542AHF.js +11 -0
  147. package/package.json +137 -0
  148. package/src/styles.css +996 -0
@@ -0,0 +1,38 @@
1
+ 'use client';
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ };
17
+ var __export = (target, all) => {
18
+ for (var name in all)
19
+ __defProp(target, name, { get: all[name], enumerable: true });
20
+ };
21
+ var __copyProps = (to, from, except, desc) => {
22
+ if (from && typeof from === "object" || typeof from === "function") {
23
+ for (let key of __getOwnPropNames(from))
24
+ if (!__hasOwnProp.call(to, key) && key !== except)
25
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26
+ }
27
+ return to;
28
+ };
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
+ // If the importer is in node compatibility mode or this is not an ESM
31
+ // file that has been converted to a CommonJS file using a Babel-
32
+ // compatible transform (i.e. "__esModule" has not been set), then set
33
+ // "default" to the CommonJS "module.exports" for node compatibility.
34
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
+ mod
36
+ ));
37
+
38
+ export { __commonJS, __export, __require, __toESM };
@@ -0,0 +1,271 @@
1
+ 'use client';
2
+ import { useTranslation } from './chunk-QSSFBZAS.js';
3
+ import { Skeleton } from './chunk-GTQH7MPF.js';
4
+ import { useRef, useState, useEffect } from 'react';
5
+ import { jsx, jsxs } from 'react/jsx-runtime';
6
+
7
+ var ROOT_MARGIN = "600px";
8
+ function LazyThumb({
9
+ width,
10
+ height,
11
+ className,
12
+ children
13
+ }) {
14
+ const ref = useRef(null);
15
+ const [shown, setShown] = useState(false);
16
+ useEffect(() => {
17
+ if (shown) return;
18
+ const el = ref.current;
19
+ if (!el) return;
20
+ if (typeof IntersectionObserver === "undefined") {
21
+ setShown(true);
22
+ return;
23
+ }
24
+ const io = new IntersectionObserver(
25
+ (entries) => {
26
+ if (entries.some((e) => e.isIntersecting)) setShown(true);
27
+ },
28
+ { rootMargin: ROOT_MARGIN }
29
+ );
30
+ io.observe(el);
31
+ return () => io.disconnect();
32
+ }, [shown]);
33
+ return /* @__PURE__ */ jsx("div", { ref, style: { width, height }, className, children: shown ? children : null });
34
+ }
35
+
36
+ // src/vendor/ui/library/artifact-viewer/components/pdf-deck-zoom.ts
37
+ var DECK_ZOOM_LEVELS = [0.5, 0.75, 1, 1.25, 1.5, 2];
38
+ function resolveStageWidth({
39
+ zoom,
40
+ pageW,
41
+ pageH,
42
+ boxW,
43
+ boxH
44
+ }) {
45
+ if (pageW <= 0 || pageH <= 0) return 0;
46
+ if (zoom === "fit") {
47
+ if (boxW <= 0 || boxH <= 0) return 0;
48
+ const scale = Math.min(boxW / pageW, boxH / pageH);
49
+ return Math.max(1, Math.floor(pageW * scale));
50
+ }
51
+ return Math.max(1, Math.round(pageW * zoom));
52
+ }
53
+ function zoomPercent(stageWidth, pageW) {
54
+ if (stageWidth <= 0 || pageW <= 0) return null;
55
+ return Math.round(stageWidth / pageW * 100);
56
+ }
57
+ var SHEET_COLUMNS = 6;
58
+ var SHEET_ROWS = 10;
59
+ var DECK_INDICATORS = 5;
60
+ function isSpreadsheetFile(mimeType) {
61
+ return mimeType === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
62
+ }
63
+ function isPresentationFile(mimeType) {
64
+ return mimeType === "application/vnd.openxmlformats-officedocument.presentationml.presentation";
65
+ }
66
+ function isDocumentFile(mimeType) {
67
+ return mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || mimeType === "application/pdf";
68
+ }
69
+ function ArtifactSkeleton({
70
+ format = "markdown",
71
+ mimeType,
72
+ showChrome = true
73
+ }) {
74
+ const { t } = useTranslation();
75
+ const loadingLabel = t("deck.loading");
76
+ const sheet = format === "sheet" || format === "csv" || format === "file" && isSpreadsheetFile(mimeType);
77
+ const deck = format === "htmldeck" || format === "file" && isPresentationFile(mimeType);
78
+ const document = format === "pdf" || format === "file" && isDocumentFile(mimeType);
79
+ if (sheet) {
80
+ return /* @__PURE__ */ jsxs(
81
+ "div",
82
+ {
83
+ role: "status",
84
+ "aria-label": loadingLabel,
85
+ "data-artifact-skeleton": "sheet",
86
+ className: "flex h-full min-h-0 flex-col overflow-hidden bg-surface",
87
+ children: [
88
+ /* @__PURE__ */ jsxs("div", { className: "flex h-11 shrink-0 items-center gap-2 border-b border-border px-3", children: [
89
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-20" }),
90
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-16" }),
91
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-24" }),
92
+ /* @__PURE__ */ jsx("div", { className: "flex-1" }),
93
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-6" }),
94
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-6" })
95
+ ] }),
96
+ /* @__PURE__ */ jsxs("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b border-border px-3", children: [
97
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-8" }),
98
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-5 flex-1" })
99
+ ] }),
100
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-hidden p-3", children: /* @__PURE__ */ jsx(
101
+ "div",
102
+ {
103
+ className: "grid h-full min-w-[520px] content-start overflow-hidden rounded-md border border-border",
104
+ style: { gridTemplateColumns: `2.5rem repeat(${SHEET_COLUMNS}, minmax(5rem, 1fr))` },
105
+ children: Array.from({ length: (SHEET_ROWS + 1) * (SHEET_COLUMNS + 1) }, (_, index) => {
106
+ const row = Math.floor(index / (SHEET_COLUMNS + 1));
107
+ const column = index % (SHEET_COLUMNS + 1);
108
+ const header = row === 0 || column === 0;
109
+ return /* @__PURE__ */ jsx(
110
+ "div",
111
+ {
112
+ className: "flex h-8 items-center border-b border-r border-border p-2",
113
+ children: /* @__PURE__ */ jsx(
114
+ Skeleton,
115
+ {
116
+ className: header ? "h-2.5 w-1/2" : "h-2.5 w-4/5"
117
+ }
118
+ )
119
+ },
120
+ index
121
+ );
122
+ })
123
+ }
124
+ ) })
125
+ ]
126
+ }
127
+ );
128
+ }
129
+ if (deck) {
130
+ return /* @__PURE__ */ jsxs(
131
+ "div",
132
+ {
133
+ role: "status",
134
+ "aria-label": loadingLabel,
135
+ "data-artifact-skeleton": "deck",
136
+ className: "flex h-full min-h-0 w-full flex-1 flex-col self-stretch overflow-hidden bg-muted/30",
137
+ children: [
138
+ showChrome && /* @__PURE__ */ jsxs("div", { className: "flex h-10 shrink-0 items-center justify-end gap-2 border-b border-border px-3", children: [
139
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-14" }),
140
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-20" }),
141
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-6" })
142
+ ] }),
143
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1", children: [
144
+ /* @__PURE__ */ jsx("div", { className: "flex w-11 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-1.5", children: Array.from({ length: DECK_INDICATORS }, (_, index) => /* @__PURE__ */ jsx(
145
+ Skeleton,
146
+ {
147
+ className: "h-0.5 w-5 rounded-none"
148
+ },
149
+ index
150
+ )) }) }),
151
+ /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center justify-center p-3 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "aspect-video w-full max-w-4xl overflow-hidden rounded-md bg-surface p-[7%] shadow-sm", children: [
152
+ /* @__PURE__ */ jsx(Skeleton, { className: "mb-[5%] h-[7%] w-1/4" }),
153
+ /* @__PURE__ */ jsx(Skeleton, { className: "mb-[4%] h-[12%] w-4/5" }),
154
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[5%] w-2/3" }),
155
+ /* @__PURE__ */ jsxs("div", { className: "mt-[9%] grid h-[26%] grid-cols-3 gap-[4%]", children: [
156
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-full" }),
157
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-full" }),
158
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-full" })
159
+ ] })
160
+ ] }) })
161
+ ] })
162
+ ]
163
+ }
164
+ );
165
+ }
166
+ if (document) {
167
+ return /* @__PURE__ */ jsxs(
168
+ "div",
169
+ {
170
+ role: "status",
171
+ "aria-label": loadingLabel,
172
+ "data-artifact-skeleton": "document",
173
+ className: "flex h-full min-h-0 flex-col overflow-hidden bg-muted/30",
174
+ children: [
175
+ showChrome && /* @__PURE__ */ jsxs("div", { className: "flex h-10 shrink-0 items-center justify-end gap-2 border-b border-border px-3", children: [
176
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-16" }),
177
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-6" }),
178
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-6" })
179
+ ] }),
180
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-hidden p-6", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto min-h-full w-full max-w-2xl space-y-5 rounded-md bg-surface p-10 shadow-sm", children: [
181
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-3/5" }),
182
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-1/4" }),
183
+ /* @__PURE__ */ jsx("div", { className: "space-y-3 pt-5", children: ["w-full", "w-full", "w-5/6", "w-full", "w-11/12", "w-3/4"].map(
184
+ (width, index) => /* @__PURE__ */ jsx(Skeleton, { className: `h-3.5 ${width}` }, index)
185
+ ) }),
186
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-40 w-full" })
187
+ ] }) })
188
+ ]
189
+ }
190
+ );
191
+ }
192
+ if (format === "image") {
193
+ return /* @__PURE__ */ jsx(
194
+ "div",
195
+ {
196
+ role: "status",
197
+ "aria-label": loadingLabel,
198
+ "data-artifact-skeleton": "image",
199
+ className: "flex h-full min-h-0 items-center justify-center overflow-hidden bg-muted/30 p-5",
200
+ children: /* @__PURE__ */ jsx("div", { className: "w-full max-w-4xl rounded-lg bg-surface p-3 shadow-sm", children: /* @__PURE__ */ jsx(Skeleton, { className: "aspect-[4/3] w-full" }) })
201
+ }
202
+ );
203
+ }
204
+ if (format === "canvas") {
205
+ return /* @__PURE__ */ jsxs(
206
+ "div",
207
+ {
208
+ role: "status",
209
+ "aria-label": loadingLabel,
210
+ "data-artifact-skeleton": "canvas",
211
+ className: "flex h-full min-h-0 flex-col gap-4 overflow-hidden bg-muted/30 p-5",
212
+ children: [
213
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
214
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-40" }),
215
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
216
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-7" }),
217
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-7" })
218
+ ] })
219
+ ] }),
220
+ /* @__PURE__ */ jsxs("div", { className: "grid min-h-0 flex-1 grid-cols-2 gap-4", children: [
221
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-full" }),
222
+ /* @__PURE__ */ jsxs("div", { className: "grid min-h-0 grid-rows-2 gap-4", children: [
223
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-full" }),
224
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-full" })
225
+ ] })
226
+ ] })
227
+ ]
228
+ }
229
+ );
230
+ }
231
+ if (format === "file") {
232
+ return /* @__PURE__ */ jsx(
233
+ "div",
234
+ {
235
+ role: "status",
236
+ "aria-label": loadingLabel,
237
+ "data-artifact-skeleton": "file",
238
+ className: "flex h-full min-h-0 items-center justify-center bg-muted/30 p-6",
239
+ children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-sm flex-col items-center gap-4 rounded-lg border border-border bg-surface p-8 shadow-sm", children: [
240
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-16 rounded-full" }),
241
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-2/3" }),
242
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-24" }),
243
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full" })
244
+ ] })
245
+ }
246
+ );
247
+ }
248
+ return /* @__PURE__ */ jsx(
249
+ "div",
250
+ {
251
+ role: "status",
252
+ "aria-label": loadingLabel,
253
+ "data-artifact-skeleton": "document-editor",
254
+ className: "h-full min-h-0 overflow-hidden bg-surface p-6",
255
+ children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl space-y-5", children: [
256
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-3/5" }),
257
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/4" }),
258
+ /* @__PURE__ */ jsx("div", { className: "space-y-3 pt-5", children: ["w-full", "w-full", "w-3/4", "w-full", "w-5/6", "w-full", "w-2/3"].map(
259
+ (width, index) => /* @__PURE__ */ jsx(Skeleton, { className: `h-4 ${width}` }, index)
260
+ ) }),
261
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3 pt-6", children: [
262
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-2/5" }),
263
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }),
264
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4/5" })
265
+ ] })
266
+ ] })
267
+ }
268
+ );
269
+ }
270
+
271
+ export { ArtifactSkeleton, DECK_ZOOM_LEVELS, LazyThumb, resolveStageWidth, zoomPercent };