schema-components 1.15.0 → 1.15.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.
@@ -134,7 +134,7 @@ function renderFieldServer(tree, value, resolver, renderChild, widgets) {
134
134
  throw new SchemaRenderError(err instanceof Error ? err.message : `Render function threw for type "${tree.type}"`, tree, tree.type, err);
135
135
  }
136
136
  }
137
- if (value === void 0 || value === null) return /* @__PURE__ */ jsx("span", { children: "\\u2014" });
137
+ if (value === void 0 || value === null) return /* @__PURE__ */ jsx("span", { children: "" });
138
138
  return /* @__PURE__ */ jsx("span", { children: typeof value === "string" ? value : JSON.stringify(value) });
139
139
  }
140
140
  //#endregion
@@ -71,7 +71,7 @@ function renderString(props) {
71
71
  if (strValue === void 0 || strValue.length === 0) return /* @__PURE__ */ jsx("span", {
72
72
  id,
73
73
  "aria-readonly": "true",
74
- children: "\\u2014"
74
+ children: ""
75
75
  });
76
76
  const format = props.constraints.format;
77
77
  if (format === "email") return /* @__PURE__ */ jsx("a", {
@@ -127,9 +127,9 @@ function renderString(props) {
127
127
  props.onChange(e.target.value);
128
128
  },
129
129
  ...ariaAttrs,
130
- children: [/* @__PURE__ */ jsx("option", {
130
+ children: [/* @__PURE__ */ jsxs("option", {
131
131
  value: "",
132
- children: "Select\\u2026"
132
+ children: ["Select", "…"]
133
133
  }), props.enumValues.map((v) => {
134
134
  const display = v === null ? "null" : typeof v === "string" ? v : String(v);
135
135
  return /* @__PURE__ */ jsx("option", {
@@ -157,7 +157,7 @@ function renderNumber(props) {
157
157
  if (typeof props.value !== "number") return /* @__PURE__ */ jsx("span", {
158
158
  id,
159
159
  "aria-readonly": "true",
160
- children: "\\u2014"
160
+ children: ""
161
161
  });
162
162
  return /* @__PURE__ */ jsx("span", {
163
163
  id,
@@ -186,7 +186,7 @@ function renderBoolean(props) {
186
186
  if (typeof props.value !== "boolean") return /* @__PURE__ */ jsx("span", {
187
187
  id,
188
188
  "aria-readonly": "true",
189
- children: "\\u2014"
189
+ children: ""
190
190
  });
191
191
  return /* @__PURE__ */ jsx("span", {
192
192
  id,
@@ -224,9 +224,9 @@ function renderEnum(props) {
224
224
  props.onChange(e.target.value);
225
225
  },
226
226
  ...ariaAttrs,
227
- children: [/* @__PURE__ */ jsx("option", {
227
+ children: [/* @__PURE__ */ jsxs("option", {
228
228
  value: "",
229
- children: "Select\\u2026"
229
+ children: ["Select", "…"]
230
230
  }), props.enumValues?.map((v) => {
231
231
  const display = v === null ? "null" : typeof v === "string" ? v : String(v);
232
232
  return /* @__PURE__ */ jsx("option", {
@@ -312,20 +312,20 @@ function renderArray(props) {
312
312
  function renderUnion(props) {
313
313
  const options = props.options;
314
314
  if (options === void 0 || options.length === 0) {
315
- if (props.value === void 0 || props.value === null) return /* @__PURE__ */ jsx("span", { children: "\\u2014" });
315
+ if (props.value === void 0 || props.value === null) return /* @__PURE__ */ jsx("span", { children: "" });
316
316
  return /* @__PURE__ */ jsx("span", { children: JSON.stringify(props.value) });
317
317
  }
318
318
  const matched = matchUnionOption(options, props.value);
319
319
  if (matched !== void 0) return toReactNode(props.renderChild(matched, props.value, props.onChange));
320
320
  const firstOption = options[0];
321
321
  if (firstOption !== void 0) return toReactNode(props.renderChild(firstOption, props.value, props.onChange));
322
- return /* @__PURE__ */ jsx("span", { children: "\\u2014" });
322
+ return /* @__PURE__ */ jsx("span", { children: "" });
323
323
  }
324
324
  function renderDiscriminatedUnion(props) {
325
325
  const options = props.options;
326
326
  const discriminator = props.discriminator;
327
327
  if (options === void 0 || options.length === 0) {
328
- if (props.value === void 0 || props.value === null) return /* @__PURE__ */ jsx("span", { children: "\\u2014" });
328
+ if (props.value === void 0 || props.value === null) return /* @__PURE__ */ jsx("span", { children: "" });
329
329
  return /* @__PURE__ */ jsx("span", { children: JSON.stringify(props.value) });
330
330
  }
331
331
  const obj = isObject(props.value) ? props.value : {};
@@ -350,7 +350,7 @@ function renderDiscriminatedUnion(props) {
350
350
  const panelId = inputId(props.path);
351
351
  if (props.readOnly) {
352
352
  if (activeOption !== void 0) return toReactNode(props.renderChild(activeOption, props.value, props.onChange));
353
- return /* @__PURE__ */ jsx("span", { children: "\\u2014" });
353
+ return /* @__PURE__ */ jsx("span", { children: "" });
354
354
  }
355
355
  return /* @__PURE__ */ jsx(DiscriminatedUnionTabs, {
356
356
  options,
@@ -478,7 +478,7 @@ function renderUnknown(props) {
478
478
  if (props.value === void 0 || props.value === null) return /* @__PURE__ */ jsx("span", {
479
479
  id,
480
480
  "aria-readonly": "true",
481
- children: "\\u2014"
481
+ children: ""
482
482
  });
483
483
  return /* @__PURE__ */ jsx("span", {
484
484
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schema-components",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "React components that render UI from Zod schemas, JSON Schema, and OpenAPI documents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",