@unisim/sdk 0.189.0 → 0.190.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/dist/boxStyles.d.ts.map +1 -1
- package/dist/boxStyles.js +48 -16
- package/dist/boxStyles.js.map +1 -1
- package/package.json +1 -1
package/dist/boxStyles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boxStyles.d.ts","sourceRoot":"","sources":["../src/boxStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"boxStyles.d.ts","sourceRoot":"","sources":["../src/boxStyles.ts"],"names":[],"mappings":"AA4FA,qEAAqE;AACrE,eAAO,MAAM,YAAY,mBAAmB,CAAA;AAE5C;;;GAGG;AACH,eAAO,MAAM,OAAO,QAiKnB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,QAAQ,GAAG,SAAkE,GAAG,IAAI,CAMzH"}
|
package/dist/boxStyles.js
CHANGED
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
// A plain `.u-box` (no mark) is still right for layout.
|
|
20
20
|
//
|
|
21
21
|
// Next (`.u-box--next`) on an orbit or frame box: the one we want the
|
|
22
|
-
// user to go to. Its light
|
|
23
|
-
//
|
|
22
|
+
// user to go to. Its light runs along the top
|
|
23
|
+
// border and back, as a chip's arc sweeps (a
|
|
24
|
+
// conic ring on the orbit; the leading bracket
|
|
25
|
+
// stretches on a frame). One per screen.
|
|
24
26
|
//
|
|
25
27
|
// This file has no React import on purpose: `Box.tsx` is the component, and a
|
|
26
28
|
// page with no build step pastes BOX_CSS (as it does CHIP_CSS).
|
|
@@ -90,6 +92,8 @@ export const BOX_STYLE_ID = 'unisim-box-css';
|
|
|
90
92
|
* CSS; everything else lets `<Box>` inject it.
|
|
91
93
|
*/
|
|
92
94
|
export const BOX_CSS = `
|
|
95
|
+
@property --u-box-sweep { syntax: "<angle>"; inherits: false; initial-value: 24deg; }
|
|
96
|
+
@property --u-box-reach { syntax: "<length-percentage>"; inherits: false; initial-value: 0%; }
|
|
93
97
|
.u-box { ${decl(LIGHT)} }
|
|
94
98
|
[data-u-ground="dark"] .u-box, .dark .u-box, [data-theme="dark"] .u-box { ${decl(DARK)} }
|
|
95
99
|
.u-box[data-u-ground="light"] { ${decl(LIGHT)} }
|
|
@@ -193,32 +197,60 @@ export const BOX_CSS = `
|
|
|
193
197
|
}
|
|
194
198
|
.u-box--frame::after {
|
|
195
199
|
border: 3px solid var(--_b-accent);
|
|
196
|
-
-webkit-mask: linear-gradient(#000 0 0) top left / var(--_b-k) var(--_b-k) no-repeat;
|
|
197
|
-
mask: linear-gradient(#000 0 0) top left / var(--_b-k) var(--_b-k) no-repeat;
|
|
200
|
+
-webkit-mask: linear-gradient(#000 0 0) top left / max(var(--_b-k), var(--u-box-reach)) var(--_b-k) no-repeat;
|
|
201
|
+
mask: linear-gradient(#000 0 0) top left / max(var(--_b-k), var(--u-box-reach)) var(--_b-k) no-repeat;
|
|
198
202
|
}
|
|
199
203
|
/* Nothing in frame yet: all four corners muted. */
|
|
200
204
|
.u-box--frame.u-box--empty::after { display: none; }
|
|
201
205
|
|
|
202
|
-
/* ── Next: the box to go to; its light
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
/* ── Next: the box to go to; its light runs along the top and back ──
|
|
207
|
+
The chips' way: their arc is a conic gradient round the outline, and a
|
|
208
|
+
registered angle sweeps it further round. Here a second ring (the orbit
|
|
209
|
+
box's free ::after) carries that gradient from the leading edge, and
|
|
210
|
+
--u-box-sweep runs it along the top border to the far corner and back.
|
|
211
|
+
At rest the ring is invisible, so the box is every other box until the
|
|
212
|
+
light moves. A frame's leading bracket stretches along the top the same way
|
|
213
|
+
(--u-box-reach). Both are registered, so they animate. */
|
|
214
|
+
.u-box--orbit.u-box--next::after {
|
|
215
|
+
content: "";
|
|
216
|
+
position: absolute;
|
|
217
|
+
inset: -1px;
|
|
218
|
+
box-sizing: border-box;
|
|
219
|
+
border-radius: var(--_b-r);
|
|
220
|
+
padding: 3px;
|
|
221
|
+
background: conic-gradient(from 270deg,
|
|
222
|
+
transparent 0deg, var(--_b-accent) 22deg,
|
|
223
|
+
var(--_b-accent) var(--u-box-sweep), transparent calc(var(--u-box-sweep) + 34deg));
|
|
224
|
+
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
225
|
+
-webkit-mask-composite: xor;
|
|
226
|
+
mask-composite: exclude;
|
|
227
|
+
pointer-events: none;
|
|
228
|
+
animation: u-box-next 3s cubic-bezier(0.45, 0, 0.55, 1) infinite;
|
|
229
|
+
}
|
|
230
|
+
.u-box--orbit.u-box--row.u-box--next::after { padding: 2px; }
|
|
207
231
|
@keyframes u-box-next {
|
|
208
|
-
0%, 100% {
|
|
209
|
-
50% {
|
|
232
|
+
0%, 100% { --u-box-sweep: 24deg; opacity: 0; }
|
|
233
|
+
50% { --u-box-sweep: 132deg; opacity: 1; }
|
|
234
|
+
}
|
|
235
|
+
@keyframes u-box-next-frame {
|
|
236
|
+
0%, 100% { --u-box-reach: 0%; }
|
|
237
|
+
50% { --u-box-reach: 55%; }
|
|
238
|
+
}
|
|
239
|
+
.u-box--frame.u-box--next:not(.u-box--empty)::after { animation: u-box-next-frame 3s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
|
|
240
|
+
/* Under a real pointer, hover takes over: the ring steps aside for the arc's
|
|
241
|
+
own sweep, and the loop picks up again on leave. */
|
|
242
|
+
@media (hover: hover) {
|
|
243
|
+
a.u-box--orbit.u-box--next:hover::after, button.u-box--orbit.u-box--next:hover::after { animation: none; opacity: 0; }
|
|
210
244
|
}
|
|
211
|
-
.u-box--orbit.u-box--next::before,
|
|
212
|
-
.u-box--frame.u-box--next:not(.u-box--empty)::after { animation: u-box-next 2.4s ease-in-out infinite; }
|
|
213
245
|
|
|
214
246
|
/* The display rule above would otherwise beat the UA's [hidden] rule. */
|
|
215
247
|
.u-box[hidden] { display: none; }
|
|
216
248
|
|
|
217
249
|
@media (prefers-reduced-motion: reduce) {
|
|
218
250
|
.u-box--orbit::before { transition: none; }
|
|
219
|
-
/* No
|
|
220
|
-
.u-box--orbit.u-box--next::
|
|
221
|
-
.u-box--frame.u-box--next:not(.u-box--empty)::after { animation: none;
|
|
251
|
+
/* No loop; the light holds along the top, so the box still stands out. */
|
|
252
|
+
.u-box--orbit.u-box--next::after { animation: none; --u-box-sweep: 132deg; opacity: 1; }
|
|
253
|
+
.u-box--frame.u-box--next:not(.u-box--empty)::after { animation: none; --u-box-reach: 55%; }
|
|
222
254
|
}
|
|
223
255
|
`;
|
|
224
256
|
/**
|
package/dist/boxStyles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boxStyles.js","sourceRoot":"","sources":["../src/boxStyles.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,aAAa;AACb,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,gFAAgF;AAChF,yEAAyE;AACzE,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,6DAA6D;AAC7D,4EAA4E;AAC5E,gFAAgF;AAChF,0EAA0E;AAC1E,EAAE;AACF,wDAAwD;AACxD,EAAE;AACF,4EAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"boxStyles.js","sourceRoot":"","sources":["../src/boxStyles.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,aAAa;AACb,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,gFAAgF;AAChF,yEAAyE;AACzE,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,6DAA6D;AAC7D,4EAA4E;AAC5E,gFAAgF;AAChF,0EAA0E;AAC1E,EAAE;AACF,wDAAwD;AACxD,EAAE;AACF,4EAA4E;AA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