@odla-ai/chapter 0.39.0 → 0.39.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.
@@ -1,8 +1,8 @@
1
1
  import * as preact from 'preact';
2
2
  import { ComponentChildren, JSX } from 'preact';
3
3
  import { CrmClient, Crm, CrmRecord } from '@odla-ai/crm';
4
- import { a as Chapter, b as ChapterCopy, M as MemberContentDocument, E as EffectiveMemberContent, c as MemberContentTierAuthority } from '../../copy-context-Pbs3keLx.js';
5
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Pbs3keLx.js';
4
+ import { a as Chapter, b as ChapterCopy, M as MemberContentDocument, E as EffectiveMemberContent, c as MemberContentTierAuthority } from '../../copy-context-Buz_27Ed.js';
5
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Buz_27Ed.js';
6
6
  import { CrmLifecycleAdapter, CrmWorkspaceMasterContext, CrmWorkspaceRecordContext, RecordPanelTab } from '@odla-ai/crm/ui';
7
7
 
8
8
  /** Normalized public auth configuration consumed by the Clerk gate. */
@@ -317,6 +317,109 @@ declare function MemberContentAdmin({ ctx, initialData, }: {
317
317
  /** Reusable nested admin section for the standard Settings workspace. */
318
318
  declare function memberContentSection(): AdminSection;
319
319
 
320
+ /** Versioned contract for private Builder Library source material. */
321
+ declare const BUILDER_LIBRARY_SCHEMA_VERSION: 1;
322
+ /** Authority kind attached to one complete Builder Library document. */
323
+ type BuilderLibrarySourceType = "chapter" | "built_not_found";
324
+ /** Stable authority identity attached to a Builder Library document. */
325
+ interface BuilderLibrarySource {
326
+ type: BuilderLibrarySourceType;
327
+ appId: string;
328
+ }
329
+ /** Exact app deployment that a signed Builder Library revision targets. */
330
+ interface BuilderLibraryTarget {
331
+ appId: string;
332
+ environment: string;
333
+ }
334
+ /** Exactly one visibility scope. There are deliberately no groups or audience arrays. */
335
+ type BuilderLibraryScope = {
336
+ kind: "chapter";
337
+ chapterId: string;
338
+ } | {
339
+ kind: "built_not_found";
340
+ } | {
341
+ kind: "global";
342
+ };
343
+ /** Supported private source-material representations. */
344
+ type BuilderLibraryResourceKind = "document" | "note" | "link" | "inspiration" | "image" | "file";
345
+ /** Explicit authoring lifecycle; only published resources enter agent manifests. */
346
+ type BuilderLibraryResourceStatus = "draft" | "published" | "archived";
347
+ /** Durable Brand identity only; URLs, bytes, and storage credentials never enter a manifest. */
348
+ interface BuilderLibraryBrandAssetRef {
349
+ bookId: string;
350
+ assetId: string;
351
+ filename?: string;
352
+ }
353
+ /** Immutable origin recorded when Built Not Found promotes Chapter material. */
354
+ interface BuilderLibraryPromotionProvenance {
355
+ chapterId: string;
356
+ resourceId: string;
357
+ resourceRevision: number;
358
+ documentRevision: number;
359
+ promotedBy: string;
360
+ promotedAt: number;
361
+ }
362
+ /** Server-authored creation/update history for one resource. */
363
+ interface BuilderLibraryResourceProvenance {
364
+ createdBy: string;
365
+ createdAt: number;
366
+ updatedBy: string;
367
+ updatedAt: number;
368
+ promotedFrom?: BuilderLibraryPromotionProvenance;
369
+ }
370
+ /** One bounded, revisioned private source item. */
371
+ interface BuilderLibraryResource {
372
+ id: string;
373
+ kind: BuilderLibraryResourceKind;
374
+ title: string;
375
+ summary?: string;
376
+ tags: readonly string[];
377
+ scope: BuilderLibraryScope;
378
+ status: BuilderLibraryResourceStatus;
379
+ revision: number;
380
+ bodyMarkdown?: string;
381
+ url?: string;
382
+ brandAsset?: BuilderLibraryBrandAssetRef;
383
+ provenance: BuilderLibraryResourceProvenance;
384
+ }
385
+ /** Complete local or federated authoring layer. */
386
+ interface BuilderLibraryDocument {
387
+ schemaVersion: typeof BUILDER_LIBRARY_SCHEMA_VERSION;
388
+ revision: number;
389
+ generatedAt: number;
390
+ source: BuilderLibrarySource;
391
+ target?: BuilderLibraryTarget;
392
+ resources: readonly BuilderLibraryResource[];
393
+ }
394
+
395
+ /** Admin-safe inventory of local and signed source layers. */
396
+ interface AdminBuilderLibraryData {
397
+ mode: "chapter" | "hub";
398
+ local: {
399
+ revision: number;
400
+ document: BuilderLibraryDocument;
401
+ } | null;
402
+ sources: {
403
+ sourceId: string;
404
+ revision: number;
405
+ digest: string;
406
+ document: BuilderLibraryDocument;
407
+ receivedAt: number;
408
+ }[];
409
+ localAuthoring: boolean;
410
+ visibility: {
411
+ builtNotFoundSeesChapterSources: boolean;
412
+ chaptersSeeSiblingSources: false;
413
+ };
414
+ }
415
+ /** Private source-material editor, visibly separate from member publishing. */
416
+ declare function BuilderLibraryAdmin({ ctx, initialData }: {
417
+ ctx: AdminSectionContext;
418
+ initialData?: AdminBuilderLibraryData;
419
+ }): preact.JSX.Element;
420
+ /** Reusable private Builder Library section for the standard Settings workspace. */
421
+ declare function builderLibrarySection(): AdminSection;
422
+
320
423
  /** Fetch a JSON `/api/admin/*` route with the admin bearer token. Throws on a
321
424
  * non-2xx (the body's `error`, else the status). */
322
425
  declare function adminFetch<T = unknown>(getToken: () => Promise<string | null>, path: string, init?: RequestInit): Promise<T>;
@@ -349,4 +452,4 @@ declare function AdminNote({ children }: {
349
452
  children: ComponentChildren;
350
453
  }): JSX.Element;
351
454
 
352
- export { type AdminAccountMenuProps, type AdminChrome, type AdminMemberContentData, AdminNote, AdminPage, type AdminResource, type AdminRouteState, type AdminRouteTarget, type AdminRouting, type AdminSection, type AdminSectionContext, type AdminWorkspace, type AdminWorkspaceNavProps, AdmissionGrantsWorkspace, type AvailabilitySectionOptions, type BillingSectionOptions, ChapterAdmin, type ChapterAdminAuthAdapter, type ChapterAdminAuthConfig, type ChapterAdminAuthLoadContext, type ChapterAdminProps, type ChapterAdminUser, type CollectionSectionOptions, type DashboardSectionOptions, type EmailSectionOptions, LeaderNetworkOverview, type MeetingsSectionOptions, MemberContentAdmin, NetworkRecordsWorkspace, NetworkShareActions, type NetworkShareActionsProps, Panel, type PeopleSectionOptions, RecordActions, type RecordActionsProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource };
455
+ export { type AdminAccountMenuProps, type AdminBuilderLibraryData, type AdminChrome, type AdminMemberContentData, AdminNote, AdminPage, type AdminResource, type AdminRouteState, type AdminRouteTarget, type AdminRouting, type AdminSection, type AdminSectionContext, type AdminWorkspace, type AdminWorkspaceNavProps, AdmissionGrantsWorkspace, type AvailabilitySectionOptions, type BillingSectionOptions, BuilderLibraryAdmin, ChapterAdmin, type ChapterAdminAuthAdapter, type ChapterAdminAuthConfig, type ChapterAdminAuthLoadContext, type ChapterAdminProps, type ChapterAdminUser, type CollectionSectionOptions, type DashboardSectionOptions, type EmailSectionOptions, LeaderNetworkOverview, type MeetingsSectionOptions, MemberContentAdmin, NetworkRecordsWorkspace, NetworkShareActions, type NetworkShareActionsProps, Panel, type PeopleSectionOptions, RecordActions, type RecordActionsProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, builderLibrarySection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource };
@@ -2,6 +2,7 @@ import {
2
2
  AdminNote,
3
3
  AdminPage,
4
4
  AdmissionGrantsWorkspace,
5
+ BuilderLibraryAdmin,
5
6
  ChapterAdmin,
6
7
  LeaderNetworkOverview,
7
8
  MemberContentAdmin,
@@ -19,6 +20,7 @@ import {
19
20
  applicationLifecycleAdapter,
20
21
  availabilitySection,
21
22
  billingSection,
23
+ builderLibrarySection,
22
24
  collectionSection,
23
25
  dashboardSection,
24
26
  defaultAdminSections,
@@ -31,7 +33,7 @@ import {
31
33
  networkRecordsWorkspace,
32
34
  peopleSection,
33
35
  useAdminResource
34
- } from "../../chunk-SI3JHSEX.js";
36
+ } from "../../chunk-4K2Q5JBC.js";
35
37
  import {
36
38
  ChapterCopyProvider,
37
39
  useChapterCopy
@@ -40,6 +42,7 @@ export {
40
42
  AdminNote,
41
43
  AdminPage,
42
44
  AdmissionGrantsWorkspace,
45
+ BuilderLibraryAdmin,
43
46
  ChapterAdmin,
44
47
  ChapterCopyProvider,
45
48
  LeaderNetworkOverview,
@@ -58,6 +61,7 @@ export {
58
61
  applicationLifecycleAdapter,
59
62
  availabilitySection,
60
63
  billingSection,
64
+ builderLibrarySection,
61
65
  collectionSection,
62
66
  dashboardSection,
63
67
  defaultAdminSections,
@@ -1,5 +1,5 @@
1
- export { AdminAccountMenuProps, AdminChrome, AdminMemberContentData, AdminNote, AdminPage, AdminResource, AdminRouteState, AdminRouteTarget, AdminRouting, AdminSection, AdminSectionContext, AdminWorkspace, AdminWorkspaceNavProps, AdmissionGrantsWorkspace, AvailabilitySectionOptions, BillingSectionOptions, ChapterAdmin, ChapterAdminAuthAdapter, ChapterAdminAuthConfig, ChapterAdminAuthLoadContext, ChapterAdminProps, ChapterAdminUser, CollectionSectionOptions, DashboardSectionOptions, EmailSectionOptions, LeaderNetworkOverview, MeetingsSectionOptions, MemberContentAdmin, NetworkRecordsWorkspace, NetworkShareActions, NetworkShareActionsProps, Panel, PeopleSectionOptions, RecordActions, RecordActionsProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource } from './admin/index.js';
2
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../copy-context-Pbs3keLx.js';
1
+ export { AdminAccountMenuProps, AdminBuilderLibraryData, AdminChrome, AdminMemberContentData, AdminNote, AdminPage, AdminResource, AdminRouteState, AdminRouteTarget, AdminRouting, AdminSection, AdminSectionContext, AdminWorkspace, AdminWorkspaceNavProps, AdmissionGrantsWorkspace, AvailabilitySectionOptions, BillingSectionOptions, BuilderLibraryAdmin, ChapterAdmin, ChapterAdminAuthAdapter, ChapterAdminAuthConfig, ChapterAdminAuthLoadContext, ChapterAdminProps, ChapterAdminUser, CollectionSectionOptions, DashboardSectionOptions, EmailSectionOptions, LeaderNetworkOverview, MeetingsSectionOptions, MemberContentAdmin, NetworkRecordsWorkspace, NetworkShareActions, NetworkShareActionsProps, Panel, PeopleSectionOptions, RecordActions, RecordActionsProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, builderLibrarySection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource } from './admin/index.js';
2
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../copy-context-Buz_27Ed.js';
3
3
  export { ApiFn, BrandStyle, BrandStyleProps, GiftOfferCards, GiftOfferCardsMode, GiftOfferCardsProps, JoinBookingSimulation, JoinConfig, JoinFlowState, JoinIsland, JoinIslandProps, JoinSimulation, JoinStepRenderContext, JoinSubmitRenderContext, JoinTier, JoinTierRenderContext, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, MemberContentAreaProps, MemberGifts, MemberProvisionalRenderContext, MembersArea, MembersAreaProps, MembershipCardTokenName, MembershipCards, MembershipCardsMode, MembershipCardsProps, PaymentPriceLines, PaymentStep, PaymentStepProps, PaymentStepSimulation, RescheduleProps, Rescheduler, Slot, SlotPicker, SlotPickerClasses, SlotPickerProps, SubResponse, TierPlaceholder, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, loadJoinResume, membershipApplicationHref, tierNeedsPayment, timeLabel, tzShort, useTierSelection } from './member/index.js';
4
4
  import 'preact';
5
5
  import '@odla-ai/crm';
package/dist/ui/index.js CHANGED
@@ -27,6 +27,7 @@ import {
27
27
  AdminNote,
28
28
  AdminPage,
29
29
  AdmissionGrantsWorkspace,
30
+ BuilderLibraryAdmin,
30
31
  ChapterAdmin,
31
32
  LeaderNetworkOverview,
32
33
  MemberContentAdmin,
@@ -44,6 +45,7 @@ import {
44
45
  applicationLifecycleAdapter,
45
46
  availabilitySection,
46
47
  billingSection,
48
+ builderLibrarySection,
47
49
  collectionSection,
48
50
  dashboardSection,
49
51
  defaultAdminSections,
@@ -56,7 +58,7 @@ import {
56
58
  networkRecordsWorkspace,
57
59
  peopleSection,
58
60
  useAdminResource
59
- } from "../chunk-SI3JHSEX.js";
61
+ } from "../chunk-4K2Q5JBC.js";
60
62
  import {
61
63
  BrandStyle,
62
64
  ChapterCopyProvider,
@@ -68,6 +70,7 @@ export {
68
70
  AdminPage,
69
71
  AdmissionGrantsWorkspace,
70
72
  BrandStyle,
73
+ BuilderLibraryAdmin,
71
74
  ChapterAdmin,
72
75
  ChapterCopyProvider,
73
76
  GiftOfferCards,
@@ -97,6 +100,7 @@ export {
97
100
  applicationLifecycleAdapter,
98
101
  availabilitySection,
99
102
  billingSection,
103
+ builderLibrarySection,
100
104
  collectionSection,
101
105
  dashboardSection,
102
106
  dayKey,
@@ -1,7 +1,7 @@
1
1
  import * as preact from 'preact';
2
2
  import { ComponentChildren, JSX } from 'preact';
3
- import { d as MemberContentProjection, e as MemberContentPageProjection, b as ChapterCopy, f as ChapterBrand } from '../../copy-context-Pbs3keLx.js';
4
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Pbs3keLx.js';
3
+ import { d as MemberContentProjection, e as MemberContentPageProjection, b as ChapterCopy, f as ChapterBrand } from '../../copy-context-Buz_27Ed.js';
4
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Buz_27Ed.js';
5
5
  import { FieldType, FieldConditions } from '@odla-ai/crm';
6
6
 
7
7
  /** A bookable slot: a start instant in epoch milliseconds. */