@sylwellsoftware/glue 0.7.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 CHANGED
@@ -1,6 +1,7 @@
1
1
  # Glue
2
2
 
3
- Glue is a small, platform-neutral reactive value and live-query library. Fray
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
- ```js
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
@@ -374,6 +395,6 @@ application-specific query encoding, persistent event history, CommonJS build,
374
395
  or framework adapter. Fray consumes Glue as a peer; browser UI belongs there.
375
396
 
376
397
  See the [workspace overview](../../README.md), [API
377
- surface](../../docs/API_SURFACE.md), [changelog](../../CHANGELOG.md),
398
+ surface](../../docs/API_SURFACE.md), [changelog](CHANGELOG.md),
378
399
  [contribution guide](../../CONTRIBUTING.md), and [security
379
400
  policy](../../SECURITY.md).
package/dist/index.d.ts CHANGED
@@ -19,4 +19,5 @@ export { RestQueryHandler } from './queryhandling/restQueryHandler.js';
19
19
  export type { FetchLike, JsonResponseLike, QuerySerializer, ResultParser, RestQueryHandlerOptions, SearchParamsLike, UrlLike, } from './queryhandling/restQueryHandler.js';
20
20
  export { DerivedEndpoint, DerivedLiveResult, derivedEndpoint, QueryEndpoint, queryEndpoint, RestEndpoint, restEndpoint, } from './queryhandling/endpoints.js';
21
21
  export type { DerivedEndpointOptions, EndpointArgumentEmitters, EndpointQueryOptions, OpenDerivedEndpointOptions, QueryEndpointOptions, RestEndpointOptions, } from './queryhandling/endpoints.js';
22
+ export type { NonEmptyArray } from './utilities.js';
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","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BAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,GACtB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAC,UAAU,EAAE,qBAAqB,EAAC,MAAM,0BAA0B,CAAA;AAE/E,OAAO,EAAC,kBAAkB,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AACtF,YAAY,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAA;AAE1D,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAC5D,YAAY,EACR,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,GACd,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAA;AACpE,YAAY,EACR,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,uBAAuB,EACvB,gBAAgB,EAChB,OAAO,GACV,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACH,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,GACf,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACR,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACR,aAAa,EAChB,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export type NonEmptyArray<T> = [T, ...T[]];
2
+ //# sourceMappingURL=utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sylwellsoftware/glue",
3
3
  "private": false,
4
- "version": "0.7.0",
4
+ "version": "0.8.1",
5
5
  "description": "Platform-neutral reactive values, derived state, live queries, and causal tracing.",
6
6
  "license": "Apache-2.0",
7
7
  "author": {