@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.
- package/README.ja.md +1 -0
- package/README.md +1 -0
- package/dist/build-info.json +3 -3
- package/dist/fixed-input-view.js +12 -1
- package/dist/form-presentation.d.ts +1 -1
- package/dist/form-presentation.js +2 -0
- package/dist/react.js +3 -0
- package/dist/session.d.ts +5 -0
- package/dist/session.js +17 -0
- package/dist/types.d.ts +5 -0
- package/dist/view.js +4 -0
- package/dist/webpack4/index.js +1 -1
- package/dist/webpack4/metafile.json +21 -21
- package/dist/webpack4/react.js +1 -0
- package/dist/webpack4/react.js.map +2 -2
- package/dist/webpack4/rjsf.js +14 -2
- package/dist/webpack4/rjsf.js.map +3 -3
- package/dist/webpack4/{shared-FW4MRLXW.js → shared-S623S2PV.js} +21 -1
- package/dist/webpack4/shared-S623S2PV.js.map +7 -0
- package/dist/webpack4/turbowarp.js +1 -1
- package/docs/fixed-input-contracts.md +1 -1
- package/package.json +4 -2
- package/dist/webpack4/shared-FW4MRLXW.js.map +0 -7
package/README.ja.md
CHANGED
|
@@ -109,6 +109,7 @@ pnpm test
|
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
`pnpm test` は型宣言を含むビルド後、コアと標準フォームのテストを実行します。
|
|
112
|
+
`pnpm run test:runtime` は、最小 editor runtime(`@kubohiroya/turbowarp-plus-editor-test-runtime`)の上で、TurboWarp Plus Editor が固定する VM と Scratch Blocks を使い、Editor をビルドせずにエディターを Chromium で試します。試験用の拡張機能が固定入力のエディターを登録し、ブロックのアイコンからダイアログを開いて、検証・保存・本物のドロップダウンの操作を確かめます。先に Playwright の Chromium を入れてください(`pnpm exec playwright install chromium`)。
|
|
112
113
|
パッケージは ESM です。ブラウザには ES2022 の組み込み API が必要です。
|
|
113
114
|
標準フォームの React / ReactDOM peer は 16.14 / 17 / 18。GUI は既存の 16.14 を共有します。
|
|
114
115
|
初回の実験版は `@kubohiroya/turbowarp-extension-data-editor@0.1.0` です。固定SchemaのSource/Form編集は `0.2.0`、既定OFFの固定入力契約・標準field transaction・固定フォームとGUI接続は `0.2.1` で追加しました。配布版 `0.2.2` は、編集見出しのブロック名・アイコン、項目の削除メニュー・追加ボタン、key-valueの2行表示を含みます。
|
package/README.md
CHANGED
|
@@ -107,6 +107,7 @@ pnpm test
|
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
`pnpm test` builds the package, including type declarations, then runs the core and standard form tests.
|
|
110
|
+
`pnpm run test:runtime` runs the editors on the TurboWarp Plus Editor's pinned VM and Scratch Blocks in Chromium, through the minimal editor runtime (`@kubohiroya/turbowarp-plus-editor-test-runtime`), without building the Editor: a fixture extension registers a fixed input editor, and the tests open its dialog from the block's icon, validate, save and use the native dropdown. Install Chromium for Playwright first (`pnpm exec playwright install chromium`).
|
|
110
111
|
The package uses ESM. Browsers need ES2022 built-in APIs.
|
|
111
112
|
The standard form supports React / ReactDOM peers 16.14, 17, and 18. The GUI shares its existing React 16.14 installation.
|
|
112
113
|
The first experimental release was `@kubohiroya/turbowarp-extension-data-editor@0.1.0`. Fixed-schema Source/Form editing was added in `0.2.0`; default-off fixed-input contracts, standard field transactions, fixed-input forms, and GUI integration followed in `0.2.1`. Release `0.2.2` includes block names and icons in editor headings, field removal menus and add buttons, and two-line key-value layouts.
|
package/dist/build-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-extension-data-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"repository": "https://github.com/kubohiroya/turbowarp-extension-data-editor",
|
|
5
|
-
"revision": "
|
|
5
|
+
"revision": "2b78007136ce053b643ba36cad8526b9abb457a0",
|
|
6
6
|
"sourceState": "commit",
|
|
7
|
-
"sourceSha256": "
|
|
7
|
+
"sourceSha256": "5f500faea5d2ced27b0386d6ff550638f8ef78e2aac24a3ba0ec37c3c0afbc0d",
|
|
8
8
|
"capabilities": {
|
|
9
9
|
"preparedSource": 1
|
|
10
10
|
}
|
package/dist/fixed-input-view.js
CHANGED
|
@@ -52,6 +52,17 @@ function describe(context) {
|
|
|
52
52
|
throw new TypeError('A fixed form requires a fixed session.');
|
|
53
53
|
return result;
|
|
54
54
|
}
|
|
55
|
+
/** Presentation issues plus the save-time check, so Save is disabled as soon as the draft would be rejected. */
|
|
56
|
+
function liveIssues(context) {
|
|
57
|
+
var _a;
|
|
58
|
+
const issues = [...describe(context).issues];
|
|
59
|
+
const checked = typeof context.checkFixedInput === 'function' ? (_a = context.checkFixedInput()) !== null && _a !== void 0 ? _a : [] : [];
|
|
60
|
+
for (const issue of checked) {
|
|
61
|
+
if (!issues.some(item => item.message === issue.message && item.path === issue.path))
|
|
62
|
+
issues.push(issue);
|
|
63
|
+
}
|
|
64
|
+
return issues;
|
|
65
|
+
}
|
|
55
66
|
let nextFixedViewId = 0;
|
|
56
67
|
/** The session owns every buffer, including controls temporarily absent from the DOM. */
|
|
57
68
|
function FixedInputView({ context, messages }) {
|
|
@@ -87,7 +98,7 @@ function FixedInputView({ context, messages }) {
|
|
|
87
98
|
entry.repair = true;
|
|
88
99
|
Object.defineProperty(next.inputs, argument, { value: entry, enumerable: true, configurable: true, writable: true });
|
|
89
100
|
context.setDraft(next);
|
|
90
|
-
context.setValidationIssues(
|
|
101
|
+
context.setValidationIssues(liveIssues(context));
|
|
91
102
|
};
|
|
92
103
|
const hasInactiveEdits = Object.entries(description.inputs).some(([argument, input]) => input.state === 'hidden' && record(inputs[argument]) && inputs[argument].changed === true);
|
|
93
104
|
return React.createElement("div", { className: "block-editor-fixed-inputs" },
|
|
@@ -5,4 +5,4 @@ export declare function FormHelp({ description, id }: {
|
|
|
5
5
|
description: unknown;
|
|
6
6
|
id?: string;
|
|
7
7
|
}): React.ReactElement | null;
|
|
8
|
-
export declare const formStyles = "\n[data-editor-form]{--editor-accent:var(--block-editor-accent,#426ad6);--editor-line:var(--block-editor-border,#dde3ed);--editor-muted:var(--block-editor-muted,var(--block-editor-text,#637086));color:var(--block-editor-text,#25334a);font:14px/1.5 system-ui,sans-serif;min-width:0}\n[data-editor-form] *,[data-editor-form] *:before,[data-editor-form] *:after{box-sizing:border-box}\n[data-editor-form] fieldset{min-width:0}\n[data-editor-form] fieldset.editor-form-binding,[data-editor-form] .editor-form-section,[data-editor-form] .rjsf fieldset{padding:0;border:0;margin:0 0 18px}\n[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}\n[data-editor-form] .editor-form-field,[data-editor-form] .rjsf .form-group{margin:0 0 14px;min-width:0}\n[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}\n[data-editor-form] .required{color:var(--editor-accent);margin-left:3px}\n[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}\n[data-editor-form] textarea{min-height:76px;resize:vertical}\n[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}\n[data-editor-form] input[readonly]{background:var(--block-editor-subtle,var(--block-editor-background,#f5f7fb));color:var(--editor-muted)}\n[data-editor-form] input[type=checkbox]{width:17px;height:17px;margin:0;accent-color:var(--editor-accent)}\n[data-editor-form] .editor-form-field>label.editor-form-toggle,[data-editor-form] .rjsf .checkbox>label{display:flex;align-items:center;gap:8px;font-weight:500;margin:8px 0}\n[data-editor-form] button{font:inherit;cursor:pointer;border:1px solid var(--editor-line);border-radius:6px;background:var(--block-editor-input,white);color:inherit;padding:6px 10px;margin:0}\n[data-editor-form] button:disabled{cursor:default;opacity:.5}\n[data-editor-form] .editor-form-hint,[data-editor-form] .editor-form-help{color:var(--editor-muted);font-size:12px;line-height:1.5;margin:5px 0 10px}\n[data-editor-form] .editor-form-help>summary{display:list-item;list-style:disclosure-closed inside;cursor:pointer;width:fit-content;font-weight:500}\n[data-editor-form] .editor-form-help[open]>summary{list-style-type:disclosure-open}\n[data-editor-form] .editor-form-help p{margin:8px 0}\n[data-editor-form] .block-editor-layout-tabs>[role=tablist]{display:flex;gap:4px;flex-wrap:wrap;padding:5px;background:var(--block-editor-subtle,var(--block-editor-background,#f1f4f9));border:1px solid var(--editor-line);border-radius:9px;margin:4px 0 20px}\n[data-editor-form] .block-editor-layout-tabs>[role=tablist]>button{border:0;border-radius:6px;background:transparent;color:var(--editor-muted);padding:8px 18px;margin:0;font-weight:550;text-decoration:none;min-width:76px}\n[data-editor-form] .block-editor-layout-tabs>[role=tablist]>[aria-selected=true]{background:var(--block-editor-input,white);color:var(--editor-accent);box-shadow:0 1px 4px #1d30431a}\n[data-editor-form] .editor-form-error-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;margin-left:7px;padding:0 5px;border-radius:10px;background:#fff0f0;color:#b53d45;font-size:11px}\n[data-editor-form] fieldset.block-editor-layout-group{border:1px solid var(--editor-line);border-radius:10px;padding:16px 18px 4px;margin:0 0 18px;background:var(--block-editor-background,white)}\n[data-editor-form] fieldset.block-editor-layout-group>legend{padding:0 6px;font-size:13px;font-weight:650}\n[data-editor-form] .block-editor-layout-grid{display:grid;gap:0 18px;grid-template-columns:repeat(var(--editor-columns),minmax(0,1fr));align-items:start}\n[data-editor-form] .block-editor-layout-grid>*{min-width:0}\n[data-editor-form] .block-editor-layout-tabs>[hidden]{display:none!important}\n[data-editor-form] .editor-form-toolbar{display:flex;align-items:start;justify-content:space-between;gap:12px;margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--editor-line)}\n[data-editor-form] .editor-form-modes{display:flex;gap:3px;border:1px solid var(--editor-line);border-radius:8px;padding:3px;background:var(--block-editor-subtle,var(--block-editor-background,#f1f4f9))}\n[data-editor-form] .editor-form-modes>button{border:0;border-radius:5px;padding:5px 14px;background:transparent;color:var(--editor-muted);margin:0}\n[data-editor-form] .editor-form-modes>[aria-pressed=true]{background:var(--block-editor-input,white);color:var(--editor-accent);box-shadow:0 1px 3px #1d30431a}\n[data-editor-form] .editor-form-tools{font-size:12px;color:var(--editor-muted);margin:0 0 12px}\n[data-editor-form] .editor-form-tools>summary{cursor:pointer;padding:5px 0;list-style-position:inside}\n[data-editor-form] .editor-form-tools[open]{padding:10px 12px;border:1px solid var(--editor-line);border-radius:8px;background:var(--block-editor-subtle,var(--block-editor-background,#f7f9fc))}\n[data-editor-form] .editor-form-tools button{border:1px solid var(--editor-line);border-radius:6px;background:var(--block-editor-input,white);padding:5px 9px;margin:5px 5px 5px 0;color:inherit}\n[data-editor-form] .editor-form-tools label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:5px 0}\n[data-editor-form] .editor-form-invalid{font-size:12px;color:#b53d45;margin:5px 0}\n[data-editor-form] [data-source-error=true]>input,[data-editor-form] [data-source-error=true]>textarea{border-color:#b53d45}\n[data-editor-form] .editor-form-array-item{display:flex;align-items:start;gap:10px}\n[data-editor-form] .editor-form-array-item>.editor-form-field{flex:1;min-width:0}\n@media(max-width:600px){[data-editor-form] .block-editor-layout-grid{grid-template-columns:minmax(0,1fr)}[data-editor-form] fieldset.block-editor-layout-group{padding:12px 12px 0}[data-editor-form] .block-editor-layout-tabs>[role=tablist]>button{padding:7px 12px;min-width:60px}[data-editor-form] .editor-form-toolbar{flex-wrap:wrap}}\n";
|
|
8
|
+
export declare const formStyles = "\n[data-editor-form]{--editor-accent:var(--block-editor-accent,#426ad6);--editor-line:var(--block-editor-border,#dde3ed);--editor-muted:var(--block-editor-muted,var(--block-editor-text,#637086));color:var(--block-editor-text,#25334a);font:14px/1.5 system-ui,sans-serif;min-width:0}\n[data-editor-form] *,[data-editor-form] *:before,[data-editor-form] *:after{box-sizing:border-box}\n[data-editor-form] fieldset{min-width:0}\n[data-editor-form] fieldset.editor-form-binding,[data-editor-form] .editor-form-section,[data-editor-form] .rjsf fieldset{padding:0;border:0;margin:0 0 18px}\n[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}\n[data-editor-form] .editor-form-field,[data-editor-form] .rjsf .form-group{margin:0 0 14px;min-width:0}\n[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}\n[data-editor-form] [data-block-editor-pair-row] label,[data-editor-form] .rjsf [data-block-editor-pair-row] .control-label{margin-bottom:0}\n[data-editor-form] .required{color:var(--editor-accent);margin-left:3px}\n[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}\n[data-editor-form] textarea{min-height:76px;resize:vertical}\n[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)}\n[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}\n[data-editor-form] input[readonly]{background:var(--block-editor-subtle,var(--block-editor-background,#f5f7fb));color:var(--editor-muted)}\n[data-editor-form] input[type=checkbox]{width:17px;height:17px;margin:0;accent-color:var(--editor-accent)}\n[data-editor-form] .editor-form-field>label.editor-form-toggle,[data-editor-form] .rjsf .checkbox>label{display:flex;align-items:center;gap:8px;font-weight:500;margin:8px 0}\n[data-editor-form] button{font:inherit;cursor:pointer;border:1px solid var(--editor-line);border-radius:6px;background:var(--block-editor-input,white);color:inherit;padding:6px 10px;margin:0}\n[data-editor-form] button:disabled{cursor:default;opacity:.5}\n[data-editor-form] .editor-form-hint,[data-editor-form] .editor-form-help{color:var(--editor-muted);font-size:12px;line-height:1.5;margin:5px 0 10px}\n[data-editor-form] .editor-form-help>summary{display:list-item;list-style:disclosure-closed inside;cursor:pointer;width:fit-content;font-weight:500}\n[data-editor-form] .editor-form-help[open]>summary{list-style-type:disclosure-open}\n[data-editor-form] .editor-form-help p{margin:8px 0}\n[data-editor-form] .block-editor-layout-tabs>[role=tablist]{display:flex;gap:4px;flex-wrap:wrap;padding:5px;background:var(--block-editor-subtle,var(--block-editor-background,#f1f4f9));border:1px solid var(--editor-line);border-radius:9px;margin:4px 0 20px}\n[data-editor-form] .block-editor-layout-tabs>[role=tablist]>button{border:0;border-radius:6px;background:transparent;color:var(--editor-muted);padding:8px 18px;margin:0;font-weight:550;text-decoration:none;min-width:76px}\n[data-editor-form] .block-editor-layout-tabs>[role=tablist]>[aria-selected=true]{background:var(--block-editor-input,white);color:var(--editor-accent);box-shadow:0 1px 4px #1d30431a}\n[data-editor-form] .editor-form-error-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;margin-left:7px;padding:0 5px;border-radius:10px;background:#fff0f0;color:#b53d45;font-size:11px}\n[data-editor-form] fieldset.block-editor-layout-group{border:1px solid var(--editor-line);border-radius:10px;padding:16px 18px 4px;margin:0 0 18px;background:var(--block-editor-background,white)}\n[data-editor-form] fieldset.block-editor-layout-group>legend{padding:0 6px;font-size:13px;font-weight:650}\n[data-editor-form] .block-editor-layout-grid{display:grid;gap:0 18px;grid-template-columns:repeat(var(--editor-columns),minmax(0,1fr));align-items:start}\n[data-editor-form] .block-editor-layout-grid>*{min-width:0}\n[data-editor-form] .block-editor-layout-tabs>[hidden]{display:none!important}\n[data-editor-form] .editor-form-toolbar{display:flex;align-items:start;justify-content:space-between;gap:12px;margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--editor-line)}\n[data-editor-form] .editor-form-modes{display:flex;gap:3px;border:1px solid var(--editor-line);border-radius:8px;padding:3px;background:var(--block-editor-subtle,var(--block-editor-background,#f1f4f9))}\n[data-editor-form] .editor-form-modes>button{border:0;border-radius:5px;padding:5px 14px;background:transparent;color:var(--editor-muted);margin:0}\n[data-editor-form] .editor-form-modes>[aria-pressed=true]{background:var(--block-editor-input,white);color:var(--editor-accent);box-shadow:0 1px 3px #1d30431a}\n[data-editor-form] .editor-form-tools{font-size:12px;color:var(--editor-muted);margin:0 0 12px}\n[data-editor-form] .editor-form-tools>summary{cursor:pointer;padding:5px 0;list-style-position:inside}\n[data-editor-form] .editor-form-tools[open]{padding:10px 12px;border:1px solid var(--editor-line);border-radius:8px;background:var(--block-editor-subtle,var(--block-editor-background,#f7f9fc))}\n[data-editor-form] .editor-form-tools button{border:1px solid var(--editor-line);border-radius:6px;background:var(--block-editor-input,white);padding:5px 9px;margin:5px 5px 5px 0;color:inherit}\n[data-editor-form] .editor-form-tools label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:5px 0}\n[data-editor-form] .editor-form-invalid{font-size:12px;color:#b53d45;margin:5px 0}\n[data-editor-form] [data-source-error=true]>input,[data-editor-form] [data-source-error=true]>textarea{border-color:#b53d45}\n[data-editor-form] .editor-form-array-item{display:flex;align-items:start;gap:10px}\n[data-editor-form] .editor-form-array-item>.editor-form-field{flex:1;min-width:0}\n@media(max-width:600px){[data-editor-form] .block-editor-layout-grid{grid-template-columns:minmax(0,1fr)}[data-editor-form] fieldset.block-editor-layout-group{padding:12px 12px 0}[data-editor-form] .block-editor-layout-tabs>[role=tablist]>button{padding:7px 12px;min-width:60px}[data-editor-form] .editor-form-toolbar{flex-wrap:wrap}}\n";
|
|
@@ -23,9 +23,11 @@ export const formStyles = `
|
|
|
23
23
|
[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}
|
|
24
24
|
[data-editor-form] .editor-form-field,[data-editor-form] .rjsf .form-group{margin:0 0 14px;min-width:0}
|
|
25
25
|
[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}
|
|
26
|
+
[data-editor-form] [data-block-editor-pair-row] label,[data-editor-form] .rjsf [data-block-editor-pair-row] .control-label{margin-bottom:0}
|
|
26
27
|
[data-editor-form] .required{color:var(--editor-accent);margin-left:3px}
|
|
27
28
|
[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}
|
|
28
29
|
[data-editor-form] textarea{min-height:76px;resize:vertical}
|
|
30
|
+
[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)}
|
|
29
31
|
[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}
|
|
30
32
|
[data-editor-form] input[readonly]{background:var(--block-editor-subtle,var(--block-editor-background,#f5f7fb));color:var(--editor-muted)}
|
|
31
33
|
[data-editor-form] input[type=checkbox]{width:17px;height:17px;margin:0;accent-color:var(--editor-accent)}
|
package/dist/react.js
CHANGED
|
@@ -197,6 +197,9 @@ export class BlockEditorDialog extends React.Component {
|
|
|
197
197
|
this.stopFieldErrors = bindBlockEditorFieldErrors(this.body);
|
|
198
198
|
if (typeof this.props.session.getNodes !== 'function')
|
|
199
199
|
this.unmountBody = this.props.session.mount(this.body);
|
|
200
|
+
// Mounting the body validates what it shows without notifying; read the result, or Save stays enabled
|
|
201
|
+
// for a form that opened invalid.
|
|
202
|
+
this.setState(this.props.session.getState());
|
|
200
203
|
// The modal establishes its focus scope after creating the portal.
|
|
201
204
|
this.focusFrame = requestAnimationFrame(() => {
|
|
202
205
|
if (!this.mounted)
|
package/dist/session.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ export declare class EditorSession implements EditorViewContext {
|
|
|
8
8
|
get reference(): BlockReference;
|
|
9
9
|
getDraft(): JsonObject;
|
|
10
10
|
getFixedInputView(): FixedInputViewDescription | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Run the same synchronous check as save, without committing, so a fixed form can disable Save
|
|
13
|
+
* while the draft is invalid. Owner text is reduced to the editor's coded diagnostics, as on save.
|
|
14
|
+
*/
|
|
15
|
+
checkFixedInput(): readonly ValidationIssue[] | undefined;
|
|
11
16
|
setDraft(draft: JsonObject): void;
|
|
12
17
|
setValidationIssues(issues: readonly ValidationIssue[]): void;
|
|
13
18
|
getState(): SessionState;
|
package/dist/session.js
CHANGED
|
@@ -133,6 +133,23 @@ export class EditorSession {
|
|
|
133
133
|
throw new TypeError('Invalid fixed input presentation.');
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Run the same synchronous check as save, without committing, so a fixed form can disable Save
|
|
138
|
+
* while the draft is invalid. Owner text is reduced to the editor's coded diagnostics, as on save.
|
|
139
|
+
*/
|
|
140
|
+
checkFixedInput() {
|
|
141
|
+
__classPrivateFieldGet(this, _EditorSession_instances, "m", _EditorSession_assertOpen).call(this);
|
|
142
|
+
const definition = __classPrivateFieldGet(this, _EditorSession_definition, "f");
|
|
143
|
+
if (!isFixedInputEditor(definition))
|
|
144
|
+
return undefined;
|
|
145
|
+
try {
|
|
146
|
+
const prepared = captureFixedPreparedSave(definition, __classPrivateFieldGet(this, _EditorSession_instances, "m", _EditorSession_copyDraft).call(this, __classPrivateFieldGet(this, _EditorSession_draft, "f")), __classPrivateFieldGet(this, _EditorSession_snapshot, "f"));
|
|
147
|
+
return prepared.kind === 'invalid' ? __classPrivateFieldGet(this, _EditorSession_instances, "m", _EditorSession_copyIssues).call(this, prepared.issues) : Object.freeze([]);
|
|
148
|
+
}
|
|
149
|
+
catch (_a) {
|
|
150
|
+
return Object.freeze([Object.freeze({ message: 'Fixed input validation failed: fixed-check-unavailable.' })]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
136
153
|
setDraft(draft) {
|
|
137
154
|
if (__classPrivateFieldGet(this, _EditorSession_status, "f") !== 'editing')
|
|
138
155
|
throw new Error('The session is not editable.');
|
package/dist/types.d.ts
CHANGED
|
@@ -58,6 +58,11 @@ export interface EditorViewContext {
|
|
|
58
58
|
getDraft(): JsonObject;
|
|
59
59
|
/** Fixed views obtain only safe presentation data, never live host objects. */
|
|
60
60
|
getFixedInputView?(): FixedInputViewDescription | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Run the save-time fixed check (encode, schema and owner validateCandidate) on the current draft.
|
|
63
|
+
* Unlike getFixedInputView, this calls owner callbacks, so views call it per edit, not per render.
|
|
64
|
+
*/
|
|
65
|
+
checkFixedInput?(): readonly ValidationIssue[] | undefined;
|
|
61
66
|
/** Updates are rejected after this view unmounts, even when its session stays open. */
|
|
62
67
|
setDraft(draft: JsonObject): void;
|
|
63
68
|
/** Report live UI validation; save() always independently validates again. */
|
package/dist/view.js
CHANGED
|
@@ -41,6 +41,10 @@ export class EditorView {
|
|
|
41
41
|
assertMounted();
|
|
42
42
|
return owner.getFixedInputView();
|
|
43
43
|
} } : {}),
|
|
44
|
+
...(owner.checkFixedInput ? { checkFixedInput: () => {
|
|
45
|
+
assertMounted();
|
|
46
|
+
return owner.checkFixedInput();
|
|
47
|
+
} } : {}),
|
|
44
48
|
setDraft: (draft) => { assertMounted(); owner.setDraft(draft); },
|
|
45
49
|
setValidationIssues: (issues) => {
|
|
46
50
|
assertMounted();
|
package/dist/webpack4/index.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"format": "esm"
|
|
17
17
|
},
|
|
18
18
|
"dist/view.js": {
|
|
19
|
-
"bytes":
|
|
19
|
+
"bytes": 4513,
|
|
20
20
|
"imports": [],
|
|
21
21
|
"format": "esm"
|
|
22
22
|
},
|
|
@@ -1873,7 +1873,7 @@
|
|
|
1873
1873
|
"format": "esm"
|
|
1874
1874
|
},
|
|
1875
1875
|
"dist/session.js": {
|
|
1876
|
-
"bytes":
|
|
1876
|
+
"bytes": 30322,
|
|
1877
1877
|
"imports": [
|
|
1878
1878
|
{
|
|
1879
1879
|
"path": "dist/data.js",
|
|
@@ -2098,7 +2098,7 @@
|
|
|
2098
2098
|
"format": "esm"
|
|
2099
2099
|
},
|
|
2100
2100
|
"dist/form-presentation.js": {
|
|
2101
|
-
"bytes":
|
|
2101
|
+
"bytes": 8114,
|
|
2102
2102
|
"imports": [
|
|
2103
2103
|
{
|
|
2104
2104
|
"path": "react",
|
|
@@ -3864,7 +3864,7 @@
|
|
|
3864
3864
|
"format": "esm"
|
|
3865
3865
|
},
|
|
3866
3866
|
"dist/fixed-input-view.js": {
|
|
3867
|
-
"bytes":
|
|
3867
|
+
"bytes": 12003,
|
|
3868
3868
|
"imports": [
|
|
3869
3869
|
{
|
|
3870
3870
|
"path": "react",
|
|
@@ -14186,7 +14186,7 @@
|
|
|
14186
14186
|
"format": "esm"
|
|
14187
14187
|
},
|
|
14188
14188
|
"dist/react.js": {
|
|
14189
|
-
"bytes":
|
|
14189
|
+
"bytes": 15083,
|
|
14190
14190
|
"imports": [
|
|
14191
14191
|
{
|
|
14192
14192
|
"path": "dist/field-errors.js",
|
|
@@ -14381,7 +14381,7 @@
|
|
|
14381
14381
|
"kind": "import-statement"
|
|
14382
14382
|
},
|
|
14383
14383
|
{
|
|
14384
|
-
"path": "dist/webpack4/shared-
|
|
14384
|
+
"path": "dist/webpack4/shared-S623S2PV.js",
|
|
14385
14385
|
"kind": "import-statement"
|
|
14386
14386
|
},
|
|
14387
14387
|
{
|
|
@@ -14425,12 +14425,12 @@
|
|
|
14425
14425
|
"imports": [],
|
|
14426
14426
|
"exports": [],
|
|
14427
14427
|
"inputs": {},
|
|
14428
|
-
"bytes":
|
|
14428
|
+
"bytes": 1930792
|
|
14429
14429
|
},
|
|
14430
14430
|
"dist/webpack4/rjsf.js": {
|
|
14431
14431
|
"imports": [
|
|
14432
14432
|
{
|
|
14433
|
-
"path": "dist/webpack4/shared-
|
|
14433
|
+
"path": "dist/webpack4/shared-S623S2PV.js",
|
|
14434
14434
|
"kind": "import-statement"
|
|
14435
14435
|
},
|
|
14436
14436
|
{
|
|
@@ -15512,7 +15512,7 @@
|
|
|
15512
15512
|
"bytesInOutput": 7705
|
|
15513
15513
|
},
|
|
15514
15514
|
"dist/form-presentation.js": {
|
|
15515
|
-
"bytesInOutput":
|
|
15515
|
+
"bytesInOutput": 7889
|
|
15516
15516
|
},
|
|
15517
15517
|
"dist/layout.js": {
|
|
15518
15518
|
"bytesInOutput": 2839
|
|
@@ -15749,7 +15749,7 @@
|
|
|
15749
15749
|
"bytesInOutput": 11809
|
|
15750
15750
|
},
|
|
15751
15751
|
"dist/fixed-input-view.js": {
|
|
15752
|
-
"bytesInOutput":
|
|
15752
|
+
"bytesInOutput": 10884
|
|
15753
15753
|
},
|
|
15754
15754
|
"node_modules/.pnpm/@rjsf+core@5.24.13_@rjsf+utils@5.24.13_react@16.14.0__react@16.14.0/node_modules/@rjsf/core/lib/index.js": {
|
|
15755
15755
|
"bytesInOutput": 183
|
|
@@ -16829,13 +16829,13 @@
|
|
|
16829
16829
|
"bytesInOutput": 11025
|
|
16830
16830
|
}
|
|
16831
16831
|
},
|
|
16832
|
-
"bytes":
|
|
16832
|
+
"bytes": 898255
|
|
16833
16833
|
},
|
|
16834
16834
|
"dist/webpack4/react.js.map": {
|
|
16835
16835
|
"imports": [],
|
|
16836
16836
|
"exports": [],
|
|
16837
16837
|
"inputs": {},
|
|
16838
|
-
"bytes":
|
|
16838
|
+
"bytes": 44147
|
|
16839
16839
|
},
|
|
16840
16840
|
"dist/webpack4/react.js": {
|
|
16841
16841
|
"imports": [
|
|
@@ -16866,10 +16866,10 @@
|
|
|
16866
16866
|
"bytesInOutput": 6802
|
|
16867
16867
|
},
|
|
16868
16868
|
"dist/react.js": {
|
|
16869
|
-
"bytesInOutput":
|
|
16869
|
+
"bytesInOutput": 13448
|
|
16870
16870
|
}
|
|
16871
16871
|
},
|
|
16872
|
-
"bytes":
|
|
16872
|
+
"bytes": 24335
|
|
16873
16873
|
},
|
|
16874
16874
|
"dist/webpack4/turbowarp.js.map": {
|
|
16875
16875
|
"imports": [],
|
|
@@ -16884,7 +16884,7 @@
|
|
|
16884
16884
|
"kind": "import-statement"
|
|
16885
16885
|
},
|
|
16886
16886
|
{
|
|
16887
|
-
"path": "dist/webpack4/shared-
|
|
16887
|
+
"path": "dist/webpack4/shared-S623S2PV.js",
|
|
16888
16888
|
"kind": "import-statement"
|
|
16889
16889
|
},
|
|
16890
16890
|
{
|
|
@@ -16956,13 +16956,13 @@
|
|
|
16956
16956
|
},
|
|
16957
16957
|
"bytes": 44
|
|
16958
16958
|
},
|
|
16959
|
-
"dist/webpack4/shared-
|
|
16959
|
+
"dist/webpack4/shared-S623S2PV.js.map": {
|
|
16960
16960
|
"imports": [],
|
|
16961
16961
|
"exports": [],
|
|
16962
16962
|
"inputs": {},
|
|
16963
|
-
"bytes":
|
|
16963
|
+
"bytes": 218331
|
|
16964
16964
|
},
|
|
16965
|
-
"dist/webpack4/shared-
|
|
16965
|
+
"dist/webpack4/shared-S623S2PV.js": {
|
|
16966
16966
|
"imports": [
|
|
16967
16967
|
{
|
|
16968
16968
|
"path": "dist/webpack4/shared-BKTRZUZH.js",
|
|
@@ -17004,13 +17004,13 @@
|
|
|
17004
17004
|
"bytesInOutput": 795
|
|
17005
17005
|
},
|
|
17006
17006
|
"dist/view.js": {
|
|
17007
|
-
"bytesInOutput":
|
|
17007
|
+
"bytesInOutput": 4035
|
|
17008
17008
|
},
|
|
17009
17009
|
"dist/prepared-save.js": {
|
|
17010
17010
|
"bytesInOutput": 1886
|
|
17011
17011
|
},
|
|
17012
17012
|
"dist/session.js": {
|
|
17013
|
-
"bytesInOutput":
|
|
17013
|
+
"bytesInOutput": 27855
|
|
17014
17014
|
},
|
|
17015
17015
|
"dist/subtree.js": {
|
|
17016
17016
|
"bytesInOutput": 4426
|
|
@@ -17025,7 +17025,7 @@
|
|
|
17025
17025
|
"bytesInOutput": 10668
|
|
17026
17026
|
}
|
|
17027
17027
|
},
|
|
17028
|
-
"bytes":
|
|
17028
|
+
"bytes": 124033
|
|
17029
17029
|
},
|
|
17030
17030
|
"dist/webpack4/shared-BKTRZUZH.js.map": {
|
|
17031
17031
|
"imports": [],
|
package/dist/webpack4/react.js
CHANGED
|
@@ -472,6 +472,7 @@ var BlockEditorDialog = class extends React.Component {
|
|
|
472
472
|
this.stopFieldErrors = field_errors_default(this.body);
|
|
473
473
|
if (typeof this.props.session.getNodes !== "function")
|
|
474
474
|
this.unmountBody = this.props.session.mount(this.body);
|
|
475
|
+
this.setState(this.props.session.getState());
|
|
475
476
|
this.focusFrame = requestAnimationFrame(() => {
|
|
476
477
|
if (!this.mounted)
|
|
477
478
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../field-errors.js", "../dialog-window.js", "../react.js"],
|
|
4
|
-
"sourcesContent": ["// RJSF owns validation and messages; this adapter only decorates its rendered errors.\nconst bindBlockEditorFieldErrors = (container) => {\n const originals = new Map();\n const originalValue = (element, name) => {\n const values = originals.get(element);\n const previous = values && values.get(name);\n const current = element.getAttribute(name);\n return previous && current === previous.applied ? previous.original : current;\n };\n const setAttribute = (element, name, value) => {\n if (element.getAttribute(name) === value)\n return;\n const original = originalValue(element, name);\n if (!originals.has(element))\n originals.set(element, new Map());\n originals.get(element).set(name, { original, applied: value });\n element.setAttribute(name, value);\n };\n const restore = (element) => {\n for (const [name, { original, applied }] of originals.get(element)) {\n // Do not overwrite attributes subsequently changed by RJSF or a custom widget.\n if (element.getAttribute(name) !== applied)\n continue;\n if (original === null)\n element.removeAttribute(name);\n else\n element.setAttribute(name, original);\n }\n originals.delete(element);\n };\n const sync = () => {\n const invalid = new Set();\n const decorate = (element, messages, group = false) => {\n invalid.add(element);\n setAttribute(element, 'aria-invalid', 'true');\n setAttribute(element, 'data-block-editor-invalid', group ? 'group' : 'true');\n const descriptions = new Set((originalValue(element, 'aria-describedby') || '')\n .split(/\\s+/).filter(Boolean));\n for (const message of messages)\n descriptions.add(message.id);\n setAttribute(element, 'aria-describedby', [...descriptions].join(' '));\n if (group && !originalValue(element, 'role'))\n setAttribute(element, 'role', 'group');\n if (group && !element.hasAttribute('aria-label') && !originalValue(element, 'aria-labelledby')) {\n const titles = messages.map(message => message.id.replace(/__error$/, '__title'))\n .filter(id => {\n const title = element.ownerDocument.getElementById(id);\n return title && element.contains(title);\n });\n if (titles.length)\n setAttribute(element, 'aria-labelledby', titles.join(' '));\n }\n };\n for (const field of container.querySelectorAll('.rjsf .field.has-error')) {\n const messages = [...field.querySelectorAll('.error-detail[id]')].filter(message => { var _a; return message.closest('.field') === field && ((_a = message.textContent) === null || _a === void 0 ? void 0 : _a.trim()); });\n if (!messages.length)\n continue;\n if (field.classList.contains('field-object') || field.classList.contains('field-array')) {\n // Group constraints must not mark otherwise valid descendant controls as invalid.\n decorate(field, messages, true);\n continue;\n }\n for (const control of field.querySelectorAll('input:not([type=\"hidden\"]), select, textarea')) {\n if (control.closest('.field') !== field)\n continue;\n const descriptions = (control.getAttribute('aria-describedby') || '').split(/\\s+/);\n const ownMessages = messages.filter(message => descriptions.includes(message.id) ||\n message.id === `${control.id}__error`);\n if (ownMessages.length)\n decorate(control, ownMessages);\n }\n }\n for (const element of originals.keys()) {\n if (!invalid.has(element))\n restore(element);\n }\n };\n const observer = new container.ownerDocument.defaultView.MutationObserver(sync);\n observer.observe(container, { childList: true,\n subtree: true,\n characterData: true,\n attributes: true,\n attributeFilter: ['class', 'id'] });\n sync();\n return () => {\n observer.disconnect();\n for (const element of originals.keys())\n restore(element);\n };\n};\nexport default bindBlockEditorFieldErrors;\n", "/** Add window controls to the injected host frame without depending on GUI internals. */\nexport function attachEditorDialogWindow(body, labels) {\n var _a;\n const dialog = body.closest('[role=\"dialog\"]');\n const header = (labels.headerClassName ? dialog === null || dialog === void 0 ? void 0 : dialog.getElementsByClassName(labels.headerClassName)[0] :\n dialog === null || dialog === void 0 ? void 0 : dialog.querySelector('header'));\n const content = body.closest('[data-block-editor-body]');\n if (!dialog || !header || !content || !((_a = header.parentElement) === null || _a === void 0 ? void 0 : _a.contains(content)))\n return;\n const doc = dialog.ownerDocument, win = doc.defaultView;\n if (!win)\n return;\n const frame = header.parentElement;\n const initialStyle = dialog.style.cssText;\n const language = doc.documentElement.lang || new URLSearchParams(win.location.search).get('lang') || win.navigator.language;\n const japanese = language.startsWith('ja');\n const maximizeLabel = labels.maximize || (japanese ? '\u5168\u753B\u9762\u5316' : 'Maximize');\n const restoreLabel = labels.restore || (japanese ? '\u5143\u306E\u30B5\u30A4\u30BA\u306B\u623B\u3059' : 'Restore window');\n let restoreBounds = null;\n let gesture = null;\n const handles = [];\n dialog.setAttribute('data-block-editor-window', '');\n if (frame !== dialog)\n frame.setAttribute('data-block-editor-window-frame', '');\n header.setAttribute('data-block-editor-titlebar', '');\n const maximize = doc.createElement('button');\n maximize.type = 'button';\n maximize.setAttribute('data-block-editor-maximize', '');\n const closeContainer = header.lastElementChild;\n if (closeContainer === null || closeContainer === void 0 ? void 0 : closeContainer.querySelector('button, [role=\"button\"]'))\n closeContainer.prepend(maximize);\n else\n header.insertBefore(maximize, closeContainer);\n const viewport = () => ({ width: win.innerWidth, height: win.innerHeight });\n const bounds = () => {\n const { x, y, width, height } = dialog.getBoundingClientRect();\n return { x, y, width, height };\n };\n const clamp = (value, min, max) => Math.min(Math.max(value, min), max);\n function fit(rect) {\n const view = viewport();\n const width = clamp(rect.width, Math.min(360, view.width), view.width);\n const height = clamp(rect.height, Math.min(280, view.height), view.height);\n return { width, height, x: clamp(rect.x, 0, view.width - width), y: clamp(rect.y, 0, view.height - height) };\n }\n function place(rect) {\n Object.assign(dialog.style, { margin: '0', inset: 'auto', transform: 'none', maxHeight: '100dvh',\n left: `${rect.x}px`, top: `${rect.y}px`, width: `${rect.width}px`, height: `${rect.height}px` });\n }\n function stop(event) {\n if (!gesture || (event && 'pointerId' in event && event.pointerId !== gesture.id))\n return;\n const { target, id } = gesture;\n gesture = null;\n if (target.hasPointerCapture(id))\n target.releasePointerCapture(id);\n dialog.removeAttribute('data-block-editor-dragging');\n }\n function start(event, edge) {\n if (restoreBounds || gesture || event.button !== 0 || !event.isPrimary)\n return;\n if (!edge && event.target.closest('button, a, input, select, textarea, [role=\"button\"]'))\n return;\n event.preventDefault();\n const target = event.currentTarget;\n gesture = { id: event.pointerId, target, edge, x: event.clientX, y: event.clientY, rect: fit(bounds()) };\n place(gesture.rect);\n target.setPointerCapture(event.pointerId);\n dialog.setAttribute('data-block-editor-dragging', '');\n }\n function move(event) {\n if (!gesture || event.pointerId !== gesture.id)\n return;\n const { rect, edge } = gesture, view = viewport();\n const dx = event.clientX - gesture.x, dy = event.clientY - gesture.y;\n if (!edge) {\n place(fit({ ...rect, x: rect.x + dx, y: rect.y + dy }));\n return;\n }\n const minWidth = Math.min(360, view.width), minHeight = Math.min(280, view.height);\n let left = rect.x, top = rect.y, right = rect.x + rect.width, bottom = rect.y + rect.height;\n if (edge.includes('w'))\n left = clamp(left + dx, 0, right - minWidth);\n if (edge.includes('e'))\n right = clamp(right + dx, left + minWidth, view.width);\n if (edge.includes('n'))\n top = clamp(top + dy, 0, bottom - minHeight);\n if (edge.includes('s'))\n bottom = clamp(bottom + dy, top + minHeight, view.height);\n place({ x: left, y: top, width: right - left, height: bottom - top });\n }\n const startMove = (event) => start(event, '');\n header.addEventListener('pointerdown', startMove);\n for (const edge of ['n', 'e', 's', 'w', 'ne', 'se', 'sw', 'nw']) {\n const handle = doc.createElement('div');\n handle.setAttribute('data-block-editor-resize', edge);\n handle.setAttribute('aria-hidden', 'true');\n handle.addEventListener('pointerdown', event => start(event, edge));\n dialog.append(handle);\n handles.push(handle);\n }\n function updateButton() {\n const label = restoreBounds ? restoreLabel : maximizeLabel;\n maximize.setAttribute('aria-label', label);\n maximize.setAttribute('aria-pressed', String(Boolean(restoreBounds)));\n maximize.title = label;\n maximize.textContent = restoreBounds ? '\u2750' : '\u26F6';\n dialog.toggleAttribute('data-block-editor-maximized', Boolean(restoreBounds));\n }\n function toggle() {\n stop();\n if (restoreBounds) {\n place(fit(restoreBounds));\n restoreBounds = null;\n }\n else {\n restoreBounds = bounds();\n place({ x: 0, y: 0, ...viewport() });\n }\n updateButton();\n }\n function resize() {\n stop();\n if (restoreBounds)\n place({ x: 0, y: 0, ...viewport() });\n else\n place(fit(bounds()));\n }\n maximize.addEventListener('click', toggle);\n win.addEventListener('pointermove', move);\n win.addEventListener('pointerup', stop);\n win.addEventListener('pointercancel', stop);\n win.addEventListener('blur', stop);\n win.addEventListener('resize', resize);\n dialog.addEventListener('lostpointercapture', stop);\n updateButton();\n return () => {\n stop();\n header.removeEventListener('pointerdown', startMove);\n win.removeEventListener('pointermove', move);\n win.removeEventListener('pointerup', stop);\n win.removeEventListener('pointercancel', stop);\n win.removeEventListener('blur', stop);\n win.removeEventListener('resize', resize);\n dialog.removeEventListener('lostpointercapture', stop);\n maximize.remove();\n handles.forEach(handle => handle.remove());\n dialog.style.cssText = initialStyle;\n for (const name of ['window', 'maximized', 'dragging'])\n dialog.removeAttribute(`data-block-editor-${name}`);\n if (frame !== dialog)\n frame.removeAttribute('data-block-editor-window-frame');\n header.removeAttribute('data-block-editor-titlebar');\n };\n}\n", "import bindBlockEditorFieldErrors from './field-errors.js';\nimport { attachEditorDialogWindow } from './dialog-window.js';\nexport { default as bindBlockEditorFieldErrors } from './field-errors.js';\nimport * as React from 'react';\nimport { BlockEditorConflictError } from './types.js';\nimport { BlockEditorStructureError } from './descendant-types.js';\nclass NodeBody extends React.Component {\n constructor() {\n super(...arguments);\n this.body = null;\n }\n componentDidMount() {\n try {\n this.unmountBody = this.props.editor.mount(this.body);\n }\n catch (error) {\n this.props.onError(error);\n }\n }\n componentWillUnmount() {\n var _a;\n try {\n (_a = this.unmountBody) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n catch (error) {\n this.props.onError(error);\n }\n }\n render() { return React.createElement(\"div\", { ref: body => { this.body = body; } }); }\n}\nlet nextBodyId = 0;\nclass DescendantTree extends React.Component {\n constructor(props) {\n super(props);\n this.nodes = this.props.session.getNodes();\n this.children = new Map();\n this.sections = new Map();\n this.bodyIds = new Map();\n for (const node of this.nodes) {\n const path = node.inputPath;\n const parent = path.length ? path[path.length - 1].blockId : null;\n if (!this.children.has(parent))\n this.children.set(parent, []);\n this.children.get(parent).push(node);\n this.bodyIds.set(node.reference.blockId, `block-editor-node-${++nextBodyId}`);\n }\n this.state = { failedIcons: new Set(), expanded: new Set(this.nodes.filter(node => this.nodes.length <= 30 || node.inputPath.length === 0).map(node => node.reference.blockId)) };\n }\n componentWillUnmount() {\n if (this.focusFrame !== undefined)\n cancelAnimationFrame(this.focusFrame);\n }\n reveal(issue) {\n if (!issue || !('reference' in issue))\n return;\n const expanded = new Set(this.state.expanded);\n for (const step of issue.inputPath)\n expanded.add(step.blockId);\n expanded.add(issue.reference.blockId);\n this.setState({ expanded }, () => {\n if (this.focusFrame !== undefined)\n cancelAnimationFrame(this.focusFrame);\n this.focusFrame = requestAnimationFrame(() => {\n var _a;\n const section = this.sections.get(issue.reference.blockId);\n if (!section)\n return;\n const controls = [...section.querySelectorAll('input, textarea, select')];\n const path = (issue.path || '').replace(/^\\./, '').replace(/\\[(\\d+)\\]/g, '_$1').replace(/\\./g, '_');\n const field = controls.find(control => path && control.id.endsWith(`_${path}`)) || controls[0];\n const target = field || section.querySelector('button');\n target === null || target === void 0 ? void 0 : target.focus();\n (_a = target === null || target === void 0 ? void 0 : target.scrollIntoView) === null || _a === void 0 ? void 0 : _a.call(target, { block: 'nearest' });\n });\n });\n }\n toggle(id) {\n const expanded = new Set(this.state.expanded);\n if (expanded.has(id))\n expanded.delete(id);\n else\n expanded.add(id);\n this.setState({ expanded });\n }\n renderNode(node) {\n var _a, _b, _c;\n const { styles, session, messages } = this.props;\n const id = node.reference.blockId;\n const expanded = this.state.expanded.has(id);\n const editor = (_a = session.getEditor) === null || _a === void 0 ? void 0 : _a.call(session, id);\n const step = node.inputPath[node.inputPath.length - 1];\n const appearance = ((_b = this.props.nodeAppearances) === null || _b === void 0 ? void 0 : _b[id]) || {};\n const label = appearance.name || ((_c = this.props.nodeLabels) === null || _c === void 0 ? void 0 : _c[id]) || node.opcode;\n const style = {\n '--block-editor-node-colour': appearance.colour,\n '--block-editor-node-tint': appearance.tint\n };\n return React.createElement(\"section\", { className: styles.treeNode, \"data-block-editor-node\": id, key: id, style: style, ref: section => { if (section)\n this.sections.set(id, section);\n else\n this.sections.delete(id); } },\n React.createElement(\"h3\", { className: styles.nodeHeading },\n React.createElement(\"button\", { \"aria-controls\": this.bodyIds.get(id), \"aria-expanded\": expanded, \"data-block-editor-toggle\": id, disabled: this.props.disabled, type: \"button\", onClick: () => this.toggle(id) },\n React.createElement(\"span\", { \"aria-hidden\": \"true\" }, expanded ? '\u25BE ' : '\u25B8 '),\n appearance.iconURI && !this.state.failedIcons.has(id) ? React.createElement(\"img\", { alt: \"\", \"aria-hidden\": \"true\", className: styles.nodeIcon, \"data-block-editor-node-icon\": id, draggable: false, src: appearance.iconURI, onError: () => this.setState(state => ({ failedIcons: new Set([...state.failedIcons, id]) })) }) : null,\n React.createElement(\"span\", { className: styles.nodeCaption },\n React.createElement(\"span\", { \"data-block-editor-node-name\": id }, label),\n React.createElement(\"span\", { className: styles.nodeIdentity },\n step ? React.createElement(\"span\", { className: styles.branchName }, `${step.input} \u00B7 ${step.index + 1}: `) : null,\n id)))),\n React.createElement(\"div\", { hidden: !expanded, id: this.bodyIds.get(id) }, expanded ? React.createElement(React.Fragment, null,\n editor ? React.createElement(NodeBody, { editor: editor, onError: this.props.onError }) :\n React.createElement(\"p\", { className: styles.structuralNode }, messages.structuralNode),\n (this.children.get(id) || []).map(child => this.renderNode(child))) : null));\n }\n render() {\n return React.createElement(\"div\", { className: this.props.styles.tree }, (this.children.get(null) || []).map(node => this.renderNode(node)));\n }\n}\n/** The host injects its modal, localized strings and stylesheet mapping; no GUI imports are needed. */\nexport class BlockEditorDialog extends React.Component {\n constructor(props) {\n super(props);\n this.mounted = false;\n this.unmounting = false;\n this.composing = false;\n this.body = null;\n this.tree = null;\n this.removeListener = () => { };\n this.handleBody = (body) => {\n this.body = body;\n if (this.mounted)\n this.mountBody();\n };\n this.handleMountError = (error) => {\n var _a, _b;\n (_b = (_a = this.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, error);\n if (!this.unmounting)\n this.setState({ mountFailed: true });\n };\n this.handleClose = () => {\n if (this.props.session.cancel())\n return;\n if (this.props.session.getState().status !== 'saving')\n this.props.onClose();\n };\n this.handleSave = async () => {\n var _a;\n const result = await this.props.session.save();\n if (result.status === 'saved')\n this.props.onClose();\n if (result.status === 'invalid')\n (_a = this.tree) === null || _a === void 0 ? void 0 : _a.reveal(result.issues[0]);\n };\n this.state = { ...props.session.getState(), mountFailed: false };\n }\n componentDidMount() {\n this.mounted = true;\n this.removeListener = this.props.session.subscribe(() => {\n const state = this.props.session.getState();\n this.setState(state);\n if (['cancelled', 'disposed', 'invalidated'].includes(state.status))\n this.props.onClose();\n });\n this.mountBody();\n }\n componentWillUnmount() {\n var _a, _b, _c, _d, _e;\n this.unmounting = true;\n this.mounted = false;\n if (this.focusFrame !== undefined)\n cancelAnimationFrame(this.focusFrame);\n this.removeListener();\n (_a = this.stopFieldErrors) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = this.stopWindow) === null || _b === void 0 ? void 0 : _b.call(this);\n try {\n (_c = this.unmountBody) === null || _c === void 0 ? void 0 : _c.call(this);\n }\n catch (error) {\n (_e = (_d = this.props).onError) === null || _e === void 0 ? void 0 : _e.call(_d, error);\n }\n finally {\n this.props.session.dispose();\n }\n }\n mountBody() {\n if (!this.body || this.unmountBody || this.state.mountFailed)\n return;\n try {\n if (!this.stopWindow)\n this.stopWindow = attachEditorDialogWindow(this.body, {\n headerClassName: this.props.styles.header,\n maximize: this.props.messages.maximize,\n restore: this.props.messages.restore\n });\n if (!this.stopFieldErrors)\n this.stopFieldErrors = bindBlockEditorFieldErrors(this.body);\n if (typeof this.props.session.getNodes !== 'function')\n this.unmountBody = this.props.session.mount(this.body);\n // The modal establishes its focus scope after creating the portal.\n this.focusFrame = requestAnimationFrame(() => {\n if (!this.mounted)\n return;\n const first = this.body.querySelector('input, textarea, select') ||\n this.body.querySelector('button, [tabindex=\"0\"]');\n first === null || first === void 0 ? void 0 : first.focus();\n });\n }\n catch (error) {\n this.handleMountError(error);\n }\n }\n render() {\n var _a, _b, _c, _d;\n const { styles, messages, ModalComponent, session } = this.props;\n const saving = this.state.status === 'saving';\n const hierarchy = typeof session.getNodes === 'function';\n let fixed = false;\n if (session.getFixedInputView && (this.state.status === 'editing' || saving)) {\n try {\n fixed = Boolean(session.getFixedInputView());\n }\n catch (_e) {\n fixed = true;\n }\n }\n const root = (_a = session.getNodes) === null || _a === void 0 ? void 0 : _a.call(session).find(node => node.inputPath.length === 0);\n const rootId = ((_b = session.reference) === null || _b === void 0 ? void 0 : _b.blockId) || (root === null || root === void 0 ? void 0 : root.reference.blockId);\n const appearance = rootId ? (_c = this.props.nodeAppearances) === null || _c === void 0 ? void 0 : _c[rootId] : undefined;\n const name = (appearance === null || appearance === void 0 ? void 0 : appearance.name) || (rootId ? (_d = this.props.nodeLabels) === null || _d === void 0 ? void 0 : _d[rootId] : undefined) || (root === null || root === void 0 ? void 0 : root.opcode);\n const title = name ? messages.title.includes('{name}') ? messages.title.replace('{name}', () => name) :\n /\u30D6\u30ED\u30C3\u30AF|block/i.test(messages.title) ? messages.title.replace(/\u30D6\u30ED\u30C3\u30AF|block/i, () => name) :\n `${name}: ${messages.title}` : messages.title;\n return React.createElement(ModalComponent, { className: `${styles.modalContent || ''} ${hierarchy ? styles.hierarchyModal : ''} ${this.props.className || ''}`, contentLabel: title, ...((appearance === null || appearance === void 0 ? void 0 : appearance.iconURI) ? { headerImage: appearance.iconURI } : {}), headerClassName: styles.header, id: \"blockEditorModal\", onRequestClose: this.handleClose },\n React.createElement(\"div\", { \"aria-busy\": saving, className: styles.body, \"data-block-editor-body\": \"\", onCompositionStart: () => { this.composing = true; }, onCompositionEnd: () => { this.composing = false; }, onKeyDownCapture: event => {\n if (this.composing || event.nativeEvent.isComposing || event.keyCode === 229)\n event.stopPropagation();\n } },\n React.createElement(\"div\", { className: styles.editorBody },\n React.createElement(\"div\", { ref: this.handleBody }, hierarchy ? React.createElement(DescendantTree, { session: session, styles: styles, messages: messages, disabled: saving, nodeAppearances: this.props.nodeAppearances, nodeLabels: this.props.nodeLabels, onError: this.handleMountError, ref: tree => { this.tree = tree; } }) : null),\n React.createElement(\"div\", { \"aria-live\": \"polite\", className: styles.errors, role: \"status\" },\n saving ? messages.saving : null,\n fixed && this.state.issues.length ? React.createElement(\"p\", null, messages.invalidInput || messages.failed) : this.state.issues.map((issue, index) => {\n var _a;\n return hierarchy && 'reference' in issue ?\n React.createElement(\"button\", { className: styles.nodeError, \"data-block-editor-issue\": index, disabled: saving, key: index, type: \"button\", onClick: () => { var _a; return (_a = this.tree) === null || _a === void 0 ? void 0 : _a.reveal(issue); } },\n ((_a = this.props.nodeLabels) === null || _a === void 0 ? void 0 : _a[issue.reference.blockId]) || issue.reference.blockId,\n ': ',\n issue.message) : React.createElement(\"p\", { key: index }, issue.message);\n }),\n this.state.error instanceof BlockEditorStructureError ? messages.structureError :\n this.state.error instanceof BlockEditorConflictError ? messages.conflict :\n (this.state.error || this.state.mountFailed) ? messages.failed : null)),\n React.createElement(\"div\", { className: styles.buttons },\n React.createElement(\"button\", { disabled: saving, type: \"button\", onClick: this.handleClose }, messages.cancel),\n React.createElement(\"button\", { \"data-block-editor-save\": \"\", disabled: !this.state.canSave || this.state.mountFailed, type: \"button\", onClick: this.handleSave }, saving ? messages.saving : hierarchy ? messages.saveAll : messages.save))));\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;AACA,IAAM,6BAA6B,CAAC,cAAc;AAC9C,QAAM,YAAY,oBAAI,IAAI;AAC1B,QAAM,gBAAgB,CAAC,SAAS,SAAS;AACrC,UAAM,SAAS,UAAU,IAAI,OAAO;AACpC,UAAM,WAAW,UAAU,OAAO,IAAI,IAAI;AAC1C,UAAM,UAAU,QAAQ,aAAa,IAAI;AACzC,WAAO,YAAY,YAAY,SAAS,UAAU,SAAS,WAAW;AAAA,EAC1E;AACA,QAAM,eAAe,CAAC,SAAS,MAAM,UAAU;AAC3C,QAAI,QAAQ,aAAa,IAAI,MAAM;AAC/B;AACJ,UAAM,WAAW,cAAc,SAAS,IAAI;AAC5C,QAAI,CAAC,UAAU,IAAI,OAAO;AACtB,gBAAU,IAAI,SAAS,oBAAI,IAAI,CAAC;AACpC,cAAU,IAAI,OAAO,EAAE,IAAI,MAAM,EAAE,UAAU,SAAS,MAAM,CAAC;AAC7D,YAAQ,aAAa,MAAM,KAAK;AAAA,EACpC;AACA,QAAM,UAAU,CAAC,YAAY;AACzB,eAAW,CAAC,MAAM,EAAE,UAAU,QAAQ,CAAC,KAAK,UAAU,IAAI,OAAO,GAAG;AAEhE,UAAI,QAAQ,a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,EAAE,UAAU,QAAQ,MAAM,UAAU,SAAS,KAAK,YAAY,GAAG,SAAS,MAAM;AAAA,UACxG,oBAAc,UAAU,EAAE,0BAA0B,IAAI,UAAU,CAAC,KAAK,MAAM,WAAW,KAAK,MAAM,aAAa,MAAM,UAAU,SAAS,KAAK,WAAW,GAAG,SAAS,SAAS,SAAS,YAAY,SAAS,UAAU,SAAS,IAAI;AAAA,QAAC;AAAA,MAAC;AAAA,IAAC;AAAA,EAC7P;AACJ;",
|
|
4
|
+
"sourcesContent": ["// RJSF owns validation and messages; this adapter only decorates its rendered errors.\nconst bindBlockEditorFieldErrors = (container) => {\n const originals = new Map();\n const originalValue = (element, name) => {\n const values = originals.get(element);\n const previous = values && values.get(name);\n const current = element.getAttribute(name);\n return previous && current === previous.applied ? previous.original : current;\n };\n const setAttribute = (element, name, value) => {\n if (element.getAttribute(name) === value)\n return;\n const original = originalValue(element, name);\n if (!originals.has(element))\n originals.set(element, new Map());\n originals.get(element).set(name, { original, applied: value });\n element.setAttribute(name, value);\n };\n const restore = (element) => {\n for (const [name, { original, applied }] of originals.get(element)) {\n // Do not overwrite attributes subsequently changed by RJSF or a custom widget.\n if (element.getAttribute(name) !== applied)\n continue;\n if (original === null)\n element.removeAttribute(name);\n else\n element.setAttribute(name, original);\n }\n originals.delete(element);\n };\n const sync = () => {\n const invalid = new Set();\n const decorate = (element, messages, group = false) => {\n invalid.add(element);\n setAttribute(element, 'aria-invalid', 'true');\n setAttribute(element, 'data-block-editor-invalid', group ? 'group' : 'true');\n const descriptions = new Set((originalValue(element, 'aria-describedby') || '')\n .split(/\\s+/).filter(Boolean));\n for (const message of messages)\n descriptions.add(message.id);\n setAttribute(element, 'aria-describedby', [...descriptions].join(' '));\n if (group && !originalValue(element, 'role'))\n setAttribute(element, 'role', 'group');\n if (group && !element.hasAttribute('aria-label') && !originalValue(element, 'aria-labelledby')) {\n const titles = messages.map(message => message.id.replace(/__error$/, '__title'))\n .filter(id => {\n const title = element.ownerDocument.getElementById(id);\n return title && element.contains(title);\n });\n if (titles.length)\n setAttribute(element, 'aria-labelledby', titles.join(' '));\n }\n };\n for (const field of container.querySelectorAll('.rjsf .field.has-error')) {\n const messages = [...field.querySelectorAll('.error-detail[id]')].filter(message => { var _a; return message.closest('.field') === field && ((_a = message.textContent) === null || _a === void 0 ? void 0 : _a.trim()); });\n if (!messages.length)\n continue;\n if (field.classList.contains('field-object') || field.classList.contains('field-array')) {\n // Group constraints must not mark otherwise valid descendant controls as invalid.\n decorate(field, messages, true);\n continue;\n }\n for (const control of field.querySelectorAll('input:not([type=\"hidden\"]), select, textarea')) {\n if (control.closest('.field') !== field)\n continue;\n const descriptions = (control.getAttribute('aria-describedby') || '').split(/\\s+/);\n const ownMessages = messages.filter(message => descriptions.includes(message.id) ||\n message.id === `${control.id}__error`);\n if (ownMessages.length)\n decorate(control, ownMessages);\n }\n }\n for (const element of originals.keys()) {\n if (!invalid.has(element))\n restore(element);\n }\n };\n const observer = new container.ownerDocument.defaultView.MutationObserver(sync);\n observer.observe(container, { childList: true,\n subtree: true,\n characterData: true,\n attributes: true,\n attributeFilter: ['class', 'id'] });\n sync();\n return () => {\n observer.disconnect();\n for (const element of originals.keys())\n restore(element);\n };\n};\nexport default bindBlockEditorFieldErrors;\n", "/** Add window controls to the injected host frame without depending on GUI internals. */\nexport function attachEditorDialogWindow(body, labels) {\n var _a;\n const dialog = body.closest('[role=\"dialog\"]');\n const header = (labels.headerClassName ? dialog === null || dialog === void 0 ? void 0 : dialog.getElementsByClassName(labels.headerClassName)[0] :\n dialog === null || dialog === void 0 ? void 0 : dialog.querySelector('header'));\n const content = body.closest('[data-block-editor-body]');\n if (!dialog || !header || !content || !((_a = header.parentElement) === null || _a === void 0 ? void 0 : _a.contains(content)))\n return;\n const doc = dialog.ownerDocument, win = doc.defaultView;\n if (!win)\n return;\n const frame = header.parentElement;\n const initialStyle = dialog.style.cssText;\n const language = doc.documentElement.lang || new URLSearchParams(win.location.search).get('lang') || win.navigator.language;\n const japanese = language.startsWith('ja');\n const maximizeLabel = labels.maximize || (japanese ? '\u5168\u753B\u9762\u5316' : 'Maximize');\n const restoreLabel = labels.restore || (japanese ? '\u5143\u306E\u30B5\u30A4\u30BA\u306B\u623B\u3059' : 'Restore window');\n let restoreBounds = null;\n let gesture = null;\n const handles = [];\n dialog.setAttribute('data-block-editor-window', '');\n if (frame !== dialog)\n frame.setAttribute('data-block-editor-window-frame', '');\n header.setAttribute('data-block-editor-titlebar', '');\n const maximize = doc.createElement('button');\n maximize.type = 'button';\n maximize.setAttribute('data-block-editor-maximize', '');\n const closeContainer = header.lastElementChild;\n if (closeContainer === null || closeContainer === void 0 ? void 0 : closeContainer.querySelector('button, [role=\"button\"]'))\n closeContainer.prepend(maximize);\n else\n header.insertBefore(maximize, closeContainer);\n const viewport = () => ({ width: win.innerWidth, height: win.innerHeight });\n const bounds = () => {\n const { x, y, width, height } = dialog.getBoundingClientRect();\n return { x, y, width, height };\n };\n const clamp = (value, min, max) => Math.min(Math.max(value, min), max);\n function fit(rect) {\n const view = viewport();\n const width = clamp(rect.width, Math.min(360, view.width), view.width);\n const height = clamp(rect.height, Math.min(280, view.height), view.height);\n return { width, height, x: clamp(rect.x, 0, view.width - width), y: clamp(rect.y, 0, view.height - height) };\n }\n function place(rect) {\n Object.assign(dialog.style, { margin: '0', inset: 'auto', transform: 'none', maxHeight: '100dvh',\n left: `${rect.x}px`, top: `${rect.y}px`, width: `${rect.width}px`, height: `${rect.height}px` });\n }\n function stop(event) {\n if (!gesture || (event && 'pointerId' in event && event.pointerId !== gesture.id))\n return;\n const { target, id } = gesture;\n gesture = null;\n if (target.hasPointerCapture(id))\n target.releasePointerCapture(id);\n dialog.removeAttribute('data-block-editor-dragging');\n }\n function start(event, edge) {\n if (restoreBounds || gesture || event.button !== 0 || !event.isPrimary)\n return;\n if (!edge && event.target.closest('button, a, input, select, textarea, [role=\"button\"]'))\n return;\n event.preventDefault();\n const target = event.currentTarget;\n gesture = { id: event.pointerId, target, edge, x: event.clientX, y: event.clientY, rect: fit(bounds()) };\n place(gesture.rect);\n target.setPointerCapture(event.pointerId);\n dialog.setAttribute('data-block-editor-dragging', '');\n }\n function move(event) {\n if (!gesture || event.pointerId !== gesture.id)\n return;\n const { rect, edge } = gesture, view = viewport();\n const dx = event.clientX - gesture.x, dy = event.clientY - gesture.y;\n if (!edge) {\n place(fit({ ...rect, x: rect.x + dx, y: rect.y + dy }));\n return;\n }\n const minWidth = Math.min(360, view.width), minHeight = Math.min(280, view.height);\n let left = rect.x, top = rect.y, right = rect.x + rect.width, bottom = rect.y + rect.height;\n if (edge.includes('w'))\n left = clamp(left + dx, 0, right - minWidth);\n if (edge.includes('e'))\n right = clamp(right + dx, left + minWidth, view.width);\n if (edge.includes('n'))\n top = clamp(top + dy, 0, bottom - minHeight);\n if (edge.includes('s'))\n bottom = clamp(bottom + dy, top + minHeight, view.height);\n place({ x: left, y: top, width: right - left, height: bottom - top });\n }\n const startMove = (event) => start(event, '');\n header.addEventListener('pointerdown', startMove);\n for (const edge of ['n', 'e', 's', 'w', 'ne', 'se', 'sw', 'nw']) {\n const handle = doc.createElement('div');\n handle.setAttribute('data-block-editor-resize', edge);\n handle.setAttribute('aria-hidden', 'true');\n handle.addEventListener('pointerdown', event => start(event, edge));\n dialog.append(handle);\n handles.push(handle);\n }\n function updateButton() {\n const label = restoreBounds ? restoreLabel : maximizeLabel;\n maximize.setAttribute('aria-label', label);\n maximize.setAttribute('aria-pressed', String(Boolean(restoreBounds)));\n maximize.title = label;\n maximize.textContent = restoreBounds ? '\u2750' : '\u26F6';\n dialog.toggleAttribute('data-block-editor-maximized', Boolean(restoreBounds));\n }\n function toggle() {\n stop();\n if (restoreBounds) {\n place(fit(restoreBounds));\n restoreBounds = null;\n }\n else {\n restoreBounds = bounds();\n place({ x: 0, y: 0, ...viewport() });\n }\n updateButton();\n }\n function resize() {\n stop();\n if (restoreBounds)\n place({ x: 0, y: 0, ...viewport() });\n else\n place(fit(bounds()));\n }\n maximize.addEventListener('click', toggle);\n win.addEventListener('pointermove', move);\n win.addEventListener('pointerup', stop);\n win.addEventListener('pointercancel', stop);\n win.addEventListener('blur', stop);\n win.addEventListener('resize', resize);\n dialog.addEventListener('lostpointercapture', stop);\n updateButton();\n return () => {\n stop();\n header.removeEventListener('pointerdown', startMove);\n win.removeEventListener('pointermove', move);\n win.removeEventListener('pointerup', stop);\n win.removeEventListener('pointercancel', stop);\n win.removeEventListener('blur', stop);\n win.removeEventListener('resize', resize);\n dialog.removeEventListener('lostpointercapture', stop);\n maximize.remove();\n handles.forEach(handle => handle.remove());\n dialog.style.cssText = initialStyle;\n for (const name of ['window', 'maximized', 'dragging'])\n dialog.removeAttribute(`data-block-editor-${name}`);\n if (frame !== dialog)\n frame.removeAttribute('data-block-editor-window-frame');\n header.removeAttribute('data-block-editor-titlebar');\n };\n}\n", "import bindBlockEditorFieldErrors from './field-errors.js';\nimport { attachEditorDialogWindow } from './dialog-window.js';\nexport { default as bindBlockEditorFieldErrors } from './field-errors.js';\nimport * as React from 'react';\nimport { BlockEditorConflictError } from './types.js';\nimport { BlockEditorStructureError } from './descendant-types.js';\nclass NodeBody extends React.Component {\n constructor() {\n super(...arguments);\n this.body = null;\n }\n componentDidMount() {\n try {\n this.unmountBody = this.props.editor.mount(this.body);\n }\n catch (error) {\n this.props.onError(error);\n }\n }\n componentWillUnmount() {\n var _a;\n try {\n (_a = this.unmountBody) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n catch (error) {\n this.props.onError(error);\n }\n }\n render() { return React.createElement(\"div\", { ref: body => { this.body = body; } }); }\n}\nlet nextBodyId = 0;\nclass DescendantTree extends React.Component {\n constructor(props) {\n super(props);\n this.nodes = this.props.session.getNodes();\n this.children = new Map();\n this.sections = new Map();\n this.bodyIds = new Map();\n for (const node of this.nodes) {\n const path = node.inputPath;\n const parent = path.length ? path[path.length - 1].blockId : null;\n if (!this.children.has(parent))\n this.children.set(parent, []);\n this.children.get(parent).push(node);\n this.bodyIds.set(node.reference.blockId, `block-editor-node-${++nextBodyId}`);\n }\n this.state = { failedIcons: new Set(), expanded: new Set(this.nodes.filter(node => this.nodes.length <= 30 || node.inputPath.length === 0).map(node => node.reference.blockId)) };\n }\n componentWillUnmount() {\n if (this.focusFrame !== undefined)\n cancelAnimationFrame(this.focusFrame);\n }\n reveal(issue) {\n if (!issue || !('reference' in issue))\n return;\n const expanded = new Set(this.state.expanded);\n for (const step of issue.inputPath)\n expanded.add(step.blockId);\n expanded.add(issue.reference.blockId);\n this.setState({ expanded }, () => {\n if (this.focusFrame !== undefined)\n cancelAnimationFrame(this.focusFrame);\n this.focusFrame = requestAnimationFrame(() => {\n var _a;\n const section = this.sections.get(issue.reference.blockId);\n if (!section)\n return;\n const controls = [...section.querySelectorAll('input, textarea, select')];\n const path = (issue.path || '').replace(/^\\./, '').replace(/\\[(\\d+)\\]/g, '_$1').replace(/\\./g, '_');\n const field = controls.find(control => path && control.id.endsWith(`_${path}`)) || controls[0];\n const target = field || section.querySelector('button');\n target === null || target === void 0 ? void 0 : target.focus();\n (_a = target === null || target === void 0 ? void 0 : target.scrollIntoView) === null || _a === void 0 ? void 0 : _a.call(target, { block: 'nearest' });\n });\n });\n }\n toggle(id) {\n const expanded = new Set(this.state.expanded);\n if (expanded.has(id))\n expanded.delete(id);\n else\n expanded.add(id);\n this.setState({ expanded });\n }\n renderNode(node) {\n var _a, _b, _c;\n const { styles, session, messages } = this.props;\n const id = node.reference.blockId;\n const expanded = this.state.expanded.has(id);\n const editor = (_a = session.getEditor) === null || _a === void 0 ? void 0 : _a.call(session, id);\n const step = node.inputPath[node.inputPath.length - 1];\n const appearance = ((_b = this.props.nodeAppearances) === null || _b === void 0 ? void 0 : _b[id]) || {};\n const label = appearance.name || ((_c = this.props.nodeLabels) === null || _c === void 0 ? void 0 : _c[id]) || node.opcode;\n const style = {\n '--block-editor-node-colour': appearance.colour,\n '--block-editor-node-tint': appearance.tint\n };\n return React.createElement(\"section\", { className: styles.treeNode, \"data-block-editor-node\": id, key: id, style: style, ref: section => { if (section)\n this.sections.set(id, section);\n else\n this.sections.delete(id); } },\n React.createElement(\"h3\", { className: styles.nodeHeading },\n React.createElement(\"button\", { \"aria-controls\": this.bodyIds.get(id), \"aria-expanded\": expanded, \"data-block-editor-toggle\": id, disabled: this.props.disabled, type: \"button\", onClick: () => this.toggle(id) },\n React.createElement(\"span\", { \"aria-hidden\": \"true\" }, expanded ? '\u25BE ' : '\u25B8 '),\n appearance.iconURI && !this.state.failedIcons.has(id) ? React.createElement(\"img\", { alt: \"\", \"aria-hidden\": \"true\", className: styles.nodeIcon, \"data-block-editor-node-icon\": id, draggable: false, src: appearance.iconURI, onError: () => this.setState(state => ({ failedIcons: new Set([...state.failedIcons, id]) })) }) : null,\n React.createElement(\"span\", { className: styles.nodeCaption },\n React.createElement(\"span\", { \"data-block-editor-node-name\": id }, label),\n React.createElement(\"span\", { className: styles.nodeIdentity },\n step ? React.createElement(\"span\", { className: styles.branchName }, `${step.input} \u00B7 ${step.index + 1}: `) : null,\n id)))),\n React.createElement(\"div\", { hidden: !expanded, id: this.bodyIds.get(id) }, expanded ? React.createElement(React.Fragment, null,\n editor ? React.createElement(NodeBody, { editor: editor, onError: this.props.onError }) :\n React.createElement(\"p\", { className: styles.structuralNode }, messages.structuralNode),\n (this.children.get(id) || []).map(child => this.renderNode(child))) : null));\n }\n render() {\n return React.createElement(\"div\", { className: this.props.styles.tree }, (this.children.get(null) || []).map(node => this.renderNode(node)));\n }\n}\n/** The host injects its modal, localized strings and stylesheet mapping; no GUI imports are needed. */\nexport class BlockEditorDialog extends React.Component {\n constructor(props) {\n super(props);\n this.mounted = false;\n this.unmounting = false;\n this.composing = false;\n this.body = null;\n this.tree = null;\n this.removeListener = () => { };\n this.handleBody = (body) => {\n this.body = body;\n if (this.mounted)\n this.mountBody();\n };\n this.handleMountError = (error) => {\n var _a, _b;\n (_b = (_a = this.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, error);\n if (!this.unmounting)\n this.setState({ mountFailed: true });\n };\n this.handleClose = () => {\n if (this.props.session.cancel())\n return;\n if (this.props.session.getState().status !== 'saving')\n this.props.onClose();\n };\n this.handleSave = async () => {\n var _a;\n const result = await this.props.session.save();\n if (result.status === 'saved')\n this.props.onClose();\n if (result.status === 'invalid')\n (_a = this.tree) === null || _a === void 0 ? void 0 : _a.reveal(result.issues[0]);\n };\n this.state = { ...props.session.getState(), mountFailed: false };\n }\n componentDidMount() {\n this.mounted = true;\n this.removeListener = this.props.session.subscribe(() => {\n const state = this.props.session.getState();\n this.setState(state);\n if (['cancelled', 'disposed', 'invalidated'].includes(state.status))\n this.props.onClose();\n });\n this.mountBody();\n }\n componentWillUnmount() {\n var _a, _b, _c, _d, _e;\n this.unmounting = true;\n this.mounted = false;\n if (this.focusFrame !== undefined)\n cancelAnimationFrame(this.focusFrame);\n this.removeListener();\n (_a = this.stopFieldErrors) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = this.stopWindow) === null || _b === void 0 ? void 0 : _b.call(this);\n try {\n (_c = this.unmountBody) === null || _c === void 0 ? void 0 : _c.call(this);\n }\n catch (error) {\n (_e = (_d = this.props).onError) === null || _e === void 0 ? void 0 : _e.call(_d, error);\n }\n finally {\n this.props.session.dispose();\n }\n }\n mountBody() {\n if (!this.body || this.unmountBody || this.state.mountFailed)\n return;\n try {\n if (!this.stopWindow)\n this.stopWindow = attachEditorDialogWindow(this.body, {\n headerClassName: this.props.styles.header,\n maximize: this.props.messages.maximize,\n restore: this.props.messages.restore\n });\n if (!this.stopFieldErrors)\n this.stopFieldErrors = bindBlockEditorFieldErrors(this.body);\n if (typeof this.props.session.getNodes !== 'function')\n this.unmountBody = this.props.session.mount(this.body);\n // Mounting the body validates what it shows without notifying; read the result, or Save stays enabled\n // for a form that opened invalid.\n this.setState(this.props.session.getState());\n // The modal establishes its focus scope after creating the portal.\n this.focusFrame = requestAnimationFrame(() => {\n if (!this.mounted)\n return;\n const first = this.body.querySelector('input, textarea, select') ||\n this.body.querySelector('button, [tabindex=\"0\"]');\n first === null || first === void 0 ? void 0 : first.focus();\n });\n }\n catch (error) {\n this.handleMountError(error);\n }\n }\n render() {\n var _a, _b, _c, _d;\n const { styles, messages, ModalComponent, session } = this.props;\n const saving = this.state.status === 'saving';\n const hierarchy = typeof session.getNodes === 'function';\n let fixed = false;\n if (session.getFixedInputView && (this.state.status === 'editing' || saving)) {\n try {\n fixed = Boolean(session.getFixedInputView());\n }\n catch (_e) {\n fixed = true;\n }\n }\n const root = (_a = session.getNodes) === null || _a === void 0 ? void 0 : _a.call(session).find(node => node.inputPath.length === 0);\n const rootId = ((_b = session.reference) === null || _b === void 0 ? void 0 : _b.blockId) || (root === null || root === void 0 ? void 0 : root.reference.blockId);\n const appearance = rootId ? (_c = this.props.nodeAppearances) === null || _c === void 0 ? void 0 : _c[rootId] : undefined;\n const name = (appearance === null || appearance === void 0 ? void 0 : appearance.name) || (rootId ? (_d = this.props.nodeLabels) === null || _d === void 0 ? void 0 : _d[rootId] : undefined) || (root === null || root === void 0 ? void 0 : root.opcode);\n const title = name ? messages.title.includes('{name}') ? messages.title.replace('{name}', () => name) :\n /\u30D6\u30ED\u30C3\u30AF|block/i.test(messages.title) ? messages.title.replace(/\u30D6\u30ED\u30C3\u30AF|block/i, () => name) :\n `${name}: ${messages.title}` : messages.title;\n return React.createElement(ModalComponent, { className: `${styles.modalContent || ''} ${hierarchy ? styles.hierarchyModal : ''} ${this.props.className || ''}`, contentLabel: title, ...((appearance === null || appearance === void 0 ? void 0 : appearance.iconURI) ? { headerImage: appearance.iconURI } : {}), headerClassName: styles.header, id: \"blockEditorModal\", onRequestClose: this.handleClose },\n React.createElement(\"div\", { \"aria-busy\": saving, className: styles.body, \"data-block-editor-body\": \"\", onCompositionStart: () => { this.composing = true; }, onCompositionEnd: () => { this.composing = false; }, onKeyDownCapture: event => {\n if (this.composing || event.nativeEvent.isComposing || event.keyCode === 229)\n event.stopPropagation();\n } },\n React.createElement(\"div\", { className: styles.editorBody },\n React.createElement(\"div\", { ref: this.handleBody }, hierarchy ? React.createElement(DescendantTree, { session: session, styles: styles, messages: messages, disabled: saving, nodeAppearances: this.props.nodeAppearances, nodeLabels: this.props.nodeLabels, onError: this.handleMountError, ref: tree => { this.tree = tree; } }) : null),\n React.createElement(\"div\", { \"aria-live\": \"polite\", className: styles.errors, role: \"status\" },\n saving ? messages.saving : null,\n fixed && this.state.issues.length ? React.createElement(\"p\", null, messages.invalidInput || messages.failed) : this.state.issues.map((issue, index) => {\n var _a;\n return hierarchy && 'reference' in issue ?\n React.createElement(\"button\", { className: styles.nodeError, \"data-block-editor-issue\": index, disabled: saving, key: index, type: \"button\", onClick: () => { var _a; return (_a = this.tree) === null || _a === void 0 ? void 0 : _a.reveal(issue); } },\n ((_a = this.props.nodeLabels) === null || _a === void 0 ? void 0 : _a[issue.reference.blockId]) || issue.reference.blockId,\n ': ',\n issue.message) : React.createElement(\"p\", { key: index }, issue.message);\n }),\n this.state.error instanceof BlockEditorStructureError ? messages.structureError :\n this.state.error instanceof BlockEditorConflictError ? messages.conflict :\n (this.state.error || this.state.mountFailed) ? messages.failed : null)),\n React.createElement(\"div\", { className: styles.buttons },\n React.createElement(\"button\", { disabled: saving, type: \"button\", onClick: this.handleClose }, messages.cancel),\n React.createElement(\"button\", { \"data-block-editor-save\": \"\", disabled: !this.state.canSave || this.state.mountFailed, type: \"button\", onClick: this.handleSave }, saving ? messages.saving : hierarchy ? messages.saveAll : messages.save))));\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;AACA,IAAM,6BAA6B,CAAC,cAAc;AAC9C,QAAM,YAAY,oBAAI,IAAI;AAC1B,QAAM,gBAAgB,CAAC,SAAS,SAAS;AACrC,UAAM,SAAS,UAAU,IAAI,OAAO;AACpC,UAAM,WAAW,UAAU,OAAO,IAAI,IAAI;AAC1C,UAAM,UAAU,QAAQ,aAAa,IAAI;AACzC,WAAO,YAAY,YAAY,SAAS,UAAU,SAAS,WAAW;AAAA,EAC1E;AACA,QAAM,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