@markdy/core 1.4.15 → 1.4.16

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 +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -614,8 +614,11 @@ function resolvePlayer(config = {}, overrides = {}) {
614
614
  const chrome = config.chrome ?? {};
615
615
  const controlsAllowed = overrides.controls !== false;
616
616
  const hostControlDefault = overrides.controls === true;
617
- const hasControlsConfig = config.controls !== void 0 || overrideControls !== void 0;
618
- const resolveControl = (value, fallback = hostControlDefault) => controlsAllowed && (value ?? fallback);
617
+ const controlsExplicitlyDeclared = Boolean(
618
+ config.controls && Object.keys(config.controls).length > 0 || overrideControls && Object.keys(overrideControls).length > 0
619
+ );
620
+ const unconfiguredFallback = controlsExplicitlyDeclared ? false : hostControlDefault;
621
+ const resolveControl = (value, fallback = unconfiguredFallback) => controlsAllowed && (value ?? fallback);
619
622
  const requestedControls = {
620
623
  seek: resolveControl(configuredControls.seek, false),
621
624
  speed: resolveControl(configuredControls.speed),
@@ -626,7 +629,7 @@ function resolvePlayer(config = {}, overrides = {}) {
626
629
  gif: resolveControl(configuredControls.gif),
627
630
  share: resolveControl(configuredControls.share),
628
631
  code: resolveControl(configuredControls.code, false),
629
- theme: resolveControl(configuredControls.theme, hostControlDefault)
632
+ theme: resolveControl(configuredControls.theme)
630
633
  };
631
634
  const hasExplicitInteraction = config.interaction !== void 0;
632
635
  const fallbackGesture = overrides.interactiveViewport === true || overrides.controls === true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/core",
3
- "version": "1.4.15",
3
+ "version": "1.4.16",
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",