@weaver-apps/calendar 0.0.0-stage → 0.1.3

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,3 +1,34 @@
1
- # Temporary Holding Version
1
+ # @weaver-apps/calendar
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The calendar app's weaver for a LoomWeaver distribution: a calendar's appointments by week, booking,
4
+ editing, cancelling and deleting. It talks to the Weaver Apps server through a gateway the host supplies,
5
+ and holds no key.
6
+
7
+ ## Compose it
8
+
9
+ ```ts
10
+ import { createCalendarPlugin, createHttpCalendarGateway, provideCalendarGateway } from '@weaver-apps/calendar';
11
+
12
+ provideTranslationNamespaces('calendar'),
13
+ provideCapabilityGrants({ calendar: ['contributions', 'navigation', 'ui'] }),
14
+ ...providePlugins(createCalendarPlugin({ railItem: true })),
15
+ provideCalendarGateway(createHttpCalendarGateway({ baseUrl: '/weaver-apps' })),
16
+ ```
17
+
18
+ - `baseUrl` is a same-origin path the host's backend forwards to the server, adding the forwarding key and
19
+ the signed-in person's tenant (`X-API-Key`, `X-Act-For-Tenant`). The gateway appends the server's own
20
+ routes, such as `/calendar/calendars/{id}/appointments`.
21
+ - Serve the translations: the package carries them under `i18n/calendar`; add an assets glob that copies
22
+ `node_modules/@weaver-apps/calendar/i18n/calendar` to `i18n/calendar`.
23
+ - If the host compiles the shell's theme with Tailwind, add the package as an `@source`.
24
+
25
+ ## Surfaces
26
+
27
+ | Path | What it shows |
28
+ |---|---|
29
+ | `calendar` | the tenant's calendars |
30
+ | `calendar/:calendarId` | one calendar's appointments, a week at a time |
31
+
32
+ `calendarPath(id)` builds the second; a host that shows one entry per calendar navigates there.
33
+ `createCalendarPlugin({ railItem: true })` adds a rail item that opens the list; without it the host decides
34
+ where the calendar is reached from.