@newtil/drawing 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/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 newlecture
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # @newtil/drawing
2
+
3
+ 캡처 위에 화살표·상자·글자를 그리는 그림판. 프레임워크 없음, 순수 DOM, 자기 shadow root 에 뜬다. 결과는 **PNG(독자용) + 데이터 JSON(재편집용)**.
4
+
5
+ ```ts
6
+ import { openDrawing } from "@newtil/drawing";
7
+
8
+ const r = await openDrawing({ background: file }); // { data, png } | null(취소)
9
+ const r2 = await openDrawing({ initial: r.data }); // 도형 살아 있는 채로 다시 고치기
10
+ ```
11
+
12
+ - `save(png, data)` 를 주면 완료 때 팝업 안에서 호출한다. 던지면 팝업은 열린 채 이유를 보인다.
13
+ - 데이터는 자기 완결적(배경도 data URL)이라 어디에 두든 다시 열린다.
14
+
15
+ ## 개발
16
+ ```
17
+ npm install
18
+ npm run dev # 데모 페이지
19
+ npm run build
20
+ npm run test:e2e
21
+ ```