@markdy/renderer-dom 1.4.24 → 1.5.0

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.
Files changed (2) hide show
  1. package/dist/index.js +65 -19
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -3817,10 +3817,10 @@ function ensureSceneStyles(doc) {
3817
3817
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
3818
3818
  }
3819
3819
  .markdy-controls {
3820
- display: flex;
3820
+ display: inline-flex;
3821
3821
  align-items: center;
3822
- justify-content: space-between;
3823
- flex: 1 1 auto;
3822
+ justify-content: flex-start;
3823
+ flex: 0 1 auto;
3824
3824
  width: auto;
3825
3825
  min-width: 0;
3826
3826
  gap: 6px;
@@ -3845,7 +3845,7 @@ function ensureSceneStyles(doc) {
3845
3845
  align-items: center;
3846
3846
  gap: 4px;
3847
3847
  flex-shrink: 0;
3848
- margin-left: auto;
3848
+ margin-left: 0;
3849
3849
  }
3850
3850
  .markdy-control-divider {
3851
3851
  width: 1px;
@@ -3928,22 +3928,35 @@ function ensureSceneStyles(doc) {
3928
3928
  .markdy-badge {
3929
3929
  display: inline-flex;
3930
3930
  align-items: center;
3931
+ gap: 4px;
3931
3932
  text-align: right;
3932
3933
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
3933
- font-size: 10px;
3934
- font-weight: 500;
3935
- color: #94a3b8;
3934
+ font-size: 11px;
3935
+ line-height: 1;
3936
+ color: #64748b;
3936
3937
  text-decoration: none;
3937
- padding: 0;
3938
- opacity: 0.6;
3938
+ padding: 3px 6px;
3939
+ border-radius: 5px;
3940
+ opacity: 0.75;
3939
3941
  margin-left: auto;
3940
3942
  flex-shrink: 0;
3941
- transition: opacity 0.15s ease, color 0.15s ease;
3943
+ transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
3942
3944
  white-space: nowrap;
3943
3945
  }
3944
3946
  .markdy-badge:hover {
3945
3947
  opacity: 1;
3946
- color: #475569;
3948
+ color: #1e293b;
3949
+ background-color: rgba(148, 163, 184, 0.12);
3950
+ }
3951
+ .markdy-badge-prefix {
3952
+ font-weight: 400;
3953
+ letter-spacing: 0.02em;
3954
+ opacity: 0.85;
3955
+ }
3956
+ .markdy-badge-brand {
3957
+ font-weight: 600;
3958
+ letter-spacing: 0.03em;
3959
+ color: #334155;
3947
3960
  }
3948
3961
  @media (max-width: 640px) {
3949
3962
  .markdy-btn-label {
@@ -4375,9 +4388,36 @@ function ensureSceneStyles(doc) {
4375
4388
  .markdy-footer a {
4376
4389
  transition: opacity 0.15s ease, color 0.15s ease;
4377
4390
  }
4378
- .markdy-footer a:hover {
4379
- opacity: 1 !important;
4380
- color: #94a3b8 !important;
4391
+ [data-markdy-theme="midnight"] .markdy-badge,
4392
+ [data-markdy-theme="blueprint"] .markdy-badge,
4393
+ [data-markdy-theme="terminal"] .markdy-badge,
4394
+ [data-markdy-theme="graphite"] .markdy-badge,
4395
+ [data-markdy-theme="nebula"] .markdy-badge,
4396
+ :root[data-theme="dark"] .markdy-badge,
4397
+ .theme-dark .markdy-badge,
4398
+ .dark .markdy-badge {
4399
+ color: #94a3b8;
4400
+ }
4401
+ [data-markdy-theme="midnight"] .markdy-badge:hover,
4402
+ [data-markdy-theme="blueprint"] .markdy-badge:hover,
4403
+ [data-markdy-theme="terminal"] .markdy-badge:hover,
4404
+ [data-markdy-theme="graphite"] .markdy-badge:hover,
4405
+ [data-markdy-theme="nebula"] .markdy-badge:hover,
4406
+ :root[data-theme="dark"] .markdy-badge:hover,
4407
+ .theme-dark .markdy-badge:hover,
4408
+ .dark .markdy-badge:hover {
4409
+ color: #f1f5f9 !important;
4410
+ background-color: rgba(255, 255, 255, 0.08);
4411
+ }
4412
+ [data-markdy-theme="midnight"] .markdy-badge-brand,
4413
+ [data-markdy-theme="blueprint"] .markdy-badge-brand,
4414
+ [data-markdy-theme="terminal"] .markdy-badge-brand,
4415
+ [data-markdy-theme="graphite"] .markdy-badge-brand,
4416
+ [data-markdy-theme="nebula"] .markdy-badge-brand,
4417
+ :root[data-theme="dark"] .markdy-badge-brand,
4418
+ .theme-dark .markdy-badge-brand,
4419
+ .dark .markdy-badge-brand {
4420
+ color: #f8fafc;
4381
4421
  }
4382
4422
  /* Fullscreen & Fallback Pseudo-Fullscreen Views */
4383
4423
  .markdy-fullscreen-host,
@@ -6825,9 +6865,14 @@ function createDiagram(opts) {
6825
6865
  badge.rel = "noopener noreferrer";
6826
6866
  const badgePrefix = document.createElement("span");
6827
6867
  badgePrefix.className = "markdy-badge-prefix";
6828
- badgePrefix.textContent = "Powered by ";
6868
+ badgePrefix.textContent = "Powered by";
6829
6869
  badge.appendChild(badgePrefix);
6830
- badge.appendChild(document.createTextNode("Markdy"));
6870
+ const space = document.createTextNode(" ");
6871
+ badge.appendChild(space);
6872
+ const badgeBrand = document.createElement("span");
6873
+ badgeBrand.className = "markdy-badge-brand";
6874
+ badgeBrand.textContent = "Markdy";
6875
+ badge.appendChild(badgeBrand);
6831
6876
  ensureFooter().appendChild(badge);
6832
6877
  const badgeLink = badge;
6833
6878
  void compressMarkdyToUrlHash(code).then((hash) => {
@@ -7290,8 +7335,9 @@ function createDiagram(opts) {
7290
7335
  cameraLayer.style.setProperty("transform", "none", "important");
7291
7336
  }
7292
7337
  const hasAuthorInteraction = Boolean(plan.meta.player?.interaction?.pan) || Boolean(plan.meta.player?.interaction?.zoom) || Boolean(plan.meta.player?.interaction?.enabled);
7338
+ const hasInteractControl = showControls && (interactButton ?? fitViewButton) !== false && (Boolean(interactButton) || Boolean(fitViewButton));
7293
7339
  const explicitInteract = defaultInteract ?? explicitInteractOption;
7294
- let interactActive = explicitInteract !== void 0 ? Boolean(explicitInteract) : hasAuthorInteraction || Boolean(explicitInteractiveViewport);
7340
+ let interactActive = explicitInteract !== void 0 ? Boolean(explicitInteract) : hasInteractControl ? false : hasAuthorInteraction || Boolean(explicitInteractiveViewport);
7295
7341
  const ICONS2 = {
7296
7342
  play: '<svg class="markdy-icon" width="12" height="12" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>',
7297
7343
  pause: '<svg class="markdy-icon" width="12" height="12" viewBox="0 0 24 24" fill="currentColor"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/></svg>',
@@ -8543,10 +8589,10 @@ function createDiagram(opts) {
8543
8589
  toolbar.setAttribute("aria-label", "Diagram controls");
8544
8590
  Object.assign(toolbar.style, {
8545
8591
  position: "relative",
8546
- display: "flex",
8592
+ display: "inline-flex",
8547
8593
  alignItems: "center",
8548
8594
  justifyContent: "flex-start",
8549
- width: "100%",
8595
+ width: "auto",
8550
8596
  maxWidth: "100%",
8551
8597
  border: "0",
8552
8598
  borderRadius: "0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/renderer-dom",
3
- "version": "1.4.24",
3
+ "version": "1.5.0",
4
4
  "description": "Browser renderer for diagram-native animated MarkdyScript architecture diagrams, built on the Web Animations API.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,15 +45,15 @@
45
45
  "registry": "https://registry.npmjs.org"
46
46
  },
47
47
  "dependencies": {
48
- "@markdy/core": "^1.4.24",
49
- "html2canvas": "^1.4.1"
48
+ "html2canvas": "^1.4.1",
49
+ "@markdy/core": "1.5.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@markdy/stdlib-systems": "^1.4.21",
53
52
  "jsdom": "^29.1.1",
54
53
  "tsup": "^8.5.1",
55
54
  "typescript": "^5.9.3",
56
- "vitest": "^4.1.7"
55
+ "vitest": "^4.1.7",
56
+ "@markdy/stdlib-systems": "1.5.0"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "tsup",