ryugi-artifacts 1.41.0 → 1.42.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.
- package/dist/cli.cjs +1 -1
- package/dist/server.cjs +8 -2
- package/dist/viewer/ArtboardLayout-7_rmu60e.js +4 -0
- package/dist/viewer/{ArtifactList-Bdjp9Abx.css → ArtifactList-DuG7sJk0.css} +1 -1
- package/dist/viewer/{Canvas-DePSeScS.js → Canvas-13klENDh.js} +1 -1
- package/dist/viewer/{PreviewLayout-CY3SbVYw.js → PreviewLayout-C5OKA9J4.js} +2 -2
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/preview.html +2 -2
- package/dist/viewer/preview.js +1 -1
- package/dist/viewer/view-D0Odcpdb.js +1 -0
- package/dist/viewer-lib/{Canvas-BL1JoYEQ.js → Canvas-BdS1Xa5w.js} +8 -8
- package/dist/viewer-lib/core.js +1 -1
- package/dist/viewer-lib/{ids-8QtprMNq.js → ids-Crgtnwo0.js} +6 -5
- package/dist/viewer-lib/index.js +894 -752
- package/dist/viewer-lib/types/src/viewer/hooks/useHoverDwell.d.ts +20 -0
- package/dist/viewer-lib/types/src/viewer/hooks/useKeptBoards.d.ts +2 -0
- package/dist/viewer-lib/types/src/viewer/layouts/ArtboardView.d.ts +1 -0
- package/dist/viewer-lib/types/src/viewer/lib/board-tiers.d.ts +3 -2
- package/dist/viewer-lib/types/src/viewer/lib/hover-dwell.d.ts +18 -0
- package/dist/viewer-lib/types/src/viewer/lib/kept-boards.d.ts +7 -0
- package/dist/viewer-lib/types/src/viewer/lib/tier-controller.d.ts +3 -2
- package/package.json +1 -1
- package/dist/viewer/ArtboardLayout-DdBxrUb-.js +0 -4
- package/dist/viewer/view-CmbqrCLE.js +0 -1
- /package/dist/viewer/{ArtifactList-Cyg0EaSK.js → ArtifactList-CC5-1ZFP.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './Canvas-DpuVHV-Q.css';
|
|
2
2
|
import { n as e } from "./rolldown-runtime-5HNE8Q1r.js";
|
|
3
|
-
import { D as t, x as n } from "./ids-
|
|
3
|
+
import { D as t, x as n } from "./ids-Crgtnwo0.js";
|
|
4
4
|
import { d as r } from "./cloud-BA1xJLJk.js";
|
|
5
5
|
import { useEffect as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
|
|
6
6
|
import { Maximize2 as c, Repeat as l } from "lucide-react";
|
|
@@ -391,7 +391,7 @@ function O({ x: e, y: t, zoom: n, agent: r, title: i }) {
|
|
|
391
391
|
}
|
|
392
392
|
//#endregion
|
|
393
393
|
//#region src/viewer/components/Canvas.tsx
|
|
394
|
-
var k = /* @__PURE__ */ e({ Canvas: () =>
|
|
394
|
+
var k = /* @__PURE__ */ e({ Canvas: () => P });
|
|
395
395
|
function A(e) {
|
|
396
396
|
if (!e) return {
|
|
397
397
|
backgroundColor: "#fff6db",
|
|
@@ -410,8 +410,8 @@ function A(e) {
|
|
|
410
410
|
color: .2126 * n + .7152 * r + .0722 * i > .179 ? "#000" : "#fff"
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
var j = { visibility: "hidden" };
|
|
414
|
-
function
|
|
413
|
+
var j = { visibility: "hidden" }, M = { opacity: 0 };
|
|
414
|
+
function N({ image: e, showImage: t, hideFrame: n, frame: r, onError: a }) {
|
|
415
415
|
let [c, l] = s(null), [u, m] = s(!1), [h, g] = s(!1), _ = o(t);
|
|
416
416
|
i(() => {
|
|
417
417
|
if (!t || !c) {
|
|
@@ -443,7 +443,7 @@ function M({ image: e, showImage: t, hideFrame: n, frame: r, onError: a }) {
|
|
|
443
443
|
className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1lliihq x47corl"
|
|
444
444
|
}, t))] });
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function P({ view: e, renders: r, boards: i, notes: a, contentBase: o, versions: s, pending: c, playing: l, replays: u, inspecting: m, frameRef: v, frameLoaded: y, live: b, writing: x, agent: S, onExpand: w, onImageError: T }) {
|
|
447
447
|
let E = x;
|
|
448
448
|
if (b) {
|
|
449
449
|
E = void 0;
|
|
@@ -484,7 +484,7 @@ function N({ view: e, renders: r, boards: i, notes: a, contentBase: o, versions:
|
|
|
484
484
|
src: _(o, i.file, s[i.file] ?? 0, 0),
|
|
485
485
|
zoom: e.k,
|
|
486
486
|
onExpand: w && (() => w(n))
|
|
487
|
-
}) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(
|
|
487
|
+
}) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(N, {
|
|
488
488
|
image: D,
|
|
489
489
|
showImage: !E || !!b?.overlay,
|
|
490
490
|
hideFrame: !!b?.hidden,
|
|
@@ -492,7 +492,7 @@ function N({ view: e, renders: r, boards: i, notes: a, contentBase: o, versions:
|
|
|
492
492
|
frame: E ? (e) => /* @__PURE__ */ f("iframe", {
|
|
493
493
|
ref: v(n),
|
|
494
494
|
onLoad: () => y(n),
|
|
495
|
-
style: e ?
|
|
495
|
+
style: e ? M : void 0,
|
|
496
496
|
title: i.title ?? n,
|
|
497
497
|
src: _(o, i.file, s[i.file] ?? 0, u[n] ?? 0),
|
|
498
498
|
sandbox: "allow-scripts",
|
|
@@ -544,4 +544,4 @@ function N({ view: e, renders: r, boards: i, notes: a, contentBase: o, versions:
|
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
546
|
//#endregion
|
|
547
|
-
export { h as a, S as i, k as n, g as o, C as r, m as s,
|
|
547
|
+
export { h as a, S as i, k as n, g as o, C as r, m as s, P as t };
|
package/dist/viewer-lib/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './stylex-Bp5PFQ3Y.css';
|
|
2
|
-
import { D as e, E as t, T as n, a as r, i, n as a, o, r as s, t as c } from "./ids-
|
|
2
|
+
import { D as e, E as t, T as n, a as r, i, n as a, o, r as s, t as c } from "./ids-Crgtnwo0.js";
|
|
3
3
|
import { a as l, c as u, d, f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S } from "./cloud-BA1xJLJk.js";
|
|
4
4
|
export { n as ARTIFACT_TYPES, t as BOARD_TYPES, f as HTML_LANG, r as PreviewView, b as Trans, o as ViewerProvider, s as cloudErrorDetails, u as createViewerI18n, m as i18n, c as isArtifactId, a as isArtifactType, e as isMediaBoard, x as isVisibility, g as ownLink, v as parseAcceptLanguage, y as publishState, p as publishing, l as readPublication, h as resolveLocale, _ as syncNote, S as t, i as useSystemTheme, d as useTranslation };
|
|
@@ -154,16 +154,17 @@ var A = (e, t, n) => ({
|
|
|
154
154
|
bottom: r + e.h * t.k
|
|
155
155
|
};
|
|
156
156
|
}, I = ({ left: e, top: t, right: n, bottom: r }, i) => Math.max(0, Math.min(n, i.width) - Math.max(e, 0)) * Math.max(0, Math.min(r, i.height) - Math.max(t, 0));
|
|
157
|
-
function L({ boards: e, view: t, viewport: n, pinned: r, snapshots: i }) {
|
|
158
|
-
let
|
|
157
|
+
function L({ boards: e, view: t, viewport: n, pinned: r, snapshots: i, hovered: a }) {
|
|
158
|
+
let o = e.map((e) => {
|
|
159
159
|
let r = F(e, t), { left: i, top: a, right: o, bottom: s } = r, c = I(r, n), l = Math.hypot(Math.max(0, -o, i - n.width), Math.max(0, -s, a - n.height));
|
|
160
160
|
return {
|
|
161
161
|
id: e.id,
|
|
162
162
|
area: c,
|
|
163
|
+
mostlyVisible: c * 2 > Math.min((o - i) * (s - a), n.width * n.height),
|
|
163
164
|
distance: l
|
|
164
165
|
};
|
|
165
|
-
}), o = t.k >= .4 ?
|
|
166
|
-
return new Map(
|
|
166
|
+
}), s = a && !r.has(a) && o.some((e) => e.id === a) ? [a] : [], c = t.k >= .4 ? o.filter((e) => e.mostlyVisible && !r.has(e.id) && e.id !== a).sort((e, t) => t.area - e.area).map((e) => e.id) : [], l = new Set([...s, ...c].slice(0, 8));
|
|
167
|
+
return new Map(o.map(({ id: e, distance: t }) => r.has(e) || l.has(e) ? [e, "live"] : t > n.width ? [e, "empty"] : [e, i.has(e) ? "snapshot" : "placeholder"]));
|
|
167
168
|
}
|
|
168
169
|
function R({ boards: e, view: t, viewport: n }) {
|
|
169
170
|
return new Map(e.map((e) => {
|
|
@@ -192,7 +193,7 @@ function V({ pageWindow: e, children: t }) {
|
|
|
192
193
|
children: t
|
|
193
194
|
});
|
|
194
195
|
}
|
|
195
|
-
var H = () => o(B) ?? window, U = a(() => import("./shims.js").then(() => import("./SnapshotDocument-De-tiDPI.js").then((e) => e.n))), W = a(() => import("./Canvas-
|
|
196
|
+
var H = () => o(B) ?? window, U = a(() => import("./shims.js").then(() => import("./SnapshotDocument-De-tiDPI.js").then((e) => e.n))), W = a(() => import("./Canvas-BdS1Xa5w.js").then((e) => e.n).then(({ Canvas: e }) => ({ default: e }))), G = () => () => {}, K = () => {}, q = /* @__PURE__ */ new Set();
|
|
196
197
|
function J({ type: t, id: n, data: i, failed: a }) {
|
|
197
198
|
let { t: o } = e(), [u, d] = c(() => ({
|
|
198
199
|
width: innerWidth,
|