@diagrammo/dgmo 0.8.12 → 0.8.13
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 +115 -719
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/docs/guide/chart-arc.md +71 -0
- package/docs/guide/chart-area.md +73 -0
- package/docs/guide/chart-bar-stacked.md +61 -0
- package/docs/guide/chart-bar.md +62 -0
- package/docs/guide/chart-boxes-and-lines.md +243 -0
- package/docs/guide/chart-c4.md +300 -0
- package/docs/guide/chart-chord.md +43 -0
- package/docs/guide/chart-class.md +204 -0
- package/docs/guide/chart-doughnut.md +38 -0
- package/docs/guide/chart-er.md +218 -0
- package/docs/guide/chart-flowchart.md +102 -0
- package/docs/guide/chart-function.md +56 -0
- package/docs/guide/chart-funnel.md +38 -0
- package/docs/guide/chart-gantt.md +368 -0
- package/docs/guide/chart-heatmap.md +41 -0
- package/docs/guide/chart-infra.md +694 -0
- package/docs/guide/chart-kanban.md +156 -0
- package/docs/guide/chart-line.md +79 -0
- package/docs/guide/chart-multi-line.md +84 -0
- package/docs/guide/chart-org.md +209 -0
- package/docs/guide/chart-pie.md +39 -0
- package/docs/guide/chart-polar-area.md +38 -0
- package/docs/guide/chart-quadrant.md +69 -0
- package/docs/guide/chart-radar.md +38 -0
- package/docs/guide/chart-sankey.md +103 -0
- package/docs/guide/chart-scatter.md +94 -0
- package/docs/guide/chart-sequence.md +332 -0
- package/docs/guide/chart-sitemap.md +248 -0
- package/docs/guide/chart-slope.md +56 -0
- package/docs/guide/chart-state.md +171 -0
- package/docs/guide/chart-timeline.md +229 -0
- package/docs/guide/chart-venn.md +81 -0
- package/docs/guide/chart-wordcloud.md +66 -0
- package/docs/guide/colors.md +283 -0
- package/docs/guide/index.md +55 -0
- package/docs/guide/keyboard-shortcuts.md +49 -0
- package/docs/guide/registry.json +51 -0
- package/gallery/fixtures/boxes-and-lines.dgmo +4 -6
- package/package.json +1 -1
- package/src/sharing.ts +3 -4
package/dist/index.js
CHANGED
|
@@ -31238,10 +31238,8 @@ init_colors();
|
|
|
31238
31238
|
init_palettes();
|
|
31239
31239
|
|
|
31240
31240
|
// src/sharing.ts
|
|
31241
|
-
import
|
|
31242
|
-
|
|
31243
|
-
decompressFromEncodedURIComponent
|
|
31244
|
-
} from "lz-string";
|
|
31241
|
+
import lzString from "lz-string";
|
|
31242
|
+
var { compressToEncodedURIComponent, decompressFromEncodedURIComponent } = lzString;
|
|
31245
31243
|
var DEFAULT_BASE_URL = "https://online.diagrammo.app";
|
|
31246
31244
|
var COMPRESSED_SIZE_LIMIT = 8192;
|
|
31247
31245
|
function encodeDiagramUrl(dsl, options) {
|
|
@@ -31249,7 +31247,11 @@ function encodeDiagramUrl(dsl, options) {
|
|
|
31249
31247
|
const compressed = compressToEncodedURIComponent(dsl);
|
|
31250
31248
|
const byteSize = new TextEncoder().encode(compressed).byteLength;
|
|
31251
31249
|
if (byteSize > COMPRESSED_SIZE_LIMIT) {
|
|
31252
|
-
return {
|
|
31250
|
+
return {
|
|
31251
|
+
error: "too-large",
|
|
31252
|
+
compressedSize: byteSize,
|
|
31253
|
+
limit: COMPRESSED_SIZE_LIMIT
|
|
31254
|
+
};
|
|
31253
31255
|
}
|
|
31254
31256
|
let hash = `dgmo=${compressed}`;
|
|
31255
31257
|
if (options?.viewState?.activeTagGroup) {
|
|
@@ -31300,7 +31302,8 @@ function decodeDiagramUrl(hash) {
|
|
|
31300
31302
|
viewState.collapsedLanes = val.split(",").filter(Boolean);
|
|
31301
31303
|
}
|
|
31302
31304
|
if (key === "pal" && val) viewState.palette = val;
|
|
31303
|
-
if (key === "th" && (val === "light" || val === "dark"))
|
|
31305
|
+
if (key === "th" && (val === "light" || val === "dark"))
|
|
31306
|
+
viewState.theme = val;
|
|
31304
31307
|
}
|
|
31305
31308
|
if (payload.startsWith("dgmo=")) {
|
|
31306
31309
|
payload = payload.slice(5);
|