@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.
@@ -1,76 +1,71 @@
1
- ## 6.5.0-alpha.1 (2026-03-13)
1
+ ## 6.5.0-alpha.3 (2026-03-18)
2
2
 
3
- * Initial plan ([8186de5](https://github.com/roomle-dev/roomle-ui/commit/8186de5))
4
- * Merge branch 'feat/add-flag-for-mesh-raycasting' of github.com:roomle-dev/roomle-ui into feat/add-fl ([f625052](https://github.com/roomle-dev/roomle-ui/commit/f625052))
5
- * Merge branch 'master' into chore/build-examples-alpha-stage ([b6e6487](https://github.com/roomle-dev/roomle-ui/commit/b6e6487))
6
- * Merge branch 'master' into chore/build-examples-alpha-stage ([829fe56](https://github.com/roomle-dev/roomle-ui/commit/829fe56))
7
- * Merge branch 'master' into copilot/fix-buttons-partlist-planner-issue ([7286159](https://github.com/roomle-dev/roomle-ui/commit/7286159))
8
- * Merge branch 'master' into docs/pos-group ([2515b0a](https://github.com/roomle-dev/roomle-ui/commit/2515b0a))
9
- * Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([b0ceb0e](https://github.com/roomle-dev/roomle-ui/commit/b0ceb0e))
10
- * Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([f0820ff](https://github.com/roomle-dev/roomle-ui/commit/f0820ff))
11
- * Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([18399be](https://github.com/roomle-dev/roomle-ui/commit/18399be))
12
- * Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([194a955](https://github.com/roomle-dev/roomle-ui/commit/194a955))
13
- * Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([678d0b4](https://github.com/roomle-dev/roomle-ui/commit/678d0b4))
14
- * Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([cb1a6e5](https://github.com/roomle-dev/roomle-ui/commit/cb1a6e5))
15
- * Merge branch 'master' into fix/close-icon-on-mobile-RML-16254 ([ca6c9a7](https://github.com/roomle-dev/roomle-ui/commit/ca6c9a7))
16
- * Merge branch 'master' into fix/close-icon-on-mobile-RML-16254 ([5f6f231](https://github.com/roomle-dev/roomle-ui/commit/5f6f231))
17
- * Merge branch 'master' into fix/decimal-range-parameter-RML-16233 ([0c2f781](https://github.com/roomle-dev/roomle-ui/commit/0c2f781))
18
- * Merge branch 'master' into fix/decimal-range-parameter-RML-16233 ([66ef3cd](https://github.com/roomle-dev/roomle-ui/commit/66ef3cd))
19
- * Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([39e60d1](https://github.com/roomle-dev/roomle-ui/commit/39e60d1))
20
- * Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([de2a680](https://github.com/roomle-dev/roomle-ui/commit/de2a680))
21
- * Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([1dd07a3](https://github.com/roomle-dev/roomle-ui/commit/1dd07a3))
22
- * Merge branch 'master' into fix/override-translations-RML-16228 ([5c313ee](https://github.com/roomle-dev/roomle-ui/commit/5c313ee))
23
- * Merge branch 'master' into fix/override-translations-RML-16228 ([e16c840](https://github.com/roomle-dev/roomle-ui/commit/e16c840))
24
- * Merge branch 'master' into fix/product-dimension-after-update ([7611522](https://github.com/roomle-dev/roomle-ui/commit/7611522))
25
- * Merge branch 'master' into fix/product-dimension-after-update ([6d049b2](https://github.com/roomle-dev/roomle-ui/commit/6d049b2))
26
- * Merge branch 'master' into fix/product-dimension-after-update ([ee8d143](https://github.com/roomle-dev/roomle-ui/commit/ee8d143))
27
- * Merge branch 'master' into upgraded-by-ci/core-2.72.0-alpha.8 ([eb1c734](https://github.com/roomle-dev/roomle-ui/commit/eb1c734))
28
- * Merge pull request #2383 from roomle-dev/copilot/fix-buttons-partlist-planner-issue ([de1229c](https://github.com/roomle-dev/roomle-ui/commit/de1229c)), closes [#2383](https://github.com/roomle-dev/roomle-ui/issues/2383)
29
- * Merge pull request #2384 from roomle-dev/docs/pos-group ([f4c6a77](https://github.com/roomle-dev/roomle-ui/commit/f4c6a77)), closes [#2384](https://github.com/roomle-dev/roomle-ui/issues/2384)
30
- * Merge pull request #2385 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.3 ([71b0d74](https://github.com/roomle-dev/roomle-ui/commit/71b0d74)), closes [#2385](https://github.com/roomle-dev/roomle-ui/issues/2385)
31
- * Merge pull request #2386 from roomle-dev/fix/override-translations-RML-16228 ([f919a0f](https://github.com/roomle-dev/roomle-ui/commit/f919a0f)), closes [#2386](https://github.com/roomle-dev/roomle-ui/issues/2386)
32
- * Merge pull request #2387 from roomle-dev/fix/decimal-range-parameter-RML-16233 ([0096766](https://github.com/roomle-dev/roomle-ui/commit/0096766)), closes [#2387](https://github.com/roomle-dev/roomle-ui/issues/2387)
33
- * Merge pull request #2388 from roomle-dev/fix/move-wall-nodes-RML-16252 ([7a8b6fa](https://github.com/roomle-dev/roomle-ui/commit/7a8b6fa)), closes [#2388](https://github.com/roomle-dev/roomle-ui/issues/2388)
34
- * Merge pull request #2389 from roomle-dev/fix/radio-toggle-icon-centering-RML-16207 ([6ad4b4a](https://github.com/roomle-dev/roomle-ui/commit/6ad4b4a)), closes [#2389](https://github.com/roomle-dev/roomle-ui/issues/2389)
35
- * Merge pull request #2390 from roomle-dev/fix/missing-param-lbal ([7c9cc59](https://github.com/roomle-dev/roomle-ui/commit/7c9cc59)), closes [#2390](https://github.com/roomle-dev/roomle-ui/issues/2390)
36
- * Merge pull request #2392 from roomle-dev/fix/product-dimension-after-update ([d76eaf2](https://github.com/roomle-dev/roomle-ui/commit/d76eaf2)), closes [#2392](https://github.com/roomle-dev/roomle-ui/issues/2392)
37
- * Merge pull request #2393 from roomle-dev/ci/cancel-duplicate-ci-workflow-run ([bee772f](https://github.com/roomle-dev/roomle-ui/commit/bee772f)), closes [#2393](https://github.com/roomle-dev/roomle-ui/issues/2393)
38
- * Merge pull request #2395 from roomle-dev/fix/close-icon-on-mobile-RML-16254 ([2430c73](https://github.com/roomle-dev/roomle-ui/commit/2430c73)), closes [#2395](https://github.com/roomle-dev/roomle-ui/issues/2395)
39
- * Merge pull request #2396 from roomle-dev/feat/add-flag-for-mesh-raycasting ([0d803d0](https://github.com/roomle-dev/roomle-ui/commit/0d803d0)), closes [#2396](https://github.com/roomle-dev/roomle-ui/issues/2396)
40
- * Merge pull request #2397 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.4 ([2ac6965](https://github.com/roomle-dev/roomle-ui/commit/2ac6965)), closes [#2397](https://github.com/roomle-dev/roomle-ui/issues/2397)
41
- * Merge pull request #2398 from roomle-dev/fix/2-level-catalog-with-custom-data-structure-RML-16263 ([33ba6a7](https://github.com/roomle-dev/roomle-ui/commit/33ba6a7)), closes [#2398](https://github.com/roomle-dev/roomle-ui/issues/2398)
42
- * Merge pull request #2401 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.5 ([e8e14bd](https://github.com/roomle-dev/roomle-ui/commit/e8e14bd)), closes [#2401](https://github.com/roomle-dev/roomle-ui/issues/2401)
43
- * Merge pull request #2402 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.6 ([2aac90d](https://github.com/roomle-dev/roomle-ui/commit/2aac90d)), closes [#2402](https://github.com/roomle-dev/roomle-ui/issues/2402)
44
- * Merge pull request #2403 from roomle-dev/chore/build-examples-alpha-stage ([e15ac89](https://github.com/roomle-dev/roomle-ui/commit/e15ac89)), closes [#2403](https://github.com/roomle-dev/roomle-ui/issues/2403)
45
- * Merge pull request #2404 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.8 ([f334468](https://github.com/roomle-dev/roomle-ui/commit/f334468)), closes [#2404](https://github.com/roomle-dev/roomle-ui/issues/2404)
46
- * feat(sdk): add a new flag to enable raycasting based on meshes ([834f18c](https://github.com/roomle-dev/roomle-ui/commit/834f18c))
47
- * feat(core): upgrade to version 2.72.0-alpha.3 ([d6e47ab](https://github.com/roomle-dev/roomle-ui/commit/d6e47ab))
48
- * feat(core): upgrade to version 2.72.0-alpha.4 ([70c7364](https://github.com/roomle-dev/roomle-ui/commit/70c7364))
49
- * feat(core): upgrade to version 2.72.0-alpha.5 ([1b7e291](https://github.com/roomle-dev/roomle-ui/commit/1b7e291))
50
- * feat(core): upgrade to version 2.72.0-alpha.6 ([0547814](https://github.com/roomle-dev/roomle-ui/commit/0547814))
51
- * feat(core): upgrade to version 2.72.0-alpha.8 ([b6e2e73](https://github.com/roomle-dev/roomle-ui/commit/b6e2e73))
52
- * fix: apply locale fallback to translation overrides for BCP-47 locales ([40c45df](https://github.com/roomle-dev/roomle-ui/commit/40c45df))
53
- * fix: apply precisionInch to unit=inch (not only inchfeet) ([1f60382](https://github.com/roomle-dev/roomle-ui/commit/1f60382))
54
- * fix(design-system): center icon in circle radio toggle by removing SVG descender gap ([f5914b8](https://github.com/roomle-dev/roomle-ui/commit/f5914b8))
55
- * fix: check all items for pipe-delimited detection, not just the first ([28a3781](https://github.com/roomle-dev/roomle-ui/commit/28a3781))
56
- * fix: hide close button in bottom bar when not inside embedding iframe ([8d06d0d](https://github.com/roomle-dev/roomle-ui/commit/8d06d0d))
57
- * fix: hide product list drawer and fallback to room drawer when partlist_planner is false ([4197db3](https://github.com/roomle-dev/roomle-ui/commit/4197db3))
58
- * fix: hide product-list-button when partlist_planner is false and fix prettier ([bf759f1](https://github.com/roomle-dev/roomle-ui/commit/bf759f1))
59
- * fix: respect buttons.partlist_planner option in Room Designer ([a2e230a](https://github.com/roomle-dev/roomle-ui/commit/a2e230a))
60
- * fix: upload all example HTML files with no-cache headers ([4f76de7](https://github.com/roomle-dev/roomle-ui/commit/4f76de7))
61
- * fix: use moveElementToIn2d for wall nodes in 2D mode ([cfc80c1](https://github.com/roomle-dev/roomle-ui/commit/cfc80c1))
62
- * chore: adapt test ([138e2dd](https://github.com/roomle-dev/roomle-ui/commit/138e2dd))
63
- * chore: add any cast to test ([14589f3](https://github.com/roomle-dev/roomle-ui/commit/14589f3))
64
- * chore: build embedding examples for alpha stage deployment ([5028db6](https://github.com/roomle-dev/roomle-ui/commit/5028db6))
65
- * chore: set missing param label ([7a50f5e](https://github.com/roomle-dev/roomle-ui/commit/7a50f5e))
66
- * chore: use default annotation for meshRaycasting ([0ebe749](https://github.com/roomle-dev/roomle-ui/commit/0ebe749))
67
- * test: add missing usePurchasableCount mock to factory2 ([f68fead](https://github.com/roomle-dev/roomle-ui/commit/f68fead))
68
- * test: adjust test to refactored scene event handler ([741af22](https://github.com/roomle-dev/roomle-ui/commit/741af22))
69
- * test: check that product dimensions are updated after update event ([c478418](https://github.com/roomle-dev/roomle-ui/commit/c478418))
70
- * test: verify that addComponentHandlers is called for meshes when meshRaycasting=true ([b36382d](https://github.com/roomle-dev/roomle-ui/commit/b36382d))
71
- * refactor: check meshRaycasting flag directly in event handler ([b855952](https://github.com/roomle-dev/roomle-ui/commit/b855952))
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 g = "rml-drag-in-styles", N = "rml-drag-in-drag-element", D = "rml-drag-in-overlay", i = "rml-drag-in-drag-ghost", c = "rml-drag-in-fade-in", l = "rml-drag-in-fade-out", y = {
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
- }, m = 0.5, h = "250ms", u = "forwards", p = `@keyframes ${c} {from{opacity: 0;}to {opacity: ${m};}}`, S = `@keyframes ${l} {from{opacity: ${m};}to {opacity: 0;}}`, R = `${c} ${h} ${u}`, G = `${l} ${h} ${u}`, T = "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg", b = 112, f = 112;
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, s, o) {
10
- this._instance = t, this._mainDomElement = e, this._mode = s, this._viewName = o;
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(g)) {
20
+ if (!!!document.getElementById(_)) {
21
21
  const e = document.createElement("style");
22
- e.type = "text/css", e.id = g, e.innerHTML = `
23
- .${y.DISPLAY_NONE}{display:none}
24
- .${D}{position:absolute;top:0;left:0;width:100%;height:100%;z-index:999;}
25
- .${i}{position:absolute;top:0;left:0;width:1px;height:1px;z-index:999;pointer-events:none;background-color:transparent;}
26
- ${p}
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
- "." + i
34
+ "." + n
35
35
  );
36
- e || (e = document.createElement("div"), e.classList.add(i), e.innerText = " ", t.appendChild(e));
36
+ e || (e = document.createElement("div"), e.classList.add(n), e.innerText = " ", t.appendChild(e));
37
37
  }
38
- constructor(t, e, s, o) {
39
- super(t, e, s, o), this._mainDomElement = e, this._injectStyles(), this._initializeDragGhost();
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-CFTjWbqp.mjs");
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-5SS9UqAH.mjs");
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, s = "rml_id") {
72
- this._strategy.dragStart(t, e, s);
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, s = "rml_id") {
81
- this._strategy.touchStart(t, e, s);
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: s,
99
- beforeUpdateGhost: o
98
+ customDragUpdate: r,
99
+ beforeUpdateGhost: a
100
100
  }) {
101
- o && this._strategy.beforeUpdateGhost(o);
102
- const r = this._customDragSignal.signal, _ = (a) => {
103
- a.target.getAttribute("data-rml-draggable") === "true" && t(a);
104
- }, n = (a) => {
105
- this._strategy.releaseInput(a), this._strategy.isDragging && e(a);
106
- }, d = (a) => {
107
- s(a);
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((a) => {
110
- a.draggable = !1;
111
- }), document.addEventListener("mousedown", _, { signal: r }), document.addEventListener("mouseup", n, { signal: r }), document.addEventListener("mousemove", d, { signal: r }), document.addEventListener("mouseleave", n, { signal: r }), document.addEventListener("touchstart", _, { signal: r }), document.addEventListener("touchend", n, { signal: r }), document.addEventListener("touchmove", d, { signal: r });
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 M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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
- N as R,
127
- g as a,
128
- p as b,
129
- S as c,
130
- T as d,
131
- b as e,
132
- f,
133
- R as g,
134
- G as h,
135
- D as i,
136
- y as j,
137
- i as k,
138
- M as l
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
  };
@@ -1,13 +1,14 @@
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";
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
- L as RML_DRAG_GHOST_FADE_OUT,
7
- I as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS,
8
- T as RML_DRAG_IN_DRAG_ELEMENT_ID,
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
  };
@@ -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-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};
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};