@omniviewdev/ui 0.1.9 → 0.1.11

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 (54) hide show
  1. package/dist/AppTheme-BakZ7ezV.cjs +1 -0
  2. package/dist/AppTheme-wAxlNjgN.js +291 -0
  3. package/dist/{CodeBlock-CIyG0DbW.cjs → CodeBlock-DTB_WsXQ.cjs} +1 -1
  4. package/dist/{CodeBlock-B1iQO7zU.js → CodeBlock-DV6CPG00.js} +1 -1
  5. package/dist/CopyButton-3fq1UAiv.cjs +1 -0
  6. package/dist/CopyButton-DWVcqdPe.js +78 -0
  7. package/dist/{ErrorState-CnIR-1xa.cjs → ErrorState-Cwwem5yh.cjs} +1 -1
  8. package/dist/{ErrorState-CexYrMpy.js → ErrorState-DNOrahZX.js} +1 -1
  9. package/dist/Select-BqA47TdK.cjs +1 -0
  10. package/dist/Select-D61fKI8Y.js +276 -0
  11. package/dist/{Tooltip-BEVuYuZ3.js → Tooltip-CZMOcjX7.js} +10 -10
  12. package/dist/Tooltip-oUFp4gNV.cjs +1 -0
  13. package/dist/buttons/IconButton.d.ts +1 -4
  14. package/dist/buttons.cjs +1 -1
  15. package/dist/buttons.js +2 -2
  16. package/dist/charts.cjs +1 -1
  17. package/dist/charts.js +2 -2
  18. package/dist/domain.cjs +1 -1
  19. package/dist/domain.js +3 -3
  20. package/dist/editors/index.d.ts +1 -1
  21. package/dist/editors/themes.d.ts +13 -0
  22. package/dist/editors.cjs +26 -26
  23. package/dist/editors.js +3860 -3791
  24. package/dist/feedback.cjs +1 -1
  25. package/dist/feedback.js +1 -1
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/inputs.cjs +1 -1
  29. package/dist/inputs.js +1 -1
  30. package/dist/overlays.cjs +1 -1
  31. package/dist/overlays.js +1 -1
  32. package/dist/theme/AppTheme.d.ts +11 -2
  33. package/dist/theme/customizations/dataDisplay.d.ts +11 -0
  34. package/dist/theme/customizations/feedback.d.ts +6 -0
  35. package/dist/theme/customizations/inputs.d.ts +7 -0
  36. package/dist/theme/customizations/navigation.d.ts +7 -0
  37. package/dist/theme/index.d.ts +10 -5
  38. package/dist/theme/registry/init.d.ts +1 -0
  39. package/dist/theme/registry/registry.d.ts +9 -0
  40. package/dist/theme/registry/types.d.ts +19 -0
  41. package/dist/theme/registry/variants/default/index.d.ts +2 -0
  42. package/dist/theme/registry/variants/solarized/index.d.ts +2 -0
  43. package/dist/theme/registry/variants/solarized/palettes.d.ts +147 -0
  44. package/dist/theme.cjs +1 -1
  45. package/dist/theme.js +1250 -1275
  46. package/dist/tokens.css +116 -0
  47. package/dist/typography.cjs +1 -1
  48. package/dist/typography.js +1 -1
  49. package/package.json +1 -1
  50. package/dist/CopyButton-CACe3RCF.cjs +0 -1
  51. package/dist/CopyButton-DPBgL0K8.js +0 -77
  52. package/dist/Select-CnRBSc5w.cjs +0 -1
  53. package/dist/Select-DTUF31OP.js +0 -206
  54. package/dist/Tooltip-44-P5KfQ.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const o=require("react/jsx-runtime"),p=require("@mui/material"),d=require("react"),b=require("@mui/material/styles"),r=b.createTheme(),s={50:"hsl(210, 100%, 95%)",100:"hsl(210, 100%, 92%)",200:"hsl(210, 100%, 80%)",300:"hsl(210, 100%, 65%)",400:"hsl(210, 98%, 48%)",500:"hsl(210, 98%, 42%)",600:"hsl(210, 98%, 55%)",700:"hsl(210, 100%, 35%)",800:"hsl(210, 100%, 16%)",900:"hsl(210, 100%, 21%)"},u={50:"#ECF0F6",100:"#CBD5E1",200:"#ABB8CC",300:"#8B9BB5",400:"#6B7D96",500:"#3E4F66",600:"#2D3D52",700:"#1F2937",800:"#151B23",900:"#0D1117"},n={50:"hsl(120, 80%, 98%)",100:"hsl(120, 75%, 94%)",200:"hsl(120, 75%, 87%)",300:"hsl(120, 61%, 77%)",400:"hsl(120, 44%, 53%)",500:"hsl(120, 59%, 30%)",600:"hsl(120, 70%, 25%)",700:"hsl(120, 75%, 16%)",800:"hsl(120, 84%, 10%)",900:"hsl(120, 87%, 6%)"},i={50:"hsl(45, 100%, 97%)",100:"hsl(45, 92%, 90%)",200:"hsl(45, 94%, 80%)",300:"hsl(45, 90%, 65%)",400:"hsl(45, 90%, 40%)",500:"hsl(45, 90%, 35%)",600:"hsl(45, 91%, 25%)",700:"hsl(45, 94%, 20%)",800:"hsl(45, 95%, 16%)",900:"hsl(45, 93%, 12%)"},l={50:"hsl(0, 100%, 97%)",100:"hsl(0, 92%, 90%)",200:"hsl(0, 94%, 80%)",300:"hsl(0, 90%, 65%)",400:"hsl(0, 90%, 40%)",500:"hsl(0, 90%, 30%)",600:"hsl(0, 91%, 25%)",700:"hsl(0, 94%, 18%)",800:"hsl(0, 95%, 12%)",900:"hsl(0, 93%, 6%)"},h={50:"hsl(270, 100%, 97%)",100:"hsl(270, 92%, 90%)",200:"hsl(270, 80%, 80%)",300:"hsl(270, 70%, 65%)",400:"hsl(270, 70%, 50%)",500:"hsl(270, 70%, 42%)",600:"hsl(270, 70%, 35%)",700:"hsl(270, 75%, 25%)",800:"hsl(270, 80%, 16%)",900:"hsl(270, 85%, 10%)"},S=e=>({palette:{mode:e,primary:{light:s[200],main:s[400],dark:s[700],contrastText:s[50],...e==="dark"&&{contrastText:s[50],light:s[300],main:s[400],dark:s[700]}},info:{light:s[100],main:s[300],dark:s[600],contrastText:u[50],...e==="dark"&&{contrastText:s[300],light:s[500],main:s[700],dark:s[900]}},warning:{light:i[300],main:i[400],dark:i[800],...e==="dark"&&{light:i[400],main:i[500],dark:i[700]}},error:{light:l[300],main:l[400],dark:l[800],...e==="dark"&&{light:l[400],main:l[500],dark:l[700]}},success:{light:n[300],main:n[400],dark:n[800],...e==="dark"&&{light:n[400],main:n[500],dark:n[700]}},secondary:{light:h[300],main:h[400],dark:h[700],contrastText:h[50],...e==="dark"&&{light:h[300],main:h[400],dark:h[800]}},grey:u,divider:e==="dark"?"rgba(62, 79, 102, 0.6)":"rgba(208, 215, 222, 0.6)",background:{default:e==="dark"?"#0D1117":"#FFFFFF",paper:e==="dark"?"#151B23":"#F6F8FA"},text:{primary:e==="dark"?"rgba(236, 240, 246, 0.92)":"rgba(31, 35, 40, 0.92)",secondary:e==="dark"?"rgba(236, 240, 246, 0.64)":"rgba(31, 35, 40, 0.64)"},action:{hover:e==="dark"?"rgba(255, 255, 255, 0.04)":"rgba(31, 35, 40, 0.04)",selected:e==="dark"?"rgba(88, 166, 255, 0.10)":"rgba(9, 105, 218, 0.10)"},baseShadow:e==="dark"?"0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.25)":"0 4px 12px rgba(31, 35, 40, 0.12), 0 2px 4px rgba(31, 35, 40, 0.08)"}}),x={fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"','"Noto Sans"',"Helvetica","Arial","sans-serif"].join(","),h1:{fontSize:r.typography.pxToRem(48),fontWeight:600,lineHeight:1.2,letterSpacing:-.5},h2:{fontSize:r.typography.pxToRem(36),fontWeight:600,lineHeight:1.2},h3:{fontSize:r.typography.pxToRem(30),fontWeight:600,lineHeight:1.2},h4:{fontSize:r.typography.pxToRem(24),fontWeight:600,lineHeight:1.5},h5:{fontSize:r.typography.pxToRem(20),fontWeight:600},h6:{fontSize:r.typography.pxToRem(18),fontWeight:600},subtitle1:{fontSize:r.typography.pxToRem(18)},subtitle2:{fontSize:r.typography.pxToRem(14),fontWeight:500},body1:{fontSize:r.typography.pxToRem(14)},body2:{fontSize:r.typography.pxToRem(14),fontWeight:400},caption:{fontSize:r.typography.pxToRem(12),fontWeight:400},button:{textTransform:"none",fontWeight:600},overline:{fontSize:r.typography.pxToRem(12),fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em"}},f={borderRadius:8},R=e=>{const t=e==="dark"?"0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.25)":"0 4px 12px rgba(31, 35, 40, 0.12), 0 2px 4px rgba(31, 35, 40, 0.08)",a=[...r.shadows];return a[1]=t,a};class F{themes=new Map;register(t,a){this.themes.set(t,a)}get(t){return this.themes.get(t)??this.themes.get("default")}getVariants(){return Array.from(this.themes.keys())}}const k=new F,y=d.createContext({variant:"default",colorMode:"dark"});function z(){return d.useContext(y)}function C({mode:e}){const{setMode:t}=p.useColorScheme();return d.useEffect(()=>{t&&t(e)},[e,t]),null}function B({variant:e}){const{mode:t,systemMode:a}=p.useColorScheme();return d.useEffect(()=>{const c=t==="system"?a??"dark":t??"dark",g=e==="default"?c:`${e}-${c}`;document.documentElement.setAttribute("data-ov-theme",g)},[e,t,a]),null}function w({children:e,disableCustomTheme:t,themeComponents:a,defaultMode:c="dark",variant:g="default"}){const T=d.useMemo(()=>{if(t)return p.createTheme();const m=k.get(g);return p.createTheme({cssVariables:{colorSchemeSelector:"data-mui-color-scheme",cssVarPrefix:"ov-mui"},colorSchemes:{light:{palette:m.getDesignTokens("light").palette},dark:{palette:m.getDesignTokens("dark").palette}},typography:x,shape:f,shadows:m.getShadows("light"),components:{MuiCssBaseline:{styleOverrides:{html:{height:"100%"},body:{height:"100%"}}},...m.getCustomizations(),...a}})},[t,a,g]);return t?o.jsx(o.Fragment,{children:e}):o.jsx(y.Provider,{value:{variant:g,colorMode:c},children:o.jsxs(p.ThemeProvider,{theme:T,children:[o.jsx(p.CssBaseline,{enableColorScheme:!0}),o.jsx(C,{mode:c}),o.jsx(B,{variant:g}),e]})})}exports.AppTheme=w;exports.ThemeRegistry=k;exports.ThemeVariantContext=y;exports.brand=s;exports.customShadows=R;exports.getDesignTokens=S;exports.gray=u;exports.green=n;exports.orange=i;exports.purple=h;exports.red=l;exports.shape=f;exports.typography=x;exports.useThemeVariant=z;
@@ -0,0 +1,291 @@
1
+ import { jsx as p, Fragment as k, jsxs as T } from "react/jsx-runtime";
2
+ import { createTheme as d, ThemeProvider as b, CssBaseline as S, useColorScheme as f } from "@mui/material";
3
+ import { useMemo as F, createContext as R, useEffect as y, useContext as z } from "react";
4
+ import { createTheme as B } from "@mui/material/styles";
5
+ const r = B(), s = {
6
+ 50: "hsl(210, 100%, 95%)",
7
+ 100: "hsl(210, 100%, 92%)",
8
+ 200: "hsl(210, 100%, 80%)",
9
+ 300: "hsl(210, 100%, 65%)",
10
+ 400: "hsl(210, 98%, 48%)",
11
+ 500: "hsl(210, 98%, 42%)",
12
+ 600: "hsl(210, 98%, 55%)",
13
+ 700: "hsl(210, 100%, 35%)",
14
+ 800: "hsl(210, 100%, 16%)",
15
+ 900: "hsl(210, 100%, 21%)"
16
+ }, m = {
17
+ 50: "#ECF0F6",
18
+ // --ov-scale-gray-13
19
+ 100: "#CBD5E1",
20
+ // --ov-scale-gray-12
21
+ 200: "#ABB8CC",
22
+ // --ov-scale-gray-11
23
+ 300: "#8B9BB5",
24
+ // --ov-scale-gray-10
25
+ 400: "#6B7D96",
26
+ // --ov-scale-gray-9
27
+ 500: "#3E4F66",
28
+ // --ov-scale-gray-8
29
+ 600: "#2D3D52",
30
+ // --ov-scale-gray-6
31
+ 700: "#1F2937",
32
+ // --ov-scale-gray-4
33
+ 800: "#151B23",
34
+ // --ov-scale-gray-2
35
+ 900: "#0D1117"
36
+ // --ov-scale-gray-0
37
+ }, n = {
38
+ 50: "hsl(120, 80%, 98%)",
39
+ 100: "hsl(120, 75%, 94%)",
40
+ 200: "hsl(120, 75%, 87%)",
41
+ 300: "hsl(120, 61%, 77%)",
42
+ 400: "hsl(120, 44%, 53%)",
43
+ 500: "hsl(120, 59%, 30%)",
44
+ 600: "hsl(120, 70%, 25%)",
45
+ 700: "hsl(120, 75%, 16%)",
46
+ 800: "hsl(120, 84%, 10%)",
47
+ 900: "hsl(120, 87%, 6%)"
48
+ }, l = {
49
+ 50: "hsl(45, 100%, 97%)",
50
+ 100: "hsl(45, 92%, 90%)",
51
+ 200: "hsl(45, 94%, 80%)",
52
+ 300: "hsl(45, 90%, 65%)",
53
+ 400: "hsl(45, 90%, 40%)",
54
+ 500: "hsl(45, 90%, 35%)",
55
+ 600: "hsl(45, 91%, 25%)",
56
+ 700: "hsl(45, 94%, 20%)",
57
+ 800: "hsl(45, 95%, 16%)",
58
+ 900: "hsl(45, 93%, 12%)"
59
+ }, i = {
60
+ 50: "hsl(0, 100%, 97%)",
61
+ 100: "hsl(0, 92%, 90%)",
62
+ 200: "hsl(0, 94%, 80%)",
63
+ 300: "hsl(0, 90%, 65%)",
64
+ 400: "hsl(0, 90%, 40%)",
65
+ 500: "hsl(0, 90%, 30%)",
66
+ 600: "hsl(0, 91%, 25%)",
67
+ 700: "hsl(0, 94%, 18%)",
68
+ 800: "hsl(0, 95%, 12%)",
69
+ 900: "hsl(0, 93%, 6%)"
70
+ }, o = {
71
+ 50: "hsl(270, 100%, 97%)",
72
+ 100: "hsl(270, 92%, 90%)",
73
+ 200: "hsl(270, 80%, 80%)",
74
+ 300: "hsl(270, 70%, 65%)",
75
+ 400: "hsl(270, 70%, 50%)",
76
+ 500: "hsl(270, 70%, 42%)",
77
+ 600: "hsl(270, 70%, 35%)",
78
+ 700: "hsl(270, 75%, 25%)",
79
+ 800: "hsl(270, 80%, 16%)",
80
+ 900: "hsl(270, 85%, 10%)"
81
+ }, j = (e) => ({
82
+ palette: {
83
+ mode: e,
84
+ primary: {
85
+ light: s[200],
86
+ main: s[400],
87
+ dark: s[700],
88
+ contrastText: s[50],
89
+ ...e === "dark" && {
90
+ contrastText: s[50],
91
+ light: s[300],
92
+ main: s[400],
93
+ dark: s[700]
94
+ }
95
+ },
96
+ info: {
97
+ light: s[100],
98
+ main: s[300],
99
+ dark: s[600],
100
+ contrastText: m[50],
101
+ ...e === "dark" && {
102
+ contrastText: s[300],
103
+ light: s[500],
104
+ main: s[700],
105
+ dark: s[900]
106
+ }
107
+ },
108
+ warning: {
109
+ light: l[300],
110
+ main: l[400],
111
+ dark: l[800],
112
+ ...e === "dark" && {
113
+ light: l[400],
114
+ main: l[500],
115
+ dark: l[700]
116
+ }
117
+ },
118
+ error: {
119
+ light: i[300],
120
+ main: i[400],
121
+ dark: i[800],
122
+ ...e === "dark" && {
123
+ light: i[400],
124
+ main: i[500],
125
+ dark: i[700]
126
+ }
127
+ },
128
+ success: {
129
+ light: n[300],
130
+ main: n[400],
131
+ dark: n[800],
132
+ ...e === "dark" && {
133
+ light: n[400],
134
+ main: n[500],
135
+ dark: n[700]
136
+ }
137
+ },
138
+ secondary: {
139
+ light: o[300],
140
+ main: o[400],
141
+ dark: o[700],
142
+ contrastText: o[50],
143
+ ...e === "dark" && {
144
+ light: o[300],
145
+ main: o[400],
146
+ dark: o[800]
147
+ }
148
+ },
149
+ grey: m,
150
+ // Matches --ov-border-default / --ov-border-muted
151
+ divider: e === "dark" ? "rgba(62, 79, 102, 0.6)" : "rgba(208, 215, 222, 0.6)",
152
+ // alpha(--ov-border-default light, 0.6)
153
+ background: {
154
+ // Matches --ov-bg-base / --ov-bg-surface
155
+ default: e === "dark" ? "#0D1117" : "#FFFFFF",
156
+ paper: e === "dark" ? "#151B23" : "#F6F8FA"
157
+ },
158
+ text: {
159
+ // Matches --ov-fg-default / --ov-fg-muted
160
+ primary: e === "dark" ? "rgba(236, 240, 246, 0.92)" : "rgba(31, 35, 40, 0.92)",
161
+ secondary: e === "dark" ? "rgba(236, 240, 246, 0.64)" : "rgba(31, 35, 40, 0.64)"
162
+ },
163
+ action: {
164
+ // Matches --ov-state-hover / --ov-state-selected
165
+ hover: e === "dark" ? "rgba(255, 255, 255, 0.04)" : "rgba(31, 35, 40, 0.04)",
166
+ selected: e === "dark" ? "rgba(88, 166, 255, 0.10)" : "rgba(9, 105, 218, 0.10)"
167
+ },
168
+ baseShadow: e === "dark" ? "0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.25)" : "0 4px 12px rgba(31, 35, 40, 0.12), 0 2px 4px rgba(31, 35, 40, 0.08)"
169
+ }
170
+ }), C = {
171
+ fontFamily: [
172
+ "-apple-system",
173
+ "BlinkMacSystemFont",
174
+ '"Segoe UI"',
175
+ '"Noto Sans"',
176
+ "Helvetica",
177
+ "Arial",
178
+ "sans-serif"
179
+ ].join(","),
180
+ h1: { fontSize: r.typography.pxToRem(48), fontWeight: 600, lineHeight: 1.2, letterSpacing: -0.5 },
181
+ h2: { fontSize: r.typography.pxToRem(36), fontWeight: 600, lineHeight: 1.2 },
182
+ h3: { fontSize: r.typography.pxToRem(30), fontWeight: 600, lineHeight: 1.2 },
183
+ h4: { fontSize: r.typography.pxToRem(24), fontWeight: 600, lineHeight: 1.5 },
184
+ h5: { fontSize: r.typography.pxToRem(20), fontWeight: 600 },
185
+ h6: { fontSize: r.typography.pxToRem(18), fontWeight: 600 },
186
+ subtitle1: { fontSize: r.typography.pxToRem(18) },
187
+ subtitle2: { fontSize: r.typography.pxToRem(14), fontWeight: 500 },
188
+ body1: { fontSize: r.typography.pxToRem(14) },
189
+ body2: { fontSize: r.typography.pxToRem(14), fontWeight: 400 },
190
+ caption: { fontSize: r.typography.pxToRem(12), fontWeight: 400 },
191
+ button: { textTransform: "none", fontWeight: 600 },
192
+ overline: {
193
+ fontSize: r.typography.pxToRem(12),
194
+ fontWeight: 600,
195
+ textTransform: "uppercase",
196
+ letterSpacing: "0.08em"
197
+ }
198
+ }, W = { borderRadius: 8 }, P = (e) => {
199
+ const t = e === "dark" ? "0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.25)" : "0 4px 12px rgba(31, 35, 40, 0.12), 0 2px 4px rgba(31, 35, 40, 0.08)", a = [...r.shadows];
200
+ return a[1] = t, a;
201
+ };
202
+ class w {
203
+ themes = /* @__PURE__ */ new Map();
204
+ register(t, a) {
205
+ this.themes.set(t, a);
206
+ }
207
+ get(t) {
208
+ return this.themes.get(t) ?? this.themes.get("default");
209
+ }
210
+ getVariants() {
211
+ return Array.from(this.themes.keys());
212
+ }
213
+ }
214
+ const D = new w(), u = R({
215
+ variant: "default",
216
+ colorMode: "dark"
217
+ });
218
+ function $() {
219
+ return z(u);
220
+ }
221
+ function M({ mode: e }) {
222
+ const { setMode: t } = f();
223
+ return y(() => {
224
+ t && t(e);
225
+ }, [e, t]), null;
226
+ }
227
+ function v({ variant: e }) {
228
+ const { mode: t, systemMode: a } = f();
229
+ return y(() => {
230
+ const g = t === "system" ? a ?? "dark" : t ?? "dark", h = e === "default" ? g : `${e}-${g}`;
231
+ document.documentElement.setAttribute("data-ov-theme", h);
232
+ }, [e, t, a]), null;
233
+ }
234
+ function O({
235
+ children: e,
236
+ disableCustomTheme: t,
237
+ themeComponents: a,
238
+ defaultMode: g = "dark",
239
+ variant: h = "default"
240
+ }) {
241
+ const x = F(() => {
242
+ if (t)
243
+ return d();
244
+ const c = D.get(h);
245
+ return d({
246
+ cssVariables: {
247
+ colorSchemeSelector: "data-mui-color-scheme",
248
+ cssVarPrefix: "ov-mui"
249
+ },
250
+ colorSchemes: {
251
+ light: { palette: c.getDesignTokens("light").palette },
252
+ dark: { palette: c.getDesignTokens("dark").palette }
253
+ },
254
+ typography: C,
255
+ shape: W,
256
+ shadows: c.getShadows("light"),
257
+ components: {
258
+ MuiCssBaseline: {
259
+ styleOverrides: {
260
+ html: { height: "100%" },
261
+ body: { height: "100%" }
262
+ }
263
+ },
264
+ ...c.getCustomizations(),
265
+ ...a
266
+ }
267
+ });
268
+ }, [t, a, h]);
269
+ return t ? /* @__PURE__ */ p(k, { children: e }) : /* @__PURE__ */ p(u.Provider, { value: { variant: h, colorMode: g }, children: /* @__PURE__ */ T(b, { theme: x, children: [
270
+ /* @__PURE__ */ p(S, { enableColorScheme: !0 }),
271
+ /* @__PURE__ */ p(M, { mode: g }),
272
+ /* @__PURE__ */ p(v, { variant: h }),
273
+ e
274
+ ] }) });
275
+ }
276
+ export {
277
+ O as A,
278
+ D as T,
279
+ n as a,
280
+ s as b,
281
+ P as c,
282
+ j as d,
283
+ u as e,
284
+ m as g,
285
+ l as o,
286
+ o as p,
287
+ i as r,
288
+ W as s,
289
+ C as t,
290
+ $ as u
291
+ };
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),o=require("@mui/material/Box"),x=require("./CopyButton-CACe3RCF.cjs");function l({children:r,lineNumbers:a=!1,copy:i=!0,maxHeight:d,wrap:n=!1,sx:t}){const c=r.split(`
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("@mui/material/Box"),x=require("./CopyButton-3fq1UAiv.cjs");function l({children:r,lineNumbers:a=!1,copy:i=!0,maxHeight:d,wrap:n=!1,sx:t}){const c=r.split(`
2
2
  `);return e.jsxs(o,{sx:{position:"relative",bgcolor:"var(--ov-bg-surface-inset)",borderRadius:"6px",border:"1px solid var(--ov-border-muted)",overflow:"hidden",...typeof t=="object"&&!Array.isArray(t)?t:{}},children:[i&&e.jsx(o,{sx:{position:"absolute",top:4,right:4,zIndex:1},children:e.jsx(x.CopyButton,{value:r,size:"xs"})}),e.jsx(o,{component:"pre",sx:{m:0,p:1.5,pr:i?5:1.5,overflow:"auto",maxHeight:d,fontFamily:"var(--ov-font-mono)",fontSize:"13px",lineHeight:1.6,color:"var(--ov-fg-default)",whiteSpace:n?"pre-wrap":"pre",wordBreak:n?"break-all":void 0},children:a?e.jsx(o,{component:"table",sx:{borderCollapse:"collapse",width:"100%"},children:e.jsx("tbody",{children:c.map((p,s)=>e.jsxs("tr",{children:[e.jsx(o,{component:"td",sx:{pr:2,pl:.5,textAlign:"right",userSelect:"none",color:"var(--ov-fg-faint)",width:1,whiteSpace:"nowrap",verticalAlign:"top"},children:s+1}),e.jsx("td",{children:p})]},s))})}):e.jsx("code",{children:r})})]})}l.displayName="CodeBlock";exports.CodeBlock=l;
@@ -1,6 +1,6 @@
1
1
  import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
2
  import e from "@mui/material/Box";
3
- import { C as f } from "./CopyButton-DPBgL0K8.js";
3
+ import { C as f } from "./CopyButton-DWVcqdPe.js";
4
4
  function v({
5
5
  children: r,
6
6
  lineNumbers: p = !1,
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),l=require("react"),q=require("@mui/icons-material/ContentCopy"),I=require("@mui/icons-material/Check"),b=require("@mui/material/IconButton"),M=require("@mui/material/CircularProgress"),a=require("./types.cjs"),d=l.forwardRef(function({children:t,color:s="neutral",emphasis:e,size:o="sm",shape:c="rounded",loading:n=!1,disabled:x,onClick:y,title:f,sx:u,...h},B){const S=a.toMuiColor(s),j=a.toMuiSize(o),p={xs:24,sm:32,md:40,lg:48,xl:56},C={xs:14,sm:18,md:22,lg:26,xl:30};return r.jsx(b,{ref:B,color:S,size:j,disabled:x||n,onClick:y,title:f,sx:{borderRadius:a.toBorderRadius(c),width:p[o],height:p[o],fontSize:C[o],...typeof u=="object"&&!Array.isArray(u)?u:{}},...h,children:n?r.jsx(M,{size:C[o]-4,color:"inherit"}):t})});d.displayName="IconButton";function m({value:i,size:t="sm",label:s}){const[e,o]=l.useState(!1),c=l.useCallback(()=>{navigator.clipboard.writeText(i).then(()=>{o(!0),setTimeout(()=>o(!1),1500)})},[i]),n=t==="xs"?12:t==="sm"?14:t==="md"?16:18;return r.jsx(d,{size:t,color:e?"success":"neutral",onClick:c,"aria-label":s??(e?"Copied":"Copy to clipboard"),title:s??(e?"Copied!":"Copy"),children:e?r.jsx(I,{sx:{fontSize:n}}):r.jsx(q,{sx:{fontSize:n}})})}m.displayName="CopyButton";exports.CopyButton=m;exports.IconButton=d;
@@ -0,0 +1,78 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import S, { useState as B, useCallback as I } from "react";
3
+ import b from "@mui/icons-material/ContentCopy";
4
+ import M from "@mui/icons-material/Check";
5
+ import g from "@mui/material/IconButton";
6
+ import R from "@mui/material/CircularProgress";
7
+ import { toBorderRadius as k, toMuiSize as w, toMuiColor as z } from "./types.js";
8
+ const p = S.forwardRef(function({
9
+ children: t,
10
+ color: n = "neutral",
11
+ emphasis: r,
12
+ size: o = "sm",
13
+ shape: c = "rounded",
14
+ loading: e = !1,
15
+ disabled: u,
16
+ onClick: d,
17
+ title: f,
18
+ sx: a,
19
+ ...C
20
+ }, y) {
21
+ const h = z(n), x = w(o), m = {
22
+ xs: 24,
23
+ sm: 32,
24
+ md: 40,
25
+ lg: 48,
26
+ xl: 56
27
+ }, l = {
28
+ xs: 14,
29
+ sm: 18,
30
+ md: 22,
31
+ lg: 26,
32
+ xl: 30
33
+ };
34
+ return /* @__PURE__ */ i(
35
+ g,
36
+ {
37
+ ref: y,
38
+ color: h,
39
+ size: x,
40
+ disabled: u || e,
41
+ onClick: d,
42
+ title: f,
43
+ sx: {
44
+ borderRadius: k(c),
45
+ width: m[o],
46
+ height: m[o],
47
+ fontSize: l[o],
48
+ ...typeof a == "object" && !Array.isArray(a) ? a : {}
49
+ },
50
+ ...C,
51
+ children: e ? /* @__PURE__ */ i(R, { size: l[o] - 4, color: "inherit" }) : t
52
+ }
53
+ );
54
+ });
55
+ p.displayName = "IconButton";
56
+ function j({ value: s, size: t = "sm", label: n }) {
57
+ const [r, o] = B(!1), c = I(() => {
58
+ navigator.clipboard.writeText(s).then(() => {
59
+ o(!0), setTimeout(() => o(!1), 1500);
60
+ });
61
+ }, [s]), e = t === "xs" ? 12 : t === "sm" ? 14 : t === "md" ? 16 : 18;
62
+ return /* @__PURE__ */ i(
63
+ p,
64
+ {
65
+ size: t,
66
+ color: r ? "success" : "neutral",
67
+ onClick: c,
68
+ "aria-label": n ?? (r ? "Copied" : "Copy to clipboard"),
69
+ title: n ?? (r ? "Copied!" : "Copy"),
70
+ children: r ? /* @__PURE__ */ i(M, { sx: { fontSize: e } }) : /* @__PURE__ */ i(b, { sx: { fontSize: e } })
71
+ }
72
+ );
73
+ }
74
+ j.displayName = "CopyButton";
75
+ export {
76
+ j as C,
77
+ p as I
78
+ };
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),o=require("@mui/material/Box"),i=require("@mui/material/Typography"),c=require("@mui/icons-material/ErrorOutline"),d=require("./Button-Dmu1cikC.cjs"),g=require("./CopyButton-CACe3RCF.cjs"),p={xs:2,sm:3,md:4,lg:6,xl:8};function u({icon:s,title:a,description:n,primaryAction:l,secondaryAction:x,size:t="md",sx:r}){const f=t==="xs"||t==="sm"?32:t==="md"?40:48;return e.jsxs(o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:p[t],px:2,...typeof r=="object"&&!Array.isArray(r)?r:{}},children:[s&&e.jsx(o,{sx:{mb:2,color:"var(--ov-fg-faint)",fontSize:f,display:"flex"},children:s}),e.jsx(i,{variant:t==="xs"||t==="sm"?"subtitle2":"h6",sx:{color:"var(--ov-fg-default)",fontWeight:600,mb:n?.5:0},children:a}),n&&e.jsx(i,{variant:"body2",sx:{color:"var(--ov-fg-muted)",maxWidth:400,lineHeight:1.5},children:n}),(l||x)&&e.jsxs(o,{sx:{display:"flex",gap:1,mt:2.5},children:[l,x]})]})}u.displayName="EmptyState";function m({message:s,errorId:a,onRetry:n,variant:l="panel"}){const x=l==="inline",t=l==="page",r=t?56:x?20:40;return x?e.jsxs(o,{sx:{display:"inline-flex",alignItems:"center",gap:1,color:"var(--ov-danger-default)"},children:[e.jsx(c,{sx:{fontSize:r}}),e.jsx(i,{variant:"body2",sx:{color:"var(--ov-danger-default)"},children:s}),n&&e.jsx(d.Button,{size:"xs",emphasis:"ghost",color:"danger",onClick:n,children:"Retry"})]}):e.jsxs(o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:t?8:4,px:2,...t&&{minHeight:"60vh"}},children:[e.jsx(c,{sx:{fontSize:r,color:"var(--ov-danger-default)",mb:2}}),e.jsx(i,{variant:t?"h5":"subtitle1",sx:{color:"var(--ov-fg-default)",fontWeight:600,mb:.5},children:"Something went wrong"}),e.jsx(i,{variant:"body2",sx:{color:"var(--ov-fg-muted)",maxWidth:420,lineHeight:1.5,mb:1},children:s}),a&&e.jsxs(o,{sx:{display:"inline-flex",alignItems:"center",gap:.5,mb:2,px:1.5,py:.5,borderRadius:"4px",bgcolor:"var(--ov-bg-surface-inset)"},children:[e.jsxs(i,{variant:"caption",sx:{fontFamily:"var(--ov-font-mono)",color:"var(--ov-fg-muted)",fontSize:"var(--ov-text-xs)"},children:["Error ID: ",a]}),e.jsx(g.CopyButton,{value:a,size:"xs"})]}),n&&e.jsx(d.Button,{emphasis:"outline",color:"primary",size:"sm",onClick:n,children:"Try again"})]})}m.displayName="ErrorState";exports.EmptyState=u;exports.ErrorState=m;
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("@mui/material/Box"),i=require("@mui/material/Typography"),c=require("@mui/icons-material/ErrorOutline"),d=require("./Button-Dmu1cikC.cjs"),g=require("./CopyButton-3fq1UAiv.cjs"),p={xs:2,sm:3,md:4,lg:6,xl:8};function u({icon:s,title:a,description:n,primaryAction:l,secondaryAction:x,size:t="md",sx:r}){const f=t==="xs"||t==="sm"?32:t==="md"?40:48;return e.jsxs(o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:p[t],px:2,...typeof r=="object"&&!Array.isArray(r)?r:{}},children:[s&&e.jsx(o,{sx:{mb:2,color:"var(--ov-fg-faint)",fontSize:f,display:"flex"},children:s}),e.jsx(i,{variant:t==="xs"||t==="sm"?"subtitle2":"h6",sx:{color:"var(--ov-fg-default)",fontWeight:600,mb:n?.5:0},children:a}),n&&e.jsx(i,{variant:"body2",sx:{color:"var(--ov-fg-muted)",maxWidth:400,lineHeight:1.5},children:n}),(l||x)&&e.jsxs(o,{sx:{display:"flex",gap:1,mt:2.5},children:[l,x]})]})}u.displayName="EmptyState";function m({message:s,errorId:a,onRetry:n,variant:l="panel"}){const x=l==="inline",t=l==="page",r=t?56:x?20:40;return x?e.jsxs(o,{sx:{display:"inline-flex",alignItems:"center",gap:1,color:"var(--ov-danger-default)"},children:[e.jsx(c,{sx:{fontSize:r}}),e.jsx(i,{variant:"body2",sx:{color:"var(--ov-danger-default)"},children:s}),n&&e.jsx(d.Button,{size:"xs",emphasis:"ghost",color:"danger",onClick:n,children:"Retry"})]}):e.jsxs(o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:t?8:4,px:2,...t&&{minHeight:"60vh"}},children:[e.jsx(c,{sx:{fontSize:r,color:"var(--ov-danger-default)",mb:2}}),e.jsx(i,{variant:t?"h5":"subtitle1",sx:{color:"var(--ov-fg-default)",fontWeight:600,mb:.5},children:"Something went wrong"}),e.jsx(i,{variant:"body2",sx:{color:"var(--ov-fg-muted)",maxWidth:420,lineHeight:1.5,mb:1},children:s}),a&&e.jsxs(o,{sx:{display:"inline-flex",alignItems:"center",gap:.5,mb:2,px:1.5,py:.5,borderRadius:"4px",bgcolor:"var(--ov-bg-surface-inset)"},children:[e.jsxs(i,{variant:"caption",sx:{fontFamily:"var(--ov-font-mono)",color:"var(--ov-fg-muted)",fontSize:"var(--ov-text-xs)"},children:["Error ID: ",a]}),e.jsx(g.CopyButton,{value:a,size:"xs"})]}),n&&e.jsx(d.Button,{emphasis:"outline",color:"primary",size:"sm",onClick:n,children:"Try again"})]})}m.displayName="ErrorState";exports.EmptyState=u;exports.ErrorState=m;
@@ -3,7 +3,7 @@ import a from "@mui/material/Box";
3
3
  import i from "@mui/material/Typography";
4
4
  import d from "@mui/icons-material/ErrorOutline";
5
5
  import { B as f } from "./Button-lr02bh_m.js";
6
- import { C as p } from "./CopyButton-DPBgL0K8.js";
6
+ import { C as p } from "./CopyButton-DWVcqdPe.js";
7
7
  const g = {
8
8
  xs: 2,
9
9
  sm: 3,
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),y=require("react"),B=require("@mui/material/Select"),q=require("@mui/material/MenuItem"),K=require("@mui/material/FormControl"),U=require("@mui/material/InputLabel"),V=require("@mui/material/FormHelperText"),G=require("@mui/material/ListItemIcon"),_=require("@mui/material/ListItemText"),J=require("@mui/material/CircularProgress"),Q=require("@mui/material/OutlinedInput"),X=require("@mui/material/InputBase"),Y=require("@mui/material/Chip"),f=require("@mui/material/Box"),Z=require("@mui/icons-material/Search"),$=require("@mui/icons-material/Clear"),b=require("./types.cjs");function D({options:x,value:g,onChange:c,size:h="md",color:z="neutral",label:l,helperText:w,placeholder:o,searchable:d=!1,multiple:v=!1,loading:M=!1,error:p,fullWidth:E,disabled:H,clearable:P=!1,sx:T}){const[m,C]=y.useState(""),[A,L]=y.useState(!1),[a,u]=y.useState(-1),O=b.toMuiInputSize(h),I=b.toMuiColor(z),F=typeof p=="string"?!!p:p,k=typeof p=="string"?p:void 0,j=()=>{L(!1),u(-1),d&&C("")},s=y.useMemo(()=>{if(!d||!m)return x;const e=m.toLowerCase();return x.filter(t=>t.label.toLowerCase().includes(e))},[x,m,d]),R=e=>{c(e.target.value)},W=e=>{if(e.key==="Escape"){j();return}if(e.key==="ArrowDown"){if(e.preventDefault(),e.stopPropagation(),s.length===0)return;const t=a+1;u(t>=s.length?0:t);return}if(e.key==="ArrowUp"){e.preventDefault(),e.stopPropagation();const t=a-1;u(t<0?s.length-1:t);return}if(e.key==="Enter"&&a>=0&&a<s.length){e.preventDefault(),e.stopPropagation();const t=s[a];if(!t.disabled)if(v){const n=Array.isArray(g)?g:[],S=n.includes(t.value)?n.filter(i=>i!==t.value):[...n,t.value];c(S)}else c(t.value),j();return}e.stopPropagation()};return r.jsxs(K,{size:O,fullWidth:E,error:F,disabled:H,style:{"--ov-input-height":b.INPUT_HEIGHTS[h]},sx:T,children:[l&&r.jsx(U,{color:I==="default"||I==="inherit"?void 0:I,shrink:!!o||void 0,children:l}),r.jsxs(B,{value:g,onChange:R,multiple:v,displayEmpty:!!o,label:l,notched:l&&!!o||void 0,input:v?r.jsx(Q,{label:l}):void 0,open:A,onOpen:()=>{L(!0),u(-1)},onClose:j,renderValue:v?e=>{const t=e;return t.length===0&&o?r.jsx(f,{sx:{color:"var(--ov-fg-faint)"},children:o}):r.jsxs(f,{sx:{display:"flex",flexWrap:"nowrap",gap:.5,overflow:"hidden",alignItems:"center"},children:[t.map(n=>{const S=x.find(i=>i.value===n);return r.jsx(Y,{label:S?.label??n,size:"small",...P?{onDelete:i=>{i.stopPropagation(),c(t.filter(N=>N!==n))},onMouseDown:i=>{i.stopPropagation()}}:{}},n)}),P&&t.length>1&&r.jsx("button",{type:"button","aria-label":"Clear all",onClick:n=>{n.stopPropagation(),c([])},style:{display:"inline-flex",alignItems:"center",flexShrink:0,marginLeft:2,cursor:"pointer",color:"var(--ov-fg-faint)",lineHeight:0,background:"none",border:"none",padding:0},children:r.jsx($,{sx:{fontSize:16}})})]})}:o&&!g?()=>r.jsx(f,{sx:{color:"var(--ov-fg-faint)"},children:o}):void 0,MenuProps:{PaperProps:{sx:{maxHeight:300,...h==="xs"||h==="sm"?{"& .MuiMenuItem-root":{fontSize:"0.8rem",minHeight:28,padding:"3px 8px"},"& .MuiListItemText-root":{margin:0},"& .MuiListItemText-primary":{fontSize:"0.8rem"},"& .MuiListItemIcon-root":{minWidth:22}}:{}}}},children:[d&&r.jsx(f,{sx:{px:1,pb:.5,pt:.5},onClickCapture:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:r.jsxs(f,{sx:{display:"flex",alignItems:"center",height:28,border:"1px solid var(--ov-border-default)",borderRadius:"4px",bgcolor:"var(--ov-bg-base)",px:.75,"&:focus-within":{borderColor:"var(--ov-accent)"}},children:[r.jsx(Z,{sx:{fontSize:14,color:"var(--ov-fg-faint)",mr:.5}}),r.jsx(X,{autoFocus:!0,fullWidth:!0,placeholder:"Search...",value:m,onChange:e=>{C(e.target.value),u(-1)},onKeyDown:W,sx:{flex:1,fontSize:"0.75rem",color:"var(--ov-fg-default)","& input":{py:0,px:0},"& input::placeholder":{color:"var(--ov-fg-faint)",opacity:1}}})]})}),M&&r.jsxs(q,{disabled:!0,children:[r.jsx(J,{size:16,sx:{mr:1}})," Loading..."]}),s.map((e,t)=>r.jsxs(q,{value:e.value,disabled:e.disabled,...d?{onMouseEnter:()=>u(t),sx:t===a?{bgcolor:"action.focus"}:void 0}:{},children:[e.icon&&r.jsx(G,{sx:{minWidth:28},children:e.icon}),r.jsx(_,{children:e.label})]},e.value)),s.length===0&&!M&&r.jsx(q,{disabled:!0,children:"No options"})]}),(k||w)&&r.jsx(V,{children:k??w})]})}D.displayName="Select";exports.Select=D;