@fest-lib/core 0.1.13 → 0.1.15

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.
Files changed (2) hide show
  1. package/README.md +44 -16
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,8 +1,20 @@
1
- # Core.TS
2
-
3
- `@fest-lib/core` — level 0.5 fest-lib utilities. No fest peers. Used by every higher library.
4
-
5
- Unwraps refs (`getValue`), type/empty checks, deferred promises, channels, mapped collections, user-scope paths, time/phone helpers, grid item math, WeakRef wrappers, and DOM constructor polyfills for worker/Node hosts.
1
+ <p align="center">
2
+ <strong>@fest-lib/core</strong><br>
3
+ Level 0.5 no fest peers. Everything else in the stack unwraps values through this package.
4
+ </p>
5
+
6
+ <p align="center">
7
+ <a href="https://www.npmjs.com/package/@fest-lib/core"><img src="https://img.shields.io/npm/v/@fest-lib/core?style=flat-square" alt="npm"></a>
8
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/@fest-lib/core?style=flat-square" alt="MIT"></a>
9
+ <a href="https://github.com/fest-live/core.ts"><img src="https://img.shields.io/github/stars/fest-live/core.ts?style=flat-square" alt="stars"></a>
10
+ </p>
11
+
12
+ `getValue` on refs, type / empty guards, deferred promises, channels, mapped collections, user-scope paths, time / phone helpers, launcher grid math, WeakRef wrappers, and DOM constructor polyfills so the same code runs in window, worker, and Node.
13
+
14
+ ```text
15
+ fest/core ← you are here
16
+ └── dom · object · veela · uniform · lure · icon · image · fl-ui
17
+ ```
6
18
 
7
19
  ## Install
8
20
 
@@ -10,22 +22,38 @@ Unwraps refs (`getValue`), type/empty checks, deferred promises, channels, mappe
10
22
  npm install @fest-lib/core
11
23
  ```
12
24
 
25
+ ESM only. Node **20+**. No peer dependencies.
26
+
13
27
  ```ts
14
28
  import { getValue, isObject, createDeferred, debounce } from "@fest-lib/core";
15
29
 
16
- const raw = getValue(maybeRef);
30
+ const raw = getValue(maybeRef); // ref.value or the value itself
17
31
  const { promise, resolve } = createDeferred<string>();
32
+ const onResize = debounce(() => measure(), 48);
18
33
  ```
19
34
 
20
- ## Layout
35
+ ## What you get
36
+
37
+ | Area | Typical exports | Source |
38
+ | --- | --- | --- |
39
+ | Refs & types | `getValue`, `isObject` | `src/utils/Primitive.ts` |
40
+ | Promises | `createDeferred`, queues, timeouts | `src/utils/PromiseUtils.ts` |
41
+ | Debounce | `debounce` | `src/utils/Misc.ts` |
42
+ | Collections | mapped helpers | `src/utils/Mapped.ts` |
43
+ | Paths | user-scope normalize | `src/utils/UserPath.ts` |
44
+ | Launcher grid | cell / layout math | `src/utils/GridItemUtils.ts` |
45
+ | Time / phone | format helpers | `src/utils/Time.ts`, `Phone.ts` |
46
+ | Host polyfills | `EventTarget` / DOM ctors in workers | `src/runtime/dom-globals-polyfill.ts` |
21
47
 
22
- | Path | Role |
23
- | --- | --- |
24
- | `src/utils/Primitive.ts` | `getValue`, refs, type guards |
25
- | `src/utils/PromiseUtils.ts` | deferred, queue, timeout |
26
- | `src/utils/Object.ts` / `Mapped.ts` | object + collection helpers |
27
- | `src/utils/UserPath.ts` | user-scope path normalize |
28
- | `src/utils/GridItemUtils.ts` | launcher grid item math |
29
- | `src/runtime/dom-globals-polyfill.ts` | host polyfills |
48
+ Importing the package installs the polyfills once. That is intentional.
49
+
50
+ ## Workspace
51
+
52
+ ```bash
53
+ cd modules/projects/core.ts
54
+ npm run dev # Vite playground
55
+ npm run build # dist + typedoc
56
+ npm run publish # patch +1, then npm publish
57
+ ```
30
58
 
31
- Build: `npm run build`. Publish: `npm run publish` (`build:publish` + public npm).
59
+ Generated API: `npm run docs:md` `./docs-md`. License: [MIT](LICENSE).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fest-lib/core",
3
3
  "description": "fest-lib core: getValue, type guards, deferred promises, paths, time, grid math",
4
- "version": "0.1.13",
4
+ "version": "0.1.15",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -49,7 +49,7 @@
49
49
  "prepack": "npm run build:publish",
50
50
  "preview": "vite preview",
51
51
  "release": "PUPPETEER_SKIP_DOWNLOAD=1 npm run build:publish && npm publish --access public --ignore-scripts",
52
- "publish": "npm run release",
52
+ "publish": "node ../scripts/bump-patch-version.mjs && npm run release",
53
53
  "docs": "typedoc ./src/index.ts --options ./typedoc.json --out ./docs --tsconfig ./tsconfig.json --excludeExternals --excludePrivate --excludeProtected --skipErrorChecking",
54
54
  "docs:clean": "rm -rf ./docs && typedoc --options ./typedoc.json",
55
55
  "docs:md": "typedoc --options ./typedoc.md.json",