@havue/drag-and-drop 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 HappyPedestrian
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -370,15 +370,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
370
370
  return openBlock(), createElementBlock("div", {
371
371
  ref_key: "dragItemRef",
372
372
  ref: dragItemRef,
373
- class: normalizeClass(["draggable-area", _ctx.disabled ? "disabled" : ""])
373
+ class: normalizeClass(["hv-draggable", _ctx.disabled ? "disabled" : ""])
374
374
  }, [
375
375
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
376
376
  isDragThis.value ? (openBlock(), createElementBlock("div", {
377
377
  key: 0,
378
- class: "draggable-clone-item",
378
+ class: "hv-draggable__clone-item",
379
379
  style: normalizeStyle(cloneNodeStyle.value)
380
380
  }, [
381
- renderSlot(_ctx.$slots, "drag-item", {}, () => [
381
+ renderSlot(_ctx.$slots, "hv-drag-item", {}, () => [
382
382
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
383
383
  ], true)
384
384
  ], 4)) : createCommentVNode("", true)
@@ -393,7 +393,7 @@ const _export_sfc = (sfc, props) => {
393
393
  }
394
394
  return target;
395
395
  };
396
- const Draggable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-34f8fce1"]]);
396
+ const Draggable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-33722ba1"]]);
397
397
  const _sfc_main = /* @__PURE__ */ defineComponent({
398
398
  ...{
399
399
  name: "HvDroppable"
@@ -460,16 +460,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
460
460
  return openBlock(), createElementBlock("div", {
461
461
  ref_key: "dropAreaRef",
462
462
  ref: dropAreaRef,
463
- class: "droppable-area"
463
+ class: "hv-droppable"
464
464
  }, [
465
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
465
+ renderSlot(_ctx.$slots, "default")
466
466
  ], 512);
467
467
  };
468
468
  }
469
469
  });
470
- const Droppable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-28d651f3"]]);
471
470
  const HvDraggable = withInstall(Draggable);
472
- const HvDroppable = withInstall(Droppable);
471
+ const HvDroppable = withInstall(_sfc_main);
473
472
  export {
474
473
  HvDraggable,
475
474
  HvDroppable
@@ -371,15 +371,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
371
371
  return vue.openBlock(), vue.createElementBlock("div", {
372
372
  ref_key: "dragItemRef",
373
373
  ref: dragItemRef,
374
- class: vue.normalizeClass(["draggable-area", _ctx.disabled ? "disabled" : ""])
374
+ class: vue.normalizeClass(["hv-draggable", _ctx.disabled ? "disabled" : ""])
375
375
  }, [
376
376
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
377
377
  isDragThis.value ? (vue.openBlock(), vue.createElementBlock("div", {
378
378
  key: 0,
379
- class: "draggable-clone-item",
379
+ class: "hv-draggable__clone-item",
380
380
  style: vue.normalizeStyle(cloneNodeStyle.value)
381
381
  }, [
382
- vue.renderSlot(_ctx.$slots, "drag-item", {}, () => [
382
+ vue.renderSlot(_ctx.$slots, "hv-drag-item", {}, () => [
383
383
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
384
384
  ], true)
385
385
  ], 4)) : vue.createCommentVNode("", true)
@@ -394,7 +394,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
394
394
  }
395
395
  return target;
396
396
  };
397
- const Draggable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-34f8fce1"]]);
397
+ const Draggable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-33722ba1"]]);
398
398
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
399
399
  ...{
400
400
  name: "HvDroppable"
@@ -461,16 +461,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
461
461
  return vue.openBlock(), vue.createElementBlock("div", {
462
462
  ref_key: "dropAreaRef",
463
463
  ref: dropAreaRef,
464
- class: "droppable-area"
464
+ class: "hv-droppable"
465
465
  }, [
466
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
466
+ vue.renderSlot(_ctx.$slots, "default")
467
467
  ], 512);
468
468
  };
469
469
  }
470
470
  });
471
- const Droppable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-28d651f3"]]);
472
471
  const HvDraggable = withInstall(Draggable);
473
- const HvDroppable = withInstall(Droppable);
472
+ const HvDroppable = withInstall(_sfc_main);
474
473
  exports2.HvDraggable = HvDraggable;
475
474
  exports2.HvDroppable = HvDroppable;
476
475
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
package/dist/style.css CHANGED
@@ -1,11 +1,11 @@
1
- .draggable-area[data-v-34f8fce1] {
1
+ .hv-draggable[data-v-33722ba1] {
2
2
  width: fit-content;
3
3
  cursor: grab;
4
4
  }
5
- .draggable-area.disabled[data-v-34f8fce1] {
5
+ .hv-draggable.disabled[data-v-33722ba1] {
6
6
  cursor: not-allowed;
7
7
  }
8
- .draggable-clone-item[data-v-34f8fce1] {
8
+ .hv-draggable__clone-item[data-v-33722ba1] {
9
9
  position: fixed;
10
10
  top: 0;
11
11
  left: 0;
@@ -14,7 +14,7 @@
14
14
  cursor: grabbing;
15
15
  opacity: 0.8;
16
16
  will-change: transform;
17
- }.droppable-area[data-v-28d651f3] {
17
+ }.hv-droppable {
18
18
  position: relative;
19
19
  width: fit-content;
20
20
  }
@@ -24,7 +24,7 @@ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
24
24
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
25
25
  default?: (props: typeof __VLS_1) => any;
26
26
  } & {
27
- 'drag-item'?: (props: typeof __VLS_3) => any;
27
+ 'hv-drag-item'?: (props: typeof __VLS_3) => any;
28
28
  } & {
29
29
  default?: (props: typeof __VLS_5) => any;
30
30
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@havue/drag-and-drop",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Drag and drop components for Vue3",
5
5
  "keywords": [
6
6
  "havue",
@@ -16,7 +16,7 @@
16
16
  "url": "git+https://github.com/HappyPedestrian/havue.git"
17
17
  },
18
18
  "dependencies": {
19
- "@havue/shared": "^1.0.0"
19
+ "@havue/shared": "^1.1.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "vue": "^3.3.0"