ryugi-artifacts 1.40.0 → 1.41.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 +1 -1
- package/dist/viewer/ArtboardLayout-DdBxrUb-.js +4 -0
- package/dist/viewer/{Canvas-CvaP3Qdq.js → Canvas-DePSeScS.js} +1 -1
- package/dist/viewer/{PreviewLayout-D9BqcBqC.js → PreviewLayout-CY3SbVYw.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-CmbqrCLE.js +1 -0
- package/dist/viewer-lib/{Canvas-BBqpPRdY.js → Canvas-BL1JoYEQ.js} +1 -1
- package/dist/viewer-lib/core.js +2 -2
- package/dist/viewer-lib/{ids-DDz78ZZ5.js → ids-8QtprMNq.js} +27 -21
- package/dist/viewer-lib/index.js +1084 -1064
- package/dist/viewer-lib/types/src/viewer/lib/board-tiers.d.ts +4 -0
- package/dist/viewer-lib/types/src/viewer/lib/tier-controller.d.ts +2 -0
- package/package.json +1 -1
- package/dist/viewer/ArtboardLayout-5NH9K2-f.js +0 -4
- package/dist/viewer/view-BL5bZDxq.js +0 -1
|
@@ -153,19 +153,19 @@ var A = (e, t, n) => ({
|
|
|
153
153
|
right: n + e.w * t.k,
|
|
154
154
|
bottom: r + e.h * t.k
|
|
155
155
|
};
|
|
156
|
-
};
|
|
157
|
-
function
|
|
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
158
|
let a = e.map((e) => {
|
|
159
|
-
let { left:
|
|
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
|
-
area:
|
|
163
|
-
distance:
|
|
162
|
+
area: c,
|
|
163
|
+
distance: l
|
|
164
164
|
};
|
|
165
165
|
}), o = t.k >= .4 ? new Set(a.filter((e) => e.area > 0).sort((e, t) => t.area - e.area).slice(0, 4).map((e) => e.id)) : /* @__PURE__ */ new Set();
|
|
166
166
|
return new Map(a.map(({ id: e, distance: t }) => r.has(e) || o.has(e) ? [e, "live"] : t > n.width ? [e, "empty"] : [e, i.has(e) ? "snapshot" : "placeholder"]));
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function R({ boards: e, view: t, viewport: n }) {
|
|
169
169
|
return new Map(e.map((e) => {
|
|
170
170
|
let { left: r, top: i, right: a, bottom: o } = F(e, t), s = a >= -240 && o >= -240 && r <= n.width + N && i <= n.height + N;
|
|
171
171
|
return [e.id, {
|
|
@@ -177,17 +177,23 @@ function L({ boards: e, view: t, viewport: n }) {
|
|
|
177
177
|
}];
|
|
178
178
|
}));
|
|
179
179
|
}
|
|
180
|
+
function z({ boards: e, view: t, viewport: n, snapshots: r, skip: i }) {
|
|
181
|
+
return e.filter((e) => !r.has(e.id) && !i.has(e.id) && e.w * t.k >= 120).map((e) => ({
|
|
182
|
+
id: e.id,
|
|
183
|
+
area: I(F(e, t), n)
|
|
184
|
+
})).filter((e) => e.area > 0).sort((e, t) => t.area - e.area).map((e) => e.id);
|
|
185
|
+
}
|
|
180
186
|
//#endregion
|
|
181
187
|
//#region src/viewer/ViewerContext.tsx
|
|
182
|
-
var
|
|
183
|
-
function
|
|
184
|
-
return /* @__PURE__ */ l(
|
|
188
|
+
var B = i(null);
|
|
189
|
+
function V({ pageWindow: e, children: t }) {
|
|
190
|
+
return /* @__PURE__ */ l(B.Provider, {
|
|
185
191
|
value: e ?? null,
|
|
186
192
|
children: t
|
|
187
193
|
});
|
|
188
194
|
}
|
|
189
|
-
var
|
|
190
|
-
function
|
|
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-BL1JoYEQ.js").then((e) => e.n).then(({ Canvas: e }) => ({ default: e }))), G = () => () => {}, K = () => {}, q = /* @__PURE__ */ new Set();
|
|
196
|
+
function J({ type: t, id: n, data: i, failed: a }) {
|
|
191
197
|
let { t: o } = e(), [u, d] = c(() => ({
|
|
192
198
|
width: innerWidth,
|
|
193
199
|
height: innerHeight
|
|
@@ -216,7 +222,7 @@ function K({ type: t, id: n, data: i, failed: a }) {
|
|
|
216
222
|
resetKey: i.state,
|
|
217
223
|
children: /* @__PURE__ */ l(r, {
|
|
218
224
|
fallback: f(o("preview.loading")),
|
|
219
|
-
children: /* @__PURE__ */ l(
|
|
225
|
+
children: /* @__PURE__ */ l(U, {
|
|
220
226
|
id: n,
|
|
221
227
|
state: i.state,
|
|
222
228
|
contentBase: i.contentBase
|
|
@@ -237,9 +243,9 @@ function K({ type: t, id: n, data: i, failed: a }) {
|
|
|
237
243
|
resetKey: p,
|
|
238
244
|
children: /* @__PURE__ */ l(r, {
|
|
239
245
|
fallback: f(o("preview.loading")),
|
|
240
|
-
children: /* @__PURE__ */ l(
|
|
246
|
+
children: /* @__PURE__ */ l(W, {
|
|
241
247
|
view: g,
|
|
242
|
-
renders:
|
|
248
|
+
renders: R({
|
|
243
249
|
boards: _.map(([e, t]) => ({
|
|
244
250
|
id: e,
|
|
245
251
|
...t
|
|
@@ -252,11 +258,11 @@ function K({ type: t, id: n, data: i, failed: a }) {
|
|
|
252
258
|
contentBase: i.contentBase,
|
|
253
259
|
versions: i.versions ?? {},
|
|
254
260
|
pending: new Set(i.pending),
|
|
255
|
-
playing:
|
|
261
|
+
playing: q,
|
|
256
262
|
replays: {},
|
|
257
263
|
inspecting: !1,
|
|
258
|
-
frameRef:
|
|
259
|
-
frameLoaded:
|
|
264
|
+
frameRef: G,
|
|
265
|
+
frameLoaded: K
|
|
260
266
|
})
|
|
261
267
|
})
|
|
262
268
|
})
|
|
@@ -264,7 +270,7 @@ function K({ type: t, id: n, data: i, failed: a }) {
|
|
|
264
270
|
}
|
|
265
271
|
//#endregion
|
|
266
272
|
//#region src/viewer/hooks/useSystemTheme.ts
|
|
267
|
-
function
|
|
273
|
+
function Y() {
|
|
268
274
|
s(() => {
|
|
269
275
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => u({ appearance: e.matches ? "dark" : "light" });
|
|
270
276
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
@@ -272,7 +278,7 @@ function q() {
|
|
|
272
278
|
}
|
|
273
279
|
//#endregion
|
|
274
280
|
//#region src/shared/cloud-error.ts
|
|
275
|
-
function
|
|
281
|
+
function X(e) {
|
|
276
282
|
if (!e || typeof e != "object") return {};
|
|
277
283
|
let t = e, n = {};
|
|
278
284
|
if (typeof t.code == "string" && (n.code = t.code), (t.plan === "free" || t.plan === "pro") && (n.plan = t.plan), typeof t.upgradeUrl == "string" && (n.upgradeUrl = t.upgradeUrl), t.limit && typeof t.limit == "object") {
|
|
@@ -287,6 +293,6 @@ function J(e) {
|
|
|
287
293
|
}
|
|
288
294
|
//#endregion
|
|
289
295
|
//#region src/shared/ids.ts
|
|
290
|
-
var
|
|
296
|
+
var Z = /^[a-z0-9][a-z0-9-]*$/, Q = (e) => Z.test(e), $ = (e) => d.includes(e);
|
|
291
297
|
//#endregion
|
|
292
|
-
export {
|
|
298
|
+
export { y as C, p as D, f as E, A as S, d as T, C as _, J as a, S as b, z as c, R as d, j as f, v as g, k as h, Y as i, L as l, w as m, $ as n, V as o, T as p, X as r, H as s, Q as t, P as u, D as v, x as w, O as x, b as y };
|