yummies 7.12.0 → 7.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -87
- package/assert.cjs +146 -0
- package/assert.cjs.map +1 -0
- package/assert.d.ts +134 -0
- package/assert.js +140 -0
- package/assert.js.map +1 -0
- package/async.cjs +17 -0
- package/async.cjs.map +1 -1
- package/async.d.ts +17 -0
- package/async.js +17 -0
- package/async.js.map +1 -1
- package/common.cjs.map +1 -1
- package/common.d.ts +18 -0
- package/common.js.map +1 -1
- package/complex.cjs.map +1 -1
- package/complex.d.ts +66 -0
- package/complex.js.map +1 -1
- package/cookie.cjs.map +1 -1
- package/cookie.d.ts +18 -0
- package/cookie.js.map +1 -1
- package/css.cjs +16 -0
- package/css.cjs.map +1 -1
- package/css.d.ts +17 -0
- package/css.js +16 -0
- package/css.js.map +1 -1
- package/data.cjs.map +1 -1
- package/data.d.ts +18 -0
- package/data.js.map +1 -1
- package/date-time.cjs +16 -0
- package/date-time.cjs.map +1 -1
- package/date-time.d.ts +17 -0
- package/date-time.js +16 -0
- package/date-time.js.map +1 -1
- package/device.cjs +17 -0
- package/device.cjs.map +1 -1
- package/device.d.ts +17 -0
- package/device.js +17 -0
- package/device.js.map +1 -1
- package/encodings.cjs.map +1 -1
- package/encodings.d.ts +17 -0
- package/encodings.js.map +1 -1
- package/errors.cjs +16 -0
- package/errors.cjs.map +1 -1
- package/errors.d.ts +17 -0
- package/errors.js +16 -0
- package/errors.js.map +1 -1
- package/file.cjs +16 -0
- package/file.cjs.map +1 -1
- package/file.d.ts +16 -0
- package/file.js +16 -0
- package/file.js.map +1 -1
- package/format.cjs.map +1 -1
- package/format.d.ts +18 -0
- package/format.js.map +1 -1
- package/html.cjs +16 -0
- package/html.cjs.map +1 -1
- package/html.d.ts +17 -0
- package/html.js +16 -0
- package/html.js.map +1 -1
- package/id.cjs +16 -0
- package/id.cjs.map +1 -1
- package/id.d.ts +16 -0
- package/id.js +16 -0
- package/id.js.map +1 -1
- package/imports.cjs +16 -0
- package/imports.cjs.map +1 -1
- package/imports.d.ts +16 -0
- package/imports.js +16 -0
- package/imports.js.map +1 -1
- package/math.cjs.map +1 -1
- package/math.d.ts +17 -0
- package/math.js.map +1 -1
- package/media.cjs +16 -0
- package/media.cjs.map +1 -1
- package/media.d.ts +16 -0
- package/media.js +16 -0
- package/media.js.map +1 -1
- package/mobx.cjs +96 -0
- package/mobx.cjs.map +1 -1
- package/mobx.d.ts +101 -0
- package/mobx.js +96 -0
- package/mobx.js.map +1 -1
- package/ms.cjs +16 -0
- package/ms.cjs.map +1 -1
- package/ms.d.ts +16 -0
- package/ms.js +16 -0
- package/ms.js.map +1 -1
- package/number.cjs +16 -0
- package/number.cjs.map +1 -1
- package/number.d.ts +16 -0
- package/number.js +16 -0
- package/number.js.map +1 -1
- package/package.json +8 -2
- package/parser.cjs.map +1 -1
- package/parser.d.ts +17 -0
- package/parser.js.map +1 -1
- package/price.cjs.map +1 -1
- package/price.d.ts +16 -0
- package/price.js.map +1 -1
- package/random.cjs +16 -0
- package/random.cjs.map +1 -1
- package/random.d.ts +16 -0
- package/random.js +16 -0
- package/random.js.map +1 -1
- package/sound.cjs +16 -0
- package/sound.cjs.map +1 -1
- package/sound.d.ts +16 -0
- package/sound.js +16 -0
- package/sound.js.map +1 -1
- package/storage.cjs.map +1 -1
- package/storage.d.ts +16 -0
- package/storage.js.map +1 -1
- package/text.cjs +16 -0
- package/text.cjs.map +1 -1
- package/text.d.ts +16 -0
- package/text.js +16 -0
- package/text.js.map +1 -1
- package/type-guard.cjs.map +1 -1
- package/type-guard.d.ts +18 -0
- package/type-guard.js.map +1 -1
- package/types.d.ts +41 -0
- package/types.global.d.ts +41 -0
- package/vibrate.cjs +16 -0
- package/vibrate.cjs.map +1 -1
- package/vibrate.d.ts +16 -0
- package/vibrate.js +16 -0
- package/vibrate.js.map +1 -1
package/types.global.d.ts
CHANGED
|
@@ -1,4 +1,45 @@
|
|
|
1
1
|
/** THIS IS AUTOGENERATED FILE FROM "utils/types.ts" */
|
|
2
|
+
/**
|
|
3
|
+
* ---header-docs-section---
|
|
4
|
+
* # yummies/types
|
|
5
|
+
*
|
|
6
|
+
* ## Description
|
|
7
|
+
*
|
|
8
|
+
* This module collects **TypeScript-only** helpers: `ValueOf`, nullable aliases, branded types, and
|
|
9
|
+
* patterns for props and generics. Nothing here exists at runtime — use `import type` so bundlers
|
|
10
|
+
* drop the imports entirely. The same ideas are also published as **ambient** globals under a
|
|
11
|
+
* separate entry (see below) when you want types in scope without repeating imports in every file.
|
|
12
|
+
*
|
|
13
|
+
* ## `yummies/types.global`
|
|
14
|
+
*
|
|
15
|
+
* Use this subpath when you prefer **global** declarations (no per-file imports). After installing
|
|
16
|
+
* the package, reference the built `.d.ts` bundle — typically via a side-effect import that pulls
|
|
17
|
+
* ambient types into the compilation unit:
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* import "yummies/types.global";
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Or list it under `compilerOptions.types` in **`tsconfig.json`** so `tsc` loads it for the project:
|
|
24
|
+
*
|
|
25
|
+
* ```json
|
|
26
|
+
* {
|
|
27
|
+
* "compilerOptions": {
|
|
28
|
+
* "types": ["yummies/types.global"]
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* ## `yummies/types` (library)
|
|
34
|
+
*
|
|
35
|
+
* Prefer this entry when you want **explicit**, traceable imports at each call site (tree-shaking
|
|
36
|
+
* friendly and clearer in reviews). The root package may re-export some symbols, but
|
|
37
|
+
* **`yummies/types`** is the dedicated surface for type-only utilities.
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* import type { AnyObject, Maybe } from "yummies/types";
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
2
43
|
/**
|
|
3
44
|
* Extracts all values from an object or array type.
|
|
4
45
|
*
|
package/vibrate.cjs
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/vibrate.ts
|
|
3
3
|
/**
|
|
4
|
+
* ---header-docs-section---
|
|
5
|
+
* # yummies/vibrate
|
|
6
|
+
*
|
|
7
|
+
* ## Description
|
|
8
|
+
*
|
|
9
|
+
* Thin wrapper around **`navigator.vibrate`** for mobile-style haptics: single pulses or patterned
|
|
10
|
+
* on/off sequences. It no-ops when the API is missing or disabled, so UI code stays simple. Do not
|
|
11
|
+
* rely on vibration for critical feedback because iOS and many desktops omit the API entirely.
|
|
12
|
+
*
|
|
13
|
+
* ## Usage
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { vibrate } from "yummies/vibrate";
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
4
20
|
* Triggers haptic feedback via the {@link https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API | Vibration API}
|
|
5
21
|
* when `navigator.vibrate` exists (common on Android Chrome; often missing on iOS Safari / desktop).
|
|
6
22
|
*
|
package/vibrate.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vibrate.cjs","names":[],"sources":["../src/vibrate.ts"],"sourcesContent":["/**\n * Triggers haptic feedback via the {@link https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API | Vibration API}\n * when `navigator.vibrate` exists (common on Android Chrome; often missing on iOS Safari / desktop).\n *\n * - **Single number** — vibrate for that many milliseconds, then stop.\n * - **Array of numbers** — alternating vibration and pause lengths in ms: `[vibrate, pause, vibrate, ...]`.\n * Per the spec, values are clamped; odd-length arrays imply a trailing vibrate segment.\n *\n * If the API is unavailable or the user has disabled vibration, this function **does nothing**\n * (no throw). Call sites should not rely on vibration for critical UX.\n *\n * @param pattern - Duration in ms, or a pattern array as described above.\n *\n * @example\n * Short confirmation buzz (200 ms):\n * ```ts\n * vibrate(200);\n * ```\n *\n * @example\n * Double-pulse pattern: 100 ms on, 50 ms off, 100 ms on:\n * ```ts\n * vibrate([100, 50, 100]);\n * ```\n */\nexport const vibrate = (pattern: number | number[]) => {\n if ('vibrate' in navigator) {\n navigator.vibrate(pattern);\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"vibrate.cjs","names":[],"sources":["../src/vibrate.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/vibrate\n *\n * ## Description\n *\n * Thin wrapper around **`navigator.vibrate`** for mobile-style haptics: single pulses or patterned\n * on/off sequences. It no-ops when the API is missing or disabled, so UI code stays simple. Do not\n * rely on vibration for critical feedback because iOS and many desktops omit the API entirely.\n *\n * ## Usage\n *\n * ```ts\n * import { vibrate } from \"yummies/vibrate\";\n * ```\n */\n\n/**\n * Triggers haptic feedback via the {@link https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API | Vibration API}\n * when `navigator.vibrate` exists (common on Android Chrome; often missing on iOS Safari / desktop).\n *\n * - **Single number** — vibrate for that many milliseconds, then stop.\n * - **Array of numbers** — alternating vibration and pause lengths in ms: `[vibrate, pause, vibrate, ...]`.\n * Per the spec, values are clamped; odd-length arrays imply a trailing vibrate segment.\n *\n * If the API is unavailable or the user has disabled vibration, this function **does nothing**\n * (no throw). Call sites should not rely on vibration for critical UX.\n *\n * @param pattern - Duration in ms, or a pattern array as described above.\n *\n * @example\n * Short confirmation buzz (200 ms):\n * ```ts\n * vibrate(200);\n * ```\n *\n * @example\n * Double-pulse pattern: 100 ms on, 50 ms off, 100 ms on:\n * ```ts\n * vibrate([100, 50, 100]);\n * ```\n */\nexport const vibrate = (pattern: number | number[]) => {\n if ('vibrate' in navigator) {\n navigator.vibrate(pattern);\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAa,WAAW,YAA+B;AACrD,KAAI,aAAa,UACf,WAAU,QAAQ,QAAQ"}
|
package/vibrate.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ---header-docs-section---
|
|
3
|
+
* # yummies/vibrate
|
|
4
|
+
*
|
|
5
|
+
* ## Description
|
|
6
|
+
*
|
|
7
|
+
* Thin wrapper around **`navigator.vibrate`** for mobile-style haptics: single pulses or patterned
|
|
8
|
+
* on/off sequences. It no-ops when the API is missing or disabled, so UI code stays simple. Do not
|
|
9
|
+
* rely on vibration for critical feedback because iOS and many desktops omit the API entirely.
|
|
10
|
+
*
|
|
11
|
+
* ## Usage
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { vibrate } from "yummies/vibrate";
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
1
17
|
/**
|
|
2
18
|
* Triggers haptic feedback via the {@link https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API | Vibration API}
|
|
3
19
|
* when `navigator.vibrate` exists (common on Android Chrome; often missing on iOS Safari / desktop).
|
package/vibrate.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
//#region src/vibrate.ts
|
|
2
2
|
/**
|
|
3
|
+
* ---header-docs-section---
|
|
4
|
+
* # yummies/vibrate
|
|
5
|
+
*
|
|
6
|
+
* ## Description
|
|
7
|
+
*
|
|
8
|
+
* Thin wrapper around **`navigator.vibrate`** for mobile-style haptics: single pulses or patterned
|
|
9
|
+
* on/off sequences. It no-ops when the API is missing or disabled, so UI code stays simple. Do not
|
|
10
|
+
* rely on vibration for critical feedback because iOS and many desktops omit the API entirely.
|
|
11
|
+
*
|
|
12
|
+
* ## Usage
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { vibrate } from "yummies/vibrate";
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
3
19
|
* Triggers haptic feedback via the {@link https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API | Vibration API}
|
|
4
20
|
* when `navigator.vibrate` exists (common on Android Chrome; often missing on iOS Safari / desktop).
|
|
5
21
|
*
|
package/vibrate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vibrate.js","names":[],"sources":["../src/vibrate.ts"],"sourcesContent":["/**\n * Triggers haptic feedback via the {@link https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API | Vibration API}\n * when `navigator.vibrate` exists (common on Android Chrome; often missing on iOS Safari / desktop).\n *\n * - **Single number** — vibrate for that many milliseconds, then stop.\n * - **Array of numbers** — alternating vibration and pause lengths in ms: `[vibrate, pause, vibrate, ...]`.\n * Per the spec, values are clamped; odd-length arrays imply a trailing vibrate segment.\n *\n * If the API is unavailable or the user has disabled vibration, this function **does nothing**\n * (no throw). Call sites should not rely on vibration for critical UX.\n *\n * @param pattern - Duration in ms, or a pattern array as described above.\n *\n * @example\n * Short confirmation buzz (200 ms):\n * ```ts\n * vibrate(200);\n * ```\n *\n * @example\n * Double-pulse pattern: 100 ms on, 50 ms off, 100 ms on:\n * ```ts\n * vibrate([100, 50, 100]);\n * ```\n */\nexport const vibrate = (pattern: number | number[]) => {\n if ('vibrate' in navigator) {\n navigator.vibrate(pattern);\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"vibrate.js","names":[],"sources":["../src/vibrate.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/vibrate\n *\n * ## Description\n *\n * Thin wrapper around **`navigator.vibrate`** for mobile-style haptics: single pulses or patterned\n * on/off sequences. It no-ops when the API is missing or disabled, so UI code stays simple. Do not\n * rely on vibration for critical feedback because iOS and many desktops omit the API entirely.\n *\n * ## Usage\n *\n * ```ts\n * import { vibrate } from \"yummies/vibrate\";\n * ```\n */\n\n/**\n * Triggers haptic feedback via the {@link https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API | Vibration API}\n * when `navigator.vibrate` exists (common on Android Chrome; often missing on iOS Safari / desktop).\n *\n * - **Single number** — vibrate for that many milliseconds, then stop.\n * - **Array of numbers** — alternating vibration and pause lengths in ms: `[vibrate, pause, vibrate, ...]`.\n * Per the spec, values are clamped; odd-length arrays imply a trailing vibrate segment.\n *\n * If the API is unavailable or the user has disabled vibration, this function **does nothing**\n * (no throw). Call sites should not rely on vibration for critical UX.\n *\n * @param pattern - Duration in ms, or a pattern array as described above.\n *\n * @example\n * Short confirmation buzz (200 ms):\n * ```ts\n * vibrate(200);\n * ```\n *\n * @example\n * Double-pulse pattern: 100 ms on, 50 ms off, 100 ms on:\n * ```ts\n * vibrate([100, 50, 100]);\n * ```\n */\nexport const vibrate = (pattern: number | number[]) => {\n if ('vibrate' in navigator) {\n navigator.vibrate(pattern);\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAa,WAAW,YAA+B;AACrD,KAAI,aAAa,UACf,WAAU,QAAQ,QAAQ"}
|