@roomle/embedding-lib 6.5.0-alpha.1 → 6.5.0-alpha.3
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/docs/md/web/embedding/CHANGELOG.md +70 -75
- package/drag-ghost-B7UAYefM.mjs +1 -0
- package/drag-ghost-DHrf_Evu.mjs +81 -0
- package/embedding-plugins-DLVs7ER4.mjs +1 -0
- package/{embedding-plugins-Cm7O1pKC.mjs → embedding-plugins-DqMSzAJe.mjs} +47 -46
- package/embedding-plugins.js +6 -5
- package/embedding-plugins.min.js +1 -1
- package/from-custom-view-CaDOooe4.mjs +1 -0
- package/from-custom-view-T67aFIDR.mjs +249 -0
- package/from-website-Bvd5Pi0i.mjs +134 -0
- package/from-website-nKwD78_u.mjs +1 -0
- package/package.json +1 -1
- package/packages/embedding-lib/src/embedding-plugins.d.ts +1 -1
- package/packages/embedding-lib/src/plugins/strategy/from-custom-view.d.ts +2 -0
- package/packages/embedding-lib/src/plugins/strategy/from-website.d.ts +1 -1
- package/roomle-embedding-lib.js +1 -1
- package/roomle-embedding-lib.min.js +1 -1
- package/embedding-plugins-Dzhuj1By.mjs +0 -1
- package/from-custom-view-5SS9UqAH.mjs +0 -197
- package/from-custom-view-CfMGS1-t.mjs +0 -1
- package/from-website-CFTjWbqp.mjs +0 -230
- package/from-website-ExTzmsnv.mjs +0 -1
- package/touch-drag-CfMLD_hM.mjs +0 -57
- package/touch-drag-TGCsdNqP.mjs +0 -1
|
@@ -1,76 +1,71 @@
|
|
|
1
|
-
## 6.5.0-alpha.
|
|
1
|
+
## 6.5.0-alpha.3 (2026-03-18)
|
|
2
2
|
|
|
3
|
-
* Initial plan ([
|
|
4
|
-
* Merge branch '
|
|
5
|
-
* Merge branch 'master' into
|
|
6
|
-
* Merge branch 'master' into
|
|
7
|
-
* Merge branch 'master' into copilot/
|
|
8
|
-
* Merge branch 'master' into
|
|
9
|
-
* Merge
|
|
10
|
-
* Merge
|
|
11
|
-
* Merge
|
|
12
|
-
* Merge
|
|
13
|
-
* Merge
|
|
14
|
-
* Merge
|
|
15
|
-
* Merge
|
|
16
|
-
* Merge
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* fix:
|
|
53
|
-
* fix:
|
|
54
|
-
* fix
|
|
55
|
-
* fix:
|
|
56
|
-
* fix:
|
|
57
|
-
* fix:
|
|
58
|
-
* fix:
|
|
59
|
-
* fix:
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* test:
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* refactor: reduce duplicate code in test ([315731c](https://github.com/roomle-dev/roomle-ui/commit/315731c))
|
|
73
|
-
* refactor: use isInch() in init to avoid duplicated condition ([74831a6](https://github.com/roomle-dev/roomle-ui/commit/74831a6))
|
|
74
|
-
* ci: cancel in progress workflow runs if newer one gets triggered ([7860c41](https://github.com/roomle-dev/roomle-ui/commit/7860c41))
|
|
75
|
-
* wip: use core bound value for product dimensions ([7ff89ba](https://github.com/roomle-dev/roomle-ui/commit/7ff89ba))
|
|
76
|
-
* docs: PosGroup data structure ([71958b0](https://github.com/roomle-dev/roomle-ui/commit/71958b0))
|
|
3
|
+
* Initial plan ([82067d7](https://github.com/roomle-dev/roomle-ui/commit/82067d7))
|
|
4
|
+
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([0a53891](https://github.com/roomle-dev/roomle-ui/commit/0a53891))
|
|
5
|
+
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([4d5ab99](https://github.com/roomle-dev/roomle-ui/commit/4d5ab99))
|
|
6
|
+
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([b288d9b](https://github.com/roomle-dev/roomle-ui/commit/b288d9b))
|
|
7
|
+
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([ca2799c](https://github.com/roomle-dev/roomle-ui/commit/ca2799c))
|
|
8
|
+
* Merge branch 'master' into fix/set-only-selected-floor-color ([ae946c7](https://github.com/roomle-dev/roomle-ui/commit/ae946c7))
|
|
9
|
+
* Merge pull request #2346 from roomle-dev/fix/drag-fade ([1426d41](https://github.com/roomle-dev/roomle-ui/commit/1426d41)), closes [#2346](https://github.com/roomle-dev/roomle-ui/issues/2346)
|
|
10
|
+
* Merge pull request #2365 from roomle-dev/copilot/upgrade-web-sdk-to-strict-null-checks ([18e45eb](https://github.com/roomle-dev/roomle-ui/commit/18e45eb)), closes [#2365](https://github.com/roomle-dev/roomle-ui/issues/2365)
|
|
11
|
+
* Merge pull request #2373 from roomle-dev/refactor/typed-event-dispatcher-map ([5d50308](https://github.com/roomle-dev/roomle-ui/commit/5d50308)), closes [#2373](https://github.com/roomle-dev/roomle-ui/issues/2373)
|
|
12
|
+
* Merge pull request #2391 from roomle-dev/fix/set-only-selected-floor-color ([c59f3fe](https://github.com/roomle-dev/roomle-ui/commit/c59f3fe)), closes [#2391](https://github.com/roomle-dev/roomle-ui/issues/2391)
|
|
13
|
+
* Merge pull request #2407 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.9 ([58cd87d](https://github.com/roomle-dev/roomle-ui/commit/58cd87d)), closes [#2407](https://github.com/roomle-dev/roomle-ui/issues/2407)
|
|
14
|
+
* Merge pull request #2410 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.10 ([735c63a](https://github.com/roomle-dev/roomle-ui/commit/735c63a)), closes [#2410](https://github.com/roomle-dev/roomle-ui/issues/2410)
|
|
15
|
+
* Merge pull request #2411 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.11 ([58ea7bf](https://github.com/roomle-dev/roomle-ui/commit/58ea7bf)), closes [#2411](https://github.com/roomle-dev/roomle-ui/issues/2411)
|
|
16
|
+
* Merge pull request #2414 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.12 ([ef98f78](https://github.com/roomle-dev/roomle-ui/commit/ef98f78)), closes [#2414](https://github.com/roomle-dev/roomle-ui/issues/2414)
|
|
17
|
+
* feat: core api - childObjectLevel ([ed3cc0d](https://github.com/roomle-dev/roomle-ui/commit/ed3cc0d))
|
|
18
|
+
* feat(core): upgrade to version 2.72.0-alpha.10 ([f890cee](https://github.com/roomle-dev/roomle-ui/commit/f890cee))
|
|
19
|
+
* feat(core): upgrade to version 2.72.0-alpha.11 ([c186968](https://github.com/roomle-dev/roomle-ui/commit/c186968))
|
|
20
|
+
* feat(core): upgrade to version 2.72.0-alpha.12 ([75998c7](https://github.com/roomle-dev/roomle-ui/commit/75998c7))
|
|
21
|
+
* feat(core): upgrade to version 2.72.0-alpha.9 ([77da101](https://github.com/roomle-dev/roomle-ui/commit/77da101))
|
|
22
|
+
* chore: add docs ([2e7ba8b](https://github.com/roomle-dev/roomle-ui/commit/2e7ba8b))
|
|
23
|
+
* chore: add long press for mobile ([b9345c5](https://github.com/roomle-dev/roomle-ui/commit/b9345c5))
|
|
24
|
+
* chore: code review ([71c8ecd](https://github.com/roomle-dev/roomle-ui/commit/71c8ecd))
|
|
25
|
+
* chore: fadein out on grid view ([50bb0d6](https://github.com/roomle-dev/roomle-ui/commit/50bb0d6))
|
|
26
|
+
* chore: fix for mobile drag in HI ([a12120c](https://github.com/roomle-dev/roomle-ui/commit/a12120c))
|
|
27
|
+
* chore: fix imports ([dc14e57](https://github.com/roomle-dev/roomle-ui/commit/dc14e57))
|
|
28
|
+
* chore: fix native browser drag ghost flying around ([1c447d2](https://github.com/roomle-dev/roomle-ui/commit/1c447d2))
|
|
29
|
+
* chore: format ([9c544e9](https://github.com/roomle-dev/roomle-ui/commit/9c544e9))
|
|
30
|
+
* chore: lint ([a52f181](https://github.com/roomle-dev/roomle-ui/commit/a52f181))
|
|
31
|
+
* chore: lint ([f604576](https://github.com/roomle-dev/roomle-ui/commit/f604576))
|
|
32
|
+
* chore: merge master ([edf059b](https://github.com/roomle-dev/roomle-ui/commit/edf059b))
|
|
33
|
+
* chore: merge master into strict-null-checks branch ([f152002](https://github.com/roomle-dev/roomle-ui/commit/f152002))
|
|
34
|
+
* chore: start Phase 3 strict null checks migration for common-core ([aa975a0](https://github.com/roomle-dev/roomle-ui/commit/aa975a0))
|
|
35
|
+
* chore: strictNullChecks Phase 3a — DI, utils, services, input ([ab55f13](https://github.com/roomle-dev/roomle-ui/commit/ab55f13))
|
|
36
|
+
* chore: trigger CI ([3dcc2a6](https://github.com/roomle-dev/roomle-ui/commit/3dcc2a6))
|
|
37
|
+
* chore: working drag-in fade out ([04c0f22](https://github.com/roomle-dev/roomle-ui/commit/04c0f22))
|
|
38
|
+
* fix(web-sdk): address PR feedback and CI regressions ([a62e799](https://github.com/roomle-dev/roomle-ui/commit/a62e799))
|
|
39
|
+
* fix: address remaining review comments on PR #2365 ([279c7b6](https://github.com/roomle-dev/roomle-ui/commit/279c7b6)), closes [#2365](https://github.com/roomle-dev/roomle-ui/issues/2365)
|
|
40
|
+
* fix: address review comments on PR #2373 ([9a9827b](https://github.com/roomle-dev/roomle-ui/commit/9a9827b)), closes [#2373](https://github.com/roomle-dev/roomle-ui/issues/2373)
|
|
41
|
+
* fix: address review feedback — revert problematic fallbacks, fix null handling ([f6d7bb6](https://github.com/roomle-dev/roomle-ui/commit/f6d7bb6))
|
|
42
|
+
* fix: better positioning of spawned in elements ([bd7ebf9](https://github.com/roomle-dev/roomle-ui/commit/bd7ebf9))
|
|
43
|
+
* fix: correct cast from KeyboardEvent to MouseEvent in _onMouseDown ([2b4ca5c](https://github.com/roomle-dev/roomle-ui/commit/2b4ca5c))
|
|
44
|
+
* fix: do not add new undo step ([0e8d78c](https://github.com/roomle-dev/roomle-ui/commit/0e8d78c))
|
|
45
|
+
* fix: from custom overlay dragging working again ([7f37a35](https://github.com/roomle-dev/roomle-ui/commit/7f37a35))
|
|
46
|
+
* fix: harden DI lookup and light cache access ([843eee9](https://github.com/roomle-dev/roomle-ui/commit/843eee9))
|
|
47
|
+
* fix: mobile external catalog dragging ([4f20d23](https://github.com/roomle-dev/roomle-ui/commit/4f20d23))
|
|
48
|
+
* fix: only set color of the selected floor in planner ([b92ef5b](https://github.com/roomle-dev/roomle-ui/commit/b92ef5b))
|
|
49
|
+
* fix: resolve strictNullChecks errors in cameracontrol directory ([1038f20](https://github.com/roomle-dev/roomle-ui/commit/1038f20))
|
|
50
|
+
* fix: resolve strictNullChecks errors in cameracontrol directory ([a0011c1](https://github.com/roomle-dev/roomle-ui/commit/a0011c1))
|
|
51
|
+
* fix: resolve strictNullChecks errors in common-core ([c7991bf](https://github.com/roomle-dev/roomle-ui/commit/c7991bf))
|
|
52
|
+
* fix: resolve strictNullChecks errors in common-core/utils ([3e68331](https://github.com/roomle-dev/roomle-ui/commit/3e68331))
|
|
53
|
+
* fix: resolve strictNullChecks errors in common-utils.ts ([f8e204d](https://github.com/roomle-dev/roomle-ui/commit/f8e204d))
|
|
54
|
+
* fix: resolve strictNullChecks errors in init-data.ts ([dbf9164](https://github.com/roomle-dev/roomle-ui/commit/dbf9164))
|
|
55
|
+
* fix: resolve strictNullChecks errors in input-manager.ts ([a1ccf79](https://github.com/roomle-dev/roomle-ui/commit/a1ccf79))
|
|
56
|
+
* fix: resolve strictNullChecks errors in services/ files ([1e4356a](https://github.com/roomle-dev/roomle-ui/commit/1e4356a))
|
|
57
|
+
* fix: resolve strictNullChecks errors in single-promise-factory.ts ([b98f80f](https://github.com/roomle-dev/roomle-ui/commit/b98f80f))
|
|
58
|
+
* fix: resolve strictNullChecks errors in threejs-utils.ts ([e131748](https://github.com/roomle-dev/roomle-ui/commit/e131748))
|
|
59
|
+
* fix: revert Main.lookup to not throw on null (test regression) ([05793dc](https://github.com/roomle-dev/roomle-ui/commit/05793dc))
|
|
60
|
+
* style: format merge resolution ([1253cf0](https://github.com/roomle-dev/roomle-ui/commit/1253cf0))
|
|
61
|
+
* refactor: add typed CameraEventMap for CameraControl ([b49f7ce](https://github.com/roomle-dev/roomle-ui/commit/b49f7ce))
|
|
62
|
+
* refactor: extract factory functions and remove redundant type annotations ([bc09eac](https://github.com/roomle-dev/roomle-ui/commit/bc09eac))
|
|
63
|
+
* refactor: move ghost image creation into composable ([ffa9803](https://github.com/roomle-dev/roomle-ui/commit/ffa9803))
|
|
64
|
+
* refactor: remove unnecessary jsdoc and use pointerEvent factory in tests ([4e4630a](https://github.com/roomle-dev/roomle-ui/commit/4e4630a))
|
|
65
|
+
* refactor: simplify EventDispatcher generics and add code guidelines ([a5833a0](https://github.com/roomle-dev/roomle-ui/commit/a5833a0))
|
|
66
|
+
* refactor: typed EventMap for EventDispatcher and InputEvent ([eef56b3](https://github.com/roomle-dev/roomle-ui/commit/eef56b3))
|
|
67
|
+
* refactor: use typed inputListener helper and rename factories to createPointerEvent/createKeyboardEv ([769ccb5](https://github.com/roomle-dev/roomle-ui/commit/769ccb5))
|
|
68
|
+
* refactor: working from-website dragin on mobile ([92545de](https://github.com/roomle-dev/roomle-ui/commit/92545de))
|
|
69
|
+
* test: update playwright tests, because of HI properties ([49bb60f](https://github.com/roomle-dev/roomle-ui/commit/49bb60f))
|
|
70
|
+
* docs: add Symbol guideline for opaque identifiers and follow-up for refactoring ([066a0cb](https://github.com/roomle-dev/roomle-ui/commit/066a0cb))
|
|
71
|
+
* docs: update TypeScript guidelines — prefer union types, no enums in new code ([6fc4a54](https://github.com/roomle-dev/roomle-ui/commit/6fc4a54))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as t,d as e,e as n,f as s,g as i,h as o,i as a,j as d,k as m}from"./embedding-plugins-DLVs7ER4.mjs";const h=(t,e,n=0,s=0)=>{const i=e.x+e.width+n,o=e.x-n,a=e.y+e.height+s,d=e.y-s,{x:m,y:h}=t;return m>=o&&m<=i&&h>=d&&h<=a},r=(t,e,n,s=0,i=0)=>{if(n&&(n.hiddenIn||n.visibleIn))return n.visibleIn?h({x:t,y:e},n.visibleIn,s,i):!!n.hiddenIn&&!h({x:t,y:e},n.hiddenIn,-s,-i)};class l{_dragGhostAnimationFrameId=null;_dragGhostRemoveAnimationFrameId=null;_dragGhostElement=null;constructor(t=null){this._dragGhostElement=t}updateDragGhost(h,l,g){this._dragGhostRemoveAnimationFrameId&&(cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId),this._dragGhostRemoveAnimationFrameId=null),!g.ghost?.external&&g.ghost&&(this._dragGhostAnimationFrameId||(this._dragGhostAnimationFrameId=requestAnimationFrame(()=>{(()=>{if(!document.getElementById(e)){const t=document.createElement("style");t.type="text/css",t.id=e,t.innerHTML=`\n ${n}\n ${s}\n `,document.head.appendChild(t)}})();const c={x:h,y:l};!g.ghost&&this._dragGhostElement&&(g.ghost={}),g.ghost&&!g.ghost.element&&this._dragGhostElement&&(g.ghost.element=this._dragGhostElement),(({x:e,y:n},s)=>{let d=document.getElementById(t);if(!d){if(d=document.createElement("div"),s.ghost?.element)d.appendChild(s.ghost.element);else{const t=document.createElement("img");t.src=s.ghost?.url||i,t.width=s.ghost?.width||o,t.height=s.ghost?.height||a,d.appendChild(t)}d.id=t,d.style.position="fixed",d.style.top="0",d.style.left="0",d.style.willChange="transform",d.style.transform="translate3d(0, 0, 0)",d.style.zIndex="9999",d.style.opacity="0.5",r(e,n,s.ghost||{},s.settings?.dragInOverlapX,s.settings?.dragInOverlapY)||(d.style.display="none"),d.style.pointerEvents="none",document.body.appendChild(d)}})(c,g),(({x:e,y:n},s)=>{const i=document.getElementById(t);if(!i)return;let h=s.ghost?.width,l=s.ghost?.height;typeof h>"u"&&(h=i.getBoundingClientRect().width||o),typeof l>"u"&&(l=i.getBoundingClientRect().height||a);const g=e-h/2,c=n-l/2;i.style.transform=`translate3d(${g}px, ${c}px, 0)`,s.ghost&&(r(e,n,s.ghost,s.settings?.dragInOverlapX,s.settings?.dragInOverlapY)?i.style.animation!=d&&(i.style.animation=d):i.style.animation!=m&&(i.style.animation=m))})(c,g),this._dragGhostAnimationFrameId=null})))}removeDragGhost(){this._dragGhostAnimationFrameId&&(cancelAnimationFrame(this._dragGhostAnimationFrameId),this._dragGhostAnimationFrameId=null),this._dragGhostRemoveAnimationFrameId||(this._dragGhostRemoveAnimationFrameId=requestAnimationFrame(()=>{const e=document.getElementById(t);e&&document.body.removeChild(e),this._dragGhostRemoveAnimationFrameId=null}))}}export{l as E};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { c as r, d as o, e as f, f as u, g as y, h as A, i as G, j as g, k as _ } from "./embedding-plugins-DqMSzAJe.mjs";
|
|
2
|
+
const c = (i, n, t = 0, e = 0) => {
|
|
3
|
+
const s = n.x + n.width + t, a = n.x - t, h = n.y + n.height + e, l = n.y - e, { x: d, y: m } = i;
|
|
4
|
+
return d >= a && d <= s && m >= l && m <= h;
|
|
5
|
+
}, I = (i, n, t, e = 0, s = 0) => {
|
|
6
|
+
if (!(!t || !t.hiddenIn && !t.visibleIn))
|
|
7
|
+
return t.visibleIn ? c(
|
|
8
|
+
{ x: i, y: n },
|
|
9
|
+
t.visibleIn,
|
|
10
|
+
e,
|
|
11
|
+
s
|
|
12
|
+
) : t.hiddenIn ? !c(
|
|
13
|
+
{ x: i, y: n },
|
|
14
|
+
t.hiddenIn,
|
|
15
|
+
-e,
|
|
16
|
+
-s
|
|
17
|
+
) : !1;
|
|
18
|
+
}, R = () => {
|
|
19
|
+
if (!!!document.getElementById(o)) {
|
|
20
|
+
const n = document.createElement("style");
|
|
21
|
+
n.type = "text/css", n.id = o, n.innerHTML = `
|
|
22
|
+
${f}
|
|
23
|
+
${u}
|
|
24
|
+
`, document.head.appendChild(n);
|
|
25
|
+
}
|
|
26
|
+
}, F = ({ x: i, y: n }, t) => {
|
|
27
|
+
let e = document.getElementById(r);
|
|
28
|
+
if (!e) {
|
|
29
|
+
if (e = document.createElement("div"), t.ghost?.element)
|
|
30
|
+
e.appendChild(t.ghost.element);
|
|
31
|
+
else {
|
|
32
|
+
const s = document.createElement("img");
|
|
33
|
+
s.src = t.ghost?.url || y, s.width = t.ghost?.width || A, s.height = t.ghost?.height || G, e.appendChild(s);
|
|
34
|
+
}
|
|
35
|
+
e.id = r, e.style.position = "fixed", e.style.top = "0", e.style.left = "0", e.style.willChange = "transform", e.style.transform = "translate3d(0, 0, 0)", e.style.zIndex = "9999", e.style.opacity = "0.5", I(
|
|
36
|
+
i,
|
|
37
|
+
n,
|
|
38
|
+
t.ghost || {},
|
|
39
|
+
t.settings?.dragInOverlapX,
|
|
40
|
+
t.settings?.dragInOverlapY
|
|
41
|
+
) || (e.style.display = "none"), e.style.pointerEvents = "none", document.body.appendChild(e);
|
|
42
|
+
}
|
|
43
|
+
}, E = ({ x: i, y: n }, t) => {
|
|
44
|
+
const e = document.getElementById(r);
|
|
45
|
+
if (!e)
|
|
46
|
+
return;
|
|
47
|
+
let s = t.ghost?.width, a = t.ghost?.height;
|
|
48
|
+
typeof s > "u" && (s = e.getBoundingClientRect().width || A), typeof a > "u" && (a = e.getBoundingClientRect().height || G);
|
|
49
|
+
const h = i - s / 2, l = n - a / 2;
|
|
50
|
+
e.style.transform = `translate3d(${h}px, ${l}px, 0)`, t.ghost && (I(
|
|
51
|
+
i,
|
|
52
|
+
n,
|
|
53
|
+
t.ghost,
|
|
54
|
+
t.settings?.dragInOverlapX,
|
|
55
|
+
t.settings?.dragInOverlapY
|
|
56
|
+
) ? e.style.animation != g && (e.style.animation = g) : e.style.animation != _ && (e.style.animation = _));
|
|
57
|
+
};
|
|
58
|
+
class L {
|
|
59
|
+
_dragGhostAnimationFrameId = null;
|
|
60
|
+
_dragGhostRemoveAnimationFrameId = null;
|
|
61
|
+
_dragGhostElement = null;
|
|
62
|
+
constructor(n = null) {
|
|
63
|
+
this._dragGhostElement = n;
|
|
64
|
+
}
|
|
65
|
+
updateDragGhost(n, t, e) {
|
|
66
|
+
this._dragGhostRemoveAnimationFrameId && (cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId), this._dragGhostRemoveAnimationFrameId = null), !e.ghost?.external && e.ghost && (this._dragGhostAnimationFrameId || (this._dragGhostAnimationFrameId = requestAnimationFrame(() => {
|
|
67
|
+
R();
|
|
68
|
+
const s = { x: n, y: t };
|
|
69
|
+
!e.ghost && this._dragGhostElement && (e.ghost = {}), e.ghost && !e.ghost.element && this._dragGhostElement && (e.ghost.element = this._dragGhostElement), F(s, e), E(s, e), this._dragGhostAnimationFrameId = null;
|
|
70
|
+
})));
|
|
71
|
+
}
|
|
72
|
+
removeDragGhost() {
|
|
73
|
+
this._dragGhostAnimationFrameId && (cancelAnimationFrame(this._dragGhostAnimationFrameId), this._dragGhostAnimationFrameId = null), this._dragGhostRemoveAnimationFrameId || (this._dragGhostRemoveAnimationFrameId = requestAnimationFrame(() => {
|
|
74
|
+
const n = document.getElementById(r);
|
|
75
|
+
n && document.body.removeChild(n), this._dragGhostRemoveAnimationFrameId = null;
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
L as E
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="rml-drag-in-styles",e="rml-drag-in-drag-element",a="rml-drag-in-overlay",s="rml-drag-in-drag-ghost",r="rml-drag-in-fade-in",i="rml-drag-in-fade-out",n={DISPLAY_NONE:"rml-display-none"},o=.5,d="250ms",g="forwards",m=`@keyframes ${r} {from{opacity: 0;}to {opacity: 0.5;}}`,l=`@keyframes ${i} {from{opacity: 0.5;}to {opacity: 0;}}`,c=`${r} ${d} ${g}`,h=`${i} ${d} ${g}`,p="https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",u=112,_=112;class y{_mainDomElement;_instance;_mode="website";_viewName="main";constructor(t,e,a,s){this._instance=t,this._mainDomElement=e,this._mode=a,this._viewName=s}async init(){return Promise.resolve()}}class D extends y{options={};_customDragSignal=new AbortController;_injectStyles(){if(!document.getElementById(t)){const e=document.createElement("style");e.type="text/css",e.id=t,e.innerHTML=`\n .${n.DISPLAY_NONE}{display:none}\n .${a}{position:absolute;top:0;left:0;width:100%;height:100%;z-index:999;}\n .${s}{position:absolute;top:0;left:0;width:1px;height:1px;z-index:999;pointer-events:none;background-color:transparent;}\n ${m}\n ${l}\n `,document.head.appendChild(e)}}_initializeDragGhost(){const t=this._mainDomElement.parentNode;let e=t.querySelector("."+s);e||(e=document.createElement("div"),e.classList.add(s),e.innerText=" ",t.appendChild(e))}constructor(t,e,a,s){super(t,e,a,s),this._mainDomElement=e,this._injectStyles(),this._initializeDragGhost()}async init(){if(await super.init(),"website"===this._mode)try{const{DragInFromWebsiteStrategy:t}=await import("./from-website-nKwD78_u.mjs");this._strategy=new t(this._instance,this._mainDomElement,{settings:this.options,mode:"website"})}catch(t){throw t}else{if("custom-view"!==this._mode)throw new Error("Unsupported mode");try{const{DragInFromCustomViewStrategy:t}=await import("./from-custom-view-CaDOooe4.mjs");this._strategy=new t(this._instance,this._mainDomElement,this.options,this._viewName)}catch(t){throw t}}}get isDragging(){return this._strategy.isDragging}dragStart(t,e,a="rml_id"){this._strategy.dragStart(t,e,a)}dragUpdate(t){this._strategy.dragUpdate(t)}dragEnd(){this._strategy.dragEnd()}touchStart(t,e,a="rml_id"){this._strategy.touchStart(t,e,a)}touchMove(t){this._strategy.touchMove(t)}touchEnd(){this._strategy.touchEnd()}dispose(){this._strategy.dispose()}beforeUpdateGhost(t){this._strategy.beforeUpdateGhost(t)}registerCustomDrag({customDragStart:t,customDragEnd:e,customDragUpdate:a,beforeUpdateGhost:s}){s&&this._strategy.beforeUpdateGhost(s);const r=this._customDragSignal.signal,i=t=>{this._strategy.releaseInput(t),this._strategy.isDragging&&e(t)};document.querySelectorAll('[data-rml-draggable="true"]').forEach(t=>{t.draggable=!1,t.style.touchAction="none"}),document.addEventListener("pointerdown",e=>{"true"===e.target.getAttribute("data-rml-draggable")&&(e.target.setPointerCapture&&e.target.setPointerCapture(e.pointerId),t(e))},{signal:r}),document.addEventListener("pointermove",t=>{a(t)},{signal:r}),document.addEventListener("pointerup",i,{signal:r}),document.addEventListener("pointercancel",i,{signal:r})}unregisterCustomDrag(){this._customDragSignal.abort(),this._customDragSignal=new AbortController}releaseInput(t){this._strategy.releaseInput(t)}}const w=Object.freeze(Object.defineProperty({__proto__:null,DragIn:D},Symbol.toStringTag,{value:"Module"}));export{D,a as R,o as T,n as a,s as b,e as c,t as d,m as e,l as f,p as g,u as h,_ as i,c as j,h as k,w as l};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _ = "rml-drag-in-styles", N = "rml-drag-in-drag-element", A = "rml-drag-in-overlay", n = "rml-drag-in-drag-ghost", d = "rml-drag-in-fade-in", g = "rml-drag-in-fade-out", D = {
|
|
2
2
|
DISPLAY_NONE: "rml-display-none"
|
|
3
|
-
},
|
|
3
|
+
}, c = 0.5, l = "250ms", m = "forwards", y = `@keyframes ${d} {from{opacity: 0;}to {opacity: ${c};}}`, S = `@keyframes ${g} {from{opacity: ${c};}to {opacity: 0;}}`, R = `${d} ${l} ${m}`, G = `${g} ${l} ${m}`, T = "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg", f = 112, b = 112;
|
|
4
4
|
class I {
|
|
5
5
|
_mainDomElement;
|
|
6
6
|
_instance;
|
|
7
7
|
_mode = "website";
|
|
8
8
|
_viewName = "main";
|
|
9
|
-
constructor(t, e,
|
|
10
|
-
this._instance = t, this._mainDomElement = e, this._mode =
|
|
9
|
+
constructor(t, e, r, a) {
|
|
10
|
+
this._instance = t, this._mainDomElement = e, this._mode = r, this._viewName = a;
|
|
11
11
|
}
|
|
12
12
|
async init() {
|
|
13
13
|
return Promise.resolve();
|
|
@@ -17,13 +17,13 @@ class E extends I {
|
|
|
17
17
|
options = {};
|
|
18
18
|
_customDragSignal = new AbortController();
|
|
19
19
|
_injectStyles() {
|
|
20
|
-
if (!!!document.getElementById(
|
|
20
|
+
if (!!!document.getElementById(_)) {
|
|
21
21
|
const e = document.createElement("style");
|
|
22
|
-
e.type = "text/css", e.id =
|
|
23
|
-
.${
|
|
24
|
-
.${
|
|
25
|
-
.${
|
|
26
|
-
${
|
|
22
|
+
e.type = "text/css", e.id = _, e.innerHTML = `
|
|
23
|
+
.${D.DISPLAY_NONE}{display:none}
|
|
24
|
+
.${A}{position:absolute;top:0;left:0;width:100%;height:100%;z-index:999;}
|
|
25
|
+
.${n}{position:absolute;top:0;left:0;width:1px;height:1px;z-index:999;pointer-events:none;background-color:transparent;}
|
|
26
|
+
${y}
|
|
27
27
|
${S}
|
|
28
28
|
`, document.head.appendChild(e);
|
|
29
29
|
}
|
|
@@ -31,17 +31,17 @@ class E extends I {
|
|
|
31
31
|
_initializeDragGhost() {
|
|
32
32
|
const t = this._mainDomElement.parentNode;
|
|
33
33
|
let e = t.querySelector(
|
|
34
|
-
"." +
|
|
34
|
+
"." + n
|
|
35
35
|
);
|
|
36
|
-
e || (e = document.createElement("div"), e.classList.add(
|
|
36
|
+
e || (e = document.createElement("div"), e.classList.add(n), e.innerText = " ", t.appendChild(e));
|
|
37
37
|
}
|
|
38
|
-
constructor(t, e,
|
|
39
|
-
super(t, e,
|
|
38
|
+
constructor(t, e, r, a) {
|
|
39
|
+
super(t, e, r, a), this._mainDomElement = e, this._injectStyles(), this._initializeDragGhost();
|
|
40
40
|
}
|
|
41
41
|
async init() {
|
|
42
42
|
if (await super.init(), this._mode === "website")
|
|
43
43
|
try {
|
|
44
|
-
const { DragInFromWebsiteStrategy: t } = await import("./from-website-
|
|
44
|
+
const { DragInFromWebsiteStrategy: t } = await import("./from-website-Bvd5Pi0i.mjs");
|
|
45
45
|
this._strategy = new t(
|
|
46
46
|
this._instance,
|
|
47
47
|
this._mainDomElement,
|
|
@@ -52,7 +52,7 @@ class E extends I {
|
|
|
52
52
|
}
|
|
53
53
|
else if (this._mode === "custom-view")
|
|
54
54
|
try {
|
|
55
|
-
const { DragInFromCustomViewStrategy: t } = await import("./from-custom-view-
|
|
55
|
+
const { DragInFromCustomViewStrategy: t } = await import("./from-custom-view-T67aFIDR.mjs");
|
|
56
56
|
this._strategy = new t(
|
|
57
57
|
this._instance,
|
|
58
58
|
this._mainDomElement,
|
|
@@ -68,8 +68,8 @@ class E extends I {
|
|
|
68
68
|
get isDragging() {
|
|
69
69
|
return this._strategy.isDragging;
|
|
70
70
|
}
|
|
71
|
-
dragStart(t, e,
|
|
72
|
-
this._strategy.dragStart(t, e,
|
|
71
|
+
dragStart(t, e, r = "rml_id") {
|
|
72
|
+
this._strategy.dragStart(t, e, r);
|
|
73
73
|
}
|
|
74
74
|
dragUpdate(t) {
|
|
75
75
|
this._strategy.dragUpdate(t);
|
|
@@ -77,8 +77,8 @@ class E extends I {
|
|
|
77
77
|
dragEnd() {
|
|
78
78
|
this._strategy.dragEnd();
|
|
79
79
|
}
|
|
80
|
-
touchStart(t, e,
|
|
81
|
-
this._strategy.touchStart(t, e,
|
|
80
|
+
touchStart(t, e, r = "rml_id") {
|
|
81
|
+
this._strategy.touchStart(t, e, r);
|
|
82
82
|
}
|
|
83
83
|
touchMove(t) {
|
|
84
84
|
this._strategy.touchMove(t);
|
|
@@ -95,20 +95,20 @@ class E extends I {
|
|
|
95
95
|
registerCustomDrag({
|
|
96
96
|
customDragStart: t,
|
|
97
97
|
customDragEnd: e,
|
|
98
|
-
customDragUpdate:
|
|
99
|
-
beforeUpdateGhost:
|
|
98
|
+
customDragUpdate: r,
|
|
99
|
+
beforeUpdateGhost: a
|
|
100
100
|
}) {
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
this._strategy.releaseInput(
|
|
106
|
-
},
|
|
107
|
-
s
|
|
101
|
+
a && this._strategy.beforeUpdateGhost(a);
|
|
102
|
+
const o = this._customDragSignal.signal, p = (s) => {
|
|
103
|
+
s.target.getAttribute("data-rml-draggable") === "true" && (s.target.setPointerCapture && s.target.setPointerCapture(s.pointerId), t(s));
|
|
104
|
+
}, i = (s) => {
|
|
105
|
+
this._strategy.releaseInput(s), this._strategy.isDragging && e(s);
|
|
106
|
+
}, u = (s) => {
|
|
107
|
+
r(s);
|
|
108
108
|
};
|
|
109
|
-
document.querySelectorAll('[data-rml-draggable="true"]').forEach((
|
|
110
|
-
|
|
111
|
-
}), document.addEventListener("
|
|
109
|
+
document.querySelectorAll('[data-rml-draggable="true"]').forEach((s) => {
|
|
110
|
+
s.draggable = !1, s.style.touchAction = "none";
|
|
111
|
+
}), document.addEventListener("pointerdown", p, { signal: o }), document.addEventListener("pointermove", u, { signal: o }), document.addEventListener("pointerup", i, { signal: o }), document.addEventListener("pointercancel", i, { signal: o });
|
|
112
112
|
}
|
|
113
113
|
unregisterCustomDrag() {
|
|
114
114
|
this._customDragSignal.abort(), this._customDragSignal = new AbortController();
|
|
@@ -117,23 +117,24 @@ class E extends I {
|
|
|
117
117
|
this._strategy.releaseInput(t);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
121
121
|
__proto__: null,
|
|
122
122
|
DragIn: E
|
|
123
123
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
124
124
|
export {
|
|
125
125
|
E as D,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
A as R,
|
|
127
|
+
c as T,
|
|
128
|
+
D as a,
|
|
129
|
+
n as b,
|
|
130
|
+
N as c,
|
|
131
|
+
_ as d,
|
|
132
|
+
y as e,
|
|
133
|
+
S as f,
|
|
134
|
+
T as g,
|
|
135
|
+
f as h,
|
|
136
|
+
b as i,
|
|
137
|
+
R as j,
|
|
138
|
+
G as k,
|
|
139
|
+
C as l
|
|
139
140
|
};
|
package/embedding-plugins.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { D as R,
|
|
1
|
+
import { D as R, j as D, e as G, k as T, f as L, c as I, i as S, g as a, h as M, d as N, T as O } from "./embedding-plugins-DqMSzAJe.mjs";
|
|
2
2
|
export {
|
|
3
3
|
R as DragIn,
|
|
4
4
|
D as RML_DRAG_GHOST_FADE_IN,
|
|
5
5
|
G as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
T as RML_DRAG_GHOST_FADE_OUT,
|
|
7
|
+
L as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS,
|
|
8
|
+
I as RML_DRAG_IN_DRAG_ELEMENT_ID,
|
|
9
9
|
S as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT,
|
|
10
10
|
a as RML_DRAG_IN_FALLBACK_GHOST_URL,
|
|
11
11
|
M as RML_DRAG_IN_FALLBACK_GHOST_WIDTH,
|
|
12
|
-
N as RML_DRAG_IN_STYLES_ID
|
|
12
|
+
N as RML_DRAG_IN_STYLES_ID,
|
|
13
|
+
O as TARGET_OPACITY
|
|
13
14
|
};
|
package/embedding-plugins.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as _,
|
|
1
|
+
import{D as _,j as A,e as s,k as a,f as R,c as D,i as G,g as T,h as L,d as I,T as S}from"./embedding-plugins-DLVs7ER4.mjs";export{_ as DragIn,A as RML_DRAG_GHOST_FADE_IN,s as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS,a as RML_DRAG_GHOST_FADE_OUT,R as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS,D as RML_DRAG_IN_DRAG_ELEMENT_ID,G as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT,T as RML_DRAG_IN_FALLBACK_GHOST_URL,L as RML_DRAG_IN_FALLBACK_GHOST_WIDTH,I as RML_DRAG_IN_STYLES_ID,S as TARGET_OPACITY};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as t,e,b as s}from"./utils-BqTPLNLs.mjs";import{i,h as a,g as r}from"./embedding-plugins-DLVs7ER4.mjs";import{E as n}from"./drag-ghost-B7UAYefM.mjs";const h=(e,s=0)=>t(e)?{clientX:e.touches[s].clientX,clientY:e.touches[s].clientY}:{clientX:e.clientX,clientY:e.clientY},o=e=>!e||!t(e)||e.touches.length>0;class _{_touchDragTimeOut;_onTouchDragStart;_payload=null;_delay=500;_firstTouch=null;_lastTouch=null;_epsilon=10;constructor(t,{onTouchDragStart:e},s={}){this._payload=t,this._onTouchDragStart=e,this._delay="number"==typeof s.delay?s.delay:500,this._epsilon="number"==typeof s.epsilon?s.epsilon:10}onStart(e){o(e)&&(this._touchDragTimeOut||(this._firstTouch=h(e,t(e)?e.touches.length-1:0),this._touchDragTimeOut=setTimeout(()=>{this._clearTimeout(),this._lastTouch||(this._lastTouch=h(e)),this._checkXDistance(e)()},this._delay)))}onEnd(){this._resetTouches()}onMove(t){o(t)&&(this._lastTouch=h(t))}_clearTimeout(){this._touchDragTimeOut&&(clearTimeout(this._touchDragTimeOut),this._touchDragTimeOut=null)}_resetTouches(){this._clearTimeout(),this._lastTouch=null,this._firstTouch=null,this._payload=null}_checkXDistance(t){return()=>{if(!this._firstTouch||!this._lastTouch)return;let e=!1;e=Math.abs(this._firstTouch.clientX-this._lastTouch.clientX)<this._epsilon,e&&(this._onTouchDragStart(this._payload,t),this._resetTouches())}}}const l=t=>{t.preventDefault(),t.stopPropagation()};class g{_startX=0;_startY=0;_lastX=0;_lastY=0;_epsilon;_isWaiting=!1;_onCustomDragStart;constructor({onCustomDragStart:t},e={}){this._epsilon="number"==typeof e.epsilon?e.epsilon:15,this._onCustomDragStart=t}onMove(t){this._lastX=t.clientX,this._lastY=t.clientY,this._isWaiting&&((t,e)=>{const s=this._lastX-t,i=this._lastY-e;return Math.sqrt(s*s+i*i)})(this._startX,this._startY)>this._epsilon&&(this._onCustomDragStart(t),this._isWaiting=!1)}onStart(t){this._startX=t.clientX,this._startY=t.clientY,this.onMove(t),this._isWaiting=!0}onEnd(){this._reset()}_reset(){this._startX=0,this._startY=0,this._lastX=0,this._lastY=0,this._isWaiting=!1}}const c="data-rml-old-draggable",u=(e,s)=>{const i=t(e),a={delay:i?500:100,epsilon:i?10:15};if(!s)return a;if(!(i||e instanceof MouseEvent))return a;const{delayKey:r,epsilonKey:n}=i?{delayKey:"touchDragDelay",epsilonKey:"touchDragEpsilon"}:{delayKey:"customDragDelay",epsilonKey:"customDragEpsilon"};return"number"==typeof s[r]&&(a.delay=s.touchDragDelay),"number"==typeof s[n]&&(a.epsilon=s.touchDragEpsilon),a};class d{_options={};_instance;_mainDomElement;_viewName;_currentCustomDrag=null;_currentBb=null;_startTarget=null;_dragGhost=null;_onBeforeUpdateDrag=()=>({});isDragging=!1;_hasEnteredIframe=!1;_pendingDragIn=null;_canvasBb=null;_overlayBb=null;_dragGeneration=0;_interactionContainerBb=null;constructor(t,e,s,i){this._instance=t,this._options=s||{},this._viewName=i,this._mainDomElement=e,this._mainDomElement.parentElement?.addEventListener("dragleave",()=>{this._instance.cancelDragIn()})}beforeUpdateGhost(t){this._onBeforeUpdateDrag=t}async _dragStart(t,e,s="rml_id"){const i=++this._dragGeneration;if(this._startTarget&&(this._startTarget.style.pointerEvents="none",this._startTarget.style.userSelect="none",this._startTarget.setAttribute(c,this._startTarget.draggable.toString()),this._startTarget.draggable=!1,this._startTarget.removeEventListener("dragstart",l),this._startTarget.addEventListener("dragstart",l)),this._startTarget){const t=this._startTarget.getBoundingClientRect(),e=this._startTarget.cloneNode(!0);e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,this._dragGhost=new n(e)}else this._dragGhost=new n;var a;this._currentBb=await this._instance.getBoundingClientRect((a=this._viewName,`[data-rml-custom-view="${a}"]`)),this._canvasBb=await this._instance.getBoundingClientRect("canvas"),this._overlayBb=(await this._instance.getDrawerBoundingClientRect()).final,this._interactionContainerBb=await this._instance.getBoundingClientRect(".interaction-container"),i===this._dragGeneration&&(this._pendingDragIn={id:t,type:s},this._hasEnteredIframe=!1,this.isDragging=!0)}_dragUpdate(t){document.body.focus(),this._currentCustomDrag&&this._currentCustomDrag.onMove(t);const{clientX:n,clientY:h}=e(t);if(this._dragGhost){const{width:t,height:e}=this._mainDomElement.getBoundingClientRect();this._dragGhost.updateDragGhost(n,h,{ghost:{visibleIn:{x:0,y:0,width:t,height:e}}})}if(!this._currentBb||!this.isDragging)return;const o=this._currentBb.x+n,_=this._currentBb.y+h,l=s(o,_,this._canvasBb,this._overlayBb,this._interactionContainerBb);if(l&&!this._hasEnteredIframe&&this._pendingDragIn&&(this._instance.dragInObject(this._pendingDragIn.id,o,_,this._pendingDragIn.type),this._hasEnteredIframe=!0),!l&&this._hasEnteredIframe&&(this._instance.cancelDragIn(),this._hasEnteredIframe=!1),!this._hasEnteredIframe)return;const{url:g,width:c,height:u}=(t=>{let e="",s=a,n=i;if(!t)return{url:r,width:s,height:n};const h=t;if(h instanceof HTMLElement){const t=h.getBoundingClientRect(),i=h.getAttribute("data-rml-ghost-url"),a=h.getAttribute("data-rml-ghost-width"),o=h.getAttribute("data-rml-ghost-height");i?e=i:!i&&h instanceof HTMLImageElement&&h.src&&(e=h.src),e?(s=t.width,n=t.height):e=r,s=a?parseInt(a,10):s,n=o?parseInt(o,10):n}return{url:e||r,width:s,height:n}})(this._startTarget),d=this._options||{},m={ghost:{visibleIn:{x:this._currentBb.x-(d.dragInOverlapX||0),y:this._currentBb.y+(d.dragInOverlapY||0),width:this._currentBb.width+(d.dragInOverlapX||0),height:this._currentBb.height+(d.dragInOverlapY||0)},url:g,width:c,height:u},mode:"custom-view"},{x:p,y:D,options:T}=this._onBeforeUpdateDrag(o,_,m),y="number"==typeof p?p:o,b="number"==typeof D?D:_,f=T||m;this._instance.updateDrag(y,b,f)}_dragEnd(){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._currentCustomDrag=null,this.isDragging=!1,this._currentBb=null,this._canvasBb=null,this._overlayBb=null,this._interactionContainerBb=null,this._resetStartTarget(),this._instance.enableEvents(),this._dragGhost&&(this._dragGhost.removeDragGhost(),this._dragGhost=null),this._hasEnteredIframe&&this._instance.dragInObjectEnd(),this._hasEnteredIframe=!1,this._pendingDragIn=null}dragStart(e,s,i){this._instance.disableEvents(),this._startTarget=s.target,this._currentCustomDrag=t(s)?new _(void 0,{onTouchDragStart:(t,s)=>{this._dragStart(e,s,i)}},{...u(s,this._options),delay:0}):new g({onCustomDragStart:t=>this._dragStart(e,t,i)},u(s,this._options)),this._currentCustomDrag.onStart(s)}dragEnd(){this._dragEnd()}dragUpdate(t){this._dragUpdate(t)}touchStart(t,e,s="rml_id"){this.dragStart(t,e,s)}touchMove(t){this.dragUpdate(t)}touchEnd(){this.dragEnd()}dispose(){}_resetStartTarget(){this._startTarget&&(this._startTarget.style.pointerEvents="",this._startTarget.style.userSelect="",this._startTarget.draggable="true"===this._startTarget.getAttribute(c),this._startTarget.removeAttribute(c),this._startTarget.removeEventListener("dragstart",l))}releaseInput(t){this._dragGeneration++,this._dragEnd()}}export{d as DragInFromCustomViewStrategy};
|