@avocadostudio-ai/preview-adapter 0.21.0 → 0.21.1

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/styles.css +17 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avocadostudio-ai/preview-adapter",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "src/styles.css"
38
38
  ],
39
39
  "dependencies": {
40
- "@avocadostudio-ai/shared": "^0.21.0"
40
+ "@avocadostudio-ai/shared": "^0.21.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "next": ">=15.0.0",
package/src/styles.css CHANGED
@@ -140,8 +140,11 @@
140
140
  /* Scope the typing shimmer to the fields actually being edited (.editor-live-typing
141
141
  is only added to text targets, never images), so it doesn't wash the whole block —
142
142
  including the hero image, which looked like it was being regenerated. */
143
- .editor-live-draft-active .editor-live-typing:not([class*="absolute"]):not([class*="fixed"]) {
143
+ :where(.editor-live-draft-active .editor-live-typing:not([class*="absolute"]):not([class*="fixed"])) {
144
144
  position: relative;
145
+ }
146
+
147
+ .editor-live-draft-active .editor-live-typing:not([class*="absolute"]):not([class*="fixed"]) {
145
148
  overflow: hidden;
146
149
  }
147
150
 
@@ -861,7 +864,18 @@ body:has(.aifx-shimmer-overlay) > .aifx-page-shimmer::before {
861
864
  transform: none;
862
865
  }
863
866
 
864
- [data-editor-active] .editor-selectable [data-editable-label]:not([class*="absolute"]):not([class*="fixed"]) {
867
+ /*
868
+ * `position: relative` anchors the field pills, and it has to lose to anything
869
+ * the site says. Written plainly this selector was (0,5,0), which beats almost
870
+ * any site rule, and the only guard was a Tailwind class-name match. So the
871
+ * full-width hero's background image — `.hero--full-width .hero__bg-image
872
+ * { position: absolute }` in the blocks package, no Tailwind class on it —
873
+ * went back into the section's flex row. It pushed the headline off the right
874
+ * edge of every editor preview while the public page rendered correctly.
875
+ * Inside `:where()` the rule has no specificity, so it only applies to elements
876
+ * the site left static, which are the only ones that need it.
877
+ */
878
+ :where([data-editor-active] .editor-selectable [data-editable-label]:not([class*="absolute"]):not([class*="fixed"])) {
865
879
  position: relative;
866
880
  }
867
881
 
@@ -870,7 +884,7 @@ body:has(.aifx-shimmer-overlay) > .aifx-page-shimmer::before {
870
884
  display: none;
871
885
  }
872
886
 
873
- .editor-highlight [data-editable-target]:not([class*="absolute"]):not([class*="fixed"]) {
887
+ :where(.editor-highlight [data-editable-target]:not([class*="absolute"]):not([class*="fixed"])) {
874
888
  position: relative;
875
889
  }
876
890