@markdy/renderer-dom 0.1.0 → 0.1.1

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 +17 -8
  2. package/package.json +9 -5
package/dist/index.js CHANGED
@@ -234,6 +234,7 @@ function createActorEl(name, def, assetDefs, assetOverrides) {
234
234
  const assetDef = assetDefs[assetName];
235
235
  if (assetDef?.type === "icon") {
236
236
  const span = document.createElement("span");
237
+ span.className = "iconify";
237
238
  span.style.display = "inline-block";
238
239
  span.style.fontSize = `${def.size ?? 32}px`;
239
240
  span.style.lineHeight = "1";
@@ -245,6 +246,9 @@ function createActorEl(name, def, assetDefs, assetOverrides) {
245
246
  img.src = assetOverrides[assetName] ?? assetDef?.value ?? "";
246
247
  img.alt = assetName;
247
248
  img.style.display = "block";
249
+ img.style.maxWidth = "100%";
250
+ img.style.maxHeight = "200px";
251
+ img.style.objectFit = "contain";
248
252
  img.setAttribute("draggable", "false");
249
253
  el = img;
250
254
  }
@@ -530,20 +534,24 @@ function buildAction(ev, el, s, baseOpts, delayMs, durMs, ast, states, scene, as
530
534
  bubble.style.opacity = "0";
531
535
  Object.assign(bubble.style, {
532
536
  position: "absolute",
533
- bottom: "calc(100% + 8px)",
537
+ bottom: "calc(100% + 10px)",
534
538
  left: "50%",
535
539
  transform: `translateX(-50%) scale(${inverseScale})`,
536
540
  transformOrigin: "center bottom",
537
541
  background: "white",
538
542
  border: "2px solid #222",
539
- borderRadius: "10px",
540
- padding: "4px 10px",
541
- fontFamily: "sans-serif",
542
- fontSize: "14px",
543
+ borderRadius: "12px",
544
+ padding: "6px 14px",
545
+ fontFamily: "system-ui, sans-serif",
546
+ fontSize: "15px",
547
+ lineHeight: "1.3",
543
548
  whiteSpace: "nowrap",
549
+ maxWidth: "220px",
550
+ overflow: "hidden",
551
+ textOverflow: "ellipsis",
544
552
  pointerEvents: "none",
545
553
  zIndex: "10",
546
- boxShadow: "0 2px 6px rgba(0,0,0,0.15)"
554
+ boxShadow: "0 2px 8px rgba(0,0,0,0.12)"
547
555
  });
548
556
  const tail = document.createElement("span");
549
557
  Object.assign(tail.style, {
@@ -553,8 +561,8 @@ function buildAction(ev, el, s, baseOpts, delayMs, durMs, ast, states, scene, as
553
561
  transform: "translateX(-50%)",
554
562
  width: "0",
555
563
  height: "0",
556
- borderLeft: "6px solid transparent",
557
- borderRight: "6px solid transparent",
564
+ borderLeft: "7px solid transparent",
565
+ borderRight: "7px solid transparent",
558
566
  borderTop: "10px solid #222"
559
567
  });
560
568
  bubble.appendChild(tail);
@@ -593,6 +601,7 @@ function buildAction(ev, el, s, baseOpts, delayMs, durMs, ast, states, scene, as
593
601
  projectile = img;
594
602
  } else {
595
603
  const span = document.createElement("span");
604
+ span.className = "iconify";
596
605
  span.dataset.icon = assetDef.value;
597
606
  span.style.fontSize = "32px";
598
607
  span.style.lineHeight = "1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/renderer-dom",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Web Animations API renderer for MarkdyScript scenes.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,7 +23,11 @@
23
23
  "animation",
24
24
  "web-animations-api",
25
25
  "renderer",
26
- "dom"
26
+ "dom",
27
+ "declarative-animation",
28
+ "motion",
29
+ "framer-motion-alternative",
30
+ "gsap-alternative"
27
31
  ],
28
32
  "author": "Hoang Yell <hoangyell@gmail.com> (https://hoangyell.com)",
29
33
  "homepage": "https://markdy.com",
@@ -39,11 +43,11 @@
39
43
  "access": "public"
40
44
  },
41
45
  "dependencies": {
42
- "@markdy/core": "0.1.0"
46
+ "@markdy/core": "0.1.1"
43
47
  },
44
48
  "devDependencies": {
45
- "tsup": "^8.3.0",
46
- "typescript": "^5.4.0"
49
+ "tsup": "^8.5.1",
50
+ "typescript": "^5.9.3"
47
51
  },
48
52
  "scripts": {
49
53
  "build": "tsup",