@nxgt/material 3.47.0 → 3.49.0
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/CHANGELOG.md +24 -0
- package/README.md +3 -3
- package/dist/{button-yaltbQmC.js → button-DJgaQbBD.js} +49 -49
- package/dist/charts.js +144 -144
- package/dist/{chip-BqWbbr1b.js → chip-DN44R1vW.js} +56 -56
- package/dist/{code-editor-C9qBNoYb.js → code-editor-BJ9ewxSC.js} +307 -307
- package/dist/code-editor.js +46 -46
- package/dist/{code-language-items-DAHtfQ7W.js → code-language-items-BJE3VuQg.js} +1 -1
- package/dist/components/components.css +1 -0
- package/dist/components/ui/actions/action-card/action-card-indicator.css +48 -0
- package/dist/components/ui/actions/action-card/action-card-modes.css +4 -1
- package/dist/components/ui/actions/action-card/action-card-tile.css +141 -0
- package/dist/components/ui/actions/action-card/action-card.css +33 -3
- package/dist/{components-DFPy96C3.js → components-AtBccCir.js} +15714 -15755
- package/dist/components.js +23 -23
- package/dist/{dialog-CCCcnTIx.js → dialog-ODql4vH7.js} +15 -15
- package/dist/{tooltip-CkttDIab.js → dist-B61_o9Mg.js} +69 -66
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-Df8785nt.js → dropdown-menu-DRXYP9ta.js} +274 -274
- package/dist/editor.js +1027 -1027
- package/dist/{empty-state-DcF4TBzi.js → empty-state-C9QqvBU1.js} +36 -36
- package/dist/{escape-owner-C4W_sOAU.js → escape-owner-DCrlERLM.js} +1 -1
- package/dist/{field-blur-CJHzVSh9.js → field-blur-DYGyIdfD.js} +1 -1
- package/dist/{field-blur-context-Cft9s7Hg.js → field-blur-context-B-fSpl1H.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-C0fw2kLK.js → hover-card-EO_CckIx.js} +19 -19
- package/dist/{icon-badge-aJ22mKGh.js → icon-badge-BQYj_LE6.js} +3 -3
- package/dist/{icon-button-CN9r5TNE.js → icon-button-B481L2TP.js} +20 -20
- package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +25 -2
- package/dist/lib/components/ui/actions/action-card/action-card.d.ts +18 -2
- package/dist/lib/components/ui/actions/action-card/partials/action-card-icon.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-meta.d.ts +15 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-status.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +20 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +14 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/use-action-card-names.d.ts +22 -0
- package/dist/lib/components/ui/actions/action-card/use-reveal.d.ts +23 -0
- package/dist/lib/components/ui/actions/button/button.variants.d.ts +1 -1
- package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/query/filter-query-context.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/query/filter-query-model.d.ts +49 -0
- package/dist/lib/components/ui/collections/filter/query/types.d.ts +8 -0
- package/dist/lib/components/ui/collections/filter/query/use-filter-query-options.d.ts +2 -1
- package/dist/lib/components/ui/collections/filter/query/use-filter-query-value.d.ts +1 -0
- package/dist/lib/components/ui/collections/filter/query/use-filter-query.d.ts +3 -47
- package/dist/lib/components/ui/collections/filter/sections/filter-form-error.d.ts +16 -4
- package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
- package/dist/lib/components/ui/collections/server-table/types.d.ts +5 -0
- package/dist/lib/components/ui/dates/duration-field/partials/use-duration-box.d.ts +1 -1
- package/dist/lib/components/ui/display/badge/badge.d.ts +1 -1
- package/dist/lib/components/ui/display/day-separator/day-separator.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/opening-hours/logic/status.d.ts +13 -2
- package/dist/lib/components/ui/fields/opening-hours/opening-hours-summary.d.ts +7 -3
- package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +20 -20
- package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +20 -20
- package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
- package/dist/lib/components/ui/media/carousel/use-carousel-engine.d.ts +1 -1
- package/dist/lib/components/ui/media/media-player/engine/use-queue-actions.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-reader/pdf-reader.slice.d.ts +1 -1
- package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +34 -34
- package/dist/lib/components/ui/widgets/chat/chat-message.variants.d.ts +2 -2
- package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +1 -1
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/main.js +30 -30
- package/dist/map.js +78 -78
- package/dist/material.css +1 -1
- package/dist/nxgt-theme-ivgNca3z.js +37 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/{public-zVb_Nq_D.js → public-CZBz4JVu.js} +70 -70
- package/dist/{rich-code-block-DMWZZJma.js → rich-code-block-597e0_Qm.js} +51 -51
- package/dist/{sortable-provider-DstbgMVf.js → sortable-provider-CK_xAk2H.js} +217 -217
- package/dist/{spinner-C4CgDEYm.js → spinner-BhuZuHK1.js} +1 -1
- package/dist/theme-picker.js +45 -45
- package/dist/{theme-store-CSl51uNH.js → theme-store-BdPp43cV.js} +13 -13
- package/dist/{theme-toggle-CGW2_K54.js → theme-toggle-Dnjn83TJ.js} +15 -15
- package/dist/themes.js +17 -17
- package/dist/{toggle-group-BMJNcFAC.js → toggle-group-BkH23Jk4.js} +11 -11
- package/dist/{toolbar-items-CsLGJMEJ.js → toolbar-items-CCwIu7fE.js} +426 -426
- package/dist/{use-chat-composer-Brcb5f7r.js → use-chat-composer-Ot5XUbdn.js} +5138 -4908
- package/dist/{use-theme-DMcyJ52N.js → use-theme-BCLireTd.js} +1 -1
- package/docs/components/buttons-and-actions.md +62 -4
- package/docs/components/data-table-filter-and-lists.md +29 -2
- package/docs/components/form-fields.md +1 -1
- package/docs/guides/cards-and-tiles.md +60 -0
- package/docs/previews/data-table-filter-lists-filter.webp +0 -0
- package/docs/roadmap.md +21 -0
- package/docs/troubleshooting.md +24 -0
- package/lib/components/components.css +1 -0
- package/lib/components/ui/actions/action-card/action-card-indicator.css +48 -0
- package/lib/components/ui/actions/action-card/action-card-modes.css +4 -1
- package/lib/components/ui/actions/action-card/action-card-tile.css +141 -0
- package/lib/components/ui/actions/action-card/action-card.css +33 -3
- package/package.json +1 -1
- package/dist/lib/components/ui/fields/opening-hours/logic/zoned.d.ts +0 -10
- package/dist/nxgt-theme-ZS945iMP.js +0 -37
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { t as e } from "./is-production-GLw59WU8.js";
|
|
2
|
+
import { t } from "./warn-once-C_e47JM8.js";
|
|
3
|
+
import { t as n } from "./dist-DVRQkaTK.js";
|
|
4
|
+
import { n as r, r as i, t as a } from "./theme-context-Cofk6vgs.js";
|
|
5
|
+
import { useContext as o, useMemo as s } from "react";
|
|
6
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
7
|
+
//#region lib/themes/theme-value.ts
|
|
8
|
+
function l(e, t, n) {
|
|
9
|
+
return {
|
|
10
|
+
name: e,
|
|
11
|
+
theme: t,
|
|
12
|
+
background: t?.background === !1 ? !1 : t?.background ?? a,
|
|
13
|
+
defaultMode: n
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region lib/themes/nxgt-theme.tsx
|
|
18
|
+
function u({ theme: a, mode: u, asChild: d = !1, children: f, ...p }) {
|
|
19
|
+
let m = o(i), h = typeof a == "string" ? m?.find((e) => e.name === a) : a, g = typeof a == "string" ? a : a.name;
|
|
20
|
+
!e() && m && !h && t(`theme "${g}" is not in the provider's themes; its background is the default.`, "NxgtTheme");
|
|
21
|
+
let _ = o(r)?.defaultMode, v = s(() => l(g, h, _), [
|
|
22
|
+
g,
|
|
23
|
+
h,
|
|
24
|
+
_
|
|
25
|
+
]), y = d ? n : "div";
|
|
26
|
+
return /* @__PURE__ */ c(r.Provider, {
|
|
27
|
+
value: v,
|
|
28
|
+
children: /* @__PURE__ */ c(y, {
|
|
29
|
+
...p,
|
|
30
|
+
"data-nxgt-theme": g,
|
|
31
|
+
...u ? { "data-theme": u } : {},
|
|
32
|
+
children: f
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { l as n, u as t };
|
package/dist/pdf-reader.js
CHANGED
|
@@ -3,28 +3,28 @@ import { n as t } from "./ui.utils-CAnKTCw5.js";
|
|
|
3
3
|
import { t as n } from "./utils-BLfntITJ.js";
|
|
4
4
|
import { o as r } from "./dist-DVRQkaTK.js";
|
|
5
5
|
import { c as i, i as a, l as o, n as s, o as c, s as l } from "./dist-lmHmz_bu.js";
|
|
6
|
-
import {
|
|
6
|
+
import { o as u, t as d } from "./dist-B61_o9Mg.js";
|
|
7
7
|
import { i as f } from "./dist-C4wtXCjf.js";
|
|
8
8
|
import { r as p, t as m } from "./in-dialog-Vwkyp-M5.js";
|
|
9
|
-
import { C as h, D as g, E as _, O as v, S as y, T as b, _ as x, f as S, g as ee, k as te, r as ne, t as C, u as re, w } from "./dialog-
|
|
10
|
-
import { c as T, d as ie, f as E, i as ae, l as oe, n as se, o as D, t as ce, u as O } from "./dropdown-menu-
|
|
11
|
-
import { S as le, a as k, d as A, g as ue, h as de, i as fe, m as pe, n as j, r as me, t as M, u as he, w as ge } from "./toolbar-items-
|
|
9
|
+
import { C as h, D as g, E as _, O as v, S as y, T as b, _ as x, f as S, g as ee, k as te, r as ne, t as C, u as re, w } from "./dialog-ODql4vH7.js";
|
|
10
|
+
import { c as T, d as ie, f as E, i as ae, l as oe, n as se, o as D, t as ce, u as O } from "./dropdown-menu-DRXYP9ta.js";
|
|
11
|
+
import { S as le, a as k, d as A, g as ue, h as de, i as fe, m as pe, n as j, r as me, t as M, u as he, w as ge } from "./toolbar-items-CCwIu7fE.js";
|
|
12
12
|
import { t as N } from "./use-material-translation-DOkTaWK_.js";
|
|
13
|
-
import { t as _e } from "./button-
|
|
14
|
-
import { n as ve, t as ye } from "./icon-button-
|
|
13
|
+
import { t as _e } from "./button-DJgaQbBD.js";
|
|
14
|
+
import { n as ve, t as ye } from "./icon-button-B481L2TP.js";
|
|
15
15
|
import { t as be } from "./useEvent-2fKq-6w8.js";
|
|
16
|
-
import { n as xe, t as Se } from "./toggle-group-
|
|
17
|
-
import { o as Ce } from "./escape-owner-
|
|
16
|
+
import { n as xe, t as Se } from "./toggle-group-BkH23Jk4.js";
|
|
17
|
+
import { o as Ce } from "./escape-owner-DCrlERLM.js";
|
|
18
18
|
import { n as we } from "./use-slice-reducer-BGkeGtML.js";
|
|
19
19
|
import { r as Te } from "./use-csp-nonce-ZKs9k-ov.js";
|
|
20
|
-
import { n as Ee, t as De } from "./empty-state-
|
|
20
|
+
import { n as Ee, t as De } from "./empty-state-C9QqvBU1.js";
|
|
21
21
|
import { t as Oe } from "./client-only.utils-3nHNzCki.js";
|
|
22
22
|
import { t as ke } from "./use-scroll-away-PQRFZkT2.js";
|
|
23
|
-
import { ArrowLeft as Ae, BookOpenText as je, ChevronDown as Me, ChevronLeft as Ne, ChevronRight as Pe, ChevronUp as Fe, Download as Ie, Eraser as Le, FileText as Re, FileWarning as ze, FileX2 as Be, Highlighter as Ve, KeyRound as He, LayoutGrid as Ue, List as We, Loader2 as Ge, Maximize as Ke, MessageSquareText as qe, Minimize as Je, MoreVertical as Ye, MousePointer2 as Xe, MoveHorizontal as Ze, PanelLeft as Qe, Pen as $e, PencilLine as et, Printer as tt, RotateCw as nt, Search as rt, StickyNote as it, Type as at, Underline as ot, Undo2 as st, Volume2 as ct, X as lt, XIcon as ut, ZoomIn as dt, ZoomOut as ft } from "lucide-react";
|
|
24
23
|
import * as P from "react";
|
|
25
|
-
import { createContext as
|
|
24
|
+
import { createContext as Ae, memo as je, useCallback as F, useContext as Me, useEffect as I, useId as Ne, useLayoutEffect as L, useMemo as R, useReducer as Pe, useRef as z, useState as B, useSyncExternalStore as Fe } from "react";
|
|
26
25
|
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
27
|
-
import { flushSync as
|
|
26
|
+
import { flushSync as Ie } from "react-dom";
|
|
27
|
+
import { ArrowLeft as Le, BookOpenText as Re, ChevronDown as ze, ChevronLeft as Be, ChevronRight as Ve, ChevronUp as He, Download as Ue, Eraser as We, FileText as Ge, FileWarning as Ke, FileX2 as qe, Highlighter as Je, KeyRound as Ye, LayoutGrid as Xe, List as Ze, Loader2 as Qe, Maximize as $e, MessageSquareText as et, Minimize as tt, MoreVertical as nt, MousePointer2 as rt, MoveHorizontal as it, PanelLeft as at, Pen as ot, PencilLine as st, Printer as ct, RotateCw as lt, Search as ut, StickyNote as dt, Type as ft, Underline as pt, Undo2 as mt, Volume2 as ht, X as gt, XIcon as _t, ZoomIn as vt, ZoomOut as yt } from "lucide-react";
|
|
28
28
|
import { createSlice as bt } from "@reduxjs/toolkit";
|
|
29
29
|
import { STATE_ACTION_KEYS as xt, describeError as St, stateCopy as Ct } from "@nxgt/material-core/states";
|
|
30
30
|
import { formatFileSize as wt } from "@nxgt/material-core/format-file-size";
|
|
@@ -692,7 +692,7 @@ function tr({ className: e, color: t, children: r, type: i = "button", variant:
|
|
|
692
692
|
className: n(qn, e)
|
|
693
693
|
})),
|
|
694
694
|
"data-slot": "sheet-close",
|
|
695
|
-
children: r || /* @__PURE__ */ H(
|
|
695
|
+
children: r || /* @__PURE__ */ H(gt, { className: "size-4" })
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
698
|
function nr({ ...e }) {
|
|
@@ -743,7 +743,7 @@ function ir({ className: e, children: t, side: r = "right", withCloseButton: i,
|
|
|
743
743
|
variant: "tonal",
|
|
744
744
|
color: "default"
|
|
745
745
|
}), "absolute right-3 top-3", "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", !a && r !== "bottom" && "top-[max(0.75rem,env(safe-area-inset-top))]", !a && r === "right" && "right-[max(0.75rem,env(safe-area-inset-right))]"),
|
|
746
|
-
children: /* @__PURE__ */ H(
|
|
746
|
+
children: /* @__PURE__ */ H(_t, { className: "size-4" })
|
|
747
747
|
})]
|
|
748
748
|
})] })
|
|
749
749
|
}) });
|
|
@@ -863,7 +863,7 @@ function dr({ className: e }) {
|
|
|
863
863
|
size: "compact",
|
|
864
864
|
kind: "empty",
|
|
865
865
|
className: n("min-h-64 h-full", e),
|
|
866
|
-
icon: /* @__PURE__ */ H(
|
|
866
|
+
icon: /* @__PURE__ */ H(qe, { "aria-hidden": !0 }),
|
|
867
867
|
title: t("material.pdf-reader.empty", "No document selected")
|
|
868
868
|
});
|
|
869
869
|
}
|
|
@@ -872,7 +872,7 @@ function fr() {
|
|
|
872
872
|
return /* @__PURE__ */ U("div", {
|
|
873
873
|
role: "status",
|
|
874
874
|
className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-background/80 backdrop-blur-sm",
|
|
875
|
-
children: [/* @__PURE__ */ H(
|
|
875
|
+
children: [/* @__PURE__ */ H(Qe, { className: "size-8 animate-spin text-primary-text" }), /* @__PURE__ */ H("p", {
|
|
876
876
|
className: "text-sm text-muted-foreground",
|
|
877
877
|
children: e("material.pdf-reader.loading", "Loading document…")
|
|
878
878
|
})]
|
|
@@ -890,13 +890,13 @@ function pr({ error: e, onRetry: t, title: n }) {
|
|
|
890
890
|
});
|
|
891
891
|
}
|
|
892
892
|
function mr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
|
|
893
|
-
let { t: i } = N(), a =
|
|
893
|
+
let { t: i } = N(), a = Ne(), o = z(null);
|
|
894
894
|
return I(() => {
|
|
895
895
|
t && o.current?.focus();
|
|
896
896
|
}, [t]), /* @__PURE__ */ U("div", {
|
|
897
897
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-4",
|
|
898
898
|
children: [
|
|
899
|
-
/* @__PURE__ */ H(
|
|
899
|
+
/* @__PURE__ */ H(Ye, { className: "size-10 text-primary-text opacity-70" }),
|
|
900
900
|
/* @__PURE__ */ H("p", {
|
|
901
901
|
className: "text-sm font-semibold",
|
|
902
902
|
children: i("material.pdf-reader.password", "Password protected")
|
|
@@ -1038,12 +1038,12 @@ var vr = {
|
|
|
1038
1038
|
selectEscapeTarget: (e) => e.annotating ? "annotate" : e.searchOpen ? "search" : null,
|
|
1039
1039
|
selectHeaderKind: (e) => e.annotating ? "annotate" : e.searchOpen ? "search" : "default",
|
|
1040
1040
|
selectRailValue: (e) => e.panelOpen ? e.panelTab : ""
|
|
1041
|
-
}, yr =
|
|
1041
|
+
}, yr = Ae(null), br = Ae(null);
|
|
1042
1042
|
function xr(e, t) {
|
|
1043
1043
|
if (!e) throw Error(`${t} must be used within PdfReader`);
|
|
1044
1044
|
return e;
|
|
1045
1045
|
}
|
|
1046
|
-
var Z = () => xr(
|
|
1046
|
+
var Z = () => xr(Me(yr), "useReaderChrome"), Q = () => xr(Me(br), "useReaderDocumentContext");
|
|
1047
1047
|
function Sr(e) {
|
|
1048
1048
|
return e < 600 ? "compact" : e < 840 ? "medium" : "expanded";
|
|
1049
1049
|
}
|
|
@@ -1301,7 +1301,7 @@ function Fr({ autoFocus: e = !0, stacked: t = !1 }) {
|
|
|
1301
1301
|
tooltip: d,
|
|
1302
1302
|
disabled: o.hitCount === 0,
|
|
1303
1303
|
onClick: () => o.jump(-1),
|
|
1304
|
-
children: /* @__PURE__ */ H(
|
|
1304
|
+
children: /* @__PURE__ */ H(He, {})
|
|
1305
1305
|
})
|
|
1306
1306
|
}), /* @__PURE__ */ H(k, {
|
|
1307
1307
|
label: f,
|
|
@@ -1312,7 +1312,7 @@ function Fr({ autoFocus: e = !0, stacked: t = !1 }) {
|
|
|
1312
1312
|
tooltip: f,
|
|
1313
1313
|
disabled: o.hitCount === 0,
|
|
1314
1314
|
onClick: () => o.jump(1),
|
|
1315
|
-
children: /* @__PURE__ */ H(
|
|
1315
|
+
children: /* @__PURE__ */ H(ze, {})
|
|
1316
1316
|
})
|
|
1317
1317
|
})]
|
|
1318
1318
|
})
|
|
@@ -1507,7 +1507,7 @@ function Zr(e) {
|
|
|
1507
1507
|
s
|
|
1508
1508
|
]);
|
|
1509
1509
|
}
|
|
1510
|
-
var Qr =
|
|
1510
|
+
var Qr = je(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, current: o, tabStop: s, onGo: c }) {
|
|
1511
1511
|
let { t: l } = N(), u = z(null), d = z(null);
|
|
1512
1512
|
Zr({
|
|
1513
1513
|
doc: t,
|
|
@@ -1589,7 +1589,7 @@ function ti() {
|
|
|
1589
1589
|
let { t: e } = N(), { chrome: t } = Z(), { state: n, onOutlineSelect: r } = Q();
|
|
1590
1590
|
return t.panelTab === "thumbs" ? /* @__PURE__ */ H(ei, {}) : t.panelTab === "outline" ? n.outline.length === 0 ? /* @__PURE__ */ U("div", {
|
|
1591
1591
|
className: "flex flex-col items-center gap-2 px-6 py-10 text-center text-muted-foreground text-sm",
|
|
1592
|
-
children: [/* @__PURE__ */ H(
|
|
1592
|
+
children: [/* @__PURE__ */ H(Ze, {
|
|
1593
1593
|
"aria-hidden": !0,
|
|
1594
1594
|
className: "size-6 opacity-60"
|
|
1595
1595
|
}), /* @__PURE__ */ H("p", { children: e("material.pdf-reader.next.outline-empty", "This document has no outline") })]
|
|
@@ -1623,10 +1623,10 @@ var ni = [
|
|
|
1623
1623
|
"initialChrome",
|
|
1624
1624
|
"showUnfinished"
|
|
1625
1625
|
], ai = {
|
|
1626
|
-
thumbs:
|
|
1627
|
-
outline:
|
|
1628
|
-
annotations:
|
|
1629
|
-
search:
|
|
1626
|
+
thumbs: Xe,
|
|
1627
|
+
outline: Ze,
|
|
1628
|
+
annotations: et,
|
|
1629
|
+
search: ut
|
|
1630
1630
|
};
|
|
1631
1631
|
function oi() {
|
|
1632
1632
|
let { t: e } = N();
|
|
@@ -1679,7 +1679,7 @@ function li() {
|
|
|
1679
1679
|
"aria-label": e("material.buttons.close", "Close"),
|
|
1680
1680
|
className: "absolute end-1 top-1 z-10",
|
|
1681
1681
|
onClick: () => r.closePanel(),
|
|
1682
|
-
children: /* @__PURE__ */ H(
|
|
1682
|
+
children: /* @__PURE__ */ H(gt, {})
|
|
1683
1683
|
}), o]
|
|
1684
1684
|
}) : null : /* @__PURE__ */ H($n, {
|
|
1685
1685
|
open: t.panelOpen,
|
|
@@ -2093,7 +2093,7 @@ function ji({ pageNumber: e, error: t, busy: r, onRetry: i, ref: a }) {
|
|
|
2093
2093
|
children: [/* @__PURE__ */ U("div", {
|
|
2094
2094
|
role: "status",
|
|
2095
2095
|
className: "flex flex-col items-center gap-3",
|
|
2096
|
-
children: [/* @__PURE__ */ H(
|
|
2096
|
+
children: [/* @__PURE__ */ H(Ke, {
|
|
2097
2097
|
"aria-hidden": !0,
|
|
2098
2098
|
className: "size-6 shrink-0"
|
|
2099
2099
|
}), /* @__PURE__ */ H("p", {
|
|
@@ -2107,7 +2107,7 @@ function ji({ pageNumber: e, error: t, busy: r, onRetry: i, ref: a }) {
|
|
|
2107
2107
|
"aria-disabled": r || void 0,
|
|
2108
2108
|
onClick: r ? void 0 : i,
|
|
2109
2109
|
"aria-label": o("material.pdf-reader.next.retry-page", "Retry page {page}", { page: e }),
|
|
2110
|
-
children: [/* @__PURE__ */ H(
|
|
2110
|
+
children: [/* @__PURE__ */ H(lt, {
|
|
2111
2111
|
"aria-hidden": !0,
|
|
2112
2112
|
className: n(r && "animate-spin motion-reduce:animate-none")
|
|
2113
2113
|
}), o("material.pdf-reader.retry", "Retry")]
|
|
@@ -2116,7 +2116,7 @@ function ji({ pageNumber: e, error: t, busy: r, onRetry: i, ref: a }) {
|
|
|
2116
2116
|
}
|
|
2117
2117
|
//#endregion
|
|
2118
2118
|
//#region lib/components/ui/media/pdf-reader/partials/page-view.tsx
|
|
2119
|
-
var Mi =
|
|
2119
|
+
var Mi = je(function({ pageNumber: e, top: t, offset: r, width: i, height: a, env: o }) {
|
|
2120
2120
|
let { setPage: s, canvas: c, text: l, annotations: u, drawn: d, failed: f } = Ei(e, o), p = {
|
|
2121
2121
|
top: t,
|
|
2122
2122
|
left: `calc(50% + ${r}px)`,
|
|
@@ -2233,7 +2233,7 @@ function Fi() {
|
|
|
2233
2233
|
...t,
|
|
2234
2234
|
className: "pointer-events-auto",
|
|
2235
2235
|
children: /* @__PURE__ */ H(M, {
|
|
2236
|
-
icon: /* @__PURE__ */ H(
|
|
2236
|
+
icon: /* @__PURE__ */ H(tt, {}),
|
|
2237
2237
|
label: r,
|
|
2238
2238
|
onClick: n
|
|
2239
2239
|
})
|
|
@@ -2266,7 +2266,7 @@ function Ii(e, t, n = !0) {
|
|
|
2266
2266
|
//#region lib/components/ui/media/pdf-reader/use-fullscreen-enabled.ts
|
|
2267
2267
|
var Li = () => () => {};
|
|
2268
2268
|
function Ri() {
|
|
2269
|
-
return
|
|
2269
|
+
return Fe(Li, () => document.fullscreenEnabled === !0, () => !1);
|
|
2270
2270
|
}
|
|
2271
2271
|
//#endregion
|
|
2272
2272
|
//#region lib/components/ui/media/pdf-reader/partials/annotate-header.tsx
|
|
@@ -2289,7 +2289,7 @@ function zi() {
|
|
|
2289
2289
|
})]
|
|
2290
2290
|
}),
|
|
2291
2291
|
/* @__PURE__ */ H(M, {
|
|
2292
|
-
icon: /* @__PURE__ */ H(
|
|
2292
|
+
icon: /* @__PURE__ */ H(mt, {}),
|
|
2293
2293
|
label: e("material.pdf-reader.next.annotate-undo", "Undo"),
|
|
2294
2294
|
disabled: !0
|
|
2295
2295
|
}),
|
|
@@ -2316,7 +2316,7 @@ function Bi() {
|
|
|
2316
2316
|
return /* @__PURE__ */ U("div", {
|
|
2317
2317
|
className: "flex min-w-0 flex-1 items-center gap-2.5 px-1.5",
|
|
2318
2318
|
children: [
|
|
2319
|
-
/* @__PURE__ */ H(
|
|
2319
|
+
/* @__PURE__ */ H(Ge, {
|
|
2320
2320
|
"aria-hidden": !0,
|
|
2321
2321
|
className: "size-5 shrink-0 text-primary-text"
|
|
2322
2322
|
}),
|
|
@@ -2338,22 +2338,22 @@ function Vi({ action: e }) {
|
|
|
2338
2338
|
let { t } = N(), { leave: n, toggleFullscreen: r } = Z();
|
|
2339
2339
|
switch (e.kind) {
|
|
2340
2340
|
case "back": return /* @__PURE__ */ H(M, {
|
|
2341
|
-
icon: /* @__PURE__ */ H(
|
|
2341
|
+
icon: /* @__PURE__ */ H(Le, {}),
|
|
2342
2342
|
label: t("material.pdf-reader.next.back", "Back"),
|
|
2343
2343
|
onClick: n
|
|
2344
2344
|
});
|
|
2345
2345
|
case "close": return /* @__PURE__ */ H(M, {
|
|
2346
|
-
icon: /* @__PURE__ */ H(
|
|
2346
|
+
icon: /* @__PURE__ */ H(gt, {}),
|
|
2347
2347
|
label: t("material.buttons.close", "Close"),
|
|
2348
2348
|
onClick: n
|
|
2349
2349
|
});
|
|
2350
2350
|
case "exit-fullscreen": return /* @__PURE__ */ H(M, {
|
|
2351
|
-
icon: /* @__PURE__ */ H(
|
|
2351
|
+
icon: /* @__PURE__ */ H(tt, {}),
|
|
2352
2352
|
label: t("material.pdf-reader.exit-fullscreen", "Exit fullscreen"),
|
|
2353
2353
|
onClick: n
|
|
2354
2354
|
});
|
|
2355
2355
|
case "fullscreen": return /* @__PURE__ */ H(M, {
|
|
2356
|
-
icon: /* @__PURE__ */ H(
|
|
2356
|
+
icon: /* @__PURE__ */ H($e, {}),
|
|
2357
2357
|
label: t("material.pdf-reader.fullscreen", "Fullscreen"),
|
|
2358
2358
|
onClick: r
|
|
2359
2359
|
});
|
|
@@ -2377,19 +2377,19 @@ function Ui() {
|
|
|
2377
2377
|
/* @__PURE__ */ H(D, {}),
|
|
2378
2378
|
/* @__PURE__ */ U(O, {
|
|
2379
2379
|
onSelect: t.zoomIn,
|
|
2380
|
-
children: [/* @__PURE__ */ H(
|
|
2380
|
+
children: [/* @__PURE__ */ H(vt, {}), e("material.pdf-reader.zoom-in", "Zoom in")]
|
|
2381
2381
|
}),
|
|
2382
2382
|
/* @__PURE__ */ U(O, {
|
|
2383
2383
|
onSelect: t.zoomOut,
|
|
2384
|
-
children: [/* @__PURE__ */ H(
|
|
2384
|
+
children: [/* @__PURE__ */ H(yt, {}), e("material.pdf-reader.zoom-out", "Zoom out")]
|
|
2385
2385
|
}),
|
|
2386
2386
|
/* @__PURE__ */ U(O, {
|
|
2387
2387
|
onSelect: () => t.setFitMode("width"),
|
|
2388
|
-
children: [/* @__PURE__ */ H(
|
|
2388
|
+
children: [/* @__PURE__ */ H(it, {}), e("material.pdf-reader.fit-width-full", "Fit Width")]
|
|
2389
2389
|
}),
|
|
2390
2390
|
/* @__PURE__ */ U(O, {
|
|
2391
2391
|
onSelect: () => t.setFitMode("page"),
|
|
2392
|
-
children: [/* @__PURE__ */ H(
|
|
2392
|
+
children: [/* @__PURE__ */ H($e, {}), e("material.pdf-reader.fit-page-full", "Fit Page")]
|
|
2393
2393
|
})
|
|
2394
2394
|
] });
|
|
2395
2395
|
}
|
|
@@ -2401,7 +2401,7 @@ var Wi = [
|
|
|
2401
2401
|
"spread-cover"
|
|
2402
2402
|
];
|
|
2403
2403
|
function Gi() {
|
|
2404
|
-
let { t: e } = N(), { chrome: t, chromeActions: n, layout: r } = Z(), i =
|
|
2404
|
+
let { t: e } = N(), { chrome: t, chromeActions: n, layout: r } = Z(), i = Ne(), a = r.narrow ? "single" : t.layout, o = {
|
|
2405
2405
|
single: e("material.pdf-reader.next.layout-single", "Single page"),
|
|
2406
2406
|
spread: e("material.pdf-reader.next.layout-two", "Two pages"),
|
|
2407
2407
|
"spread-cover": e("material.pdf-reader.next.layout-two-cover", "Two pages with cover")
|
|
@@ -2438,7 +2438,7 @@ function Ki() {
|
|
|
2438
2438
|
asChild: !0,
|
|
2439
2439
|
className: t.selectedLook === "morph" ? "rounded-[var(--c-ss)] focus:bg-(--m-bg) hover:bg-(--m-bg)" : void 0,
|
|
2440
2440
|
children: /* @__PURE__ */ H(M, {
|
|
2441
|
-
icon: /* @__PURE__ */ H(
|
|
2441
|
+
icon: /* @__PURE__ */ H(nt, {}),
|
|
2442
2442
|
label: e("material.toolbar.more", "More")
|
|
2443
2443
|
})
|
|
2444
2444
|
}), /* @__PURE__ */ U(se, {
|
|
@@ -2448,20 +2448,20 @@ function Ki() {
|
|
|
2448
2448
|
children: [
|
|
2449
2449
|
f ? /* @__PURE__ */ U(O, {
|
|
2450
2450
|
onSelect: i,
|
|
2451
|
-
children: [/* @__PURE__ */ H(
|
|
2451
|
+
children: [/* @__PURE__ */ H(ut, {}), e("material.pdf-reader.search", "Search")]
|
|
2452
2452
|
}) : null,
|
|
2453
2453
|
d ? /* @__PURE__ */ H(Hi, {}) : null,
|
|
2454
2454
|
/* @__PURE__ */ U(O, {
|
|
2455
2455
|
onSelect: s.rotate,
|
|
2456
|
-
children: [/* @__PURE__ */ H(
|
|
2456
|
+
children: [/* @__PURE__ */ H(lt, {}), e("material.pdf-reader.rotate", "Rotate")]
|
|
2457
2457
|
}),
|
|
2458
2458
|
/* @__PURE__ */ U(O, {
|
|
2459
2459
|
onSelect: c.print,
|
|
2460
|
-
children: [/* @__PURE__ */ H(
|
|
2460
|
+
children: [/* @__PURE__ */ H(ct, {}), e("material.pdf-reader.print", "Print")]
|
|
2461
2461
|
}),
|
|
2462
2462
|
d || f ? /* @__PURE__ */ U(O, {
|
|
2463
2463
|
onSelect: c.download,
|
|
2464
|
-
children: [/* @__PURE__ */ H(
|
|
2464
|
+
children: [/* @__PURE__ */ H(Ue, {}), e("material.pdf-reader.download", "Download")]
|
|
2465
2465
|
}) : null,
|
|
2466
2466
|
/* @__PURE__ */ H(oe, {
|
|
2467
2467
|
checked: o.nightMode,
|
|
@@ -2475,11 +2475,11 @@ function Ki() {
|
|
|
2475
2475
|
/* @__PURE__ */ H(D, {}),
|
|
2476
2476
|
/* @__PURE__ */ U(O, {
|
|
2477
2477
|
disabled: !0,
|
|
2478
|
-
children: [/* @__PURE__ */ H(
|
|
2478
|
+
children: [/* @__PURE__ */ H(ht, {}), e("material.pdf-reader.next.read-aloud", "Read aloud")]
|
|
2479
2479
|
}),
|
|
2480
2480
|
/* @__PURE__ */ U(O, {
|
|
2481
2481
|
disabled: !0,
|
|
2482
|
-
children: [/* @__PURE__ */ H(
|
|
2482
|
+
children: [/* @__PURE__ */ H(Re, {}), e("material.pdf-reader.next.reflow", "Reflowed text")]
|
|
2483
2483
|
})
|
|
2484
2484
|
] }) : null
|
|
2485
2485
|
]
|
|
@@ -2496,7 +2496,7 @@ function qi() {
|
|
|
2496
2496
|
...t,
|
|
2497
2497
|
className: "shrink-0 border-b border-border",
|
|
2498
2498
|
children: [/* @__PURE__ */ H(M, {
|
|
2499
|
-
icon: /* @__PURE__ */ H(
|
|
2499
|
+
icon: /* @__PURE__ */ H(Le, {}),
|
|
2500
2500
|
label: e("material.pdf-reader.next.search-close", "Close search"),
|
|
2501
2501
|
onClick: () => n.closeSearchField()
|
|
2502
2502
|
}), /* @__PURE__ */ H(Fr, {})]
|
|
@@ -2519,13 +2519,13 @@ function Yi() {
|
|
|
2519
2519
|
l?.place === "start" ? /* @__PURE__ */ H(Vi, { action: l }) : null,
|
|
2520
2520
|
/* @__PURE__ */ H(Bi, {}),
|
|
2521
2521
|
/* @__PURE__ */ H(M, {
|
|
2522
|
-
icon: /* @__PURE__ */ H(
|
|
2522
|
+
icon: /* @__PURE__ */ H(ut, {}),
|
|
2523
2523
|
label: e("material.pdf-reader.search", "Search"),
|
|
2524
2524
|
onClick: a,
|
|
2525
2525
|
"data-focus-target": "search"
|
|
2526
2526
|
}),
|
|
2527
2527
|
s ? null : /* @__PURE__ */ H(M, {
|
|
2528
|
-
icon: /* @__PURE__ */ H(
|
|
2528
|
+
icon: /* @__PURE__ */ H(Ue, {}),
|
|
2529
2529
|
label: e("material.pdf-reader.download", "Download"),
|
|
2530
2530
|
onClick: o.download
|
|
2531
2531
|
}),
|
|
@@ -2548,7 +2548,7 @@ function Xi(e, t, n) {
|
|
|
2548
2548
|
let e = t.current;
|
|
2549
2549
|
if (!e || !i) return;
|
|
2550
2550
|
let n = (e) => {
|
|
2551
|
-
e.key === "Tab" &&
|
|
2551
|
+
e.key === "Tab" && Ie(() => o(!0));
|
|
2552
2552
|
};
|
|
2553
2553
|
return e.addEventListener("keydown", n, !0), () => e.removeEventListener("keydown", n, !0);
|
|
2554
2554
|
}, [t, i]), i && !a && !n;
|
|
@@ -2562,13 +2562,13 @@ var Zi = {
|
|
|
2562
2562
|
pink: "bg-pink-400",
|
|
2563
2563
|
red: "bg-red-500"
|
|
2564
2564
|
}, Qi = "inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-full border-0 bg-transparent px-2.5 text-inherit tabular-nums outline-0 outline-offset-2 transition-colors hover:bg-(--tb-hover) active:bg-(--tb-press) focus-visible:outline-2 focus-visible:outline-(--tb-focus,var(--primary-text))", $i = {
|
|
2565
|
-
pointer: /* @__PURE__ */ H(
|
|
2566
|
-
highlight: /* @__PURE__ */ H(
|
|
2567
|
-
underline: /* @__PURE__ */ H(
|
|
2568
|
-
pen: /* @__PURE__ */ H(
|
|
2569
|
-
note: /* @__PURE__ */ H(
|
|
2570
|
-
text: /* @__PURE__ */ H(
|
|
2571
|
-
eraser: /* @__PURE__ */ H(
|
|
2565
|
+
pointer: /* @__PURE__ */ H(rt, {}),
|
|
2566
|
+
highlight: /* @__PURE__ */ H(Je, {}),
|
|
2567
|
+
underline: /* @__PURE__ */ H(pt, {}),
|
|
2568
|
+
pen: /* @__PURE__ */ H(ot, {}),
|
|
2569
|
+
note: /* @__PURE__ */ H(dt, {}),
|
|
2570
|
+
text: /* @__PURE__ */ H(ft, {}),
|
|
2571
|
+
eraser: /* @__PURE__ */ H(We, {})
|
|
2572
2572
|
}, ea = [
|
|
2573
2573
|
"highlight",
|
|
2574
2574
|
"pen",
|
|
@@ -2706,7 +2706,7 @@ function oa() {
|
|
|
2706
2706
|
let { t: e, language: t } = N(), { state: n, actions: r, scale: i, limits: a } = Q(), o = u(), s = (e) => kr(e, t ?? "en"), c = n.fitMode === "custom" ? String(n.scale) : n.fitMode, l = (e) => e === "width" || e === "page" ? r.setFitMode(e) : r.setScale(Number(e)), d = e("material.pdf-reader.zoom-menu", "Zoom level {level}", { level: s(i) });
|
|
2707
2707
|
return /* @__PURE__ */ U(V, { children: [
|
|
2708
2708
|
/* @__PURE__ */ H(M, {
|
|
2709
|
-
icon: /* @__PURE__ */ H(
|
|
2709
|
+
icon: /* @__PURE__ */ H(yt, {}),
|
|
2710
2710
|
label: e("material.pdf-reader.zoom-out", "Zoom out"),
|
|
2711
2711
|
disabled: i <= a.minScale,
|
|
2712
2712
|
onClick: r.zoomOut
|
|
@@ -2749,7 +2749,7 @@ function oa() {
|
|
|
2749
2749
|
})]
|
|
2750
2750
|
}),
|
|
2751
2751
|
/* @__PURE__ */ H(M, {
|
|
2752
|
-
icon: /* @__PURE__ */ H(
|
|
2752
|
+
icon: /* @__PURE__ */ H(vt, {}),
|
|
2753
2753
|
label: e("material.pdf-reader.zoom-in", "Zoom in"),
|
|
2754
2754
|
disabled: i >= a.maxScale,
|
|
2755
2755
|
onClick: r.zoomIn
|
|
@@ -2762,7 +2762,7 @@ function sa() {
|
|
|
2762
2762
|
let { t: e } = N(), { chrome: t, chromeActions: n, props: r, mode: i } = Z(), { state: a, actions: o, rowStarts: s } = Q(), { size: c } = t;
|
|
2763
2763
|
return /* @__PURE__ */ U(V, { children: [
|
|
2764
2764
|
c === "medium" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(me, {
|
|
2765
|
-
icon: /* @__PURE__ */ H(
|
|
2765
|
+
icon: /* @__PURE__ */ H(at, {
|
|
2766
2766
|
"aria-hidden": !0,
|
|
2767
2767
|
className: "rtl:-scale-x-100"
|
|
2768
2768
|
}),
|
|
@@ -2771,7 +2771,7 @@ function sa() {
|
|
|
2771
2771
|
onPressedChange: () => n.togglePanel()
|
|
2772
2772
|
}), /* @__PURE__ */ H(j, {})] }) : null,
|
|
2773
2773
|
/* @__PURE__ */ H(M, {
|
|
2774
|
-
icon: /* @__PURE__ */ H(
|
|
2774
|
+
icon: /* @__PURE__ */ H(Be, {
|
|
2775
2775
|
"aria-hidden": !0,
|
|
2776
2776
|
className: "rtl:rotate-180"
|
|
2777
2777
|
}),
|
|
@@ -2781,7 +2781,7 @@ function sa() {
|
|
|
2781
2781
|
}),
|
|
2782
2782
|
/* @__PURE__ */ H(ia, {}),
|
|
2783
2783
|
/* @__PURE__ */ H(M, {
|
|
2784
|
-
icon: /* @__PURE__ */ H(
|
|
2784
|
+
icon: /* @__PURE__ */ H(Ve, {
|
|
2785
2785
|
"aria-hidden": !0,
|
|
2786
2786
|
className: "rtl:rotate-180"
|
|
2787
2787
|
}),
|
|
@@ -2791,7 +2791,7 @@ function sa() {
|
|
|
2791
2791
|
}),
|
|
2792
2792
|
c === "compact" ? null : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(j, {}), /* @__PURE__ */ H(oa, {})] }),
|
|
2793
2793
|
r.annotate ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(j, {}), /* @__PURE__ */ H(M, {
|
|
2794
|
-
icon: /* @__PURE__ */ H(
|
|
2794
|
+
icon: /* @__PURE__ */ H(st, {}),
|
|
2795
2795
|
label: e("material.pdf-reader.next.annotate", "Annotate"),
|
|
2796
2796
|
onClick: () => n.startAnnotating(),
|
|
2797
2797
|
"data-focus-target": "annotate"
|
|
@@ -3167,7 +3167,7 @@ function Ta(e, t, n) {
|
|
|
3167
3167
|
//#endregion
|
|
3168
3168
|
//#region lib/components/ui/media/pdf-viewer/use-pdf-reader.ts
|
|
3169
3169
|
function Ea(e) {
|
|
3170
|
-
let [t, n] =
|
|
3170
|
+
let [t, n] = Pe(ba, e, va), r = z(null), [i, a] = B(0), o = wa(r, t.numPages > 0, n);
|
|
3171
3171
|
I(() => {
|
|
3172
3172
|
o.reset(), n({
|
|
3173
3173
|
type: "RESET_DOCUMENT",
|