sldeditor 0.34.0 → 0.36.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.
Files changed (54) hide show
  1. package/dist/canvas/BusLayer.d.ts.map +1 -1
  2. package/dist/canvas/CanvasSvg.d.ts.map +1 -1
  3. package/dist/canvas/InsertPreview.d.ts +6 -0
  4. package/dist/canvas/InsertPreview.d.ts.map +1 -0
  5. package/dist/canvas/PlaceGhost.d.ts +5 -0
  6. package/dist/canvas/PlaceGhost.d.ts.map +1 -1
  7. package/dist/canvas/drop-on-bus.d.ts +14 -1
  8. package/dist/canvas/drop-on-bus.d.ts.map +1 -1
  9. package/dist/canvas/insert-on-wire.d.ts +39 -0
  10. package/dist/canvas/insert-on-wire.d.ts.map +1 -0
  11. package/dist/canvas/tools/SelectTool.d.ts.map +1 -1
  12. package/dist/canvas/useKeyboardShortcuts.d.ts.map +1 -1
  13. package/dist/components/ContextualToolbar.d.ts.map +1 -1
  14. package/dist/components/EditorShell.d.ts.map +1 -1
  15. package/dist/components/PropertyPanel.d.ts.map +1 -1
  16. package/dist/components/QuickInsert.d.ts +13 -0
  17. package/dist/components/QuickInsert.d.ts.map +1 -0
  18. package/dist/components/contact-actions.d.ts +16 -0
  19. package/dist/components/contact-actions.d.ts.map +1 -0
  20. package/dist/components/quick-insert-state.d.ts +31 -0
  21. package/dist/components/quick-insert-state.d.ts.map +1 -0
  22. package/dist/i18n/locales/ar.d.ts +1 -1
  23. package/dist/i18n/locales/ar.d.ts.map +1 -1
  24. package/dist/i18n/locales/de.d.ts +1 -1
  25. package/dist/i18n/locales/de.d.ts.map +1 -1
  26. package/dist/i18n/locales/es.d.ts +1 -1
  27. package/dist/i18n/locales/es.d.ts.map +1 -1
  28. package/dist/i18n/locales/fa.d.ts +1 -1
  29. package/dist/i18n/locales/fa.d.ts.map +1 -1
  30. package/dist/i18n/locales/fr.d.ts +1 -1
  31. package/dist/i18n/locales/fr.d.ts.map +1 -1
  32. package/dist/i18n/locales/he.d.ts +1 -1
  33. package/dist/i18n/locales/he.d.ts.map +1 -1
  34. package/dist/i18n/locales/index.d.ts +9 -9
  35. package/dist/i18n/locales/ja.d.ts +1 -1
  36. package/dist/i18n/locales/ja.d.ts.map +1 -1
  37. package/dist/i18n/locales/pt.d.ts +1 -1
  38. package/dist/i18n/locales/pt.d.ts.map +1 -1
  39. package/dist/i18n/locales/ru.d.ts +1 -1
  40. package/dist/i18n/locales/ru.d.ts.map +1 -1
  41. package/dist/i18n/messages.d.ts +85 -17
  42. package/dist/i18n/messages.d.ts.map +1 -1
  43. package/dist/lib/contact-numbers.d.ts +54 -0
  44. package/dist/lib/contact-numbers.d.ts.map +1 -0
  45. package/dist/sldeditor.cjs +67 -62
  46. package/dist/sldeditor.cjs.map +1 -1
  47. package/dist/sldeditor.js +17898 -16937
  48. package/dist/sldeditor.js.map +1 -1
  49. package/dist/store/series.d.ts +65 -0
  50. package/dist/store/series.d.ts.map +1 -0
  51. package/dist/store/store.d.ts +29 -1
  52. package/dist/store/store.d.ts.map +1 -1
  53. package/dist/style.css +1 -1
  54. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYc,CAAC;AAEpC,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,QAAQ,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { LibraryEntry } from '../model/library';
2
+ import { DiagramFile, Element, ElementId } from '../model/types';
3
+ /** Auxiliary contacts: their tag is their operator's. */
4
+ export declare const AUX_CONTACT_KINDS: ReadonlySet<string>;
5
+ /** A contact the "add contact" action offers. */
6
+ export interface ContactOption {
7
+ kind: string;
8
+ /** Message key of its menu label. */
9
+ labelKey: 'contacts.no' | 'contacts.nc' | 'contacts.onDelayNo' | 'contacts.onDelayNc' | 'contacts.offDelayNo' | 'contacts.offDelayNc' | 'contacts.main';
10
+ }
11
+ /** A tag as compared: no leading "-", no surrounding space, upper case. */
12
+ export declare function normalizeTag(name: string | undefined): string;
13
+ /** Every element carrying `tag` — the pieces of one device. */
14
+ export declare function deviceMembers(diagram: DiagramFile, tag: string): Element[];
15
+ /**
16
+ * The device `el` is part of, when it is a piece of a device contacts can be
17
+ * added to: an operator (coil, timer, contactor) or a contact of one, with a
18
+ * tag. Null otherwise — an unnamed contact belongs to nothing yet.
19
+ */
20
+ export declare function contactDeviceOf(diagram: DiagramFile, el: Element): {
21
+ tag: string;
22
+ members: Element[];
23
+ } | null;
24
+ /**
25
+ * The contacts `add contact` offers for a device: make / break for every
26
+ * relay and contactor, the delayed ones as well when the device is a timer,
27
+ * and the 3-pole main contacts for a contactor (-KM) that has none drawn yet.
28
+ */
29
+ export declare function contactOptions(members: readonly Element[], tag: string): ContactOption[];
30
+ /** Sequence digits the device's contacts already use. */
31
+ export declare function usedSequences(diagram: DiagramFile, tag: string, exclude?: ElementId, library?: ReadonlyMap<string, LibraryEntry>): Set<number>;
32
+ /**
33
+ * Terminal numbers for a new `kind` contact of device `tag`: the library's
34
+ * own numbers when their sequence digit is still free on the device (the
35
+ * first make contact is 13-14, a timer's first delayed break 55-56), else the
36
+ * lowest free sequence digit with the contact's function digits — the second
37
+ * make contact of -KM1 is 23-24, then 33-34. Null for a symbol without
38
+ * auxiliary numbers (main contacts keep 1-2 / 3-4 / 5-6).
39
+ */
40
+ export declare function nextContactPins(diagram: DiagramFile, tag: string, kind: string, exclude?: ElementId, library?: ReadonlyMap<string, LibraryEntry>): Record<string, string> | null;
41
+ /**
42
+ * `pins` as the element's `pinLabels`: only the pins that differ from the
43
+ * library, other overrides kept; undefined when nothing is left.
44
+ */
45
+ export declare function pinLabelsWith(el: Pick<Element, 'kind' | 'pinLabels'>, pins: Record<string, string>, library?: ReadonlyMap<string, LibraryEntry>): Record<string, string> | undefined;
46
+ /**
47
+ * Renaming an auxiliary contact to the tag of an existing device ("-KM1")
48
+ * gives it the device's next free terminal numbers — unless the numbers it
49
+ * already has are free there, which they are for the first contact of a kind
50
+ * and for numbers the user typed on purpose. Returns the `pinLabels` to set
51
+ * (undefined clears them), or `null` to leave the pins alone.
52
+ */
53
+ export declare function pinLabelsOnRename(diagram: DiagramFile, id: ElementId, name: string | undefined, library?: ReadonlyMap<string, LibraryEntry>): Record<string, string> | undefined | null;
54
+ //# sourceMappingURL=contact-numbers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-numbers.d.ts","sourceRoot":"","sources":["../../src/lib/contact-numbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;A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