@arbidocs/react 0.4.55 → 0.4.56

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 (49) hide show
  1. package/dist/PdfViewer-bQH9yxFg.d.cts +55 -0
  2. package/dist/PdfViewer-bQH9yxFg.d.ts +55 -0
  3. package/dist/annotations/freeze/index.cjs +748 -0
  4. package/dist/annotations/freeze/index.cjs.map +1 -0
  5. package/dist/annotations/freeze/index.d.cts +199 -0
  6. package/dist/annotations/freeze/index.d.ts +199 -0
  7. package/dist/annotations/freeze/index.js +738 -0
  8. package/dist/annotations/freeze/index.js.map +1 -0
  9. package/dist/annotations/index.cjs +1737 -0
  10. package/dist/annotations/index.cjs.map +1 -0
  11. package/dist/annotations/index.d.cts +291 -0
  12. package/dist/annotations/index.d.ts +291 -0
  13. package/dist/annotations/index.js +1671 -0
  14. package/dist/annotations/index.js.map +1 -0
  15. package/dist/artifacts/index.cjs +16 -16
  16. package/dist/artifacts/index.js +5 -5
  17. package/dist/chunk-BGDE4DP5.cjs +192 -0
  18. package/dist/chunk-BGDE4DP5.cjs.map +1 -0
  19. package/dist/{chunk-MS7VH2BY.js → chunk-CVN7MAGQ.js} +6 -146
  20. package/dist/chunk-CVN7MAGQ.js.map +1 -0
  21. package/dist/chunk-JWXIRUWN.js +183 -0
  22. package/dist/chunk-JWXIRUWN.js.map +1 -0
  23. package/dist/chunk-QS3Q5542.js +151 -0
  24. package/dist/chunk-QS3Q5542.js.map +1 -0
  25. package/dist/{chunk-RI3BZQWD.cjs → chunk-R6V6YHPD.cjs} +3 -3
  26. package/dist/{chunk-RI3BZQWD.cjs.map → chunk-R6V6YHPD.cjs.map} +1 -1
  27. package/dist/{chunk-LOESXNVT.cjs → chunk-X3F5ABY2.cjs} +5 -158
  28. package/dist/chunk-X3F5ABY2.cjs.map +1 -0
  29. package/dist/chunk-XDCRWZF2.cjs +185 -0
  30. package/dist/chunk-XDCRWZF2.cjs.map +1 -0
  31. package/dist/{chunk-GT6KN3DV.js → chunk-XKGTZ3H6.js} +3 -3
  32. package/dist/{chunk-GT6KN3DV.js.map → chunk-XKGTZ3H6.js.map} +1 -1
  33. package/dist/index.cjs +475 -474
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.js +11 -9
  36. package/dist/index.js.map +1 -1
  37. package/dist/model-DzQxhMMz.d.cts +102 -0
  38. package/dist/model-DzQxhMMz.d.ts +102 -0
  39. package/dist/ui/index.cjs +186 -185
  40. package/dist/ui/index.js +3 -2
  41. package/dist/viewers/index.cjs +61 -52
  42. package/dist/viewers/index.cjs.map +1 -1
  43. package/dist/viewers/index.d.cts +3 -43
  44. package/dist/viewers/index.d.ts +3 -43
  45. package/dist/viewers/index.js +61 -52
  46. package/dist/viewers/index.js.map +1 -1
  47. package/package.json +31 -9
  48. package/dist/chunk-LOESXNVT.cjs.map +0 -1
  49. package/dist/chunk-MS7VH2BY.js.map +0 -1
@@ -0,0 +1,183 @@
1
+ // src/annotations/model.ts
2
+ var LAYER_SCHEMA_VERSION = 1;
3
+ var MAX_TEXT_LENGTH = 2e4;
4
+ var MAX_ANNOTATIONS = 2e4;
5
+ var MAX_RECTS_PER_MARK = 2e3;
6
+ var HEX_COLOR = /^#[0-9a-fA-F]{6}$/;
7
+ var KINDS = ["highlight", "box", "comment", "stamp", "redaction"];
8
+ var REDACTION_STATUSES = ["pending", "approved", "rejected"];
9
+ var EDGE_EPSILON = 1e-6;
10
+ var AnnotationLayerError = class extends Error {
11
+ constructor(message) {
12
+ super(message);
13
+ this.name = "AnnotationLayerError";
14
+ }
15
+ };
16
+ function emptyLayer(documentId, now) {
17
+ return { schema: LAYER_SCHEMA_VERSION, documentId, annotations: [], updatedAt: now };
18
+ }
19
+ var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
20
+ function fail(path, problem) {
21
+ throw new AnnotationLayerError(`${path}: ${problem}`);
22
+ }
23
+ function str(v, path, max = MAX_TEXT_LENGTH) {
24
+ if (typeof v !== "string") fail(path, "expected a string");
25
+ if (v.length > max) fail(path, `longer than ${max} characters`);
26
+ return v;
27
+ }
28
+ function optStr(v, path) {
29
+ return v === void 0 ? void 0 : str(v, path);
30
+ }
31
+ function iso(v, path) {
32
+ const s = str(v, path, 64);
33
+ if (Number.isNaN(Date.parse(s))) fail(path, "expected an ISO date");
34
+ return s;
35
+ }
36
+ function color(v, path) {
37
+ const s = str(v, path, 16);
38
+ if (!HEX_COLOR.test(s)) fail(path, "expected a #rrggbb colour");
39
+ return s;
40
+ }
41
+ function bool(v, path) {
42
+ if (typeof v !== "boolean") fail(path, "expected a boolean");
43
+ return v;
44
+ }
45
+ function rect(v, path) {
46
+ if (!isRecord(v)) fail(path, "expected a rectangle");
47
+ const out = { x: v.x, y: v.y, w: v.w, h: v.h };
48
+ for (const [key, n] of Object.entries(out)) {
49
+ if (typeof n !== "number" || !Number.isFinite(n)) fail(`${path}.${key}`, "expected a number");
50
+ }
51
+ const r = out;
52
+ if (r.w < 0 || r.h < 0) fail(path, "negative size");
53
+ if (r.x < -EDGE_EPSILON || r.y < -EDGE_EPSILON) fail(path, "outside the page");
54
+ if (r.x + r.w > 1 + EDGE_EPSILON || r.y + r.h > 1 + EDGE_EPSILON) fail(path, "outside the page");
55
+ return clampRect(r);
56
+ }
57
+ function rects(v, path) {
58
+ if (!Array.isArray(v)) fail(path, "expected a list of rectangles");
59
+ if (v.length === 0) fail(path, "needs at least one rectangle");
60
+ if (v.length > MAX_RECTS_PER_MARK) fail(path, `more than ${MAX_RECTS_PER_MARK} rectangles`);
61
+ return v.map((r, i) => rect(r, `${path}[${i}]`));
62
+ }
63
+ function reply(v, path) {
64
+ if (!isRecord(v)) fail(path, "expected a reply");
65
+ return {
66
+ id: str(v.id, `${path}.id`, 128),
67
+ author: str(v.author, `${path}.author`, 256),
68
+ createdAt: iso(v.createdAt, `${path}.createdAt`),
69
+ body: str(v.body, `${path}.body`)
70
+ };
71
+ }
72
+ function clampRect(r) {
73
+ const x = Math.min(1, Math.max(0, r.x));
74
+ const y = Math.min(1, Math.max(0, r.y));
75
+ return { x, y, w: Math.min(r.w, 1 - x), h: Math.min(r.h, 1 - y) };
76
+ }
77
+ function parseAnnotation(v, path = "annotation") {
78
+ if (!isRecord(v)) fail(path, "expected an object");
79
+ const kind = v.kind;
80
+ if (typeof kind !== "string" || !KINDS.includes(kind)) {
81
+ fail(`${path}.kind`, "unknown annotation kind");
82
+ }
83
+ const page = v.page;
84
+ if (typeof page !== "number" || !Number.isInteger(page) || page < 1) {
85
+ fail(`${path}.page`, "expected a page number of 1 or more");
86
+ }
87
+ const base = {
88
+ id: str(v.id, `${path}.id`, 128),
89
+ page,
90
+ author: str(v.author, `${path}.author`, 256),
91
+ createdAt: iso(v.createdAt, `${path}.createdAt`),
92
+ updatedAt: iso(v.updatedAt, `${path}.updatedAt`)
93
+ };
94
+ if (!base.id) fail(`${path}.id`, "empty id");
95
+ switch (kind) {
96
+ case "highlight":
97
+ return {
98
+ ...base,
99
+ kind: "highlight",
100
+ rects: rects(v.rects, `${path}.rects`),
101
+ color: color(v.color, `${path}.color`),
102
+ text: optStr(v.text, `${path}.text`)
103
+ };
104
+ case "box": {
105
+ const strokeWidth = v.strokeWidth;
106
+ if (typeof strokeWidth !== "number" || !(strokeWidth > 0) || strokeWidth > 50) {
107
+ fail(`${path}.strokeWidth`, "expected a width between 0 and 50");
108
+ }
109
+ return {
110
+ ...base,
111
+ kind: "box",
112
+ rect: rect(v.rect, `${path}.rect`),
113
+ color: color(v.color, `${path}.color`),
114
+ strokeWidth
115
+ };
116
+ }
117
+ case "comment": {
118
+ if (!Array.isArray(v.replies)) fail(`${path}.replies`, "expected a list");
119
+ return {
120
+ ...base,
121
+ kind: "comment",
122
+ rect: rect(v.rect, `${path}.rect`),
123
+ body: str(v.body, `${path}.body`),
124
+ replies: v.replies.map((r, i) => reply(r, `${path}.replies[${i}]`)),
125
+ resolved: bool(v.resolved, `${path}.resolved`)
126
+ };
127
+ }
128
+ case "stamp":
129
+ return {
130
+ ...base,
131
+ kind: "stamp",
132
+ rect: rect(v.rect, `${path}.rect`),
133
+ label: str(v.label, `${path}.label`, 200),
134
+ color: color(v.color, `${path}.color`)
135
+ };
136
+ case "redaction": {
137
+ const status = v.status;
138
+ if (typeof status !== "string" || !REDACTION_STATUSES.includes(status)) {
139
+ fail(`${path}.status`, "unknown redaction status");
140
+ }
141
+ return {
142
+ ...base,
143
+ kind: "redaction",
144
+ rects: rects(v.rects, `${path}.rects`),
145
+ reason: str(v.reason, `${path}.reason`, 200),
146
+ text: optStr(v.text, `${path}.text`),
147
+ status
148
+ };
149
+ }
150
+ }
151
+ }
152
+ function parseLayer(v) {
153
+ if (!isRecord(v)) fail("layer", "expected an object");
154
+ if (v.schema !== LAYER_SCHEMA_VERSION)
155
+ fail("layer.schema", `expected schema ${LAYER_SCHEMA_VERSION}`);
156
+ if (!Array.isArray(v.annotations)) fail("layer.annotations", "expected a list");
157
+ if (v.annotations.length > MAX_ANNOTATIONS) {
158
+ fail("layer.annotations", `more than ${MAX_ANNOTATIONS} annotations`);
159
+ }
160
+ const annotations = v.annotations.map((a, i) => parseAnnotation(a, `layer.annotations[${i}]`));
161
+ const seen = /* @__PURE__ */ new Set();
162
+ for (const a of annotations) {
163
+ if (seen.has(a.id)) fail("layer.annotations", `duplicate id ${a.id}`);
164
+ seen.add(a.id);
165
+ }
166
+ return {
167
+ schema: LAYER_SCHEMA_VERSION,
168
+ documentId: str(v.documentId, "layer.documentId", 256),
169
+ documentHash: optStr(v.documentHash, "layer.documentHash"),
170
+ annotations,
171
+ updatedAt: iso(v.updatedAt, "layer.updatedAt")
172
+ };
173
+ }
174
+ function annotationRects(a) {
175
+ return a.kind === "highlight" || a.kind === "redaction" ? a.rects : [a.rect];
176
+ }
177
+ function isEffectiveRedaction(a) {
178
+ return a.kind === "redaction" && a.status !== "rejected";
179
+ }
180
+
181
+ export { AnnotationLayerError, LAYER_SCHEMA_VERSION, annotationRects, clampRect, emptyLayer, isEffectiveRedaction, parseAnnotation, parseLayer };
182
+ //# sourceMappingURL=chunk-JWXIRUWN.js.map
183
+ //# sourceMappingURL=chunk-JWXIRUWN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/annotations/model.ts"],"names":[],"mappings":";AAcO,IAAM,oBAAA,GAAuB;AAoF7B,IAAM,eAAA,GAAkB,GAAA;AACxB,IAAM,eAAA,GAAkB,GAAA;AACxB,IAAM,kBAAA,GAAqB,GAAA;AAElC,IAAM,SAAA,GAAY,mBAAA;AAClB,IAAM,QAAmC,CAAC,WAAA,EAAa,KAAA,EAAO,SAAA,EAAW,SAAS,WAAW,CAAA;AAC7F,IAAM,kBAAA,GAAiD,CAAC,SAAA,EAAW,UAAA,EAAY,UAAU,CAAA;AAEzF,IAAM,YAAA,GAAe,IAAA;AAEd,IAAM,oBAAA,GAAN,cAAmC,KAAA,CAAM;AAAA,EAC9C,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,sBAAA;AAAA,EACd;AACF;AAEO,SAAS,UAAA,CAAW,YAAoB,GAAA,EAA8B;AAC3E,EAAA,OAAO,EAAE,QAAQ,oBAAA,EAAsB,UAAA,EAAY,aAAa,EAAC,EAAG,WAAW,GAAA,EAAI;AACrF;AAEA,IAAM,QAAA,GAAW,CAAC,CAAA,KAChB,OAAO,CAAA,KAAM,QAAA,IAAY,CAAA,KAAM,IAAA,IAAQ,CAAC,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAEzD,SAAS,IAAA,CAAK,MAAc,OAAA,EAAwB;AAClD,EAAA,MAAM,IAAI,oBAAA,CAAqB,CAAA,EAAG,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAA;AACtD;AAEA,SAAS,GAAA,CAAI,CAAA,EAAY,IAAA,EAAc,GAAA,GAAM,eAAA,EAAyB;AACpE,EAAA,IAAI,OAAO,CAAA,KAAM,QAAA,EAAU,IAAA,CA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AAA,CAAE,YAAA,EAAc,oBAAoB,CAAA;AAAA,IACzD,WAAA;AAAA,IACA,SAAA,EAAW,GAAA,CAAI,CAAA,CAAE,SAAA,EAAW,iBAAiB;AAAA,GAC/C;AACF;AAGO,SAAS,gBAAgB,CAAA,EAA2B;AACzD,EAAA,OAAO,CAAA,CAAE,IAAA,KAAS,WAAA,IAAe,CAAA,CAAE,IAAA,KAAS,cAAc,CAAA,CAAE,KAAA,GAAQ,CAAC,CAAA,CAAE,IAAI,CAAA;AAC7E;AAMO,SAAS,qBAAqB,CAAA,EAAyC;AAC5E,EAAA,OAAO,CAAA,CAAE,IAAA,KAAS,WAAA,IAAe,CAAA,CAAE,MAAA,KAAW,UAAA;AAChD","file":"chunk-JWXIRUWN.js","sourcesContent":["/**\n * Annotation layer data model.\n *\n * A layer is plain JSON that sits NEXT TO an immutable document: the original file is never\n * touched, marks are drawn over it, and \"freezing\" (see `freeze.ts`) derives a new document.\n *\n * Geometry is stored as fractions (0..1) of the page as DISPLAYED (after rotation and crop),\n * origin top-left. That makes a mark independent of zoom, device pixel ratio and PDF units, and\n * because the original never changes the coordinates never drift.\n *\n * A redaction mark carries the matched text so a reviewer (or an agent) can see what it hides.\n * That text is sensitive: the layer must never travel with a frozen copy.\n */\n\nexport const LAYER_SCHEMA_VERSION = 1\n\nexport type AnnotationKind = 'highlight' | 'box' | 'comment' | 'stamp' | 'redaction'\nexport type RedactionStatus = 'pending' | 'approved' | 'rejected'\n\n/** Fractions of the displayed page, origin top-left. */\nexport interface NormRect {\n x: number\n y: number\n w: number\n h: number\n}\n\nexport interface CommentReply {\n id: string\n author: string\n createdAt: string\n body: string\n}\n\ninterface AnnotationBase {\n id: string\n /** 1-based page number. */\n page: number\n author: string\n createdAt: string\n updatedAt: string\n}\n\nexport interface HighlightAnnotation extends AnnotationBase {\n kind: 'highlight'\n rects: NormRect[]\n color: string\n /** The highlighted text, when it came from a text selection. */\n text?: string\n}\n\nexport interface BoxAnnotation extends AnnotationBase {\n kind: 'box'\n rect: NormRect\n color: string\n /** Outline width in PDF points at 100%. */\n strokeWidth: number\n}\n\nexport interface CommentAnnotation extends AnnotationBase {\n kind: 'comment'\n /** Anchor box; the note icon is drawn at its top-left corner. */\n rect: NormRect\n body: string\n replies: CommentReply[]\n resolved: boolean\n}\n\nexport interface StampAnnotation extends AnnotationBase {\n kind: 'stamp'\n rect: NormRect\n label: string\n color: string\n}\n\nexport interface RedactionAnnotation extends AnnotationBase {\n kind: 'redaction'\n rects: NormRect[]\n /** Why it is redacted (e.g. \"Privileged\"). Printed on the frozen copy, never the text itself. */\n reason: string\n /** The text under the mark. Sensitive: stays in the layer, never in a frozen document. */\n text?: string\n status: RedactionStatus\n}\n\nexport type Annotation =\n HighlightAnnotation | BoxAnnotation | CommentAnnotation | StampAnnotation | RedactionAnnotation\n\nexport interface AnnotationLayer {\n schema: typeof LAYER_SCHEMA_VERSION\n /** External id of the immutable document the layer annotates. */\n documentId: string\n /** Optional content hash of the original, so a layer can be checked against the file it marks. */\n documentHash?: string\n annotations: Annotation[]\n updatedAt: string\n}\n\nexport const MAX_TEXT_LENGTH = 20_000\nexport const MAX_ANNOTATIONS = 20_000\nexport const MAX_RECTS_PER_MARK = 2_000\n\nconst HEX_COLOR = /^#[0-9a-fA-F]{6}$/\nconst KINDS: readonly AnnotationKind[] = ['highlight', 'box', 'comment', 'stamp', 'redaction']\nconst REDACTION_STATUSES: readonly RedactionStatus[] = ['pending', 'approved', 'rejected']\n/** Tolerance for rects that overshoot the page edge by floating-point noise. */\nconst EDGE_EPSILON = 1e-6\n\nexport class AnnotationLayerError extends Error {\n constructor(message: string) {\n super(message)\n this.name = 'AnnotationLayerError'\n }\n}\n\nexport function emptyLayer(documentId: string, now: string): AnnotationLayer {\n return { schema: LAYER_SCHEMA_VERSION, documentId, annotations: [], updatedAt: now }\n}\n\nconst isRecord = (v: unknown): v is Record<string, unknown> =>\n typeof v === 'object' && v !== null && !Array.isArray(v)\n\nfunction fail(path: string, problem: string): never {\n throw new AnnotationLayerError(`${path}: ${problem}`)\n}\n\nfunction str(v: unknown, path: string, max = MAX_TEXT_LENGTH): string {\n if (typeof v !== 'string') fail(path, 'expected a string')\n if (v.length > max) fail(path, `longer than ${max} characters`)\n return v\n}\n\nfunction optStr(v: unknown, path: string): string | undefined {\n return v === undefined ? undefined : str(v, path)\n}\n\nfunction iso(v: unknown, path: string): string {\n const s = str(v, path, 64)\n if (Number.isNaN(Date.parse(s))) fail(path, 'expected an ISO date')\n return s\n}\n\nfunction color(v: unknown, path: string): string {\n const s = str(v, path, 16)\n if (!HEX_COLOR.test(s)) fail(path, 'expected a #rrggbb colour')\n return s\n}\n\nfunction bool(v: unknown, path: string): boolean {\n if (typeof v !== 'boolean') fail(path, 'expected a boolean')\n return v\n}\n\nfunction rect(v: unknown, path: string): NormRect {\n if (!isRecord(v)) fail(path, 'expected a rectangle')\n const out = { x: v.x, y: v.y, w: v.w, h: v.h }\n for (const [key, n] of Object.entries(out)) {\n if (typeof n !== 'number' || !Number.isFinite(n)) fail(`${path}.${key}`, 'expected a number')\n }\n const r = out as NormRect\n if (r.w < 0 || r.h < 0) fail(path, 'negative size')\n if (r.x < -EDGE_EPSILON || r.y < -EDGE_EPSILON) fail(path, 'outside the page')\n if (r.x + r.w > 1 + EDGE_EPSILON || r.y + r.h > 1 + EDGE_EPSILON) fail(path, 'outside the page')\n return clampRect(r)\n}\n\nfunction rects(v: unknown, path: string): NormRect[] {\n if (!Array.isArray(v)) fail(path, 'expected a list of rectangles')\n if (v.length === 0) fail(path, 'needs at least one rectangle')\n if (v.length > MAX_RECTS_PER_MARK) fail(path, `more than ${MAX_RECTS_PER_MARK} rectangles`)\n return v.map((r, i) => rect(r, `${path}[${i}]`))\n}\n\nfunction reply(v: unknown, path: string): CommentReply {\n if (!isRecord(v)) fail(path, 'expected a reply')\n return {\n id: str(v.id, `${path}.id`, 128),\n author: str(v.author, `${path}.author`, 256),\n createdAt: iso(v.createdAt, `${path}.createdAt`),\n body: str(v.body, `${path}.body`),\n }\n}\n\nexport function clampRect(r: NormRect): NormRect {\n const x = Math.min(1, Math.max(0, r.x))\n const y = Math.min(1, Math.max(0, r.y))\n return { x, y, w: Math.min(r.w, 1 - x), h: Math.min(r.h, 1 - y) }\n}\n\n/** Validate one annotation from untrusted JSON. Throws `AnnotationLayerError`. */\nexport function parseAnnotation(v: unknown, path = 'annotation'): Annotation {\n if (!isRecord(v)) fail(path, 'expected an object')\n const kind = v.kind\n if (typeof kind !== 'string' || !KINDS.includes(kind as AnnotationKind)) {\n fail(`${path}.kind`, 'unknown annotation kind')\n }\n const page = v.page\n if (typeof page !== 'number' || !Number.isInteger(page) || page < 1) {\n fail(`${path}.page`, 'expected a page number of 1 or more')\n }\n const base: AnnotationBase = {\n id: str(v.id, `${path}.id`, 128),\n page,\n author: str(v.author, `${path}.author`, 256),\n createdAt: iso(v.createdAt, `${path}.createdAt`),\n updatedAt: iso(v.updatedAt, `${path}.updatedAt`),\n }\n if (!base.id) fail(`${path}.id`, 'empty id')\n\n switch (kind as AnnotationKind) {\n case 'highlight':\n return {\n ...base,\n kind: 'highlight',\n rects: rects(v.rects, `${path}.rects`),\n color: color(v.color, `${path}.color`),\n text: optStr(v.text, `${path}.text`),\n }\n case 'box': {\n const strokeWidth = v.strokeWidth\n if (typeof strokeWidth !== 'number' || !(strokeWidth > 0) || strokeWidth > 50) {\n fail(`${path}.strokeWidth`, 'expected a width between 0 and 50')\n }\n return {\n ...base,\n kind: 'box',\n rect: rect(v.rect, `${path}.rect`),\n color: color(v.color, `${path}.color`),\n strokeWidth,\n }\n }\n case 'comment': {\n if (!Array.isArray(v.replies)) fail(`${path}.replies`, 'expected a list')\n return {\n ...base,\n kind: 'comment',\n rect: rect(v.rect, `${path}.rect`),\n body: str(v.body, `${path}.body`),\n replies: v.replies.map((r, i) => reply(r, `${path}.replies[${i}]`)),\n resolved: bool(v.resolved, `${path}.resolved`),\n }\n }\n case 'stamp':\n return {\n ...base,\n kind: 'stamp',\n rect: rect(v.rect, `${path}.rect`),\n label: str(v.label, `${path}.label`, 200),\n color: color(v.color, `${path}.color`),\n }\n case 'redaction': {\n const status = v.status\n if (typeof status !== 'string' || !REDACTION_STATUSES.includes(status as RedactionStatus)) {\n fail(`${path}.status`, 'unknown redaction status')\n }\n return {\n ...base,\n kind: 'redaction',\n rects: rects(v.rects, `${path}.rects`),\n reason: str(v.reason, `${path}.reason`, 200),\n text: optStr(v.text, `${path}.text`),\n status: status as RedactionStatus,\n }\n }\n }\n}\n\n/** Validate a whole layer from untrusted JSON (storage, network, an agent). */\nexport function parseLayer(v: unknown): AnnotationLayer {\n if (!isRecord(v)) fail('layer', 'expected an object')\n if (v.schema !== LAYER_SCHEMA_VERSION)\n fail('layer.schema', `expected schema ${LAYER_SCHEMA_VERSION}`)\n if (!Array.isArray(v.annotations)) fail('layer.annotations', 'expected a list')\n if (v.annotations.length > MAX_ANNOTATIONS) {\n fail('layer.annotations', `more than ${MAX_ANNOTATIONS} annotations`)\n }\n const annotations = v.annotations.map((a, i) => parseAnnotation(a, `layer.annotations[${i}]`))\n const seen = new Set<string>()\n for (const a of annotations) {\n if (seen.has(a.id)) fail('layer.annotations', `duplicate id ${a.id}`)\n seen.add(a.id)\n }\n return {\n schema: LAYER_SCHEMA_VERSION,\n documentId: str(v.documentId, 'layer.documentId', 256),\n documentHash: optStr(v.documentHash, 'layer.documentHash'),\n annotations,\n updatedAt: iso(v.updatedAt, 'layer.updatedAt'),\n }\n}\n\n/** The rectangles a mark covers, whatever its kind. */\nexport function annotationRects(a: Annotation): NormRect[] {\n return a.kind === 'highlight' || a.kind === 'redaction' ? a.rects : [a.rect]\n}\n\n/**\n * True when a redaction mark will be burned into a frozen copy. Fails closed: only an explicit\n * rejection leaves content visible, so a mark nobody reviewed is never silently skipped.\n */\nexport function isEffectiveRedaction(a: Annotation): a is RedactionAnnotation {\n return a.kind === 'redaction' && a.status !== 'rejected'\n}\n"]}
@@ -0,0 +1,151 @@
1
+ import { cn } from './chunk-SN5YV6FF.js';
2
+ import * as React2 from 'react';
3
+ import { Slot } from '@radix-ui/react-slot';
4
+ import { cva } from 'class-variance-authority';
5
+ import { jsx, jsxs } from 'react/jsx-runtime';
6
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
7
+ import { X } from 'lucide-react';
8
+
9
+ var buttonVariants = cva(
10
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
11
+ {
12
+ variants: {
13
+ // One filled primary per view; everything else is tonal, hairline or ghost. No
14
+ // static shadows: separation is tone, and shadows are reserved for floating layers.
15
+ variant: {
16
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
17
+ accent: "bg-ai-accent text-ai-accent-foreground hover:bg-ai-accent/90",
18
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
19
+ outline: "border border-border bg-background hover:bg-muted",
20
+ secondary: "bg-muted text-foreground hover:bg-muted/70",
21
+ ghost: "hover:bg-muted",
22
+ link: "text-primary underline-offset-4 hover:underline"
23
+ },
24
+ // Touch screens get a 44px target (coarse pointers only), mouse keeps the compact 36px.
25
+ // `!` so the floor also wins over a caller's compact `h-7` or a container's
26
+ // `[&_button]:h-7` rule: a compact toolbar on a phone must still be tappable.
27
+ size: {
28
+ default: "h-9 px-4 py-2 pointer-coarse:h-11!",
29
+ sm: "h-8 rounded-md px-3 pointer-coarse:h-11! pointer-coarse:min-w-11",
30
+ lg: "h-10 rounded-md px-8 pointer-coarse:h-12!",
31
+ icon: "h-9 w-9 pointer-coarse:h-11! pointer-coarse:w-11!"
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ variant: "default",
36
+ size: "default"
37
+ }
38
+ }
39
+ );
40
+ var Button = React2.forwardRef(
41
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
42
+ const Comp = asChild ? Slot : "button";
43
+ return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
44
+ }
45
+ );
46
+ Button.displayName = "Button";
47
+
48
+ // src/lib/toast-interaction.ts
49
+ function isToastInteraction(event) {
50
+ const original = event.detail?.originalEvent;
51
+ const target = original?.target ?? event.target;
52
+ return target instanceof Element && target.closest("[data-sonner-toaster]") !== null;
53
+ }
54
+ var Dialog = DialogPrimitive.Root;
55
+ var DialogTrigger = DialogPrimitive.Trigger;
56
+ var DialogPortal = DialogPrimitive.Portal;
57
+ var DialogClose = DialogPrimitive.Close;
58
+ var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
59
+ DialogPrimitive.Overlay,
60
+ {
61
+ ref,
62
+ className: cn(
63
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
64
+ className
65
+ ),
66
+ ...props
67
+ }
68
+ ));
69
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
70
+ var PHONE_PRESENTATION = {
71
+ right: "inset-y-0 left-auto right-0 h-dvh max-h-dvh w-full max-w-[28rem] translate-x-0 translate-y-0 rounded-none border-y-0 border-r-0 data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right data-[state=open]:zoom-in-100 data-[state=closed]:zoom-out-100",
72
+ center: "",
73
+ sheet: "max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:max-w-full max-sm:border-x-0 max-sm:border-b-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-[calc(100dvh-env(safe-area-inset-top,0px)-2.5rem)] max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100",
74
+ full: "max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:border-x-0 max-sm:border-b-0 max-sm:h-[calc(100dvh-env(safe-area-inset-top,0px)-1rem)] max-sm:w-full max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-none max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100"
75
+ };
76
+ var DialogContent = React2.forwardRef(
77
+ ({ className, children, hideCloseButton, presentation = "center", onInteractOutside, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
78
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
79
+ /* @__PURE__ */ jsxs(
80
+ DialogPrimitive.Content,
81
+ {
82
+ ref,
83
+ "data-slot": "dialog-content",
84
+ "data-presentation": presentation,
85
+ onInteractOutside: (event) => {
86
+ if (isToastInteraction(event)) event.preventDefault();
87
+ onInteractOutside?.(event);
88
+ },
89
+ className: cn(
90
+ // Always inside the viewport: width and height are capped by the DYNAMIC viewport (mobile
91
+ // browser chrome) and the notch / home-indicator insets; the content scrolls inside.
92
+ "fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem-env(safe-area-inset-left,0px)-env(safe-area-inset-right,0px))] max-w-lg max-h-[calc(min(100dvh,100svh,100vh)-2rem-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px))] translate-x-[-50%] translate-y-[-50%] will-change-transform grid-cols-[minmax(0,1fr)] gap-4 overflow-x-hidden overflow-y-auto overscroll-contain scrollbar-themed border bg-background p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-md",
93
+ PHONE_PRESENTATION[presentation],
94
+ className
95
+ ),
96
+ ...props,
97
+ children: [
98
+ children,
99
+ !hideCloseButton && /* @__PURE__ */ jsxs(
100
+ DialogPrimitive.Close,
101
+ {
102
+ className: "fixed right-4 top-4 z-20 inline-flex items-center justify-center rounded-sm pointer-coarse:right-2 pointer-coarse:top-2 pointer-coarse:size-11 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
103
+ "data-testid": "dialog-close-button",
104
+ children: [
105
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
106
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close dialog" })
107
+ ]
108
+ }
109
+ )
110
+ ]
111
+ }
112
+ )
113
+ ] })
114
+ );
115
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
116
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex min-w-0 flex-col space-y-1.5 pr-8 text-left", className), ...props });
117
+ DialogHeader.displayName = "DialogHeader";
118
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
119
+ "div",
120
+ {
121
+ className: cn(
122
+ // Sticks to the bottom of a scrolling dialog so the actions stay reachable.
123
+ "sticky bottom-0 z-10 -mx-6 -mb-6 flex flex-col-reverse gap-2 bg-background px-6 pb-6 pt-3 sm:flex-row sm:justify-end",
124
+ className
125
+ ),
126
+ ...props
127
+ }
128
+ );
129
+ DialogFooter.displayName = "DialogFooter";
130
+ var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
131
+ DialogPrimitive.Title,
132
+ {
133
+ ref,
134
+ className: cn("break-words text-lg font-semibold leading-tight tracking-tight", className),
135
+ ...props
136
+ }
137
+ ));
138
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
139
+ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
140
+ DialogPrimitive.Description,
141
+ {
142
+ ref,
143
+ className: cn("text-sm text-muted-foreground", className),
144
+ ...props
145
+ }
146
+ ));
147
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
148
+
149
+ export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants };
150
+ //# sourceMappingURL=chunk-QS3Q5542.js.map
151
+ //# sourceMappingURL=chunk-QS3Q5542.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/button.tsx","../src/lib/toast-interaction.ts","../src/ui/dialog.tsx"],"names":["React","jsx"],"mappings":";;;;;;;;AAMA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,yVAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA;AAAA,MAGR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,wDAAA;AAAA,QACT,MAAA,EAAQ,8DAAA;AAAA,QACR,WAAA,EAAa,oEAAA;AAAA,QACb,OAAA,EAAS,mDAAA;AAAA,QACT,SAAA,EAAW,4CAAA;AAAA,QACX,KAAA,EAAO,gBAAA;AAAA,QACP,IAAA,EAAM;AAAA,OACR;AAAA;AAAA;AAAA;AAAA,MAIA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,oCAAA;AAAA,QACT,EAAA,EAAI,kEAAA;AAAA,QACJ,EAAA,EAAI,2CAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAOA,IAAM,MAAA,GAAeA,MAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,OAAA,EAAS,IAAA,EAAM,UAAU,KAAA,EAAO,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAChE,IAAA,MAAM,IAAA,GAAO,UAAU,IAAA,GAAO,QAAA;AAC9B,IAAA,uBACE,GAAA,CAAC,IAAA,EAAA,EAAK,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AAc,cAAA;AAE3B,IAAM,eAAe,CAAC,EAAE,WAAW,GAAG,KAAA,uBACpCA,GAAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,SAAA,EAAW,EAAA;AAAA;AAAA,MAET,sHAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN;AAEF,YAAA,CAAa,WAAA,GAAc,cAAA;AAE3B,IAAM,WAAA,GAAoB,kBAGxB,CAAC,EAAE,WAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC1BA,GAAAA;AAAA,EAAiB,eAAA,CAAA,KAAA;AAAA,EAAhB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,gEAAA,EAAkE,SAAS,CAAA;AAAA,IACxF,GAAG;AAAA;AACN,CACD;AACD,WAAA,CAAY,cAA8B,eAAA,CAAA,KAAA,CAAM,WAAA;AAEhD,IAAM,iBAAA,GAA0B,kBAG9B,CAAC,EAAE,WAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC1BA,GAAAA;AAAA,EAAiB,eAAA,CAAA,WAAA;AAAA,EAAhB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,iBAAA,CAAkB,cAA8B,eAAA,CAAA,WAAA,CAAY,WAAA","file":"chunk-QS3Q5542.js","sourcesContent":["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n // One filled primary per view; everything else is tonal, hairline or ghost. No\n // static shadows: separation is tone, and shadows are reserved for floating layers.\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n accent: 'bg-ai-accent text-ai-accent-foreground hover:bg-ai-accent/90',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline: 'border border-border bg-background hover:bg-muted',\n secondary: 'bg-muted text-foreground hover:bg-muted/70',\n ghost: 'hover:bg-muted',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n // Touch screens get a 44px target (coarse pointers only), mouse keeps the compact 36px.\n // `!` so the floor also wins over a caller's compact `h-7` or a container's\n // `[&_button]:h-7` rule: a compact toolbar on a phone must still be tappable.\n size: {\n default: 'h-9 px-4 py-2 pointer-coarse:h-11!',\n sm: 'h-8 rounded-md px-3 pointer-coarse:h-11! pointer-coarse:min-w-11',\n lg: 'h-10 rounded-md px-8 pointer-coarse:h-12!',\n icon: 'h-9 w-9 pointer-coarse:h-11! pointer-coarse:w-11!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n","/**\n * True when an interaction landed on a sonner toast. The toaster renders in its own\n * portal, outside every dialog, so Radix counts a click (or the focus move from\n * clicking a toast's close button) as an \"outside\" interaction and dismisses the open\n * dialog — e.g. clicking the \"Welcome\" toast closed the create-workspace dialog\n * underneath it.\n */\nexport function isToastInteraction(event: Event): boolean {\n const original = (event as CustomEvent<{ originalEvent?: Event }>).detail?.originalEvent\n const target = original?.target ?? event.target\n return target instanceof Element && target.closest('[data-sonner-toaster]') !== null\n}\n","import * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\n\nimport { cn } from '../lib/utils'\nimport { isToastInteraction } from '../lib/toast-interaction'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\n/**\n * Where the dialog sits on a PHONE (< 640px). Wider screens always get a centred dialog.\n * - `center`: centred box with a 1rem margin (small prompts and confirmations).\n * - `sheet`: bottom sheet, full width, rounded top corners (forms and pickers).\n * - `full`: full-height sheet that stops below the status bar (large editors, wizards).\n */\nexport type DialogPresentation = 'center' | 'sheet' | 'full' | 'right'\n\nconst PHONE_PRESENTATION: Record<DialogPresentation, string> = {\n right:\n 'inset-y-0 left-auto right-0 h-dvh max-h-dvh w-full max-w-[28rem] translate-x-0 translate-y-0 rounded-none border-y-0 border-r-0 data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right data-[state=open]:zoom-in-100 data-[state=closed]:zoom-out-100',\n center: '',\n sheet:\n 'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:max-w-full max-sm:border-x-0 max-sm:border-b-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-[calc(100dvh-env(safe-area-inset-top,0px)-2.5rem)] max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100',\n full: 'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:border-x-0 max-sm:border-b-0 max-sm:h-[calc(100dvh-env(safe-area-inset-top,0px)-1rem)] max-sm:w-full max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-none max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100',\n}\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n hideCloseButton?: boolean\n /** Phone presentation (see {@link DialogPresentation}). Defaults to `center`. */\n presentation?: DialogPresentation\n }\n>(\n (\n { className, children, hideCloseButton, presentation = 'center', onInteractOutside, ...props },\n ref\n ) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n data-slot=\"dialog-content\"\n data-presentation={presentation}\n onInteractOutside={(event) => {\n if (isToastInteraction(event)) event.preventDefault()\n onInteractOutside?.(event)\n }}\n className={cn(\n // Always inside the viewport: width and height are capped by the DYNAMIC viewport (mobile\n // browser chrome) and the notch / home-indicator insets; the content scrolls inside.\n 'fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem-env(safe-area-inset-left,0px)-env(safe-area-inset-right,0px))] max-w-lg max-h-[calc(min(100dvh,100svh,100vh)-2rem-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px))] translate-x-[-50%] translate-y-[-50%] will-change-transform grid-cols-[minmax(0,1fr)] gap-4 overflow-x-hidden overflow-y-auto overscroll-contain scrollbar-themed border bg-background p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-md',\n PHONE_PRESENTATION[presentation],\n className\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <DialogPrimitive.Close\n // `fixed` inside the transformed dialog is positioned against the dialog box, not its\n // scrolling content: the close button never scrolls away.\n className=\"fixed right-4 top-4 z-20 inline-flex items-center justify-center rounded-sm pointer-coarse:right-2 pointer-coarse:top-2 pointer-coarse:size-11 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\"\n data-testid=\"dialog-close-button\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close dialog</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex min-w-0 flex-col space-y-1.5 pr-8 text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n // Sticks to the bottom of a scrolling dialog so the actions stay reachable.\n 'sticky bottom-0 z-10 -mx-6 -mb-6 flex flex-col-reverse gap-2 bg-background px-6 pb-6 pt-3 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('break-words text-lg font-semibold leading-tight tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkZMTLGO3K_cjs = require('./chunk-ZMTLGO3K.cjs');
4
3
  var chunkNA3FOYSF_cjs = require('./chunk-NA3FOYSF.cjs');
4
+ var chunkZMTLGO3K_cjs = require('./chunk-ZMTLGO3K.cjs');
5
5
  var react = require('react');
6
6
  var reactQuery = require('@tanstack/react-query');
7
7
 
@@ -575,5 +575,5 @@ exports.useThumbnails = useThumbnails;
575
575
  exports.useUserUsageToday = useUserUsageToday;
576
576
  exports.useWorkspaceUsers = useWorkspaceUsers;
577
577
  exports.useWorkspaces = useWorkspaces;
578
- //# sourceMappingURL=chunk-RI3BZQWD.cjs.map
579
- //# sourceMappingURL=chunk-RI3BZQWD.cjs.map
578
+ //# sourceMappingURL=chunk-R6V6YHPD.cjs.map
579
+ //# sourceMappingURL=chunk-R6V6YHPD.cjs.map