@moltenship/calendar-primitives 0.0.0-stage → 2.0.0
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/LICENSE +21 -0
- package/README.md +47 -2
- package/dist/index.d.mts +1131 -0
- package/dist/index.mjs +2748 -0
- package/package.json +46 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Timofey Maximov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @moltenship/calendar-primitives
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **2.0 preview.** This package is new and its API isn't settled. It can change in any release
|
|
4
|
+
> before 2.0. Most apps should keep using `@moltenship/calendar`.
|
|
5
|
+
|
|
6
|
+
The framework-free layer of Moltenship Time 2.0, written on
|
|
7
|
+
[ui-sdk](https://ui-sdk.dev). It holds the calendar runtime, the pipeline `Root` runs: event
|
|
8
|
+
snapshots, transactions, the active view's projection, the visible range and diagnostics. It also
|
|
9
|
+
defines the calendar as a ui-sdk primitive, with controlled state slices, semantic actions and
|
|
10
|
+
slots for its parts. Thin framework integrations render it: `@moltenship/calendar-react` for
|
|
11
|
+
React and `@moltenship/calendar-solid` for Solid.
|
|
12
|
+
|
|
13
|
+
The primitive is also how AI agents operate a calendar in the page, through ui-sdk's agent bridge
|
|
14
|
+
and WebMCP where the browser has it. It describes the calendar to the bridge: its state, the events
|
|
15
|
+
in view, and fifteen actions to read the calendar and its events, navigate, switch view, and
|
|
16
|
+
create, update, move, resize and delete events. Each action takes one JSON object, and an event
|
|
17
|
+
action returns the change with how it ended. An agent's change says it came from an agent
|
|
18
|
+
(`input: "agent"`) and goes through the same policies and `onEventChange` as any other, so the app
|
|
19
|
+
can refuse it. The app creates the bridge; this package never does. See
|
|
20
|
+
[Agents](https://time.molten.sh/docs/react/agents).
|
|
21
|
+
|
|
22
|
+
The dates, time zones, recurrence, layouts and policies stay in the calendar's own engine
|
|
23
|
+
(`@moltenship/calendar-core` and `@moltenship/calendar-temporal`). This package imports no UI
|
|
24
|
+
framework.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
You rarely install it yourself: the framework integrations depend on it.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm add @moltenship/calendar-primitives @ui-sdk/core
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- `@ui-sdk/core` 0.1 beta. It is a peer dependency, and still pre-1.0, so this package takes the
|
|
35
|
+
beta the calendar was tested with and the ones after it in the same 0.1 line.
|
|
36
|
+
- A runtime with `Temporal` (Node.js 26 and later include it), or a polyfill that defines
|
|
37
|
+
`globalThis.Temporal`, loaded first.
|
|
38
|
+
- TypeScript 6 or later with `"lib": ["DOM", "DOM.Iterable", "ESNext"]`.
|
|
39
|
+
|
|
40
|
+
## Documentation
|
|
41
|
+
|
|
42
|
+
- [Primitives](https://time.molten.sh/docs/react/api/primitives)
|
|
43
|
+
- [Agent reference](https://time.molten.sh/docs/react/agents/reference)
|
|
44
|
+
- [Repository](https://github.com/Moltenship/time)
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT
|