schema-components 1.9.0 → 1.9.1
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/themes/mantine.d.mts +5 -5
- package/dist/themes/mantine.mjs +5 -10
- package/dist/themes/mui.d.mts +9 -6
- package/dist/themes/mui.mjs +6 -11
- package/package.json +1 -1
|
@@ -6,11 +6,11 @@ import { b as ComponentResolver } from "../types-BJzEgJdX.mjs";
|
|
|
6
6
|
* Call once at app startup before rendering.
|
|
7
7
|
*/
|
|
8
8
|
declare function registerMantineComponents(components: {
|
|
9
|
-
TextInput:
|
|
10
|
-
NumberInput:
|
|
11
|
-
Switch:
|
|
12
|
-
Select:
|
|
13
|
-
Fieldset:
|
|
9
|
+
TextInput: React.ElementType;
|
|
10
|
+
NumberInput: React.ElementType;
|
|
11
|
+
Switch: React.ElementType;
|
|
12
|
+
Select: React.ElementType;
|
|
13
|
+
Fieldset: React.ElementType;
|
|
14
14
|
}): void;
|
|
15
15
|
declare const mantineResolver: ComponentResolver;
|
|
16
16
|
//#endregion
|
package/dist/themes/mantine.mjs
CHANGED
|
@@ -16,21 +16,16 @@ let MantineSwitch = (props) => /* @__PURE__ */ jsx("input", {
|
|
|
16
16
|
});
|
|
17
17
|
let MantineSelect = (props) => /* @__PURE__ */ jsx("select", { ...props });
|
|
18
18
|
let MantineFieldset = (props) => /* @__PURE__ */ jsx("fieldset", { ...props });
|
|
19
|
-
function toComponent(value) {
|
|
20
|
-
if (typeof value === "function") return value;
|
|
21
|
-
if (typeof value === "object" && value !== null && "render" in value) return value;
|
|
22
|
-
throw new Error(`Expected a React component, got ${typeof value}`);
|
|
23
|
-
}
|
|
24
19
|
/**
|
|
25
20
|
* Register real Mantine components for the resolver to use.
|
|
26
21
|
* Call once at app startup before rendering.
|
|
27
22
|
*/
|
|
28
23
|
function registerMantineComponents(components) {
|
|
29
|
-
MantineTextInput =
|
|
30
|
-
MantineNumberInput =
|
|
31
|
-
MantineSwitch =
|
|
32
|
-
MantineSelect =
|
|
33
|
-
MantineFieldset =
|
|
24
|
+
MantineTextInput = components.TextInput;
|
|
25
|
+
MantineNumberInput = components.NumberInput;
|
|
26
|
+
MantineSwitch = components.Switch;
|
|
27
|
+
MantineSelect = components.Select;
|
|
28
|
+
MantineFieldset = components.Fieldset;
|
|
34
29
|
}
|
|
35
30
|
function renderStringInput(props) {
|
|
36
31
|
const strValue = typeof props.value === "string" ? props.value : "";
|
package/dist/themes/mui.d.mts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { b as ComponentResolver } from "../types-BJzEgJdX.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/themes/mui.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Register real MUI components. Call once at app startup.
|
|
6
|
+
*/
|
|
4
7
|
declare function registerMuiComponents(components: {
|
|
5
|
-
TextField:
|
|
6
|
-
Checkbox:
|
|
7
|
-
Typography:
|
|
8
|
-
Box:
|
|
9
|
-
MenuItem:
|
|
10
|
-
FormControlLabel:
|
|
8
|
+
TextField: React.ElementType;
|
|
9
|
+
Checkbox: React.ElementType;
|
|
10
|
+
Typography: React.ElementType;
|
|
11
|
+
Box: React.ElementType;
|
|
12
|
+
MenuItem: React.ElementType;
|
|
13
|
+
FormControlLabel: React.ElementType;
|
|
11
14
|
}): void;
|
|
12
15
|
declare const muiResolver: ComponentResolver;
|
|
13
16
|
//#endregion
|
package/dist/themes/mui.mjs
CHANGED
|
@@ -197,18 +197,13 @@ let MuiFormControlLabel = (props) => {
|
|
|
197
197
|
/**
|
|
198
198
|
* Register real MUI components. Call once at app startup.
|
|
199
199
|
*/
|
|
200
|
-
function toComponent(value) {
|
|
201
|
-
if (typeof value === "function") return value;
|
|
202
|
-
if (typeof value === "object" && value !== null && "render" in value) return value;
|
|
203
|
-
throw new Error(`Expected a React component, got ${typeof value}`);
|
|
204
|
-
}
|
|
205
200
|
function registerMuiComponents(components) {
|
|
206
|
-
MuiTextField =
|
|
207
|
-
MuiCheckbox =
|
|
208
|
-
MuiTypography =
|
|
209
|
-
MuiBox =
|
|
210
|
-
MuiMenuItem =
|
|
211
|
-
MuiFormControlLabel =
|
|
201
|
+
MuiTextField = components.TextField;
|
|
202
|
+
MuiCheckbox = components.Checkbox;
|
|
203
|
+
MuiTypography = components.Typography;
|
|
204
|
+
MuiBox = components.Box;
|
|
205
|
+
MuiMenuItem = components.MenuItem;
|
|
206
|
+
MuiFormControlLabel = components.FormControlLabel;
|
|
212
207
|
}
|
|
213
208
|
function buildResolver() {
|
|
214
209
|
const resolver = {
|