@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/index.cjs CHANGED
@@ -8538,6 +8538,7 @@ function fitTextToNode(label, nodeWidth, nodeHeight) {
8538
8538
  if (camelLines.length <= maxLines && camelLines.every((l) => l.length <= maxCharsPerLine)) {
8539
8539
  return { lines: camelLines, fontSize };
8540
8540
  }
8541
+ if (fontSize > MIN_NODE_FONT_SIZE) continue;
8541
8542
  const hardLines = [];
8542
8543
  for (const line7 of camelLines) {
8543
8544
  if (line7.length <= maxCharsPerLine) {
@@ -16837,13 +16838,13 @@ function encodeDiagramUrl(dsl, options) {
16837
16838
  if (options?.viewState?.activeTagGroup) {
16838
16839
  hash += `&tag=${encodeURIComponent(options.viewState.activeTagGroup)}`;
16839
16840
  }
16840
- return { url: `${baseUrl}#${hash}` };
16841
+ return { url: `${baseUrl}?${hash}` };
16841
16842
  }
16842
16843
  function decodeDiagramUrl(hash) {
16843
16844
  const empty = { dsl: "", viewState: {} };
16844
16845
  if (!hash) return empty;
16845
16846
  let raw = hash;
16846
- if (raw.startsWith("#")) {
16847
+ if (raw.startsWith("#") || raw.startsWith("?")) {
16847
16848
  raw = raw.slice(1);
16848
16849
  }
16849
16850
  const parts = raw.split("&");