@flamingo-stack/openframe-frontend-core 0.0.644-2208.6338.1 → 0.0.644

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.
Files changed (133) hide show
  1. package/dist/chat-protocol/index.cjs +2 -2
  2. package/dist/chat-protocol/index.cjs.map +1 -1
  3. package/dist/chat-protocol/index.js +2 -2
  4. package/dist/chat-protocol/index.js.map +1 -1
  5. package/dist/chat-protocol/source-metadata.d.ts +14 -7
  6. package/dist/chat-protocol/source-metadata.d.ts.map +1 -1
  7. package/dist/{chunk-NUM4HHBK.js → chunk-27RD5XTP.js} +3 -3
  8. package/dist/{chunk-EHL24T5A.js → chunk-3DGRXC74.js} +3 -3
  9. package/dist/{chunk-HGLTNB3J.cjs → chunk-3UBT2OIX.cjs} +20 -20
  10. package/dist/{chunk-HGLTNB3J.cjs.map → chunk-3UBT2OIX.cjs.map} +1 -1
  11. package/dist/{chunk-7NVFN4ZL.js → chunk-4WVWRFGP.js} +6 -6
  12. package/dist/{chunk-S3DZK5TT.cjs → chunk-65EVGKFV.cjs} +7 -7
  13. package/dist/{chunk-S3DZK5TT.cjs.map → chunk-65EVGKFV.cjs.map} +1 -1
  14. package/dist/{chunk-LT4SBH5F.js → chunk-7Q5XXPCB.js} +6 -6
  15. package/dist/{chunk-I5X3AEXW.cjs → chunk-7R2DIGG4.cjs} +2 -6
  16. package/dist/chunk-7R2DIGG4.cjs.map +1 -0
  17. package/dist/{chunk-3IIO432P.js → chunk-B3Z3RJRW.js} +2 -2
  18. package/dist/{chunk-X5NEQSGO.cjs → chunk-B5IFXCRF.cjs} +22 -22
  19. package/dist/{chunk-X5NEQSGO.cjs.map → chunk-B5IFXCRF.cjs.map} +1 -1
  20. package/dist/{chunk-AEOKRT2V.cjs → chunk-C5Y5T6GC.cjs} +15 -15
  21. package/dist/{chunk-AEOKRT2V.cjs.map → chunk-C5Y5T6GC.cjs.map} +1 -1
  22. package/dist/{chunk-U3VUTYJO.cjs → chunk-CBXZSTAG.cjs} +152 -152
  23. package/dist/{chunk-U3VUTYJO.cjs.map → chunk-CBXZSTAG.cjs.map} +1 -1
  24. package/dist/{chunk-ZJQMZMZD.cjs → chunk-DCCY54LU.cjs} +6 -6
  25. package/dist/{chunk-ZJQMZMZD.cjs.map → chunk-DCCY54LU.cjs.map} +1 -1
  26. package/dist/{chunk-IR2WBWIH.cjs → chunk-FAD5WURS.cjs} +81 -81
  27. package/dist/{chunk-IR2WBWIH.cjs.map → chunk-FAD5WURS.cjs.map} +1 -1
  28. package/dist/{chunk-NHQBAAKW.js → chunk-FOSIR4QF.js} +2 -6
  29. package/dist/chunk-FOSIR4QF.js.map +1 -0
  30. package/dist/{chunk-OT2ZEKLJ.js → chunk-HOGOQA2X.js} +2 -2
  31. package/dist/{chunk-P22QC266.js → chunk-HPWLIYRL.js} +3 -3
  32. package/dist/{chunk-X7OGQRZR.js → chunk-I57XLISO.js} +4 -4
  33. package/dist/{chunk-X7OGQRZR.js.map → chunk-I57XLISO.js.map} +1 -1
  34. package/dist/{chunk-SHSD7KJ4.cjs → chunk-IIXB5REN.cjs} +3 -3
  35. package/dist/{chunk-SHSD7KJ4.cjs.map → chunk-IIXB5REN.cjs.map} +1 -1
  36. package/dist/{chunk-OTZB66SU.js → chunk-IXD6SHQ6.js} +4 -4
  37. package/dist/{chunk-J227IYWA.cjs → chunk-LZYPSDFE.cjs} +59 -59
  38. package/dist/{chunk-J227IYWA.cjs.map → chunk-LZYPSDFE.cjs.map} +1 -1
  39. package/dist/{chunk-5NY3FAOW.cjs → chunk-MCQAOIUK.cjs} +28 -28
  40. package/dist/{chunk-5NY3FAOW.cjs.map → chunk-MCQAOIUK.cjs.map} +1 -1
  41. package/dist/{chunk-ISUFPQ6K.js → chunk-MRIOYSXH.js} +3 -3
  42. package/dist/{chunk-4PASSDJ6.cjs → chunk-OMSUWB6A.cjs} +29 -29
  43. package/dist/{chunk-4PASSDJ6.cjs.map → chunk-OMSUWB6A.cjs.map} +1 -1
  44. package/dist/{chunk-VADHSV6U.cjs → chunk-OVXYX47B.cjs} +10 -10
  45. package/dist/{chunk-VADHSV6U.cjs.map → chunk-OVXYX47B.cjs.map} +1 -1
  46. package/dist/{chunk-VXPPAEVX.js → chunk-PFV4DAX5.js} +4 -4
  47. package/dist/{chunk-JIV55LTZ.cjs → chunk-RB6L5EGM.cjs} +203 -203
  48. package/dist/{chunk-JIV55LTZ.cjs.map → chunk-RB6L5EGM.cjs.map} +1 -1
  49. package/dist/{chunk-EUI2MDXC.cjs → chunk-RFFF2EYD.cjs} +11 -11
  50. package/dist/{chunk-EUI2MDXC.cjs.map → chunk-RFFF2EYD.cjs.map} +1 -1
  51. package/dist/{chunk-SKTE6T47.js → chunk-RNMGKAS6.js} +7 -7
  52. package/dist/{chunk-NTN4ZLAV.cjs → chunk-RWURXICE.cjs} +32 -32
  53. package/dist/{chunk-NTN4ZLAV.cjs.map → chunk-RWURXICE.cjs.map} +1 -1
  54. package/dist/{chunk-PB3X3AAY.js → chunk-S2KMNFFN.js} +3 -3
  55. package/dist/{chunk-YNVZ5VJJ.js → chunk-SKABQX44.js} +3 -3
  56. package/dist/{chunk-5K67KZH7.cjs → chunk-TGUA3C4U.cjs} +5 -5
  57. package/dist/{chunk-5K67KZH7.cjs.map → chunk-TGUA3C4U.cjs.map} +1 -1
  58. package/dist/{chunk-52Y2AHM6.js → chunk-TTVOBWAH.js} +3 -3
  59. package/dist/{chunk-7ZMKUISO.js → chunk-UEXIMEVU.js} +5 -5
  60. package/dist/{chunk-MLIVKPZI.cjs → chunk-UKV52KAP.cjs} +33 -33
  61. package/dist/{chunk-MLIVKPZI.cjs.map → chunk-UKV52KAP.cjs.map} +1 -1
  62. package/dist/{chunk-HMNGAQJ6.js → chunk-VE52MSYC.js} +5 -5
  63. package/dist/components/case-studies/index.cjs +16 -16
  64. package/dist/components/case-studies/index.js +4 -4
  65. package/dist/components/chat/index.cjs +3 -3
  66. package/dist/components/chat/index.js +2 -2
  67. package/dist/components/chat/types/entities/program-types.d.ts +2 -23
  68. package/dist/components/chat/types/entities/program-types.d.ts.map +1 -1
  69. package/dist/components/contact/index.cjs +5 -5
  70. package/dist/components/contact/index.js +4 -4
  71. package/dist/components/docs/index.cjs +8 -8
  72. package/dist/components/docs/index.js +7 -7
  73. package/dist/components/embeds/index.cjs +5 -5
  74. package/dist/components/embeds/index.js +4 -4
  75. package/dist/components/faq/index.cjs +5 -5
  76. package/dist/components/faq/index.js +4 -4
  77. package/dist/components/features/index.cjs +4 -4
  78. package/dist/components/features/index.js +3 -3
  79. package/dist/components/help-center-pages/index.cjs +24 -24
  80. package/dist/components/help-center-pages/index.js +15 -15
  81. package/dist/components/index.cjs +53 -53
  82. package/dist/components/index.js +15 -15
  83. package/dist/components/meeting-scheduler/index.cjs +40 -40
  84. package/dist/components/meeting-scheduler/index.js +3 -3
  85. package/dist/components/navigation/index.cjs +7 -7
  86. package/dist/components/navigation/index.js +6 -6
  87. package/dist/components/onboarding-guides/index.cjs +7 -7
  88. package/dist/components/onboarding-guides/index.js +6 -6
  89. package/dist/components/related-content/index.cjs +3 -3
  90. package/dist/components/related-content/index.js +2 -2
  91. package/dist/components/tickets/index.cjs +8 -8
  92. package/dist/components/tickets/index.js +7 -7
  93. package/dist/components/ui/index.cjs +4 -4
  94. package/dist/components/ui/index.js +3 -3
  95. package/dist/index.cjs +9 -9
  96. package/dist/index.js +7 -7
  97. package/dist/utils/format.d.ts +10 -17
  98. package/dist/utils/format.d.ts.map +1 -1
  99. package/dist/utils/index.cjs +1 -5
  100. package/dist/utils/index.cjs.map +1 -1
  101. package/dist/utils/index.js +1 -5
  102. package/dist/utils/index.js.map +1 -1
  103. package/dist/utils/program-instant.d.ts +9 -35
  104. package/dist/utils/program-instant.d.ts.map +1 -1
  105. package/dist/utils/url-safety.d.ts +5 -6
  106. package/dist/utils/url-safety.d.ts.map +1 -1
  107. package/package.json +1 -1
  108. package/src/chat-protocol/__tests__/source-metadata.test.ts +34 -48
  109. package/src/chat-protocol/source-metadata.ts +18 -12
  110. package/src/components/chat/types/entities/program-types.ts +2 -23
  111. package/src/utils/__tests__/format-program-dates.test.ts +2 -34
  112. package/src/utils/__tests__/program-instant.test.ts +1 -46
  113. package/src/utils/format.ts +12 -23
  114. package/src/utils/program-instant.ts +13 -44
  115. package/src/utils/url-safety.ts +5 -6
  116. package/dist/chunk-I5X3AEXW.cjs.map +0 -1
  117. package/dist/chunk-NHQBAAKW.js.map +0 -1
  118. /package/dist/{chunk-NUM4HHBK.js.map → chunk-27RD5XTP.js.map} +0 -0
  119. /package/dist/{chunk-EHL24T5A.js.map → chunk-3DGRXC74.js.map} +0 -0
  120. /package/dist/{chunk-7NVFN4ZL.js.map → chunk-4WVWRFGP.js.map} +0 -0
  121. /package/dist/{chunk-LT4SBH5F.js.map → chunk-7Q5XXPCB.js.map} +0 -0
  122. /package/dist/{chunk-3IIO432P.js.map → chunk-B3Z3RJRW.js.map} +0 -0
  123. /package/dist/{chunk-OT2ZEKLJ.js.map → chunk-HOGOQA2X.js.map} +0 -0
  124. /package/dist/{chunk-P22QC266.js.map → chunk-HPWLIYRL.js.map} +0 -0
  125. /package/dist/{chunk-OTZB66SU.js.map → chunk-IXD6SHQ6.js.map} +0 -0
  126. /package/dist/{chunk-ISUFPQ6K.js.map → chunk-MRIOYSXH.js.map} +0 -0
  127. /package/dist/{chunk-VXPPAEVX.js.map → chunk-PFV4DAX5.js.map} +0 -0
  128. /package/dist/{chunk-SKTE6T47.js.map → chunk-RNMGKAS6.js.map} +0 -0
  129. /package/dist/{chunk-PB3X3AAY.js.map → chunk-S2KMNFFN.js.map} +0 -0
  130. /package/dist/{chunk-YNVZ5VJJ.js.map → chunk-SKABQX44.js.map} +0 -0
  131. /package/dist/{chunk-52Y2AHM6.js.map → chunk-TTVOBWAH.js.map} +0 -0
  132. /package/dist/{chunk-7ZMKUISO.js.map → chunk-UEXIMEVU.js.map} +0 -0
  133. /package/dist/{chunk-HMNGAQJ6.js.map → chunk-VE52MSYC.js.map} +0 -0
@@ -21,34 +21,16 @@
21
21
  *
22
22
  * THE RULE:
23
23
  *
24
- * - `item.date` IS the instant to render. The host resolves it once, applying
25
- * any admin display override, and hands the same value to the card, the
26
- * model's context and the API wire. Preferring `start_at` looks like it buys
27
- * intra-card coherence — it does, by disagreeing with everything else.
24
+ * - `item.date` IS the instant to render. The host resolves it once and hands
25
+ * the same value to the card, the model's context and the API wire.
26
+ * Preferring `start_at` looks like it buys intra-card coherence — it does, by
27
+ * disagreeing with everything else.
28
28
  * - `start_at` / `end_at` remain the source for DURATION, which is elapsed time
29
29
  * rather than a display date.
30
- * - A DISPLAY OVERRIDE is a chosen date, not a moment. An admin backdating in a
31
- * `datetime-local` control gets `00:00`, so "show this as March 19" is stored
32
- * at UTC midnight; rendering that in a west-of-UTC zone shows March 18 at
33
- * 8 PM — a day early, at a time nobody chose. Such a value renders UTC-pinned
34
- * with no clock and WITHOUT A ZONE LABEL.
35
30
  *
36
- * The discriminator is "did an override supply this", NOT the value's
37
- * precision. The override column is `timestamptz` and the host normalizes it
38
- * through `toISOString()`, so it is always a full instant — an earlier
39
- * attempt keyed on precision and could therefore never fire.
31
+ * `timezone` here is "the zone this value renders in and may be labelled with".
32
+ * A row that declares none keeps the UTC pin (the React #418 fix).
40
33
  *
41
- * THE ZONE IS NULLED RATHER THAN FLAGGED, deliberately. `timezone` here is "the
42
- * zone this value renders in and may be labelled with", so a day-valued row
43
- * carries none and a consumer CANNOT print `America/New_York` under a clock the
44
- * rule just suppressed. Three surfaces had to remember that gate; two forgot,
45
- * and one of them rendered a bare IANA string under an empty heading. A rule
46
- * enforced by the shape of the data cannot be forgotten by the next call site.
47
- *
48
- * There is deliberately NO escape hatch back to the un-nulled zone. One was
49
- * added ("for the rare consumer that needs it as data") and no consumer ever
50
- * wanted it — an un-nulled copy hanging off the resolved value is just the
51
- * mistake again, one property away.
52
34
  */
53
35
 
54
36
  /** Read a string field off an item type that does not declare it. */
@@ -59,12 +41,8 @@ export interface ProgramInstant {
59
41
  * to `utcDate`. */
60
42
  instant: string | null;
61
43
  /** The zone this value RENDERS IN and may be LABELLED with. Null when the row
62
- * declares none, and null when the value is day-valued — see the note above
63
- * on why this is nulled rather than flagged. */
44
+ * declares none. */
64
45
  timezone: string | null;
65
- /** True when an admin display override supplied the value: render the day
66
- * UTC-pinned, with no clock. */
67
- dateOnly: boolean;
68
46
  /** The row's canonical date string, used when there is no zone to render in.
69
47
  * Kept on the resolved value so the UTC fallback is not re-derived (and
70
48
  * re-formatted differently) at each call site. */
@@ -75,33 +53,26 @@ export interface ProgramInstant {
75
53
  * The columns this rule reads. Declared structurally rather than as a
76
54
  * `Record<string, unknown>` so a caller holding a real `BaseProgramItem` can
77
55
  * pass it straight in: while the parameter was a bare record, every one of the
78
- * four call sites wrote `as unknown as Record<string, unknown>`, and a cast at
79
- * every call site is how a producer that forgets to set the flag goes
80
- * unnoticed by the compiler.
56
+ * four call sites wrote `as unknown as Record<string, unknown>`.
81
57
  */
82
58
  export interface ProgramDateFields {
83
59
  date?: unknown;
84
60
  start_at?: unknown;
85
61
  end_at?: unknown;
86
62
  timezone?: unknown;
87
- date_is_display_override?: unknown;
88
63
  }
89
64
 
90
65
  /** Resolve what a program item should render. */
91
66
  export function programDateInstant(item: ProgramDateFields): ProgramInstant {
92
- const declaredZone = programStr(item.timezone);
93
- const dateOnly = item.date_is_display_override === true;
67
+ const timezone = programStr(item.timezone);
94
68
  const date = programStr(item.date);
95
69
  const startAt = programStr(item.start_at);
96
70
 
97
- // A day-valued row has no zone to render in, and a row that declares none
98
- // keeps the caller's UTC pin — which is the React #418 fix and must not be
99
- // "fixed" into a viewer-local render.
100
- const timezone = dateOnly ? null : declaredZone;
71
+ // A row that declares no zone keeps the caller's UTC pin — which is the
72
+ // React #418 fix and must not be "fixed" into a viewer-local render.
101
73
  return {
102
74
  instant: timezone ? (date ?? startAt) : null,
103
75
  timezone,
104
- dateOnly,
105
76
  utcDate: date ?? startAt,
106
77
  };
107
78
  }
@@ -114,16 +85,14 @@ export function programDateInstant(item: ProgramDateFields): ProgramInstant {
114
85
  * columns in four different shapes (`programStr`, raw reads, `?? null`, and an
115
86
  * `in`-guarded cast), which is the same defect one field-pair down from the one
116
87
  * this module exists to fix. They are read off the row, never off the resolved
117
- * instant, because elapsed time is not a display date: an override moves the
118
- * day shown, and a webinar still runs for 45 minutes.
88
+ * instant, because elapsed time is not a display date.
119
89
  */
120
90
  export function webinarTiming(item: ProgramDateFields): {
121
91
  startAt: string | null;
122
92
  endAt: string | null;
123
93
  } {
124
94
  // No `timezone` here on purpose: it would be a second derivation of what
125
- // `programDateInstant` already resolved (and the UN-NULLED one, so a call
126
- // site could reintroduce a zone the day-valued rule just dropped).
95
+ // `programDateInstant` already resolved.
127
96
  return { startAt: programStr(item.start_at), endAt: programStr(item.end_at) };
128
97
  }
129
98
 
@@ -5,12 +5,11 @@
5
5
  * have no business in an href" had two copies once, and a security predicate
6
6
  * kept in sync by a comment drifts.
7
7
  *
8
- * `isSameOriginPath` is used by the RENDER-time guard only. It answers "does
9
- * this path stay on our origin", which is only a meaningful question where the
10
- * page rendering the href IS the origin the path belongs to — the hub's own
11
- * chat cards. The wire decoder does not ask it: its consumer has no hub origin,
12
- * so a relative path there is not a same-origin link but a broken one, and the
13
- * decoder accepts absolute https only.
8
+ * `isSameOriginPath` answers "does this path stay on our origin" for the
9
+ * render-time `safeHref` — the ONE gate every chat href passes. The wire decoder
10
+ * does not judge links at all: it carries them, because resolving a link is a
11
+ * client decision (only the rendering page knows where it is embedded), and a
12
+ * second, stricter gate there only dropped links it could not resolve itself.
14
13
  *
15
14
  * Pure and dependency-free, so the server-safe `chat-protocol` leaf and the
16
15
  * client-side card utils can both import it directly.