# 회로도 편집기 — 개발자용 라이브러리

diagram-editor 기반 전기 회로도: 참조 기호와 값이 있는 부품, 네트, 버스, 전원, ERC, 부품 목록, GOST·ISO 도면 틀, SPICE·KiCad 넷리스트, KiCad 가져오기·내보내기, 시뮬레이션.

## 설치

```sh
npm install @openlibsdev/schematic-editor
```

```js
import SchematicEditor from "https://cdn.jsdelivr.net/npm/@openlibsdev/schematic-editor@1.0.0/+esm";
```

## 사용법

```js
import SchematicEditor from "@openlibsdev/schematic-editor";

const p = SchematicEditor.createProject(), d = p.pages[0].diagram;
const r = SchematicEditor.addComponent(p, d, "elResistor", 40, 40);   // r.ref === "R1"
SchematicEditor.renumber(p, "gost");
console.log(SchematicEditor.nets(p).nets.length);   // nets with their pins
console.log(SchematicEditor.erc(p));                 // [{ level, code, page, ids, ... }]
const spice = SchematicEditor.spiceNetlist(p);
```

## API

### `SchematicEditor.createProject()`

회로도 프로젝트를 만듭니다.

### `SchematicEditor.addComponent(x, d, type, px, py, props)`

다음 참조 기호와 기본값으로 부품을 추가합니다.

### `SchematicEditor.addEdge(d, from, to, props)`

핀을 배선으로 연결합니다.

### `SchematicEditor.renumber(x, style)`

위치에 따라 참조 기호를 다시 매깁니다(GOST 또는 IEC 방식).

### `SchematicEditor.nets(x)`

회로도의 전기 네트: {nets: [{name, pins, wires, labels, power}], byEdge, byPin}.

### `SchematicEditor.erc(x)`

전기 규칙 검사: 문제 목록.

### `SchematicEditor.bomGrouped(x)`

값별로 묶은 부품 목록.

### `SchematicEditor.pe3Rows(x, opts)`

GOST 부품 목록(PE3)의 행.

### `SchematicEditor.spiceNetlist(x, opts)`

SPICE 넷리스트.

### `SchematicEditor.kicadNetlist(x, opts)`

KiCad 넷리스트.

### `SchematicEditor.kicadSchematic(x, opts)`

KiCad .kicad_sch 형식의 회로도.

### `SchematicEditor.kicadImport(input, opts)`

KiCad 회로도를 엽니다.

### `SchematicEditor.simNetlist(x, analysis)`

내장 시뮬레이터용 넷리스트.

### `SchematicEditor.logicModel(x)`

논리 시뮬레이션용 모델.

### `SchematicEditor.toSVG(d, opts)`

SVG로 된 회로도.

### `SchematicEditor.toBlob(d, format, opts)`

파일로 된 회로도.

### `SchematicEditor.serialize(x)`

프로젝트 → JSON.

### `SchematicEditor.parse(data)`

JSON → 프로젝트.

### `SchematicEditor.PARTS`

부품 라이브러리.

### `SchematicEditor.ALIGNS`

텍스트 정렬: 왼쪽, 가운데, 오른쪽.

### `SchematicEditor.APP`

라이브러리의 이름, 버전, 출시일: {name, version, created}.

### `SchematicEditor.ARROWS`

선 끝 모양: 화살표, 삼각형, 마름모, 원, ER의 까마귀 발.

### `SchematicEditor.BAND`

컨테이너 제목 띠의 높이(픽셀).

### `SchematicEditor.DASHES`

선 스타일: 실선, 파선, 점선(대시 패턴으로).

### `SchematicEditor.DEFAULT_VALUES`

새 부품의 종류별 초깃값(10 kΩ, 100 nF, …).

### `SchematicEditor.DOTS`

선의 연결점 모드: 자동, 켜기, 끄기.

### `SchematicEditor.EDGE_DEFAULTS`

새 선의 기본 속성: 끝 모양, 종류, 화살표, 색, 두께, 스타일, 텍스트.

### `SchematicEditor.FIELDS`

부품의 표준 필드: Footprint, Datasheet, Manufacturer, MPN(부품 목록과 KiCad 넷리스트에 들어감).

### `SchematicEditor.FORMATS`

내보내기 형식과 그 MIME 유형.

### `SchematicEditor.FRAMES`

도면 틀: 없음, GOST, ISO.

### `SchematicEditor.GATES`

논리 시뮬레이션용 논리 게이트와 부품, 그 기능과 핀.

### `SchematicEditor.IMAGE_LIMIT`

다이어그램에 보관하는 가장 큰 그림(data URL의 바이트 수, 3 MB).

### `SchematicEditor.KICAD`

부품 종류별 KiCad 라이브러리 기호와 핀 순서(KiCad 넷리스트와 회로도용).

### `SchematicEditor.LABELS`

네트 라벨 종류: 로컬(자기 페이지의 전선을 연결)과 글로벌(모든 페이지).

### `SchematicEditor.LINE_KINDS`

선 종류: 직선, 꺾은선(직각), 곡선.

### `SchematicEditor.MIN_SIZE`

도형의 최소 너비와 높이(픽셀).

### `SchematicEditor.MM`

도면 용지의 밀리미터당 픽셀 수(4).

### `SchematicEditor.NODE_DEFAULTS`

새 도형의 기본 속성: 텍스트, 채우기, 불투명도, 테두리, 글꼴, 정렬.

### `SchematicEditor.PAGE_DEFAULTS`

페이지 기본 설정: 배경, 투명도, 격자, 맞춤, 격자 크기, 여백, 연결점.

### `SchematicEditor.PIN_SIDES`

직접 만든 기호의 핀이 놓일 수 있는 변: 왼쪽, 오른쪽, 위, 아래.

### `SchematicEditor.PIN_TYPES`

핀의 전기적 종류: 수동, 입력, 출력, 양방향, 전원 입력, 전원 출력, 연결 안 됨.

### `SchematicEditor.POWER`

전원 기호와 각각이 주는 네트 이름: VCC, VDD, GND, GNDA, Earth.

### `SchematicEditor.PREFIX`

IEC와 GOST 스타일에서 부품 종류별 참조 번호 접두사(R, C, VD, …).

### `SchematicEditor.SHAPES`

도형 유형.

### `SchematicEditor.SHAPE_SETS`

편집기가 제공하는 세트별 기호: 전기, 논리, 계측기, 네트(라벨, 전원, 접지), 부품, 직접 만든 기호.

### `SchematicEditor.SHEETS`

용지 크기(밀리미터): A4, A3, A2, A1.

### `SchematicEditor.SIDES`

선이 붙을 수 있는 변: 자동, 위, 오른쪽, 아래, 왼쪽.

### `SchematicEditor.SIM_MODELS`

시뮬레이터 표준 부품의 SPICE 모델(다이오드, 트랜지스터, 연산 증폭기, LM317).

### `SchematicEditor.SOURCE_TYPES`

시뮬레이션에서 전원이 되는 부품 종류: 배터리, 직류, 교류, 전류원, 함수 발생기.

### `SchematicEditor.SPICE`

부품 종류별 SPICE 소자 문자, 핀 순서, 모델.

### `SchematicEditor.STYLES`

참조 번호 스타일: iec, gost.

### `SchematicEditor.TB_FIELDS`

표제란 필드: 제목, 문서 이름과 번호, 기관, 서명, 날짜, 축척, …

### `SchematicEditor.TEMPLATES`

기성 회로: 스위치 달린 LED, 트랜지스터 스위치, 반가산기, 증폭기, 전원 장치, RC 필터, 멀티바이브레이터, 정류기, 래치, 릴레이 드라이버, ATtiny 깜빡이 등.

### `SchematicEditor.addBend(d, e, x, y)`

선이 점 가까이 지나는 곳에 꺾임을 추가하고 그 인덱스를, 없으면 -1을 반환합니다.

### `SchematicEditor.addNode(d, type, x, y, props)`

지정한 점에 도형을 추가합니다.

### `SchematicEditor.addPowerUnit(x, d, n)`

다중 유닛 부품의 전원 유닛이 아직 배치되지 않았으면 노드 옆에 배치하고 그것을 반환합니다.

### `SchematicEditor.addSymbol(x, def)`

직접 만든 기호의 정의를 프로젝트에 추가하고 그 종류를 반환합니다.

### `SchematicEditor.align(d, ids, how)`

항목을 정렬합니다.

### `SchematicEditor.anchor(n, side)`

도형 윤곽의 한 변 가운데 점(회전 반영).

### `SchematicEditor.assignRef(x, n, style)`

부품에 참조 번호를 붙입니다(값이 없으면 기본값도).

### `SchematicEditor.bounds(d, ids)`

지정한 항목(또는 전체)을 둘러싼 상자. 빈 다이어그램이면 null.

### `SchematicEditor.busMembers(name)`

버스 이름이 나타내는 신호: "D[0..7]" → D0…D7, "{SDA SCL}" → SDA, SCL. 버스 이름이 아니면 null.

### `SchematicEditor.buses(x)`

프로젝트의 버스: [{page, edge, name, members, used}].

### `SchematicEditor.clone(d)`

다이어그램의 깊은 복사본.

### `SchematicEditor.components(x)`

프로젝트의 부품. 참조 번호당 한 줄, 정렬됨(R1, R2, R10).

### `SchematicEditor.contents(d, c)`

컨테이너 안에 있는 도형.

### `SchematicEditor.createDiagram()`

빈 다이어그램을 만듭니다.

### `SchematicEditor.cssFont(it)`

항목의 CSS 글꼴 문자열(스타일, 굵기, 크기, 패밀리).

### `SchematicEditor.decorationBox(d)`

setDecorations로 설정한 페이지 장식(예: 도면 틀)의 상자, 또는 null.

### `SchematicEditor.dipPins(n)`

DIP 패키지의 핀: 1…n/2는 왼쪽을 따라 아래로, 나머지는 오른쪽을 따라 위로.

### `SchematicEditor.distToSegment(p, a, b)`

점에서 선분까지의 거리.

### `SchematicEditor.distribute(d, ids, axis)`

항목을 균등하게 배치합니다.

### `SchematicEditor.drawPrimitives(ctx, prims)`

canvas 2D 컨텍스트에 프리미티브(primitives()의 결과)를 그립니다.

### `SchematicEditor.duplicate(d, ids, dx, dy)`

항목을 복사해 (dx, dy)만큼 옮겨 붙여 넣고 새 id를 반환합니다.

### `SchematicEditor.edgeAt(d, x, y, tol)`

점 가까이 지나는 맨 위의 선, 또는 null.

### `SchematicEditor.edgeEnds(d, e)`

선이 실제로 끝나는 위치: [시작, 끝]. 각각 점, 변, 핀, 비어 있는지 여부를 가집니다.

### `SchematicEditor.electricShape(W, H, o)`

크기와 그림(선, 핀, 라벨 위치)으로 전기 기호 도형을 만듭니다(registerShape용).

### `SchematicEditor.exportBox(d, ids)`

내보낼 영역: 지정한 항목과 바깥 라벨, 또는 장식을 포함한 다이어그램 전체.

### `SchematicEditor.extract(d, ids)`

다이어그램의 일부(도형과 그 사이의 선)를 다른 곳에 삽입할 조각으로 복사합니다.

### `SchematicEditor.fieldColumns(x)`

부품 목록의 열: 표준 필드, 그다음 사용 중인 직접 만든 필드 이름.

### `SchematicEditor.find(d, id)`

id로 찾은 도형 또는 선.

### `SchematicEditor.findEdge(d, id)`

id로 찾은 선, 또는 null.

### `SchematicEditor.findNamedColor(text, lang)`

지정한 언어의 색 이름으로 이름 있는 색을 찾습니다(“진한 파랑” → #00008b).

### `SchematicEditor.findNode(d, id)`

id로 찾은 도형, 또는 null.

### `SchematicEditor.fitToSheet(x)`

각 페이지의 그림이 틀의 작업 영역에 들어가지 않으면 안으로 옮기고, 옮긴 페이지 수를 반환합니다.

### `SchematicEditor.footprintsFor(type)`

부품 종류에 추천하는 KiCad 풋프린트.

### `SchematicEditor.gateFn(fn, ins)`

입력 값 0, 1, X(알 수 없음), Z(구동 없음)에 대한 논리 함수의 출력.

### `SchematicEditor.genWave(value)`

함수 발생기 값("sine 1 V 1 kHz", "pulse 5 V 10 kHz 20%" 또는 SPICE 파형) → {spice, wave, amp, freq}.

### `SchematicEditor.group(d, ids)`

항목을 그룹으로 묶습니다.

### `SchematicEditor.insert(d, part, dx, dy)`

extract로 만든 조각을 (dx, dy)만큼 옮겨 삽입합니다. 그룹은 새 이름을 받습니다. 새 id를 반환합니다.

### `SchematicEditor.isClosed(n)`

스위치나 접점이 닫혀 있는지 여부.

### `SchematicEditor.isComponent(n)`

노드가 전선, 라벨, 그림이 아니라 부품(참조 번호 있음)인지 여부.

### `SchematicEditor.itemsInRect(d, box)`

사각형 안에 완전히 들어가는 도형과 선의 id.

### `SchematicEditor.junctions(d)`

연결점을 그리는 위치(T자 연결과 세 개 이상의 전선이 교차하는 곳).

### `SchematicEditor.labelName(n)`

라벨이나 전원 기호의 네트 이름.

### `SchematicEditor.labelPlace(n)`

기호 바깥 라벨의 위치: 아래, 위 또는 오른쪽.

### `SchematicEditor.labelText(n)`

기호 라벨의 텍스트: 참조 번호, 값, 텍스트를 한 줄씩.

### `SchematicEditor.layoutTree(d, opts)`

도형을 트리 형태로 배치합니다.

### `SchematicEditor.like(type)`

부품 종류를 그리고 시뮬레이션할 때 쓰는 표준 종류.

### `SchematicEditor.listNamedColors(lang)`

이름 있는 색을 지정한 언어의 이름과 함께 나열합니다.

### `SchematicEditor.loadFonts(d)`

다이어그램이 쓰는 모든 패밀리의 글꼴 파일을 불러와, 그리기와 측정에 실제 글꼴을 쓰게 합니다.

### `SchematicEditor.loadImages(d)`

그리기 전에 다이어그램의 모든 그림을 불러옵니다.

### `SchematicEditor.logicSettle(model, st)`

특정 시점에서 논리 회로를 안정시킵니다. 아무것도 바뀌지 않을 때까지 단계를 진행하며, 플립플롭은 클록의 상승 에지에서 전환됩니다.

### `SchematicEditor.logicState(model, prev)`

논리 시뮬레이션의 상태: 출력, 클록, 시간(이전 상태에서 이어감).

### `SchematicEditor.markup(d, opts)`

바깥 <svg> 없이 SVG 요소로 나타낸 다이어그램(직접 만든 SVG에 넣는 용도).

### `SchematicEditor.move(d, ids, dx, dy)`

항목을 이동합니다.

### `SchematicEditor.moveSegment(d, e, k, dx, dy)`

그려진 선의 한 구간을 (dx, dy)만큼 옮깁니다.

### `SchematicEditor.namedColorTexts(lang)`

지정한 언어의 색상 필드 라벨(색 선택기의 텍스트). 해당 언어가 없으면 영어.

### `SchematicEditor.nearestPin(n, x, y, toward)`

점에 가장 가까운 도형 핀의 인덱스, 또는 -1.

### `SchematicEditor.nextLabel(x)`

새 네트 라벨의 이름: NET1, NET2, …(프로젝트에서 아직 쓰지 않은 첫 이름).

### `SchematicEditor.nextRef(x, prefix)`

프로젝트 전체에서 접두사에 대한 다음 빈 참조 번호: R1, R2, …

### `SchematicEditor.nodeAt(d, x, y, pad)`

점 아래의 맨 위 도형(컨테이너는 제목 띠와 테두리에서만).

### `SchematicEditor.normalize(d)`

임의의 객체 → 유효한 다이어그램: 알 수 없는 값은 기본값으로, id는 고유하게, 끊어진 선은 제거.

### `SchematicEditor.normalizeProject(p)`

임의의 객체 → 페이지가 있는 유효한 프로젝트.

### `SchematicEditor.normalizeSymbol(def)`

직접 만든 기호의 정의를 확인하고 빠진 부분을 채웁니다.

### `SchematicEditor.order(d, ids, how)`

도형을 그리는 순서를 바꿉니다: 맨 앞으로, 맨 뒤로, 앞으로, 뒤로.

### `SchematicEditor.orthoThrough(a, sa, vias, b, sb)`

한 점에서 중간 점들을 거쳐 다른 점으로 가는 직각 꺾은선. 지정한 변을 따라 나가고 들어옵니다.

### `SchematicEditor.parseAny(data)`

파일에서 읽은 프로젝트: 우리 형식(JSON) 또는 KiCad 형식(.kicad_sch).

### `SchematicEditor.pe3Sheets(x, opts)`

틀이 있는 A4 용지에 배치한 GOST 부품 목록표(PE3).

### `SchematicEditor.pinType(type, i)`

부품 종류의 핀이 가진 전기적 종류.

### `SchematicEditor.pins(n)`

보이는 그대로의 도형 핀(전기 및 논리 기호): [{x, y, side}].

### `SchematicEditor.placeAt(x, d, type, p)`

기호의 첫 핀을 한 점에 놓습니다(전선 위의 라벨은 연결점으로 전선을 나눕니다).

### `SchematicEditor.powerVolts(name)`

전원 네트 이름이 나타내는 전압: "+5 V" → 5, "3V3" → 3.3. VCC, VDD 등은 null.

### `SchematicEditor.primitives(d, opts)`

그리기 프리미티브(경로, 텍스트, 그림) 목록으로 나타낸 다이어그램. canvas나 SVG에 바로 쓸 수 있습니다.

### `SchematicEditor.projectSymbols(x)`

프로젝트에 정의된 직접 만든 기호의 종류.

### `SchematicEditor.readFiles(files, opts)`

선택한 파일에서 읽은 프로젝트: 우리 .json, KiCad .kicad_sch(시트 포함) 또는 이들의 .zip.

### `SchematicEditor.readSim(result, built)`

시뮬레이터 결과 → 네트 전압과 부품 전류(AC 해석은 dB와 도 단위).

### `SchematicEditor.refPrefix(type, style)`

스타일(IEC 또는 GOST)에서 부품 종류의 참조 번호 접두사.

### `SchematicEditor.refreshCustomSet(x)`

프로젝트로부터 편집기의 "직접 만든 기호" 세트를 갱신합니다.

### `SchematicEditor.refreshRefs(x, d, ids)`

붙여 넣거나 복제한 부품에 다음 빈 참조 번호를 붙입니다.

### `SchematicEditor.registerShape(type, shape)`

도형 유형을 추가합니다.

### `SchematicEditor.remove(d, ids)`

항목을 삭제합니다.

### `SchematicEditor.removeBend(e, i)`

인덱스로 지정한 선의 꺾임을 제거합니다.

### `SchematicEditor.removeSymbol(x, type)`

쓰이지 않는 직접 만든 기호의 정의를 제거하고, 제거했는지 여부를 반환합니다.

### `SchematicEditor.resetBends(e)`

선의 수동 꺾임을 모두 제거합니다(자동 배선으로 돌아감).

### `SchematicEditor.rotate(d, ids, dir)`

도형을 각자의 중심을 기준으로 4분의 1 바퀴 회전합니다(1: 시계 방향, -1: 반시계 방향).

### `SchematicEditor.route(d, e)`

커넥터 경로를 다시 계산합니다.

### `SchematicEditor.scalePath(d, sx, sy)`

SVG 경로 데이터(M L H V Q C A Z)를 sx와 sy로 크기 조정합니다.

### `SchematicEditor.setCornerJoins(on)`

전선 모서리의 연결점을 켜거나 끕니다.

### `SchematicEditor.setDecorations(fn)`

페이지 장식(예: 도면 틀과 표제란)을 그리는 함수를 설정합니다.

### `SchematicEditor.setFieldAll(x, type, value, name, text)`

한 종류(와 값)의 모든 부품에 필드를 설정하고 바뀐 개수를 반환합니다.

### `SchematicEditor.setProjectHook(fn)`

열리는 모든 프로젝트마다 호출되는 함수를 설정합니다(데이터 이전이나 보완용).

### `SchematicEditor.setRefText(fn)`

라벨의 참조 번호 형식을 정하는 함수를 설정합니다.

### `SchematicEditor.setSheetProject(x, labels)`

도면 틀과 표제란을 그릴 때 쓰는 프로젝트와 양식 텍스트를 설정합니다.

### `SchematicEditor.setStyle(x, style)`

프로젝트 전체의 참조 번호 스타일을 설정합니다: IEC 또는 GOST.

### `SchematicEditor.setUnit(x, n, unit)`

노드를 그 패키지의 다른 유닛으로 바꿉니다. 원래 그 자리에 있던 유닛이 자리를 바꿉니다.

### `SchematicEditor.sheetBox(sh)`

용지의 상자(픽셀)와 밀리미터 단위 크기.

### `SchematicEditor.sheetInner(sh)`

용지의 안쪽 틀(밀리미터).

### `SchematicEditor.sheetOf(x)`

프로젝트의 용지 설정: 크기, 방향, 틀, 표제란 필드.

### `SchematicEditor.sheetPlan(box)`

다이어그램을 실제 크기의 A4 용지로 나누는 방식: 방향, 열, 행, 타일 크기.

### `SchematicEditor.sheetSize(sh)`

용지 크기(밀리미터)와 방향.

### `SchematicEditor.sheetWorkArea(sh, first)`

용지에서 그림이 놓일 수 있는 곳: 표제란을 뺀 틀.

### `SchematicEditor.siblings(x, n)`

노드 패키지에서 이미 배치된 다른 유닛.

### `SchematicEditor.simErrors(info, errors)`

시뮬레이터가 보고하는 문제(수렴, 특이 행렬, …)를 편집기가 설명하는 코드로.

### `SchematicEditor.snap(d, v)`

맞춤이 켜져 있으면 좌표를 격자에 맞춰 반올림합니다.

### `SchematicEditor.spiceNumber(t)`

SPICE 표기나 단위가 붙은 숫자("10m", "1 MHz", "4.7k") → {text, value}, 또는 null.

### `SchematicEditor.spiceValue(v)`

부품 값 → SPICE 표기: "10 kΩ" → "10k", "1 MΩ" → "1Meg".

### `SchematicEditor.splitWire(d, edgeId, x, y)`

전선을 한 점에서 연결점으로 나눕니다. 연결점 도형 또는 null을 반환합니다.

### `SchematicEditor.styleOf(x)`

프로젝트의 참조 번호 스타일: "iec" 또는 "gost".

### `SchematicEditor.symbolGeometry(d)`

직접 만든 기호 정의의 그림: 몸체, 핀, 리드선.

### `SchematicEditor.symbolName(type)`

기호 종류의 이름, 또는 null.

### `SchematicEditor.symbolOf(type)`

기호 종류의 정의, 또는 null.

### `SchematicEditor.symbolPreview(def)`

미리보기용 직접 만든 기호 정의의 SVG 그림.

### `SchematicEditor.symbolUses(x, type)`

기호 종류가 프로젝트에 배치된 횟수.

### `SchematicEditor.template(name, texts, style)`

템플릿 이름으로 고르는 기성 회로(직접 넣은 텍스트 포함, IEC 또는 GOST 스타일).

### `SchematicEditor.textBox(n)`

도형의 텍스트가 놓이는 상자와 그 줄, 정렬.

### `SchematicEditor.textFontData`

텍스트와 글꼴 블록의 데이터: 글꼴 목록, 스타일 불러오기, 글꼴 파일 추가, 언어별 블록 라벨, 기본값.

### `SchematicEditor.toCanvas(d, opts)`

<canvas>로 된 다이어그램.

### `SchematicEditor.ungroup(d, ids)`

지정한 항목의 그룹을 해제하고 그룹에서 빠진 도형 수를 반환합니다.

### `SchematicEditor.unitOf(n)`

다중 유닛 부품 노드의 유닛: {base, unit, units, multi}, 또는 null.

### `SchematicEditor.unitRef(n, style)`

유닛을 포함한 참조 번호: U1A(IEC) 또는 DD1.1(GOST).

### `SchematicEditor.unitTag(type, style)`

유닛이 참조 번호에 덧붙이는 것: "A"(IEC) 또는 ".1"(GOST).

### `SchematicEditor.unitsOf(x, n, style)`

편집기용 노드 패키지의 유닛: 어떤 것이 배치되었는지, 같은 종류인지, 전원 유닛이 배치되었는지.

### `SchematicEditor.updateSymbol(x, type, def)`

직접 만든 기호의 정의를 바꿉니다. 배치된 모든 사본이 새 그림을 따릅니다.

### `SchematicEditor.visualBox(n)`

도형이 그림에서 차지하는 모든 것: 상자와 바깥 라벨.

### `SchematicEditor.wirePoint(d, x, y, tol, except)`

주어진 거리 안에서 가장 가까운 전선 위의 점, 또는 null(놓은 전선 끝이 여기에 붙습니다).

### `SchematicEditor.withContents(d, ids)`

id와 그중 각 컨테이너의 내용.

### `SchematicEditor.withGroups(d, ids)`

id와 그 그룹의 다른 구성원.

### `SchematicEditor.wrapText(text, it, maxWidth)`

텍스트를 지정한 너비보다 넓지 않은 줄로 나눕니다(단어는 나누지 않음).

## 의존성

- @imagemagick/magick-wasm 0.0.35 (Apache-2.0)
- @imagemagick/magick-wasm 0.0.35 (Apache-2.0)
- @simonwep/pickr 1.10.2 (MIT)
- @simonwep/pickr 1.10.2 (MIT)
- chart.js 4.4.1 (MIT)
- dejavu-fonts-ttf 2.37.3 (Bitstream Vera Fonts License (free, redistributable); DejaVu changes are public domain)
- eecircuit-engine 1.9.0 (MIT)
- imagetracerjs 1.2.6 (Unlicense)
- jspdf 2.5.2 (MIT)
- jszip 3.10.1 ((MIT OR GPL-3.0-or-later))

- GitHub: https://github.com/OpenLibsDev/schematic-editor
- npm: https://www.npmjs.com/package/@openlibsdev/schematic-editor
- 앱 열기: https://openlibs.dev/ko/app/schematic-editor/
