@enigmax/primitives 0.24.0 → 0.26.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/chunk-4SZ5N7BA.js +121 -0
- package/dist/chunk-EYZ366LP.js +189 -0
- package/dist/chunk-ISXB5RUH.js +380 -0
- package/dist/chunk-JJVZYW5C.js +946 -0
- package/dist/chunk-KVLSOQTI.js +66 -0
- package/dist/chunk-QIIV2QSV.js +108 -0
- package/dist/{chunk-QJJ34E4G.js → chunk-RMNXVWQ4.js} +32 -15
- package/dist/chunk-RUEQ3TGP.js +155 -0
- package/dist/clipboard-menu-BvXJCSFN.d.ts +93 -0
- package/dist/{color-OPV3BJV6.js → color-T63FLJNH.js} +183 -120
- package/dist/context-BfjYGPnH.d.ts +54 -0
- package/dist/{clipboard-menu-B_ouitfS.d.ts → context-menu-D3FtTn7v.d.ts} +1 -91
- package/dist/{index-ZPvlf9vs.d.ts → index-qXOkYQCU.d.ts} +4 -0
- package/dist/index.d.ts +266 -2
- package/dist/index.js +4 -2
- package/dist/menu-MSQSE6U5.js +54 -0
- package/dist/menu-PNQRTRNV.js +33 -0
- package/dist/next/index.d.ts +7 -3
- package/dist/next/index.js +11 -7
- package/dist/react/context-menu.d.ts +8 -54
- package/dist/react/image.d.ts +109 -0
- package/dist/react/image.js +3 -0
- package/dist/react/index.d.ts +8 -4
- package/dist/react/index.js +11 -7
- package/dist/react/input.d.ts +1 -1
- package/dist/react/input.js +2 -2
- package/dist/react/video.d.ts +120 -0
- package/dist/react/video.js +3 -0
- package/dist/react-router/index.d.ts +7 -3
- package/dist/react-router/index.js +11 -7
- package/dist/viewer-73LSE6RR.js +3 -0
- package/package.json +15 -2
- package/recipes/color/styles.css +20 -0
- package/recipes/image/styles.css +182 -0
- package/recipes/video/styles.css +154 -0
- package/registry.json +477 -3
- package/src/core/image-viewer.ts +222 -0
- package/src/core/player.ts +303 -0
- package/src/index.ts +52 -0
- package/src/react/image/icons.tsx +55 -0
- package/src/react/image/index.tsx +185 -0
- package/src/react/image/menu.tsx +76 -0
- package/src/react/image/styles.ts +213 -0
- package/src/react/image/types.ts +113 -0
- package/src/react/image/viewer.tsx +571 -0
- package/src/react/index.ts +3 -0
- package/src/react/input/color-styles.ts +20 -0
- package/src/react/input/color-swatch.tsx +96 -0
- package/src/react/input/color.tsx +84 -23
- package/src/react/input/index.tsx +27 -4
- package/src/react/input/types.ts +4 -0
- package/src/react/video/icons.tsx +135 -0
- package/src/react/video/index.tsx +724 -0
- package/src/react/video/menu.tsx +66 -0
- package/src/react/video/rail.tsx +99 -0
- package/src/react/video/styles.ts +161 -0
- package/src/react/video/types.ts +135 -0
- package/dist/chunk-S7EE57YB.js +0 -9
- /package/dist/{chunk-MSOCCQGH.js → chunk-T7I6WJSN.js} +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The video stylesheet.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED from src/react/video/styles.ts by scripts/sync-recipes.mjs - edit that file, not
|
|
5
|
+
* this one. It exists as a stylesheet as well as a string because the component injects it,
|
|
6
|
+
* and this is the same sheet for anyone who would rather import it, copy it with
|
|
7
|
+
* `enigma add video --copy`, or fork it outright.
|
|
8
|
+
*/
|
|
9
|
+
:root {
|
|
10
|
+
--enigma-video-accent: #3b82f6;
|
|
11
|
+
--enigma-video-bg: #000000;
|
|
12
|
+
--enigma-video-text: #ffffff;
|
|
13
|
+
--enigma-video-muted: rgba(255, 255, 255, 0.72);
|
|
14
|
+
--enigma-video-rail: rgba(255, 255, 255, 0.28);
|
|
15
|
+
--enigma-video-buffer: rgba(255, 255, 255, 0.45);
|
|
16
|
+
--enigma-video-panel-bg: rgba(23, 23, 23, 0.96);
|
|
17
|
+
--enigma-video-radius: 0.5rem;
|
|
18
|
+
--enigma-video-control-size: 2rem;
|
|
19
|
+
/* The icons are sized HERE and not in em of the bar's text: 1.25em of a 13px label is a
|
|
20
|
+
16px icon, and the same markup in a project with larger type silently grew a different
|
|
21
|
+
player. */
|
|
22
|
+
--enigma-video-icon-size: 1.125rem;
|
|
23
|
+
--enigma-video-rail-height: 0.3125rem;
|
|
24
|
+
--enigma-video-rail-hover: 0.5rem;
|
|
25
|
+
--enigma-video-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-enigma-video] {
|
|
29
|
+
position: relative; display: block; width: 100%; overflow: hidden;
|
|
30
|
+
background: var(--enigma-video-bg); border-radius: var(--enigma-video-radius);
|
|
31
|
+
color: var(--enigma-video-text);
|
|
32
|
+
font-size: 0.8125rem; line-height: 1;
|
|
33
|
+
}
|
|
34
|
+
[data-enigma-video] video { display: block; width: 100%; height: 100%; }
|
|
35
|
+
/* Fullscreen needs no sizing of its own: the UA stylesheet pins the fullscreen element to the
|
|
36
|
+
screen with !important, which outranks anything a page or this sheet can say, and a video
|
|
37
|
+
element already fits itself with object-fit: contain. Only the corner is ours. */
|
|
38
|
+
[data-enigma-video][data-fullscreen] { border-radius: 0; }
|
|
39
|
+
[data-enigma-video][data-hidden] { cursor: none; }
|
|
40
|
+
|
|
41
|
+
/* The big one, while nothing is playing. Plyr's shape: a filled circle over the poster,
|
|
42
|
+
large enough to be the obvious target on a phone. */
|
|
43
|
+
[data-enigma-video-big] {
|
|
44
|
+
position: absolute; inset: 0; margin: auto;
|
|
45
|
+
display: grid; place-items: center;
|
|
46
|
+
width: 3.75rem; height: 3.75rem; padding: 0;
|
|
47
|
+
color: var(--enigma-video-text); background: var(--enigma-video-accent);
|
|
48
|
+
border: 0; border-radius: 999px; box-shadow: var(--enigma-video-shadow);
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
[data-enigma-video-big]:focus-visible { outline: 2px solid var(--enigma-video-text); outline-offset: 3px; }
|
|
52
|
+
|
|
53
|
+
[data-enigma-video-overlay] { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
|
|
54
|
+
[data-enigma-video-overlay] > * { pointer-events: auto; }
|
|
55
|
+
|
|
56
|
+
[data-enigma-video-spinner] {
|
|
57
|
+
width: 2rem; height: 2rem;
|
|
58
|
+
border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: var(--enigma-video-text);
|
|
59
|
+
border-radius: 999px; animation: enigma-video-spin 700ms linear infinite;
|
|
60
|
+
}
|
|
61
|
+
@keyframes enigma-video-spin { to { rotate: 360deg; } }
|
|
62
|
+
@media (prefers-reduced-motion: reduce) {
|
|
63
|
+
[data-enigma-video-spinner] { animation-duration: 2s; }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[data-enigma-video-controls] {
|
|
67
|
+
position: absolute; inset-inline: 0; bottom: 0;
|
|
68
|
+
display: flex; align-items: center; gap: 0.375rem;
|
|
69
|
+
padding: 2.5rem 0.625rem 0.625rem;
|
|
70
|
+
background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
|
|
71
|
+
transition: opacity 180ms ease, translate 180ms ease;
|
|
72
|
+
}
|
|
73
|
+
[data-enigma-video][data-hidden] [data-enigma-video-controls] { opacity: 0; translate: 0 0.5rem; pointer-events: none; }
|
|
74
|
+
@media (prefers-reduced-motion: reduce) {
|
|
75
|
+
[data-enigma-video-controls] { transition: none; }
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-enigma-video-button] {
|
|
79
|
+
display: grid; place-items: center; flex: none;
|
|
80
|
+
width: var(--enigma-video-control-size); height: var(--enigma-video-control-size);
|
|
81
|
+
padding: 0; color: var(--enigma-video-text); background: none; border: 0; border-radius: 0.375rem;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
}
|
|
84
|
+
[data-enigma-video-button] svg { width: var(--enigma-video-icon-size); height: var(--enigma-video-icon-size); flex: none; }
|
|
85
|
+
[data-enigma-video-big] svg { width: 1.5rem; height: 1.5rem; }
|
|
86
|
+
[data-enigma-video-button]:hover { background: rgba(255, 255, 255, 0.16); }
|
|
87
|
+
[data-enigma-video-button]:focus-visible { outline: 2px solid var(--enigma-video-text); outline-offset: 1px; }
|
|
88
|
+
[data-enigma-video-button][aria-pressed="true"] { color: var(--enigma-video-accent); }
|
|
89
|
+
|
|
90
|
+
[data-enigma-video-time] { flex: none; color: var(--enigma-video-muted); font-variant-numeric: tabular-nums; }
|
|
91
|
+
|
|
92
|
+
/* The rail. Its hit area is the row, not the 5px line: a scrubber you have to hit exactly is
|
|
93
|
+
one people miss and then seek by accident. */
|
|
94
|
+
[data-enigma-video-rail] {
|
|
95
|
+
position: relative; flex: 1; min-width: 3rem; height: 1rem;
|
|
96
|
+
display: flex; align-items: center;
|
|
97
|
+
cursor: pointer; touch-action: none;
|
|
98
|
+
}
|
|
99
|
+
[data-enigma-video-track] {
|
|
100
|
+
position: relative; width: 100%; height: var(--enigma-video-rail-height);
|
|
101
|
+
background: var(--enigma-video-rail); border-radius: 999px; overflow: hidden;
|
|
102
|
+
transition: height 120ms ease;
|
|
103
|
+
}
|
|
104
|
+
[data-enigma-video-rail]:hover [data-enigma-video-track],
|
|
105
|
+
[data-enigma-video-rail]:focus-visible [data-enigma-video-track] { height: var(--enigma-video-rail-hover); }
|
|
106
|
+
[data-enigma-video-rail]:focus-visible { outline: 2px solid var(--enigma-video-text); outline-offset: 2px; border-radius: 999px; }
|
|
107
|
+
[data-enigma-video-buffer] { position: absolute; inset-block: 0; left: 0; background: var(--enigma-video-buffer); }
|
|
108
|
+
[data-enigma-video-played] { position: absolute; inset-block: 0; left: 0; background: var(--enigma-video-accent); }
|
|
109
|
+
[data-enigma-video-knob] {
|
|
110
|
+
position: absolute; top: 50%; translate: -50% -50%;
|
|
111
|
+
width: 0.75rem; height: 0.75rem; border-radius: 999px;
|
|
112
|
+
background: var(--enigma-video-text); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* The volume rail folds away until the control is reached, which is what keeps a narrow
|
|
117
|
+
player from spending a third of its bar on something rarely touched. */
|
|
118
|
+
[data-enigma-video-volume] { display: flex; align-items: center; flex: none; }
|
|
119
|
+
[data-enigma-video-volume] [data-enigma-video-rail] {
|
|
120
|
+
width: 0; min-width: 0; opacity: 0; transition: width 140ms ease, opacity 140ms ease;
|
|
121
|
+
}
|
|
122
|
+
[data-enigma-video-volume]:hover [data-enigma-video-rail],
|
|
123
|
+
[data-enigma-video-volume]:focus-within [data-enigma-video-rail] { width: 4.5rem; min-width: 4.5rem; opacity: 1; }
|
|
124
|
+
|
|
125
|
+
[data-enigma-video-menu] { position: relative; flex: none; }
|
|
126
|
+
/* The panel opens upward, and the player CLIPS - it has to, or a rounded corner is not
|
|
127
|
+
rounded. So its height is bounded by the room above the button that opened it (measured, and
|
|
128
|
+
set inline) and what does not fit scrolls. Without this a speed list plus a language list is
|
|
129
|
+
a panel with its top cut off on any player under about 300px. */
|
|
130
|
+
[data-enigma-video-panel] {
|
|
131
|
+
position: absolute; right: 0; bottom: calc(100% + 0.5rem); z-index: 2;
|
|
132
|
+
box-sizing: border-box; min-width: 8.5rem; max-width: calc(100vw - 2rem); padding: 0.25rem;
|
|
133
|
+
max-height: 14rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
|
|
134
|
+
background: var(--enigma-video-panel-bg); border-radius: 0.5rem; box-shadow: var(--enigma-video-shadow);
|
|
135
|
+
}
|
|
136
|
+
[data-enigma-video-option] {
|
|
137
|
+
display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
|
|
138
|
+
width: 100%; padding: 0.4375rem 0.5rem;
|
|
139
|
+
color: var(--enigma-video-text); background: none; border: 0; border-radius: 0.375rem;
|
|
140
|
+
font: inherit; text-align: left; cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
[data-enigma-video-option]:hover { background: rgba(255, 255, 255, 0.12); }
|
|
143
|
+
[data-enigma-video-option][aria-checked="true"] { color: var(--enigma-video-accent); }
|
|
144
|
+
[data-enigma-video-option]:focus-visible { outline: 2px solid var(--enigma-video-text); outline-offset: -2px; }
|
|
145
|
+
/* Sticky because the panel scrolls: the language you are choosing between should still say
|
|
146
|
+
which list it belongs to when the speeds have scrolled past it. */
|
|
147
|
+
[data-enigma-video-heading] {
|
|
148
|
+
position: sticky; top: 0; z-index: 1; margin: 0;
|
|
149
|
+
padding: 0.375rem 0.5rem; color: var(--enigma-video-muted);
|
|
150
|
+
background: var(--enigma-video-panel-bg);
|
|
151
|
+
font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em;
|
|
152
|
+
}
|
|
153
|
+
[data-enigma-video-option] svg { width: 0.875rem; height: 0.875rem; flex: none; }
|
|
154
|
+
[data-enigma-video-option] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
package/registry.json
CHANGED
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
{
|
|
157
157
|
"name": "input",
|
|
158
158
|
"title": "Input, one field for every type",
|
|
159
|
-
"description": "A field you pass props to, typed by its `type`: password gets the reveal toggle, a generator, a strength meter and a breach check; search gets debouncing, ranking and a clear button; color gets a swatch and a picker panel - saturation square, hue and alpha rails, presets and the screen eyedropper - instead of the operating system popup; everything else is a plain field with native props. What each type needs is loaded when that type is used, so a form of text fields ships none of it.",
|
|
159
|
+
"description": "A field you pass props to, typed by its `type`: password gets the reveal toggle, a generator, a strength meter and a breach check; search gets debouncing, ranking and a clear button; color gets a swatch and a picker panel - saturation square, hue and alpha rails, an editable readout that prints the value as hex, rgb() or hsl(), presets and the screen eyedropper - instead of the operating system popup, and the swatch is there from the first frame rather than when the panel's code lands; everything else is a plain field with native props. What each type needs is loaded when that type is used, so a form of text fields ships none of it.",
|
|
160
160
|
"targets": [
|
|
161
161
|
"vanilla",
|
|
162
162
|
"astro",
|
|
@@ -279,6 +279,13 @@
|
|
|
279
279
|
"react"
|
|
280
280
|
]
|
|
281
281
|
},
|
|
282
|
+
{
|
|
283
|
+
"path": "src/react/input/color-swatch.tsx",
|
|
284
|
+
"dest": "input/color-swatch.tsx",
|
|
285
|
+
"targets": [
|
|
286
|
+
"react"
|
|
287
|
+
]
|
|
288
|
+
},
|
|
282
289
|
{
|
|
283
290
|
"path": "src/react/input/color.tsx",
|
|
284
291
|
"dest": "input/color.tsx",
|
|
@@ -289,7 +296,8 @@
|
|
|
289
296
|
"@/core/color": "./color-core",
|
|
290
297
|
"@/react/input/write-value": "./write-value",
|
|
291
298
|
"@/react/input/color-styles": "./color-styles",
|
|
292
|
-
"@/react/input/types": "./types"
|
|
299
|
+
"@/react/input/types": "./types",
|
|
300
|
+
"@/react/input/color-swatch": "./color-swatch"
|
|
293
301
|
}
|
|
294
302
|
},
|
|
295
303
|
{
|
|
@@ -325,7 +333,8 @@
|
|
|
325
333
|
"@/react/input/password": "./password",
|
|
326
334
|
"@/react/input/search": "./search",
|
|
327
335
|
"@/core/password": "./password-core",
|
|
328
|
-
"@/react/input/color": "./color"
|
|
336
|
+
"@/react/input/color": "./color",
|
|
337
|
+
"@/react/input/color-swatch": "./color-swatch"
|
|
329
338
|
}
|
|
330
339
|
},
|
|
331
340
|
{
|
|
@@ -1393,6 +1402,471 @@
|
|
|
1393
1402
|
"dependencies": {
|
|
1394
1403
|
"@github/relative-time-element": "^4.4.0"
|
|
1395
1404
|
}
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "image",
|
|
1408
|
+
"title": "Image, with the viewer a press on it opens",
|
|
1409
|
+
"description": "An image that opens into a lightbox: a press enlarges it and the picture flies out of the page into the viewer, the wheel zooms around the cursor, with a drag to pan, a pinch on touch, and the keyboard driving all of it. Everything else is a decision about the page it sits in, so it is off until asked for - the arrows and counter of a set, the strip of previews along the bottom, a three-dot menu that downloads the file, and a discard action that drops an image and moves to the next. The viewer is its own chunk, fetched on intent, and the menu another under that, so a page of images nobody enlarges downloads neither. It brings a theme: there is no useful unstyled lightbox.",
|
|
1410
|
+
"targets": [
|
|
1411
|
+
"react"
|
|
1412
|
+
],
|
|
1413
|
+
"entry": {
|
|
1414
|
+
"react": "@enigmax/primitives/react/image"
|
|
1415
|
+
},
|
|
1416
|
+
"exports": {
|
|
1417
|
+
"react": [
|
|
1418
|
+
"Image"
|
|
1419
|
+
]
|
|
1420
|
+
},
|
|
1421
|
+
"files": [
|
|
1422
|
+
{
|
|
1423
|
+
"path": "src/core/image-viewer.ts",
|
|
1424
|
+
"dest": "image/image-viewer.ts",
|
|
1425
|
+
"targets": [
|
|
1426
|
+
"react"
|
|
1427
|
+
]
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"path": "src/core/context-menu.ts",
|
|
1431
|
+
"dest": "image/context-menu.ts",
|
|
1432
|
+
"targets": [
|
|
1433
|
+
"react"
|
|
1434
|
+
],
|
|
1435
|
+
"rewrite": {
|
|
1436
|
+
"@/core/search": "./search-core",
|
|
1437
|
+
"@/core/keys": "./keys"
|
|
1438
|
+
}
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"path": "src/core/search.ts",
|
|
1442
|
+
"dest": "image/search-core.ts",
|
|
1443
|
+
"targets": [
|
|
1444
|
+
"react"
|
|
1445
|
+
]
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"path": "src/core/keys.ts",
|
|
1449
|
+
"dest": "image/keys.ts",
|
|
1450
|
+
"targets": [
|
|
1451
|
+
"react"
|
|
1452
|
+
]
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"path": "src/react/image/types.ts",
|
|
1456
|
+
"dest": "image/types.ts",
|
|
1457
|
+
"targets": [
|
|
1458
|
+
"react"
|
|
1459
|
+
],
|
|
1460
|
+
"rewrite": {
|
|
1461
|
+
"@/react/context-menu/context": "./context"
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"path": "src/react/image/icons.tsx",
|
|
1466
|
+
"dest": "image/icons.tsx",
|
|
1467
|
+
"targets": [
|
|
1468
|
+
"react"
|
|
1469
|
+
]
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
"path": "src/react/image/styles.ts",
|
|
1473
|
+
"dest": "image/styles.ts",
|
|
1474
|
+
"targets": [
|
|
1475
|
+
"react"
|
|
1476
|
+
]
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"path": "src/core/clipboard-menu.ts",
|
|
1480
|
+
"dest": "image/clipboard-menu.ts",
|
|
1481
|
+
"targets": [
|
|
1482
|
+
"react"
|
|
1483
|
+
],
|
|
1484
|
+
"rewrite": {
|
|
1485
|
+
"@/core/context-menu": "./context-menu",
|
|
1486
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"path": "src/react/slot.tsx",
|
|
1491
|
+
"dest": "image/slot.tsx",
|
|
1492
|
+
"targets": [
|
|
1493
|
+
"react"
|
|
1494
|
+
],
|
|
1495
|
+
"rewrite": {
|
|
1496
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1497
|
+
}
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
"path": "src/react/context-menu/styles.ts",
|
|
1501
|
+
"dest": "image/context-menu-styles.ts",
|
|
1502
|
+
"targets": [
|
|
1503
|
+
"react"
|
|
1504
|
+
],
|
|
1505
|
+
"rewrite": {
|
|
1506
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"path": "recipes/context-menu/styles.css",
|
|
1511
|
+
"dest": "image/context-menu-styles.css",
|
|
1512
|
+
"targets": [
|
|
1513
|
+
"react"
|
|
1514
|
+
],
|
|
1515
|
+
"style": "css",
|
|
1516
|
+
"rewrite": {
|
|
1517
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
"path": "src/react/context-menu/context.ts",
|
|
1522
|
+
"dest": "image/context.ts",
|
|
1523
|
+
"targets": [
|
|
1524
|
+
"react"
|
|
1525
|
+
],
|
|
1526
|
+
"rewrite": {
|
|
1527
|
+
"@/core/context-menu": "./context-menu",
|
|
1528
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
"path": "src/react/context-menu/root.tsx",
|
|
1533
|
+
"dest": "image/root.tsx",
|
|
1534
|
+
"targets": [
|
|
1535
|
+
"react"
|
|
1536
|
+
],
|
|
1537
|
+
"rewrite": {
|
|
1538
|
+
"@/core/context-menu": "./context-menu",
|
|
1539
|
+
"@/core/search": "./search-core",
|
|
1540
|
+
"@/core/keys": "./keys",
|
|
1541
|
+
"@/react/slot": "./slot",
|
|
1542
|
+
"@/react/context-menu/styles": "./context-menu-styles",
|
|
1543
|
+
"@/react/context-menu/context": "./context",
|
|
1544
|
+
"@/core/clipboard-menu": "./clipboard-menu"
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
"path": "src/react/context-menu/index.tsx",
|
|
1549
|
+
"dest": "image/context-menu-ui.tsx",
|
|
1550
|
+
"targets": [
|
|
1551
|
+
"react"
|
|
1552
|
+
],
|
|
1553
|
+
"rewrite": {
|
|
1554
|
+
"@/react/context-menu/root": "./root",
|
|
1555
|
+
"@/react/context-menu/context": "./context",
|
|
1556
|
+
"@/react/context-menu/styles": "./context-menu-styles",
|
|
1557
|
+
"@/core/context-menu": "./context-menu",
|
|
1558
|
+
"@/core/keys": "./keys",
|
|
1559
|
+
"@/core/clipboard-menu": "./clipboard-menu"
|
|
1560
|
+
}
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"path": "src/react/image/menu.tsx",
|
|
1564
|
+
"dest": "image/menu.tsx",
|
|
1565
|
+
"targets": [
|
|
1566
|
+
"react"
|
|
1567
|
+
],
|
|
1568
|
+
"rewrite": {
|
|
1569
|
+
"@/react/image/icons": "./icons",
|
|
1570
|
+
"@/react/image/types": "./types",
|
|
1571
|
+
"@/react/image/viewer": "./viewer",
|
|
1572
|
+
"@/core/image-viewer": "./image-viewer",
|
|
1573
|
+
"@/react/context-menu": "./context-menu-ui"
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
"path": "src/react/image/viewer.tsx",
|
|
1578
|
+
"dest": "image/viewer.tsx",
|
|
1579
|
+
"targets": [
|
|
1580
|
+
"react"
|
|
1581
|
+
],
|
|
1582
|
+
"rewrite": {
|
|
1583
|
+
"@/react/image/icons": "./icons",
|
|
1584
|
+
"@/react/image/types": "./types",
|
|
1585
|
+
"@/react/image/styles": "./styles",
|
|
1586
|
+
"@/react/image/menu": "./menu",
|
|
1587
|
+
"@/core/image-viewer": "./image-viewer"
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"path": "src/react/image/index.tsx",
|
|
1592
|
+
"dest": "image/index.tsx",
|
|
1593
|
+
"main": true,
|
|
1594
|
+
"targets": [
|
|
1595
|
+
"react"
|
|
1596
|
+
],
|
|
1597
|
+
"rewrite": {
|
|
1598
|
+
"@/react/image/types": "./types",
|
|
1599
|
+
"@/react/image/viewer": "./viewer",
|
|
1600
|
+
"@/react/image/styles": "./styles"
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"path": "recipes/image/styles.css",
|
|
1605
|
+
"dest": "image/styles.css",
|
|
1606
|
+
"targets": [
|
|
1607
|
+
"react"
|
|
1608
|
+
],
|
|
1609
|
+
"style": "css"
|
|
1610
|
+
}
|
|
1611
|
+
],
|
|
1612
|
+
"styles": true,
|
|
1613
|
+
"themeHooks": [
|
|
1614
|
+
"[data-enigma-image]",
|
|
1615
|
+
"[data-enigma-image][data-clickable]",
|
|
1616
|
+
"[data-enigma-image-trigger]",
|
|
1617
|
+
"[data-enigma-image-viewer]",
|
|
1618
|
+
"[data-enigma-image-bar]",
|
|
1619
|
+
"[data-enigma-image-counter]",
|
|
1620
|
+
"[data-enigma-image-button]",
|
|
1621
|
+
"[data-enigma-image-frame]",
|
|
1622
|
+
"[data-enigma-image-frame][data-zoomed]",
|
|
1623
|
+
"[data-enigma-image-frame][data-panning]",
|
|
1624
|
+
"[data-enigma-image-frame][data-loading]",
|
|
1625
|
+
"[data-enigma-image-nav]",
|
|
1626
|
+
"[data-enigma-image-spinner]",
|
|
1627
|
+
"[data-enigma-image-foot]",
|
|
1628
|
+
"[data-enigma-image-caption]",
|
|
1629
|
+
"[data-enigma-image-strip]",
|
|
1630
|
+
"[data-enigma-image-thumb]",
|
|
1631
|
+
"[data-enigma-image-viewer][data-state]",
|
|
1632
|
+
"[data-enigma-image-frame][data-flying]"
|
|
1633
|
+
],
|
|
1634
|
+
"docs": "docs/notes/primitives.md#image",
|
|
1635
|
+
"recipes": [
|
|
1636
|
+
"css"
|
|
1637
|
+
]
|
|
1638
|
+
},
|
|
1639
|
+
{
|
|
1640
|
+
"name": "video",
|
|
1641
|
+
"title": "Video player",
|
|
1642
|
+
"description": "A video with the controls a video is expected to have, shaped after Plyr: a big play button over the poster, a scrubber showing what is buffered, current time and duration, volume that folds away until reached, subtitles with a language picker, a speed menu, picture in picture, casting to a TV and fullscreen. A right-click opens a menu the way YouTube's does - play, loop, speed, subtitles, copy the link or the link at this second - built from the context-menu primitive rather than hand-rolled. The keyboard is the platform's - space and K play, J and L jump ten seconds, the arrows nudge and set the volume, M mutes, F is fullscreen, C captions, a digit seeks to that tenth - and it stands down inside anything that takes text. The bar fades while playing and comes back on the first pointer move. The element stays the source of truth: playback, the subtitle list and the cast target are all read back from it rather than kept twice.",
|
|
1643
|
+
"targets": [
|
|
1644
|
+
"react"
|
|
1645
|
+
],
|
|
1646
|
+
"entry": {
|
|
1647
|
+
"react": "@enigmax/primitives/react/video"
|
|
1648
|
+
},
|
|
1649
|
+
"exports": {
|
|
1650
|
+
"react": [
|
|
1651
|
+
"Video"
|
|
1652
|
+
]
|
|
1653
|
+
},
|
|
1654
|
+
"files": [
|
|
1655
|
+
{
|
|
1656
|
+
"path": "src/core/context-menu.ts",
|
|
1657
|
+
"dest": "video/context-menu.ts",
|
|
1658
|
+
"targets": [
|
|
1659
|
+
"react"
|
|
1660
|
+
],
|
|
1661
|
+
"rewrite": {
|
|
1662
|
+
"@/core/search": "./search-core",
|
|
1663
|
+
"@/core/keys": "./keys"
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
"path": "src/core/search.ts",
|
|
1668
|
+
"dest": "video/search-core.ts",
|
|
1669
|
+
"targets": [
|
|
1670
|
+
"react"
|
|
1671
|
+
]
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"path": "src/core/keys.ts",
|
|
1675
|
+
"dest": "video/keys.ts",
|
|
1676
|
+
"targets": [
|
|
1677
|
+
"react"
|
|
1678
|
+
]
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
"path": "src/core/clipboard-menu.ts",
|
|
1682
|
+
"dest": "video/clipboard-menu.ts",
|
|
1683
|
+
"targets": [
|
|
1684
|
+
"react"
|
|
1685
|
+
],
|
|
1686
|
+
"rewrite": {
|
|
1687
|
+
"@/core/context-menu": "./context-menu",
|
|
1688
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1689
|
+
}
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
"path": "src/react/slot.tsx",
|
|
1693
|
+
"dest": "video/slot.tsx",
|
|
1694
|
+
"targets": [
|
|
1695
|
+
"react"
|
|
1696
|
+
],
|
|
1697
|
+
"rewrite": {
|
|
1698
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1699
|
+
}
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
"path": "src/react/context-menu/styles.ts",
|
|
1703
|
+
"dest": "video/context-menu-styles.ts",
|
|
1704
|
+
"targets": [
|
|
1705
|
+
"react"
|
|
1706
|
+
],
|
|
1707
|
+
"rewrite": {
|
|
1708
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
"path": "recipes/context-menu/styles.css",
|
|
1713
|
+
"dest": "video/context-menu-styles.css",
|
|
1714
|
+
"targets": [
|
|
1715
|
+
"react"
|
|
1716
|
+
],
|
|
1717
|
+
"style": "css",
|
|
1718
|
+
"rewrite": {
|
|
1719
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"path": "src/react/context-menu/context.ts",
|
|
1724
|
+
"dest": "video/context.ts",
|
|
1725
|
+
"targets": [
|
|
1726
|
+
"react"
|
|
1727
|
+
],
|
|
1728
|
+
"rewrite": {
|
|
1729
|
+
"@/core/context-menu": "./context-menu",
|
|
1730
|
+
"@/react/context-menu/styles": "./context-menu-styles"
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
"path": "src/react/context-menu/root.tsx",
|
|
1735
|
+
"dest": "video/root.tsx",
|
|
1736
|
+
"targets": [
|
|
1737
|
+
"react"
|
|
1738
|
+
],
|
|
1739
|
+
"rewrite": {
|
|
1740
|
+
"@/core/context-menu": "./context-menu",
|
|
1741
|
+
"@/core/search": "./search-core",
|
|
1742
|
+
"@/core/keys": "./keys",
|
|
1743
|
+
"@/react/slot": "./slot",
|
|
1744
|
+
"@/react/context-menu/styles": "./context-menu-styles",
|
|
1745
|
+
"@/react/context-menu/context": "./context",
|
|
1746
|
+
"@/core/clipboard-menu": "./clipboard-menu"
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
"path": "src/react/context-menu/index.tsx",
|
|
1751
|
+
"dest": "video/context-menu-ui.tsx",
|
|
1752
|
+
"targets": [
|
|
1753
|
+
"react"
|
|
1754
|
+
],
|
|
1755
|
+
"rewrite": {
|
|
1756
|
+
"@/react/context-menu/root": "./root",
|
|
1757
|
+
"@/react/context-menu/context": "./context",
|
|
1758
|
+
"@/react/context-menu/styles": "./context-menu-styles",
|
|
1759
|
+
"@/core/context-menu": "./context-menu",
|
|
1760
|
+
"@/core/keys": "./keys",
|
|
1761
|
+
"@/core/clipboard-menu": "./clipboard-menu"
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"path": "src/core/player.ts",
|
|
1766
|
+
"dest": "video/player.ts",
|
|
1767
|
+
"targets": [
|
|
1768
|
+
"react"
|
|
1769
|
+
]
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"path": "src/react/video/types.ts",
|
|
1773
|
+
"dest": "video/types.ts",
|
|
1774
|
+
"targets": [
|
|
1775
|
+
"react"
|
|
1776
|
+
],
|
|
1777
|
+
"rewrite": {
|
|
1778
|
+
"@/react/context-menu/context": "./context"
|
|
1779
|
+
}
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"path": "src/react/video/icons.tsx",
|
|
1783
|
+
"dest": "video/icons.tsx",
|
|
1784
|
+
"targets": [
|
|
1785
|
+
"react"
|
|
1786
|
+
]
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
"path": "src/react/video/styles.ts",
|
|
1790
|
+
"dest": "video/styles.ts",
|
|
1791
|
+
"targets": [
|
|
1792
|
+
"react"
|
|
1793
|
+
]
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
"path": "src/react/video/rail.tsx",
|
|
1797
|
+
"dest": "video/rail.tsx",
|
|
1798
|
+
"targets": [
|
|
1799
|
+
"react"
|
|
1800
|
+
],
|
|
1801
|
+
"rewrite": {
|
|
1802
|
+
"@/core/player": "./player"
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"path": "src/react/video/menu.tsx",
|
|
1807
|
+
"dest": "video/menu.tsx",
|
|
1808
|
+
"targets": [
|
|
1809
|
+
"react"
|
|
1810
|
+
],
|
|
1811
|
+
"rewrite": {
|
|
1812
|
+
"@/core/context-menu": "./context-menu",
|
|
1813
|
+
"@/react/context-menu": "./context-menu-ui"
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"path": "src/react/video/index.tsx",
|
|
1818
|
+
"dest": "video/index.tsx",
|
|
1819
|
+
"main": true,
|
|
1820
|
+
"targets": [
|
|
1821
|
+
"react"
|
|
1822
|
+
],
|
|
1823
|
+
"rewrite": {
|
|
1824
|
+
"@/core/player": "./player",
|
|
1825
|
+
"@/react/video/icons": "./icons",
|
|
1826
|
+
"@/react/video/rail": "./rail",
|
|
1827
|
+
"@/react/video/styles": "./styles",
|
|
1828
|
+
"@/react/video/types": "./types",
|
|
1829
|
+
"@/react/context-menu/context": "./context",
|
|
1830
|
+
"@/react/video/menu": "./menu"
|
|
1831
|
+
}
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"path": "recipes/video/styles.css",
|
|
1835
|
+
"dest": "video/styles.css",
|
|
1836
|
+
"targets": [
|
|
1837
|
+
"react"
|
|
1838
|
+
],
|
|
1839
|
+
"style": "css"
|
|
1840
|
+
}
|
|
1841
|
+
],
|
|
1842
|
+
"styles": true,
|
|
1843
|
+
"themeHooks": [
|
|
1844
|
+
"[data-enigma-video]",
|
|
1845
|
+
"[data-enigma-video][data-playing]",
|
|
1846
|
+
"[data-enigma-video][data-hidden]",
|
|
1847
|
+
"[data-enigma-video][data-fullscreen]",
|
|
1848
|
+
"[data-enigma-video-big]",
|
|
1849
|
+
"[data-enigma-video-overlay]",
|
|
1850
|
+
"[data-enigma-video-spinner]",
|
|
1851
|
+
"[data-enigma-video-controls]",
|
|
1852
|
+
"[data-enigma-video-button]",
|
|
1853
|
+
"[data-enigma-video-time]",
|
|
1854
|
+
"[data-enigma-video-rail]",
|
|
1855
|
+
"[data-enigma-video-track]",
|
|
1856
|
+
"[data-enigma-video-buffer]",
|
|
1857
|
+
"[data-enigma-video-played]",
|
|
1858
|
+
"[data-enigma-video-knob]",
|
|
1859
|
+
"[data-enigma-video-volume]",
|
|
1860
|
+
"[data-enigma-video-menu]",
|
|
1861
|
+
"[data-enigma-video-panel]",
|
|
1862
|
+
"[data-enigma-video-option]",
|
|
1863
|
+
"[data-enigma-video-heading]",
|
|
1864
|
+
"[data-enigma-video][data-casting]"
|
|
1865
|
+
],
|
|
1866
|
+
"docs": "docs/notes/primitives.md#video",
|
|
1867
|
+
"recipes": [
|
|
1868
|
+
"css"
|
|
1869
|
+
]
|
|
1396
1870
|
}
|
|
1397
1871
|
]
|
|
1398
1872
|
}
|