@odla-ai/chapter 0.18.0 → 0.19.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.
@@ -103,8 +103,7 @@ interface DashboardSectionOptions {
103
103
  id?: string;
104
104
  label?: string;
105
105
  }
106
- /** Build the Dashboard admin section over `GET /api/admin/dashboard`. Drop the
107
- * result into `ChapterAdmin`'s `sections`. */
106
+ /** Build the Dashboard admin section over `GET /api/admin/dashboard`. */
108
107
  declare function dashboardSection(options?: DashboardSectionOptions): AdminSection;
109
108
 
110
109
  /** Options for {@link billingSection}. */
@@ -171,4 +170,22 @@ interface AdminResource<T> {
171
170
  * or when `path` changes. */
172
171
  declare function useAdminResource<T = unknown>(getToken: () => Promise<string | null>, path: string): AdminResource<T>;
173
172
 
174
- export { type AdminResource, type AdminSection, type AdminSectionContext, type AvailabilitySectionOptions, type BillingSectionOptions, ChapterAdmin, type ChapterAdminProps, type CollectionSectionOptions, type DashboardSectionOptions, type EmailSectionOptions, type MeetingsSectionOptions, type PeopleSectionOptions, RecordActions, type RecordActionsProps, adminFetch, availabilitySection, billingSection, collectionSection, dashboardSection, emailSection, meetingsSection, peopleSection, useAdminResource };
173
+ /** The centered content column every admin section renders into. */
174
+ declare function AdminPage({ children }: {
175
+ children: ReactNode;
176
+ }): react.JSX.Element;
177
+ /** An odla-ui `.panel` card with an optional heading + trailing actions. */
178
+ declare function Panel({ title, actions, children }: {
179
+ title?: ReactNode;
180
+ actions?: ReactNode;
181
+ children: ReactNode;
182
+ }): react.JSX.Element;
183
+ /** A loud banner when the odla-ui theme token layer is missing — the silent-and-
184
+ * total failure S&S flagged. Renders nothing when the theme is present. */
185
+ declare function ThemeWarning(): react.JSX.Element | null;
186
+ /** A centered status line for loading / empty / error states. */
187
+ declare function AdminNote({ children }: {
188
+ children: ReactNode;
189
+ }): react.JSX.Element;
190
+
191
+ export { AdminNote, AdminPage, type AdminResource, type AdminSection, type AdminSectionContext, type AvailabilitySectionOptions, type BillingSectionOptions, ChapterAdmin, type ChapterAdminProps, type CollectionSectionOptions, type DashboardSectionOptions, type EmailSectionOptions, type MeetingsSectionOptions, Panel, type PeopleSectionOptions, RecordActions, type RecordActionsProps, ThemeWarning, adminFetch, availabilitySection, billingSection, collectionSection, dashboardSection, emailSection, meetingsSection, peopleSection, useAdminResource };
@@ -1,6 +1,10 @@
1
1
  import {
2
+ AdminNote,
3
+ AdminPage,
2
4
  ChapterAdmin,
5
+ Panel,
3
6
  RecordActions,
7
+ ThemeWarning,
4
8
  adminFetch,
5
9
  availabilitySection,
6
10
  billingSection,
@@ -10,10 +14,14 @@ import {
10
14
  meetingsSection,
11
15
  peopleSection,
12
16
  useAdminResource
13
- } from "../../chunk-K6BDIFCJ.js";
17
+ } from "../../chunk-D3QMK3ED.js";
14
18
  export {
19
+ AdminNote,
20
+ AdminPage,
15
21
  ChapterAdmin,
22
+ Panel,
16
23
  RecordActions,
24
+ ThemeWarning,
17
25
  adminFetch,
18
26
  availabilitySection,
19
27
  billingSection,
@@ -1,4 +1,4 @@
1
- export { AdminResource, AdminSection, AdminSectionContext, AvailabilitySectionOptions, BillingSectionOptions, ChapterAdmin, ChapterAdminProps, CollectionSectionOptions, DashboardSectionOptions, EmailSectionOptions, MeetingsSectionOptions, PeopleSectionOptions, RecordActions, RecordActionsProps, adminFetch, availabilitySection, billingSection, collectionSection, dashboardSection, emailSection, meetingsSection, peopleSection, useAdminResource } from './admin/index.js';
1
+ export { AdminNote, AdminPage, AdminResource, AdminSection, AdminSectionContext, AvailabilitySectionOptions, BillingSectionOptions, ChapterAdmin, ChapterAdminProps, CollectionSectionOptions, DashboardSectionOptions, EmailSectionOptions, MeetingsSectionOptions, Panel, PeopleSectionOptions, RecordActions, RecordActionsProps, ThemeWarning, adminFetch, availabilitySection, billingSection, collectionSection, dashboardSection, emailSection, meetingsSection, peopleSection, useAdminResource } from './admin/index.js';
2
2
  export { ApiFn, BrandStyle, BrandStyleProps, JoinConfig, JoinIsland, JoinIslandProps, MembersArea, MembersAreaProps, PaymentStep, PaymentStepProps, RescheduleProps, Rescheduler, Slot, SlotPicker, SlotPickerClasses, SlotPickerProps, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, timeLabel, tzShort } from './member/index.js';
3
3
  import 'react';
4
4
  import '@odla-ai/crm';
package/dist/ui/index.js CHANGED
@@ -13,10 +13,14 @@ import {
13
13
  groupSlotsByDay,
14
14
  timeLabel,
15
15
  tzShort
16
- } from "../chunk-ZCZK6QLC.js";
16
+ } from "../chunk-GWY2ZTN7.js";
17
17
  import {
18
+ AdminNote,
19
+ AdminPage,
18
20
  ChapterAdmin,
21
+ Panel,
19
22
  RecordActions,
23
+ ThemeWarning,
20
24
  adminFetch,
21
25
  availabilitySection,
22
26
  billingSection,
@@ -26,16 +30,20 @@ import {
26
30
  meetingsSection,
27
31
  peopleSection,
28
32
  useAdminResource
29
- } from "../chunk-K6BDIFCJ.js";
33
+ } from "../chunk-D3QMK3ED.js";
30
34
  export {
35
+ AdminNote,
36
+ AdminPage,
31
37
  BrandStyle,
32
38
  ChapterAdmin,
33
39
  JoinIsland,
34
40
  MembersArea,
41
+ Panel,
35
42
  PaymentStep,
36
43
  RecordActions,
37
44
  Rescheduler,
38
45
  SlotPicker,
46
+ ThemeWarning,
39
47
  adminFetch,
40
48
  availabilitySection,
41
49
  billingSection,
@@ -124,8 +124,13 @@ declare function PaymentStep(props: PaymentStepProps): react.JSX.Element;
124
124
  /** Brand tokens that theme the site: palette, fonts, wordmark, nav, logos. */
125
125
  interface ChapterBrand {
126
126
  /** Palette overrides written into styles.css :root (e.g. `{ moss: "#2F3E34" }`
127
- * or `--ui-*` token names). */
127
+ * or `--ui-*` token names). Applies in BOTH light and dark unless overridden
128
+ * by {@link paletteDark}. */
128
129
  palette?: Record<string, string>;
130
+ /** Dark-mode palette overrides. Same shape as {@link palette}; emitted under
131
+ * `:root[data-theme="dark"]` and `@media (prefers-color-scheme: dark)`, so a
132
+ * site brands both modes. */
133
+ paletteDark?: Record<string, string>;
129
134
  fonts?: {
130
135
  display?: string;
131
136
  body?: string;
@@ -13,7 +13,7 @@ import {
13
13
  groupSlotsByDay,
14
14
  timeLabel,
15
15
  tzShort
16
- } from "../../chunk-ZCZK6QLC.js";
16
+ } from "../../chunk-GWY2ZTN7.js";
17
17
  export {
18
18
  BrandStyle,
19
19
  JoinIsland,
@@ -35,8 +35,13 @@ type DbRules = Record<string, Rule>;
35
35
  /** Brand tokens that theme the site: palette, fonts, wordmark, nav, logos. */
36
36
  interface ChapterBrand {
37
37
  /** Palette overrides written into styles.css :root (e.g. `{ moss: "#2F3E34" }`
38
- * or `--ui-*` token names). */
38
+ * or `--ui-*` token names). Applies in BOTH light and dark unless overridden
39
+ * by {@link paletteDark}. */
39
40
  palette?: Record<string, string>;
41
+ /** Dark-mode palette overrides. Same shape as {@link palette}; emitted under
42
+ * `:root[data-theme="dark"]` and `@media (prefers-color-scheme: dark)`, so a
43
+ * site brands both modes. */
44
+ paletteDark?: Record<string, string>;
40
45
  fonts?: {
41
46
  display?: string;
42
47
  body?: string;
@@ -35,8 +35,13 @@ type DbRules = Record<string, Rule>;
35
35
  /** Brand tokens that theme the site: palette, fonts, wordmark, nav, logos. */
36
36
  interface ChapterBrand {
37
37
  /** Palette overrides written into styles.css :root (e.g. `{ moss: "#2F3E34" }`
38
- * or `--ui-*` token names). */
38
+ * or `--ui-*` token names). Applies in BOTH light and dark unless overridden
39
+ * by {@link paletteDark}. */
39
40
  palette?: Record<string, string>;
41
+ /** Dark-mode palette overrides. Same shape as {@link palette}; emitted under
42
+ * `:root[data-theme="dark"]` and `@media (prefers-color-scheme: dark)`, so a
43
+ * site brands both modes. */
44
+ paletteDark?: Record<string, string>;
40
45
  fonts?: {
41
46
  display?: string;
42
47
  body?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/chapter",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "A foundation for membership sites: one config (defineChapter) stands up a full member site (join, Stripe membership, Google booking, member area, admin, CRM) or an admin-only hub, on odla-db + Clerk + @odla-ai/crm + calendar + email.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://odla.ai/docs/packages/chapter",