@getaster/data 0.2.0 → 0.3.5

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 (3) hide show
  1. package/NOTICE +3 -8
  2. package/README.md +70 -3
  3. package/package.json +13 -1
package/NOTICE CHANGED
@@ -1,10 +1,5 @@
1
- Aster UI
1
+ @getaster/data
2
2
  Copyright 2026 Aster UI contributors
3
3
 
4
- Aster UI source and the separately supplied OData mock WebAssembly binary are
5
- licensed under the Apache License, Version 2.0. Third-party components retain
6
- their respective licenses. The binary's attribution inventory and license texts
7
- are supplied in packages/mock/wasm/; packages include those notices when shipped.
8
-
9
- Geist and IBM Plex Mono fonts retain their SIL Open Font License notices.
10
- ECharts is an optional separately loaded third-party runtime.
4
+ Aster UI code in this package is licensed under the Apache License, Version 2.0.
5
+ See LICENSE. Separately installed dependencies retain their respective licenses.
package/README.md CHANGED
@@ -1,7 +1,74 @@
1
1
  # @getaster/data
2
2
 
3
- Aster UI data.
3
+ Reactive data models for metadata-driven OData applications. Aster's data core
4
+ shares records, queries, selections and edit state across views without depending
5
+ on the DOM or a UI framework.
4
6
 
5
- Documentation: https://ui.getaster.now/docs/guide/library.html
7
+ Use it on its own for application state, or with `@getaster/elements` for grids,
8
+ forms and other browser controls. Aster is pre-1.0; API stability is not yet promised.
6
9
 
7
- Licensed under Apache-2.0. See LICENSE and NOTICE.
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install @getaster/data
14
+ ```
15
+
16
+ The package provides ES modules and TypeScript declarations. Node.js consumers
17
+ require Node 22 or later. Browser consumers need a modern ES-module environment
18
+ and a bundler or import map that resolves npm dependencies.
19
+
20
+ ## Read a collection
21
+
22
+ This example requires an OData service with JSON CSDL metadata and a `Projects`
23
+ entity set. Replace the service URL with your endpoint.
24
+
25
+ ```ts
26
+ import { DataContext, fetchTransport } from '@getaster/data';
27
+
28
+ const ctx = await DataContext.connect(
29
+ fetchTransport('https://your-service.example/odata/')
30
+ );
31
+ const projects = ctx.collection({ set: 'Projects' }, { pageSize: 50 });
32
+
33
+ try {
34
+ await projects.view(0, 20);
35
+ if (projects.error.value) throw projects.error.value;
36
+ console.log(projects.items.value.slice(0, 20));
37
+ } finally {
38
+ ctx.release(projects);
39
+ }
40
+ ```
41
+
42
+ `DataContext.connect()` reads the service metadata. A collection represents a
43
+ query and loads a bounded window of records; `items`, `status` and `error` expose
44
+ reactive state. Release a collection when its owner no longer needs it.
45
+
46
+ ## What the core provides
47
+
48
+ - A shared record store so confirmed changes reach all connected views.
49
+ - Paging, filtering, sorting, grouping, summaries and hierarchical data models.
50
+ - Selections, edit drafts, validation and conflict handling.
51
+ - Composable commands, lifetimes and keyed sessions for application ownership.
52
+ - A transport boundary for HTTP services, authentication and local test services.
53
+
54
+ Service capabilities determine which queries and writes are supported. The server
55
+ must enforce authorization and write concurrency; client-side field visibility and
56
+ validation are not security boundaries. Configure authentication and CORS for
57
+ your deployment. For local examples without a server, use `@getaster/mock`.
58
+
59
+ The only runtime dependency is `@preact/signals-core`. The package has no install
60
+ scripts and contains no UI controls, fonts, charting runtime or mock WebAssembly.
61
+
62
+ ## Documentation and support
63
+
64
+ - [Shared data model](https://ui.getaster.now/docs/guide/data-model.html)
65
+ - [Connect SQL and APIs](https://ui.getaster.now/docs/guide/integrate-sql-and-apis.html)
66
+ - [Authentication](https://ui.getaster.now/docs/guide/authentication.html)
67
+ - [API reference](https://ui.getaster.now/docs/reference/)
68
+ - [Examples and showcase](https://ui.getaster.now/showcase/)
69
+ - [Report a bug](https://github.com/GetAster/aster-ui/issues)
70
+
71
+ ## License
72
+
73
+ Apache-2.0. See the included `LICENSE` and package-specific `NOTICE`.
74
+ Separately installed dependencies retain their own licenses.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getaster/data",
3
- "version": "0.2.0",
3
+ "version": "0.3.5",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -18,6 +18,18 @@
18
18
  "url": "git+https://github.com/GetAster/aster-ui.git",
19
19
  "directory": "packages/data"
20
20
  },
21
+ "description": "DOM-free reactive data models for metadata-driven OData applications.",
22
+ "homepage": "https://ui.getaster.now/docs/guide/data-model.html",
23
+ "bugs": {
24
+ "url": "https://github.com/GetAster/aster-ui/issues"
25
+ },
26
+ "keywords": [
27
+ "odata",
28
+ "typescript",
29
+ "reactive",
30
+ "data-model",
31
+ "signals"
32
+ ],
21
33
  "types": "./dist/index.d.ts",
22
34
  "publishConfig": {
23
35
  "access": "public"