@tuprolog/arg2p-ui 0.0.0-stage → 0.1.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.md +48 -2
- package/dist/components/arg2p-editor.d.ts +73 -0
- package/dist/components/arg2p-editor.js +244 -0
- package/dist/components/arg2p-editor.js.map +1 -0
- package/dist/components/arg2p-flags.d.ts +58 -0
- package/dist/components/arg2p-flags.js +358 -0
- package/dist/components/arg2p-flags.js.map +1 -0
- package/dist/components/arg2p-framework.d.ts +102 -0
- package/dist/components/arg2p-framework.js +513 -0
- package/dist/components/arg2p-framework.js.map +1 -0
- package/dist/components/arg2p-graph.d.ts +112 -0
- package/dist/components/arg2p-graph.js +577 -0
- package/dist/components/arg2p-graph.js.map +1 -0
- package/dist/components/arg2p-solutions.d.ts +75 -0
- package/dist/components/arg2p-solutions.js +391 -0
- package/dist/components/arg2p-solutions.js.map +1 -0
- package/dist/data.d.ts +9 -0
- package/dist/data.js +11 -0
- package/dist/data.js.map +1 -0
- package/dist/editor/language.d.ts +9 -0
- package/dist/editor/language.js +78 -0
- package/dist/editor/language.js.map +1 -0
- package/dist/engine.d.ts +94 -0
- package/dist/engine.js +2 -0
- package/dist/engine.js.map +1 -0
- package/dist/flags/schema.d.ts +50 -0
- package/dist/flags/schema.js +195 -0
- package/dist/flags/schema.js.map +1 -0
- package/dist/flags/text.d.ts +18 -0
- package/dist/flags/text.js +85 -0
- package/dist/flags/text.js.map +1 -0
- package/dist/formats/declarations.d.ts +9 -0
- package/dist/formats/declarations.js +193 -0
- package/dist/formats/declarations.js.map +1 -0
- package/dist/formats/frameworks.d.ts +23 -0
- package/dist/formats/frameworks.js +130 -0
- package/dist/formats/frameworks.js.map +1 -0
- package/dist/graph/canvas.d.ts +21 -0
- package/dist/graph/canvas.js +76 -0
- package/dist/graph/canvas.js.map +1 -0
- package/dist/graph/drawing.d.ts +24 -0
- package/dist/graph/drawing.js +64 -0
- package/dist/graph/drawing.js.map +1 -0
- package/dist/graph/layout.d.ts +28 -0
- package/dist/graph/layout.js +167 -0
- package/dist/graph/layout.js.map +1 -0
- package/dist/graph/levels.d.ts +6 -0
- package/dist/graph/levels.js +25 -0
- package/dist/graph/levels.js.map +1 -0
- package/dist/graph/positions.d.ts +24 -0
- package/dist/graph/positions.js +43 -0
- package/dist/graph/positions.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/js/engine.d.ts +35 -0
- package/dist/js/engine.js +110 -0
- package/dist/js/engine.js.map +1 -0
- package/dist/js/host.d.ts +75 -0
- package/dist/js/host.js +237 -0
- package/dist/js/host.js.map +1 -0
- package/dist/js/index.d.ts +2 -0
- package/dist/js/index.js +4 -0
- package/dist/js/index.js.map +1 -0
- package/dist/js/worker.d.ts +1 -0
- package/dist/js/worker.js +7 -0
- package/dist/js/worker.js.map +1 -0
- package/dist/theme.d.ts +5 -0
- package/dist/theme.js +48 -0
- package/dist/theme.js.map +1 -0
- package/package.json +65 -4
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { LitElement, css, html, nothing } from 'lit';
|
|
2
|
+
import { DEFAULT_PROFILE, DEFAULTS, FLAG_GROUPS, PROFILES, profileInfo } from '../flags/schema.js';
|
|
3
|
+
import { statedFlags, statedProfile, withNone, withSwitch, withValues, without } from '../flags/text.js';
|
|
4
|
+
import { tokens } from '../theme.js';
|
|
5
|
+
// How long the flags and the theory are let be before the engine is asked what is in effect
|
|
6
|
+
const SETTLE = 250;
|
|
7
|
+
/**
|
|
8
|
+
* The flags of the solver, as controls over their text (Prolog facts, the source of truth: every change rewrites the
|
|
9
|
+
* lines of its flag alone). The profile comes first: it presets the flags its framework needs, and the flags that mean
|
|
10
|
+
* something for it are shown, the others folded away. Every flag shows the value in effect for the theory, as the
|
|
11
|
+
* engine tells it, and where it comes from: the theory (which wins: it is changed in the theory), the flags, the
|
|
12
|
+
* profile, or the default. A flag the flags state can be reset, to take the value of the profile again.
|
|
13
|
+
*
|
|
14
|
+
* Events: `arg2p-flags-change` with the flags, after every change made with the controls.
|
|
15
|
+
*/
|
|
16
|
+
export class Arg2pFlags extends LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
/** The flags, as Prolog facts */
|
|
20
|
+
this.flags = '';
|
|
21
|
+
/** The theory the flags are for: it may state flags, and its profile */
|
|
22
|
+
this.theory = '';
|
|
23
|
+
/** What tells the settings in effect; without it, the panel shows what the flags state */
|
|
24
|
+
this.engine = null;
|
|
25
|
+
this.settings = null;
|
|
26
|
+
this.asked = 0;
|
|
27
|
+
}
|
|
28
|
+
static { this.properties = {
|
|
29
|
+
flags: {},
|
|
30
|
+
theory: {},
|
|
31
|
+
engine: { attribute: false },
|
|
32
|
+
settings: { state: true },
|
|
33
|
+
}; }
|
|
34
|
+
updated(changed) {
|
|
35
|
+
if (changed.has('flags') || changed.has('theory') || changed.has('engine'))
|
|
36
|
+
this.ask();
|
|
37
|
+
// the value of a select set once its options are there (as rendered, some DOMs pick another)
|
|
38
|
+
this.renderRoot.querySelectorAll('select[data-value]').forEach(it => {
|
|
39
|
+
it.value = it.dataset.value;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
super.disconnectedCallback();
|
|
44
|
+
clearTimeout(this.timer);
|
|
45
|
+
}
|
|
46
|
+
// The settings in effect, asked once the typing settles: a later answer wins
|
|
47
|
+
ask() {
|
|
48
|
+
clearTimeout(this.timer);
|
|
49
|
+
const engine = this.engine;
|
|
50
|
+
if (engine === null) {
|
|
51
|
+
this.settings = null;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.timer = setTimeout(() => {
|
|
55
|
+
const asked = ++this.asked;
|
|
56
|
+
engine.settings(this.theory, this.flags).then(settings => {
|
|
57
|
+
if (asked === this.asked)
|
|
58
|
+
this.settings = settings;
|
|
59
|
+
}, () => {
|
|
60
|
+
if (asked === this.asked)
|
|
61
|
+
this.settings = null;
|
|
62
|
+
});
|
|
63
|
+
}, SETTLE);
|
|
64
|
+
}
|
|
65
|
+
/** The values in effect of [flag], and where they come from */
|
|
66
|
+
effective(flag) {
|
|
67
|
+
const fromTheory = statedFlags(this.theory).get(flag.name);
|
|
68
|
+
const fromFlags = statedFlags(this.flags).get(flag.name);
|
|
69
|
+
const fallback = DEFAULTS[flag.name] ?? [];
|
|
70
|
+
const values = this.settings?.[flag.name] ?? fromTheory ?? fromFlags ?? fallback;
|
|
71
|
+
const same = (a, b) => a.length === b.length && [...a].sort().every((it, i) => it === [...b].sort()[i]);
|
|
72
|
+
const source = fromTheory !== undefined ? 'theory'
|
|
73
|
+
: fromFlags !== undefined && same(values, fromFlags) ? 'flags'
|
|
74
|
+
: same(values, fallback) ? 'default'
|
|
75
|
+
: 'profile';
|
|
76
|
+
return { values, source };
|
|
77
|
+
}
|
|
78
|
+
profile() {
|
|
79
|
+
const fromTheory = statedProfile(this.theory);
|
|
80
|
+
const name = this.settings?.graphBuildMode?.[0] ?? fromTheory ?? statedProfile(this.flags) ?? DEFAULT_PROFILE;
|
|
81
|
+
return { name, source: fromTheory !== null ? 'theory' : statedProfile(this.flags) !== null ? 'flags' : 'default' };
|
|
82
|
+
}
|
|
83
|
+
change(flags) {
|
|
84
|
+
this.flags = flags;
|
|
85
|
+
this.dispatchEvent(new CustomEvent('arg2p-flags-change', { detail: { flags }, bubbles: true, composed: true }));
|
|
86
|
+
}
|
|
87
|
+
set(flag, values) {
|
|
88
|
+
if (flag.kind === 'switch')
|
|
89
|
+
this.change(withSwitch(this.flags, flag.name, values.length > 0));
|
|
90
|
+
else if (flag.kind === 'set' && values.length === 0)
|
|
91
|
+
this.change(withNone(this.flags, flag.name));
|
|
92
|
+
else if (values.length === 0)
|
|
93
|
+
this.change(without(this.flags, flag.name));
|
|
94
|
+
else
|
|
95
|
+
this.change(withValues(this.flags, flag.name, values));
|
|
96
|
+
}
|
|
97
|
+
/** What the panel finds wrong with the flags in effect */
|
|
98
|
+
warnings() {
|
|
99
|
+
const all = FLAG_GROUPS.flatMap(group => group.flags);
|
|
100
|
+
const warnings = all
|
|
101
|
+
.filter(flag => flag.required && this.effective(flag).values.length === 0)
|
|
102
|
+
.map(flag => `${flag.label} has no value: the solver needs one.`);
|
|
103
|
+
const value = (name) => this.effective({ name }).values[0];
|
|
104
|
+
if (value('orderingComparator') === 'normal' && value('orderingPrinciple') === 'weakest') {
|
|
105
|
+
warnings.push('The normal comparator goes with the last link alone: with the weakest link the evaluation raises an error.');
|
|
106
|
+
}
|
|
107
|
+
return warnings;
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
const profile = this.profile();
|
|
111
|
+
const info = profileInfo(profile.name);
|
|
112
|
+
const relevant = FLAG_GROUPS.filter(group => info === undefined || info.groups.includes(group.id));
|
|
113
|
+
const others = FLAG_GROUPS.filter(group => !relevant.includes(group));
|
|
114
|
+
const warnings = this.warnings();
|
|
115
|
+
return html `
|
|
116
|
+
<section class="profile">
|
|
117
|
+
<label class="row">
|
|
118
|
+
<span class="name">Profile</span>
|
|
119
|
+
<select
|
|
120
|
+
data-value=${profile.name}
|
|
121
|
+
?disabled=${profile.source === 'theory'}
|
|
122
|
+
@change=${(e) => this.change(withValues(this.flags, 'graphBuildMode', [e.target.value]))}
|
|
123
|
+
>
|
|
124
|
+
${PROFILES.map(it => html `<option value=${it.name} ?selected=${it.name === profile.name}>${it.label}</option>`)}
|
|
125
|
+
${info === undefined ? html `<option selected value=${profile.name}>${profile.name}</option>` : nothing}
|
|
126
|
+
</select>
|
|
127
|
+
${this.badge(profile.source)}
|
|
128
|
+
</label>
|
|
129
|
+
<p class="help">
|
|
130
|
+
${info?.help ?? 'A profile this version of the panel does not know.'}
|
|
131
|
+
${profile.source === 'theory' ? html `<br /><em>The theory states it: change it there.</em>` : nothing}
|
|
132
|
+
</p>
|
|
133
|
+
</section>
|
|
134
|
+
${warnings.length > 0 ? html `<ul class="warnings" role="alert">${warnings.map(it => html `<li>${it}</li>`)}</ul>` : nothing}
|
|
135
|
+
${relevant.map(group => this.group(group))}
|
|
136
|
+
${others.length > 0
|
|
137
|
+
? html `
|
|
138
|
+
<details class="others">
|
|
139
|
+
<summary>Other flags <span class="muted">(${others.map(it => it.title.toLowerCase()).join(', ')}: preset by the profile)</span></summary>
|
|
140
|
+
${others.map(group => this.group(group))}
|
|
141
|
+
</details>
|
|
142
|
+
`
|
|
143
|
+
: nothing}
|
|
144
|
+
`;
|
|
145
|
+
}
|
|
146
|
+
group(group) {
|
|
147
|
+
return html `
|
|
148
|
+
<fieldset class="group">
|
|
149
|
+
<legend>${group.title}</legend>
|
|
150
|
+
${group.flags.map(flag => this.flag(flag))}
|
|
151
|
+
</fieldset>
|
|
152
|
+
`;
|
|
153
|
+
}
|
|
154
|
+
flag(flag) {
|
|
155
|
+
const { values, source } = this.effective(flag);
|
|
156
|
+
const locked = source === 'theory';
|
|
157
|
+
const stated = statedFlags(this.flags).has(flag.name);
|
|
158
|
+
const id = `flag-${flag.name}`;
|
|
159
|
+
let control;
|
|
160
|
+
if (flag.kind === 'switch') {
|
|
161
|
+
control = html `<input id=${id} type="checkbox" .checked=${values.length > 0} ?disabled=${locked} @change=${(e) => this.set(flag, e.target.checked ? ['true'] : [])} />`;
|
|
162
|
+
}
|
|
163
|
+
else if (flag.kind === 'choice') {
|
|
164
|
+
control = html `
|
|
165
|
+
<select id=${id} data-value=${values[0] ?? ''} ?disabled=${locked} @change=${(e) => this.set(flag, [e.target.value])}>
|
|
166
|
+
${values.length === 0 ? html `<option selected disabled value="">none</option>` : nothing}
|
|
167
|
+
${flag.options.map(it => html `<option value=${it.value} title=${it.help} ?selected=${values[0] === it.value}>${it.label}</option>`)}
|
|
168
|
+
</select>
|
|
169
|
+
`;
|
|
170
|
+
}
|
|
171
|
+
else if (flag.kind === 'set') {
|
|
172
|
+
control = html `
|
|
173
|
+
<div class="set" id=${id} role="group" aria-label=${flag.label}>
|
|
174
|
+
${flag.options.map(it => html `
|
|
175
|
+
<label title=${it.help}>
|
|
176
|
+
<input
|
|
177
|
+
type="checkbox"
|
|
178
|
+
value=${it.value}
|
|
179
|
+
.checked=${values.includes(it.value)}
|
|
180
|
+
?disabled=${locked}
|
|
181
|
+
@change=${(e) => {
|
|
182
|
+
const on = e.target.checked;
|
|
183
|
+
this.set(flag, on ? [...values.filter(v => v !== it.value), it.value] : values.filter(v => v !== it.value));
|
|
184
|
+
}}
|
|
185
|
+
/>
|
|
186
|
+
${it.label}
|
|
187
|
+
</label>
|
|
188
|
+
`)}
|
|
189
|
+
</div>
|
|
190
|
+
`;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
control = html `<input id=${id} type="text" placeholder=${flag.placeholder ?? ''} .value=${values[0] ?? ''} ?disabled=${locked} @change=${(e) => this.set(flag, [e.target.value])} />`;
|
|
194
|
+
}
|
|
195
|
+
const option = flag.options?.find(it => it.value === values[0]);
|
|
196
|
+
return html `
|
|
197
|
+
<div class="flag ${flag.kind}" data-flag=${flag.name}>
|
|
198
|
+
<div class="row">
|
|
199
|
+
<label class="name" for=${id} title=${flag.help}>${flag.label}</label>
|
|
200
|
+
${flag.kind === 'set' ? nothing : control}
|
|
201
|
+
${this.badge(source)}
|
|
202
|
+
${stated && !locked ? html `<button type="button" class="reset" title="Take the value of the profile again (remove it from the flags)" @click=${() => this.change(without(this.flags, flag.name))}>reset</button>` : nothing}
|
|
203
|
+
</div>
|
|
204
|
+
${flag.kind === 'set' ? control : nothing}
|
|
205
|
+
<p class="help">
|
|
206
|
+
${flag.kind === 'choice' && option !== undefined ? option.help : flag.help}
|
|
207
|
+
${stated && source === 'profile' ? html `<br /><em>The flags state its default, which the profile overrides: state it in the theory to keep it.</em>` : nothing}
|
|
208
|
+
</p>
|
|
209
|
+
</div>
|
|
210
|
+
`;
|
|
211
|
+
}
|
|
212
|
+
badge(source) {
|
|
213
|
+
const titles = {
|
|
214
|
+
theory: 'Stated by the theory',
|
|
215
|
+
flags: 'Stated by the flags',
|
|
216
|
+
profile: 'Preset by the profile',
|
|
217
|
+
default: 'The default',
|
|
218
|
+
};
|
|
219
|
+
return html `<span class="badge ${source}" title=${titles[source]}>${source}</span>`;
|
|
220
|
+
}
|
|
221
|
+
static { this.styles = [
|
|
222
|
+
tokens,
|
|
223
|
+
css `
|
|
224
|
+
:host {
|
|
225
|
+
display: block;
|
|
226
|
+
font-size: 13px;
|
|
227
|
+
}
|
|
228
|
+
.profile {
|
|
229
|
+
padding: 8px 0;
|
|
230
|
+
}
|
|
231
|
+
.row {
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
gap: 8px;
|
|
235
|
+
}
|
|
236
|
+
/* a flag: its name, its control, where its value comes from, and the reset */
|
|
237
|
+
.flag .row {
|
|
238
|
+
display: grid;
|
|
239
|
+
grid-template-columns: minmax(7em, 10em) minmax(0, 1fr) auto auto;
|
|
240
|
+
}
|
|
241
|
+
.flag.set .row {
|
|
242
|
+
grid-template-columns: minmax(7em, 10em) auto auto 1fr;
|
|
243
|
+
}
|
|
244
|
+
.flag .row > select,
|
|
245
|
+
.flag .row > input[type='text'] {
|
|
246
|
+
min-width: 0;
|
|
247
|
+
width: 100%;
|
|
248
|
+
}
|
|
249
|
+
.flag .row > input[type='checkbox'] {
|
|
250
|
+
justify-self: start;
|
|
251
|
+
margin: 0;
|
|
252
|
+
}
|
|
253
|
+
.name {
|
|
254
|
+
font-weight: 600;
|
|
255
|
+
}
|
|
256
|
+
.profile select {
|
|
257
|
+
flex: 1;
|
|
258
|
+
min-width: 0;
|
|
259
|
+
}
|
|
260
|
+
select,
|
|
261
|
+
input[type='text'] {
|
|
262
|
+
font: inherit;
|
|
263
|
+
color: var(--_text);
|
|
264
|
+
background: var(--_surface);
|
|
265
|
+
border: 1px solid var(--_border);
|
|
266
|
+
border-radius: 4px;
|
|
267
|
+
padding: 2px 4px;
|
|
268
|
+
}
|
|
269
|
+
input[type='text'] {
|
|
270
|
+
font-family: var(--_mono);
|
|
271
|
+
}
|
|
272
|
+
select:disabled,
|
|
273
|
+
input:disabled {
|
|
274
|
+
opacity: 0.7;
|
|
275
|
+
}
|
|
276
|
+
.help {
|
|
277
|
+
margin: 2px 0 0 0;
|
|
278
|
+
color: var(--_muted);
|
|
279
|
+
font-size: 12px;
|
|
280
|
+
}
|
|
281
|
+
.group {
|
|
282
|
+
border: 1px solid var(--_border);
|
|
283
|
+
border-radius: 6px;
|
|
284
|
+
margin: 8px 0;
|
|
285
|
+
padding: 4px 10px 8px 10px;
|
|
286
|
+
}
|
|
287
|
+
legend {
|
|
288
|
+
font-weight: 600;
|
|
289
|
+
padding: 0 4px;
|
|
290
|
+
}
|
|
291
|
+
.flag {
|
|
292
|
+
padding: 6px 0;
|
|
293
|
+
}
|
|
294
|
+
.flag + .flag {
|
|
295
|
+
border-top: 1px dashed var(--_border);
|
|
296
|
+
}
|
|
297
|
+
.set {
|
|
298
|
+
display: flex;
|
|
299
|
+
flex-wrap: wrap;
|
|
300
|
+
gap: 4px 14px;
|
|
301
|
+
margin-top: 4px;
|
|
302
|
+
}
|
|
303
|
+
.set label {
|
|
304
|
+
display: inline-flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
gap: 4px;
|
|
307
|
+
}
|
|
308
|
+
.badge {
|
|
309
|
+
font-size: 10px;
|
|
310
|
+
text-transform: uppercase;
|
|
311
|
+
letter-spacing: 0.04em;
|
|
312
|
+
border-radius: 4px;
|
|
313
|
+
padding: 0 5px;
|
|
314
|
+
border: 1px solid var(--_border);
|
|
315
|
+
color: var(--_muted);
|
|
316
|
+
}
|
|
317
|
+
.badge.flags {
|
|
318
|
+
color: var(--_accent);
|
|
319
|
+
border-color: var(--_accent);
|
|
320
|
+
}
|
|
321
|
+
.badge.theory {
|
|
322
|
+
color: #ffffff;
|
|
323
|
+
background: var(--_accent);
|
|
324
|
+
border-color: var(--_accent);
|
|
325
|
+
}
|
|
326
|
+
.badge.profile {
|
|
327
|
+
border-style: dashed;
|
|
328
|
+
}
|
|
329
|
+
.reset {
|
|
330
|
+
font: inherit;
|
|
331
|
+
font-size: 11px;
|
|
332
|
+
color: var(--_muted);
|
|
333
|
+
background: none;
|
|
334
|
+
border: none;
|
|
335
|
+
text-decoration: underline;
|
|
336
|
+
cursor: pointer;
|
|
337
|
+
padding: 0;
|
|
338
|
+
}
|
|
339
|
+
.warnings {
|
|
340
|
+
margin: 4px 0;
|
|
341
|
+
padding: 6px 10px 6px 24px;
|
|
342
|
+
border-left: 3px solid var(--_no);
|
|
343
|
+
background: color-mix(in srgb, var(--_no) 12%, transparent);
|
|
344
|
+
border-radius: 4px;
|
|
345
|
+
}
|
|
346
|
+
.others summary {
|
|
347
|
+
cursor: pointer;
|
|
348
|
+
padding: 6px 0;
|
|
349
|
+
}
|
|
350
|
+
.muted {
|
|
351
|
+
color: var(--_muted);
|
|
352
|
+
font-size: 12px;
|
|
353
|
+
}
|
|
354
|
+
`,
|
|
355
|
+
]; }
|
|
356
|
+
}
|
|
357
|
+
customElements.define('arg2p-flags', Arg2pFlags);
|
|
358
|
+
//# sourceMappingURL=arg2p-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arg2p-flags.js","sourceRoot":"","sources":["../../src/components/arg2p-flags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAA4C,MAAM,oBAAoB,CAAC;AAC7I,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACzG,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,4FAA4F;AAC5F,MAAM,MAAM,GAAG,GAAG,CAAC;AAKnB;;;;;;;;GAQG;AACH,MAAM,OAAO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 'lit';
|
|
3
|
+
import type { GraphData } from '../engine.js';
|
|
4
|
+
import type { Framework } from '../formats/frameworks.js';
|
|
5
|
+
import { type Positions } from '../graph/positions.js';
|
|
6
|
+
/**
|
|
7
|
+
* An abstract framework drawn: the arguments and attacks its theory (of the profile abstract) declares, as nodes and
|
|
8
|
+
* arrows. Drawing writes the theory: an argument added is a fact `a.`, an attack `a -> b.`; deleting or renaming one
|
|
9
|
+
* changes its declaration, and every other clause of the theory (those that derive attacks, say) stays as it is.
|
|
10
|
+
* The theory edited as text is drawn again, the arguments kept where they were.
|
|
11
|
+
*
|
|
12
|
+
* Given the graph of a solution, the arguments take the colours of their labels, and what the theory derives without
|
|
13
|
+
* declaring it is drawn too, dashed: it changes with the clauses that derive it, not by drawing.
|
|
14
|
+
*
|
|
15
|
+
* Events: `arg2p-theory-change` with the theory, after every change made by drawing; `arg2p-export` with the picture
|
|
16
|
+
* of the framework, as for the graph.
|
|
17
|
+
*/
|
|
18
|
+
export declare class Arg2pFramework extends LitElement {
|
|
19
|
+
static properties: {
|
|
20
|
+
theory: {};
|
|
21
|
+
graph: {
|
|
22
|
+
attribute: boolean;
|
|
23
|
+
};
|
|
24
|
+
positions: {
|
|
25
|
+
attribute: boolean;
|
|
26
|
+
};
|
|
27
|
+
readonly: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
reflect: boolean;
|
|
30
|
+
};
|
|
31
|
+
fileName: {
|
|
32
|
+
attribute: string;
|
|
33
|
+
};
|
|
34
|
+
mode: {
|
|
35
|
+
state: boolean;
|
|
36
|
+
};
|
|
37
|
+
selected: {
|
|
38
|
+
state: boolean;
|
|
39
|
+
};
|
|
40
|
+
renaming: {
|
|
41
|
+
state: boolean;
|
|
42
|
+
};
|
|
43
|
+
source: {
|
|
44
|
+
state: boolean;
|
|
45
|
+
};
|
|
46
|
+
derived: {
|
|
47
|
+
state: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/** The theory drawn */
|
|
51
|
+
theory: string;
|
|
52
|
+
/** The graph of a solution of [theory], to show its labels and what it derives; null when there is none */
|
|
53
|
+
graph: GraphData | null;
|
|
54
|
+
/** Where the arguments are, by name: shared with the graph of the framework (see arg2p-positions) */
|
|
55
|
+
positions: Positions | null;
|
|
56
|
+
readonly: boolean;
|
|
57
|
+
/** The name of the picture the framework is saved as, with no extension */
|
|
58
|
+
fileName: string;
|
|
59
|
+
private mode;
|
|
60
|
+
private selected;
|
|
61
|
+
private renaming;
|
|
62
|
+
private source;
|
|
63
|
+
private derived;
|
|
64
|
+
private cy;
|
|
65
|
+
private unfollow;
|
|
66
|
+
private drawn;
|
|
67
|
+
/** The arguments and attacks the theory declares */
|
|
68
|
+
framework(): Framework;
|
|
69
|
+
/** The drawing, for what the element does not do itself (and for tests) */
|
|
70
|
+
get drawing(): Core | null;
|
|
71
|
+
/** Fits the drawing to the element (after it was hidden, and so sized to nothing) */
|
|
72
|
+
fit(): void;
|
|
73
|
+
/** The framework as a PNG picture, as a data URL */
|
|
74
|
+
png(): string;
|
|
75
|
+
protected firstUpdated(): void;
|
|
76
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
77
|
+
protected updated(changed: PropertyValues): void;
|
|
78
|
+
disconnectedCallback(): void;
|
|
79
|
+
connectedCallback(): void;
|
|
80
|
+
private draw;
|
|
81
|
+
private tellPositions;
|
|
82
|
+
private tap;
|
|
83
|
+
private pick;
|
|
84
|
+
private add;
|
|
85
|
+
private change;
|
|
86
|
+
private deleteSelected;
|
|
87
|
+
private setMode;
|
|
88
|
+
private suggestedName;
|
|
89
|
+
private isAvailable;
|
|
90
|
+
private startRename;
|
|
91
|
+
private commitRename;
|
|
92
|
+
private placeRename;
|
|
93
|
+
private onKey;
|
|
94
|
+
private export;
|
|
95
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
96
|
+
static styles: import("lit").CSSResult[];
|
|
97
|
+
}
|
|
98
|
+
declare global {
|
|
99
|
+
interface HTMLElementTagNameMap {
|
|
100
|
+
'arg2p-framework': Arg2pFramework;
|
|
101
|
+
}
|
|
102
|
+
}
|