@roomle/embedding-lib 6.1.0-alpha.1 → 6.1.0-alpha.2
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 +151 -75
- package/{embedding-plugins-CjNos83d.mjs → embedding-plugins-Cm7O1pKC.mjs} +2 -2
- package/{embedding-plugins-DePKqSKW.mjs → embedding-plugins-Dzhuj1By.mjs} +1 -1
- package/embedding-plugins.js +1 -1
- package/embedding-plugins.min.js +1 -1
- package/from-custom-view-5SS9UqAH.mjs +197 -0
- package/from-custom-view-CfMGS1-t.mjs +1 -0
- package/from-website-CFTjWbqp.mjs +230 -0
- package/from-website-ExTzmsnv.mjs +1 -0
- package/hi.js +1 -1
- package/hi.min.js +1 -1
- package/package.json +1 -1
- package/packages/embedding-lib/src/plugins/strategy/from-custom-view.d.ts +6 -1
- package/packages/embedding-lib/src/plugins/strategy/from-website.d.ts +6 -1
- package/packages/embedding-lib/src/utils.d.ts +1 -0
- package/roomle-embedding-lib.js +3 -3
- package/roomle-embedding-lib.min.js +1 -1
- package/{touch-drag-DWISKgWm.mjs → touch-drag-CfMLD_hM.mjs} +1 -1
- package/{touch-drag-BzREygxc.mjs → touch-drag-TGCsdNqP.mjs} +1 -1
- package/utils-BqTPLNLs.mjs +1 -0
- package/utils-Dav4kGNW.mjs +150 -0
- package/from-custom-view-BAiOXktb.mjs +0 -164
- package/from-custom-view-Ch3rb-JF.mjs +0 -1
- package/from-website-B-Vh-DVX.mjs +0 -1
- package/from-website-BicmMNsE.mjs +0 -202
- package/utils-D--vltCL.mjs +0 -113
- package/utils-uEcN1DUR.mjs +0 -1
|
@@ -1,76 +1,152 @@
|
|
|
1
|
-
## 6.1.0-alpha.
|
|
1
|
+
## 6.1.0-alpha.2 (2026-01-27)
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* Merge branch '
|
|
24
|
-
* Merge branch '
|
|
25
|
-
* Merge branch '
|
|
26
|
-
* Merge branch '
|
|
27
|
-
* Merge branch 'master' into
|
|
28
|
-
* Merge
|
|
29
|
-
* Merge
|
|
30
|
-
* Merge
|
|
31
|
-
* Merge
|
|
32
|
-
* Merge
|
|
33
|
-
* Merge
|
|
34
|
-
* Merge
|
|
35
|
-
* Merge
|
|
36
|
-
* Merge
|
|
37
|
-
* Merge
|
|
38
|
-
* Merge
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* fix
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
3
|
+
* fix: add sub-article synchronously ([d2dd315](https://github.com/roomle-dev/roomle-ui/commit/d2dd315))
|
|
4
|
+
* fix: border - change of default color ([e29554d](https://github.com/roomle-dev/roomle-ui/commit/e29554d))
|
|
5
|
+
* fix: clear history after all the external objects are completely loaded ([cf45441](https://github.com/roomle-dev/roomle-ui/commit/cf45441))
|
|
6
|
+
* fix: disable keyboard overlay fix on ios ([aa3513d](https://github.com/roomle-dev/roomle-ui/commit/aa3513d))
|
|
7
|
+
* fix: drag out working on HI ([f92c283](https://github.com/roomle-dev/roomle-ui/commit/f92c283))
|
|
8
|
+
* fix: embedding lib oidc auth workflow name (#2191) ([d08fbf0](https://github.com/roomle-dev/roomle-ui/commit/d08fbf0)), closes [#2191](https://github.com/roomle-dev/roomle-ui/issues/2191)
|
|
9
|
+
* fix: from-website dragin logic ([6301088](https://github.com/roomle-dev/roomle-ui/commit/6301088))
|
|
10
|
+
* fix: layering issue ([908c15a](https://github.com/roomle-dev/roomle-ui/commit/908c15a))
|
|
11
|
+
* fix: lint ([6da9a6c](https://github.com/roomle-dev/roomle-ui/commit/6da9a6c))
|
|
12
|
+
* fix: make getting bounding boxes async ([8d560ad](https://github.com/roomle-dev/roomle-ui/commit/8d560ad))
|
|
13
|
+
* fix: make sure current wall measurment input is not set after drawing finished ([f20281b](https://github.com/roomle-dev/roomle-ui/commit/f20281b))
|
|
14
|
+
* fix: make sure dragged items out and back in do not spawn more items ([67dd0f8](https://github.com/roomle-dev/roomle-ui/commit/67dd0f8))
|
|
15
|
+
* fix: make sure isTextInputFocused is reset when input is unmounted ([b12b2a1](https://github.com/roomle-dev/roomle-ui/commit/b12b2a1))
|
|
16
|
+
* fix: overflow on breadcrumb on long text on multiple catalog view ([245a0f1](https://github.com/roomle-dev/roomle-ui/commit/245a0f1))
|
|
17
|
+
* fix: reactivate snapping after CMD ([04c4afd](https://github.com/roomle-dev/roomle-ui/commit/04c4afd))
|
|
18
|
+
* fix: reset fullscreen correctly if we leave isolation mode ([dd487f3](https://github.com/roomle-dev/roomle-ui/commit/dd487f3))
|
|
19
|
+
* fix: reset fullscreen correctly if we leave isolation mode ([4d1a49f](https://github.com/roomle-dev/roomle-ui/commit/4d1a49f))
|
|
20
|
+
* fix: thumbnail showing in wrong places, fix swapping issues ([22a5125](https://github.com/roomle-dev/roomle-ui/commit/22a5125))
|
|
21
|
+
* chore!: align the ui version to the new sdk version ([fb01aad](https://github.com/roomle-dev/roomle-ui/commit/fb01aad))
|
|
22
|
+
* docs!: align the ui version to the new sdk version ([942b0e2](https://github.com/roomle-dev/roomle-ui/commit/942b0e2))
|
|
23
|
+
* Merge branch 'feat/multiple-levels-catalogs' into feat/nobilia-data-mapping ([fc78536](https://github.com/roomle-dev/roomle-ui/commit/fc78536))
|
|
24
|
+
* Merge branch 'feat/multiple-levels-catalogs' into feat/nobilia-data-mapping ([36ec2c4](https://github.com/roomle-dev/roomle-ui/commit/36ec2c4))
|
|
25
|
+
* Merge branch 'feat/multiple-levels-catalogs' into feat/nobilia-data-mapping ([d394031](https://github.com/roomle-dev/roomle-ui/commit/d394031))
|
|
26
|
+
* Merge branch 'fix/reactivate-snapping-RML-15811' of github.com:roomle-dev/roomle-ui into fix/reactiv ([508eed9](https://github.com/roomle-dev/roomle-ui/commit/508eed9))
|
|
27
|
+
* Merge branch 'master' into cd/consolidate-rubens-workflows ([f5312bd](https://github.com/roomle-dev/roomle-ui/commit/f5312bd))
|
|
28
|
+
* Merge branch 'master' into cd/consolidate-rubens-workflows ([be2f8f3](https://github.com/roomle-dev/roomle-ui/commit/be2f8f3))
|
|
29
|
+
* Merge branch 'master' into cd/consolidate-rubens-workflows ([9159c59](https://github.com/roomle-dev/roomle-ui/commit/9159c59))
|
|
30
|
+
* Merge branch 'master' into chore/get-root-component-name ([b24a3c3](https://github.com/roomle-dev/roomle-ui/commit/b24a3c3))
|
|
31
|
+
* Merge branch 'master' into chore/get-root-component-name ([7c1f4d1](https://github.com/roomle-dev/roomle-ui/commit/7c1f4d1))
|
|
32
|
+
* Merge branch 'master' into feat/multiple-levels-catalogs ([3900958](https://github.com/roomle-dev/roomle-ui/commit/3900958))
|
|
33
|
+
* Merge branch 'master' into feat/multiple-levels-catalogs ([5fb15f7](https://github.com/roomle-dev/roomle-ui/commit/5fb15f7))
|
|
34
|
+
* Merge branch 'master' into feat/multiple-levels-catalogs ([dc04130](https://github.com/roomle-dev/roomle-ui/commit/dc04130))
|
|
35
|
+
* Merge branch 'master' into fix/add-sub-articles ([11b6f19](https://github.com/roomle-dev/roomle-ui/commit/11b6f19))
|
|
36
|
+
* Merge branch 'master' into fix/border-show-all ([e932f00](https://github.com/roomle-dev/roomle-ui/commit/e932f00))
|
|
37
|
+
* Merge branch 'master' into fix/close-full-screen-isolation-mode-RML-15162 ([f0cb1ad](https://github.com/roomle-dev/roomle-ui/commit/f0cb1ad))
|
|
38
|
+
* Merge branch 'master' into fix/disable-keyboard-overlay-fix-ios ([5eeb66f](https://github.com/roomle-dev/roomle-ui/commit/5eeb66f))
|
|
39
|
+
* Merge branch 'master' into fix/fm-pos-broken-safari ([dc4e2bd](https://github.com/roomle-dev/roomle-ui/commit/dc4e2bd))
|
|
40
|
+
* Merge branch 'master' into fix/fm-pos-broken-safari ([9364f37](https://github.com/roomle-dev/roomle-ui/commit/9364f37))
|
|
41
|
+
* Merge branch 'master' into fix/mobile-thumbnails-not-working ([da8f4a3](https://github.com/roomle-dev/roomle-ui/commit/da8f4a3))
|
|
42
|
+
* Merge branch 'master' into fix/mobile-thumbnails-not-working ([6dc4908](https://github.com/roomle-dev/roomle-ui/commit/6dc4908))
|
|
43
|
+
* Merge branch 'master' into fix/nobilia-data-mapping-breadcumb-missing ([9abcaa6](https://github.com/roomle-dev/roomle-ui/commit/9abcaa6))
|
|
44
|
+
* Merge branch 'master' into fix/reactivate-snapping-RML-15811 ([d0e99b2](https://github.com/roomle-dev/roomle-ui/commit/d0e99b2))
|
|
45
|
+
* Merge branch 'master' into fix/unwanted-undo-after-loading ([d1fabc7](https://github.com/roomle-dev/roomle-ui/commit/d1fabc7))
|
|
46
|
+
* Merge branch 'master' into fix/unwanted-undo-after-loading ([6497f77](https://github.com/roomle-dev/roomle-ui/commit/6497f77))
|
|
47
|
+
* Merge branch 'master' into fix/unwanted-undo-after-loading ([3663448](https://github.com/roomle-dev/roomle-ui/commit/3663448))
|
|
48
|
+
* Merge branch 'master' into refactor/drag-in-behavior ([43dd5e0](https://github.com/roomle-dev/roomle-ui/commit/43dd5e0))
|
|
49
|
+
* Merge branch 'master' into refactor/drag-in-behavior ([4c7a7dd](https://github.com/roomle-dev/roomle-ui/commit/4c7a7dd))
|
|
50
|
+
* Merge branch 'master' into refactor/drag-in-behavior ([753fa26](https://github.com/roomle-dev/roomle-ui/commit/753fa26))
|
|
51
|
+
* Merge branch 'master' into refactor/drag-in-behavior ([11544bb](https://github.com/roomle-dev/roomle-ui/commit/11544bb))
|
|
52
|
+
* Merge pull request #2157 from roomle-dev/refactor/drag-in-behavior ([1eef83f](https://github.com/roomle-dev/roomle-ui/commit/1eef83f)), closes [#2157](https://github.com/roomle-dev/roomle-ui/issues/2157)
|
|
53
|
+
* Merge pull request #2164 from roomle-dev/cd/consolidate-rubens-workflows ([872cf4f](https://github.com/roomle-dev/roomle-ui/commit/872cf4f)), closes [#2164](https://github.com/roomle-dev/roomle-ui/issues/2164)
|
|
54
|
+
* Merge pull request #2166 from roomle-dev/fix/reactivate-snapping-RML-15811 ([2a7f08e](https://github.com/roomle-dev/roomle-ui/commit/2a7f08e)), closes [#2166](https://github.com/roomle-dev/roomle-ui/issues/2166)
|
|
55
|
+
* Merge pull request #2169 from roomle-dev/fix/mobile-thumbnails-not-working ([c5ea141](https://github.com/roomle-dev/roomle-ui/commit/c5ea141)), closes [#2169](https://github.com/roomle-dev/roomle-ui/issues/2169)
|
|
56
|
+
* Merge pull request #2171 from roomle-dev/fix/close-full-screen-isolation-mode-RML-15162 ([9c63a23](https://github.com/roomle-dev/roomle-ui/commit/9c63a23)), closes [#2171](https://github.com/roomle-dev/roomle-ui/issues/2171)
|
|
57
|
+
* Merge pull request #2172 from roomle-dev/style/centering-grid-view-icons ([36f07fb](https://github.com/roomle-dev/roomle-ui/commit/36f07fb)), closes [#2172](https://github.com/roomle-dev/roomle-ui/issues/2172)
|
|
58
|
+
* Merge pull request #2173 from roomle-dev/upgraded-by-ci/core-2.68.0-alpha.4 ([d64aa14](https://github.com/roomle-dev/roomle-ui/commit/d64aa14)), closes [#2173](https://github.com/roomle-dev/roomle-ui/issues/2173)
|
|
59
|
+
* Merge pull request #2175 from roomle-dev/chore/get-root-component-name ([0a02ea1](https://github.com/roomle-dev/roomle-ui/commit/0a02ea1)), closes [#2175](https://github.com/roomle-dev/roomle-ui/issues/2175)
|
|
60
|
+
* Merge pull request #2176 from roomle-dev/fix/add-sub-articles ([9117203](https://github.com/roomle-dev/roomle-ui/commit/9117203)), closes [#2176](https://github.com/roomle-dev/roomle-ui/issues/2176)
|
|
61
|
+
* Merge pull request #2177 from roomle-dev/fix/fm-pos-broken-safari ([6eb7ca5](https://github.com/roomle-dev/roomle-ui/commit/6eb7ca5)), closes [#2177](https://github.com/roomle-dev/roomle-ui/issues/2177)
|
|
62
|
+
* Merge pull request #2178 from roomle-dev/fix/border-show-all ([16c6fa2](https://github.com/roomle-dev/roomle-ui/commit/16c6fa2)), closes [#2178](https://github.com/roomle-dev/roomle-ui/issues/2178)
|
|
63
|
+
* Merge pull request #2179 from roomle-dev/upgraded-by-ci/core-2.68.0-alpha.5 ([9f10e3d](https://github.com/roomle-dev/roomle-ui/commit/9f10e3d)), closes [#2179](https://github.com/roomle-dev/roomle-ui/issues/2179)
|
|
64
|
+
* Merge pull request #2180 from roomle-dev/fix/unwanted-undo-after-loading ([96e0ab2](https://github.com/roomle-dev/roomle-ui/commit/96e0ab2)), closes [#2180](https://github.com/roomle-dev/roomle-ui/issues/2180)
|
|
65
|
+
* Merge pull request #2181 from roomle-dev/fix/disable-keyboard-overlay-fix-ios ([0b249a4](https://github.com/roomle-dev/roomle-ui/commit/0b249a4)), closes [#2181](https://github.com/roomle-dev/roomle-ui/issues/2181)
|
|
66
|
+
* Merge pull request #2183 from roomle-dev/feat/multiple-levels-catalogs ([75b299f](https://github.com/roomle-dev/roomle-ui/commit/75b299f)), closes [#2183](https://github.com/roomle-dev/roomle-ui/issues/2183)
|
|
67
|
+
* Merge pull request #2184 from roomle-dev/feat/nobilia-data-mapping ([5a9da53](https://github.com/roomle-dev/roomle-ui/commit/5a9da53)), closes [#2184](https://github.com/roomle-dev/roomle-ui/issues/2184)
|
|
68
|
+
* Merge pull request #2186 from roomle-dev/style/show-more-text-alignment ([367d8b9](https://github.com/roomle-dev/roomle-ui/commit/367d8b9)), closes [#2186](https://github.com/roomle-dev/roomle-ui/issues/2186)
|
|
69
|
+
* Merge pull request #2187 from roomle-dev/cd/keep-preview-apps-on-test-bucket ([4b00512](https://github.com/roomle-dev/roomle-ui/commit/4b00512)), closes [#2187](https://github.com/roomle-dev/roomle-ui/issues/2187)
|
|
70
|
+
* Merge pull request #2188 from roomle-dev/fix/lights-error-gik-catalog ([a0be19d](https://github.com/roomle-dev/roomle-ui/commit/a0be19d)), closes [#2188](https://github.com/roomle-dev/roomle-ui/issues/2188)
|
|
71
|
+
* Merge pull request #2189 from roomle-dev/fix/nobilia-data-mapping-breadcumb-missing ([ab2109c](https://github.com/roomle-dev/roomle-ui/commit/ab2109c)), closes [#2189](https://github.com/roomle-dev/roomle-ui/issues/2189)
|
|
72
|
+
* chore: add guidelines for coding agents ([f745641](https://github.com/roomle-dev/roomle-ui/commit/f745641))
|
|
73
|
+
* chore: add more agents.md stuff ([70adfc8](https://github.com/roomle-dev/roomle-ui/commit/70adfc8))
|
|
74
|
+
* chore: add some tests ([6360ef3](https://github.com/roomle-dev/roomle-ui/commit/6360ef3))
|
|
75
|
+
* chore: add test ([4813f53](https://github.com/roomle-dev/roomle-ui/commit/4813f53))
|
|
76
|
+
* chore: add tests ([d4409ee](https://github.com/roomle-dev/roomle-ui/commit/d4409ee))
|
|
77
|
+
* chore: add tests ([8d3c3b5](https://github.com/roomle-dev/roomle-ui/commit/8d3c3b5))
|
|
78
|
+
* chore: add ts ignore for errors for now to fix it later ([345eeda](https://github.com/roomle-dev/roomle-ui/commit/345eeda))
|
|
79
|
+
* chore: adjust breadcrumb changes ([5e89c41](https://github.com/roomle-dev/roomle-ui/commit/5e89c41))
|
|
80
|
+
* chore: allow drag-in -> drag-out -> drag-in ([36a6590](https://github.com/roomle-dev/roomle-ui/commit/36a6590))
|
|
81
|
+
* chore: apply code review changes ([a1250cb](https://github.com/roomle-dev/roomle-ui/commit/a1250cb))
|
|
82
|
+
* chore: apply code review suggestions ([b2acbed](https://github.com/roomle-dev/roomle-ui/commit/b2acbed))
|
|
83
|
+
* chore: apply design feedback ([61aef2b](https://github.com/roomle-dev/roomle-ui/commit/61aef2b))
|
|
84
|
+
* chore: clean up mock files ([81c9906](https://github.com/roomle-dev/roomle-ui/commit/81c9906))
|
|
85
|
+
* chore: clean up test ([b0f25b0](https://github.com/roomle-dev/roomle-ui/commit/b0f25b0))
|
|
86
|
+
* chore: cleanup ([063f1e5](https://github.com/roomle-dev/roomle-ui/commit/063f1e5))
|
|
87
|
+
* chore: cleanup ([3d2257c](https://github.com/roomle-dev/roomle-ui/commit/3d2257c))
|
|
88
|
+
* chore: cleanup ([fa58db7](https://github.com/roomle-dev/roomle-ui/commit/fa58db7))
|
|
89
|
+
* chore: correctly refactor the code ([48e4794](https://github.com/roomle-dev/roomle-ui/commit/48e4794))
|
|
90
|
+
* chore: do code polishing and adapt the design ([1aa9db2](https://github.com/roomle-dev/roomle-ui/commit/1aa9db2))
|
|
91
|
+
* chore: finalize in-app drag-in logic ([c542b38](https://github.com/roomle-dev/roomle-ui/commit/c542b38))
|
|
92
|
+
* chore: fix linting ([cb9abc9](https://github.com/roomle-dev/roomle-ui/commit/cb9abc9))
|
|
93
|
+
* chore: fix tests ([da41ecc](https://github.com/roomle-dev/roomle-ui/commit/da41ecc))
|
|
94
|
+
* chore: fix tests ([2c1933f](https://github.com/roomle-dev/roomle-ui/commit/2c1933f))
|
|
95
|
+
* chore: fix type error ([a7e7023](https://github.com/roomle-dev/roomle-ui/commit/a7e7023))
|
|
96
|
+
* chore: fix: missing optional chain ([bd45715](https://github.com/roomle-dev/roomle-ui/commit/bd45715))
|
|
97
|
+
* chore: get drag images working ([16952ac](https://github.com/roomle-dev/roomle-ui/commit/16952ac))
|
|
98
|
+
* chore: get root id from config hash instead ([07b72fd](https://github.com/roomle-dev/roomle-ui/commit/07b72fd))
|
|
99
|
+
* chore: get selection working ([2e0a9e4](https://github.com/roomle-dev/roomle-ui/commit/2e0a9e4))
|
|
100
|
+
* chore: handle long breadcrumb list ([6876c12](https://github.com/roomle-dev/roomle-ui/commit/6876c12))
|
|
101
|
+
* chore: ignore ts errors for now ([44b6ce0](https://github.com/roomle-dev/roomle-ui/commit/44b6ce0))
|
|
102
|
+
* chore: lint ([2cfc1e1](https://github.com/roomle-dev/roomle-ui/commit/2cfc1e1))
|
|
103
|
+
* chore: merge master ([f635162](https://github.com/roomle-dev/roomle-ui/commit/f635162))
|
|
104
|
+
* chore: move the filter icon to the left ([3036997](https://github.com/roomle-dev/roomle-ui/commit/3036997))
|
|
105
|
+
* chore: move uncategorised data to the menu end ([acba1b3](https://github.com/roomle-dev/roomle-ui/commit/acba1b3))
|
|
106
|
+
* chore: only spawn item in if the dragging is inside the iframe ([ebba64b](https://github.com/roomle-dev/roomle-ui/commit/ebba64b))
|
|
107
|
+
* chore: reduce code duplication by creating a shared computed ([e2238d3](https://github.com/roomle-dev/roomle-ui/commit/e2238d3))
|
|
108
|
+
* chore: refactor tests, simplify thumb gen function ([e2e064e](https://github.com/roomle-dev/roomle-ui/commit/e2e064e))
|
|
109
|
+
* chore: refactor, make reusable ([1832b68](https://github.com/roomle-dev/roomle-ui/commit/1832b68))
|
|
110
|
+
* chore: remove confusing warning ([4b565d1](https://github.com/roomle-dev/roomle-ui/commit/4b565d1))
|
|
111
|
+
* chore: remove debugger ([5735c78](https://github.com/roomle-dev/roomle-ui/commit/5735c78))
|
|
112
|
+
* chore: remove excessive mocks from test ([de93218](https://github.com/roomle-dev/roomle-ui/commit/de93218))
|
|
113
|
+
* chore: remove uneeded keyboard handlers ([fed565f](https://github.com/roomle-dev/roomle-ui/commit/fed565f))
|
|
114
|
+
* chore: simplify thumbnail logic so computeds don't reevaluate so often. ([26a2e30](https://github.com/roomle-dev/roomle-ui/commit/26a2e30))
|
|
115
|
+
* chore: solve some css issue ([582c918](https://github.com/roomle-dev/roomle-ui/commit/582c918))
|
|
116
|
+
* chore: use correct formatting ([3fd5c51](https://github.com/roomle-dev/roomle-ui/commit/3fd5c51))
|
|
117
|
+
* chore: use ref instead of html selector ([c0aec4a](https://github.com/roomle-dev/roomle-ui/commit/c0aec4a))
|
|
118
|
+
* chore: working interaction handler drag-in-out ([c102e1e](https://github.com/roomle-dev/roomle-ui/commit/c102e1e))
|
|
119
|
+
* chore: working sidebar detection ([22f364e](https://github.com/roomle-dev/roomle-ui/commit/22f364e))
|
|
120
|
+
* cd: add conventionalcommits plugin to gha step ([c2c4d3b](https://github.com/roomle-dev/roomle-ui/commit/c2c4d3b))
|
|
121
|
+
* cd: add extra_plugin for conventionalcommits ([1b002dc](https://github.com/roomle-dev/roomle-ui/commit/1b002dc))
|
|
122
|
+
* cd: consolidate rubens deploy workflows ([9eaed98](https://github.com/roomle-dev/roomle-ui/commit/9eaed98))
|
|
123
|
+
* cd: fix rollback path ([ff3c507](https://github.com/roomle-dev/roomle-ui/commit/ff3c507))
|
|
124
|
+
* cd: handle br changes with highest prio ([f8a88a7](https://github.com/roomle-dev/roomle-ui/commit/f8a88a7))
|
|
125
|
+
* cd: log configurator bucket name ([edf7673](https://github.com/roomle-dev/roomle-ui/commit/edf7673))
|
|
126
|
+
* cd: remove breaking release rule ([4a9d8ab](https://github.com/roomle-dev/roomle-ui/commit/4a9d8ab))
|
|
127
|
+
* cd: remove delete unmatched destination objects ([2a23c60](https://github.com/roomle-dev/roomle-ui/commit/2a23c60))
|
|
128
|
+
* cd: remove dev branch trigger ([d43d0d9](https://github.com/roomle-dev/roomle-ui/commit/d43d0d9))
|
|
129
|
+
* cd: remove dev workflow trigger ([553cec1](https://github.com/roomle-dev/roomle-ui/commit/553cec1))
|
|
130
|
+
* cd: remove dev workflow trigger ([045dd1d](https://github.com/roomle-dev/roomle-ui/commit/045dd1d))
|
|
131
|
+
* cd: remove extra plugin ([15681bb](https://github.com/roomle-dev/roomle-ui/commit/15681bb))
|
|
132
|
+
* style: add some hover effect for menu items ([02e184a](https://github.com/roomle-dev/roomle-ui/commit/02e184a))
|
|
133
|
+
* style: align filter icon on the left ([1987dc7](https://github.com/roomle-dev/roomle-ui/commit/1987dc7))
|
|
134
|
+
* style: center grid view icons ([369f19b](https://github.com/roomle-dev/roomle-ui/commit/369f19b))
|
|
135
|
+
* style: decrease max height a bit on mobile ([596ad5c](https://github.com/roomle-dev/roomle-ui/commit/596ad5c))
|
|
136
|
+
* style: introduce slight margin ([5b5586b](https://github.com/roomle-dev/roomle-ui/commit/5b5586b))
|
|
137
|
+
* style: make header image smaller ([51fd5b8](https://github.com/roomle-dev/roomle-ui/commit/51fd5b8))
|
|
138
|
+
* style: removed space ([085b55e](https://github.com/roomle-dev/roomle-ui/commit/085b55e))
|
|
139
|
+
* feat: build multi-levels catalog structure ([a405a76](https://github.com/roomle-dev/roomle-ui/commit/a405a76))
|
|
140
|
+
* feat: getting the label by root component ([f13bc94](https://github.com/roomle-dev/roomle-ui/commit/f13bc94))
|
|
141
|
+
* feat: map nobilia data to render it inside catalog levels view ([e616543](https://github.com/roomle-dev/roomle-ui/commit/e616543))
|
|
142
|
+
* feat: show thumbnail on mobile ([e7a72f0](https://github.com/roomle-dev/roomle-ui/commit/e7a72f0))
|
|
143
|
+
* feat(core): upgrade to version 2.68.0-alpha.4 ([5e42655](https://github.com/roomle-dev/roomle-ui/commit/5e42655))
|
|
144
|
+
* feat(core): upgrade to version 2.68.0-alpha.5 ([1fb4334](https://github.com/roomle-dev/roomle-ui/commit/1fb4334))
|
|
145
|
+
* feat(core): upgrade to version 2.68.0 ([efdaac8](https://github.com/roomle-dev/roomle-ui/commit/efdaac8))
|
|
146
|
+
* test: adapt existing tests ([9679438](https://github.com/roomle-dev/roomle-ui/commit/9679438))
|
|
147
|
+
* test: adapt tests to async cancelDragin ([876d816](https://github.com/roomle-dev/roomle-ui/commit/876d816))
|
|
148
|
+
* test: add integration test for new drag-in composable ([00af5c3](https://github.com/roomle-dev/roomle-ui/commit/00af5c3))
|
|
149
|
+
* test: fix e2e test to ensure the drag update occurs ([2e4a24d](https://github.com/roomle-dev/roomle-ui/commit/2e4a24d))
|
|
150
|
+
* test: make test works ([8606eba](https://github.com/roomle-dev/roomle-ui/commit/8606eba))
|
|
151
|
+
* test: recursive fetching of catalog builder ([ab35b55](https://github.com/roomle-dev/roomle-ui/commit/ab35b55))
|
|
152
|
+
* refactor: use existing overlay BBOX getter ([2574892](https://github.com/roomle-dev/roomle-ui/commit/2574892))
|
|
@@ -41,7 +41,7 @@ class E extends I {
|
|
|
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-CFTjWbqp.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-5SS9UqAH.mjs");
|
|
56
56
|
this._strategy = new t(
|
|
57
57
|
this._instance,
|
|
58
58
|
this._mainDomElement,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t="rml-drag-in-styles",e="rml-drag-in-drag-element",s="rml-drag-in-overlay",a="rml-drag-in-drag-ghost",r="rml-drag-in-fade-in",i="rml-drag-in-fade-out",n={DISPLAY_NONE:"rml-display-none"},o="250ms",d="forwards",m=`@keyframes ${r} {from{opacity: 0;}to {opacity: 0.5;}}`,g=`@keyframes ${i} {from{opacity: 0.5;}to {opacity: 0;}}`,l=`${r} ${o} ${d}`,c=`${i} ${o} ${d}`,h="https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",u=112,p=112;class _{_mainDomElement;_instance;_mode="website";_viewName="main";constructor(t,e,s,a){this._instance=t,this._mainDomElement=e,this._mode=s,this._viewName=a}async init(){return Promise.resolve()}}class y extends _{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 .${s}{position:absolute;top:0;left:0;width:100%;height:100%;z-index:999;}\n .${a}{position:absolute;top:0;left:0;width:1px;height:1px;z-index:999;pointer-events:none;background-color:transparent;}\n ${m}\n ${g}\n `,document.head.appendChild(e)}}_initializeDragGhost(){const t=this._mainDomElement.parentNode;let e=t.querySelector("."+a);e||(e=document.createElement("div"),e.classList.add(a),e.innerText=" ",t.appendChild(e))}constructor(t,e,s,a){super(t,e,s,a),this._mainDomElement=e,this._injectStyles(),this._initializeDragGhost()}async init(){if(await super.init(),"website"===this._mode)try{const{DragInFromWebsiteStrategy:t}=await import("./from-website-
|
|
1
|
+
const t="rml-drag-in-styles",e="rml-drag-in-drag-element",s="rml-drag-in-overlay",a="rml-drag-in-drag-ghost",r="rml-drag-in-fade-in",i="rml-drag-in-fade-out",n={DISPLAY_NONE:"rml-display-none"},o="250ms",d="forwards",m=`@keyframes ${r} {from{opacity: 0;}to {opacity: 0.5;}}`,g=`@keyframes ${i} {from{opacity: 0.5;}to {opacity: 0;}}`,l=`${r} ${o} ${d}`,c=`${i} ${o} ${d}`,h="https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",u=112,p=112;class _{_mainDomElement;_instance;_mode="website";_viewName="main";constructor(t,e,s,a){this._instance=t,this._mainDomElement=e,this._mode=s,this._viewName=a}async init(){return Promise.resolve()}}class y extends _{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 .${s}{position:absolute;top:0;left:0;width:100%;height:100%;z-index:999;}\n .${a}{position:absolute;top:0;left:0;width:1px;height:1px;z-index:999;pointer-events:none;background-color:transparent;}\n ${m}\n ${g}\n `,document.head.appendChild(e)}}_initializeDragGhost(){const t=this._mainDomElement.parentNode;let e=t.querySelector("."+a);e||(e=document.createElement("div"),e.classList.add(a),e.innerText=" ",t.appendChild(e))}constructor(t,e,s,a){super(t,e,s,a),this._mainDomElement=e,this._injectStyles(),this._initializeDragGhost()}async init(){if(await super.init(),"website"===this._mode)try{const{DragInFromWebsiteStrategy:t}=await import("./from-website-ExTzmsnv.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-CfMGS1-t.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,s="rml_id"){this._strategy.dragStart(t,e,s)}dragUpdate(t){this._strategy.dragUpdate(t)}dragEnd(){this._strategy.dragEnd()}touchStart(t,e,s="rml_id"){this._strategy.touchStart(t,e,s)}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:s,beforeUpdateGhost:a}){a&&this._strategy.beforeUpdateGhost(a);const r=this._customDragSignal.signal,i=e=>{"true"===e.target.getAttribute("data-rml-draggable")&&t(e)},n=t=>{this._strategy.releaseInput(t),this._strategy.isDragging&&e(t)},o=t=>{s(t)};document.querySelectorAll('[data-rml-draggable="true"]').forEach(t=>{t.draggable=!1}),document.addEventListener("mousedown",i,{signal:r}),document.addEventListener("mouseup",n,{signal:r}),document.addEventListener("mousemove",o,{signal:r}),document.addEventListener("mouseleave",n,{signal:r}),document.addEventListener("touchstart",i,{signal:r}),document.addEventListener("touchend",n,{signal:r}),document.addEventListener("touchmove",o,{signal:r})}unregisterCustomDrag(){this._customDragSignal.abort(),this._customDragSignal=new AbortController}releaseInput(t){this._strategy.releaseInput(t)}}const D=Object.freeze(Object.defineProperty({__proto__:null,DragIn:y},Symbol.toStringTag,{value:"Module"}));export{y as D,e as R,t as a,m as b,g as c,h as d,u as e,p as f,l as g,c as h,s as i,n as j,a as k,D as l};
|
package/embedding-plugins.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as R, g as D, b as G, h as L, c as I, R as T, f as S, d as a, e as M, a as N } from "./embedding-plugins-
|
|
1
|
+
import { D as R, g as D, b as G, h as L, c as I, R as T, f as S, d as a, e as M, a as N } from "./embedding-plugins-Cm7O1pKC.mjs";
|
|
2
2
|
export {
|
|
3
3
|
R as DragIn,
|
|
4
4
|
D as RML_DRAG_GHOST_FADE_IN,
|
package/embedding-plugins.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as _,g as A,b as a,h as s,c as R,R as D,f as G,d as L,e as I,a as T}from"./embedding-plugins-
|
|
1
|
+
import{D as _,g as A,b as a,h as s,c as R,R as D,f as G,d as L,e as I,a as T}from"./embedding-plugins-Dzhuj1By.mjs";export{_ as DragIn,A as RML_DRAG_GHOST_FADE_IN,a as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS,s 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,L as RML_DRAG_IN_FALLBACK_GHOST_URL,I as RML_DRAG_IN_FALLBACK_GHOST_WIDTH,T as RML_DRAG_IN_STYLES_ID};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { e as O, b as D, i as b } from "./utils-Dav4kGNW.mjs";
|
|
2
|
+
import { C as v, T as A, a as L, b as w, c as Y } from "./touch-drag-CfMLD_hM.mjs";
|
|
3
|
+
import { f as G, e as R, d as c } from "./embedding-plugins-Cm7O1pKC.mjs";
|
|
4
|
+
const X = (r) => `[data-rml-custom-view="${r}"]`, g = (r) => {
|
|
5
|
+
r.preventDefault(), r.stopPropagation();
|
|
6
|
+
}, U = (r, t, s, e) => {
|
|
7
|
+
const a = s - r, n = e - t;
|
|
8
|
+
return Math.sqrt(a * a + n * n);
|
|
9
|
+
};
|
|
10
|
+
class M {
|
|
11
|
+
_startX = 0;
|
|
12
|
+
_startY = 0;
|
|
13
|
+
_lastX = 0;
|
|
14
|
+
_lastY = 0;
|
|
15
|
+
_epsilon;
|
|
16
|
+
_isWaiting = !1;
|
|
17
|
+
_onCustomDragStart;
|
|
18
|
+
constructor({ onCustomDragStart: t }, s = {}) {
|
|
19
|
+
this._epsilon = typeof s.epsilon == "number" ? s.epsilon : v, this._onCustomDragStart = t;
|
|
20
|
+
}
|
|
21
|
+
onMove(t) {
|
|
22
|
+
this._lastX = t.clientX, this._lastY = t.clientY, this._isWaiting && U(
|
|
23
|
+
this._startX,
|
|
24
|
+
this._startY,
|
|
25
|
+
this._lastX,
|
|
26
|
+
this._lastY
|
|
27
|
+
) > this._epsilon && (this._onCustomDragStart(t), this._isWaiting = !1);
|
|
28
|
+
}
|
|
29
|
+
onStart(t) {
|
|
30
|
+
this._startX = t.clientX, this._startY = t.clientY, this.onMove(t), this._isWaiting = !0;
|
|
31
|
+
}
|
|
32
|
+
onEnd() {
|
|
33
|
+
this._reset();
|
|
34
|
+
}
|
|
35
|
+
_reset() {
|
|
36
|
+
this._startX = 0, this._startY = 0, this._lastX = 0, this._lastY = 0, this._isWaiting = !1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const l = "data-rml-old-draggable", H = void 0, p = (r, t) => {
|
|
40
|
+
const s = b(r), e = {
|
|
41
|
+
delay: s ? w : Y,
|
|
42
|
+
epsilon: s ? L : v
|
|
43
|
+
};
|
|
44
|
+
if (!t)
|
|
45
|
+
return e;
|
|
46
|
+
if (!s && !(r instanceof MouseEvent))
|
|
47
|
+
return console.warn(
|
|
48
|
+
"Unsupported event! It is not TouchEvent and also not MouseEvent"
|
|
49
|
+
), e;
|
|
50
|
+
const {
|
|
51
|
+
delayKey: a,
|
|
52
|
+
epsilonKey: n
|
|
53
|
+
} = s ? { delayKey: "touchDragDelay", epsilonKey: "touchDragEpsilon" } : { delayKey: "customDragDelay", epsilonKey: "customDragEpsilon" };
|
|
54
|
+
return typeof t[a] == "number" && (e.delay = t.touchDragDelay), typeof t[n] == "number" && (e.epsilon = t.touchDragEpsilon), e;
|
|
55
|
+
}, x = (r) => {
|
|
56
|
+
let t = "", s = R, e = G;
|
|
57
|
+
if (!r)
|
|
58
|
+
return { url: c, width: s, height: e };
|
|
59
|
+
const a = r;
|
|
60
|
+
if (a instanceof HTMLElement) {
|
|
61
|
+
const n = a.getBoundingClientRect(), i = a.getAttribute("data-rml-ghost-url"), h = a.getAttribute("data-rml-ghost-width"), o = a.getAttribute("data-rml-ghost-height");
|
|
62
|
+
i ? t = i : !i && a instanceof HTMLImageElement && a.src && (t = a.src), t ? (s = n.width, e = n.height) : t = c, s = h ? parseInt(h, 10) : s, e = o ? parseInt(o, 10) : e;
|
|
63
|
+
}
|
|
64
|
+
return { url: t || c, width: s, height: e };
|
|
65
|
+
};
|
|
66
|
+
class F {
|
|
67
|
+
_options = {};
|
|
68
|
+
_instance;
|
|
69
|
+
_mainDomElement;
|
|
70
|
+
_viewName;
|
|
71
|
+
_currentCustomDrag = null;
|
|
72
|
+
_currentBb = null;
|
|
73
|
+
_startTarget = null;
|
|
74
|
+
_onBeforeUpdateDrag = () => ({});
|
|
75
|
+
isDragging = !1;
|
|
76
|
+
_hasEnteredIframe = !1;
|
|
77
|
+
_pendingDragIn = null;
|
|
78
|
+
_canvasBb = null;
|
|
79
|
+
_overlayBb = null;
|
|
80
|
+
_interactionContainerBb = null;
|
|
81
|
+
constructor(t, s, e, a) {
|
|
82
|
+
this._instance = t, this._options = e || {}, this._viewName = a, this._mainDomElement = s, this._mainDomElement.parentElement?.addEventListener("dragleave", () => {
|
|
83
|
+
this._instance.cancelDragIn();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
beforeUpdateGhost(t) {
|
|
87
|
+
this._onBeforeUpdateDrag = t;
|
|
88
|
+
}
|
|
89
|
+
async _dragStart(t, s, e = "rml_id") {
|
|
90
|
+
this._startTarget && (this._startTarget.style.pointerEvents = "none", this._startTarget.style.userSelect = "none", this._startTarget.setAttribute(
|
|
91
|
+
l,
|
|
92
|
+
this._startTarget.draggable.toString()
|
|
93
|
+
), this._startTarget.draggable = !1, this._startTarget.removeEventListener("dragstart", g), this._startTarget.addEventListener("dragstart", g)), this._currentBb = this._instance.getBoundingClientRect(
|
|
94
|
+
X(this._viewName)
|
|
95
|
+
), this._canvasBb = await this._instance.getBoundingClientRect("canvas"), this._overlayBb = (await this._instance.getDrawerBoundingClientRect()).final, this._interactionContainerBb = await this._instance.getBoundingClientRect(
|
|
96
|
+
".interaction-container"
|
|
97
|
+
), this._pendingDragIn = { id: t, type: e }, this._hasEnteredIframe = !1, this.isDragging = !0;
|
|
98
|
+
}
|
|
99
|
+
_dragUpdate(t) {
|
|
100
|
+
if (document.body.focus(), this._currentCustomDrag && this._currentCustomDrag.onMove(t), !this._currentBb || !this.isDragging)
|
|
101
|
+
return;
|
|
102
|
+
const { clientX: s, clientY: e } = O(t), a = s >= 0 && s <= this._currentBb.width && e >= 0 && e <= this._currentBb.height;
|
|
103
|
+
if (a && !this._hasEnteredIframe && this._pendingDragIn && D(
|
|
104
|
+
s,
|
|
105
|
+
e,
|
|
106
|
+
this._canvasBb,
|
|
107
|
+
this._overlayBb,
|
|
108
|
+
this._interactionContainerBb
|
|
109
|
+
)) {
|
|
110
|
+
const y = this._currentBb.x + s, S = this._currentBb.y + e;
|
|
111
|
+
this._instance.dragInObject(
|
|
112
|
+
this._pendingDragIn.id,
|
|
113
|
+
y,
|
|
114
|
+
S,
|
|
115
|
+
this._pendingDragIn.type
|
|
116
|
+
), this._hasEnteredIframe = !0;
|
|
117
|
+
}
|
|
118
|
+
if (a && this._hasEnteredIframe && this._canvasBb && !D(
|
|
119
|
+
s,
|
|
120
|
+
e,
|
|
121
|
+
this._canvasBb,
|
|
122
|
+
this._overlayBb,
|
|
123
|
+
this._interactionContainerBb
|
|
124
|
+
)) {
|
|
125
|
+
this._instance.cancelDragIn(), this._hasEnteredIframe = !1;
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (!this._hasEnteredIframe)
|
|
129
|
+
return;
|
|
130
|
+
const { url: n, width: i, height: h } = x(this._startTarget), o = this._currentBb.x + s, u = this._currentBb.y + e, _ = this._options || {}, d = {
|
|
131
|
+
ghost: {
|
|
132
|
+
visibleIn: {
|
|
133
|
+
x: this._currentBb.x - (_.dragInOverlapX || 0),
|
|
134
|
+
y: this._currentBb.y + (_.dragInOverlapY || 0),
|
|
135
|
+
width: this._currentBb.width + (_.dragInOverlapX || 0),
|
|
136
|
+
height: this._currentBb.height + (_.dragInOverlapY || 0)
|
|
137
|
+
},
|
|
138
|
+
url: n,
|
|
139
|
+
width: i,
|
|
140
|
+
height: h
|
|
141
|
+
},
|
|
142
|
+
mode: "custom-view"
|
|
143
|
+
}, {
|
|
144
|
+
x: m,
|
|
145
|
+
y: f,
|
|
146
|
+
options: E
|
|
147
|
+
} = this._onBeforeUpdateDrag(o, u, d), B = typeof m == "number" ? m : o, T = typeof f == "number" ? f : u, C = E || d;
|
|
148
|
+
this._instance.updateDrag(B, T, C);
|
|
149
|
+
}
|
|
150
|
+
_dragEnd() {
|
|
151
|
+
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._hasEnteredIframe && this._instance.dragInObjectEnd(), this._hasEnteredIframe = !1, this._pendingDragIn = null;
|
|
152
|
+
}
|
|
153
|
+
dragStart(t, s, e) {
|
|
154
|
+
this._instance.disableEvents(), this._startTarget = s.target;
|
|
155
|
+
const a = (n, i) => {
|
|
156
|
+
this._dragStart(t, i, e);
|
|
157
|
+
};
|
|
158
|
+
this._currentCustomDrag = b(s) ? new A(
|
|
159
|
+
H,
|
|
160
|
+
{
|
|
161
|
+
onTouchDragStart: a
|
|
162
|
+
},
|
|
163
|
+
p(s, this._options)
|
|
164
|
+
) : new M(
|
|
165
|
+
{
|
|
166
|
+
onCustomDragStart: (n) => this._dragStart(t, n, e)
|
|
167
|
+
},
|
|
168
|
+
p(s, this._options)
|
|
169
|
+
), this._currentCustomDrag.onStart(s);
|
|
170
|
+
}
|
|
171
|
+
dragEnd() {
|
|
172
|
+
this._dragEnd();
|
|
173
|
+
}
|
|
174
|
+
dragUpdate(t) {
|
|
175
|
+
this._dragUpdate(t);
|
|
176
|
+
}
|
|
177
|
+
touchStart(t, s, e = "rml_id") {
|
|
178
|
+
this.dragStart(t, s, e);
|
|
179
|
+
}
|
|
180
|
+
touchMove(t) {
|
|
181
|
+
this.dragUpdate(t);
|
|
182
|
+
}
|
|
183
|
+
touchEnd() {
|
|
184
|
+
this.dragEnd();
|
|
185
|
+
}
|
|
186
|
+
dispose() {
|
|
187
|
+
}
|
|
188
|
+
_resetStartTarget() {
|
|
189
|
+
this._startTarget && (this._startTarget.style.pointerEvents = "", this._startTarget.style.userSelect = "", this._startTarget.draggable = this._startTarget.getAttribute(l) === "true", this._startTarget.removeAttribute(l), this._startTarget.removeEventListener("dragstart", g));
|
|
190
|
+
}
|
|
191
|
+
releaseInput(t) {
|
|
192
|
+
this._currentCustomDrag && this._currentCustomDrag.onEnd(), this._resetStartTarget();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
export {
|
|
196
|
+
F as DragInFromCustomViewStrategy
|
|
197
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t,b as e,i as s}from"./utils-BqTPLNLs.mjs";import{C as r,T as a,a as i,b as n,c as h}from"./touch-drag-TGCsdNqP.mjs";import{f as o,e as g,d as _}from"./embedding-plugins-Dzhuj1By.mjs";const l=t=>{t.preventDefault(),t.stopPropagation()};class u{_startX=0;_startY=0;_lastX=0;_lastY=0;_epsilon;_isWaiting=!1;_onCustomDragStart;constructor({onCustomDragStart:t},e={}){this._epsilon="number"==typeof e.epsilon?e.epsilon:r,this._onCustomDragStart=t}onMove(t){this._lastX=t.clientX,this._lastY=t.clientY,this._isWaiting&&((t,e)=>{const s=this._lastX-t,r=this._lastY-e;return Math.sqrt(s*s+r*r)})(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",d=(t,e)=>{const a=s(t),o={delay:a?n:h,epsilon:a?i:r};if(!e)return o;if(!(a||t instanceof MouseEvent))return o;const{delayKey:g,epsilonKey:_}=a?{delayKey:"touchDragDelay",epsilonKey:"touchDragEpsilon"}:{delayKey:"customDragDelay",epsilonKey:"customDragEpsilon"};return"number"==typeof e[g]&&(o.delay=e.touchDragDelay),"number"==typeof e[_]&&(o.epsilon=e.touchDragEpsilon),o};class m{_options={};_instance;_mainDomElement;_viewName;_currentCustomDrag=null;_currentBb=null;_startTarget=null;_onBeforeUpdateDrag=()=>({});isDragging=!1;_hasEnteredIframe=!1;_pendingDragIn=null;_canvasBb=null;_overlayBb=null;_interactionContainerBb=null;constructor(t,e,s,r){this._instance=t,this._options=s||{},this._viewName=r,this._mainDomElement=e,this._mainDomElement.parentElement?.addEventListener("dragleave",()=>{this._instance.cancelDragIn()})}beforeUpdateGhost(t){this._onBeforeUpdateDrag=t}async _dragStart(t,e,s="rml_id"){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._currentBb=this._instance.getBoundingClientRect(`[data-rml-custom-view="${this._viewName}"]`),this._canvasBb=await this._instance.getBoundingClientRect("canvas"),this._overlayBb=(await this._instance.getDrawerBoundingClientRect()).final,this._interactionContainerBb=await this._instance.getBoundingClientRect(".interaction-container"),this._pendingDragIn={id:t,type:s},this._hasEnteredIframe=!1,this.isDragging=!0}_dragUpdate(s){if(document.body.focus(),this._currentCustomDrag&&this._currentCustomDrag.onMove(s),!this._currentBb||!this.isDragging)return;const{clientX:r,clientY:a}=t(s),i=r>=0&&r<=this._currentBb.width&&a>=0&&a<=this._currentBb.height;if(i&&!this._hasEnteredIframe&&this._pendingDragIn&&e(r,a,this._canvasBb,this._overlayBb,this._interactionContainerBb)){const t=this._currentBb.x+r,e=this._currentBb.y+a;this._instance.dragInObject(this._pendingDragIn.id,t,e,this._pendingDragIn.type),this._hasEnteredIframe=!0}if(i&&this._hasEnteredIframe&&this._canvasBb&&!e(r,a,this._canvasBb,this._overlayBb,this._interactionContainerBb))return this._instance.cancelDragIn(),void(this._hasEnteredIframe=!1);if(!this._hasEnteredIframe)return;const{url:n,width:h,height:l}=(t=>{let e="",s=g,r=o;if(!t)return{url:_,width:s,height:r};const a=t;if(a instanceof HTMLElement){const t=a.getBoundingClientRect(),i=a.getAttribute("data-rml-ghost-url"),n=a.getAttribute("data-rml-ghost-width"),h=a.getAttribute("data-rml-ghost-height");i?e=i:!i&&a instanceof HTMLImageElement&&a.src&&(e=a.src),e?(s=t.width,r=t.height):e=_,s=n?parseInt(n,10):s,r=h?parseInt(h,10):r}return{url:e||_,width:s,height:r}})(this._startTarget),u=this._currentBb.x+r,c=this._currentBb.y+a,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:n,width:h,height:l},mode:"custom-view"},{x:p,y:b,options:D}=this._onBeforeUpdateDrag(u,c,m),v="number"==typeof p?p:u,y="number"==typeof b?b:c,B=D||m;this._instance.updateDrag(v,y,B)}_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._hasEnteredIframe&&this._instance.dragInObjectEnd(),this._hasEnteredIframe=!1,this._pendingDragIn=null}dragStart(t,e,r){this._instance.disableEvents(),this._startTarget=e.target,this._currentCustomDrag=s(e)?new a(void 0,{onTouchDragStart:(e,s)=>{this._dragStart(t,s,r)}},d(e,this._options)):new u({onCustomDragStart:e=>this._dragStart(t,e,r)},d(e,this._options)),this._currentCustomDrag.onStart(e)}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._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._resetStartTarget()}}export{m as DragInFromCustomViewStrategy};
|