@oscarpalmer/toretto 0.38.0 → 0.39.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.
@@ -1,5 +1,6 @@
1
1
  import { getAttributeValue } from "../internal/get-value.js";
2
2
  import { isHTMLOrSVGElement } from "../internal/is.js";
3
+ //#region src/attribute/get.ts
3
4
  function getAttribute(element, name, parseValues) {
4
5
  if (isHTMLOrSVGElement(element) && typeof name === "string") return getAttributeValue(element, name, parseValues !== false);
5
6
  }
@@ -21,4 +22,5 @@ function getAttributes(element, names, parseData) {
21
22
  }
22
23
  return attributes;
23
24
  }
25
+ //#endregion
24
26
  export { getAttribute, getAttributes };
@@ -1,6 +1,7 @@
1
1
  import { getAttribute, getAttributes } from "./get.js";
2
2
  import { _isBadAttribute, _isBooleanAttribute, _isEmptyNonBooleanAttribute, _isInvalidBooleanAttribute, booleanAttributes } from "../internal/attribute.js";
3
3
  import { setAttribute, setAttributes } from "./set.js";
4
+ //#region src/attribute/index.ts
4
5
  function isBadAttribute(first, second) {
5
6
  return _isBadAttribute(first, second, true);
6
7
  }
@@ -13,4 +14,5 @@ function isEmptyNonBooleanAttribute(first, second) {
13
14
  function isInvalidBooleanAttribute(first, second) {
14
15
  return _isInvalidBooleanAttribute(first, second, true);
15
16
  }
17
+ //#endregion
16
18
  export { booleanAttributes, getAttribute, getAttributes, isBadAttribute, isBooleanAttribute, isEmptyNonBooleanAttribute, isInvalidBooleanAttribute, setAttribute, setAttributes };
@@ -1,9 +1,11 @@
1
1
  import { setElementValue, setElementValues } from "../internal/element-value.js";
2
2
  import { updateAttribute } from "../internal/attribute.js";
3
+ //#region src/attribute/set.ts
3
4
  function setAttribute(element, first, second, third) {
4
5
  setElementValue(element, first, second, third, updateAttribute);
5
6
  }
6
7
  function setAttributes(element, attributes, dispatch) {
7
8
  setElementValues(element, attributes, null, dispatch, updateAttribute);
8
9
  }
10
+ //#endregion
9
11
  export { setAttribute, setAttributes };
package/dist/data.js CHANGED
@@ -3,6 +3,7 @@ import { isHTMLOrSVGElement } from "./internal/is.js";
3
3
  import { setElementValues, updateElementValue } from "./internal/element-value.js";
4
4
  import { parse } from "@oscarpalmer/atoms/string";
5
5
  import { kebabCase } from "@oscarpalmer/atoms/string/case";
6
+ //#region src/data.ts
6
7
  function getData(element, keys, parseValues) {
7
8
  if (!isHTMLOrSVGElement(element)) return;
8
9
  const shouldParse = parseValues !== false;
@@ -31,4 +32,5 @@ function updateDataAttribute(element, key, value) {
31
32
  updateElementValue(element, getName(key), value, element.setAttribute, element.removeAttribute, false, true);
32
33
  }
33
34
  var ATTRIBUTE_DATA_PREFIX = "data-";
35
+ //#endregion
34
36
  export { getData, setData };
@@ -1,4 +1,5 @@
1
1
  import { isEventTarget } from "../internal/is.js";
2
+ //#region src/event/delegation.ts
2
3
  function addDelegatedHandler(doc, type, name, passive) {
3
4
  if (DELEGATED.has(name)) return;
4
5
  DELEGATED.add(name);
@@ -80,4 +81,5 @@ var EVENT_TYPES = new Set([
80
81
  ]);
81
82
  var HANDLER_ACTIVE = delegatedEventHandler.bind(false);
82
83
  var HANDLER_PASSIVE = delegatedEventHandler.bind(true);
84
+ //#endregion
83
85
  export { addDelegatedListener, getDelegatedName, removeDelegatedListener };
@@ -3,6 +3,7 @@ import { isEventTarget } from "../internal/is.js";
3
3
  import { addDelegatedListener, getDelegatedName, removeDelegatedListener } from "./delegation.js";
4
4
  import { isPlainObject } from "@oscarpalmer/atoms/is";
5
5
  import { noop } from "@oscarpalmer/atoms/function";
6
+ //#region src/event/index.ts
6
7
  function createDispatchOptions(options) {
7
8
  return {
8
9
  bubbles: getBoolean(options?.bubbles, true),
@@ -74,4 +75,5 @@ function on(target, type, listener, options) {
74
75
  };
75
76
  }
76
77
  var PROPERTY_DETAIL = "detail";
78
+ //#endregion
77
79
  export { dispatch, getPosition, off, on };
@@ -1,4 +1,5 @@
1
1
  import { findAncestor, findRelatives, getDistance } from "./relative.js";
2
+ //#region src/find/index.ts
2
3
  function findElement(selector, context) {
3
4
  return findElementOrElements(selector, context, true);
4
5
  }
@@ -69,4 +70,5 @@ var STYLE_HIDDEN = "hidden";
69
70
  var STYLE_NONE = "none";
70
71
  var SUFFIX_HOVER = ":hover";
71
72
  var TAG_HEAD = "HEAD";
73
+ //#endregion
72
74
  export { findElement as $, findElement, findElements as $$, findElements, findAncestor, findRelatives, getDistance, getElementUnderPointer };
@@ -1,3 +1,4 @@
1
+ //#region src/find/relative.ts
1
2
  function findAncestor(origin, selector) {
2
3
  const element = getElement(origin);
3
4
  if (element == null || selector == null) return null;
@@ -74,4 +75,5 @@ function traverse(from, to) {
74
75
  parent = parent.parentElement;
75
76
  }
76
77
  }
78
+ //#endregion
77
79
  export { findAncestor, findRelatives, getDistance };
package/dist/focusable.js CHANGED
@@ -1,3 +1,4 @@
1
+ //#region src/focusable.ts
1
2
  /**
2
3
  * Get a list of focusable elements within a parent element
3
4
  * @param parent Parent element
@@ -159,4 +160,5 @@ var STYLE_NONE = "none";
159
160
  var TABINDEX_BASE = 0;
160
161
  var TABINDEX_DEFAULT = -1;
161
162
  var TYPE_RADIO = "radio";
163
+ //#endregion
162
164
  export { getFocusable, getTabbable, isFocusable, isTabbable };
@@ -1,5 +1,6 @@
1
1
  import { sanitizeNodes } from "./sanitize.js";
2
2
  import { isPlainObject } from "@oscarpalmer/atoms/is";
3
+ //#region src/html/index.ts
3
4
  function createHtml(value) {
4
5
  const parsed = getParser().parseFromString(getHtml(value), PARSE_TYPE_HTML);
5
6
  parsed.body.normalize();
@@ -69,4 +70,5 @@ var TEMPLATE_TAG = "template";
69
70
  var TEMPORARY_ELEMENT = "<toretto-temporary></toretto-temporary>";
70
71
  var parser;
71
72
  var templates = {};
73
+ //#endregion
72
74
  export { html, sanitize };
@@ -1,5 +1,6 @@
1
1
  import { _isBadAttribute, _isEmptyNonBooleanAttribute, _isInvalidBooleanAttribute } from "../internal/attribute.js";
2
2
  import { setAttribute } from "../attribute/set.js";
3
+ //#region src/html/sanitize.ts
3
4
  function handleElement(element, depth) {
4
5
  if (depth === 0) {
5
6
  const removable = element.querySelectorAll(REMOVE_SELECTOR);
@@ -57,4 +58,5 @@ function sanitizeNodes(nodes, depth) {
57
58
  }
58
59
  var COMMENT_HARMFUL = /<[/\w]/g;
59
60
  var REMOVE_SELECTOR = "script, toretto-temporary";
61
+ //#endregion
60
62
  export { sanitizeAttributes, sanitizeNodes };
@@ -1,5 +1,6 @@
1
1
  import { updateElementValue } from "./element-value.js";
2
2
  import { isPlainObject } from "@oscarpalmer/atoms/is";
3
+ //#region src/internal/attribute.ts
3
4
  function badAttributeHandler(name, value) {
4
5
  if (typeof name !== "string" || name.trim().length === 0 || typeof value !== "string") return true;
5
6
  if (EXPRESSION_CLOBBERED_NAME.test(name) && (value in document || value in formElement) || EXPRESSION_EVENT_NAME.test(name)) return true;
@@ -73,7 +74,7 @@ var EXPRESSION_WHITESPACE = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F
73
74
  /**
74
75
  * List of boolean attributes
75
76
  */
76
- const booleanAttributes = Object.freeze([
77
+ var booleanAttributes = Object.freeze([
77
78
  "async",
78
79
  "autofocus",
79
80
  "autoplay",
@@ -111,4 +112,5 @@ var elementEvents = {
111
112
  };
112
113
  var formElement = document.createElement("form");
113
114
  var textArea;
115
+ //#endregion
114
116
  export { _isBadAttribute, _isBooleanAttribute, _isEmptyNonBooleanAttribute, _isInvalidBooleanAttribute, booleanAttributes, isAttribute, updateAttribute };
@@ -2,6 +2,7 @@ import { isHTMLOrSVGElement } from "./is.js";
2
2
  import "../is.js";
3
3
  import { isAttribute } from "./attribute.js";
4
4
  import { isNullableOrWhitespace } from "@oscarpalmer/atoms/is";
5
+ //#region src/internal/element-value.ts
5
6
  function setElementValue(element, first, second, third, callback) {
6
7
  if (!isHTMLOrSVGElement(element)) return;
7
8
  if (typeof first === "string") setElementValues(element, first, second, third, callback);
@@ -29,4 +30,5 @@ function updateElementValue(element, key, value, set, remove, isBoolean, json) {
29
30
  if (isBoolean ? value == null : isNullableOrWhitespace(value)) remove.call(element, key);
30
31
  else set.call(element, key, json ? JSON.stringify(value) : String(value));
31
32
  }
33
+ //#endregion
32
34
  export { setElementValue, setElementValues, updateElementValue };
@@ -1,5 +1,6 @@
1
1
  import { parse } from "@oscarpalmer/atoms/string";
2
2
  import { camelCase, kebabCase } from "@oscarpalmer/atoms/string/case";
3
+ //#region src/internal/get-value.ts
3
4
  function getBoolean(value, defaultValue) {
4
5
  return typeof value === "boolean" ? value : defaultValue ?? false;
5
6
  }
@@ -13,5 +14,6 @@ function getStyleValue(element, property, computed) {
13
14
  const name = camelCase(property);
14
15
  return computed ? getComputedStyle(element)[name] : element.style[name];
15
16
  }
16
- const EXPRESSION_DATA_PREFIX = /^data-/i;
17
+ var EXPRESSION_DATA_PREFIX = /^data-/i;
18
+ //#endregion
17
19
  export { EXPRESSION_DATA_PREFIX, getAttributeValue, getBoolean, getStyleValue };
@@ -1,3 +1,4 @@
1
+ //#region src/internal/is.ts
1
2
  /**
2
3
  * Is the value an event target?
3
4
  * @param value Value to check
@@ -14,4 +15,5 @@ function isEventTarget(value) {
14
15
  function isHTMLOrSVGElement(value) {
15
16
  return value instanceof HTMLElement || value instanceof SVGElement;
16
17
  }
18
+ //#endregion
17
19
  export { isEventTarget, isHTMLOrSVGElement };
package/dist/is.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { isEventTarget, isHTMLOrSVGElement } from "./internal/is.js";
2
+ //#region src/is.ts
2
3
  /**
3
4
  * Is the value a child node?
4
5
  * @param value Value to check
@@ -19,4 +20,5 @@ var CHILD_NODE_TYPES = new Set([
19
20
  Node.COMMENT_NODE,
20
21
  Node.DOCUMENT_TYPE_NODE
21
22
  ]);
23
+ //#endregion
22
24
  export { isChildNode, isEventTarget, isHTMLOrSVGElement, isInDocument };
package/dist/style.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { getStyleValue } from "./internal/get-value.js";
2
2
  import { isHTMLOrSVGElement } from "./internal/is.js";
3
3
  import { setElementValues, updateElementValue } from "./internal/element-value.js";
4
+ //#region src/style.ts
4
5
  /**
5
6
  * Get a style from an element
6
7
  * @param element Element to get the style from
@@ -100,4 +101,5 @@ function updateStyleProperty(element, key, value) {
100
101
  }
101
102
  var ATTRIBUTE_DIRECTION = "dir";
102
103
  var EXPRESSION_DIRECTION = /^(ltr|rtl)$/i;
104
+ //#endregion
103
105
  export { getStyle, getStyles, getTextDirection, setStyle, setStyles, toggleStyles };
@@ -373,7 +373,7 @@ var Memoized = class {
373
373
  constructor(callback, options) {
374
374
  const cache = new SizedMap(options.cacheSize);
375
375
  const getter = (...parameters) => {
376
- const key = options.cacheKey?.(...parameters) ?? (parameters.length === 1 ? parameters[0] : join(parameters.map(getString), "_"));
376
+ const key = options.cacheKey?.(...parameters) ?? (parameters.length === 1 ? parameters[0] : join(parameters.map(getString), SEPARATOR));
377
377
  if (cache.has(key)) return cache.get(key);
378
378
  const value = callback(...parameters);
379
379
  cache.set(key, value);
@@ -449,13 +449,14 @@ function memoize(callback, options) {
449
449
  return new Memoized(callback, getMemoizationOptions(options));
450
450
  }
451
451
  var DEFAULT_CACHE_SIZE = 1024;
452
+ var SEPARATOR = "_";
452
453
  /**
453
454
  * Convert a string to camel case _(thisIsCamelCase)_
454
455
  * @param value String to convert
455
456
  * @returns Camel-cased string
456
457
  */
457
458
  function camelCase(value) {
458
- return toCase("camel", value, true, false);
459
+ return toCase(CASE_CAMEL, value, true, false);
459
460
  }
460
461
  /**
461
462
  * Capitalize the first letter of a string _(and lowercase the rest)_
@@ -473,7 +474,7 @@ function capitalize(value) {
473
474
  * @returns Kebab-cased string
474
475
  */
475
476
  function kebabCase(value) {
476
- return toCase("kebab", value, false, false);
477
+ return toCase(CASE_KEBAB, value, false, false);
477
478
  }
478
479
  function toCase(type, value, capitalizeAny, capitalizeFirst) {
479
480
  caseMemoizers[type] ??= memoize(toCaseCallback.bind({
@@ -491,7 +492,7 @@ function toCaseCallback(value) {
491
492
  const partsLength = parts.length;
492
493
  const cased = [];
493
494
  for (let partIndex = 0; partIndex < partsLength; partIndex += 1) {
494
- const items = parts[partIndex].replace(EXPRESSION_ACRONYM, (full, one, two, three) => three === "s" ? full : `${one}-${two}${three}`).replace(EXPRESSION_CAMEL_CASE, REPLACEMENT_CAMEL_CASE).split("-");
495
+ const items = parts[partIndex].replace(EXPRESSION_ACRONYM, (full, one, two, three) => three === S ? full : `${one}-${two}${three}`).replace(EXPRESSION_CAMEL_CASE, REPLACEMENT_CAMEL_CASE).split("-");
495
496
  const itemsLength = items.length;
496
497
  const partResult = [];
497
498
  let itemCount = 0;
@@ -506,16 +507,24 @@ function toCaseCallback(value) {
506
507
  }
507
508
  return join(cased, delimiters[type]);
508
509
  }
509
- var caseMemoizers = {};
510
- var delimiters = {
511
- camel: "",
512
- kebab: "-",
513
- pascal: "",
514
- snake: "_"
515
- };
510
+ var CASE_CAMEL = "camel";
511
+ var CASE_KEBAB = "kebab";
512
+ var CASE_PASCAL = "pascal";
513
+ var CASE_SNAKE = "snake";
514
+ var DELIMTER_EMPTY = "";
515
+ var DELIMITER_HYPHEN = "-";
516
+ var DELIMITER_UNDERSCORE = "_";
516
517
  var EXPRESSION_CAMEL_CASE = /(\p{Ll})(\p{Lu})/gu;
517
518
  var EXPRESSION_ACRONYM = /(\p{Lu}*)(\p{Lu})(\p{Ll}+)/gu;
518
519
  var REPLACEMENT_CAMEL_CASE = "$1-$2";
520
+ var S = "s";
521
+ var caseMemoizers = {};
522
+ var delimiters = {
523
+ [CASE_CAMEL]: DELIMTER_EMPTY,
524
+ [CASE_KEBAB]: DELIMITER_HYPHEN,
525
+ [CASE_PASCAL]: DELIMTER_EMPTY,
526
+ [CASE_SNAKE]: DELIMITER_UNDERSCORE
527
+ };
519
528
  var memoizedCapitalize;
520
529
  function getBoolean(value, defaultValue) {
521
530
  return typeof value === "boolean" ? value : defaultValue ?? false;
@@ -572,6 +581,159 @@ const ATTRIBUTE_DATA_PREFIX = "data-";
572
581
  * A function that does nothing, which can be useful, I guess…
573
582
  */
574
583
  function noop() {}
584
+ /**
585
+ * Asserts that a condition is true, throwing an error if it is not
586
+ * @param condition Condition to assert
587
+ * @param message Error message
588
+ * @param error Error constructor
589
+ */
590
+ function assert(condition, message, error) {
591
+ if (!condition()) throw new (error ?? Error)(message);
592
+ }
593
+ assert.condition = assertCondition;
594
+ assert.defined = assertDefined;
595
+ assert.instanceOf = assertInstanceOf;
596
+ assert.is = assertIs;
597
+ /**
598
+ * Creates an asserter that asserts a condition is true, throwing an error if it is not
599
+ * @param condition Condition to assert
600
+ * @param message Error message
601
+ * @param error Error constructor
602
+ * @returns Asserter
603
+ */
604
+ function assertCondition(condition, message, error) {
605
+ return (value) => {
606
+ assert(() => condition(value), message, error);
607
+ };
608
+ }
609
+ /**
610
+ * Asserts that a value is defined throwing an error if it is not
611
+ * @param value Value to assert
612
+ * @param message Error message
613
+ */
614
+ function assertDefined(value, message) {
615
+ assert(() => value != null, message ?? MESSAGE_VALUE_DEFINED);
616
+ }
617
+ /**
618
+ * Creates an asserter that asserts a value is an instance of a constructor, throwing an error if it is not
619
+ * @param constructor Constructor to check against
620
+ * @param message Error message
621
+ * @param error Error constructor
622
+ * @returns Asserter
623
+ */
624
+ function assertInstanceOf(constructor, message, error) {
625
+ return (value) => {
626
+ assert(() => value instanceof constructor, message, error);
627
+ };
628
+ }
629
+ /**
630
+ * Creates an asserter that asserts a value is of a specific type, throwing an error if it is not
631
+ * @param condition Type guard function to check the value
632
+ * @param message Error message
633
+ * @param error Error constructor
634
+ * @returns Asserter
635
+ */
636
+ function assertIs(condition, message, error) {
637
+ return (value) => {
638
+ assert(() => condition(value), message, error);
639
+ };
640
+ }
641
+ var MESSAGE_VALUE_DEFINED = "Expected value to be defined";
642
+ /**
643
+ * Create an asynchronous function that can only be called once, rejecting or resolving the same result on subsequent calls
644
+ * @param callback Callback to use once
645
+ * @returns Once callback
646
+ */
647
+ function asyncOnce(callback) {
648
+ assert(() => typeof callback === "function", MESSAGE_EXPECTATION);
649
+ const state = {
650
+ called: false,
651
+ cleared: false,
652
+ error: false,
653
+ finished: false,
654
+ items: [],
655
+ value: void 0
656
+ };
657
+ const fn = (...parameters) => {
658
+ if (state.cleared) return Promise.reject(new Error(MESSAGE_CLEARED));
659
+ if (state.finished) return state.error ? Promise.reject(state.value) : Promise.resolve(state.value);
660
+ if (state.called) return new Promise((resolve, reject) => {
661
+ state.items.push({
662
+ reject,
663
+ resolve
664
+ });
665
+ });
666
+ state.called = true;
667
+ return new Promise((resolve, reject) => {
668
+ state.items.push({
669
+ reject,
670
+ resolve
671
+ });
672
+ callback(...parameters).then((value) => {
673
+ handleResult(state, value, false);
674
+ }).catch((error) => {
675
+ handleResult(state, error, true);
676
+ });
677
+ });
678
+ };
679
+ Object.defineProperties(fn, {
680
+ called: { get: () => state.called },
681
+ cleared: { get: () => state.cleared },
682
+ error: { get: () => state.error },
683
+ finished: { get: () => state.finished }
684
+ });
685
+ fn.clear = () => {
686
+ if (!state.called || !state.finished || state.cleared) return;
687
+ state.cleared = true;
688
+ state.value = void 0;
689
+ };
690
+ return fn;
691
+ }
692
+ function handleResult(state, value, error) {
693
+ state.error = error;
694
+ state.finished = true;
695
+ state.value = value;
696
+ const items = state.items.splice(0);
697
+ const { length } = items;
698
+ for (let index = 0; index < length; index += 1) {
699
+ const { reject, resolve } = items[index];
700
+ if (error) reject(value);
701
+ else resolve(value);
702
+ }
703
+ }
704
+ /**
705
+ * Create a function that can only be called once, returning the same value on subsequent calls
706
+ * @param callback Callback to use once
707
+ * @returns Once callback
708
+ */
709
+ function once(callback) {
710
+ assert(() => typeof callback === "function", MESSAGE_EXPECTATION);
711
+ const state = {
712
+ called: false,
713
+ cleared: false,
714
+ value: void 0
715
+ };
716
+ const fn = (...parameters) => {
717
+ if (state.cleared) throw new Error(MESSAGE_CLEARED);
718
+ if (state.called) return state.value;
719
+ state.called = true;
720
+ state.value = callback(...parameters);
721
+ return state.value;
722
+ };
723
+ Object.defineProperties(fn, {
724
+ called: { get: () => state.called },
725
+ cleared: { get: () => state.cleared }
726
+ });
727
+ fn.clear = () => {
728
+ if (!state.called || state.cleared) return;
729
+ state.cleared = true;
730
+ state.value = void 0;
731
+ };
732
+ return fn;
733
+ }
734
+ once.async = asyncOnce;
735
+ var MESSAGE_CLEARED = "Once has been cleared";
736
+ var MESSAGE_EXPECTATION = "Once expected a function";
575
737
  function addDelegatedHandler(doc, type, name, passive) {
576
738
  if (DELEGATED.has(name)) return;
577
739
  DELEGATED.add(name);
package/dist/touch.js CHANGED
@@ -1,3 +1,4 @@
1
+ //#region src/touch.ts
1
2
  function getSupport() {
2
3
  if (window == null || navigator == null) return false;
3
4
  if ("matchMedia" in window) {
@@ -28,4 +29,5 @@ var supportsTouch = (() => {
28
29
  } });
29
30
  return instance;
30
31
  })();
32
+ //#endregion
31
33
  export { supportsTouch as default };
package/package.json CHANGED
@@ -4,19 +4,19 @@
4
4
  "url": "https://oscarpalmer.se"
5
5
  },
6
6
  "dependencies": {
7
- "@oscarpalmer/atoms": "^0.157"
7
+ "@oscarpalmer/atoms": "^0.162"
8
8
  },
9
9
  "description": "A collection of badass DOM utilities.",
10
10
  "devDependencies": {
11
- "@types/node": "^25.3",
11
+ "@types/node": "^25.4",
12
12
  "@vitest/coverage-istanbul": "^4",
13
13
  "jsdom": "^28.1",
14
- "oxfmt": "^0.36",
15
- "oxlint": "^1.51",
16
- "rolldown": "1.0.0-rc.7",
14
+ "oxfmt": "^0.39",
15
+ "oxlint": "^1.54",
16
+ "rolldown": "1.0.0-rc.9",
17
17
  "tslib": "^2.8",
18
18
  "typescript": "^5.9",
19
- "vite": "8.0.0-beta.16",
19
+ "vite": "8.0.0-beta.17",
20
20
  "vitest": "^4"
21
21
  },
22
22
  "exports": {
@@ -93,5 +93,5 @@
93
93
  },
94
94
  "type": "module",
95
95
  "types": "types/index.d.ts",
96
- "version": "0.38.0"
96
+ "version": "0.39.0"
97
97
  }
package/src/find/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type {PlainObject} from '@oscarpalmer/atoms/models';
1
+ import type {PlainObject} from '@oscarpalmer/atoms';
2
2
  import type {Selector} from '../models';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type {PlainObject} from '@oscarpalmer/atoms/models';
1
+ import type {PlainObject} from '@oscarpalmer/atoms';
2
2
  import {isPlainObject} from '@oscarpalmer/atoms/is';
3
3
  import type {Attribute} from '../models';
4
4
  import {updateElementValue} from './element-value';