mnfst 0.5.121 → 0.5.123

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.
@@ -19,7 +19,7 @@
19
19
  --color-field-surface-hover: var(--color-neutral-400);
20
20
  --color-field-inverse: var(--color-content-stark);
21
21
  --color-popover-surface: var(--color-page);
22
- --color-line: color-mix(var(--color-content-stark) 11%, transparent);
22
+ --color-line: color-mix(in oklch, var(--color-content-stark) 11%, transparent);
23
23
  --color-brand-surface: var(--color-yellow-300);
24
24
  --color-brand-surface-hover: var(--color-yellow-400);
25
25
  --color-brand-inverse: var(--color-yellow-700);
@@ -58,8 +58,10 @@
58
58
 
59
59
  /* Icons */
60
60
  --icon-accordion: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 256 256'%3E%3Cpath fill='%23000' d='m184.49 136.49l-80 80a12 12 0 0 1-17-17L159 128L87.51 56.49a12 12 0 1 1 17-17l80 80a12 12 0 0 1-.02 17'/%3E%3C/svg%3E");
61
- --icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='currentColor' d='m0 11l2-2l5 5L18 3l2 2L7 18z'/%3E%3C/svg%3E");
62
- --icon-toast-dismiss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
61
+ --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='currentColor' d='m0 11l2-2l5 5L18 3l2 2L7 18z'/%3E%3C/svg%3E");
62
+ --icon-dismiss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
63
+ --icon-previous: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
64
+ --icon-next: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
63
65
  }
64
66
 
65
67
  /* Dark mode overrides */
@@ -118,6 +120,6 @@
118
120
  /* Focus state */
119
121
  :where(:focus-visible, label:has(input[type=search], input[type=file]):focus-within) {
120
122
  outline: none;
121
- box-shadow: 0 0 0 2px color-mix(var(--color-content-stark) 30%, transparent)
123
+ box-shadow: 0 0 0 2px color-mix(in oklch, var(--color-content-stark) 30%, transparent)
122
124
  }
123
125
  }
@@ -59,7 +59,7 @@
59
59
  width: 50%;
60
60
  height: 50%;
61
61
  background-color: var(--color-field-inverse, oklch(43.9% 0 0));
62
- mask-image: var(--icon-toast-dismiss, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E"));
62
+ mask-image: var(--icon-dismiss, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E"));
63
63
  mask-repeat: no-repeat;
64
64
  mask-size: 100% 100%;
65
65
  transform-origin: center;
@@ -1,35 +1,37 @@
1
1
  /* Manifest Tooltips */
2
2
 
3
+ /* A closed popover stays hidden even when a layout utility (.col/.row/.grid,
4
+ Tailwind flex) sets display on it — UNLAYERED so it outranks those utilities
5
+ in any cascade layer, in any cherry-picked bundle. Only the closed state is
6
+ forced; an open popover's display is left to its layout classes. */
7
+ [popover]:not(.unstyle):not(:popover-open) {
8
+ display: none;
9
+ }
10
+
3
11
  @layer base {
4
12
 
5
- /* Base popover styles: scale-only pop-in, no opacity animation (avoids the
6
- see-through artifact + Safari bounce). See manifest.dropdown.css. */
7
13
  @keyframes mnfst-popover-in {
8
- from { transform: scale(.9); }
9
- to { transform: none; }
10
- }
11
-
12
- :where([popover]):not(.unstyle) {
13
- display: none;
14
+ from {
15
+ transform: scale(.9);
16
+ }
14
17
 
15
- &:popover-open {
16
- display: flex;
17
- animation: mnfst-popover-in .15s ease-in both;
18
+ to {
19
+ transform: none;
18
20
  }
19
21
  }
22
+
23
+ :where([popover]):not(.unstyle):popover-open {
24
+ display: flex;
25
+ animation: mnfst-popover-in .15s ease-in both;
26
+ }
20
27
  }
21
28
 
22
29
  @layer utilities {
23
30
 
24
- :where(.tooltip[popover]) {
25
- position: absolute;
26
- position-try-fallbacks: flip-inline, flip-block, flip-start;
27
- position-area: bottom;
28
- inset: auto;
29
- display: block;
31
+ /* Shared chrome — anchored x-tooltip popovers AND non-popover tooltips
32
+ (e.g. the charts plugin's cursor-following tip) */
33
+ :where(.tooltip) {
30
34
  width: fit-content;
31
- max-width: 200px;
32
- margin: var(--spacing-popover-offset, 0.5rem) 0;
33
35
  padding: calc(var(--spacing, 0.25rem) * .5) calc(var(--spacing, 0.25rem) * 2);
34
36
  font-size: 0.875rem;
35
37
  color: var(--color-page, oklch(98.5% 0 0));
@@ -38,16 +40,50 @@
38
40
  border-radius: var(--radius, 0.5rem);
39
41
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
40
42
 
41
- &:hover {
42
- transition-delay: var(--tooltip-hover-delay, .5s)
43
- }
44
-
45
43
  /* Leading icon */
46
44
  & [x-icon]:first-child {
47
45
  margin-inline-end: 0.25rem
48
46
  }
49
47
  }
50
48
 
49
+ /* Anchored popover positioning + open/close behavior */
50
+ :where(.tooltip[popover]) {
51
+ position: absolute;
52
+ position-try-fallbacks: flip-inline, flip-block, flip-start;
53
+ position-area: bottom;
54
+ inset: auto;
55
+ display: block;
56
+ max-width: 200px;
57
+ margin: var(--spacing-popover-offset, 0.5rem) 0;
58
+
59
+ /* Tooltips keep their original transition-based fade/scale rather than the
60
+ shared scale-pop: the hover delay below needs a transition to act on,
61
+ and the `display: none` close (overriding `display: block` above) is
62
+ what hides them on mouse-off. */
63
+ animation: none;
64
+ transition: opacity .15s ease-in, scale .15s ease-in, display .15s ease-in;
65
+ transition-behavior: allow-discrete;
66
+
67
+ /* Opening state */
68
+ @starting-style {
69
+ scale: .9;
70
+ opacity: 0
71
+ }
72
+
73
+ /* Closing state */
74
+ &:not(:popover-open) {
75
+ display: none !important;
76
+ scale: 1;
77
+ opacity: 0;
78
+ transition-duration: .15s;
79
+ transition-timing-function: ease-out
80
+ }
81
+
82
+ &:hover {
83
+ transition-delay: var(--tooltip-hover-delay, .5s)
84
+ }
85
+ }
86
+
51
87
  /* Top alignment */
52
88
  :where(.tooltip.top) {
53
89
  position-area: top;
@@ -43,10 +43,11 @@
43
43
 
44
44
  /* Ghost */
45
45
  :where(.ghost) {
46
+ color: var(--color-content-neutral, oklch(43.9% 0 0));
46
47
  background-color: transparent;
47
48
 
48
49
  &:hover {
49
- background-color: var(--color-field-surface, color-mix(oklch(20.5% 0 0) 10%, transparent))
50
+ background-color: color-mix(in oklch, var(--color-field-surface, oklch(37.1% 0 0)) 50%, transparent)
50
51
  }
51
52
  }
52
53
 
@@ -246,7 +247,7 @@
246
247
  padding: calc(var(--spacing, 0.25rem) * 4);
247
248
  font-family: var(--font-sans);
248
249
  font-size: initial;
249
- background-color: color-mix(var(--color-surface-1, oklch(97% 0 0)) 65%, transparent);
250
+ background-color: color-mix(in oklch, var(--color-surface-1, oklch(97% 0 0)) 65%, transparent);
250
251
  border: 0 none;
251
252
  border-radius: 0
252
253
  }
@@ -795,8 +795,19 @@ TailwindCompiler.prototype.addCriticalBlockingStylesSync = function () {
795
795
  }
796
796
 
797
797
  // 4. From computed styles (if :root is available)
798
+ // Run even while document.readyState === 'loading'. This method is the
799
+ // constructor's only origin-independent variable source: getComputedStyle
800
+ // reads the resolved cascade regardless of stylesheet origin, whereas
801
+ // method 3 (CSSOM cssRules) throws on cross-origin sheets (e.g. the CDN
802
+ // build at cdn.jsdelivr.net). The classic <script> blocks on preceding
803
+ // stylesheets, so :root variables are already resolved here. Skipping
804
+ // this during 'loading' meant a CDN-hosted page captured zero variables
805
+ // synchronously, so the critical "all colors" fallback never ran and
806
+ // variable-derived utilities (bg-line, border-line, …) fell back to
807
+ // currentColor — pure white in dark mode / black in light — until the
808
+ // async compile finished.
798
809
  try {
799
- if (document.documentElement && document.readyState !== 'loading') {
810
+ if (document.documentElement) {
800
811
  const rootStyles = getComputedStyle(document.documentElement);
801
812
  let computedVars = 0;
802
813
  for (let i = 0; i < rootStyles.length; i++) {
@@ -1021,8 +1032,13 @@ TailwindCompiler.prototype.generateSynchronousUtilities = function () {
1021
1032
  }
1022
1033
 
1023
1034
  // Method 3: Check computed styles from :root (if available)
1035
+ // Run even during readyState === 'loading' — getComputedStyle resolves
1036
+ // the cascade from cross-origin stylesheets (CDN builds) that the CSSOM
1037
+ // methods above cannot read. See addCriticalBlockingStylesSync for the
1038
+ // full rationale: without this, CDN-hosted pages capture no variables
1039
+ // synchronously and variable-derived utilities flash as currentColor.
1024
1040
  try {
1025
- if (document.readyState !== 'loading') {
1041
+ if (document.documentElement) {
1026
1042
  const rootStyles = getComputedStyle(document.documentElement);
1027
1043
  // Extract all CSS variables, not just color ones
1028
1044
  const allProps = rootStyles.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.121",
3
+ "version": "0.5.123",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",
@@ -37,6 +37,8 @@
37
37
  "release:all": "npm run release:run && npm run release:render && npm run release:types && npm run release:test && npm run release:export && npm run release:starter && npm run release",
38
38
  "prepublishOnly": "npm run build",
39
39
  "test": "vitest run",
40
+ "test:e2e": "node tests/e2e/payments.e2e.mjs",
41
+ "test:e2e:sdk": "node tests/e2e/payments.sdk.e2e.mjs",
40
42
  "lint": "echo 'No linting configured'"
41
43
  },
42
44
  "devDependencies": {