@stonecrop/utilities 0.56.2 → 0.56.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.
- package/dist/utilities.js +9 -18
- package/dist/utilities.js.map +1 -1
- package/package.json +2 -2
package/dist/utilities.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onBeforeUnmount, onMounted, reactive, ref, watch } from "vue";
|
|
2
2
|
import { defaultWindow, unrefElement, useEventListener, useFocusWithin } from "@vueuse/core";
|
|
3
3
|
import { Temporal } from "temporal-polyfill";
|
|
4
|
-
|
|
4
|
+
// src/composables/visibility/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* Tracks the visibility of an element within the viewport.
|
|
7
7
|
*
|
|
@@ -41,8 +41,7 @@ function useElementVisibility(element, { window = defaultWindow, scrollTarget }
|
|
|
41
41
|
});
|
|
42
42
|
return elementIsVisible;
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
//#region src/composables/keyboard.ts
|
|
44
|
+
// src/composables/keyboard.ts
|
|
46
45
|
var isVisible = (element) => {
|
|
47
46
|
let visible = useElementVisibility(element).value;
|
|
48
47
|
visible = visible && element.offsetHeight > 0;
|
|
@@ -398,8 +397,7 @@ function useKeyboardNav(options) {
|
|
|
398
397
|
for (const stopHandler of watchStopHandlers) stopHandler();
|
|
399
398
|
});
|
|
400
399
|
}
|
|
401
|
-
|
|
402
|
-
//#region src/arithmetic.ts
|
|
400
|
+
// src/arithmetic.ts
|
|
403
401
|
var MAX_DEPTH = 64;
|
|
404
402
|
var escapeMark = (mark) => mark.replace(/[.*+?^${}()|[\]\\-]/g, "\\$&");
|
|
405
403
|
/**
|
|
@@ -530,8 +528,7 @@ function evaluateArithmetic(text, separators = {}) {
|
|
|
530
528
|
return null;
|
|
531
529
|
}
|
|
532
530
|
}
|
|
533
|
-
|
|
534
|
-
//#region src/composables/arithmeticInput.ts
|
|
531
|
+
// src/composables/arithmeticInput.ts
|
|
535
532
|
/** The model's number, read from a number or from the text a record may carry instead. */
|
|
536
533
|
var numberOf = (value) => {
|
|
537
534
|
if (typeof value === "number") return Number.isFinite(value) ? value : null;
|
|
@@ -656,8 +653,7 @@ function useArithmeticInput({ value, commit, format = (n) => n === null ? "" : S
|
|
|
656
653
|
onBlur
|
|
657
654
|
};
|
|
658
655
|
}
|
|
659
|
-
|
|
660
|
-
//#region src/dates.ts
|
|
656
|
+
// src/dates.ts
|
|
661
657
|
/**
|
|
662
658
|
* Reads a `YYYY-MM-DD` day. Anything that is not a real day written exactly that way reads as no day.
|
|
663
659
|
*
|
|
@@ -674,8 +670,7 @@ function fromISODate(day) {
|
|
|
674
670
|
return;
|
|
675
671
|
}
|
|
676
672
|
}
|
|
677
|
-
|
|
678
|
-
//#region src/semver.ts
|
|
673
|
+
// src/semver.ts
|
|
679
674
|
var SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
680
675
|
var NUMBER = /^(0|[1-9]\d*)$/;
|
|
681
676
|
var NUMBER_SO_FAR = /^(0|[1-9]\d*)?$/;
|
|
@@ -759,8 +754,7 @@ function compareSemver(a, b) {
|
|
|
759
754
|
}
|
|
760
755
|
return comparePrereleases(left[4], right[4]);
|
|
761
756
|
}
|
|
762
|
-
|
|
763
|
-
//#region src/currencyAmountFormat.ts
|
|
757
|
+
// src/currencyAmountFormat.ts
|
|
764
758
|
/**
|
|
765
759
|
* Fraction digits for a currency in amount inputs (e.g. JPY → 0).
|
|
766
760
|
* @public
|
|
@@ -832,8 +826,7 @@ function currencyAmountEntryPattern(currencyId, locale) {
|
|
|
832
826
|
const point = decimal === "." ? "\\." : `[${escape(decimal)}.]`;
|
|
833
827
|
return new RegExp(`^${whole}(?:${point}\\d*)?$`);
|
|
834
828
|
}
|
|
835
|
-
|
|
836
|
-
//#region src/denominatedFormat.ts
|
|
829
|
+
// src/denominatedFormat.ts
|
|
837
830
|
function displayScalar(value) {
|
|
838
831
|
if (typeof value === "string") return value;
|
|
839
832
|
if (typeof value === "number" || typeof value === "bigint") return String(value);
|
|
@@ -904,15 +897,13 @@ function formatCurrencyCell(value) {
|
|
|
904
897
|
const record = value;
|
|
905
898
|
return formatCurrencyAmount(record.amount, record.currency);
|
|
906
899
|
}
|
|
907
|
-
|
|
908
|
-
//#region src/index.ts
|
|
900
|
+
// src/index.ts
|
|
909
901
|
/**
|
|
910
902
|
* Install all utility components
|
|
911
903
|
* @param _app - Vue app instance
|
|
912
904
|
* @public
|
|
913
905
|
*/
|
|
914
906
|
function install(_app) {}
|
|
915
|
-
//#endregion
|
|
916
907
|
export { arithmeticEntryPattern, compareSemver, currencyAmountEntryPattern, currencyAmountSeparators, currencyInputFractionDigits, defaultKeypressHandlers, evaluateArithmetic, formatCurrencyAmount, formatCurrencyAmountInput, formatCurrencyCell, formatCurrencySymbol, formatQuantityCell, fromISODate, install, isArithmeticEntry, isArithmeticKey, isSemver, isSemverPrefix, parseCurrencyAmountInput, roundToPrecision, useArithmeticInput, useKeyboardNav };
|
|
917
908
|
|
|
918
909
|
//# sourceMappingURL=utilities.js.map
|
package/dist/utilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","names":[],"sources":["../src/composables/visibility/index.ts","../src/composables/keyboard.ts","../src/arithmetic.ts","../src/composables/arithmeticInput.ts","../src/dates.ts","../src/semver.ts","../src/currencyAmountFormat.ts","../src/denominatedFormat.ts","../src/index.ts"],"sourcesContent":["import {\n\ttype ConfigurableWindow,\n\ttype MaybeComputedElementRef,\n\tdefaultWindow,\n\tunrefElement,\n\tuseEventListener,\n} from '@vueuse/core'\nimport { ref, watch, type MaybeRefOrGetter } from 'vue'\n\nexport interface UseElementVisibilityOptions extends ConfigurableWindow {\n\tscrollTarget?: MaybeRefOrGetter<HTMLElement | undefined | null>\n}\n\n/**\n * Tracks the visibility of an element within the viewport.\n *\n * Compatibility version to get Stonecrop keyboard navigation to work. This function is a copy of the\n * `useElementVisibility` function from VueUse v9.13.0, with the `IntersectionObserver` API removed.\n *\n * This version uses the `getBoundingClientRect` method to determine if an element is visible\n * in the viewport. This is less performant than the `IntersectionObserver` API, but it is\n * more compatible.\n *\n * Note: the newer versions of the VueUse dependencies imported here are sufficient for this composable.\n * (Last verified: v10.9.0 on May 2, 2024)\n *\n * @see https://v9-13-0.vueuse.org/core/useElementVisibility\n * @param element - Element to track visibility for\n * @param options - Configuration options (window, scrollTarget)\n */\nexport function useElementVisibility(\n\telement: MaybeComputedElementRef,\n\t{ window = defaultWindow, scrollTarget }: UseElementVisibilityOptions = {}\n) {\n\tconst elementIsVisible = ref(false)\n\n\tconst testBounding = () => {\n\t\tif (!window) return\n\n\t\tconst document = window.document\n\t\tconst el = unrefElement(element)\n\t\tif (!el) {\n\t\t\telementIsVisible.value = false\n\t\t} else {\n\t\t\tconst rect = el.getBoundingClientRect()\n\t\t\telementIsVisible.value =\n\t\t\t\trect.top <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\t\t\trect.left <= (window.innerWidth || document.documentElement.clientWidth) &&\n\t\t\t\trect.bottom >= 0 &&\n\t\t\t\trect.right >= 0\n\t\t}\n\t}\n\n\twatch(\n\t\t() => unrefElement(element),\n\t\t() => testBounding(),\n\t\t{ immediate: true, flush: 'post' }\n\t)\n\n\tif (window) {\n\t\tuseEventListener(scrollTarget || window, 'scroll', testBounding, {\n\t\t\tcapture: false,\n\t\t\tpassive: true,\n\t\t})\n\t}\n\n\treturn elementIsVisible\n}\n","import { type WatchStopHandle, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport { useFocusWithin } from '@vueuse/core'\n\nimport { useElementVisibility } from './visibility'\nimport type { KeyboardNavigationOptions, KeypressHandlers } from '../types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet visible = useElementVisibility(element).value\n\tvisible = visible && element.offsetHeight > 0\n\treturn visible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n/** When focus is on a control inside a cell, grid navigation still uses the owning `<td>`. */\nconst resolveNavCell = (element: HTMLElement): HTMLElement => {\n\tif (element instanceof HTMLTableCellElement) {\n\t\treturn element\n\t}\n\tconst cell = element.closest('td, th')\n\tif (cell instanceof HTMLTableCellElement) {\n\t\treturn cell\n\t}\n\treturn element\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getUpCellEl(resolveNavCell(event.target))\n}\n\nconst getUpCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevSibling = element.parentElement?.previousElementSibling\n\t\tif ($prevSibling instanceof HTMLTableRowElement) {\n\t\t\tconst $prevRowCells = Array.from($prevSibling.children)\n\t\t\tconst $cellEl = $prevRowCells[element.cellIndex]\n\t\t\tif ($cellEl instanceof HTMLElement) {\n\t\t\t\t$upCell = $cellEl\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevSibling = element.previousElementSibling\n\t\tif ($prevSibling instanceof HTMLTableRowElement) {\n\t\t\t$upCell = $prevSibling\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn getUpCellEl($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $target = resolveNavCell(event.target)\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navEl = $firstRow?.children[$target.cellIndex]\n\t\t\tif ($navEl instanceof HTMLElement) {\n\t\t\t\t$topCell = $navEl\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $parent = $target.parentElement\n\t\tif ($parent) {\n\t\t\tconst $firstEl = $parent.firstElementChild\n\t\t\tif ($firstEl instanceof HTMLTableRowElement) {\n\t\t\t\t$topCell = $firstEl\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn getDownCellEl($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getDownCellEl(resolveNavCell(event.target))\n}\n\nconst getDownCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextSibling = element.parentElement?.nextElementSibling\n\t\tif ($nextSibling) {\n\t\t\tconst $nextRowCells = Array.from($nextSibling.children)\n\t\t\tconst $cellEl = $nextRowCells[element.cellIndex]\n\t\t\tif ($cellEl instanceof HTMLElement) {\n\t\t\t\t$downCell = $cellEl\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextSibling = element.nextElementSibling\n\t\tif ($nextSibling instanceof HTMLTableRowElement) {\n\t\t\t$downCell = $nextSibling\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn getDownCellEl($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $target = resolveNavCell(event.target)\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navEl = $lastRow?.children[$target.cellIndex]\n\t\t\tif ($navEl instanceof HTMLElement) {\n\t\t\t\t$bottomCell = $navEl\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $parent = $target.parentElement\n\t\tif ($parent) {\n\t\t\tconst $lastEl = $parent.lastElementChild\n\t\t\tif ($lastEl instanceof HTMLTableRowElement) {\n\t\t\t\t$bottomCell = $lastEl\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn getUpCellEl($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getPrevCellEl(resolveNavCell(event.target))\n}\n\nconst getPrevCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tconst $prevSibling = element.previousElementSibling\n\tif ($prevSibling instanceof HTMLElement) {\n\t\t$prevCell = $prevSibling\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\tconst $lastEl = $prevRow?.lastElementChild\n\t\tif ($lastEl instanceof HTMLElement) {\n\t\t\t$prevCell = $lastEl\n\t\t}\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn getPrevCellEl($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getNextCellEl(resolveNavCell(event.target))\n}\n\nconst getNextCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tconst $nextSibling = element.nextElementSibling\n\tif ($nextSibling instanceof HTMLElement) {\n\t\t$nextCell = $nextSibling\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tconst $firstEl = $nextRow?.firstElementChild\n\t\tif ($firstEl instanceof HTMLElement) {\n\t\t\t$nextCell = $firstEl\n\t\t}\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn getNextCellEl($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $parent = resolveNavCell(event.target).parentElement\n\tconst $firstEl = $parent?.firstElementChild\n\tconst $firstCell = $firstEl instanceof HTMLElement ? $firstEl : null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn getNextCellEl($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $parent = resolveNavCell(event.target).parentElement\n\tconst $lastEl = $parent?.lastElementChild\n\tconst $lastCell = $lastEl instanceof HTMLElement ? $lastEl : null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn getPrevCellEl($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap: Record<string, string> = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\n/**\n * Default keypress handlers for keyboard navigation\n * @public\n */\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tif (!(event.target instanceof HTMLElement)) return\n\t\tconst $target = resolveNavCell(event.target)\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tif (!(event.target instanceof HTMLElement)) return\n\t\tconst $target = resolveNavCell(event.target)\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\n/**\n * Gets the parent element from a keyboard navigation option.\n * @internal\n */\nfunction getParentElement(option: KeyboardNavigationOptions): HTMLElement | null {\n\tlet $parent: HTMLElement | null = null\n\tif (option.parent) {\n\t\tif (typeof option.parent === 'string') {\n\t\t\t$parent = document.querySelector(option.parent)\n\t\t} else if (option.parent instanceof HTMLElement) {\n\t\t\t$parent = option.parent\n\t\t} else {\n\t\t\t$parent = option.parent.value\n\t\t}\n\t}\n\treturn $parent\n}\n\n/**\n * Keyboard navigation composable\n * @param options - Keyboard navigation options\n * @public\n */\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectorsFromOption = (option: KeyboardNavigationOptions) => {\n\t\t// assumes that option.selectors is provided\n\t\tconst $parent = getParentElement(option)\n\t\tlet selectors: HTMLElement[] = []\n\t\tif (typeof option.selectors === 'string') {\n\t\t\tselectors = $parent\n\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t} else if (Array.isArray(option.selectors)) {\n\t\t\tfor (const element of option.selectors) {\n\t\t\t\tif (element instanceof HTMLElement) {\n\t\t\t\t\tselectors.push(element)\n\t\t\t\t} else {\n\t\t\t\t\t// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Vue component $el is typed as any; shape guaranteed by VNode contract\n\t\t\t\t\tselectors.push(element.$el as HTMLElement)\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (option.selectors instanceof HTMLElement) {\n\t\t\tselectors.push(option.selectors)\n\t\t} else if (option.selectors?.value) {\n\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\tif (element instanceof HTMLElement) {\n\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Vue component $el is typed as any; shape guaranteed by VNode contract\n\t\t\t\t\t\tselectors.push(element.$el as HTMLElement)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t}\n\t\t}\n\t\treturn selectors\n\t}\n\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\tconst $parent = getParentElement(option)\n\t\tlet selectors: HTMLElement[] = []\n\t\tif (option.selectors) {\n\t\t\tselectors = getSelectorsFromOption(option)\n\t\t} else if ($parent) {\n\t\t\t// TODO: what should happen if no parent or selectors are provided?\n\t\t\tconst $children = Array.from($parent.children).filter((el): el is HTMLElement => el instanceof HTMLElement)\n\t\t\tselectors = $children.filter(selector => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = eventKeyMap[event.key] || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(k => modifierKeys.includes(k))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(mk => {\n\t\t\t\t\t\tconst modifierKey = mk.charAt(0).toUpperCase() + mk.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst watchStopHandlers: WatchStopHandle[] = []\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst $parent = getParentElement(option)\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tconst listener = getEventListener(option)\n\t\t\tconst listenerElements = $parent\n\t\t\t\t? [$parent] // watch for focus recursively within the parent element\n\t\t\t\t: selectors // watch for focus on each selector element TODO: too much JS?\n\n\t\t\tfor (const element of listenerElements) {\n\t\t\t\tconst { focused } = useFocusWithin(ref(element))\n\t\t\t\tconst stopHandler = watch(focused, value => {\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\telement.addEventListener('keydown', listener)\n\t\t\t\t\t} else {\n\t\t\t\t\t\telement.removeEventListener('keydown', listener)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\twatchStopHandlers.push(stopHandler)\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const stopHandler of watchStopHandlers) {\n\t\t\tstopHandler()\n\t\t}\n\t})\n}\n","/**\n * The marks a number box writes numbers with. The decimal mark is read as the decimal point and the group mark is\n * dropped, so `1.000,5*2` reads as `1000.5*2` with German separators.\n * @public\n */\nexport type NumberSeparators = {\n\tgroup?: string\n\tdecimal?: string\n}\n\n// Deep enough for any expression typed by hand, shallow enough that `((((…` can't exhaust the stack.\nconst MAX_DEPTH = 64\n\nconst escapeMark = (mark: string) => mark.replace(/[.*+?^${}()|[\\]\\\\-]/g, '\\\\$&')\n\n/**\n * What an arithmetic number box may hold while it is typed in: digits, a decimal point, whitespace,\n * `+ - * / %` and parentheses, plus the given separators, after an optional leading `=` (as a spreadsheet formula\n * starts). Exponents (`e`, `^`) and any other letter are refused, and so is `=` anywhere but first.\n * @public\n */\nexport function arithmeticEntryPattern(separators: NumberSeparators = {}): RegExp {\n\tconst marks = [separators.group, separators.decimal].filter(Boolean).map(mark => escapeMark(mark!))\n\treturn new RegExp(`^\\\\s*=?[\\\\d.\\\\s+\\\\-*/%()${marks.join('')}]*$`)\n}\n\n/**\n * Whether every number in the text is written as the box writes numbers: grouping marks only in the whole part, then\n * at most one decimal mark, and none at all where the field carries no decimals. \"1.234,56\" in English is no number\n * (grouping after the decimal point), and neither is \"1.2.3\".\n */\nfunction numbersWellFormed(text: string, separators: NumberSeparators, fractionDigits?: number): boolean {\n\tconst decimal = separators.decimal ?? '.'\n\tconst group = separators.group && separators.group !== decimal ? separators.group : undefined\n\tconst d = escapeMark(decimal)\n\tconst g = group ? escapeMark(group) : ''\n\tconst whole = group ? `\\\\d[\\\\d${g}]*` : '\\\\d+'\n\tconst number = new RegExp(fractionDigits === 0 ? `^${whole}$` : `^(?:${whole})?(?:${d}\\\\d*)?$`)\n\tconst tokens = text.match(new RegExp(`[\\\\d${d}${g}]+`, 'g')) ?? []\n\treturn tokens.every(token => number.test(token))\n}\n\n/**\n * Whether an arithmetic number box may hold `text` while it is typed in: what {@link arithmeticEntryPattern} allows,\n * with each number in it well formed (grouping marks only in the whole part, then at most one decimal mark).\n * @param fractionDigits - The field's decimal places; at `0` (as for JPY) a decimal mark is refused\n * @public\n */\nexport function isArithmeticEntry(text: string, separators: NumberSeparators = {}, fractionDigits?: number): boolean {\n\treturn arithmeticEntryPattern(separators).test(text) && numbersWellFormed(text, separators, fractionDigits)\n}\n\n/**\n * Whether a single typed character may go into an arithmetic number box. `=` is one, though only as the box's first\n * character: check the box's text with {@link arithmeticEntryPattern} where the caret is known.\n * @public\n */\nexport function isArithmeticKey(key: string, separators: NumberSeparators = {}): boolean {\n\treturn key.length === 1 && arithmeticEntryPattern(separators).test(key)\n}\n\n/**\n * Round a number to a field's decimal places, as a column with a fixed scale holds it: `3.3333333333333` at 2 is\n * `3.33`. A missing or unusable precision (not a whole number from 0 to 100) leaves the number as it is.\n * @public\n */\nexport function roundToPrecision(value: number, precision?: number): number {\n\tif (precision === undefined || !Number.isInteger(precision) || precision < 0 || precision > 100) return value\n\treturn Number(value.toFixed(precision))\n}\n\n/**\n * Evaluate the arithmetic typed into a number box: `12*3+4` is `40`. Supports `+ - * / %` (remainder, as\n * JavaScript's `%`), parentheses, signed numbers and decimals; nothing else, so no exponents, functions or names.\n * A leading `=` or `+` is read as a spreadsheet reads it, so `=12*3` and `+12*3` are both `36`.\n *\n * The result is rounded to 15 significant digits to shed binary floating-point noise (`0.1*3` is `0.3`, not\n * `0.30000000000000004`).\n *\n * @param text - The box's text\n * @param separators - The marks the box writes numbers with; a plain `.` decimal point with no grouping when omitted\n * @returns The number, or null when the text is empty or no well-formed expression (`12*`, `(3`, `5/0`, or a number\n * written with the separators the other way round, as `1.234,56` in English)\n * @public\n */\nexport function evaluateArithmetic(text: string, separators: NumberSeparators = {}): number | null {\n\tif (!numbersWellFormed(text, separators)) return null\n\tlet source = text.replace(/\\s/g, '')\n\tif (separators.group && separators.group !== separators.decimal) source = source.replaceAll(separators.group, '')\n\tif (separators.decimal && separators.decimal !== '.') source = source.replaceAll(separators.decimal, '.')\n\tif (source.startsWith('=')) source = source.slice(1)\n\tif (source === '' || !/^[\\d.+\\-*/%()]*$/.test(source)) return null\n\n\tlet pos = 0\n\tlet depth = 0\n\n\tconst fail = (): never => {\n\t\tthrow new SyntaxError(`Not an arithmetic expression: ${text}`)\n\t}\n\n\tconst peek = () => source[pos]\n\n\tconst parseNumber = (): number => {\n\t\tconst match = /^(?:\\d+\\.?\\d*|\\.\\d+)/.exec(source.slice(pos))\n\t\tif (!match) return fail()\n\t\tpos += match[0].length\n\t\treturn Number(match[0])\n\t}\n\n\tconst parsePrimary = (): number => {\n\t\tif (peek() !== '(') return parseNumber()\n\t\tif (++depth > MAX_DEPTH) fail()\n\t\tpos++\n\t\tconst value = parseSum()\n\t\tif (peek() !== ')') fail()\n\t\tpos++\n\t\tdepth--\n\t\treturn value\n\t}\n\n\tconst parseUnary = (): number => {\n\t\tconst sign = peek()\n\t\tif (sign !== '+' && sign !== '-') return parsePrimary()\n\t\tif (++depth > MAX_DEPTH) fail()\n\t\tpos++\n\t\tconst value = parseUnary()\n\t\tdepth--\n\t\treturn sign === '-' ? -value : value\n\t}\n\n\tconst parseProduct = (): number => {\n\t\tlet value = parseUnary()\n\t\tfor (let op = peek(); op === '*' || op === '/' || op === '%'; op = peek()) {\n\t\t\tpos++\n\t\t\tconst right = parseUnary()\n\t\t\tvalue = op === '*' ? value * right : op === '/' ? value / right : value % right\n\t\t}\n\t\treturn value\n\t}\n\n\tfunction parseSum(): number {\n\t\tlet value = parseProduct()\n\t\tfor (let op = peek(); op === '+' || op === '-'; op = peek()) {\n\t\t\tpos++\n\t\t\tconst right = parseProduct()\n\t\t\tvalue = op === '+' ? value + right : value - right\n\t\t}\n\t\treturn value\n\t}\n\n\ttry {\n\t\tconst value = parseSum()\n\t\tif (pos !== source.length || !Number.isFinite(value)) return null\n\t\t// `-0` reads as 0 in a box.\n\t\treturn Number(value.toPrecision(15)) + 0\n\t} catch {\n\t\treturn null\n\t}\n}\n","import { reactive, ref, watch, type Ref } from 'vue'\n\nimport { evaluateArithmetic, isArithmeticEntry, type NumberSeparators } from '../arithmetic'\n\n/**\n * Configuration for {@link useArithmeticInput}.\n * @public\n */\nexport type ArithmeticInputOptions = {\n\t/** The model's number. A record may hand it over as text (`\"40\"`, as a database numeric arrives). */\n\tvalue: () => unknown\n\t/** Hands the model a new number, or null once the box is emptied */\n\tcommit: (value: number | null) => void\n\t/** The box's text for the model's number */\n\tformat?: (value: number | null) => string\n\t/** The marks the box writes numbers with; a plain `.` decimal point when omitted */\n\tseparators?: () => NumberSeparators\n\t/** The field's decimal places, where it has a fixed number of them; at `0` (as for JPY) a decimal mark is refused */\n\tfractionDigits?: () => number | undefined\n\t/** Rounds a result before it is committed, as to a currency's decimals: `10/3` is `3.33`, as the box shows */\n\tround?: (value: number) => number\n\t/** Commit each well-formed result as it is typed (default), or only once the box settles */\n\tlive?: boolean\n\t/** The box's text, when the caller already keeps it (as in `v-model`) */\n\ttext?: Ref<string>\n\t/** Whether the box takes arithmetic at all; while false the box's text is left alone. Default true. */\n\tenabled?: () => boolean\n\t/** Select the box's text on focus, so typing replaces it */\n\tselectOnFocus?: boolean\n}\n\n/** The model's number, read from a number or from the text a record may carry instead. */\nconst numberOf = (value: unknown): number | null => {\n\tif (typeof value === 'number') return Number.isFinite(value) ? value : null\n\tif (typeof value === 'string' && value.trim() !== '') {\n\t\tconst n = Number(value)\n\t\treturn Number.isFinite(n) ? n : null\n\t}\n\treturn null\n}\n\n/** The box's text once `inserted` replaces its selection. */\nconst textWith = (input: HTMLInputElement, inserted: string) =>\n\tinput.value.slice(0, input.selectionStart ?? 0) + inserted + input.value.slice(input.selectionEnd ?? 0)\n\n/**\n * A number box that takes arithmetic: `12*3+4` is read as `40`, and a leading `=` or `+` as a spreadsheet reads it.\n * The box holds the typed text while it is edited and settles to the result on blur or Enter; text that is no\n * expression by then (`12*`) leaves the model at its last number.\n *\n * Only an edit writes: a box focused and left as it was commits nothing, so a value is never rewritten (or rounded)\n * by being looked at. \"Edited\" means the text differs from what the box last showed or saved.\n *\n * An `<input>` binds the returned `inputAttrs` (`v-bind=\"arithmetic.inputAttrs\"`); an attribute written after the bind\n * overrides it, and a listener written beside it runs as well. A box that is no `<input>` (a contenteditable table\n * cell), or one that is not always an arithmetic box, drives `begin`, `update`, `settle`, `end` and `accepts` itself.\n *\n * @public\n */\nexport function useArithmeticInput({\n\tvalue,\n\tcommit,\n\tformat = n => (n === null ? '' : String(n)),\n\tseparators = () => ({}),\n\tfractionDigits = () => undefined,\n\tround = n => n,\n\tlive = true,\n\ttext = ref(''),\n\tenabled = () => true,\n\tselectOnFocus = false,\n}: ArithmeticInputOptions) {\n\tconst focused = ref(false)\n\t// What the box last showed or saved: the text that commits nothing.\n\tlet committedText = text.value\n\n\t/** Set the box's text without it counting as an edit */\n\tconst rebase = (current: string) => {\n\t\ttext.value = current\n\t\tcommittedText = current\n\t}\n\n\t/** Show the model's number in the box */\n\tconst syncText = () => rebase(format(numberOf(value())))\n\n\t// Not while it is typed in: the box holds text on its way to a number (\"12*\"), which the number would overwrite.\n\twatch(\n\t\tvalue,\n\t\t() => {\n\t\t\tif (enabled() && !focused.value) syncText()\n\t\t},\n\t\t{ immediate: true }\n\t)\n\n\tconst commitText = () => {\n\t\tif (text.value === committedText) return\n\t\tconst empty = text.value.trim() === ''\n\t\tconst result = empty ? null : evaluateArithmetic(text.value, separators())\n\t\tif (result === null && !empty) return\n\t\tcommit(result === null ? null : round(result))\n\t\tcommittedText = text.value\n\t}\n\n\t/**\n\t * Whether the box may hold `next`: digits, `.`, `+ - * / %`, parentheses and a leading `=`, with each number\n\t * written as the box writes numbers (so not `1.2.3`, nor `1.234,56` in English)\n\t */\n\tconst accepts = (next: string) => isArithmeticEntry(next, separators(), fractionDigits())\n\n\t/** The box gained focus; `current` is its text, when the caller keeps it */\n\tconst begin = (current?: string) => {\n\t\tfocused.value = true\n\t\tif (current !== undefined) rebase(current)\n\t}\n\n\t/** The box's text changed as it was typed in */\n\tconst update = (next: string) => {\n\t\ttext.value = next\n\t\tif (live) commitText()\n\t}\n\n\t/** Commit an edit, then show the result in place of the expression */\n\tconst settle = () => {\n\t\tcommitText()\n\t\tsyncText()\n\t}\n\n\t/** The box lost focus */\n\tconst end = () => {\n\t\tfocused.value = false\n\t\tsettle()\n\t}\n\n\tconst onFocus = (event: FocusEvent) => {\n\t\tbegin()\n\t\tconst input = event.target\n\t\tif (selectOnFocus && input instanceof HTMLInputElement) requestAnimationFrame(() => input.select())\n\t}\n\n\tconst onInput = (event: Event) => {\n\t\tif (event.target instanceof HTMLInputElement) update(event.target.value)\n\t}\n\n\tconst onKeydown = (event: KeyboardEvent) => {\n\t\tif (event.ctrlKey || event.metaKey || event.altKey) return\n\t\tif (event.key === 'Enter') {\n\t\t\tsettle()\n\t\t\treturn\n\t\t}\n\t\tif (event.key.length !== 1) return\n\t\t// The box's text once typed in, as `=` may only start it.\n\t\tconst input = event.target\n\t\tconst next = input instanceof HTMLInputElement ? textWith(input, event.key) : event.key\n\t\tif (!accepts(next)) event.preventDefault()\n\t}\n\n\t// A pasted letter or exponent leaves the box as it was.\n\tconst onPaste = (event: ClipboardEvent) => {\n\t\tconst input = event.target\n\t\tif (!(input instanceof HTMLInputElement)) return\n\t\tif (!accepts(textWith(input, event.clipboardData?.getData('text') ?? ''))) event.preventDefault()\n\t}\n\n\tconst onBlur = () => end()\n\n\t// Text, not `type=\"number\"`, which refuses an operator.\n\tconst inputAttrs = reactive({\n\t\tvalue: text,\n\t\ttype: 'text' as const,\n\t\tinputmode: 'decimal' as const,\n\t\tautocomplete: 'off' as const,\n\t\tonFocus,\n\t\tonInput,\n\t\tonKeydown,\n\t\tonPaste,\n\t\tonBlur,\n\t})\n\n\treturn {\n\t\tinputAttrs,\n\t\ttext,\n\t\tfocused,\n\t\taccepts,\n\t\tbegin,\n\t\tupdate,\n\t\tsettle,\n\t\tend,\n\t\trebase,\n\t\tsyncText,\n\t\tonFocus,\n\t\tonInput,\n\t\tonKeydown,\n\t\tonPaste,\n\t\tonBlur,\n\t}\n}\n","import { Temporal } from 'temporal-polyfill'\n\n/**\n * Reads a `YYYY-MM-DD` day. Anything that is not a real day written exactly that way reads as no day.\n *\n * Not `Temporal.PlainDate.from` alone: it also takes the day out of a date-time, which would show a day\n * field over a date-time column as a day instead of as the mismatch it is.\n * @param day - The day, as `YYYY-MM-DD`\n * @public\n */\nexport function fromISODate(day: string): Temporal.PlainDate | undefined {\n\tif (!/^\\d{4}-\\d{2}-\\d{2}$/.test(day)) return undefined\n\n\ttry {\n\t\treturn Temporal.PlainDate.from(day)\n\t} catch {\n\t\treturn undefined\n\t}\n}\n","// SemVer 2.0.0, strictly: https://semver.org. The same grammar the `semver` Postgres extension stores,\n// so a version the form accepts is one the column takes, and the two order versions alike.\nconst SEMVER =\n\t/^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\n\nconst NUMBER = /^(0|[1-9]\\d*)$/\nconst NUMBER_SO_FAR = /^(0|[1-9]\\d*)?$/\nconst PRERELEASE_IDENTIFIER = /^(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)$/\nconst BUILD_IDENTIFIER = /^[0-9a-zA-Z-]+$/\n// Any run of identifier characters can still become an identifier: `01` is not one, but `01a` is.\nconst IDENTIFIER_SO_FAR = /^[0-9a-zA-Z-]*$/\n\n/**\n * Whether the text is a version under SemVer 2.0.0: `1.4.0`, `1.4.0-beta.2`, `1.4.0+build.5`. A `v`\n * prefix, a missing part (`1.4`) and a leading zero (`01.4.0`) are not.\n * @param text - The text to check\n * @public\n */\nexport function isSemver(text: string): boolean {\n\treturn SEMVER.test(text)\n}\n\nconst splitOnce = (text: string, separator: string): [string, string | undefined] => {\n\tconst index = text.indexOf(separator)\n\treturn index === -1 ? [text, undefined] : [text.slice(0, index), text.slice(index + 1)]\n}\n\n/** Whether each dot-separated part before the last matches `whole`, and the last matches `last`. */\nconst partsMatch = (text: string, whole: RegExp, last: RegExp): boolean => {\n\tconst parts = text.split('.')\n\tconst typing = parts.pop() ?? ''\n\treturn parts.every(part => whole.test(part)) && last.test(typing)\n}\n\n/**\n * Whether typing more could still make the text a version: `1.`, `1.4.0-` and the empty text can,\n * while `v1`, `01` and `1.4-beta` cannot. Every version passes, so a box that refuses any edit failing\n * this one never stops someone typing a version.\n * @param text - The text so far\n * @public\n */\nexport function isSemverPrefix(text: string): boolean {\n\t// Neither `+` nor `-` can appear in the numbers, so the first of each ends the part before it.\n\tconst [head, build] = splitOnce(text, '+')\n\tconst [core, prerelease] = splitOnce(head, '-')\n\n\tconst coreDone = prerelease !== undefined || build !== undefined\n\tconst numbers = core.split('.').length\n\tif (numbers > 3 || (coreDone && numbers < 3)) return false\n\tif (!partsMatch(core, NUMBER, coreDone ? NUMBER : NUMBER_SO_FAR)) return false\n\n\tif (prerelease !== undefined) {\n\t\tconst last = build === undefined ? IDENTIFIER_SO_FAR : PRERELEASE_IDENTIFIER\n\t\tif (!partsMatch(prerelease, PRERELEASE_IDENTIFIER, last)) return false\n\t}\n\n\treturn build === undefined || partsMatch(build, BUILD_IDENTIFIER, IDENTIFIER_SO_FAR)\n}\n\n// Digits without leading zeros, compared without converting, so no version is too big to order.\nconst compareDigits = (a: string, b: string): number => a.length - b.length || (a < b ? -1 : a > b ? 1 : 0)\n\nconst compareIdentifiers = (a: string, b: string): number => {\n\tconst aNumeric = /^\\d+$/.test(a)\n\tconst bNumeric = /^\\d+$/.test(b)\n\tif (aNumeric && bNumeric) return compareDigits(a, b)\n\tif (aNumeric !== bNumeric) return aNumeric ? -1 : 1\n\treturn a < b ? -1 : a > b ? 1 : 0\n}\n\nconst comparePrereleases = (a: string | undefined, b: string | undefined): number => {\n\tif (a === b) return 0\n\t// A prerelease comes before its release.\n\tif (a === undefined) return 1\n\tif (b === undefined) return -1\n\n\tconst left = a.split('.')\n\tconst right = b.split('.')\n\tfor (let i = 0; i < Math.min(left.length, right.length); i++) {\n\t\tconst order = compareIdentifiers(left[i], right[i])\n\t\tif (order) return order\n\t}\n\treturn left.length - right.length\n}\n\n/**\n * Orders two versions by SemVer 2.0.0 precedence: major, minor and patch as numbers, a prerelease\n * before its release, and prerelease identifiers one by one. Build metadata does not count, so\n * `1.4.0+a` and `1.4.0+b` compare equal. Text that is not a version comes after every version.\n * @param a - The first version\n * @param b - The second version\n * @returns Negative when `a` comes first, positive when `b` does, zero when neither\n * @public\n */\nexport function compareSemver(a: string, b: string): number {\n\tconst left = SEMVER.exec(a)\n\tconst right = SEMVER.exec(b)\n\tif (!left || !right) return Number(!left) - Number(!right)\n\n\tfor (let part = 1; part <= 3; part++) {\n\t\tconst order = compareDigits(left[part], right[part])\n\t\tif (order) return order\n\t}\n\treturn comparePrereleases(left[4], right[4])\n}\n","/**\n * Fraction digits for a currency in amount inputs (e.g. JPY → 0).\n * @public\n */\nexport function currencyInputFractionDigits(currencyId: string | undefined): number {\n\tconst id = currencyId?.toUpperCase() ?? ''\n\tif (!id) return 2\n\ttry {\n\t\treturn (\n\t\t\tnew Intl.NumberFormat('en-US', {\n\t\t\t\tstyle: 'currency',\n\t\t\t\tcurrency: id,\n\t\t\t}).resolvedOptions().maximumFractionDigits ?? 2\n\t\t)\n\t} catch {\n\t\treturn 2\n\t}\n}\n\n/**\n * The separators a currency amount field writes amounts with: the locale's grouping and decimal marks.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function currencyAmountSeparators(locale?: string): { group: string; decimal: string } {\n\tconst parts = new Intl.NumberFormat(locale).formatToParts(1234567.89)\n\treturn {\n\t\tgroup: parts.find(part => part.type === 'group')?.value ?? ',',\n\t\tdecimal: parts.find(part => part.type === 'decimal')?.value ?? '.',\n\t}\n}\n\n/**\n * Format a numeric amount for display in a currency amount field (no currency symbol). The currency\n * sets the decimals; the separators are the locale's, as in the table cell.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function formatCurrencyAmountInput(\n\tamount: number | null | undefined,\n\tcurrencyId: string | undefined,\n\tlocale?: string\n): string {\n\tif (amount === null || amount === undefined) return ''\n\tconst id = currencyId?.toUpperCase() ?? ''\n\tconst fractionDigits = currencyInputFractionDigits(id)\n\treturn new Intl.NumberFormat(locale, {\n\t\tminimumFractionDigits: fractionDigits,\n\t\tmaximumFractionDigits: fractionDigits,\n\t\tuseGrouping: id !== 'JPY',\n\t}).format(amount)\n}\n\n/**\n * Parse user-entered text in a currency amount field back to a number, read with the separators the\n * field writes it with.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function parseCurrencyAmountInput(text: string, locale?: string): number | null {\n\tconst { group, decimal } = currencyAmountSeparators(locale)\n\tconst normalized = text\n\t\t.replace(/\\s/g, '')\n\t\t.replace(/[^\\d.,\\-+]/g, '')\n\t\t.replaceAll(group, '')\n\t\t.replace(decimal, '.')\n\t// No digits is no amount, though `Number('')` is 0.\n\tif (!/\\d/.test(normalized)) return null\n\tconst value = Number(normalized)\n\treturn Number.isFinite(value) ? value : null\n}\n\n/**\n * What a masked currency amount field may hold while it is typed in: digits and grouping marks, then at most one\n * decimal point followed by digits.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function currencyAmountEntryPattern(currencyId: string | undefined, locale?: string): RegExp {\n\tconst { group, decimal } = currencyAmountSeparators(locale)\n\tconst escape = (mark: string) => mark.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\tconst whole = `-?[\\\\d${escape(group)}]*`\n\tif (currencyInputFractionDigits(currencyId) === 0) return new RegExp(`^${whole}$`)\n\t// US-style keyboards often paste/type '.' even when the locale decimal is ','.\n\tconst point = decimal === '.' ? '\\\\.' : `[${escape(decimal)}.]`\n\treturn new RegExp(`^${whole}(?:${point}\\\\d*)?$`)\n}\n","type CurrencyLike = {\n\tid?: string | number\n\tsymbol?: string\n\tdisplayText?: string\n}\n\nfunction displayScalar(value: unknown): string {\n\tif (typeof value === 'string') return value\n\tif (typeof value === 'number' || typeof value === 'bigint') return String(value)\n\tif (typeof value === 'boolean') return String(value)\n\treturn ''\n}\n\nfunction displayQty(qty: unknown): string {\n\tif (qty === null || qty === undefined || qty === '') return ''\n\treturn displayScalar(qty)\n}\n\n/**\n * Format a currency amount for display (forms, table cells). Uses `Intl` when `currency.id` is a\n * valid ISO code; otherwise falls back to symbol, display text, or id.\n * @public\n */\nexport function formatCurrencyAmount(amount: number | null | undefined, currency: CurrencyLike | undefined): string {\n\tif (amount === null || amount === undefined) return ''\n\tconst id = currency?.id != null ? String(currency.id) : ''\n\tif (id) {\n\t\ttry {\n\t\t\treturn new Intl.NumberFormat(undefined, {\n\t\t\t\tstyle: 'currency',\n\t\t\t\tcurrency: id,\n\t\t\t\tcurrencyDisplay: 'symbol',\n\t\t\t}).format(amount)\n\t\t} catch {\n\t\t\t// Not a valid ISO 4217 code — fall through to symbol / displayText.\n\t\t}\n\t}\n\tconst suffix = formatCurrencySymbol(currency)\n\treturn suffix ? `${amount} ${suffix}`.trim() : String(amount)\n}\n\n/**\n * The mark that names a currency beside an amount: the symbol `Intl` formats a valid ISO code with,\n * as {@link formatCurrencyAmount} does; otherwise its symbol, display text, or id.\n * @public\n */\nexport function formatCurrencySymbol(currency: CurrencyLike | undefined): string {\n\tconst id = currency?.id != null ? String(currency.id) : ''\n\tif (id) {\n\t\ttry {\n\t\t\tconst parts = new Intl.NumberFormat(undefined, {\n\t\t\t\tstyle: 'currency',\n\t\t\t\tcurrency: id,\n\t\t\t\tcurrencyDisplay: 'symbol',\n\t\t\t}).formatToParts(0)\n\t\t\tconst symbol = parts.find(part => part.type === 'currency')?.value\n\t\t\tif (symbol) return symbol\n\t\t} catch {\n\t\t\t// Not a valid ISO 4217 code — fall through to symbol / displayText.\n\t\t}\n\t}\n\treturn currency?.symbol ?? currency?.displayText ?? id\n}\n\n/**\n * Render a composite quantity value for table cells. Omits the UOM when it matches `stockUom`.\n * @public\n */\nexport function formatQuantityCell(value: unknown): string {\n\tif (value === null || value === undefined) return ''\n\tif (typeof value !== 'object') return displayScalar(value)\n\tconst record = value as { qty?: unknown; uom?: string; stockUom?: string }\n\tconst qtyText = displayQty(record.qty)\n\tconst uom = record.uom ?? ''\n\tconst stockUom = record.stockUom ?? ''\n\tif (!uom) return qtyText\n\tif (stockUom && uom === stockUom) return qtyText\n\treturn `${qtyText} ${uom}`.trim()\n}\n\n/**\n * Render a composite currency value for table cells.\n * @public\n */\nexport function formatCurrencyCell(value: unknown): string {\n\tif (value === null || value === undefined) return ''\n\tif (typeof value !== 'object') return displayScalar(value)\n\tconst record = value as { amount?: number | null; currency?: CurrencyLike }\n\treturn formatCurrencyAmount(record.amount, record.currency)\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\nexport { useArithmeticInput, type ArithmeticInputOptions } from './composables/arithmeticInput'\nimport { fromISODate } from './dates'\nimport { compareSemver, isSemver, isSemverPrefix } from './semver'\nexport type * from './types'\n\n/**\n * Install all utility components\n * @param _app - Vue app instance\n * @public\n */\nfunction install(_app: App /* options */) {}\n\nexport {\n\tarithmeticEntryPattern,\n\tevaluateArithmetic,\n\tisArithmeticEntry,\n\tisArithmeticKey,\n\troundToPrecision,\n\ttype NumberSeparators,\n} from './arithmetic'\nexport {\n\tcurrencyAmountEntryPattern,\n\tcurrencyAmountSeparators,\n\tcurrencyInputFractionDigits,\n\tformatCurrencyAmountInput,\n\tparseCurrencyAmountInput,\n} from './currencyAmountFormat'\nexport { formatCurrencyAmount, formatCurrencyCell, formatCurrencySymbol, formatQuantityCell } from './denominatedFormat'\nexport { compareSemver, defaultKeypressHandlers, fromISODate, install, isSemver, isSemverPrefix, useKeyboardNav }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,qBACf,SACA,EAAE,SAAS,eAAe,iBAA8C,CAAC,GACxE;CACD,MAAM,mBAAmB,IAAI,KAAK;CAElC,MAAM,qBAAqB;EAC1B,IAAI,CAAC,QAAQ;EAEb,MAAM,WAAW,OAAO;EACxB,MAAM,KAAK,aAAa,OAAO;EAC/B,IAAI,CAAC,IACJ,iBAAiB,QAAQ;OACnB;GACN,MAAM,OAAO,GAAG,sBAAsB;GACtC,iBAAiB,QAChB,KAAK,QAAQ,OAAO,eAAe,SAAS,gBAAgB,iBAC5D,KAAK,SAAS,OAAO,cAAc,SAAS,gBAAgB,gBAC5D,KAAK,UAAU,KACf,KAAK,SAAS;EAChB;CACD;CAEA,YACO,aAAa,OAAO,SACpB,aAAa,GACnB;EAAE,WAAW;EAAM,OAAO;CAA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AAS;CACf,MAAM,UAAU,WAAW,OAAO,GAAG;CACrC,MAAM,MAAM,OAAO,OAAO;CAC1B,MAAM,WAAW,OAAO,YAAY;CACpC,IAAI,CAAC,KAAK,OAAO;CACjB,IAAI,YAAY,QAAQ,UAAU,OAAO;CACzC,OAAO,GAAG,QAAQ,GAAG,MAAM,KAAK;AACjC;;;;;AAMA,SAAgB,mBAAmB,OAAwB;CAC1D,IAAI,UAAU,QAAQ,UAAU,KAAA,GAAW,OAAO;CAClD,IAAI,OAAO,UAAU,UAAU,OAAO,cAAc,KAAK;CACzD,MAAM,SAAS;CACf,OAAO,qBAAqB,OAAO,QAAQ,OAAO,QAAQ;AAC3D;;;;;;;;AC5EA,SAAS,QAAQ,MAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"utilities.js","names":[],"sources":["../src/composables/visibility/index.ts","../src/composables/keyboard.ts","../src/arithmetic.ts","../src/composables/arithmeticInput.ts","../src/dates.ts","../src/semver.ts","../src/currencyAmountFormat.ts","../src/denominatedFormat.ts","../src/index.ts"],"sourcesContent":["import {\n\ttype ConfigurableWindow,\n\ttype MaybeComputedElementRef,\n\tdefaultWindow,\n\tunrefElement,\n\tuseEventListener,\n} from '@vueuse/core'\nimport { ref, watch, type MaybeRefOrGetter } from 'vue'\n\nexport interface UseElementVisibilityOptions extends ConfigurableWindow {\n\tscrollTarget?: MaybeRefOrGetter<HTMLElement | undefined | null>\n}\n\n/**\n * Tracks the visibility of an element within the viewport.\n *\n * Compatibility version to get Stonecrop keyboard navigation to work. This function is a copy of the\n * `useElementVisibility` function from VueUse v9.13.0, with the `IntersectionObserver` API removed.\n *\n * This version uses the `getBoundingClientRect` method to determine if an element is visible\n * in the viewport. This is less performant than the `IntersectionObserver` API, but it is\n * more compatible.\n *\n * Note: the newer versions of the VueUse dependencies imported here are sufficient for this composable.\n * (Last verified: v10.9.0 on May 2, 2024)\n *\n * @see https://v9-13-0.vueuse.org/core/useElementVisibility\n * @param element - Element to track visibility for\n * @param options - Configuration options (window, scrollTarget)\n */\nexport function useElementVisibility(\n\telement: MaybeComputedElementRef,\n\t{ window = defaultWindow, scrollTarget }: UseElementVisibilityOptions = {}\n) {\n\tconst elementIsVisible = ref(false)\n\n\tconst testBounding = () => {\n\t\tif (!window) return\n\n\t\tconst document = window.document\n\t\tconst el = unrefElement(element)\n\t\tif (!el) {\n\t\t\telementIsVisible.value = false\n\t\t} else {\n\t\t\tconst rect = el.getBoundingClientRect()\n\t\t\telementIsVisible.value =\n\t\t\t\trect.top <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\t\t\trect.left <= (window.innerWidth || document.documentElement.clientWidth) &&\n\t\t\t\trect.bottom >= 0 &&\n\t\t\t\trect.right >= 0\n\t\t}\n\t}\n\n\twatch(\n\t\t() => unrefElement(element),\n\t\t() => testBounding(),\n\t\t{ immediate: true, flush: 'post' }\n\t)\n\n\tif (window) {\n\t\tuseEventListener(scrollTarget || window, 'scroll', testBounding, {\n\t\t\tcapture: false,\n\t\t\tpassive: true,\n\t\t})\n\t}\n\n\treturn elementIsVisible\n}\n","import { type WatchStopHandle, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport { useFocusWithin } from '@vueuse/core'\n\nimport { useElementVisibility } from './visibility'\nimport type { KeyboardNavigationOptions, KeypressHandlers } from '../types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet visible = useElementVisibility(element).value\n\tvisible = visible && element.offsetHeight > 0\n\treturn visible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n/** When focus is on a control inside a cell, grid navigation still uses the owning `<td>`. */\nconst resolveNavCell = (element: HTMLElement): HTMLElement => {\n\tif (element instanceof HTMLTableCellElement) {\n\t\treturn element\n\t}\n\tconst cell = element.closest('td, th')\n\tif (cell instanceof HTMLTableCellElement) {\n\t\treturn cell\n\t}\n\treturn element\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getUpCellEl(resolveNavCell(event.target))\n}\n\nconst getUpCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevSibling = element.parentElement?.previousElementSibling\n\t\tif ($prevSibling instanceof HTMLTableRowElement) {\n\t\t\tconst $prevRowCells = Array.from($prevSibling.children)\n\t\t\tconst $cellEl = $prevRowCells[element.cellIndex]\n\t\t\tif ($cellEl instanceof HTMLElement) {\n\t\t\t\t$upCell = $cellEl\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevSibling = element.previousElementSibling\n\t\tif ($prevSibling instanceof HTMLTableRowElement) {\n\t\t\t$upCell = $prevSibling\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn getUpCellEl($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $target = resolveNavCell(event.target)\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navEl = $firstRow?.children[$target.cellIndex]\n\t\t\tif ($navEl instanceof HTMLElement) {\n\t\t\t\t$topCell = $navEl\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $parent = $target.parentElement\n\t\tif ($parent) {\n\t\t\tconst $firstEl = $parent.firstElementChild\n\t\t\tif ($firstEl instanceof HTMLTableRowElement) {\n\t\t\t\t$topCell = $firstEl\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn getDownCellEl($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getDownCellEl(resolveNavCell(event.target))\n}\n\nconst getDownCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextSibling = element.parentElement?.nextElementSibling\n\t\tif ($nextSibling) {\n\t\t\tconst $nextRowCells = Array.from($nextSibling.children)\n\t\t\tconst $cellEl = $nextRowCells[element.cellIndex]\n\t\t\tif ($cellEl instanceof HTMLElement) {\n\t\t\t\t$downCell = $cellEl\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextSibling = element.nextElementSibling\n\t\tif ($nextSibling instanceof HTMLTableRowElement) {\n\t\t\t$downCell = $nextSibling\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn getDownCellEl($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $target = resolveNavCell(event.target)\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navEl = $lastRow?.children[$target.cellIndex]\n\t\t\tif ($navEl instanceof HTMLElement) {\n\t\t\t\t$bottomCell = $navEl\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $parent = $target.parentElement\n\t\tif ($parent) {\n\t\t\tconst $lastEl = $parent.lastElementChild\n\t\t\tif ($lastEl instanceof HTMLTableRowElement) {\n\t\t\t\t$bottomCell = $lastEl\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn getUpCellEl($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getPrevCellEl(resolveNavCell(event.target))\n}\n\nconst getPrevCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tconst $prevSibling = element.previousElementSibling\n\tif ($prevSibling instanceof HTMLElement) {\n\t\t$prevCell = $prevSibling\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\tconst $lastEl = $prevRow?.lastElementChild\n\t\tif ($lastEl instanceof HTMLElement) {\n\t\t\t$prevCell = $lastEl\n\t\t}\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn getPrevCellEl($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\treturn getNextCellEl(resolveNavCell(event.target))\n}\n\nconst getNextCellEl = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tconst $nextSibling = element.nextElementSibling\n\tif ($nextSibling instanceof HTMLElement) {\n\t\t$nextCell = $nextSibling\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tconst $firstEl = $nextRow?.firstElementChild\n\t\tif ($firstEl instanceof HTMLElement) {\n\t\t\t$nextCell = $firstEl\n\t\t}\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn getNextCellEl($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $parent = resolveNavCell(event.target).parentElement\n\tconst $firstEl = $parent?.firstElementChild\n\tconst $firstCell = $firstEl instanceof HTMLElement ? $firstEl : null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn getNextCellEl($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tif (!(event.target instanceof HTMLElement)) return undefined\n\tconst $parent = resolveNavCell(event.target).parentElement\n\tconst $lastEl = $parent?.lastElementChild\n\tconst $lastCell = $lastEl instanceof HTMLElement ? $lastEl : null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn getPrevCellEl($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap: Record<string, string> = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\n/**\n * Default keypress handlers for keyboard navigation\n * @public\n */\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tif (!(event.target instanceof HTMLElement)) return\n\t\tconst $target = resolveNavCell(event.target)\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tif (!(event.target instanceof HTMLElement)) return\n\t\tconst $target = resolveNavCell(event.target)\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\n/**\n * Gets the parent element from a keyboard navigation option.\n * @internal\n */\nfunction getParentElement(option: KeyboardNavigationOptions): HTMLElement | null {\n\tlet $parent: HTMLElement | null = null\n\tif (option.parent) {\n\t\tif (typeof option.parent === 'string') {\n\t\t\t$parent = document.querySelector(option.parent)\n\t\t} else if (option.parent instanceof HTMLElement) {\n\t\t\t$parent = option.parent\n\t\t} else {\n\t\t\t$parent = option.parent.value\n\t\t}\n\t}\n\treturn $parent\n}\n\n/**\n * Keyboard navigation composable\n * @param options - Keyboard navigation options\n * @public\n */\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectorsFromOption = (option: KeyboardNavigationOptions) => {\n\t\t// assumes that option.selectors is provided\n\t\tconst $parent = getParentElement(option)\n\t\tlet selectors: HTMLElement[] = []\n\t\tif (typeof option.selectors === 'string') {\n\t\t\tselectors = $parent\n\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t} else if (Array.isArray(option.selectors)) {\n\t\t\tfor (const element of option.selectors) {\n\t\t\t\tif (element instanceof HTMLElement) {\n\t\t\t\t\tselectors.push(element)\n\t\t\t\t} else {\n\t\t\t\t\t// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Vue component $el is typed as any; shape guaranteed by VNode contract\n\t\t\t\t\tselectors.push(element.$el as HTMLElement)\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (option.selectors instanceof HTMLElement) {\n\t\t\tselectors.push(option.selectors)\n\t\t} else if (option.selectors?.value) {\n\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\tif (element instanceof HTMLElement) {\n\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Vue component $el is typed as any; shape guaranteed by VNode contract\n\t\t\t\t\t\tselectors.push(element.$el as HTMLElement)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t}\n\t\t}\n\t\treturn selectors\n\t}\n\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\tconst $parent = getParentElement(option)\n\t\tlet selectors: HTMLElement[] = []\n\t\tif (option.selectors) {\n\t\t\tselectors = getSelectorsFromOption(option)\n\t\t} else if ($parent) {\n\t\t\t// TODO: what should happen if no parent or selectors are provided?\n\t\t\tconst $children = Array.from($parent.children).filter((el): el is HTMLElement => el instanceof HTMLElement)\n\t\t\tselectors = $children.filter(selector => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = eventKeyMap[event.key] || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(k => modifierKeys.includes(k))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(mk => {\n\t\t\t\t\t\tconst modifierKey = mk.charAt(0).toUpperCase() + mk.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst watchStopHandlers: WatchStopHandle[] = []\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst $parent = getParentElement(option)\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tconst listener = getEventListener(option)\n\t\t\tconst listenerElements = $parent\n\t\t\t\t? [$parent] // watch for focus recursively within the parent element\n\t\t\t\t: selectors // watch for focus on each selector element TODO: too much JS?\n\n\t\t\tfor (const element of listenerElements) {\n\t\t\t\tconst { focused } = useFocusWithin(ref(element))\n\t\t\t\tconst stopHandler = watch(focused, value => {\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\telement.addEventListener('keydown', listener)\n\t\t\t\t\t} else {\n\t\t\t\t\t\telement.removeEventListener('keydown', listener)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\twatchStopHandlers.push(stopHandler)\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const stopHandler of watchStopHandlers) {\n\t\t\tstopHandler()\n\t\t}\n\t})\n}\n","/**\n * The marks a number box writes numbers with. The decimal mark is read as the decimal point and the group mark is\n * dropped, so `1.000,5*2` reads as `1000.5*2` with German separators.\n * @public\n */\nexport type NumberSeparators = {\n\tgroup?: string\n\tdecimal?: string\n}\n\n// Deep enough for any expression typed by hand, shallow enough that `((((…` can't exhaust the stack.\nconst MAX_DEPTH = 64\n\nconst escapeMark = (mark: string) => mark.replace(/[.*+?^${}()|[\\]\\\\-]/g, '\\\\$&')\n\n/**\n * What an arithmetic number box may hold while it is typed in: digits, a decimal point, whitespace,\n * `+ - * / %` and parentheses, plus the given separators, after an optional leading `=` (as a spreadsheet formula\n * starts). Exponents (`e`, `^`) and any other letter are refused, and so is `=` anywhere but first.\n * @public\n */\nexport function arithmeticEntryPattern(separators: NumberSeparators = {}): RegExp {\n\tconst marks = [separators.group, separators.decimal].filter(Boolean).map(mark => escapeMark(mark!))\n\treturn new RegExp(`^\\\\s*=?[\\\\d.\\\\s+\\\\-*/%()${marks.join('')}]*$`)\n}\n\n/**\n * Whether every number in the text is written as the box writes numbers: grouping marks only in the whole part, then\n * at most one decimal mark, and none at all where the field carries no decimals. \"1.234,56\" in English is no number\n * (grouping after the decimal point), and neither is \"1.2.3\".\n */\nfunction numbersWellFormed(text: string, separators: NumberSeparators, fractionDigits?: number): boolean {\n\tconst decimal = separators.decimal ?? '.'\n\tconst group = separators.group && separators.group !== decimal ? separators.group : undefined\n\tconst d = escapeMark(decimal)\n\tconst g = group ? escapeMark(group) : ''\n\tconst whole = group ? `\\\\d[\\\\d${g}]*` : '\\\\d+'\n\tconst number = new RegExp(fractionDigits === 0 ? `^${whole}$` : `^(?:${whole})?(?:${d}\\\\d*)?$`)\n\tconst tokens = text.match(new RegExp(`[\\\\d${d}${g}]+`, 'g')) ?? []\n\treturn tokens.every(token => number.test(token))\n}\n\n/**\n * Whether an arithmetic number box may hold `text` while it is typed in: what {@link arithmeticEntryPattern} allows,\n * with each number in it well formed (grouping marks only in the whole part, then at most one decimal mark).\n * @param fractionDigits - The field's decimal places; at `0` (as for JPY) a decimal mark is refused\n * @public\n */\nexport function isArithmeticEntry(text: string, separators: NumberSeparators = {}, fractionDigits?: number): boolean {\n\treturn arithmeticEntryPattern(separators).test(text) && numbersWellFormed(text, separators, fractionDigits)\n}\n\n/**\n * Whether a single typed character may go into an arithmetic number box. `=` is one, though only as the box's first\n * character: check the box's text with {@link arithmeticEntryPattern} where the caret is known.\n * @public\n */\nexport function isArithmeticKey(key: string, separators: NumberSeparators = {}): boolean {\n\treturn key.length === 1 && arithmeticEntryPattern(separators).test(key)\n}\n\n/**\n * Round a number to a field's decimal places, as a column with a fixed scale holds it: `3.3333333333333` at 2 is\n * `3.33`. A missing or unusable precision (not a whole number from 0 to 100) leaves the number as it is.\n * @public\n */\nexport function roundToPrecision(value: number, precision?: number): number {\n\tif (precision === undefined || !Number.isInteger(precision) || precision < 0 || precision > 100) return value\n\treturn Number(value.toFixed(precision))\n}\n\n/**\n * Evaluate the arithmetic typed into a number box: `12*3+4` is `40`. Supports `+ - * / %` (remainder, as\n * JavaScript's `%`), parentheses, signed numbers and decimals; nothing else, so no exponents, functions or names.\n * A leading `=` or `+` is read as a spreadsheet reads it, so `=12*3` and `+12*3` are both `36`.\n *\n * The result is rounded to 15 significant digits to shed binary floating-point noise (`0.1*3` is `0.3`, not\n * `0.30000000000000004`).\n *\n * @param text - The box's text\n * @param separators - The marks the box writes numbers with; a plain `.` decimal point with no grouping when omitted\n * @returns The number, or null when the text is empty or no well-formed expression (`12*`, `(3`, `5/0`, or a number\n * written with the separators the other way round, as `1.234,56` in English)\n * @public\n */\nexport function evaluateArithmetic(text: string, separators: NumberSeparators = {}): number | null {\n\tif (!numbersWellFormed(text, separators)) return null\n\tlet source = text.replace(/\\s/g, '')\n\tif (separators.group && separators.group !== separators.decimal) source = source.replaceAll(separators.group, '')\n\tif (separators.decimal && separators.decimal !== '.') source = source.replaceAll(separators.decimal, '.')\n\tif (source.startsWith('=')) source = source.slice(1)\n\tif (source === '' || !/^[\\d.+\\-*/%()]*$/.test(source)) return null\n\n\tlet pos = 0\n\tlet depth = 0\n\n\tconst fail = (): never => {\n\t\tthrow new SyntaxError(`Not an arithmetic expression: ${text}`)\n\t}\n\n\tconst peek = () => source[pos]\n\n\tconst parseNumber = (): number => {\n\t\tconst match = /^(?:\\d+\\.?\\d*|\\.\\d+)/.exec(source.slice(pos))\n\t\tif (!match) return fail()\n\t\tpos += match[0].length\n\t\treturn Number(match[0])\n\t}\n\n\tconst parsePrimary = (): number => {\n\t\tif (peek() !== '(') return parseNumber()\n\t\tif (++depth > MAX_DEPTH) fail()\n\t\tpos++\n\t\tconst value = parseSum()\n\t\tif (peek() !== ')') fail()\n\t\tpos++\n\t\tdepth--\n\t\treturn value\n\t}\n\n\tconst parseUnary = (): number => {\n\t\tconst sign = peek()\n\t\tif (sign !== '+' && sign !== '-') return parsePrimary()\n\t\tif (++depth > MAX_DEPTH) fail()\n\t\tpos++\n\t\tconst value = parseUnary()\n\t\tdepth--\n\t\treturn sign === '-' ? -value : value\n\t}\n\n\tconst parseProduct = (): number => {\n\t\tlet value = parseUnary()\n\t\tfor (let op = peek(); op === '*' || op === '/' || op === '%'; op = peek()) {\n\t\t\tpos++\n\t\t\tconst right = parseUnary()\n\t\t\tvalue = op === '*' ? value * right : op === '/' ? value / right : value % right\n\t\t}\n\t\treturn value\n\t}\n\n\tfunction parseSum(): number {\n\t\tlet value = parseProduct()\n\t\tfor (let op = peek(); op === '+' || op === '-'; op = peek()) {\n\t\t\tpos++\n\t\t\tconst right = parseProduct()\n\t\t\tvalue = op === '+' ? value + right : value - right\n\t\t}\n\t\treturn value\n\t}\n\n\ttry {\n\t\tconst value = parseSum()\n\t\tif (pos !== source.length || !Number.isFinite(value)) return null\n\t\t// `-0` reads as 0 in a box.\n\t\treturn Number(value.toPrecision(15)) + 0\n\t} catch {\n\t\treturn null\n\t}\n}\n","import { reactive, ref, watch, type Ref } from 'vue'\n\nimport { evaluateArithmetic, isArithmeticEntry, type NumberSeparators } from '../arithmetic'\n\n/**\n * Configuration for {@link useArithmeticInput}.\n * @public\n */\nexport type ArithmeticInputOptions = {\n\t/** The model's number. A record may hand it over as text (`\"40\"`, as a database numeric arrives). */\n\tvalue: () => unknown\n\t/** Hands the model a new number, or null once the box is emptied */\n\tcommit: (value: number | null) => void\n\t/** The box's text for the model's number */\n\tformat?: (value: number | null) => string\n\t/** The marks the box writes numbers with; a plain `.` decimal point when omitted */\n\tseparators?: () => NumberSeparators\n\t/** The field's decimal places, where it has a fixed number of them; at `0` (as for JPY) a decimal mark is refused */\n\tfractionDigits?: () => number | undefined\n\t/** Rounds a result before it is committed, as to a currency's decimals: `10/3` is `3.33`, as the box shows */\n\tround?: (value: number) => number\n\t/** Commit each well-formed result as it is typed (default), or only once the box settles */\n\tlive?: boolean\n\t/** The box's text, when the caller already keeps it (as in `v-model`) */\n\ttext?: Ref<string>\n\t/** Whether the box takes arithmetic at all; while false the box's text is left alone. Default true. */\n\tenabled?: () => boolean\n\t/** Select the box's text on focus, so typing replaces it */\n\tselectOnFocus?: boolean\n}\n\n/** The model's number, read from a number or from the text a record may carry instead. */\nconst numberOf = (value: unknown): number | null => {\n\tif (typeof value === 'number') return Number.isFinite(value) ? value : null\n\tif (typeof value === 'string' && value.trim() !== '') {\n\t\tconst n = Number(value)\n\t\treturn Number.isFinite(n) ? n : null\n\t}\n\treturn null\n}\n\n/** The box's text once `inserted` replaces its selection. */\nconst textWith = (input: HTMLInputElement, inserted: string) =>\n\tinput.value.slice(0, input.selectionStart ?? 0) + inserted + input.value.slice(input.selectionEnd ?? 0)\n\n/**\n * A number box that takes arithmetic: `12*3+4` is read as `40`, and a leading `=` or `+` as a spreadsheet reads it.\n * The box holds the typed text while it is edited and settles to the result on blur or Enter; text that is no\n * expression by then (`12*`) leaves the model at its last number.\n *\n * Only an edit writes: a box focused and left as it was commits nothing, so a value is never rewritten (or rounded)\n * by being looked at. \"Edited\" means the text differs from what the box last showed or saved.\n *\n * An `<input>` binds the returned `inputAttrs` (`v-bind=\"arithmetic.inputAttrs\"`); an attribute written after the bind\n * overrides it, and a listener written beside it runs as well. A box that is no `<input>` (a contenteditable table\n * cell), or one that is not always an arithmetic box, drives `begin`, `update`, `settle`, `end` and `accepts` itself.\n *\n * @public\n */\nexport function useArithmeticInput({\n\tvalue,\n\tcommit,\n\tformat = n => (n === null ? '' : String(n)),\n\tseparators = () => ({}),\n\tfractionDigits = () => undefined,\n\tround = n => n,\n\tlive = true,\n\ttext = ref(''),\n\tenabled = () => true,\n\tselectOnFocus = false,\n}: ArithmeticInputOptions) {\n\tconst focused = ref(false)\n\t// What the box last showed or saved: the text that commits nothing.\n\tlet committedText = text.value\n\n\t/** Set the box's text without it counting as an edit */\n\tconst rebase = (current: string) => {\n\t\ttext.value = current\n\t\tcommittedText = current\n\t}\n\n\t/** Show the model's number in the box */\n\tconst syncText = () => rebase(format(numberOf(value())))\n\n\t// Not while it is typed in: the box holds text on its way to a number (\"12*\"), which the number would overwrite.\n\twatch(\n\t\tvalue,\n\t\t() => {\n\t\t\tif (enabled() && !focused.value) syncText()\n\t\t},\n\t\t{ immediate: true }\n\t)\n\n\tconst commitText = () => {\n\t\tif (text.value === committedText) return\n\t\tconst empty = text.value.trim() === ''\n\t\tconst result = empty ? null : evaluateArithmetic(text.value, separators())\n\t\tif (result === null && !empty) return\n\t\tcommit(result === null ? null : round(result))\n\t\tcommittedText = text.value\n\t}\n\n\t/**\n\t * Whether the box may hold `next`: digits, `.`, `+ - * / %`, parentheses and a leading `=`, with each number\n\t * written as the box writes numbers (so not `1.2.3`, nor `1.234,56` in English)\n\t */\n\tconst accepts = (next: string) => isArithmeticEntry(next, separators(), fractionDigits())\n\n\t/** The box gained focus; `current` is its text, when the caller keeps it */\n\tconst begin = (current?: string) => {\n\t\tfocused.value = true\n\t\tif (current !== undefined) rebase(current)\n\t}\n\n\t/** The box's text changed as it was typed in */\n\tconst update = (next: string) => {\n\t\ttext.value = next\n\t\tif (live) commitText()\n\t}\n\n\t/** Commit an edit, then show the result in place of the expression */\n\tconst settle = () => {\n\t\tcommitText()\n\t\tsyncText()\n\t}\n\n\t/** The box lost focus */\n\tconst end = () => {\n\t\tfocused.value = false\n\t\tsettle()\n\t}\n\n\tconst onFocus = (event: FocusEvent) => {\n\t\tbegin()\n\t\tconst input = event.target\n\t\tif (selectOnFocus && input instanceof HTMLInputElement) requestAnimationFrame(() => input.select())\n\t}\n\n\tconst onInput = (event: Event) => {\n\t\tif (event.target instanceof HTMLInputElement) update(event.target.value)\n\t}\n\n\tconst onKeydown = (event: KeyboardEvent) => {\n\t\tif (event.ctrlKey || event.metaKey || event.altKey) return\n\t\tif (event.key === 'Enter') {\n\t\t\tsettle()\n\t\t\treturn\n\t\t}\n\t\tif (event.key.length !== 1) return\n\t\t// The box's text once typed in, as `=` may only start it.\n\t\tconst input = event.target\n\t\tconst next = input instanceof HTMLInputElement ? textWith(input, event.key) : event.key\n\t\tif (!accepts(next)) event.preventDefault()\n\t}\n\n\t// A pasted letter or exponent leaves the box as it was.\n\tconst onPaste = (event: ClipboardEvent) => {\n\t\tconst input = event.target\n\t\tif (!(input instanceof HTMLInputElement)) return\n\t\tif (!accepts(textWith(input, event.clipboardData?.getData('text') ?? ''))) event.preventDefault()\n\t}\n\n\tconst onBlur = () => end()\n\n\t// Text, not `type=\"number\"`, which refuses an operator.\n\tconst inputAttrs = reactive({\n\t\tvalue: text,\n\t\ttype: 'text' as const,\n\t\tinputmode: 'decimal' as const,\n\t\tautocomplete: 'off' as const,\n\t\tonFocus,\n\t\tonInput,\n\t\tonKeydown,\n\t\tonPaste,\n\t\tonBlur,\n\t})\n\n\treturn {\n\t\tinputAttrs,\n\t\ttext,\n\t\tfocused,\n\t\taccepts,\n\t\tbegin,\n\t\tupdate,\n\t\tsettle,\n\t\tend,\n\t\trebase,\n\t\tsyncText,\n\t\tonFocus,\n\t\tonInput,\n\t\tonKeydown,\n\t\tonPaste,\n\t\tonBlur,\n\t}\n}\n","import { Temporal } from 'temporal-polyfill'\n\n/**\n * Reads a `YYYY-MM-DD` day. Anything that is not a real day written exactly that way reads as no day.\n *\n * Not `Temporal.PlainDate.from` alone: it also takes the day out of a date-time, which would show a day\n * field over a date-time column as a day instead of as the mismatch it is.\n * @param day - The day, as `YYYY-MM-DD`\n * @public\n */\nexport function fromISODate(day: string): Temporal.PlainDate | undefined {\n\tif (!/^\\d{4}-\\d{2}-\\d{2}$/.test(day)) return undefined\n\n\ttry {\n\t\treturn Temporal.PlainDate.from(day)\n\t} catch {\n\t\treturn undefined\n\t}\n}\n","// SemVer 2.0.0, strictly: https://semver.org. The same grammar the `semver` Postgres extension stores,\n// so a version the form accepts is one the column takes, and the two order versions alike.\nconst SEMVER =\n\t/^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\n\nconst NUMBER = /^(0|[1-9]\\d*)$/\nconst NUMBER_SO_FAR = /^(0|[1-9]\\d*)?$/\nconst PRERELEASE_IDENTIFIER = /^(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)$/\nconst BUILD_IDENTIFIER = /^[0-9a-zA-Z-]+$/\n// Any run of identifier characters can still become an identifier: `01` is not one, but `01a` is.\nconst IDENTIFIER_SO_FAR = /^[0-9a-zA-Z-]*$/\n\n/**\n * Whether the text is a version under SemVer 2.0.0: `1.4.0`, `1.4.0-beta.2`, `1.4.0+build.5`. A `v`\n * prefix, a missing part (`1.4`) and a leading zero (`01.4.0`) are not.\n * @param text - The text to check\n * @public\n */\nexport function isSemver(text: string): boolean {\n\treturn SEMVER.test(text)\n}\n\nconst splitOnce = (text: string, separator: string): [string, string | undefined] => {\n\tconst index = text.indexOf(separator)\n\treturn index === -1 ? [text, undefined] : [text.slice(0, index), text.slice(index + 1)]\n}\n\n/** Whether each dot-separated part before the last matches `whole`, and the last matches `last`. */\nconst partsMatch = (text: string, whole: RegExp, last: RegExp): boolean => {\n\tconst parts = text.split('.')\n\tconst typing = parts.pop() ?? ''\n\treturn parts.every(part => whole.test(part)) && last.test(typing)\n}\n\n/**\n * Whether typing more could still make the text a version: `1.`, `1.4.0-` and the empty text can,\n * while `v1`, `01` and `1.4-beta` cannot. Every version passes, so a box that refuses any edit failing\n * this one never stops someone typing a version.\n * @param text - The text so far\n * @public\n */\nexport function isSemverPrefix(text: string): boolean {\n\t// Neither `+` nor `-` can appear in the numbers, so the first of each ends the part before it.\n\tconst [head, build] = splitOnce(text, '+')\n\tconst [core, prerelease] = splitOnce(head, '-')\n\n\tconst coreDone = prerelease !== undefined || build !== undefined\n\tconst numbers = core.split('.').length\n\tif (numbers > 3 || (coreDone && numbers < 3)) return false\n\tif (!partsMatch(core, NUMBER, coreDone ? NUMBER : NUMBER_SO_FAR)) return false\n\n\tif (prerelease !== undefined) {\n\t\tconst last = build === undefined ? IDENTIFIER_SO_FAR : PRERELEASE_IDENTIFIER\n\t\tif (!partsMatch(prerelease, PRERELEASE_IDENTIFIER, last)) return false\n\t}\n\n\treturn build === undefined || partsMatch(build, BUILD_IDENTIFIER, IDENTIFIER_SO_FAR)\n}\n\n// Digits without leading zeros, compared without converting, so no version is too big to order.\nconst compareDigits = (a: string, b: string): number => a.length - b.length || (a < b ? -1 : a > b ? 1 : 0)\n\nconst compareIdentifiers = (a: string, b: string): number => {\n\tconst aNumeric = /^\\d+$/.test(a)\n\tconst bNumeric = /^\\d+$/.test(b)\n\tif (aNumeric && bNumeric) return compareDigits(a, b)\n\tif (aNumeric !== bNumeric) return aNumeric ? -1 : 1\n\treturn a < b ? -1 : a > b ? 1 : 0\n}\n\nconst comparePrereleases = (a: string | undefined, b: string | undefined): number => {\n\tif (a === b) return 0\n\t// A prerelease comes before its release.\n\tif (a === undefined) return 1\n\tif (b === undefined) return -1\n\n\tconst left = a.split('.')\n\tconst right = b.split('.')\n\tfor (let i = 0; i < Math.min(left.length, right.length); i++) {\n\t\tconst order = compareIdentifiers(left[i], right[i])\n\t\tif (order) return order\n\t}\n\treturn left.length - right.length\n}\n\n/**\n * Orders two versions by SemVer 2.0.0 precedence: major, minor and patch as numbers, a prerelease\n * before its release, and prerelease identifiers one by one. Build metadata does not count, so\n * `1.4.0+a` and `1.4.0+b` compare equal. Text that is not a version comes after every version.\n * @param a - The first version\n * @param b - The second version\n * @returns Negative when `a` comes first, positive when `b` does, zero when neither\n * @public\n */\nexport function compareSemver(a: string, b: string): number {\n\tconst left = SEMVER.exec(a)\n\tconst right = SEMVER.exec(b)\n\tif (!left || !right) return Number(!left) - Number(!right)\n\n\tfor (let part = 1; part <= 3; part++) {\n\t\tconst order = compareDigits(left[part], right[part])\n\t\tif (order) return order\n\t}\n\treturn comparePrereleases(left[4], right[4])\n}\n","/**\n * Fraction digits for a currency in amount inputs (e.g. JPY → 0).\n * @public\n */\nexport function currencyInputFractionDigits(currencyId: string | undefined): number {\n\tconst id = currencyId?.toUpperCase() ?? ''\n\tif (!id) return 2\n\ttry {\n\t\treturn (\n\t\t\tnew Intl.NumberFormat('en-US', {\n\t\t\t\tstyle: 'currency',\n\t\t\t\tcurrency: id,\n\t\t\t}).resolvedOptions().maximumFractionDigits ?? 2\n\t\t)\n\t} catch {\n\t\treturn 2\n\t}\n}\n\n/**\n * The separators a currency amount field writes amounts with: the locale's grouping and decimal marks.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function currencyAmountSeparators(locale?: string): { group: string; decimal: string } {\n\tconst parts = new Intl.NumberFormat(locale).formatToParts(1234567.89)\n\treturn {\n\t\tgroup: parts.find(part => part.type === 'group')?.value ?? ',',\n\t\tdecimal: parts.find(part => part.type === 'decimal')?.value ?? '.',\n\t}\n}\n\n/**\n * Format a numeric amount for display in a currency amount field (no currency symbol). The currency\n * sets the decimals; the separators are the locale's, as in the table cell.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function formatCurrencyAmountInput(\n\tamount: number | null | undefined,\n\tcurrencyId: string | undefined,\n\tlocale?: string\n): string {\n\tif (amount === null || amount === undefined) return ''\n\tconst id = currencyId?.toUpperCase() ?? ''\n\tconst fractionDigits = currencyInputFractionDigits(id)\n\treturn new Intl.NumberFormat(locale, {\n\t\tminimumFractionDigits: fractionDigits,\n\t\tmaximumFractionDigits: fractionDigits,\n\t\tuseGrouping: id !== 'JPY',\n\t}).format(amount)\n}\n\n/**\n * Parse user-entered text in a currency amount field back to a number, read with the separators the\n * field writes it with.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function parseCurrencyAmountInput(text: string, locale?: string): number | null {\n\tconst { group, decimal } = currencyAmountSeparators(locale)\n\tconst normalized = text\n\t\t.replace(/\\s/g, '')\n\t\t.replace(/[^\\d.,\\-+]/g, '')\n\t\t.replaceAll(group, '')\n\t\t.replace(decimal, '.')\n\t// No digits is no amount, though `Number('')` is 0.\n\tif (!/\\d/.test(normalized)) return null\n\tconst value = Number(normalized)\n\treturn Number.isFinite(value) ? value : null\n}\n\n/**\n * What a masked currency amount field may hold while it is typed in: digits and grouping marks, then at most one\n * decimal point followed by digits.\n * @param locale - The browser's own when omitted\n * @public\n */\nexport function currencyAmountEntryPattern(currencyId: string | undefined, locale?: string): RegExp {\n\tconst { group, decimal } = currencyAmountSeparators(locale)\n\tconst escape = (mark: string) => mark.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\tconst whole = `-?[\\\\d${escape(group)}]*`\n\tif (currencyInputFractionDigits(currencyId) === 0) return new RegExp(`^${whole}$`)\n\t// US-style keyboards often paste/type '.' even when the locale decimal is ','.\n\tconst point = decimal === '.' ? '\\\\.' : `[${escape(decimal)}.]`\n\treturn new RegExp(`^${whole}(?:${point}\\\\d*)?$`)\n}\n","type CurrencyLike = {\n\tid?: string | number\n\tsymbol?: string\n\tdisplayText?: string\n}\n\nfunction displayScalar(value: unknown): string {\n\tif (typeof value === 'string') return value\n\tif (typeof value === 'number' || typeof value === 'bigint') return String(value)\n\tif (typeof value === 'boolean') return String(value)\n\treturn ''\n}\n\nfunction displayQty(qty: unknown): string {\n\tif (qty === null || qty === undefined || qty === '') return ''\n\treturn displayScalar(qty)\n}\n\n/**\n * Format a currency amount for display (forms, table cells). Uses `Intl` when `currency.id` is a\n * valid ISO code; otherwise falls back to symbol, display text, or id.\n * @public\n */\nexport function formatCurrencyAmount(amount: number | null | undefined, currency: CurrencyLike | undefined): string {\n\tif (amount === null || amount === undefined) return ''\n\tconst id = currency?.id != null ? String(currency.id) : ''\n\tif (id) {\n\t\ttry {\n\t\t\treturn new Intl.NumberFormat(undefined, {\n\t\t\t\tstyle: 'currency',\n\t\t\t\tcurrency: id,\n\t\t\t\tcurrencyDisplay: 'symbol',\n\t\t\t}).format(amount)\n\t\t} catch {\n\t\t\t// Not a valid ISO 4217 code — fall through to symbol / displayText.\n\t\t}\n\t}\n\tconst suffix = formatCurrencySymbol(currency)\n\treturn suffix ? `${amount} ${suffix}`.trim() : String(amount)\n}\n\n/**\n * The mark that names a currency beside an amount: the symbol `Intl` formats a valid ISO code with,\n * as {@link formatCurrencyAmount} does; otherwise its symbol, display text, or id.\n * @public\n */\nexport function formatCurrencySymbol(currency: CurrencyLike | undefined): string {\n\tconst id = currency?.id != null ? String(currency.id) : ''\n\tif (id) {\n\t\ttry {\n\t\t\tconst parts = new Intl.NumberFormat(undefined, {\n\t\t\t\tstyle: 'currency',\n\t\t\t\tcurrency: id,\n\t\t\t\tcurrencyDisplay: 'symbol',\n\t\t\t}).formatToParts(0)\n\t\t\tconst symbol = parts.find(part => part.type === 'currency')?.value\n\t\t\tif (symbol) return symbol\n\t\t} catch {\n\t\t\t// Not a valid ISO 4217 code — fall through to symbol / displayText.\n\t\t}\n\t}\n\treturn currency?.symbol ?? currency?.displayText ?? id\n}\n\n/**\n * Render a composite quantity value for table cells. Omits the UOM when it matches `stockUom`.\n * @public\n */\nexport function formatQuantityCell(value: unknown): string {\n\tif (value === null || value === undefined) return ''\n\tif (typeof value !== 'object') return displayScalar(value)\n\tconst record = value as { qty?: unknown; uom?: string; stockUom?: string }\n\tconst qtyText = displayQty(record.qty)\n\tconst uom = record.uom ?? ''\n\tconst stockUom = record.stockUom ?? ''\n\tif (!uom) return qtyText\n\tif (stockUom && uom === stockUom) return qtyText\n\treturn `${qtyText} ${uom}`.trim()\n}\n\n/**\n * Render a composite currency value for table cells.\n * @public\n */\nexport function formatCurrencyCell(value: unknown): string {\n\tif (value === null || value === undefined) return ''\n\tif (typeof value !== 'object') return displayScalar(value)\n\tconst record = value as { amount?: number | null; currency?: CurrencyLike }\n\treturn formatCurrencyAmount(record.amount, record.currency)\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\nexport { useArithmeticInput, type ArithmeticInputOptions } from './composables/arithmeticInput'\nimport { fromISODate } from './dates'\nimport { compareSemver, isSemver, isSemverPrefix } from './semver'\nexport type * from './types'\n\n/**\n * Install all utility components\n * @param _app - Vue app instance\n * @public\n */\nfunction install(_app: App /* options */) {}\n\nexport {\n\tarithmeticEntryPattern,\n\tevaluateArithmetic,\n\tisArithmeticEntry,\n\tisArithmeticKey,\n\troundToPrecision,\n\ttype NumberSeparators,\n} from './arithmetic'\nexport {\n\tcurrencyAmountEntryPattern,\n\tcurrencyAmountSeparators,\n\tcurrencyInputFractionDigits,\n\tformatCurrencyAmountInput,\n\tparseCurrencyAmountInput,\n} from './currencyAmountFormat'\nexport { formatCurrencyAmount, formatCurrencyCell, formatCurrencySymbol, formatQuantityCell } from './denominatedFormat'\nexport { compareSemver, defaultKeypressHandlers, fromISODate, install, isSemver, isSemverPrefix, useKeyboardNav }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,qBACf,SACA,EAAE,SAAS,eAAe,iBAA8C,CAAC,GACxE;CACD,MAAM,mBAAmB,IAAI,KAAK;CAElC,MAAM,qBAAqB;EAC1B,IAAI,CAAC,QAAQ;EAEb,MAAM,WAAW,OAAO;EACxB,MAAM,KAAK,aAAa,OAAO;EAC/B,IAAI,CAAC,IACJ,iBAAiB,QAAQ;OACnB;GACN,MAAM,OAAO,GAAG,sBAAsB;GACtC,iBAAiB,QAChB,KAAK,QAAQ,OAAO,eAAe,SAAS,gBAAgB,iBAC5D,KAAK,SAAS,OAAO,cAAc,SAAS,gBAAgB,gBAC5D,KAAK,UAAU,KACf,KAAK,SAAS;EAChB;CACD;CAEA,YACO,aAAa,OAAO,SACpB,aAAa,GACnB;EAAE,WAAW;EAAM,OAAO;CAAO,CAClC;CAEA,IAAI,QACH,iBAAiB,gBAAgB,QAAQ,UAAU,cAAc;EAChE,SAAS;EACT,SAAS;CACV,CAAC;CAGF,OAAO;AACR;;AC5DA,IAAM,aAAa,YAAyB;CAC3C,IAAI,UAAU,qBAAqB,OAAO,CAAC,CAAC;CAC5C,UAAU,WAAW,QAAQ,eAAe;CAC5C,OAAO;AACR;AAEA,IAAM,eAAe,YAAyB;CAC7C,OAAO,QAAQ,YAAY;AAC5B;;AAGA,IAAM,kBAAkB,YAAsC;CAC7D,IAAI,mBAAmB,sBACtB,OAAO;CAER,MAAM,OAAO,QAAQ,QAAQ,QAAQ;CACrC,IAAI,gBAAgB,sBACnB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EA,SAAS,QAAQ,MAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/utilities",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.3",
|
|
4
4
|
"description": "Shared utility functions for Stonecrop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"helpers",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@vue/test-utils": "^2.4.10",
|
|
51
51
|
"jsdom": "^29.1.1",
|
|
52
52
|
"typescript": "^6.0.3",
|
|
53
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
53
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
|
|
54
54
|
"vitest": "5.0.5",
|
|
55
55
|
"vue": "^3.5.33",
|
|
56
56
|
"vue-router": "^5.0.6"
|