@flamingo-stack/openframe-frontend-core 0.0.582-1967.5390.1 → 0.0.582

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 (115) hide show
  1. package/dist/chunk-2EIGO6ZS.js +1055 -0
  2. package/dist/chunk-2EIGO6ZS.js.map +1 -0
  3. package/dist/{chunk-PDK6KVU6.js → chunk-53ZVUW2M.js} +4 -4
  4. package/dist/{chunk-BTXJQPGE.js → chunk-5U2FU5LM.js} +2 -2
  5. package/dist/{chunk-VG2SRECA.cjs → chunk-7WE6FGGK.cjs} +49 -49
  6. package/dist/{chunk-VG2SRECA.cjs.map → chunk-7WE6FGGK.cjs.map} +1 -1
  7. package/dist/{chunk-EXBNO6FB.js → chunk-CJW6KZD3.js} +2 -2
  8. package/dist/{chunk-UQXQCM3F.cjs → chunk-E4TK2BBD.cjs} +3 -3
  9. package/dist/{chunk-UQXQCM3F.cjs.map → chunk-E4TK2BBD.cjs.map} +1 -1
  10. package/dist/{chunk-NOO3QOJI.js → chunk-EULY3BXB.js} +2 -2
  11. package/dist/{chunk-ML22BIKH.js → chunk-GAL6EXUY.js} +3 -3
  12. package/dist/{chunk-YTZK2ORN.js → chunk-H7K76TPX.js} +4 -4
  13. package/dist/{chunk-RH7EY7YN.cjs → chunk-HMEEW73F.cjs} +1978 -237
  14. package/dist/chunk-HMEEW73F.cjs.map +1 -0
  15. package/dist/{chunk-KNQZZJYJ.js → chunk-IB23CRL2.js} +2 -2
  16. package/dist/{chunk-GHYWIVSU.cjs → chunk-IVJ6TBVW.cjs} +34 -34
  17. package/dist/{chunk-GHYWIVSU.cjs.map → chunk-IVJ6TBVW.cjs.map} +1 -1
  18. package/dist/{chunk-XJ3Y4OOF.js → chunk-IZGXIZWF.js} +2 -2
  19. package/dist/chunk-JMWLF2GL.cjs +1055 -0
  20. package/dist/chunk-JMWLF2GL.cjs.map +1 -0
  21. package/dist/{chunk-MCFETAH7.js → chunk-JUXCEHK2.js} +2 -2
  22. package/dist/{chunk-KX4F4O26.cjs → chunk-KS7NKONC.cjs} +3 -3
  23. package/dist/{chunk-KX4F4O26.cjs.map → chunk-KS7NKONC.cjs.map} +1 -1
  24. package/dist/{chunk-VYNYJVSE.cjs → chunk-LHQ6RVFE.cjs} +17 -17
  25. package/dist/{chunk-VYNYJVSE.cjs.map → chunk-LHQ6RVFE.cjs.map} +1 -1
  26. package/dist/{chunk-LGHMGCUG.cjs → chunk-M3ERSHPM.cjs} +4 -4
  27. package/dist/{chunk-LGHMGCUG.cjs.map → chunk-M3ERSHPM.cjs.map} +1 -1
  28. package/dist/{chunk-Q7X74UZF.cjs → chunk-RBMVTCRM.cjs} +3 -3
  29. package/dist/{chunk-Q7X74UZF.cjs.map → chunk-RBMVTCRM.cjs.map} +1 -1
  30. package/dist/{chunk-LYU3IZOA.cjs → chunk-RILGQ2OY.cjs} +10 -10
  31. package/dist/{chunk-LYU3IZOA.cjs.map → chunk-RILGQ2OY.cjs.map} +1 -1
  32. package/dist/{chunk-T6DRWYLM.cjs → chunk-RQMS2CF5.cjs} +17 -17
  33. package/dist/{chunk-T6DRWYLM.cjs.map → chunk-RQMS2CF5.cjs.map} +1 -1
  34. package/dist/{chunk-TC47NAJ3.cjs → chunk-S2ZXUQLR.cjs} +16 -16
  35. package/dist/{chunk-TC47NAJ3.cjs.map → chunk-S2ZXUQLR.cjs.map} +1 -1
  36. package/dist/{chunk-G3ZMLSKJ.js → chunk-SM6JAZ4C.js} +2 -2
  37. package/dist/{chunk-LENIASJW.js → chunk-T4DIAKIK.js} +2 -2
  38. package/dist/{chunk-ODOFQLSP.cjs → chunk-TMNFC24G.cjs} +13 -13
  39. package/dist/{chunk-ODOFQLSP.cjs.map → chunk-TMNFC24G.cjs.map} +1 -1
  40. package/dist/{chunk-FVF2MVIT.js → chunk-U6GFESVF.js} +2 -2
  41. package/dist/{chunk-2T7GXHRQ.js → chunk-XA5UPYWE.js} +2745 -1004
  42. package/dist/chunk-XA5UPYWE.js.map +1 -0
  43. package/dist/{chunk-TVLQVTZ6.cjs → chunk-XNSEZVV4.cjs} +4 -4
  44. package/dist/{chunk-TVLQVTZ6.cjs.map → chunk-XNSEZVV4.cjs.map} +1 -1
  45. package/dist/{chunk-XJJ2D64Q.cjs → chunk-YU4QZ6I6.cjs} +3 -3
  46. package/dist/{chunk-XJJ2D64Q.cjs.map → chunk-YU4QZ6I6.cjs.map} +1 -1
  47. package/dist/{chunk-LFG5JG2D.js → chunk-ZSENCE55.js} +5 -5
  48. package/dist/components/case-studies/index.cjs +8 -8
  49. package/dist/components/case-studies/index.js +2 -2
  50. package/dist/components/contact/index.cjs +3 -3
  51. package/dist/components/contact/index.js +2 -2
  52. package/dist/components/docs/index.cjs +6 -6
  53. package/dist/components/docs/index.js +5 -5
  54. package/dist/components/embeds/index.cjs +3 -3
  55. package/dist/components/embeds/index.js +2 -2
  56. package/dist/components/faq/index.cjs +3 -3
  57. package/dist/components/faq/index.js +2 -2
  58. package/dist/components/features/index.cjs +2 -2
  59. package/dist/components/features/index.js +1 -1
  60. package/dist/components/features/push-button-selector.d.ts +29 -1
  61. package/dist/components/features/push-button-selector.d.ts.map +1 -1
  62. package/dist/components/help-center-pages/index.cjs +22 -22
  63. package/dist/components/help-center-pages/index.js +13 -13
  64. package/dist/components/index.cjs +61 -892
  65. package/dist/components/index.cjs.map +1 -1
  66. package/dist/components/index.js +244 -1075
  67. package/dist/components/index.js.map +1 -1
  68. package/dist/components/meeting-scheduler/index.cjs +18 -18
  69. package/dist/components/meeting-scheduler/index.js +1 -1
  70. package/dist/components/navigation/index.cjs +5 -5
  71. package/dist/components/navigation/index.js +4 -4
  72. package/dist/components/onboarding-guides/index.cjs +5 -5
  73. package/dist/components/onboarding-guides/index.js +4 -4
  74. package/dist/components/tickets/index.cjs +6 -6
  75. package/dist/components/tickets/index.js +5 -5
  76. package/dist/components/ui/index.cjs +2 -2
  77. package/dist/components/ui/index.js +1 -1
  78. package/dist/index.cjs +6 -6
  79. package/dist/index.js +5 -5
  80. package/dist/utils/announcement-storage.d.ts +16 -25
  81. package/dist/utils/announcement-storage.d.ts.map +1 -1
  82. package/dist/utils/dismiss-cookie.d.ts +8 -27
  83. package/dist/utils/dismiss-cookie.d.ts.map +1 -1
  84. package/dist/utils/dismissal-storage.d.ts +2 -2
  85. package/dist/utils/dismissal-storage.d.ts.map +1 -1
  86. package/dist/utils/index.cjs +53 -70
  87. package/dist/utils/index.cjs.map +1 -1
  88. package/dist/utils/index.js +53 -70
  89. package/dist/utils/index.js.map +1 -1
  90. package/package.json +1 -1
  91. package/src/components/features/.push-button-selector.md +1 -1
  92. package/src/components/features/push-button-selector.tsx +142 -17
  93. package/src/utils/announcement-storage.ts +16 -25
  94. package/src/utils/dismiss-cookie.ts +9 -86
  95. package/src/utils/dismissal-storage.ts +2 -2
  96. package/dist/chunk-2T7GXHRQ.js.map +0 -1
  97. package/dist/chunk-FWNIZC6A.js +0 -1867
  98. package/dist/chunk-FWNIZC6A.js.map +0 -1
  99. package/dist/chunk-IHFTLVDF.cjs +0 -1867
  100. package/dist/chunk-IHFTLVDF.cjs.map +0 -1
  101. package/dist/chunk-RH7EY7YN.cjs.map +0 -1
  102. package/src/utils/__tests__/dismiss-cookie.test.ts +0 -133
  103. /package/dist/{chunk-PDK6KVU6.js.map → chunk-53ZVUW2M.js.map} +0 -0
  104. /package/dist/{chunk-BTXJQPGE.js.map → chunk-5U2FU5LM.js.map} +0 -0
  105. /package/dist/{chunk-EXBNO6FB.js.map → chunk-CJW6KZD3.js.map} +0 -0
  106. /package/dist/{chunk-NOO3QOJI.js.map → chunk-EULY3BXB.js.map} +0 -0
  107. /package/dist/{chunk-ML22BIKH.js.map → chunk-GAL6EXUY.js.map} +0 -0
  108. /package/dist/{chunk-YTZK2ORN.js.map → chunk-H7K76TPX.js.map} +0 -0
  109. /package/dist/{chunk-KNQZZJYJ.js.map → chunk-IB23CRL2.js.map} +0 -0
  110. /package/dist/{chunk-XJ3Y4OOF.js.map → chunk-IZGXIZWF.js.map} +0 -0
  111. /package/dist/{chunk-MCFETAH7.js.map → chunk-JUXCEHK2.js.map} +0 -0
  112. /package/dist/{chunk-G3ZMLSKJ.js.map → chunk-SM6JAZ4C.js.map} +0 -0
  113. /package/dist/{chunk-LENIASJW.js.map → chunk-T4DIAKIK.js.map} +0 -0
  114. /package/dist/{chunk-FVF2MVIT.js.map → chunk-U6GFESVF.js.map} +0 -0
  115. /package/dist/{chunk-LFG5JG2D.js.map → chunk-ZSENCE55.js.map} +0 -0
@@ -1,133 +0,0 @@
1
- /**
2
- * Tier selection on both sides of the cookie-averse split, plus the match rule
3
- * the two tiers feed.
4
- *
5
- * `document.URL` is stubbed rather than the document navigated: jsdom will not
6
- * take a `tauri://` document URL, and the scheme is the only input the tier
7
- * choice reads — so the stub sits exactly at the seam production reads.
8
- *
9
- * The round-trips run against the real stores rather than spies: reading a
10
- * value back is the only proof a write actually stuck, which is the whole
11
- * subject of this file.
12
- */
13
- import { afterEach, beforeEach, describe, expect, it } from 'vitest';
14
- import { clearDismissCookie, isDismissedCookieValue, readDismissCookie, writeDismissCookie } from '../dismiss-cookie';
15
-
16
- const KEY = 'openframe-walkthrough-video-dismissed';
17
- const nativeUrlDescriptor = Object.getOwnPropertyDescriptor(Document.prototype, 'URL');
18
-
19
- function setDocumentUrl(url: string): void {
20
- Object.defineProperty(document, 'URL', { value: url, writable: true, configurable: true });
21
- }
22
-
23
- afterEach(() => {
24
- // Restore the native accessor rather than re-stubbing a hardcoded URL, which
25
- // would silently diverge from jsdom's own document URL if the vitest
26
- // environment is ever given an explicit one.
27
- if (nativeUrlDescriptor) Object.defineProperty(document, 'URL', nativeUrlDescriptor);
28
- clearDismissCookie(KEY);
29
- });
30
-
31
- describe('dismissal on an http(s) origin', () => {
32
- beforeEach(() => setDocumentUrl('https://openframe.ai/dashboard'));
33
-
34
- it('round-trips through the cookie', () => {
35
- writeDismissCookie(KEY, 'video-7');
36
- expect(document.cookie).toContain(`${KEY}=video-7`);
37
- expect(readDismissCookie(KEY)).toBe('video-7');
38
- });
39
-
40
- it('takes the cookie tier on plain http too', () => {
41
- // Dev runs on `http://localhost`. Were only `https:` accepted, it would
42
- // silently drop to the fallback tier, where SSR cannot see the dismissal.
43
- setDocumentUrl('http://localhost:3000/dashboard');
44
- writeDismissCookie(KEY, 'video-7');
45
- expect(document.cookie).toContain(`${KEY}=video-7`);
46
- });
47
-
48
- it('leaves the fallback tier untouched', () => {
49
- // Pins fallback-not-mirror; see `fallbackStore`.
50
- writeDismissCookie(KEY, 'video-7');
51
- expect(window.localStorage.getItem(KEY)).toBeNull();
52
- });
53
-
54
- it('fails open on a malformed cookie value', () => {
55
- // `decodeURIComponent` throws `URIError` on bad percent-encoding; the other
56
- // half of the guarantee `readDismissCookie` documents.
57
- document.cookie = `${KEY}=%E0%A4%A; path=/`;
58
- expect(readDismissCookie(KEY)).toBeUndefined();
59
- });
60
-
61
- it('clears the cookie tier', () => {
62
- writeDismissCookie(KEY, 'video-7');
63
- clearDismissCookie(KEY);
64
- expect(document.cookie).not.toContain(KEY);
65
- expect(readDismissCookie(KEY)).toBeUndefined();
66
- });
67
- });
68
-
69
- describe('dismissal on a cookie-averse origin (tauri://, capacitor://)', () => {
70
- beforeEach(() => setDocumentUrl('tauri://localhost/index.html'));
71
-
72
- it('writes no cookie', () => {
73
- writeDismissCookie(KEY, 'video-7');
74
- expect(document.cookie).not.toContain(KEY);
75
- });
76
-
77
- it('persists through localStorage and keeps the id-match rule', () => {
78
- writeDismissCookie(KEY, 'video-7');
79
- // jsdom keys its cookie jar off the REAL document URL, not the stub above,
80
- // so a cookie-only implementation's write would still land here and serve
81
- // the reads below. Emptying the jar first is what makes them prove the
82
- // value came from the fallback tier; the assertion confirms the wipe took,
83
- // since a path or domain mismatch would leave the cookie in place and
84
- // hollow out both reads.
85
- document.cookie = `${KEY}=; path=/; max-age=0`;
86
- expect(document.cookie).not.toContain(KEY);
87
-
88
- // The positive half is the discriminator — asserting only the `video-8`
89
- // false would also pass against a fallback tier that stored nothing.
90
- expect(isDismissedCookieValue(readDismissCookie(KEY), 'video-7')).toBe(true);
91
- expect(isDismissedCookieValue(readDismissCookie(KEY), 'video-8')).toBe(false);
92
- });
93
-
94
- it('fails open on a corrupted stored value', () => {
95
- // Seeded through the real writer first, so this also pins the fallback key
96
- // to the cookie name: read a different key and the pre-corruption value
97
- // would still come back.
98
- writeDismissCookie(KEY, 'video-7');
99
- window.localStorage.setItem(KEY, 'not-json');
100
- // Callers reveal the surface off this read, so an unreadable value must
101
- // mean "not dismissed" rather than throwing and hiding it permanently.
102
- expect(readDismissCookie(KEY)).toBeUndefined();
103
-
104
- // Parses, but is not the string the tier stores — what `validate` is for.
105
- window.localStorage.setItem(KEY, '123');
106
- expect(readDismissCookie(KEY)).toBeUndefined();
107
- });
108
- });
109
-
110
- describe('the match rule itself', () => {
111
- it('treats "nothing stored, nothing active" as NOT dismissed', () => {
112
- // Both sides undefined is the case the `!!id` guard exists for: a bare
113
- // equality would call it dismissed and suppress a surface that has no
114
- // active item to be dismissed against.
115
- expect(isDismissedCookieValue(undefined, undefined)).toBe(false);
116
- });
117
- });
118
-
119
- describe('clearing across the tier split', () => {
120
- it('clears the tier the current scheme does NOT select', () => {
121
- // Written on the fallback tier, cleared from a document on the cookie tier
122
- // — the case a same-origin `blob:`/`about:blank` child produces, and the
123
- // one a tier-checking clear would leave stranded.
124
- setDocumentUrl('tauri://localhost/index.html');
125
- writeDismissCookie(KEY, 'video-7');
126
-
127
- setDocumentUrl('https://openframe.ai/dashboard');
128
- clearDismissCookie(KEY);
129
-
130
- setDocumentUrl('tauri://localhost/index.html');
131
- expect(readDismissCookie(KEY)).toBeUndefined();
132
- });
133
- });