@jxsuite/studio 0.19.0 → 0.20.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/dist/studio.css +98 -98
- package/dist/studio.js +12577 -12183
- package/dist/studio.js.map +146 -144
- package/dist/workers/editor.worker.js +79 -79
- package/dist/workers/json.worker.js +109 -109
- package/dist/workers/ts.worker.js +82 -82
- package/package.json +17 -6
- package/src/browse/browse.js +25 -19
- package/src/canvas/canvas-diff.js +24 -16
- package/src/canvas/canvas-helpers.js +24 -19
- package/src/canvas/canvas-live-render.js +94 -39
- package/src/canvas/canvas-render.js +119 -73
- package/src/canvas/canvas-utils.js +38 -15
- package/src/canvas/nested-site-style.js +50 -0
- package/src/editor/component-inline-edit.js +14 -13
- package/src/editor/content-inline-edit.js +22 -10
- package/src/editor/context-menu.js +1 -1
- package/src/editor/convert-to-component.js +12 -10
- package/src/editor/inline-edit.js +66 -28
- package/src/editor/insertion-helper.js +16 -12
- package/src/editor/shortcuts.js +4 -2
- package/src/editor/slash-menu.js +6 -4
- package/src/files/components.js +1 -1
- package/src/files/file-ops.js +37 -16
- package/src/files/files.js +78 -52
- package/src/github/github-auth.js +122 -0
- package/src/github/github-publish.js +115 -0
- package/src/markdown/md-convert.js +172 -107
- package/src/new-project/new-project-modal.js +204 -0
- package/src/panels/activity-bar.js +22 -20
- package/src/panels/ai-panel.js +399 -0
- package/src/panels/block-action-bar.js +5 -5
- package/src/panels/canvas-dnd.js +8 -2
- package/src/panels/data-explorer.js +19 -13
- package/src/panels/dnd.js +144 -92
- package/src/panels/editors.js +55 -35
- package/src/panels/elements-panel.js +33 -19
- package/src/panels/events-panel.js +15 -10
- package/src/panels/git-panel.js +469 -98
- package/src/panels/head-panel.js +121 -81
- package/src/panels/imports-panel.js +88 -64
- package/src/panels/layers-panel.js +64 -43
- package/src/panels/left-panel.js +85 -47
- package/src/panels/overlays.js +1 -0
- package/src/panels/panel-events.js +45 -30
- package/src/panels/preview-render.js +23 -18
- package/src/panels/properties-panel.js +365 -249
- package/src/panels/pseudo-preview.js +2 -2
- package/src/panels/quick-search.js +7 -5
- package/src/panels/right-panel.js +26 -2
- package/src/panels/shared.js +4 -4
- package/src/panels/signals-panel.js +295 -166
- package/src/panels/statusbar.js +4 -4
- package/src/panels/style-inputs.js +67 -35
- package/src/panels/style-panel.js +233 -132
- package/src/panels/style-utils.js +34 -16
- package/src/panels/stylebook-layers-panel.js +12 -10
- package/src/panels/stylebook-panel.js +134 -66
- package/src/panels/toolbar.js +333 -109
- package/src/panels/welcome-screen.js +121 -0
- package/src/platform.js +2 -4
- package/src/platforms/devserver.js +113 -7
- package/src/resize-edges.js +98 -0
- package/src/services/cem-export.js +12 -7
- package/src/services/code-services.js +30 -12
- package/src/settings/content-types-editor.js +7 -7
- package/src/settings/css-vars-editor.js +30 -24
- package/src/settings/defs-editor.js +12 -7
- package/src/settings/general-settings.js +85 -3
- package/src/settings/head-editor.js +30 -24
- package/src/settings/schema-field-ui.js +58 -39
- package/src/site-context.js +41 -31
- package/src/state.js +70 -29
- package/src/store.js +21 -26
- package/src/studio.js +103 -81
- package/src/tabs/tab.js +67 -43
- package/src/tabs/transact.js +23 -13
- package/src/ui/button-group.js +24 -24
- package/src/ui/color-selector.js +28 -23
- package/src/ui/field-row.js +3 -3
- package/src/ui/icons.js +2 -2
- package/src/ui/media-picker.js +7 -7
- package/src/ui/spectrum.js +5 -1
- package/src/ui/unit-selector.js +18 -16
- package/src/ui/value-selector.js +21 -15
- package/src/ui/widgets.js +22 -19
- package/src/utils/canvas-media.js +5 -4
- package/src/utils/edit-display.js +31 -20
- package/src/utils/google-fonts.js +11 -11
- package/src/utils/inherited-style.js +9 -8
- package/src/utils/studio-utils.js +7 -7
- package/src/view.js +58 -1
- package/src/workspace/workspace.js +10 -7
package/src/panels/editors.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* completion provider for state scope variables.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/** @typedef {import("../services/code-services.js").OxLintDiagnostic} OxLintDiagnostic */
|
|
7
|
+
|
|
6
8
|
import * as monaco from "monaco-editor/esm/vs/editor/editor.api.js";
|
|
7
9
|
import { html, render as litRender, nothing } from "lit-html";
|
|
8
10
|
import { ref } from "lit-html/directives/ref.js";
|
|
@@ -13,12 +15,15 @@ import { transactDoc, mutateUpdateDef, mutateUpdateProperty } from "../tabs/tran
|
|
|
13
15
|
import { view } from "../view.js";
|
|
14
16
|
import { codeService, setLintMarkers, getFunctionArgs } from "../services/code-services.js";
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
/** @typedef {{ type: "def"; defName: string } | { type: "event"; path: JxPath; eventKey: string }} EditingTarget */
|
|
19
|
+
|
|
20
|
+
/** @param {EditingTarget | null | undefined} editing */
|
|
21
|
+
function getFunctionBody(editing) {
|
|
17
22
|
const document = activeTab.value?.doc.document;
|
|
18
|
-
if (editing
|
|
23
|
+
if (editing?.type === "def") {
|
|
19
24
|
return document?.state?.[editing.defName]?.body || "";
|
|
20
|
-
} else if (editing
|
|
21
|
-
const node = getNodeAtPath(document, editing.path);
|
|
25
|
+
} else if (editing?.type === "event") {
|
|
26
|
+
const node = getNodeAtPath(/** @type {JxMutableNode} */ (document), editing.path);
|
|
22
27
|
return node?.[editing.eventKey]?.body || "";
|
|
23
28
|
}
|
|
24
29
|
return "";
|
|
@@ -26,7 +31,9 @@ function getFunctionBody(/** @type {any} */ editing) {
|
|
|
26
31
|
|
|
27
32
|
/** @param {() => void} closeFunctionEditor */
|
|
28
33
|
export function renderFunctionEditor(closeFunctionEditor) {
|
|
29
|
-
const editing =
|
|
34
|
+
const editing = /** @type {EditingTarget | null | undefined} */ (
|
|
35
|
+
activeTab.value?.session.ui.editingFunction
|
|
36
|
+
);
|
|
30
37
|
|
|
31
38
|
// If editor already exists and matches current target, just sync value
|
|
32
39
|
if (view.functionEditor && view.functionEditor._editingTarget === JSON.stringify(editing)) {
|
|
@@ -66,7 +73,7 @@ export function renderFunctionEditor(closeFunctionEditor) {
|
|
|
66
73
|
|
|
67
74
|
const tab = activeTab.value;
|
|
68
75
|
const docName = tab?.documentPath?.split("/").pop() || tab?.doc.document?.tagName || "document";
|
|
69
|
-
const ed = /** @type {
|
|
76
|
+
const ed = /** @type {EditingTarget} */ (editing);
|
|
70
77
|
const funcLabel = ed.type === "def" ? `ƒ ${ed.defName}` : `ƒ ${ed.eventKey}`;
|
|
71
78
|
|
|
72
79
|
// Editor container
|
|
@@ -94,22 +101,29 @@ export function renderFunctionEditor(closeFunctionEditor) {
|
|
|
94
101
|
);
|
|
95
102
|
|
|
96
103
|
const body = getFunctionBody(editing);
|
|
97
|
-
const args = getFunctionArgs(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
104
|
+
const args = getFunctionArgs(
|
|
105
|
+
/** @type {EditingTarget} */ (editing),
|
|
106
|
+
activeTab.value?.doc.document,
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
view.functionEditor = monaco.editor.create(
|
|
110
|
+
/** @type {HTMLElement} */ (/** @type {unknown} */ (editorContainer)),
|
|
111
|
+
{
|
|
112
|
+
value: body,
|
|
113
|
+
language: "javascript",
|
|
114
|
+
theme: "vs-dark",
|
|
115
|
+
automaticLayout: true,
|
|
116
|
+
minimap: { enabled: false },
|
|
117
|
+
fontSize: 12,
|
|
118
|
+
fontFamily: "'SF Mono', 'Fira Code', 'Consolas', monospace",
|
|
119
|
+
lineNumbers: "on",
|
|
120
|
+
scrollBeyondLastLine: false,
|
|
121
|
+
wordWrap: "on",
|
|
122
|
+
tabSize: 2,
|
|
123
|
+
},
|
|
124
|
+
);
|
|
112
125
|
view.functionEditor._editingTarget = JSON.stringify(editing);
|
|
126
|
+
const editor = view.functionEditor;
|
|
113
127
|
|
|
114
128
|
// Format on open — show pretty-printed code, then run initial lint
|
|
115
129
|
codeService("format", { code: body, args }).then((result) => {
|
|
@@ -120,29 +134,32 @@ export function renderFunctionEditor(closeFunctionEditor) {
|
|
|
120
134
|
});
|
|
121
135
|
codeService("lint", { code: body, args }).then((result) => {
|
|
122
136
|
if (result?.diagnostics && view.functionEditor)
|
|
123
|
-
setLintMarkers(view.functionEditor, result.diagnostics);
|
|
137
|
+
setLintMarkers(view.functionEditor, /** @type {OxLintDiagnostic[]} */ (result.diagnostics));
|
|
124
138
|
});
|
|
125
139
|
|
|
126
140
|
// Debounced sync back to state + lint on edit
|
|
127
|
-
/** @type {
|
|
141
|
+
/** @type {ReturnType<typeof setTimeout> | undefined} */
|
|
128
142
|
let syncDebounce;
|
|
129
|
-
/** @type {
|
|
143
|
+
/** @type {ReturnType<typeof setTimeout> | undefined} */
|
|
130
144
|
let lintDebounce;
|
|
131
145
|
let lintGen = 0;
|
|
132
|
-
|
|
133
|
-
if (
|
|
134
|
-
|
|
146
|
+
editor.onDidChangeModelContent(() => {
|
|
147
|
+
if (editor._ignoreNextChange) {
|
|
148
|
+
editor._ignoreNextChange = false;
|
|
135
149
|
return;
|
|
136
150
|
}
|
|
137
151
|
|
|
138
152
|
clearTimeout(syncDebounce);
|
|
139
153
|
syncDebounce = setTimeout(() => {
|
|
140
|
-
const newBody =
|
|
141
|
-
const ed = /** @type {
|
|
154
|
+
const newBody = editor.getValue();
|
|
155
|
+
const ed = /** @type {EditingTarget} */ (editing);
|
|
142
156
|
if (ed.type === "def") {
|
|
143
157
|
transactDoc(activeTab.value, (t) => mutateUpdateDef(t, ed.defName, { body: newBody }));
|
|
144
158
|
} else if (ed.type === "event") {
|
|
145
|
-
const node = getNodeAtPath(
|
|
159
|
+
const node = getNodeAtPath(
|
|
160
|
+
/** @type {JxMutableNode} */ (activeTab.value?.doc.document),
|
|
161
|
+
ed.path,
|
|
162
|
+
);
|
|
146
163
|
const current = node?.[ed.eventKey] || {};
|
|
147
164
|
transactDoc(activeTab.value, (t) =>
|
|
148
165
|
mutateUpdateProperty(t, ed.path, ed.eventKey, {
|
|
@@ -158,11 +175,14 @@ export function renderFunctionEditor(closeFunctionEditor) {
|
|
|
158
175
|
clearTimeout(lintDebounce);
|
|
159
176
|
lintDebounce = setTimeout(() => {
|
|
160
177
|
const gen = ++lintGen;
|
|
161
|
-
const currentCode =
|
|
178
|
+
const currentCode = editor.getValue();
|
|
162
179
|
codeService("lint", { code: currentCode, args }).then((result) => {
|
|
163
180
|
if (gen !== lintGen) return;
|
|
164
181
|
if (result?.diagnostics && view.functionEditor)
|
|
165
|
-
setLintMarkers(
|
|
182
|
+
setLintMarkers(
|
|
183
|
+
view.functionEditor,
|
|
184
|
+
/** @type {OxLintDiagnostic[]} */ (result.diagnostics),
|
|
185
|
+
);
|
|
166
186
|
});
|
|
167
187
|
}, 750);
|
|
168
188
|
});
|
|
@@ -187,11 +207,11 @@ export function registerFunctionCompletions() {
|
|
|
187
207
|
const suggestions = Object.entries(defs).map(([key, def]) => {
|
|
188
208
|
let kind = monaco.languages.CompletionItemKind.Variable;
|
|
189
209
|
if (
|
|
190
|
-
/** @type {
|
|
191
|
-
/** @type {
|
|
210
|
+
/** @type {JxPrototypeDef} */ (def)?.$prototype === "Function" ||
|
|
211
|
+
/** @type {{ $handler?: unknown }} */ (def)?.$handler
|
|
192
212
|
)
|
|
193
213
|
kind = monaco.languages.CompletionItemKind.Function;
|
|
194
|
-
else if (/** @type {
|
|
214
|
+
else if (/** @type {JxPrototypeDef} */ (def)?.$prototype)
|
|
195
215
|
kind = monaco.languages.CompletionItemKind.Property;
|
|
196
216
|
return {
|
|
197
217
|
label: `state.${key}`,
|
|
@@ -8,17 +8,23 @@ import { view } from "../view.js";
|
|
|
8
8
|
import { getEffectiveElements } from "../site-context.js";
|
|
9
9
|
import { componentRegistry } from "../files/components.js";
|
|
10
10
|
|
|
11
|
+
/** @typedef {import("../files/components.js").ComponentEntry} ComponentEntry */
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
|
-
* @param {{
|
|
14
|
+
* @param {{
|
|
15
|
+
* webdata: { elements: Record<string, { tag: string }[]> };
|
|
16
|
+
* defaultDef: (tag: string) => JxMutableNode;
|
|
17
|
+
* rerender: () => void;
|
|
18
|
+
* }} ctx
|
|
13
19
|
* @returns {import("lit-html").TemplateResult}
|
|
14
20
|
*/
|
|
15
21
|
export function renderElementsTemplate(ctx) {
|
|
16
22
|
const tab = activeTab.value;
|
|
17
23
|
|
|
18
24
|
const categories = Object.entries(ctx.webdata.elements).map(
|
|
19
|
-
(/** @type {
|
|
25
|
+
(/** @type {[string, { tag: string }[]]} */ [category, elements]) => {
|
|
20
26
|
const filtered = view.elementsFilter
|
|
21
|
-
? elements.filter((/** @type {
|
|
27
|
+
? elements.filter((/** @type {{ tag: string }} */ e) => e.tag.includes(view.elementsFilter))
|
|
22
28
|
: elements;
|
|
23
29
|
if (filtered.length === 0) return nothing;
|
|
24
30
|
|
|
@@ -26,12 +32,13 @@ export function renderElementsTemplate(ctx) {
|
|
|
26
32
|
<sp-accordion-item
|
|
27
33
|
label=${category}
|
|
28
34
|
?open=${!view.elementsCollapsed.has(category)}
|
|
29
|
-
@sp-accordion-item-toggle=${(/** @type {
|
|
30
|
-
if (e.target.open)
|
|
35
|
+
@sp-accordion-item-toggle=${(/** @type {Event} */ e) => {
|
|
36
|
+
if (/** @type {HTMLElement & { open: boolean }} */ (e.target).open)
|
|
37
|
+
view.elementsCollapsed.delete(category);
|
|
31
38
|
else view.elementsCollapsed.add(category);
|
|
32
39
|
}}
|
|
33
40
|
>
|
|
34
|
-
${filtered.map((/** @type {
|
|
41
|
+
${filtered.map((/** @type {{ tag: string }} */ { tag }) => {
|
|
35
42
|
const def = ctx.defaultDef(tag);
|
|
36
43
|
return html`
|
|
37
44
|
<div
|
|
@@ -57,13 +64,15 @@ export function renderElementsTemplate(ctx) {
|
|
|
57
64
|
},
|
|
58
65
|
);
|
|
59
66
|
|
|
60
|
-
const effectiveEls = getEffectiveElements(
|
|
67
|
+
const effectiveEls = getEffectiveElements(
|
|
68
|
+
/** @type {(string | JxElement)[] | undefined} */ (tab?.doc.document?.$elements),
|
|
69
|
+
);
|
|
61
70
|
/** @type {Set<string>} */
|
|
62
71
|
const enabledTags = new Set();
|
|
63
72
|
for (const entry of effectiveEls) {
|
|
64
73
|
if (typeof entry !== "string") continue;
|
|
65
74
|
const comp = componentRegistry.find(
|
|
66
|
-
(/** @type {
|
|
75
|
+
(/** @type {ComponentEntry} */ c) =>
|
|
67
76
|
c.source === "npm" && c.modulePath && entry === `${c.package}/${c.modulePath}`,
|
|
68
77
|
);
|
|
69
78
|
if (comp) {
|
|
@@ -77,9 +86,11 @@ export function renderElementsTemplate(ctx) {
|
|
|
77
86
|
const compsFiltered =
|
|
78
87
|
componentRegistry.length > 0
|
|
79
88
|
? componentRegistry
|
|
80
|
-
.filter((/** @type {any} */ c) => c.source !== "npm" || enabledTags.has(c.tagName))
|
|
81
89
|
.filter(
|
|
82
|
-
(/** @type {
|
|
90
|
+
(/** @type {ComponentEntry} */ c) => c.source !== "npm" || enabledTags.has(c.tagName),
|
|
91
|
+
)
|
|
92
|
+
.filter(
|
|
93
|
+
(/** @type {ComponentEntry} */ c) =>
|
|
83
94
|
!view.elementsFilter || c.tagName.toLowerCase().includes(view.elementsFilter),
|
|
84
95
|
)
|
|
85
96
|
: [];
|
|
@@ -90,14 +101,15 @@ export function renderElementsTemplate(ctx) {
|
|
|
90
101
|
<sp-accordion-item
|
|
91
102
|
label="Components"
|
|
92
103
|
?open=${!view.elementsCollapsed.has("Components")}
|
|
93
|
-
@sp-accordion-item-toggle=${(/** @type {
|
|
94
|
-
if (e.target.open)
|
|
104
|
+
@sp-accordion-item-toggle=${(/** @type {Event} */ e) => {
|
|
105
|
+
if (/** @type {HTMLElement & { open: boolean }} */ (e.target).open)
|
|
106
|
+
view.elementsCollapsed.delete("Components");
|
|
95
107
|
else view.elementsCollapsed.add("Components");
|
|
96
108
|
}}
|
|
97
109
|
>
|
|
98
110
|
<div class="components-section">
|
|
99
111
|
${compsFiltered.map(
|
|
100
|
-
(/** @type {
|
|
112
|
+
(/** @type {ComponentEntry} */ comp) => html`
|
|
101
113
|
<div
|
|
102
114
|
class="element-card"
|
|
103
115
|
data-component-tag=${comp.tagName}
|
|
@@ -112,10 +124,12 @@ export function renderElementsTemplate(ctx) {
|
|
|
112
124
|
const instanceDef = {
|
|
113
125
|
tagName: comp.tagName,
|
|
114
126
|
$props: Object.fromEntries(
|
|
115
|
-
(comp.props || []).map(
|
|
116
|
-
p
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
(comp.props || []).map(
|
|
128
|
+
(/** @type {{ name: string; default?: unknown }} */ p) => [
|
|
129
|
+
p.name,
|
|
130
|
+
p.default !== undefined ? p.default : "",
|
|
131
|
+
],
|
|
132
|
+
),
|
|
119
133
|
),
|
|
120
134
|
};
|
|
121
135
|
transactDoc(t, (tr) =>
|
|
@@ -142,8 +156,8 @@ export function renderElementsTemplate(ctx) {
|
|
|
142
156
|
size="s"
|
|
143
157
|
placeholder="Filter elements…"
|
|
144
158
|
value=${view.elementsFilter}
|
|
145
|
-
@input=${(/** @type {
|
|
146
|
-
view.elementsFilter = e.target.value.toLowerCase();
|
|
159
|
+
@input=${(/** @type {Event} */ e) => {
|
|
160
|
+
view.elementsFilter = /** @type {HTMLInputElement} */ (e.target).value.toLowerCase();
|
|
147
161
|
ctx.rerender();
|
|
148
162
|
}}
|
|
149
163
|
></sp-search>
|
|
@@ -33,7 +33,7 @@ export function eventsSidebarTemplate(helpers) {
|
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
// Declared CEM events (custom element docs)
|
|
36
|
-
/** @type {
|
|
36
|
+
/** @type {unknown} */
|
|
37
37
|
let declaredEventsT = nothing;
|
|
38
38
|
if (isCustomElementDoc()) {
|
|
39
39
|
const allEmits = [];
|
|
@@ -86,8 +86,8 @@ export function eventsSidebarTemplate(helpers) {
|
|
|
86
86
|
size="s"
|
|
87
87
|
class="event-name"
|
|
88
88
|
.value=${live(evKey)}
|
|
89
|
-
@change=${(/** @type {
|
|
90
|
-
const newKey = e.target.value;
|
|
89
|
+
@change=${(/** @type {Event} */ e) => {
|
|
90
|
+
const newKey = /** @type {HTMLInputElement} */ (e.target).value;
|
|
91
91
|
if (newKey && newKey !== evKey) {
|
|
92
92
|
transactDoc(activeTab.value, (t) => {
|
|
93
93
|
mutateUpdateProperty(t, selection, evKey, undefined);
|
|
@@ -104,8 +104,8 @@ export function eventsSidebarTemplate(helpers) {
|
|
|
104
104
|
size="s"
|
|
105
105
|
class="event-mode"
|
|
106
106
|
.value=${live(isInline ? "inline" : "ref")}
|
|
107
|
-
@change=${(/** @type {
|
|
108
|
-
if (e.target.value === "inline") {
|
|
107
|
+
@change=${(/** @type {Event} */ e) => {
|
|
108
|
+
if (/** @type {HTMLInputElement} */ (e.target).value === "inline") {
|
|
109
109
|
transactDoc(activeTab.value, (t) =>
|
|
110
110
|
mutateUpdateProperty(t, selection, evKey, {
|
|
111
111
|
$prototype: "Function",
|
|
@@ -149,11 +149,11 @@ export function eventsSidebarTemplate(helpers) {
|
|
|
149
149
|
grows
|
|
150
150
|
placeholder="// handler body"
|
|
151
151
|
.value=${live(evVal.body || "")}
|
|
152
|
-
@input=${(/** @type {
|
|
152
|
+
@input=${(/** @type {Event} */ e) => {
|
|
153
153
|
transactDoc(activeTab.value, (t) =>
|
|
154
154
|
mutateUpdateProperty(t, selection, evKey, {
|
|
155
155
|
$prototype: "Function",
|
|
156
|
-
body: e.target.value,
|
|
156
|
+
body: /** @type {HTMLInputElement} */ (e.target).value,
|
|
157
157
|
parameters: evVal.parameters || [],
|
|
158
158
|
}),
|
|
159
159
|
);
|
|
@@ -181,10 +181,15 @@ export function eventsSidebarTemplate(helpers) {
|
|
|
181
181
|
size="s"
|
|
182
182
|
class="event-handler"
|
|
183
183
|
.value=${live(evVal.$ref || "__none__")}
|
|
184
|
-
@change=${(/** @type {
|
|
185
|
-
if (
|
|
184
|
+
@change=${(/** @type {Event} */ e) => {
|
|
185
|
+
if (
|
|
186
|
+
/** @type {HTMLInputElement} */ (e.target).value &&
|
|
187
|
+
/** @type {HTMLInputElement} */ (e.target).value !== "__none__"
|
|
188
|
+
) {
|
|
186
189
|
transactDoc(activeTab.value, (t) =>
|
|
187
|
-
mutateUpdateProperty(t, selection, evKey, {
|
|
190
|
+
mutateUpdateProperty(t, selection, evKey, {
|
|
191
|
+
$ref: /** @type {HTMLInputElement} */ (e.target).value,
|
|
192
|
+
}),
|
|
188
193
|
);
|
|
189
194
|
} else {
|
|
190
195
|
transactDoc(activeTab.value, (t) =>
|