@krosoft/react 0.0.373 → 0.0.375

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 (67) hide show
  1. package/dist/{AppActions-DwzK-4t7.js → AppActions-DeTaseV8.js} +1 -1
  2. package/dist/{AppMarkdown-ZT7xBtTk.js → AppMarkdown-C0ehlRtp.js} +1 -1
  3. package/dist/{AppSubTitle-Bf9rFryk.js → AppSubTitle-OueYEE4L.js} +2 -2
  4. package/dist/{AppTitle-CQgw2Ody.js → AppTitle-J-S0HNmz.js} +1 -1
  5. package/dist/{ErrorAlert-BYy61fcZ.js → ErrorAlert-CjapT2rI.js} +1 -1
  6. package/dist/{GenericForm-C-vJXpaF.js → GenericForm-Ze6ukTAA.js} +5 -5
  7. package/dist/{ImageInput-BDTQi0U9.js → ImageInput-BnPaGgnU.js} +1 -1
  8. package/dist/{MultiSelect-60rgAOBX.js → MultiSelect-BnidY_Ma.js} +2 -2
  9. package/dist/SearchInput-BIA1rBub.js +36 -0
  10. package/dist/{SearchInput-CqU6crOu.js → SingleSelect-CbIP1XXV.js} +107 -134
  11. package/dist/{behavior-DRGttGb4.js → behavior-BUdJHPMQ.js} +1 -1
  12. package/dist/{cards-Bwm6Scwc.js → cards-olakli0j.js} +1 -1
  13. package/dist/changelog-1_YeDWEy.js +208 -0
  14. package/dist/{charts-hsygNEkd.js → charts-674ZKA0q.js} +1 -1
  15. package/dist/components/core/cards/index.js +1 -1
  16. package/dist/components/core/changelog/AppChangelog.d.ts +3 -1
  17. package/dist/components/core/changelog/AppChangelog.d.ts.map +1 -1
  18. package/dist/components/core/changelog/AppChangelogEntry.d.ts +3 -1
  19. package/dist/components/core/changelog/AppChangelogEntry.d.ts.map +1 -1
  20. package/dist/components/core/changelog/AppChangelogTagFilter.d.ts +12 -0
  21. package/dist/components/core/changelog/AppChangelogTagFilter.d.ts.map +1 -0
  22. package/dist/components/core/changelog/index.js +1 -1
  23. package/dist/components/core/charts/index.js +1 -1
  24. package/dist/components/core/dialogs/index.js +2 -2
  25. package/dist/components/core/filters/index.js +20 -19
  26. package/dist/components/core/forms/index.js +1 -1
  27. package/dist/components/core/index.js +21 -20
  28. package/dist/components/core/inputs/index.js +6 -5
  29. package/dist/components/core/language/index.js +1 -1
  30. package/dist/components/core/layouts/index.js +7 -7
  31. package/dist/components/core/markdown/index.js +1 -1
  32. package/dist/components/core/navbar/index.js +1 -1
  33. package/dist/components/core/states/index.js +2 -2
  34. package/dist/components/core/table/index.js +2 -2
  35. package/dist/components/core/tabs/index.js +4 -4
  36. package/dist/components/core/theme/index.js +1 -1
  37. package/dist/components/index.js +21 -20
  38. package/dist/components/ui/index.js +1 -1
  39. package/dist/{dialogs-0PwhK6c1.js → dialogs-CZs-1NsV.js} +4 -4
  40. package/dist/helpers/changelog.helper.d.ts +14 -0
  41. package/dist/helpers/changelog.helper.d.ts.map +1 -1
  42. package/dist/helpers/index.js +61 -15
  43. package/dist/hooks/behavior/index.js +1 -1
  44. package/dist/hooks/index.js +4 -4
  45. package/dist/hooks/ui/index.js +3 -3
  46. package/dist/i18n/index.js +1 -1
  47. package/dist/i18n/krosoftLocales.d.ts +6 -0
  48. package/dist/i18n/krosoftLocales.d.ts.map +1 -1
  49. package/dist/{i18n-CytpX2hK.js → i18n-w2FziHQf.js} +8 -2
  50. package/dist/{inputs-D-ZCdo5D.js → inputs-DidSjfrq.js} +1 -1
  51. package/dist/{language-Du46nzYN.js → language-BdqnKech.js} +2 -2
  52. package/dist/{navbar-j2_a1yrA.js → navbar-BvxHHN-8.js} +3 -3
  53. package/dist/pwa/index.js +1 -1
  54. package/dist/seasonal/index.js +1 -1
  55. package/dist/{sheet-AgDmjyf2.js → sheet-CGz2TZ_Z.js} +1 -1
  56. package/dist/{states-BVEFGM99.js → states-Bz4MEmfX.js} +1 -1
  57. package/dist/{theme-CVY1Dh3F.js → theme-DRs7tId5.js} +2 -2
  58. package/dist/types/ChangelogItem.d.ts +8 -0
  59. package/dist/types/ChangelogItem.d.ts.map +1 -0
  60. package/dist/types/index.d.ts +1 -0
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/{useDocumentTitle-DYRVJ5wt.js → useDocumentTitle-BJ5nJtLS.js} +1 -1
  63. package/dist/{useLanguage-CJM24_Ab.js → useLanguage-BvcHTj-R.js} +1 -1
  64. package/dist/{useTheme-C5PI6ifZ.js → useTheme-D90lnVPl.js} +1 -1
  65. package/package.json +1 -1
  66. package/dist/changelog-DA5nb3BI.js +0 -126
  67. package/dist/changelog.helper-BjCKlB0M.js +0 -31
@@ -1,126 +0,0 @@
1
- import { t as e } from "./changelog.helper-BjCKlB0M.js";
2
- import { t } from "./tailwind.helper-CJaRYBmL.js";
3
- import { r as n, t as r } from "./i18n-CytpX2hK.js";
4
- import { t as i } from "./useNotifications-CyhTruIG.js";
5
- import { t as a } from "./AppMarkdown-ZT7xBtTk.js";
6
- import { useEffect as o, useMemo as s } from "react";
7
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
8
- import { LinkIcon as d } from "lucide-react";
9
- import { useLocation as f, useNavigate as p } from "react-router-dom";
10
- import { format as m } from "date-fns";
11
- //#region src/components/core/changelog/AppChangelogEntry.tsx
12
- var h = ({ entry: e, isLatest: i, isLast: o, isActive: s, onSelect: f, onCopyLink: p }) => {
13
- let { t: h } = r(), g = n();
14
- return /* @__PURE__ */ u("section", {
15
- id: e.id,
16
- className: "group flex scroll-mt-4 gap-4",
17
- children: [/* @__PURE__ */ u("div", {
18
- className: "flex w-24 shrink-0 flex-col items-center",
19
- children: [
20
- /* @__PURE__ */ l("a", {
21
- href: `#${e.id}`,
22
- onClick: (t) => {
23
- t.preventDefault(), f(e.id);
24
- },
25
- className: t("mb-2 text-center text-xs font-medium leading-tight text-muted-foreground hover:text-primary", s && "text-primary"),
26
- children: e.date ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("span", {
27
- className: "block",
28
- children: m(e.date, "d MMM yyyy", { locale: g })
29
- }), e.hasTime ? /* @__PURE__ */ l("span", {
30
- className: "block opacity-70",
31
- children: m(e.date, "HH:mm", { locale: g })
32
- }) : null] }) : e.title
33
- }),
34
- /* @__PURE__ */ l("div", { className: t("relative z-10 size-3 shrink-0 rounded-full", i ? "bg-primary" : "bg-muted-foreground/40", s && "ring-4 ring-primary/20") }),
35
- o ? null : /* @__PURE__ */ l("div", { className: "w-0.5 grow bg-border" })
36
- ]
37
- }), /* @__PURE__ */ u("div", {
38
- className: t("relative mb-6 min-w-0 grow rounded-lg border bg-card px-5 py-4 pr-12 shadow-sm transition-colors [&>p:last-child]:mb-0", s && "border-primary/50"),
39
- children: [/* @__PURE__ */ l("button", {
40
- type: "button",
41
- onClick: () => {
42
- p(e.id);
43
- },
44
- title: h("markdown.copyLink"),
45
- "aria-label": h("markdown.copyLink"),
46
- className: "absolute right-4 top-4 inline-flex text-muted-foreground transition-opacity hover:text-primary md:opacity-0 md:focus-visible:opacity-100 md:group-hover:opacity-100",
47
- children: /* @__PURE__ */ l(d, { className: "size-4" })
48
- }), /* @__PURE__ */ l(a, {
49
- content: e.content,
50
- headingAnchors: !1
51
- })]
52
- })]
53
- });
54
- }, g = ({ entries: e, activeId: i, onSelect: a, className: o }) => {
55
- let { t: s } = r(), c = n();
56
- return /* @__PURE__ */ u("nav", {
57
- "aria-label": s("changelog.nav"),
58
- className: o,
59
- children: [/* @__PURE__ */ l("p", {
60
- className: "mb-2 px-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
61
- children: s("changelog.nav")
62
- }), /* @__PURE__ */ l("ul", {
63
- className: "space-y-0.5 border-l",
64
- children: e.map((e) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("a", {
65
- href: `#${e.id}`,
66
- onClick: (t) => {
67
- t.preventDefault(), a(e.id);
68
- },
69
- className: t("-ml-px block border-l-2 border-transparent px-3 py-1 text-sm text-muted-foreground hover:border-muted-foreground/40 hover:text-foreground", e.id === i && "border-primary font-medium text-primary hover:border-primary hover:text-primary"),
70
- children: e.date ? m(e.date, e.hasTime ? "d MMM yyyy · HH:mm" : "d MMM yyyy", { locale: c }) : e.title
71
- }) }, e.id))
72
- })]
73
- });
74
- }, _ = ({ content: t, showNav: n = !0 }) => {
75
- let { t: a } = r(), { showSuccess: c, showError: d } = i(), m = f(), _ = p(), v = s(() => e(t), [t]), y = decodeURIComponent(m.hash.slice(1)), b = v.some((e) => e.id === y) ? y : void 0;
76
- o(() => {
77
- if (!b) return;
78
- let e = requestAnimationFrame(() => {
79
- document.getElementById(b)?.scrollIntoView({
80
- behavior: "smooth",
81
- block: "start"
82
- });
83
- });
84
- return () => {
85
- cancelAnimationFrame(e);
86
- };
87
- }, [b]);
88
- let x = (e) => {
89
- _({
90
- search: m.search,
91
- hash: `#${e}`
92
- }, { replace: !0 });
93
- }, S = async (e) => {
94
- x(e);
95
- let t = `${window.location.origin}${m.pathname}${m.search}#${e}`;
96
- try {
97
- await navigator.clipboard.writeText(t), c(a("markdown.linkCopied"));
98
- } catch {
99
- d(a("markdown.linkCopyError"));
100
- }
101
- };
102
- return v.length === 0 ? /* @__PURE__ */ l("p", {
103
- className: "text-sm text-muted-foreground",
104
- children: a("changelog.empty")
105
- }) : /* @__PURE__ */ u("div", {
106
- className: "flex gap-8",
107
- children: [/* @__PURE__ */ l("div", {
108
- className: "min-w-0 flex-1",
109
- children: v.map((e, t) => /* @__PURE__ */ l(h, {
110
- entry: e,
111
- isLatest: t === 0,
112
- isLast: t === v.length - 1,
113
- isActive: e.id === b,
114
- onSelect: x,
115
- onCopyLink: (e) => void S(e)
116
- }, e.id))
117
- }), n ? /* @__PURE__ */ l(g, {
118
- entries: v,
119
- activeId: b,
120
- onSelect: x,
121
- className: "sticky top-4 hidden max-h-[calc(100vh-2rem)] w-52 shrink-0 self-start overflow-y-auto xl:block"
122
- }) : null]
123
- });
124
- };
125
- //#endregion
126
- export { _ as t };
@@ -1,31 +0,0 @@
1
- //#region src/helpers/changelog.helper.ts
2
- var e = /^## +(.+?)\s*$/, t = /^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}))?/, n = (e) => e.trim().toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu, "").replace(/\s/g, "-"), r = (e) => {
3
- let n = t.exec(e);
4
- if (!n) return { hasTime: !1 };
5
- let [, r, i, a, o, s] = n, c = o !== void 0 && s !== void 0, l = new Date(Number(r), Number(i) - 1, Number(a), c ? Number(o) : 0, c ? Number(s) : 0);
6
- return Number.isNaN(l.getTime()) ? { hasTime: !1 } : {
7
- date: l,
8
- hasTime: c
9
- };
10
- }, i = (t) => {
11
- let i = [], a = /* @__PURE__ */ new Map(), o, s = () => {
12
- if (!o) return;
13
- let e = n(o.title), t = a.get(e) ?? 0;
14
- a.set(e, t + 1), i.push({
15
- id: t === 0 ? e : `${e}-${String(t)}`,
16
- title: o.title,
17
- ...r(o.title),
18
- content: o.lines.join("\n").trim()
19
- });
20
- };
21
- for (let n of t.split(/\r?\n/)) {
22
- let t = e.exec(n)?.[1];
23
- t === void 0 ? o?.lines.push(n) : (s(), o = {
24
- title: t,
25
- lines: []
26
- });
27
- }
28
- return s(), i;
29
- };
30
- //#endregion
31
- export { n, i as t };