@krosoft/react 0.0.374 → 0.0.376

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 (71) hide show
  1. package/dist/{AppActions-ooZhFY4I.js → AppActions-8HjAaTQK.js} +1 -1
  2. package/dist/{AppMarkdown-DR9Xzort.js → AppMarkdown-CAxm82x0.js} +1 -1
  3. package/dist/{AppSubTitle-RDgLo82r.js → AppSubTitle-DI62BaaB.js} +2 -2
  4. package/dist/{AppTitle-HcuNVulh.js → AppTitle-BXoTrXQc.js} +1 -1
  5. package/dist/{ErrorAlert-Cyqycy2z.js → ErrorAlert-cJnfBL8H.js} +1 -1
  6. package/dist/{GenericForm-DrFyl2wt.js → GenericForm-Dxd6k7l-.js} +5 -5
  7. package/dist/{ImageInput-Br8DQPTc.js → ImageInput-BeIOm3GY.js} +1 -1
  8. package/dist/{MultiSelect-Bht0L5il.js → MultiSelect-DPN046kI.js} +2 -2
  9. package/dist/{SearchInput-VVu1aIU4.js → SearchInput-IT_Rvthr.js} +2 -2
  10. package/dist/{SingleSelect-8V30LYCi.js → SingleSelect-DLY5WylQ.js} +3 -3
  11. package/dist/{behavior-DUMKzliu.js → behavior-B0BYivtN.js} +1 -1
  12. package/dist/{cards-s1HOBgc6.js → cards-DPzVebUM.js} +1 -1
  13. package/dist/changelog-D0SbAISW.js +231 -0
  14. package/dist/{charts-DH_x5yPB.js → charts-C7rKxkli.js} +1 -1
  15. package/dist/components/core/cards/index.js +1 -1
  16. package/dist/components/core/changelog/AppChangelog.d.ts +5 -4
  17. package/dist/components/core/changelog/AppChangelog.d.ts.map +1 -1
  18. package/dist/components/core/changelog/AppChangelogEntry.d.ts +4 -5
  19. package/dist/components/core/changelog/AppChangelogEntry.d.ts.map +1 -1
  20. package/dist/components/core/changelog/AppChangelogNav.d.ts +1 -1
  21. package/dist/components/core/changelog/AppChangelogNav.d.ts.map +1 -1
  22. package/dist/components/core/changelog/AppChangelogTagFilter.d.ts +12 -0
  23. package/dist/components/core/changelog/AppChangelogTagFilter.d.ts.map +1 -0
  24. package/dist/components/core/changelog/index.js +1 -1
  25. package/dist/components/core/charts/index.js +1 -1
  26. package/dist/components/core/dialogs/index.js +2 -2
  27. package/dist/components/core/filters/index.js +5 -5
  28. package/dist/components/core/forms/index.js +1 -1
  29. package/dist/components/core/index.js +20 -20
  30. package/dist/components/core/inputs/index.js +5 -5
  31. package/dist/components/core/language/index.js +1 -1
  32. package/dist/components/core/layouts/index.js +7 -7
  33. package/dist/components/core/markdown/index.js +1 -1
  34. package/dist/components/core/navbar/index.js +1 -1
  35. package/dist/components/core/states/index.js +2 -2
  36. package/dist/components/core/table/index.js +2 -2
  37. package/dist/components/core/tabs/index.js +4 -4
  38. package/dist/components/core/theme/index.js +1 -1
  39. package/dist/components/index.js +20 -20
  40. package/dist/components/ui/command.d.ts +1 -1
  41. package/dist/components/ui/index.js +1 -1
  42. package/dist/{dialogs-BGwVb_uW.js → dialogs-CG9Q7pqY.js} +4 -4
  43. package/dist/helpers/changelog.helper.d.ts +14 -5
  44. package/dist/helpers/changelog.helper.d.ts.map +1 -1
  45. package/dist/helpers/index.js +58 -33
  46. package/dist/hooks/behavior/index.js +1 -1
  47. package/dist/hooks/index.js +4 -4
  48. package/dist/hooks/ui/index.js +3 -3
  49. package/dist/i18n/index.js +1 -1
  50. package/dist/i18n/krosoftLocales.d.ts +4 -2
  51. package/dist/i18n/krosoftLocales.d.ts.map +1 -1
  52. package/dist/{i18n-Cpw8DZt1.js → i18n-BhLphJa3.js} +6 -4
  53. package/dist/{inputs-ClkjpjY4.js → inputs-CBojnClc.js} +1 -1
  54. package/dist/{language-Bb_6jQEn.js → language-DY0EYabh.js} +2 -2
  55. package/dist/{navbar-CBtXvlA_.js → navbar-DD0V0pNE.js} +3 -3
  56. package/dist/pwa/index.js +1 -1
  57. package/dist/seasonal/index.js +1 -1
  58. package/dist/{sheet-DOU2o0gO.js → sheet-cWJO_wkT.js} +1 -1
  59. package/dist/{states-CuRWHlch.js → states-CJ8xE_Nm.js} +1 -1
  60. package/dist/{theme-DsMX9lZ7.js → theme-DSumNHLX.js} +2 -2
  61. package/dist/types/ChangelogEntry.d.ts +11 -4
  62. package/dist/types/ChangelogEntry.d.ts.map +1 -1
  63. package/dist/types/ChangelogItem.d.ts +8 -0
  64. package/dist/types/ChangelogItem.d.ts.map +1 -0
  65. package/dist/types/index.d.ts +1 -0
  66. package/dist/types/index.d.ts.map +1 -1
  67. package/dist/{useDocumentTitle-BX7aZKoT.js → useDocumentTitle-VoQkict_.js} +1 -1
  68. package/dist/{useLanguage-BigJQQLb.js → useLanguage-DRnSb5H1.js} +1 -1
  69. package/dist/{useTheme-C_AhwSy3.js → useTheme-DIZjiF5F.js} +1 -1
  70. package/package.json +1 -1
  71. package/dist/changelog-m-U0JTTM.js +0 -139
@@ -1,139 +0,0 @@
1
- import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { filterChangelog as t, parseChangelog as n } from "./helpers/index.js";
3
- import { r, t as i } from "./i18n-Cpw8DZt1.js";
4
- import { t as a } from "./SearchInput-VVu1aIU4.js";
5
- import { t as o } from "./useNotifications-CyhTruIG.js";
6
- import { t as s } from "./AppMarkdown-DR9Xzort.js";
7
- import { useEffect as c, useMemo as l, useState as u } from "react";
8
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
9
- import { LinkIcon as m } from "lucide-react";
10
- import { useLocation as h, useNavigate as g } from "react-router-dom";
11
- import { format as _ } from "date-fns";
12
- //#region src/components/core/changelog/AppChangelogEntry.tsx
13
- var v = ({ entry: t, isLatest: n, isLast: a, isActive: o, onSelect: c, onCopyLink: l }) => {
14
- let { t: u } = i(), h = r();
15
- return /* @__PURE__ */ p("section", {
16
- id: t.id,
17
- className: "group flex scroll-mt-4 gap-4",
18
- children: [/* @__PURE__ */ p("div", {
19
- className: "flex w-24 shrink-0 flex-col items-center",
20
- children: [
21
- /* @__PURE__ */ f("a", {
22
- href: `#${t.id}`,
23
- onClick: (e) => {
24
- e.preventDefault(), c(t.id);
25
- },
26
- className: e("mb-2 text-center text-xs font-medium leading-tight text-muted-foreground hover:text-primary", o && "text-primary"),
27
- children: t.date ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("span", {
28
- className: "block",
29
- children: _(t.date, "d MMM yyyy", { locale: h })
30
- }), t.hasTime ? /* @__PURE__ */ f("span", {
31
- className: "block opacity-70",
32
- children: _(t.date, "HH:mm", { locale: h })
33
- }) : null] }) : t.title
34
- }),
35
- /* @__PURE__ */ f("div", { className: e("relative z-10 size-3 shrink-0 rounded-full", n ? "bg-primary" : "bg-muted-foreground/40", o && "ring-4 ring-primary/20") }),
36
- a ? null : /* @__PURE__ */ f("div", { className: "w-0.5 grow bg-border" })
37
- ]
38
- }), /* @__PURE__ */ p("div", {
39
- className: e("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", o && "border-primary/50"),
40
- children: [/* @__PURE__ */ f("button", {
41
- type: "button",
42
- onClick: () => {
43
- l(t.id);
44
- },
45
- title: u("markdown.copyLink"),
46
- "aria-label": u("markdown.copyLink"),
47
- 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",
48
- children: /* @__PURE__ */ f(m, { className: "size-4" })
49
- }), /* @__PURE__ */ f(s, {
50
- content: t.content,
51
- headingAnchors: !1
52
- })]
53
- })]
54
- });
55
- }, y = ({ entries: t, activeId: n, onSelect: a, className: o }) => {
56
- let { t: s } = i(), c = r();
57
- return /* @__PURE__ */ p("nav", {
58
- "aria-label": s("changelog.nav"),
59
- className: o,
60
- children: [/* @__PURE__ */ f("p", {
61
- className: "mb-2 px-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
62
- children: s("changelog.nav")
63
- }), /* @__PURE__ */ f("ul", {
64
- className: "space-y-0.5 border-l",
65
- children: t.map((t) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f("a", {
66
- href: `#${t.id}`,
67
- onClick: (e) => {
68
- e.preventDefault(), a(t.id);
69
- },
70
- className: e("-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", t.id === n && "border-primary font-medium text-primary hover:border-primary hover:text-primary"),
71
- children: t.date ? _(t.date, t.hasTime ? "d MMM yyyy · HH:mm" : "d MMM yyyy", { locale: c }) : t.title
72
- }) }, t.id))
73
- })]
74
- });
75
- }, b = ({ content: e, showNav: r = !0, showSearch: s = !0 }) => {
76
- let { t: d } = i(), { showSuccess: m, showError: _ } = o(), b = h(), x = g(), [S, C] = u(""), w = l(() => n(e), [e]), T = l(() => t(w, S), [w, S]), E = w[0]?.id, D = decodeURIComponent(b.hash.slice(1)), O = T.some((e) => e.id === D) ? D : void 0;
77
- c(() => {
78
- if (!O) return;
79
- let e = requestAnimationFrame(() => {
80
- document.getElementById(O)?.scrollIntoView({
81
- behavior: "smooth",
82
- block: "start"
83
- });
84
- });
85
- return () => {
86
- cancelAnimationFrame(e);
87
- };
88
- }, [O]);
89
- let k = (e) => {
90
- x({
91
- search: b.search,
92
- hash: `#${e}`
93
- }, { replace: !0 });
94
- }, A = async (e) => {
95
- k(e);
96
- let t = `${window.location.origin}${b.pathname}${b.search}#${e}`;
97
- try {
98
- await navigator.clipboard.writeText(t), m(d("markdown.linkCopied"));
99
- } catch {
100
- _(d("markdown.linkCopyError"));
101
- }
102
- };
103
- return w.length === 0 ? /* @__PURE__ */ f("p", {
104
- className: "text-sm text-muted-foreground",
105
- children: d("changelog.empty")
106
- }) : /* @__PURE__ */ p("div", {
107
- className: "flex gap-8",
108
- children: [/* @__PURE__ */ p("div", {
109
- className: "min-w-0 flex-1",
110
- children: [
111
- s ? /* @__PURE__ */ f(a, {
112
- search: S,
113
- onSearch: C,
114
- placeholder: d("changelog.searchPlaceholder"),
115
- className: "mb-6 md:w-96"
116
- }) : null,
117
- T.length === 0 ? /* @__PURE__ */ f("p", {
118
- className: "text-sm text-muted-foreground",
119
- children: d("changelog.noResult", { query: S.trim() })
120
- }) : null,
121
- T.map((e, t) => /* @__PURE__ */ f(v, {
122
- entry: e,
123
- isLatest: e.id === E,
124
- isLast: t === T.length - 1,
125
- isActive: e.id === O,
126
- onSelect: k,
127
- onCopyLink: (e) => void A(e)
128
- }, e.id))
129
- ]
130
- }), r && T.length > 0 ? /* @__PURE__ */ f(y, {
131
- entries: T,
132
- activeId: O,
133
- onSelect: k,
134
- className: "sticky top-4 hidden max-h-[calc(100vh-2rem)] w-52 shrink-0 self-start overflow-y-auto xl:block"
135
- }) : null]
136
- });
137
- };
138
- //#endregion
139
- export { b as t };