@ttt-productions/ttt-core 0.79.77 → 0.79.78

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.
@@ -199,7 +199,7 @@ export declare function isRequiredVideoSlot(slotId: SystemVideoSlotId): boolean;
199
199
  /** The registry's slots under each group, in the groups' order; a group no slot belongs to is left out. */
200
200
  export declare function systemSlotsByGroup(): Array<{
201
201
  group: (typeof SYSTEM_SLOT_GROUPS)[number];
202
- slots: SystemSlotDefinition[];
202
+ slots: SystemSlot[];
203
203
  }>;
204
204
  export {};
205
205
  //# sourceMappingURL=system-slots.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-slots.d.ts","sourceRoot":"","sources":["../../src/system-slots/system-slots.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,mGAAmG;AACnG,eAAO,MAAM,oBAAoB;;;;EAAsC,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAKrB,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE1E,UAAU,wBAAwB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAC5B,CAAC,wBAAwB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;CA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ent":["// System slots: the admin-managed places the app shows a founder-recorded video or names a special\n// account. Each surface is one registry entry; its value lives in Firestore and is set from the\n// admin System Slots view, never in code.\n//\n// Every `uid` / `uidList` slot is PUBLIC data: its values are stored in the public `_appConfig`\n// bucket, so a slot that names accounts is readable by anyone, signed in or not.\n\nimport { z } from 'zod';\nimport { GUIDE_VIDEO_DEFINITIONS, guideVideoSlotId } from './guide-videos.js';\nimport { HELP_VIDEO_DEFINITIONS, helpVideoSlotId } from './help-videos.js';\n\n/** `video` holds one processed video; `uid` names one account; `uidList` names an ordered list. */\nexport const SystemSlotKindSchema = z.enum(['video', 'uid', 'uidList']);\nexport type SystemSlotKind = z.infer<typeof SystemSlotKindSchema>;\n\n/**\n * Where a slot appears — the admin System Slots view groups slots by it, in this order, under these\n * names. A group is declared only once a slot belongs to it.\n */\nexport const SYSTEM_SLOT_GROUPS = [\n { id: 'landingPage', label: 'Landing page' },\n { id: 'acknowledgmentsPage', label: 'Acknowledgments page' },\n { id: 'backstageGuide', label: 'Backstage Guide' },\n { id: 'helpComponents', label: 'Help components' },\n] as const;\nexport type SystemSlotGroupId = (typeof SYSTEM_SLOT_GROUPS)[number]['id'];\n\ninterface SystemSlotDefinitionBase {\n readonly id: string;\n /** The admin view's row title. */\n readonly label: string;\n /** Where the slot appears, in one sentence. */\n readonly description: string;\n readonly group: SystemSlotGroupId;\n}\n\n/**\n * A video slot declares whether its place always shows a video. `requiredVideo: true` reserves the\n * 16:9 box everywhere it is shown and holds the coming-soon placard until a video is uploaded;\n * `false` takes no space and shows nothing until a video is uploaded.\n */\nexport type SystemSlotDefinition =\n | (SystemSlotDefinitionBase & { readonly kind: 'video'; readonly requiredVideo: boolean })\n | (SystemSlotDefinitionBase & { readonly kind: 'uid' | 'uidList' });\n\nconst GUIDE_VIDEO_SLOTS = GUIDE_VIDEO_DEFINITIONS.map((video) => ({\n id: guideVideoSlotId(video.id),\n kind: 'video' as const,\n label: video.plannedTitle,\n description: 'A Backstage Guide video, shown wherever the Guide offers it.',\n group: 'backstageGuide' as const,\n requiredVideo: true,\n}));\n\nconst HELP_VIDEO_SLOTS = HELP_VIDEO_DEFINITIONS.map((help) => ({\n id: helpVideoSlotId(help.id),\n kind: 'video' as const,\n label: help.title,\n description: help.location,\n group: 'helpComponents' as const,\n requiredVideo: false,\n}));\n\nexport const SYSTEM_SLOTS = [\n {\n id: 'founder',\n kind: 'uid',\n label: 'Founder',\n description: 'The founder named on the acknowledgments page.',\n group: 'acknowledgmentsPage',\n },\n {\n id: 'team',\n kind: 'uidList',\n label: 'Our Team',\n description: 'The team listed on the acknowledgments page.',\n group: 'acknowledgmentsPage',\n },\n {\n id: 'landing-hero',\n kind: 'video',\n label: 'Landing page hero',\n description: 'The video under the hero on the signed-in landing page.',\n group: 'landingPage',\n requiredVideo: true,\n },\n ...GUIDE_VIDEO_SLOTS,\n ...HELP_VIDEO_SLOTS,\n] as const satisfies readonly SystemSlotDefinition[];\n\ntype SystemSlot = (typeof SYSTEM_SLOTS)[number];\nexport type SystemSlotId = SystemSlot['id'];\nexport type SystemVideoSlotId = Extract<SystemSlot, { kind: 'video' }>['id'];\nexport type SystemUidSlotId = Extract<SystemSlot, { kind: 'uid' }>['id'];\nexport type SystemUidListSlotId = Extract<SystemSlot, { kind: 'uidList' }>['id'];\n\nfunction slotIdsOfKind<K extends SystemSlotKind>(kind: K) {\n const ids = SYSTEM_SLOTS.filter((slot) => slot.kind === kind).map((slot) => slot.id);\n return ids as unknown as [Extract<SystemSlot, { kind: K }>['id'], ...Extract<SystemSlot, { kind: K }>['id'][]];\n}\n\nexport const SystemSlotIdSchema = z.enum(\n SYSTEM_SLOTS.map((slot) => slot.id) as unknown as [SystemSlotId, ...SystemSlotId[]],\n);\nexport const SystemVideoSlotIdSchema = z.enum(slotIdsOfKind('video'));\nexport const SystemUidSlotIdSchema = z.enum(slotIdsOfKind('uid'));\nexport const SystemUidListSlotIdSchema = z.enum(slotIdsOfKind('uidList'));\n/** A slot that names accounts: a `uid` or a `uidList` slot. */\nexport const SystemAccountSlotIdSchema = z.enum([\n ...SystemUidSlotIdSchema.options,\n ...SystemUidListSlotIdSchema.options,\n]);\nexport type SystemAccountSlotId = z.infer<typeof SystemAccountSlotIdSchema>;\n\n/** The registry entry for `id`, or undefined for an id the registry does not hold. */\nexport function getSystemSlot(id: string): SystemSlotDefinition | undefined {\n return SYSTEM_SLOTS.find((slot) => slot.id === id);\n}\n\n/** Whether a video slot's place always shows a video (its box and placard) — read from the registry. */\nexport function isRequiredVideoSlot(slotId: SystemVideoSlotId): boolean {\n const slot = SYSTEM_SLOTS.find((entry) => entry.id === slotId);\n return slot?.kind === 'video' && slot.requiredVideo;\n}\n\n/** The registry's slots under each group, in the groups' order; a group no slot belongs to is left out. */\nexport function systemSlotsByGroup(): Array<{ group: (typeof SYSTEM_SLOT_GROUPS)[number]; slots: SystemSlotDefinition[] }> {\n return SYSTEM_SLOT_GROUPS.map((group) => ({\n group,\n slots: SYSTEM_SLOTS.filter((slot) => slot.group === group.id),\n })).filter((entry) => entry.slots.length > 0);\n}\n"]}
1
+ {"version":3,"file":"system-slots.js","sourceRoot":"","sources":["../../src/system-slots/system-slots.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,gGAAgG;AAChG,0CAA0C;AAC1C,EAAE;AACF,gGAAgG;AAChG,iFAAiF;AAEjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE3E,mGAAmG;AACnG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAGxE;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAA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AAC,MAAyB;IAC3D,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;IAC/D,OAAO,IAAI,EAAE,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,aAAa,CAAC;AACtD,CAAC;AAED,2GAA2G;AAC3G,MAAM,UAAU,kBAAkB;IAChC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxC,KAAK;QACL,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE,CAAC;KAC9D,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAChD,CAAC","sourcesContent":["// System slots: the admin-managed places the app shows a founder-recorded video or names a special\n// account. Each surface is one registry entry; its value lives in Firestore and is set from the\n// admin System Slots view, never in code.\n//\n// Every `uid` / `uidList` slot is PUBLIC data: its values are stored in the public `_appConfig`\n// bucket, so a slot that names accounts is readable by anyone, signed in or not.\n\nimport { z } from 'zod';\nimport { GUIDE_VIDEO_DEFINITIONS, guideVideoSlotId } from './guide-videos.js';\nimport { HELP_VIDEO_DEFINITIONS, helpVideoSlotId } from './help-videos.js';\n\n/** `video` holds one processed video; `uid` names one account; `uidList` names an ordered list. */\nexport const SystemSlotKindSchema = z.enum(['video', 'uid', 'uidList']);\nexport type SystemSlotKind = z.infer<typeof SystemSlotKindSchema>;\n\n/**\n * Where a slot appears — the admin System Slots view groups slots by it, in this order, under these\n * names. A group is declared only once a slot belongs to it.\n */\nexport const SYSTEM_SLOT_GROUPS = [\n { id: 'landingPage', label: 'Landing page' },\n { id: 'acknowledgmentsPage', label: 'Acknowledgments page' },\n { id: 'backstageGuide', label: 'Backstage Guide' },\n { id: 'helpComponents', label: 'Help components' },\n] as const;\nexport type SystemSlotGroupId = (typeof SYSTEM_SLOT_GROUPS)[number]['id'];\n\ninterface SystemSlotDefinitionBase {\n readonly id: string;\n /** The admin view's row title. */\n readonly label: string;\n /** Where the slot appears, in one sentence. */\n readonly description: string;\n readonly group: SystemSlotGroupId;\n}\n\n/**\n * A video slot declares whether its place always shows a video. `requiredVideo: true` reserves the\n * 16:9 box everywhere it is shown and holds the coming-soon placard until a video is uploaded;\n * `false` takes no space and shows nothing until a video is uploaded.\n */\nexport type SystemSlotDefinition =\n | (SystemSlotDefinitionBase & { readonly kind: 'video'; readonly requiredVideo: boolean })\n | (SystemSlotDefinitionBase & { readonly kind: 'uid' | 'uidList' });\n\nconst GUIDE_VIDEO_SLOTS = GUIDE_VIDEO_DEFINITIONS.map((video) => ({\n id: guideVideoSlotId(video.id),\n kind: 'video' as const,\n label: video.plannedTitle,\n description: 'A Backstage Guide video, shown wherever the Guide offers it.',\n group: 'backstageGuide' as const,\n requiredVideo: true,\n}));\n\nconst HELP_VIDEO_SLOTS = HELP_VIDEO_DEFINITIONS.map((help) => ({\n id: helpVideoSlotId(help.id),\n kind: 'video' as const,\n label: help.title,\n description: help.location,\n group: 'helpComponents' as const,\n requiredVideo: false,\n}));\n\nexport const SYSTEM_SLOTS = [\n {\n id: 'founder',\n kind: 'uid',\n label: 'Founder',\n description: 'The founder named on the acknowledgments page.',\n group: 'acknowledgmentsPage',\n },\n {\n id: 'team',\n kind: 'uidList',\n label: 'Our Team',\n description: 'The team listed on the acknowledgments page.',\n group: 'acknowledgmentsPage',\n },\n {\n id: 'landing-hero',\n kind: 'video',\n label: 'Landing page hero',\n description: 'The video under the hero on the signed-in landing page.',\n group: 'landingPage',\n requiredVideo: true,\n },\n ...GUIDE_VIDEO_SLOTS,\n ...HELP_VIDEO_SLOTS,\n] as const satisfies readonly SystemSlotDefinition[];\n\ntype SystemSlot = (typeof SYSTEM_SLOTS)[number];\nexport type SystemSlotId = SystemSlot['id'];\nexport type SystemVideoSlotId = Extract<SystemSlot, { kind: 'video' }>['id'];\nexport type SystemUidSlotId = Extract<SystemSlot, { kind: 'uid' }>['id'];\nexport type SystemUidListSlotId = Extract<SystemSlot, { kind: 'uidList' }>['id'];\n\nfunction slotIdsOfKind<K extends SystemSlotKind>(kind: K) {\n const ids = SYSTEM_SLOTS.filter((slot) => slot.kind === kind).map((slot) => slot.id);\n return ids as unknown as [Extract<SystemSlot, { kind: K }>['id'], ...Extract<SystemSlot, { kind: K }>['id'][]];\n}\n\nexport const SystemSlotIdSchema = z.enum(\n SYSTEM_SLOTS.map((slot) => slot.id) as unknown as [SystemSlotId, ...SystemSlotId[]],\n);\nexport const SystemVideoSlotIdSchema = z.enum(slotIdsOfKind('video'));\nexport const SystemUidSlotIdSchema = z.enum(slotIdsOfKind('uid'));\nexport const SystemUidListSlotIdSchema = z.enum(slotIdsOfKind('uidList'));\n/** A slot that names accounts: a `uid` or a `uidList` slot. */\nexport const SystemAccountSlotIdSchema = z.enum([\n ...SystemUidSlotIdSchema.options,\n ...SystemUidListSlotIdSchema.options,\n]);\nexport type SystemAccountSlotId = z.infer<typeof SystemAccountSlotIdSchema>;\n\n/** The registry entry for `id`, or undefined for an id the registry does not hold. */\nexport function getSystemSlot(id: string): SystemSlotDefinition | undefined {\n return SYSTEM_SLOTS.find((slot) => slot.id === id);\n}\n\n/** Whether a video slot's place always shows a video (its box and placard) — read from the registry. */\nexport function isRequiredVideoSlot(slotId: SystemVideoSlotId): boolean {\n const slot = SYSTEM_SLOTS.find((entry) => entry.id === slotId);\n return slot?.kind === 'video' && slot.requiredVideo;\n}\n\n/** The registry's slots under each group, in the groups' order; a group no slot belongs to is left out. */\nexport function systemSlotsByGroup(): Array<{ group: (typeof SYSTEM_SLOT_GROUPS)[number]; slots: SystemSlot[] }> {\n return SYSTEM_SLOT_GROUPS.map((group) => ({\n group,\n slots: SYSTEM_SLOTS.filter((slot) => slot.group === group.id),\n })).filter((entry) => entry.slots.length > 0);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ttt-core",
3
- "version": "0.79.77",
3
+ "version": "0.79.78",
4
4
  "description": "Core types, Firestore path constants, and shared constants for TTT Productions",
5
5
  "repository": {
6
6
  "type": "git",