@realsee/dnalogel 3.7.0 → 3.8.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/PanoTagPlugin/controller/TagRender.d.ts +4 -1
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +1 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +10 -8
- package/dist/index.umd.js +3 -3
- package/libs/PanoTagPlugin/Components/TagItem.js +56 -56
- package/libs/PanoTagPlugin/controller/TagRender.d.ts +4 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +4 -2
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +1 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SvelteComponent as
|
|
2
|
-
import
|
|
1
|
+
import { SvelteComponent as O, init as Q, safe_not_equal as U, append_styles as W, empty as X, insert as P, transition_in as h, transition_out as k, check_outros as L, detach as N, getContext as Y, element as C, space as Z, attr as _, null_to_empty as z, set_style as A, toggle_class as b, append as B, group_outros as q, noop as v, create_component as H, mount_component as J, destroy_component as K } from "../../vendor/svelte/internal/index.js";
|
|
2
|
+
import x from "./Tag/index.js";
|
|
3
3
|
import "three";
|
|
4
|
-
import { noTypecheck as
|
|
5
|
-
import
|
|
6
|
-
import { classnames as
|
|
4
|
+
import { noTypecheck as E } from "../utils/noTypecheck.js";
|
|
5
|
+
import $ from "./Common/TagPoint.js";
|
|
6
|
+
import { classnames as F } from "../../vendor/classnames/index.js";
|
|
7
7
|
import "./Tag/TextTag/index.js";
|
|
8
8
|
import "./Tag/TextTag/TextTag.js";
|
|
9
9
|
import "./Common/Line/Straight.js";
|
|
@@ -92,29 +92,29 @@ import "./Common/Icon/Icon.js";
|
|
|
92
92
|
import "../utils/getImageInfo.js";
|
|
93
93
|
import "./Tag/PanoramaTag.js";
|
|
94
94
|
import "./Tag/CustomTag.js";
|
|
95
|
-
function
|
|
96
|
-
|
|
95
|
+
function tt(o) {
|
|
96
|
+
W(o, "svelte-t2hepc", ".tag.svelte-t2hepc{will-change:opacity}.tag.withAnimation.svelte-t2hepc{transition:opacity 0.2s linear}.tag.hide.svelte-t2hepc{opacity:0;pointer-events:none}.tag.hide.svelte-t2hepc *{pointer-events:none !important}.tag.unClickable.svelte-t2hepc{pointer-events:none !important}.tag.unClickable.svelte-t2hepc *{pointer-events:none !important}.tag.disable.svelte-t2hepc{display:none}.wrapper.svelte-t2hepc{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}");
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function G(o) {
|
|
99
99
|
let i, e, t, r, a, s, c, y, u, f;
|
|
100
|
-
const w = [
|
|
100
|
+
const w = [it, et], g = [];
|
|
101
101
|
function p(n, m) {
|
|
102
102
|
return (
|
|
103
103
|
/*havePoint*/
|
|
104
104
|
n[15] ? 0 : 1
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
|
-
t = p(o), r =
|
|
108
|
-
const T = [
|
|
107
|
+
t = p(o), r = g[t] = w[t](o);
|
|
108
|
+
const T = [rt, ot], d = [];
|
|
109
109
|
function S(n, m) {
|
|
110
110
|
return (
|
|
111
111
|
/*haveContent*/
|
|
112
112
|
n[14] ? 0 : 1
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
|
-
return s = S(o), c =
|
|
115
|
+
return s = S(o), c = d[s] = T[s](o), {
|
|
116
116
|
c() {
|
|
117
|
-
i = C("div"), e = C("div"), r.c(), a =
|
|
117
|
+
i = C("div"), e = C("div"), r.c(), a = Z(), c.c(), _(e, "class", y = z(F(
|
|
118
118
|
"wrapper",
|
|
119
119
|
/*tag*/
|
|
120
120
|
o[1].className ? `${/*tag*/
|
|
@@ -168,18 +168,18 @@ function F(o) {
|
|
|
168
168
|
);
|
|
169
169
|
},
|
|
170
170
|
m(n, m) {
|
|
171
|
-
P(n, i, m),
|
|
171
|
+
P(n, i, m), B(i, e), g[t].m(e, null), B(e, a), d[s].m(e, null), f = !0;
|
|
172
172
|
},
|
|
173
173
|
p(n, m) {
|
|
174
174
|
let M = t;
|
|
175
|
-
t = p(n), t === M ?
|
|
176
|
-
|
|
177
|
-
}), L(), r =
|
|
175
|
+
t = p(n), t === M ? g[t].p(n, m) : (q(), k(g[M], 1, 1, () => {
|
|
176
|
+
g[M] = null;
|
|
177
|
+
}), L(), r = g[t], r ? r.p(n, m) : (r = g[t] = w[t](n), r.c()), h(r, 1), r.m(e, a));
|
|
178
178
|
let l = s;
|
|
179
|
-
s = S(n), s === l ?
|
|
180
|
-
|
|
181
|
-
}), L(), c =
|
|
182
|
-
2 && y !== (y =
|
|
179
|
+
s = S(n), s === l ? d[s].p(n, m) : (q(), k(d[l], 1, 1, () => {
|
|
180
|
+
d[l] = null;
|
|
181
|
+
}), L(), c = d[s], c ? c.p(n, m) : (c = d[s] = T[s](n), c.c()), h(c, 1), c.m(e, null)), (!f || m & /*tag*/
|
|
182
|
+
2 && y !== (y = z(F(
|
|
183
183
|
"wrapper",
|
|
184
184
|
/*tag*/
|
|
185
185
|
n[1].className ? `${/*tag*/
|
|
@@ -249,11 +249,11 @@ function F(o) {
|
|
|
249
249
|
k(r), k(c), f = !1;
|
|
250
250
|
},
|
|
251
251
|
d(n) {
|
|
252
|
-
n && N(i),
|
|
252
|
+
n && N(i), g[t].d(), d[s].d();
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function et(o) {
|
|
257
257
|
let i;
|
|
258
258
|
return {
|
|
259
259
|
c() {
|
|
@@ -270,17 +270,17 @@ function tt(o) {
|
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function it(o) {
|
|
274
274
|
let i, e;
|
|
275
|
-
return i = new
|
|
275
|
+
return i = new $({ props: { tag: (
|
|
276
276
|
/*tag*/
|
|
277
277
|
o[1]
|
|
278
278
|
) } }), {
|
|
279
279
|
c() {
|
|
280
|
-
|
|
280
|
+
H(i.$$.fragment);
|
|
281
281
|
},
|
|
282
282
|
m(t, r) {
|
|
283
|
-
|
|
283
|
+
J(i, t, r), e = !0;
|
|
284
284
|
},
|
|
285
285
|
p(t, r) {
|
|
286
286
|
const a = {};
|
|
@@ -295,11 +295,11 @@ function et(o) {
|
|
|
295
295
|
k(i.$$.fragment, t), e = !1;
|
|
296
296
|
},
|
|
297
297
|
d(t) {
|
|
298
|
-
|
|
298
|
+
K(i, t);
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function ot(o) {
|
|
303
303
|
let i;
|
|
304
304
|
return {
|
|
305
305
|
c() {
|
|
@@ -316,9 +316,9 @@ function it(o) {
|
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function rt(o) {
|
|
320
320
|
let i, e;
|
|
321
|
-
return i = new
|
|
321
|
+
return i = new x({
|
|
322
322
|
props: {
|
|
323
323
|
mediaStore: (
|
|
324
324
|
/*mediaStore*/
|
|
@@ -328,7 +328,7 @@ function ot(o) {
|
|
|
328
328
|
/*withAnimation*/
|
|
329
329
|
o[0]
|
|
330
330
|
),
|
|
331
|
-
tag:
|
|
331
|
+
tag: E(
|
|
332
332
|
/*tag*/
|
|
333
333
|
o[1]
|
|
334
334
|
),
|
|
@@ -355,10 +355,10 @@ function ot(o) {
|
|
|
355
355
|
}
|
|
356
356
|
}), {
|
|
357
357
|
c() {
|
|
358
|
-
|
|
358
|
+
H(i.$$.fragment);
|
|
359
359
|
},
|
|
360
360
|
m(t, r) {
|
|
361
|
-
|
|
361
|
+
J(i, t, r), e = !0;
|
|
362
362
|
},
|
|
363
363
|
p(t, r) {
|
|
364
364
|
const a = {};
|
|
@@ -367,7 +367,7 @@ function ot(o) {
|
|
|
367
367
|
t[2]), r & /*withAnimation*/
|
|
368
368
|
1 && (a.withAnimation = /*withAnimation*/
|
|
369
369
|
t[0]), r & /*tag*/
|
|
370
|
-
2 && (a.tag =
|
|
370
|
+
2 && (a.tag = E(
|
|
371
371
|
/*tag*/
|
|
372
372
|
t[1]
|
|
373
373
|
)), r & /*state*/
|
|
@@ -387,18 +387,18 @@ function ot(o) {
|
|
|
387
387
|
k(i.$$.fragment, t), e = !1;
|
|
388
388
|
},
|
|
389
389
|
d(t) {
|
|
390
|
-
|
|
390
|
+
K(i, t);
|
|
391
391
|
}
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function nt(o) {
|
|
395
395
|
let i, e, t = (
|
|
396
396
|
/*screenPosition*/
|
|
397
|
-
o[7] &&
|
|
397
|
+
o[7] && G(o)
|
|
398
398
|
);
|
|
399
399
|
return {
|
|
400
400
|
c() {
|
|
401
|
-
t && t.c(), i =
|
|
401
|
+
t && t.c(), i = X();
|
|
402
402
|
},
|
|
403
403
|
m(r, a) {
|
|
404
404
|
t && t.m(r, a), P(r, i, a), e = !0;
|
|
@@ -406,7 +406,7 @@ function rt(o) {
|
|
|
406
406
|
p(r, [a]) {
|
|
407
407
|
/*screenPosition*/
|
|
408
408
|
r[7] ? t ? (t.p(r, a), a & /*screenPosition*/
|
|
409
|
-
128 && h(t, 1)) : (t =
|
|
409
|
+
128 && h(t, 1)) : (t = G(r), t.c(), h(t, 1), t.m(i.parentNode, i)) : t && (q(), k(t, 1, 1, () => {
|
|
410
410
|
t = null;
|
|
411
411
|
}), L());
|
|
412
412
|
},
|
|
@@ -421,17 +421,17 @@ function rt(o) {
|
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
|
-
function
|
|
425
|
-
let t, r, a, s, c, y, u, f, w, { withAnimation:
|
|
426
|
-
const M =
|
|
424
|
+
function at(o, i, e) {
|
|
425
|
+
let t, r, a, s, c, y, u, f, w, { withAnimation: g = !1 } = i, { tag: p } = i, { mediaStore: T } = i, { rendererMap: d = /* @__PURE__ */ new Map() } = i, { contentTypeMap: S = /* @__PURE__ */ new Map() } = i, { state: n } = i, { temporaryState: m } = i;
|
|
426
|
+
const M = Y("hooks");
|
|
427
427
|
return o.$$set = (l) => {
|
|
428
|
-
"withAnimation" in l && e(0,
|
|
428
|
+
"withAnimation" in l && e(0, g = l.withAnimation), "tag" in l && e(1, p = l.tag), "mediaStore" in l && e(2, T = l.mediaStore), "rendererMap" in l && e(3, d = l.rendererMap), "contentTypeMap" in l && e(4, S = l.contentTypeMap), "state" in l && e(5, n = l.state), "temporaryState" in l && e(6, m = l.temporaryState);
|
|
429
429
|
}, o.$$.update = () => {
|
|
430
430
|
var l, D, I;
|
|
431
|
-
o.$$.dirty & /*tag*/
|
|
432
|
-
|
|
433
|
-
var R, V;
|
|
434
|
-
return !(((V = (R = p.style) == null ? void 0 : R.point) == null ? void 0 : V.enabled) === !1 || p.contentType === "Sticker" || p.contentType === "Link" || p.contentType === "VRLink" || p.contentType === "PanoLink" || p.contentType === "Panorama" || p.contentType === "Audio" && p.data.appearance === "plane");
|
|
431
|
+
o.$$.dirty & /*tag, rendererMap*/
|
|
432
|
+
10 && e(15, t = (() => {
|
|
433
|
+
var R, V, j;
|
|
434
|
+
return !(((V = (R = p.style) == null ? void 0 : R.point) == null ? void 0 : V.enabled) === !1 || ((j = d.get(p.contentType)) == null ? void 0 : j.usePoint) !== !0 || p.contentType === "Sticker" || p.contentType === "Link" || p.contentType === "VRLink" || p.contentType === "PanoLink" || p.contentType === "Panorama" || p.contentType === "Audio" && p.data.appearance === "plane");
|
|
435
435
|
})()), o.$$.dirty & /*tag*/
|
|
436
436
|
2 && e(14, r = (() => p.stickType === "2DPoint")()), o.$$.dirty & /*tag*/
|
|
437
437
|
2 && e(13, a = p.id), o.$$.dirty & /*tag*/
|
|
@@ -442,10 +442,10 @@ function nt(o, i, e) {
|
|
|
442
442
|
128 && e(9, f = (u == null ? void 0 : u.leftPercent) + "%"), o.$$.dirty & /*screenPosition*/
|
|
443
443
|
128 && e(8, w = (u == null ? void 0 : u.topPercent) + "%");
|
|
444
444
|
}, [
|
|
445
|
-
|
|
445
|
+
g,
|
|
446
446
|
p,
|
|
447
447
|
T,
|
|
448
|
-
|
|
448
|
+
d,
|
|
449
449
|
S,
|
|
450
450
|
n,
|
|
451
451
|
m,
|
|
@@ -461,14 +461,14 @@ function nt(o, i, e) {
|
|
|
461
461
|
M
|
|
462
462
|
];
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class Ue extends O {
|
|
465
465
|
constructor(i) {
|
|
466
|
-
super(),
|
|
466
|
+
super(), Q(
|
|
467
467
|
this,
|
|
468
468
|
i,
|
|
469
|
+
at,
|
|
469
470
|
nt,
|
|
470
|
-
|
|
471
|
-
Q,
|
|
471
|
+
U,
|
|
472
472
|
{
|
|
473
473
|
withAnimation: 0,
|
|
474
474
|
tag: 1,
|
|
@@ -478,10 +478,10 @@ class Qe extends K {
|
|
|
478
478
|
state: 5,
|
|
479
479
|
temporaryState: 6
|
|
480
480
|
},
|
|
481
|
-
|
|
481
|
+
tt
|
|
482
482
|
);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
export {
|
|
486
|
-
|
|
486
|
+
Ue as default
|
|
487
487
|
};
|
|
@@ -23,9 +23,12 @@ export declare abstract class TagRender extends TagComputer {
|
|
|
23
23
|
* 如果是 `TagContentType` 中的类型,将会覆盖掉插件内部默认的渲染器,
|
|
24
24
|
* 如果是其他任意 str
|
|
25
25
|
* ing 如:'Foo',则可以将类似 `{id: 1, contentType: 'Foo', position: [0,0,0]}` 的 tag 交给插件渲染
|
|
26
|
+
* @param config.usePoint 是否需要标签点, 默认为 false
|
|
26
27
|
* @note 优先级低于 tag.element
|
|
27
28
|
*/
|
|
28
|
-
registerRenderer(contentType: string, renderer: ElementRenderer
|
|
29
|
+
registerRenderer(contentType: string, renderer: ElementRenderer, config?: {
|
|
30
|
+
usePoint?: boolean;
|
|
31
|
+
}): void;
|
|
29
32
|
bindRenderer(contentType: string, builtInRenderer: TagContentType): void;
|
|
30
33
|
clearTags(): void;
|
|
31
34
|
/**
|
|
@@ -220,10 +220,12 @@ class fi extends I {
|
|
|
220
220
|
* 如果是 `TagContentType` 中的类型,将会覆盖掉插件内部默认的渲染器,
|
|
221
221
|
* 如果是其他任意 str
|
|
222
222
|
* ing 如:'Foo',则可以将类似 `{id: 1, contentType: 'Foo', position: [0,0,0]}` 的 tag 交给插件渲染
|
|
223
|
+
* @param config.usePoint 是否需要标签点, 默认为 false
|
|
223
224
|
* @note 优先级低于 tag.element
|
|
224
225
|
*/
|
|
225
|
-
registerRenderer(t, e) {
|
|
226
|
-
|
|
226
|
+
registerRenderer(t, e, o) {
|
|
227
|
+
var i;
|
|
228
|
+
this.rendererMap.set(t, { renderer: e, usePoint: (i = o == null ? void 0 : o.usePoint) != null ? i : !1 });
|
|
227
229
|
}
|
|
228
230
|
bindRenderer(t, e) {
|
|
229
231
|
this.contentTypeMap.set(t, e);
|
|
@@ -51,6 +51,7 @@ export type TagGLTFObject = GLTFObject & {
|
|
|
51
51
|
export type ElementRenderer = (container: HTMLElement, tag: TagInstance<any, any>) => () => void;
|
|
52
52
|
export type TagRendererMap = Map<string, {
|
|
53
53
|
renderer: ElementRenderer;
|
|
54
|
+
usePoint: boolean;
|
|
54
55
|
}>;
|
|
55
56
|
export type TagContentTypeMapping = Map<string, string>;
|
|
56
57
|
export interface TagObjectGroup extends Group {
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.8.0",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "3.
|
|
10
|
+
"version": "3.8.0",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|