@things-factory/figure-ui 10.1.85 → 10.1.87

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.
@@ -0,0 +1,87 @@
1
+ import { LitElement, nothing } from 'lit';
2
+ import type { FigureEvaluatedShape, FigureSectionMeasure } from '@hatiolab/figure-model';
3
+ type Axis = 'x' | 'y' | 'z';
4
+ /** The editor's width and room for the solid beside it: below this the two take turns. */
5
+ export declare const NARROW_BELOW = 900;
6
+ declare const FigureSectionEditor_base: (new (...args: any[]) => LitElement) & typeof LitElement;
7
+ /**
8
+ * 단면 편집 — a pushed part's section and length in one editor (ADR-0100 §3.2, stage 2).
9
+ *
10
+ * The outline is drawn flat, looking along the push, in millimetres from the part's origin; the figure behind stays in
11
+ * view and shows the solid the working state makes (`command-live`, the same preview the section panel uses), so the 2D
12
+ * and the 3D stand side by side. A drawn section's point is dragged or typed, a side pressed gains a point in its
13
+ * middle, a point is deleted, never below three. A rectangle's width and depth and an ellipse's diameters are dragged by
14
+ * their handles or typed; a circle's two are one. The push's length is typed, and the face it keeps is the one the
15
+ * part's placement or fastening keeps (§4.1: read here, changed elsewhere). A measure that follows another value is
16
+ * shown and not offered.
17
+ *
18
+ * What the kernel would refuse is marked on the outline and said in the list; apply is held back, and the solid shows
19
+ * the last valid state, which the caption names. Apply sends one `set-section` command (one step of the history); cancel
20
+ * or Esc sends nothing and lets the preview go. The undo here is the editor's own. If the figure changes while the editor
21
+ * is open, apply is refused until it is opened again.
22
+ */
23
+ export declare class FigureSectionEditor extends FigureSectionEditor_base {
24
+ static styles: import("lit").CSSResult[];
25
+ /** The part and its evaluated shape as they stand when the editor opens. */
26
+ body?: {
27
+ id: string;
28
+ shape: FigureEvaluatedShape;
29
+ };
30
+ /** Which of its measures can be set (figure-model's `figureSectionMeasuresOf`). */
31
+ measures?: {
32
+ measures: Record<Axis, FigureSectionMeasure>;
33
+ round: boolean;
34
+ };
35
+ /** Along the push, the face a length change keeps: 1 its start, -1 its end, 0 its centre; undefined when it cannot be said. */
36
+ kept?: -1 | 0 | 1;
37
+ /** The figure's revision now; the editor remembers the one it opened at. */
38
+ revision: number;
39
+ /** Narrow: the outline or the solid behind. */
40
+ show: 'outline' | 'solid';
41
+ /** Set when the space the editor stands in leaves too little beside it to see the solid. */
42
+ narrow: boolean;
43
+ private room;
44
+ private working;
45
+ private selected;
46
+ private note;
47
+ private opened;
48
+ private history;
49
+ private lastValid;
50
+ private openedAt;
51
+ private dragging;
52
+ /** The state as it was when a drag began: kept once something moves, so a press alone is not a step back. */
53
+ private dragFrom;
54
+ private extent;
55
+ private get axis();
56
+ private get kind();
57
+ connectedCallback(): void;
58
+ disconnectedCallback(): void;
59
+ /** How far the drawing reaches from the origin: the outline's farthest point with room around, in 50 mm steps. */
60
+ private extentOf;
61
+ private keys;
62
+ private get stale();
63
+ private valid;
64
+ private change;
65
+ private back;
66
+ /** The solid behind shows the working state, or the last valid one while the working one is refused. */
67
+ private preview;
68
+ /** One command for everything changed since the editor opened; a measure not changed is not sent (it may follow another). */
69
+ private action;
70
+ private removePoint;
71
+ /** A width across set: a circle's two are one. */
72
+ private across;
73
+ private apply;
74
+ private cancel;
75
+ private close;
76
+ private svgPoint;
77
+ /** Words for the face a length change keeps, by the part's relations; nothing when they cannot say. */
78
+ private keptWords;
79
+ render(): import("lit-html").TemplateResult<1> | typeof nothing;
80
+ /** A section drawn as the screen lays it: across to the right, then down. */
81
+ private outline;
82
+ private drawing;
83
+ /** A millimetre field: committed to the working state on change, a bad number put back. */
84
+ private field;
85
+ private list;
86
+ }
87
+ export {};