@markdy/core 1.4.3 → 1.4.4

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 CHANGED
@@ -4,13 +4,15 @@
4
4
  <a href="https://markdy.com/playground/"><img src="https://img.shields.io/badge/⚡_Live_Studio-markdy.com%2Fplayground-3b82f6?style=for-the-badge" alt="Live Studio" /></a>
5
5
  <a href="https://markdy.com/docs/"><img src="https://img.shields.io/badge/📖_Docs-Documentation-10b981?style=for-the-badge" alt="Documentation" /></a>
6
6
  <a href="https://marketplace.visualstudio.com/items?itemName=hoangyell.markdy-vscode"><img src="https://img.shields.io/badge/🔌_VS_Code-Extension-8b5cf6?style=for-the-badge" alt="VS Code Extension" /></a>
7
+ <a href="https://github.com/sponsors/HoangYell"><img src="https://img.shields.io/badge/💖_Sponsor-Support_Markdy-ea4aaa?style=for-the-badge" alt="Sponsor Markdy" /></a>
7
8
  </p>
8
9
 
9
10
  The zero-dependency parser, dynamic port multiplexer, and AST routing engine for [MarkdyScript](https://markdy.com/docs/) — a diagram-native DSL for animated architecture diagrams that AI agents generate reliably.
10
11
 
11
12
  > 🚀 **Try it live**: Test MarkdyScript in the browser at **[markdy.com/playground](https://markdy.com/playground/)**
12
13
  > 📚 **Documentation**: Complete syntax guide and examples at **[markdy.com/docs](https://markdy.com/docs/)**
13
- > 🌟 **Architecture Blueprints**: 30+ canonical production diagrams at **[markdy.com/examples](https://markdy.com/examples/)**
14
+ > 🌟 **Architecture Blueprints**: 30+ canonical production diagrams at **[markdy.com/examples](https://markdy.com/examples/)**
15
+ > 💼 **Enterprise & Commercial**: Free under MIT. To support development or request custom architecture blueprints, explore **[GitHub Sponsors](https://github.com/sponsors/HoangYell)**.
14
16
 
15
17
  ## Features
16
18
 
package/dist/index.js CHANGED
@@ -521,6 +521,7 @@ var FLAT = {
521
521
  next_beat: CONTROLS.next_beat,
522
522
  keyboard: INTERACTION.keyboard,
523
523
  shortcuts: INTERACTION.shortcuts,
524
+ fit: CONTROLS.fit,
524
525
  fitView: CONTROLS.fitView,
525
526
  fit_view: CONTROLS.fit_view,
526
527
  fitViewButton: CONTROLS.fitViewButton,
@@ -642,6 +643,7 @@ function resolvePlayer(config = {}, overrides = {}) {
642
643
  const chrome = config.chrome ?? {};
643
644
  const controlsAllowed = overrides.controls !== false;
644
645
  const hostControlDefault = overrides.controls === true;
646
+ const hasControlsConfig = config.controls !== void 0 || overrideControls !== void 0;
645
647
  const resolveControl = (value, fallback = hostControlDefault) => controlsAllowed && (value ?? fallback);
646
648
  const requestedControls = {
647
649
  play: resolveControl(configuredControls.play),
@@ -659,11 +661,13 @@ function resolvePlayer(config = {}, overrides = {}) {
659
661
  code: resolveControl(configuredControls.code, false),
660
662
  theme: resolveControl(configuredControls.theme, hostControlDefault)
661
663
  };
662
- const interactionOn = overrides.interactiveViewport !== false && (overrides.interactiveViewport === true || config.interaction !== void 0 || overrides.controls === true);
664
+ const hasExplicitInteraction = config.interaction !== void 0;
665
+ const fallbackGesture = overrides.interactiveViewport === true || overrides.controls === true;
666
+ const interactionOn = overrides.interactiveViewport === true || overrides.controls === true || overrides.interactiveViewport !== false && hasExplicitInteraction;
663
667
  const gestures = {
664
- zoom: interactionOn && (interaction.zoom ?? true),
665
- pan: interactionOn && (interaction.pan ?? true),
666
- doubleClickToReset: interactionOn && (interaction.doubleClickToReset ?? true)
668
+ zoom: interactionOn && (interaction.zoom ?? fallbackGesture),
669
+ pan: interactionOn && (interaction.pan ?? fallbackGesture),
670
+ doubleClickToReset: interactionOn && (interaction.doubleClickToReset ?? fallbackGesture)
667
671
  };
668
672
  const interactionEnabled = gestures.zoom || gestures.pan || gestures.doubleClickToReset;
669
673
  const configuredSpeeds = configuredControls.speeds?.length ? configuredControls.speeds : [0.25, 1];
@@ -692,7 +696,7 @@ function resolvePlayer(config = {}, overrides = {}) {
692
696
  interaction: {
693
697
  ...gestures,
694
698
  enabled: interactionEnabled,
695
- clickToPlay: overrides.clickToPlay ?? (interactionOn && (interaction.clickToPlay ?? true)),
699
+ clickToPlay: overrides.clickToPlay ?? (interaction.clickToPlay ?? true),
696
700
  keyboard: interactionOn && (interaction.keyboard ?? false)
697
701
  },
698
702
  chrome: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/core",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Diagram-native MarkdyScript parser and compiler (auto-layout, edge routing, cue scheduling) — zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",