@diagrammo/dgmo 0.2.23 → 0.2.25
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/cli.cjs +73 -73
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/initiative-status/renderer.ts +4 -1
- package/src/sharing.ts +6 -5
package/dist/index.d.cts
CHANGED
|
@@ -1537,9 +1537,10 @@ type EncodeDiagramUrlResult = {
|
|
|
1537
1537
|
*/
|
|
1538
1538
|
declare function encodeDiagramUrl(dsl: string, options?: EncodeDiagramUrlOptions): EncodeDiagramUrlResult;
|
|
1539
1539
|
/**
|
|
1540
|
-
* Decode a DGMO DSL string and view state from a URL hash.
|
|
1540
|
+
* Decode a DGMO DSL string and view state from a URL query string or hash.
|
|
1541
1541
|
* Accepts any of:
|
|
1542
|
-
* -
|
|
1542
|
+
* - `?dgmo=<payload>&tag=<name>`
|
|
1543
|
+
* - `#dgmo=<payload>&tag=<name>` (backwards compat)
|
|
1543
1544
|
* - `dgmo=<payload>`
|
|
1544
1545
|
* - `<bare payload>`
|
|
1545
1546
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1537,9 +1537,10 @@ type EncodeDiagramUrlResult = {
|
|
|
1537
1537
|
*/
|
|
1538
1538
|
declare function encodeDiagramUrl(dsl: string, options?: EncodeDiagramUrlOptions): EncodeDiagramUrlResult;
|
|
1539
1539
|
/**
|
|
1540
|
-
* Decode a DGMO DSL string and view state from a URL hash.
|
|
1540
|
+
* Decode a DGMO DSL string and view state from a URL query string or hash.
|
|
1541
1541
|
* Accepts any of:
|
|
1542
|
-
* -
|
|
1542
|
+
* - `?dgmo=<payload>&tag=<name>`
|
|
1543
|
+
* - `#dgmo=<payload>&tag=<name>` (backwards compat)
|
|
1543
1544
|
* - `dgmo=<payload>`
|
|
1544
1545
|
* - `<bare payload>`
|
|
1545
1546
|
*
|
package/dist/index.js
CHANGED
|
@@ -8518,6 +8518,7 @@ function fitTextToNode(label, nodeWidth, nodeHeight) {
|
|
|
8518
8518
|
if (camelLines.length <= maxLines && camelLines.every((l) => l.length <= maxCharsPerLine)) {
|
|
8519
8519
|
return { lines: camelLines, fontSize };
|
|
8520
8520
|
}
|
|
8521
|
+
if (fontSize > MIN_NODE_FONT_SIZE) continue;
|
|
8521
8522
|
const hardLines = [];
|
|
8522
8523
|
for (const line7 of camelLines) {
|
|
8523
8524
|
if (line7.length <= maxCharsPerLine) {
|
|
@@ -16700,13 +16701,13 @@ function encodeDiagramUrl(dsl, options) {
|
|
|
16700
16701
|
if (options?.viewState?.activeTagGroup) {
|
|
16701
16702
|
hash += `&tag=${encodeURIComponent(options.viewState.activeTagGroup)}`;
|
|
16702
16703
|
}
|
|
16703
|
-
return { url: `${baseUrl}
|
|
16704
|
+
return { url: `${baseUrl}?${hash}` };
|
|
16704
16705
|
}
|
|
16705
16706
|
function decodeDiagramUrl(hash) {
|
|
16706
16707
|
const empty = { dsl: "", viewState: {} };
|
|
16707
16708
|
if (!hash) return empty;
|
|
16708
16709
|
let raw = hash;
|
|
16709
|
-
if (raw.startsWith("#")) {
|
|
16710
|
+
if (raw.startsWith("#") || raw.startsWith("?")) {
|
|
16710
16711
|
raw = raw.slice(1);
|
|
16711
16712
|
}
|
|
16712
16713
|
const parts = raw.split("&");
|