@motion-proto/live-tokens 0.30.0 → 0.32.0

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.
@@ -0,0 +1,18 @@
1
+ // Move a `position: fixed` overlay to <body> so it escapes any transformed /
2
+ // `isolation` / `contain` / scrolling ancestor that would otherwise clip it or
3
+ // trap its stacking order (the editor's `.content` pane is one such ancestor;
4
+ // consumer pages have countless others). Every shipped component that renders a
5
+ // fixed overlay uses this — see check-overlay-portal.
6
+ //
7
+ // `enabled` is read once, at mount: pass `false` to leave the node in flow
8
+ // (Dialog's `inline` preview). It is intentionally not reactive — every consumer
9
+ // sets it statically, so there is no move-it-back path to get wrong.
10
+
11
+ export function portal(node: HTMLElement, enabled = true) {
12
+ if (enabled) document.body.appendChild(node);
13
+ return {
14
+ destroy() {
15
+ if (enabled) node.remove();
16
+ },
17
+ };
18
+ }
@@ -415,15 +415,6 @@
415
415
  --border-width-20: 20px;
416
416
  --border-width-24: 24px;
417
417
 
418
- /* Icon sizing (square) */
419
- --size-icon-sm: 1rem; /* 16px */
420
- --size-icon-md: 1.25rem; /* 20px */
421
- --size-icon-lg: 1.5rem; /* 24px */
422
- --size-icon-xl: 2rem; /* 32px */
423
- --size-icon-2xl: 4rem; /* 64px */
424
- --size-icon-3xl: 6rem; /* 96px */
425
- --size-icon-4xl: 8rem; /* 128px */
426
-
427
418
  /* Spacing */
428
419
  --space-0: 0;
429
420
  --space-2: 0.125rem; /* 2px */