@avocadostudio-ai/preview-adapter 0.15.0 → 0.17.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.
- package/package.json +2 -2
- package/src/styles.css +41 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avocadostudio-ai/preview-adapter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
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.
|
|
40
|
+
"@avocadostudio-ai/shared": "^0.17.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"next": ">=15.0.0",
|
package/src/styles.css
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
[data-editor-active] .editor-selectable {
|
|
2
|
+
/*
|
|
3
|
+
* Four states, four colours. They used to be one: hover, selection and
|
|
4
|
+
* field-level highlight were all 37, 99, 235, separated only by a dashed
|
|
5
|
+
* vs solid border. On a full-bleed section at 2px that distinction is
|
|
6
|
+
* invisible, so a selected hero and a hovered one looked identical, and a
|
|
7
|
+
* hovered field drew a second blue box inside the first one meaning
|
|
8
|
+
* something else entirely.
|
|
9
|
+
*
|
|
10
|
+
* Blue is the block, amber is the field. Weight says whether it is picked or
|
|
11
|
+
* merely under the cursor. (Red is already spoken for — the delete button
|
|
12
|
+
* has carried its own `#991b1b` hover since before this.)
|
|
13
|
+
*/
|
|
2
14
|
--editor-accent-rgb: 37, 99, 235;
|
|
3
|
-
--editor-selected-rgb: 37, 99, 235;
|
|
15
|
+
--editor-selected-rgb: 37, 99, 235; /* this block is picked */
|
|
16
|
+
--editor-hover-rgb: 96, 165, 250; /* this block is under the cursor */
|
|
17
|
+
/* A field inside the picked block. Dark enough to carry white label text
|
|
18
|
+
(#b45309 on white is 4.6:1; the amber-600 below is 2.9:1 and is only
|
|
19
|
+
ever a fill). */
|
|
20
|
+
--editor-field-rgb: 180, 83, 9;
|
|
4
21
|
--editor-selected-border-width: 2px;
|
|
5
22
|
--editor-focus-rgb: 217, 119, 6;
|
|
6
23
|
--editor-accent-strong: rgb(var(--editor-accent-rgb));
|
|
@@ -39,9 +56,10 @@
|
|
|
39
56
|
[data-editor-selection-mode] .editor-selectable:hover::before {
|
|
40
57
|
opacity: 1;
|
|
41
58
|
inset: 0;
|
|
42
|
-
/* Hover is a dashed
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
/* Hover is a dashed outline in the lighter blue, so it differs from the
|
|
60
|
+
solid selection outline in both weight and hue — "preview, not picked"
|
|
61
|
+
has to survive being read at a glance on a full-bleed section. */
|
|
62
|
+
border: var(--editor-selected-border-width) dashed rgba(var(--editor-hover-rgb), 0.85);
|
|
45
63
|
background: none;
|
|
46
64
|
mix-blend-mode: normal;
|
|
47
65
|
}
|
|
@@ -52,7 +70,7 @@
|
|
|
52
70
|
top: 4px;
|
|
53
71
|
left: 4px;
|
|
54
72
|
right: auto;
|
|
55
|
-
background: rgba(var(--editor-
|
|
73
|
+
background: rgba(var(--editor-hover-rgb), 0.9);
|
|
56
74
|
color: #f8fafc;
|
|
57
75
|
border: 0;
|
|
58
76
|
border-radius: 6px;
|
|
@@ -86,7 +104,7 @@
|
|
|
86
104
|
|
|
87
105
|
.editor-block-badge-label {
|
|
88
106
|
position: static;
|
|
89
|
-
background: rgba(var(--editor-
|
|
107
|
+
background: rgba(var(--editor-hover-rgb), 0.9);
|
|
90
108
|
color: #f8fafc;
|
|
91
109
|
border-radius: 6px;
|
|
92
110
|
padding: 4px 8px;
|
|
@@ -101,12 +119,12 @@
|
|
|
101
119
|
}
|
|
102
120
|
|
|
103
121
|
[data-editor-selection-mode] .editor-selectable:hover > .editor-block-badge .editor-block-badge-label {
|
|
104
|
-
background: rgba(var(--editor-
|
|
122
|
+
background: rgba(var(--editor-hover-rgb), 0.97);
|
|
105
123
|
}
|
|
106
124
|
|
|
107
125
|
[data-editor-selection-mode] .editor-selectable:hover::after {
|
|
108
126
|
opacity: 1;
|
|
109
|
-
background: rgba(var(--editor-
|
|
127
|
+
background: rgba(var(--editor-hover-rgb), 0.97);
|
|
110
128
|
}
|
|
111
129
|
|
|
112
130
|
[data-editor-active] .editor-highlight {
|
|
@@ -354,6 +372,9 @@
|
|
|
354
372
|
opacity: 1;
|
|
355
373
|
inset: 0;
|
|
356
374
|
border: var(--editor-selected-border-width) solid rgb(var(--editor-selected-rgb));
|
|
375
|
+
/* The ring is what separates "picked" from "hovered" at arm's length —
|
|
376
|
+
the 2px border alone reads the same on a section this wide. */
|
|
377
|
+
box-shadow: 0 0 0 4px rgba(var(--editor-selected-rgb), 0.15);
|
|
357
378
|
background: none;
|
|
358
379
|
mix-blend-mode: normal;
|
|
359
380
|
}
|
|
@@ -363,8 +384,8 @@
|
|
|
363
384
|
}
|
|
364
385
|
|
|
365
386
|
@keyframes aifx-border-pulse {
|
|
366
|
-
0%, 100% { box-shadow: 0 0 0
|
|
367
|
-
50% { box-shadow: 0 0 0 4px rgba(var(--editor-selected-rgb), 0.
|
|
387
|
+
0%, 100% { box-shadow: 0 0 0 4px rgba(var(--editor-selected-rgb), 0.15); }
|
|
388
|
+
50% { box-shadow: 0 0 0 4px rgba(var(--editor-selected-rgb), 0.15), 0 0 0 9px rgba(var(--editor-selected-rgb), 0.28); }
|
|
368
389
|
}
|
|
369
390
|
|
|
370
391
|
/* Prevent double-thick border between adjacent highlighted/hovered blocks */
|
|
@@ -808,9 +829,16 @@
|
|
|
808
829
|
position: relative;
|
|
809
830
|
}
|
|
810
831
|
|
|
832
|
+
/*
|
|
833
|
+
* Amber, not blue. A hovered field used to draw a blue box inside the
|
|
834
|
+
* selected block's blue box — two rectangles, same hue, same weight, two
|
|
835
|
+
* completely different scopes. Amber is already what inline editing uses
|
|
836
|
+
* below, so this reads as the same "you are pointing at a field" family at
|
|
837
|
+
* a lighter weight rather than as a new colour.
|
|
838
|
+
*/
|
|
811
839
|
.editor-highlight [data-editable-target]:not(.btn-primary):not(.btn-secondary):hover {
|
|
812
|
-
box-shadow: inset 0 0 0 1.5px rgba(var(--editor-
|
|
813
|
-
background: rgba(var(--editor-
|
|
840
|
+
box-shadow: inset 0 0 0 1.5px rgba(var(--editor-field-rgb), 0.55);
|
|
841
|
+
background: rgba(var(--editor-field-rgb), 0.06);
|
|
814
842
|
}
|
|
815
843
|
|
|
816
844
|
.editor-highlight [data-editable-target].editor-inline-editing {
|
|
@@ -826,7 +854,7 @@
|
|
|
826
854
|
left: 4px;
|
|
827
855
|
right: auto;
|
|
828
856
|
transform: translateY(calc(-100% - 4px));
|
|
829
|
-
background: rgba(var(--editor-
|
|
857
|
+
background: rgba(var(--editor-field-rgb), 0.95);
|
|
830
858
|
color: #f8fafc;
|
|
831
859
|
border-radius: 8px 8px 0 0;
|
|
832
860
|
padding: 6px 10px;
|