@hkdigital/lib-sveltekit 0.1.91 → 0.1.93

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.
@@ -23,7 +23,6 @@
23
23
  &.state-can-drop {
24
24
  border-color: rgb(var(--color-success-500));
25
25
  background-color: rgb(var(--color-success-500) / 0.08);
26
- /*transform: scale(1.01);*/
27
26
  box-shadow: 0 0 0 3px rgb(var(--color-success-500) / 0.2);
28
27
  }
29
28
 
@@ -33,11 +32,11 @@
33
32
  cursor: not-allowed;
34
33
  }
35
34
 
36
- &.state-drop-disabled {
35
+ /*&.state-drop-disabled {
37
36
  opacity: 0.5;
38
37
  cursor: not-allowed;
39
38
  background-color: rgb(var(--color-surface-100));
40
- }
39
+ }*/
41
40
  }
42
41
 
43
42
  /* Default styling for inner elements - all visual/customizable */
@@ -13,3 +13,17 @@ export type DragData = {
13
13
  */
14
14
  source?: string;
15
15
  };
16
+ export type SimulatedDragEvent = {
17
+ type: "dragstart" | "dragover" | "dragleave" | "drop" | "dragend";
18
+ clientX: number;
19
+ clientY: number;
20
+ dataTransfer: {
21
+ types: Array<string>;
22
+ getData: Function;
23
+ dropEffect: "none" | "copy" | "link" | "move";
24
+ effectAllowed: "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized";
25
+ files: FileList | any[];
26
+ };
27
+ preventDefault: Function;
28
+ stopPropagation: Function;
29
+ };
@@ -7,4 +7,19 @@
7
7
  * @property {string} [source] - Source identifier
8
8
  */
9
9
 
10
+ /**
11
+ * @typedef {Object} SimulatedDragEvent
12
+ * @property {'dragstart'|'dragover'|'dragleave'|'drop'|'dragend'} type
13
+ * @property {number} clientX
14
+ * @property {number} clientY
15
+ * @property {Object} dataTransfer
16
+ * @property {Array<string>} dataTransfer.types
17
+ * @property {Function} dataTransfer.getData
18
+ * @property {'none'|'copy'|'link'|'move'} dataTransfer.dropEffect
19
+ * @property {'none'|'copy'|'copyLink'|'copyMove'|'link'|'linkMove'|'move'|'all'|'uninitialized'} dataTransfer.effectAllowed
20
+ * @property {FileList|Array} dataTransfer.files
21
+ * @property {Function} preventDefault
22
+ * @property {Function} stopPropagation
23
+ */
24
+
10
25
  export default {}
@@ -10,6 +10,6 @@ export type DropData = {
10
10
  drop: {
11
11
  offsetX: number;
12
12
  offsetY: number;
13
- event: DragEvent;
13
+ target: Element;
14
14
  };
15
15
  };
@@ -6,7 +6,7 @@
6
6
  * @property {string} source
7
7
  * @property {any} item
8
8
  * @property {import('./drag').DragData} drag
9
- * @property {{offsetX: number, offsetY: number, event: DragEvent}} drop
9
+ * @property {{offsetX: number, offsetY: number, target: Element}} drop
10
10
  */
11
11
 
12
12
  export default {};
@@ -9,3 +9,4 @@ export type ImageMeta = {
9
9
  * Single ImageMeta object or array of ImageMeta objects
10
10
  */
11
11
  export type ImageSource = ImageMeta | ImageMeta[];
12
+ export type ObjectPosition = "center" | "top" | "bottom" | "left" | "right" | "left top" | "left center" | "left bottom" | "center top" | "center center" | "center bottom" | "right top" | "right center" | "right bottom" | string;
@@ -10,4 +10,29 @@
10
10
  * Single ImageMeta object or array of ImageMeta objects
11
11
  */
12
12
 
13
+ /**
14
+ * @typedef {"center" | "top" | "bottom" | "left" | "right" |
15
+ * "left top" | "left center" | "left bottom" |
16
+ * "center top" | "center center" | "center bottom" |
17
+ * "right top" | "right center" | "right bottom" |
18
+ * string} ObjectPosition
19
+ *
20
+ * @description Accepts valid CSS object-position values including:
21
+ * - Keywords: "center", "top", "bottom", "left", "right"
22
+ * - Length values: "10px", "2em", "50%", etc.
23
+ * - Percentage values: "25%", "100%", etc.
24
+ * - Two-value combinations: "left top", "center bottom", "25% 75%"
25
+ * - Mixed units: "left 20px", "10% center", "2em 50%"
26
+ *
27
+ * @example
28
+ * "center" // Single keyword (centers both axes)
29
+ * "top" // Single keyword
30
+ * "left center" // Two keywords
31
+ * "25% 75%" // Two percentages
32
+ * "10px 20px" // Two lengths
33
+ * "left 25%" // Keyword + percentage
34
+ * "50% top" // Percentage + keyword
35
+ * "2em center" // Length + keyword
36
+ */
37
+
13
38
  export default {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-sveltekit",
3
- "version": "0.1.91",
3
+ "version": "0.1.93",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"