@memobit/libs 3.30.0 → 3.32.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/dist/components/ThemeLab/ThemeLab.css +1 -0
- package/dist/components/ThemeLab/ThemeLab2.js +85 -0
- package/dist/components/ThemeLab/useThemeLab.js +31 -0
- package/dist/components/ThemeSettings/ThemeContext.js +35 -35
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/memobit-icons.json +1 -0
- package/dist/theme-lab.d.ts +23 -0
- package/dist/theme-lab.js +4 -0
- package/dist/version.js +1 -1
- package/dist/version.json +4 -4
- package/package.json +151 -147
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.theme-lab{left:var(--spacing-16);bottom:var(--spacing-16);z-index:100000;gap:var(--spacing-12);width:min(var(--spacing-400), 100vw - var(--spacing-32));max-height:calc(100vh - var(--spacing-32));padding:var(--spacing-16);border:var(--spacing-1) solid var(--card-border-color);border-radius:var(--radius);background:var(--modal-background-color);-webkit-backdrop-filter:var(--card-backdrop-filter);backdrop-filter:var(--card-backdrop-filter);box-shadow:var(--modal-box-shadow);color:var(--body-color);font-size:var(--font-size-sm);flex-direction:column;display:flex;position:fixed;overflow-y:auto}.theme-lab__pill{left:var(--spacing-16);bottom:var(--spacing-16);z-index:100000;align-items:center;gap:var(--spacing-8);padding:var(--spacing-8) var(--spacing-12);border:var(--spacing-1) solid var(--card-border-color);border-radius:var(--radius-full);background:var(--modal-background-color);box-shadow:var(--card-box-shadow);color:var(--body-color);font:inherit;font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);cursor:pointer;transition:border-color var(--transition-fast);display:inline-flex;position:fixed}.theme-lab__pill:hover{border-color:var(--card-hover-border-color)}.theme-lab__header{align-items:center;gap:var(--spacing-8);display:flex}.theme-lab__title{font-family:var(--font-family-display);font-size:var(--font-size-md);font-weight:var(--font-weight-bold);color:var(--body-title-color)}.theme-lab__hint{color:var(--body-color-muted);font-size:var(--font-size-xs);flex:1}.theme-lab__note{color:var(--body-color-muted);font-size:var(--font-size-xs)}.theme-lab__axis{gap:var(--spacing-6);flex-direction:column;display:flex}.theme-lab__axis-label{color:var(--form-control-label-color);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);letter-spacing:var(--form-control-label-letter-spacing);text-transform:var(--form-control-label-text-transform)}.theme-lab__chips{gap:var(--spacing-6);flex-wrap:wrap;display:flex}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import './ThemeLab.css';
|
|
2
|
+
import { Icon as d } from "../Icon/Icon2.js";
|
|
3
|
+
import { useTheme as p } from "../ThemeSettings/useTheme.js";
|
|
4
|
+
import { Button as v } from "../Button/Button2.js";
|
|
5
|
+
import { Tooltip as u } from "../Tooltip/Tooltip2.js";
|
|
6
|
+
import { Chip as b } from "../Chip/Chip2.js";
|
|
7
|
+
import { ToggleButtons as _ } from "../ToggleButtons/ToggleButtons2.js";
|
|
8
|
+
import { getThemeConfig as f } from "../ThemeSettings/themeConfig.js";
|
|
9
|
+
import { useThemeLab as T } from "./useThemeLab.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import { useState as g } from "react";
|
|
12
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
13
|
+
import { AUTHORED_THEMES as m } from "@memobit/themes";
|
|
14
|
+
var N = [{
|
|
15
|
+
key: "classic",
|
|
16
|
+
label: "v1 Classic"
|
|
17
|
+
}, {
|
|
18
|
+
key: "authored",
|
|
19
|
+
label: "v2 Authored"
|
|
20
|
+
}], C = new Set(m.map((t) => t.id)), E = (t) => f(t) !== void 0, P = ({ storageKey: t = "memobit:theme-lab" }) => {
|
|
21
|
+
const { theme: s, setPreviewTheme: r } = p(), { engine: l, setEngine: h } = T(t), [n, o] = g(!1), c = {
|
|
22
|
+
classic: `v1 · ${s}`,
|
|
23
|
+
authored: `v2 authored · ${s}`
|
|
24
|
+
};
|
|
25
|
+
return n ? /* @__PURE__ */ i("div", {
|
|
26
|
+
className: "theme-lab",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ i("div", {
|
|
29
|
+
className: "theme-lab__header",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ e("span", {
|
|
32
|
+
className: "theme-lab__title",
|
|
33
|
+
children: "Theme lab"
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ e("span", {
|
|
36
|
+
className: "theme-lab__hint",
|
|
37
|
+
children: "Press \\ to flip v1 / v2"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ e(u, {
|
|
40
|
+
title: "Collapse",
|
|
41
|
+
children: /* @__PURE__ */ e(v, {
|
|
42
|
+
variant: "ghost",
|
|
43
|
+
size: "small",
|
|
44
|
+
icon: "minus",
|
|
45
|
+
onClick: () => o(!1)
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ e(_, {
|
|
51
|
+
states: N,
|
|
52
|
+
state: l,
|
|
53
|
+
size: "small",
|
|
54
|
+
onToggleChange: (a) => h(a === "authored" ? "authored" : "classic")
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ e("span", {
|
|
57
|
+
className: "theme-lab__note",
|
|
58
|
+
children: l === "classic" ? `v1 shows the classic theme "${s}".` : C.has(s) ? `v2 is "${s}" written as its design choices, with every component value derived from them.` : `"${s}" has no authored version yet, so v1 shows through. Pick one below.`
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ i("div", {
|
|
61
|
+
className: "theme-lab__axis",
|
|
62
|
+
children: [/* @__PURE__ */ e("span", {
|
|
63
|
+
className: "theme-lab__axis-label",
|
|
64
|
+
children: "Authored themes"
|
|
65
|
+
}), /* @__PURE__ */ e("div", {
|
|
66
|
+
className: "theme-lab__chips",
|
|
67
|
+
children: m.map((a) => /* @__PURE__ */ e(b, {
|
|
68
|
+
size: "small",
|
|
69
|
+
selected: a.id === s,
|
|
70
|
+
onClick: () => E(a.id) && r(a.id),
|
|
71
|
+
children: a.label
|
|
72
|
+
}, a.id))
|
|
73
|
+
})]
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}) : /* @__PURE__ */ i("button", {
|
|
77
|
+
type: "button",
|
|
78
|
+
className: "theme-lab__pill",
|
|
79
|
+
onClick: () => o(!0),
|
|
80
|
+
children: [/* @__PURE__ */ e(d, { name: "theme-picker" }), c[l]]
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
P as ThemeLab
|
|
85
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useEffect as i, useState as s } from "react";
|
|
2
|
+
import { applyAuthoredEngine as l, clearAuthoredEngine as c } from "@memobit/themes";
|
|
3
|
+
var u = (e) => {
|
|
4
|
+
try {
|
|
5
|
+
const t = JSON.parse(localStorage.getItem(e) ?? "null");
|
|
6
|
+
return typeof t == "object" && t !== null && "engine" in t && t.engine === "authored" ? "authored" : "classic";
|
|
7
|
+
} catch {
|
|
8
|
+
return "classic";
|
|
9
|
+
}
|
|
10
|
+
}, d = (e, t) => {
|
|
11
|
+
try {
|
|
12
|
+
localStorage.setItem(e, JSON.stringify({ engine: t }));
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
15
|
+
}, E = (e) => e instanceof HTMLElement && (e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.tagName === "SELECT" || e.isContentEditable), h = (e) => {
|
|
16
|
+
const [t, r] = s(() => u(e));
|
|
17
|
+
return i(() => {
|
|
18
|
+
t === "authored" ? l() : c(), d(e, t);
|
|
19
|
+
}, [t, e]), i(() => {
|
|
20
|
+
const a = (n) => {
|
|
21
|
+
n.key !== "\\" || n.ctrlKey || n.metaKey || n.altKey || E(n.target) || (n.preventDefault(), r((o) => o === "authored" ? "classic" : "authored"));
|
|
22
|
+
};
|
|
23
|
+
return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
|
|
24
|
+
}, []), {
|
|
25
|
+
engine: t,
|
|
26
|
+
setEngine: r
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
h as useThemeLab
|
|
31
|
+
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { ThemeContext as
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
import { THEME_CONFIGS as c, getThemeConfig as
|
|
4
|
-
import { useCallback as m, useEffect as
|
|
1
|
+
import { ThemeContext as A } from "./ThemeContextValue.js";
|
|
2
|
+
import { Tooltip as F } from "../Tooltip/Tooltip2.js";
|
|
3
|
+
import { THEME_CONFIGS as c, getThemeConfig as k } from "./themeConfig.js";
|
|
4
|
+
import { useCallback as m, useEffect as I, useState as v } from "react";
|
|
5
5
|
import { jsx as f, jsxs as E } from "react/jsx-runtime";
|
|
6
|
-
var
|
|
7
|
-
const [d, l] = v(null), [
|
|
8
|
-
|
|
6
|
+
var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display", C = "theme-font-link-mono", q = ({ children: M, theme: y, effects: N, onSave: g, allowedThemes: s, fallbackTheme: P = "luna" }) => {
|
|
7
|
+
const [d, l] = v(null), [S, a] = v(null), [D, T] = v(!1), O = k(y) === void 0 ? P : y, o = d ?? O, p = S ?? N;
|
|
8
|
+
I(() => {
|
|
9
9
|
document.documentElement.setAttribute("data-theme", o);
|
|
10
10
|
const i = (typeof __MEMOBIT_THEME_URLS__ > "u" ? void 0 : __MEMOBIT_THEME_URLS__)?.[o];
|
|
11
11
|
if (i !== void 0) {
|
|
12
|
-
let e = document.getElementById(
|
|
13
|
-
e || (e = document.createElement("link"), e.id =
|
|
12
|
+
let e = document.getElementById(b);
|
|
13
|
+
e || (e = document.createElement("link"), e.id = b, e.rel = "stylesheet", document.head.appendChild(e));
|
|
14
14
|
const t = new URL(i, import.meta.url).href;
|
|
15
15
|
e.href !== t && (e.href = t);
|
|
16
16
|
}
|
|
17
|
-
const r =
|
|
17
|
+
const r = k(o);
|
|
18
18
|
if (r) {
|
|
19
|
-
let e = document.getElementById(
|
|
20
|
-
e || (e = document.createElement("link"), e.id =
|
|
21
|
-
let t = document.getElementById(
|
|
22
|
-
r.fontUrlDisplay ? (t || (t = document.createElement("link"), t.id =
|
|
23
|
-
let n = document.getElementById(
|
|
24
|
-
r.fontUrlMono ? (n || (n = document.createElement("link"), n.id =
|
|
19
|
+
let e = document.getElementById(w);
|
|
20
|
+
e || (e = document.createElement("link"), e.id = w, e.rel = "stylesheet", document.head.appendChild(e)), e.href = r.fontUrl;
|
|
21
|
+
let t = document.getElementById(L);
|
|
22
|
+
r.fontUrlDisplay ? (t || (t = document.createElement("link"), t.id = L, t.rel = "stylesheet", document.head.appendChild(t)), t.href = r.fontUrlDisplay) : t?.remove();
|
|
23
|
+
let n = document.getElementById(C);
|
|
24
|
+
r.fontUrlMono ? (n || (n = document.createElement("link"), n.id = C, n.rel = "stylesheet", document.head.appendChild(n)), n.href = r.fontUrlMono) : n?.remove();
|
|
25
25
|
}
|
|
26
26
|
}, [o]);
|
|
27
|
-
const
|
|
27
|
+
const U = m((i) => {
|
|
28
28
|
l(i);
|
|
29
|
-
}, []),
|
|
29
|
+
}, []), K = m((i) => {
|
|
30
30
|
a(i);
|
|
31
|
-
}, []),
|
|
31
|
+
}, []), B = m(() => {
|
|
32
32
|
l(null), a(null);
|
|
33
33
|
}, []);
|
|
34
|
-
|
|
34
|
+
I(() => {
|
|
35
35
|
const i = (e) => {
|
|
36
36
|
if (!(e instanceof HTMLElement)) return !1;
|
|
37
37
|
const t = e.tagName;
|
|
@@ -42,8 +42,8 @@ var I = "theme-stylesheet", k = "theme-font-link", b = "theme-font-link-display"
|
|
|
42
42
|
e.preventDefault();
|
|
43
43
|
const t = c.map((u) => u.value), n = s && s.length > 0 ? t.filter((u) => s.includes(u)) : t;
|
|
44
44
|
if (n.length === 0) return;
|
|
45
|
-
const
|
|
46
|
-
l(n[
|
|
45
|
+
const _ = n.indexOf(o), R = ((_ === -1 ? 0 : _) + (e.key === "]" ? 1 : -1) + n.length) % n.length;
|
|
46
|
+
l(n[R]);
|
|
47
47
|
} else e.key === "Escape" && d && (e.preventDefault(), l(null), a(null));
|
|
48
48
|
};
|
|
49
49
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
@@ -52,26 +52,26 @@ var I = "theme-stylesheet", k = "theme-font-link", b = "theme-font-link-display"
|
|
|
52
52
|
d,
|
|
53
53
|
s
|
|
54
54
|
]);
|
|
55
|
-
const h = c.findIndex((i) => i.value === o), x = h >= 0 ? c[h].label : o,
|
|
56
|
-
|
|
55
|
+
const h = c.findIndex((i) => i.value === o), x = h >= 0 ? c[h].label : o, H = m(() => {
|
|
56
|
+
g?.({
|
|
57
57
|
theme: o,
|
|
58
58
|
effects: p
|
|
59
59
|
}), l(null), a(null);
|
|
60
60
|
}, [
|
|
61
61
|
o,
|
|
62
62
|
p,
|
|
63
|
-
|
|
63
|
+
g
|
|
64
64
|
]);
|
|
65
|
-
return /* @__PURE__ */ E(
|
|
65
|
+
return /* @__PURE__ */ E(A.Provider, {
|
|
66
66
|
value: {
|
|
67
67
|
theme: o,
|
|
68
68
|
effects: p,
|
|
69
|
-
setPreviewTheme:
|
|
70
|
-
setPreviewEffects:
|
|
71
|
-
commitPreview:
|
|
72
|
-
clearPreview:
|
|
69
|
+
setPreviewTheme: U,
|
|
70
|
+
setPreviewEffects: K,
|
|
71
|
+
commitPreview: H,
|
|
72
|
+
clearPreview: B
|
|
73
73
|
},
|
|
74
|
-
children: [
|
|
74
|
+
children: [M, d && /* @__PURE__ */ E("div", {
|
|
75
75
|
style: {
|
|
76
76
|
position: "fixed",
|
|
77
77
|
bottom: 16,
|
|
@@ -85,11 +85,11 @@ var I = "theme-stylesheet", k = "theme-font-link", b = "theme-font-link-display"
|
|
|
85
85
|
boxShadow: "0 4px 16px rgba(0, 0, 0, 0.3)"
|
|
86
86
|
},
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */ f(
|
|
88
|
+
/* @__PURE__ */ f(F, {
|
|
89
89
|
title: "Copy theme name",
|
|
90
90
|
children: /* @__PURE__ */ f("span", {
|
|
91
91
|
onClick: () => {
|
|
92
|
-
navigator.clipboard.writeText(x),
|
|
92
|
+
navigator.clipboard.writeText(x), T(!0), window.setTimeout(() => T(!1), 1500);
|
|
93
93
|
},
|
|
94
94
|
style: { cursor: "pointer" },
|
|
95
95
|
children: x
|
|
@@ -116,7 +116,7 @@ var I = "theme-stylesheet", k = "theme-font-link", b = "theme-font-link-display"
|
|
|
116
116
|
},
|
|
117
117
|
children: "[ prev · ] next · Esc revert"
|
|
118
118
|
}),
|
|
119
|
-
|
|
119
|
+
D && /* @__PURE__ */ f("div", {
|
|
120
120
|
style: {
|
|
121
121
|
position: "absolute",
|
|
122
122
|
bottom: "calc(100% + 6px)",
|
|
@@ -136,5 +136,5 @@ var I = "theme-stylesheet", k = "theme-font-link", b = "theme-font-link-display"
|
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
q as ThemeProvider
|
|
140
140
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3770,7 +3770,7 @@ export declare interface TextFilterValue {
|
|
|
3770
3770
|
mode?: string;
|
|
3771
3771
|
}
|
|
3772
3772
|
|
|
3773
|
-
export declare type Theme = '
|
|
3773
|
+
export declare type Theme = 'arctic-blue' | 'asphalt-code' | 'atelier-media' | 'audit-ember' | 'azure-night' | 'blossom-meadow' | 'blueprint-clay' | 'carbon-velocity' | 'chalk-circuit' | 'chrono-atlas' | 'circuit-harbor' | 'cobalt-pulse' | 'citrus-vital' | 'crawler-dusk' | 'crimson-dusk' | 'cyber-forest' | 'dashdarkx' | 'emerald-ledger' | 'garden-harvest' | 'graphite-shell' | 'horizon-amber' | 'indigo-stitch' | 'ivory-serif' | 'kindred-ink' | 'lamplight' | 'lumen' | 'luna' | 'mesh-circuit' | 'midnight-atlas' | 'midnight-amber' | 'noir-marquee' | 'ocean-breeze' | 'ocean-depths' | 'orbital-night' | 'sandstone' | 'sandy-parchment' | 'screening-room' | 'signal-burst' | 'signal-clarity' | 'slate-focus' | 'slate-bazaar' | 'tailwind-vue-dark' | 'terminal-phosphor' | 'terracotta-kitchen' | 'vault-guard' | 'verdant-pulse' | 'vital-aurora' | 'vital-signal' | 'war-room';
|
|
3774
3774
|
|
|
3775
3775
|
export { THEME_CONFIGS }
|
|
3776
3776
|
|
|
@@ -3800,6 +3800,11 @@ export declare interface ThemeProviderProps {
|
|
|
3800
3800
|
effects: ThemeEffects;
|
|
3801
3801
|
onSave?: (value: ThemeSaveValue) => void;
|
|
3802
3802
|
allowedThemes?: string[];
|
|
3803
|
+
/**
|
|
3804
|
+
* Shown when `theme` is no longer in @memobit/themes (a saved choice of a removed theme).
|
|
3805
|
+
* Pass the app's own default, usually `getDefaultThemeForApp(appName)`.
|
|
3806
|
+
*/
|
|
3807
|
+
fallbackTheme?: Theme;
|
|
3803
3808
|
}
|
|
3804
3809
|
|
|
3805
3810
|
export declare interface ThemeSaveValue {
|
package/dist/memobit-icons.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dev tool: switches the app between a classic theme (v1) and its hand-made authored version
|
|
5
|
+
* (v2) from @memobit/themes 2.0, so the two can be compared on real pages. Render it inside
|
|
6
|
+
* ThemeProvider, import `@memobit/themes/authored.css` in the app, and load it lazily behind
|
|
7
|
+
* `import.meta.env.DEV` so production builds leave it out.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ThemeLab: FC<ThemeLabProps>;
|
|
10
|
+
|
|
11
|
+
export declare interface ThemeLabProps {
|
|
12
|
+
/** Where the chosen engine is remembered. Defaults to one key shared by every app on the origin. */
|
|
13
|
+
storageKey?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { }
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
declare global {
|
|
20
|
+
interface Window {
|
|
21
|
+
__VERSIONS__: FullVersionInfo;
|
|
22
|
+
}
|
|
23
|
+
}
|
package/dist/version.js
CHANGED
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,147 +1,151 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@memobit/libs",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"react-components",
|
|
8
|
-
"component-library",
|
|
9
|
-
"ui",
|
|
10
|
-
"ui-kit",
|
|
11
|
-
"design-system",
|
|
12
|
-
"typescript",
|
|
13
|
-
"hooks",
|
|
14
|
-
"memobit"
|
|
15
|
-
],
|
|
16
|
-
"author": "Iulian Cristea <iulianx@gmail.com>",
|
|
17
|
-
"license": "Apache-2.0",
|
|
18
|
-
"homepage": "https://react.memobit.ro/",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/CristeaIulian/memobit-react-library.git"
|
|
22
|
-
},
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/CristeaIulian/memobit-react-library/issues"
|
|
25
|
-
},
|
|
26
|
-
"publishConfig": {
|
|
27
|
-
"access": "public"
|
|
28
|
-
},
|
|
29
|
-
"sideEffects": [
|
|
30
|
-
"**/*.css",
|
|
31
|
-
"**/*.scss"
|
|
32
|
-
],
|
|
33
|
-
"type": "module",
|
|
34
|
-
"main": "dist/index.js",
|
|
35
|
-
"module": "dist/index.js",
|
|
36
|
-
"types": "dist/index.d.ts",
|
|
37
|
-
"exports": {
|
|
38
|
-
".": {
|
|
39
|
-
"types": "./dist/index.d.ts",
|
|
40
|
-
"import": "./dist/index.js"
|
|
41
|
-
},
|
|
42
|
-
"./dist/index.css": "./dist/index.css",
|
|
43
|
-
"./mfa": {
|
|
44
|
-
"types": "./dist/mfa.d.ts",
|
|
45
|
-
"import": "./dist/mfa.js"
|
|
46
|
-
},
|
|
47
|
-
"./http": {
|
|
48
|
-
"types": "./dist/http.d.ts",
|
|
49
|
-
"import": "./dist/http.js"
|
|
50
|
-
},
|
|
51
|
-
"./router": {
|
|
52
|
-
"types": "./dist/router.d.ts",
|
|
53
|
-
"import": "./dist/router.js"
|
|
54
|
-
},
|
|
55
|
-
"./
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"./dist/styles/
|
|
60
|
-
"./dist/styles/
|
|
61
|
-
"./dist/styles/
|
|
62
|
-
"./dist/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"dist"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"react-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"@
|
|
101
|
-
"@
|
|
102
|
-
"@
|
|
103
|
-
"@
|
|
104
|
-
"@
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"eslint
|
|
111
|
-
"eslint-
|
|
112
|
-
"eslint-plugin-
|
|
113
|
-
"eslint-plugin-
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@memobit/libs",
|
|
3
|
+
"version": "3.32.0",
|
|
4
|
+
"description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"react-components",
|
|
8
|
+
"component-library",
|
|
9
|
+
"ui",
|
|
10
|
+
"ui-kit",
|
|
11
|
+
"design-system",
|
|
12
|
+
"typescript",
|
|
13
|
+
"hooks",
|
|
14
|
+
"memobit"
|
|
15
|
+
],
|
|
16
|
+
"author": "Iulian Cristea <iulianx@gmail.com>",
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"homepage": "https://react.memobit.ro/",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/CristeaIulian/memobit-react-library.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/CristeaIulian/memobit-react-library/issues"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": [
|
|
30
|
+
"**/*.css",
|
|
31
|
+
"**/*.scss"
|
|
32
|
+
],
|
|
33
|
+
"type": "module",
|
|
34
|
+
"main": "dist/index.js",
|
|
35
|
+
"module": "dist/index.js",
|
|
36
|
+
"types": "dist/index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"import": "./dist/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./dist/index.css": "./dist/index.css",
|
|
43
|
+
"./mfa": {
|
|
44
|
+
"types": "./dist/mfa.d.ts",
|
|
45
|
+
"import": "./dist/mfa.js"
|
|
46
|
+
},
|
|
47
|
+
"./http": {
|
|
48
|
+
"types": "./dist/http.d.ts",
|
|
49
|
+
"import": "./dist/http.js"
|
|
50
|
+
},
|
|
51
|
+
"./router": {
|
|
52
|
+
"types": "./dist/router.d.ts",
|
|
53
|
+
"import": "./dist/router.js"
|
|
54
|
+
},
|
|
55
|
+
"./theme-lab": {
|
|
56
|
+
"types": "./dist/theme-lab.d.ts",
|
|
57
|
+
"import": "./dist/theme-lab.js"
|
|
58
|
+
},
|
|
59
|
+
"./dist/styles/variables.scss": "./dist/styles/variables.scss",
|
|
60
|
+
"./dist/styles/base.scss": "./dist/styles/base.scss",
|
|
61
|
+
"./dist/styles/effects.scss": "./dist/styles/effects.scss",
|
|
62
|
+
"./dist/styles/highlight.scss": "./dist/styles/highlight.scss",
|
|
63
|
+
"./dist/styles/scrollbars.scss": "./dist/styles/scrollbars.scss",
|
|
64
|
+
"./dist/styles/utilities.scss": "./dist/styles/utilities.scss",
|
|
65
|
+
"./dist/styles/utility-classes.scss": "./dist/styles/utility-classes.scss",
|
|
66
|
+
"./dist/components/*": "./dist/components/*"
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"dist"
|
|
70
|
+
],
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "vite build && npm pack",
|
|
73
|
+
"release": "npm run build && npm publish",
|
|
74
|
+
"check:npm-auth": "node scripts/check-npm-auth.mjs",
|
|
75
|
+
"ship": "npm run check:npm-auth && npm version patch && npm run release && git push --follow-tags",
|
|
76
|
+
"ship:minor": "npm run check:npm-auth && npm version minor && npm run release && git push --follow-tags",
|
|
77
|
+
"ship:major": "npm run check:npm-auth && npm version major && npm run release && git push --follow-tags",
|
|
78
|
+
"prepublishOnly": "vite build",
|
|
79
|
+
"dev": "vite build --watch",
|
|
80
|
+
"playground": "vite serve playground --config playground/vite.config.ts",
|
|
81
|
+
"lint": "eslint .",
|
|
82
|
+
"lint:fix": "eslint . --fix",
|
|
83
|
+
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,mjs,cjs,css,scss}\"",
|
|
84
|
+
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mjs,cjs,css,scss}\""
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"@memobit/core": "1.0.0",
|
|
88
|
+
"@memobit/icons": "^1.7.0",
|
|
89
|
+
"@memobit/themes": "^1.0.0 || ^2.0.0",
|
|
90
|
+
"react": "19.3.0",
|
|
91
|
+
"react-dom": "19.3.0",
|
|
92
|
+
"react-router": "8.4.0"
|
|
93
|
+
},
|
|
94
|
+
"peerDependenciesMeta": {
|
|
95
|
+
"react-router": {
|
|
96
|
+
"optional": true
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@eslint/js": "9.39.4",
|
|
101
|
+
"@memobit/core": "file:../memobit-core",
|
|
102
|
+
"@memobit/icons": "file:../memobit-react-icons",
|
|
103
|
+
"@memobit/themes": "file:../memobit-react-themes",
|
|
104
|
+
"@microsoft/api-extractor": "7.59.2",
|
|
105
|
+
"@types/node": "25.9.8",
|
|
106
|
+
"@types/react": "19.3.0",
|
|
107
|
+
"@types/react-dom": "19.3.0",
|
|
108
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
109
|
+
"esbuild": "0.28.2",
|
|
110
|
+
"eslint": "9.39.4",
|
|
111
|
+
"eslint-config-prettier": "10.1.8",
|
|
112
|
+
"eslint-plugin-import": "2.32.0",
|
|
113
|
+
"eslint-plugin-prettier": "5.5.6",
|
|
114
|
+
"eslint-plugin-react": "7.37.5",
|
|
115
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
116
|
+
"eslint-plugin-react-refresh": "0.5.7",
|
|
117
|
+
"eslint-plugin-simple-import-sort": "14.0.0",
|
|
118
|
+
"globals": "17.12.0",
|
|
119
|
+
"prettier": "3.9.9",
|
|
120
|
+
"qrcode.react": "4.2.0",
|
|
121
|
+
"react": "19.3.0",
|
|
122
|
+
"react-dom": "19.3.0",
|
|
123
|
+
"react-router": "8.4.0",
|
|
124
|
+
"sass": "1.105.0",
|
|
125
|
+
"terser": "5.51.2",
|
|
126
|
+
"typescript": "6.0.3",
|
|
127
|
+
"typescript-eslint": "8.70.1",
|
|
128
|
+
"vite": "8.3.3",
|
|
129
|
+
"vite-plugin-dts": "5.1.1",
|
|
130
|
+
"vite-plugin-static-copy": "4.1.1"
|
|
131
|
+
},
|
|
132
|
+
"overrides": {
|
|
133
|
+
"@rushstack/ts-command-line": {
|
|
134
|
+
"argparse": "2.0.1"
|
|
135
|
+
},
|
|
136
|
+
"brace-expansion@1": "1.1.21",
|
|
137
|
+
"brace-expansion@5": "5.0.12",
|
|
138
|
+
"esbuild": "0.28.2",
|
|
139
|
+
"fast-uri@3": "3.1.9",
|
|
140
|
+
"immutable": "5.1.9",
|
|
141
|
+
"js-yaml": "4.3.2",
|
|
142
|
+
"minimatch@10": "10.2.6",
|
|
143
|
+
"nanoid@3": "3.3.18",
|
|
144
|
+
"picomatch@2": "2.3.2",
|
|
145
|
+
"postcss": "8.5.28",
|
|
146
|
+
"source-map-js": "1.2.2",
|
|
147
|
+
"vite-plugin-static-copy": {
|
|
148
|
+
"chokidar": "5.0.0"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|