kenspeckle 0.1.0 → 0.1.2
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 +25 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
Svelte utilities you recognize at sight. One naming convention, no `use` prefix, attachments first-class.
|
|
7
7
|
|
|
8
|
-
> **Status:** pre-release. This README is the contract being built against; nothing is on npm yet.
|
|
9
|
-
|
|
10
8
|
## The sentence test
|
|
11
9
|
|
|
12
10
|
Every export earns its shape by being said aloud: _"I want a new \___."_
|
|
@@ -57,11 +55,31 @@ npm install kenspeckle
|
|
|
57
55
|
|
|
58
56
|
Peer dependencies: `svelte >= 5.40`, plus `@sveltejs/kit >= 2` for the `kenspeckle/kit` subpath (optional). SSR-safe — value factories return inert defaults on the server.
|
|
59
57
|
|
|
60
|
-
## What's
|
|
58
|
+
## What's shipped
|
|
59
|
+
|
|
60
|
+
Five exports, two entry points. `kenspeckle` is Svelte-only; `kenspeckle/kit` adds the SvelteKit
|
|
61
|
+
pieces, so `$app/navigation` never enters the main entry.
|
|
62
|
+
|
|
63
|
+
| export | form | lineage |
|
|
64
|
+
| ----------------------- | -------------------------------------- | -------------------------- |
|
|
65
|
+
| `FiniteStateMachine` | class, with typed reactive `context` | runed `FiniteStateMachine` |
|
|
66
|
+
| `copy()` / `copyText()` | attachment + helper | svelte-put `copy` |
|
|
67
|
+
| `viewTransition()` | function; navigation form under `/kit` | new |
|
|
68
|
+
| `viewTransitionName()` | attachment + helper, `/kit` | new |
|
|
69
|
+
| `retreat()` | function, returns a disposer, `/kit` | new |
|
|
70
|
+
|
|
71
|
+
`FiniteStateMachine` gains a typed, `$state`-backed `context` object visible to lifecycle hooks and
|
|
72
|
+
guards — the sidecar-data mechanism every real FSM grows, built in.
|
|
73
|
+
|
|
74
|
+
View transitions are what the package is for so far; they get their own section below.
|
|
75
|
+
|
|
76
|
+
## Planned
|
|
77
|
+
|
|
78
|
+
The rest of the curation. These names are the design, not an API you can call — nothing below has
|
|
79
|
+
shipped.
|
|
61
80
|
|
|
62
81
|
| export | form | lineage |
|
|
63
82
|
| ------------------------------------------------------------ | ------------------------------------------ | -------------------------------------------------------- |
|
|
64
|
-
| `FiniteStateMachine` | class, with typed reactive `context` | runed `FiniteStateMachine` |
|
|
65
83
|
| `StateHistory` | class | runed `StateHistory` |
|
|
66
84
|
| `mounted()` | value factory | runed `IsMounted` |
|
|
67
85
|
| `idle()` | value factory | runed `IsIdle` |
|
|
@@ -76,13 +94,9 @@ Peer dependencies: `svelte >= 5.40`, plus `@sveltejs/kit >= 2` for the `kenspeck
|
|
|
76
94
|
| `intersected()` | attachment + helper | runed `useIntersectionObserver` · svelte-put `intersect` |
|
|
77
95
|
| `resized()` | attachment + helper | runed `useResizeObserver` · svelte-put `resize` |
|
|
78
96
|
| `mutated()` | attachment + helper | runed `useMutationObserver` |
|
|
79
|
-
| `copy()` | attachment + helper | svelte-put `copy` |
|
|
80
97
|
| `shortcut()` | attachment + helper | svelte-put `shortcut` |
|
|
81
98
|
| `lockScroll` | attachment ≡ helper, stacked lock counting | new |
|
|
82
99
|
| `dragScroll()` | attachment | svelte-put `dragscroll` |
|
|
83
|
-
| `viewTransition()` | function; navigation form under `/kit` | new |
|
|
84
|
-
| `viewTransitionName()` | attachment + helper | new |
|
|
85
|
-
| `retreat()` | function, returns a disposer | new |
|
|
86
100
|
| `debounced()` / `throttled()` | value factory | runed `Debounced` / `Throttled` |
|
|
87
101
|
| `debounce()` / `throttle()` | function wrapper | runed `useDebounce` / `useThrottle` |
|
|
88
102
|
| `previous()` | value factory | runed `Previous` |
|
|
@@ -96,11 +110,9 @@ Peer dependencies: `svelte >= 5.40`, plus `@sveltejs/kit >= 2` for the `kenspeck
|
|
|
96
110
|
| `searchParams()` + helpers | value factory | runed `useSearchParams` |
|
|
97
111
|
| `watch` / `watchOnce` / `extract` / `onCleanup` / `boolAttr` | unchanged | runed |
|
|
98
112
|
|
|
99
|
-
Dropped, deliberately: runed's `Context` — Svelte ≥ 5.40's `createContext` returns a typed
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
View transitions ship in two tiers. `viewTransition(update)` animates a state change within a route; the SvelteKit navigation form, plus `viewTransitionName` and `retreat`, come from the `kenspeckle/kit` subpath — separate so `$app/navigation` never enters the main entry. Both tiers fall back cleanly: with no `document.startViewTransition`, or under `prefers-reduced-motion`, the update still runs, untransitioned.
|
|
113
|
+
Dropped, deliberately: runed's `Context` — Svelte ≥ 5.40's `createContext` returns a typed
|
|
114
|
+
`[get, set]` pair and covers it. runed's `resource` waits in the backlog — SvelteKit remote functions
|
|
115
|
+
cover the server-data case; it returns only if a real client-only async need shows up.
|
|
104
116
|
|
|
105
117
|
## View transitions
|
|
106
118
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kenspeckle",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Svelte 5 utilities under one naming convention: attachments first-class, view transitions, and a state machine with context.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Brandon Pittman <brandon@brandonpittman.com>",
|