@sylwellsoftware/glue 0.8.0 → 0.8.1
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 +23 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Glue
|
|
2
2
|
|
|
3
|
-
Glue is a small, platform-neutral reactive value and live-query library.
|
|
3
|
+
Glue is a small, platform-neutral reactive value and live-query library. Its
|
|
4
|
+
current 0.x releases follow documented migration guidance. Fray
|
|
4
5
|
uses it as its state/data-flow layer, but Glue does not depend on Fray, a DOM,
|
|
5
6
|
or any UI framework. Its implementation and tests are strict TypeScript; the
|
|
6
7
|
ESM build includes declarations and declaration maps.
|
|
@@ -186,7 +187,7 @@ boundary that created them.
|
|
|
186
187
|
|
|
187
188
|
## Live queries
|
|
188
189
|
|
|
189
|
-
```
|
|
190
|
+
```ts
|
|
190
191
|
import {Emitter, LiveQuery, RestQueryHandler} from '@sylwellsoftware/glue'
|
|
191
192
|
|
|
192
193
|
const search = new Emitter('ada')
|
|
@@ -274,6 +275,10 @@ const local = service.matchingMovies.open({source: cachedMovies, args: {genre}})
|
|
|
274
275
|
Both results implement `LiveResult`, so a UI that only reads value, fetch
|
|
275
276
|
state, error, and subscriptions can accept either. `LiveQuery` additionally
|
|
276
277
|
implements `RefreshableLiveResult` with `refresh()`, `retry()`, and `abort()`.
|
|
278
|
+
The `queryEndpoint`, `restEndpoint`, and `derivedEndpoint` factory functions are
|
|
279
|
+
equivalent construction frontends when an application prefers function
|
|
280
|
+
declarations to `new QueryEndpoint()`, `new RestEndpoint()`, and
|
|
281
|
+
`new DerivedEndpoint()`.
|
|
277
282
|
|
|
278
283
|
For a query-like body protocol such as GraphQL, put a custom handler in a
|
|
279
284
|
`QueryEndpoint`. The handler owns method, headers, authentication, body
|
|
@@ -360,6 +365,22 @@ responsible for CSS assets, stylesheet links, and rendering.
|
|
|
360
365
|
Nothing in this contract is Fray-specific: another UI framework, a CLI, a Node
|
|
361
366
|
service, or a test can consume the same emitters and live queries.
|
|
362
367
|
|
|
368
|
+
## Complete export groups
|
|
369
|
+
|
|
370
|
+
| Area | Public exports |
|
|
371
|
+
| --- | --- |
|
|
372
|
+
| Values | `BaseEmitter`, `Emitter`, `DerivedEmitter`, readable/snapshot/notification option and inference types |
|
|
373
|
+
| State | `FetchState`, `FetchStateValues`, `combineFetchStates` |
|
|
374
|
+
| Queries | `QueryArg`, `LiveQuery`, `LiveResult`, `RefreshableLiveResult`, polling and argument types |
|
|
375
|
+
| Handlers | `QueryHandler`, `RestQueryHandler`, handler/fetch/URL/serializer/parser contracts |
|
|
376
|
+
| Endpoints | `QueryEndpoint`, `RestEndpoint`, `DerivedEndpoint`, `DerivedLiveResult`, lowercase factory functions and option types |
|
|
377
|
+
| Commands | `AsyncCommand`, `AsyncCommandConcurrencyError`, executor/context/concurrency option types |
|
|
378
|
+
| Diagnostics | `EventBubble`, `EventBus`, `EventOptions`, `EventListener`, `BubbleGraph` |
|
|
379
|
+
| Utilities | `NonEmptyArray` |
|
|
380
|
+
|
|
381
|
+
All runtime exports and public types are available from the package root. Glue
|
|
382
|
+
does not expose implementation subpath entry points.
|
|
383
|
+
|
|
363
384
|
## Local checks
|
|
364
385
|
|
|
365
386
|
```text
|
package/package.json
CHANGED