@grida/svg-editor 1.0.0-alpha.20 → 1.0.0-alpha.21
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/README.md +1 -1
- package/dist/{dom-CfYDV311.js → dom-CuK0LFUY.js} +342 -84
- package/dist/{dom-Dub-TMoN.mjs → dom-DHaTIObb.mjs} +342 -84
- package/dist/dom.js +1 -1
- package/dist/dom.mjs +1 -1
- package/dist/{editor-4U9LAZ6r.js → editor-BlByfVyF.js} +5 -4
- package/dist/{editor-B1GmFnS9.mjs → editor-CJ3ROm0G.mjs} +5 -4
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{model-DS5MxDrd.mjs → model-C6jCFK_p.mjs} +3 -4
- package/dist/{model-CzL6_zId.js → model-DVwjrVYp.js} +3 -4
- package/dist/presets.js +2 -2
- package/dist/presets.mjs +1 -1
- package/dist/react.js +2 -2
- package/dist/react.mjs +2 -2
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createSvgEditor } from "./editor-
|
|
2
|
-
import { i as TOOL_CURSOR, r as DEFAULT_STYLE, t as PathModel } from "./model-
|
|
1
|
+
import { t as createSvgEditor } from "./editor-CJ3ROm0G.mjs";
|
|
2
|
+
import { i as TOOL_CURSOR, r as DEFAULT_STYLE, t as PathModel } from "./model-C6jCFK_p.mjs";
|
|
3
3
|
export { DEFAULT_STYLE, PathModel, TOOL_CURSOR, createSvgEditor };
|
|
@@ -1629,14 +1629,13 @@ let group;
|
|
|
1629
1629
|
const siblings = doc.element_children_of(parent);
|
|
1630
1630
|
const sibling_index = /* @__PURE__ */ new Map();
|
|
1631
1631
|
for (let i = 0; i < siblings.length; i++) sibling_index.set(siblings[i], i);
|
|
1632
|
-
const indices =
|
|
1632
|
+
const indices = /* @__PURE__ */ new Set();
|
|
1633
1633
|
for (const id of ids) {
|
|
1634
1634
|
const i = sibling_index.get(id);
|
|
1635
1635
|
if (i === void 0) return null;
|
|
1636
|
-
indices.
|
|
1636
|
+
indices.add(i);
|
|
1637
1637
|
}
|
|
1638
|
-
const sorted = Array.from(
|
|
1639
|
-
for (let i = 1; i < sorted.length; i++) if (sorted[i] !== sorted[i - 1] + 1) return null;
|
|
1638
|
+
const sorted = Array.from(indices).sort((a, b) => a - b);
|
|
1640
1639
|
const children = sorted.map((i) => siblings[i]);
|
|
1641
1640
|
const last_index = sorted[sorted.length - 1];
|
|
1642
1641
|
const original_positions = /* @__PURE__ */ new Map();
|
|
@@ -1663,14 +1663,13 @@ let group;
|
|
|
1663
1663
|
const siblings = doc.element_children_of(parent);
|
|
1664
1664
|
const sibling_index = /* @__PURE__ */ new Map();
|
|
1665
1665
|
for (let i = 0; i < siblings.length; i++) sibling_index.set(siblings[i], i);
|
|
1666
|
-
const indices =
|
|
1666
|
+
const indices = /* @__PURE__ */ new Set();
|
|
1667
1667
|
for (const id of ids) {
|
|
1668
1668
|
const i = sibling_index.get(id);
|
|
1669
1669
|
if (i === void 0) return null;
|
|
1670
|
-
indices.
|
|
1670
|
+
indices.add(i);
|
|
1671
1671
|
}
|
|
1672
|
-
const sorted = Array.from(
|
|
1673
|
-
for (let i = 1; i < sorted.length; i++) if (sorted[i] !== sorted[i - 1] + 1) return null;
|
|
1672
|
+
const sorted = Array.from(indices).sort((a, b) => a - b);
|
|
1674
1673
|
const children = sorted.map((i) => siblings[i]);
|
|
1675
1674
|
const last_index = sorted[sorted.length - 1];
|
|
1676
1675
|
const original_positions = /* @__PURE__ */ new Map();
|
package/dist/presets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_model = require("./model-
|
|
3
|
-
const require_dom = require("./dom-
|
|
2
|
+
const require_model = require("./model-DVwjrVYp.js");
|
|
3
|
+
const require_dom = require("./dom-CuK0LFUY.js");
|
|
4
4
|
//#region src/presets/keynote.ts
|
|
5
5
|
var keynote_exports = /* @__PURE__ */ require_model.__exportAll({ attach: () => attach });
|
|
6
6
|
/**
|
package/dist/presets.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-D7D4PA-g.mjs";
|
|
2
|
-
import { t as attach_dom_surface } from "./dom-
|
|
2
|
+
import { t as attach_dom_surface } from "./dom-DHaTIObb.mjs";
|
|
3
3
|
//#region src/presets/keynote.ts
|
|
4
4
|
var keynote_exports = /* @__PURE__ */ __exportAll({ attach: () => attach });
|
|
5
5
|
/**
|
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_editor = require("./editor-
|
|
4
|
-
const require_dom = require("./dom-
|
|
3
|
+
const require_editor = require("./editor-BlByfVyF.js");
|
|
4
|
+
const require_dom = require("./dom-CuK0LFUY.js");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
//#region src/react.tsx
|
package/dist/react.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as createSvgEditor } from "./editor-
|
|
3
|
-
import { t as attach_dom_surface } from "./dom-
|
|
2
|
+
import { t as createSvgEditor } from "./editor-CJ3ROm0G.mjs";
|
|
3
|
+
import { t as attach_dom_surface } from "./dom-DHaTIObb.mjs";
|
|
4
4
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grida/svg-editor",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.21",
|
|
4
4
|
"description": "Headless SVG editor (experimental).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bezier",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"tag": "alpha"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@grida/history": "0.1.2",
|
|
62
|
-
"@grida/keybinding": "0.2.1",
|
|
63
|
-
"@grida/color": "0.1.0",
|
|
64
|
-
"@grida/hud": "0.2.2",
|
|
65
61
|
"@grida/cmath": "0.2.3",
|
|
66
|
-
"@grida/
|
|
62
|
+
"@grida/keybinding": "0.2.1",
|
|
63
|
+
"@grida/history": "0.1.2",
|
|
64
|
+
"@grida/hud": "0.2.3",
|
|
67
65
|
"@grida/vn": "0.1.0",
|
|
68
|
-
"@grida/
|
|
66
|
+
"@grida/svg": "0.2.0",
|
|
67
|
+
"@grida/text-editor": "0.1.2",
|
|
68
|
+
"@grida/color": "0.1.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/react": "^19",
|