@kubohiroya/turbowarp-extension-data-editor 0.8.1 → 0.9.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.
@@ -2,7 +2,7 @@ import {
2
2
  EditorRegistry,
3
3
  cloneJson,
4
4
  createFixedInputEditor
5
- } from "./shared-FW4MRLXW.js";
5
+ } from "./shared-S623S2PV.js";
6
6
  import {
7
7
  EDITOR_API_VERSION
8
8
  } from "./shared-BKTRZUZH.js";
@@ -5066,9 +5066,11 @@ var formStyles = `
5066
5066
  [data-editor-form] .editor-form-section>legend,[data-editor-form] .rjsf fieldset>legend{font-size:15px;font-weight:650;padding:0;margin:0 0 10px;color:inherit}
5067
5067
  [data-editor-form] .editor-form-field,[data-editor-form] .rjsf .form-group{margin:0 0 14px;min-width:0}
5068
5068
  [data-editor-form] .editor-form-field>label,[data-editor-form] .rjsf .control-label{display:block;font-size:13px;font-weight:600;margin:0 0 6px;color:inherit}
5069
+ [data-editor-form] [data-block-editor-pair-row] label,[data-editor-form] .rjsf [data-block-editor-pair-row] .control-label{margin-bottom:0}
5069
5070
  [data-editor-form] .required{color:var(--editor-accent);margin-left:3px}
5070
5071
  [data-editor-form] input:not([type=checkbox]):not([type=radio]),[data-editor-form] select,[data-editor-form] textarea{display:block;width:100%;min-height:38px;margin:0;padding:8px 11px;border:1px solid var(--editor-line);border-radius:7px;background:var(--block-editor-input,white);color:inherit;font:inherit;box-shadow:0 1px 2px #172b4d05}
5071
5072
  [data-editor-form] textarea{min-height:76px;resize:vertical}
5073
+ [data-editor-form] input:not([type=checkbox]):not([type=radio])[data-block-editor-invalid="true"],[data-editor-form] select[data-block-editor-invalid="true"],[data-editor-form] textarea[data-block-editor-invalid="true"]{border-color:var(--block-editor-error-border,#c62828);box-shadow:0 0 0 1px var(--block-editor-error-border,#c62828);background:linear-gradient(var(--block-editor-error-tint,rgba(198,40,40,0.08)),var(--block-editor-error-tint,rgba(198,40,40,0.08))),var(--block-editor-input,white)}
5072
5074
  [data-editor-form] input:focus-visible,[data-editor-form] select:focus-visible,[data-editor-form] textarea:focus-visible,[data-editor-form] button:focus-visible,[data-editor-form] summary:focus-visible{outline:2px solid var(--editor-accent);outline-offset:2px}
5073
5075
  [data-editor-form] input[readonly]{background:var(--block-editor-subtle,var(--block-editor-background,#f5f7fb));color:var(--editor-muted)}
5074
5076
  [data-editor-form] input[type=checkbox]{width:17px;height:17px;margin:0;accent-color:var(--editor-accent)}
@@ -13034,6 +13036,16 @@ function describe(context) {
13034
13036
  throw new TypeError("A fixed form requires a fixed session.");
13035
13037
  return result;
13036
13038
  }
13039
+ function liveIssues2(context) {
13040
+ var _a;
13041
+ const issues = [...describe(context).issues];
13042
+ const checked = typeof context.checkFixedInput === "function" ? (_a = context.checkFixedInput()) !== null && _a !== void 0 ? _a : [] : [];
13043
+ for (const issue2 of checked) {
13044
+ if (!issues.some((item) => item.message === issue2.message && item.path === issue2.path))
13045
+ issues.push(issue2);
13046
+ }
13047
+ return issues;
13048
+ }
13037
13049
  var nextFixedViewId = 0;
13038
13050
  function FixedInputView({ context, messages }) {
13039
13051
  const [, redraw] = React4.useState(0);
@@ -13068,7 +13080,7 @@ function FixedInputView({ context, messages }) {
13068
13080
  entry.repair = true;
13069
13081
  Object.defineProperty(next.inputs, argument, { value: entry, enumerable: true, configurable: true, writable: true });
13070
13082
  context.setDraft(next);
13071
- context.setValidationIssues(describe(context).issues);
13083
+ context.setValidationIssues(liveIssues2(context));
13072
13084
  };
13073
13085
  const hasInactiveEdits = Object.entries(description.inputs).some(([argument, input]) => input.state === "hidden" && record4(inputs[argument]) && inputs[argument].changed === true);
13074
13086
  return React4.createElement(