@grida/svg-editor 1.0.0-alpha.1

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/dist/dom.d.mts ADDED
@@ -0,0 +1,16 @@
1
+ import { a as SurfaceHandle, o as SvgEditor } from "./editor-JY7AQrR1.mjs";
2
+
3
+ //#region src/dom.d.ts
4
+ type DomSurfaceOptions = {
5
+ /** Mount the SVG inside this container. */container: HTMLElement;
6
+ };
7
+ /**
8
+ * Attach a DOM surface to a headless editor. Returns a `SurfaceHandle` whose
9
+ * `detach()` is the inverse — DOM cleared, listeners removed.
10
+ *
11
+ * Usage is one-shot per container: the surface owns the container's children
12
+ * for its lifetime, and `detach()` restores it to empty.
13
+ */
14
+ declare function attach_dom_surface(editor: SvgEditor, options: DomSurfaceOptions): SurfaceHandle;
15
+ //#endregion
16
+ export { DomSurfaceOptions, attach_dom_surface };
package/dist/dom.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { a as SurfaceHandle, o as SvgEditor } from "./editor-CTtU2gu4.js";
2
+
3
+ //#region src/dom.d.ts
4
+ type DomSurfaceOptions = {
5
+ /** Mount the SVG inside this container. */container: HTMLElement;
6
+ };
7
+ /**
8
+ * Attach a DOM surface to a headless editor. Returns a `SurfaceHandle` whose
9
+ * `detach()` is the inverse — DOM cleared, listeners removed.
10
+ *
11
+ * Usage is one-shot per container: the surface owns the container's children
12
+ * for its lifetime, and `detach()` restores it to empty.
13
+ */
14
+ declare function attach_dom_surface(editor: SvgEditor, options: DomSurfaceOptions): SurfaceHandle;
15
+ //#endregion
16
+ export { DomSurfaceOptions, attach_dom_surface };
package/dist/dom.js ADDED
@@ -0,0 +1,3 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_dom = require("./dom-CfP_ZURh.js");
3
+ exports.attach_dom_surface = require_dom.attach_dom_surface;
package/dist/dom.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { t as attach_dom_surface } from "./dom-kA8NDuVh.mjs";
2
+ export { attach_dom_surface };