@fusion.dev/helix-headless 0.211.0 → 0.212.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/api.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/code-block/root/code-block-root.js +1 -2
- package/dist/device-screen/gesture.d.ts +13 -0
- package/dist/device-screen/gesture.js +3 -0
- package/dist/device-screen/index.d.ts +1 -0
- package/dist/device-screen/index.js +1 -0
- package/dist/device-screen/root/device-screen-root.d.ts +531 -0
- package/dist/device-screen/root/device-screen-root.js +869 -0
- package/dist/device-screen/turn.d.ts +41 -0
- package/dist/device-screen/turn.js +42 -0
- package/dist/element-events.generated.js +10 -0
- package/dist/graph/root/graph-root.js +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/map/root/map-root.js +1 -2
- package/dist/terminal/root/terminal-root.js +1 -2
- package/examples.json +1 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +978 -0
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +215 -0
- package/types/words.d.ts +94 -0
package/types/svelte.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ declare module 'svelte/elements' {
|
|
|
66
66
|
'helix-headless-date-picker': Helix<'helix-headless-date-picker'>
|
|
67
67
|
'helix-headless-description-list-item': Helix<'helix-headless-description-list-item'>
|
|
68
68
|
'helix-headless-description-list': Helix<'helix-headless-description-list'>
|
|
69
|
+
'helix-headless-device-screen': Helix<'helix-headless-device-screen'>
|
|
69
70
|
'helix-headless-dialog': Helix<'helix-headless-dialog'>
|
|
70
71
|
'helix-headless-divider': Helix<'helix-headless-divider'>
|
|
71
72
|
'helix-headless-donut-chart': Helix<'helix-headless-donut-chart'>
|
package/types/vue.d.ts
CHANGED
|
@@ -26,6 +26,14 @@ import type {
|
|
|
26
26
|
HelixCopyErrorEvent,
|
|
27
27
|
HelixCopyEvent,
|
|
28
28
|
HelixCreateEvent,
|
|
29
|
+
HelixDeviceButtonEvent,
|
|
30
|
+
HelixDeviceKeyEvent,
|
|
31
|
+
HelixDeviceScreenshotEvent,
|
|
32
|
+
HelixDeviceScrollEvent,
|
|
33
|
+
HelixDeviceSwipeEvent,
|
|
34
|
+
HelixDeviceTapEvent,
|
|
35
|
+
HelixDeviceTextEvent,
|
|
36
|
+
HelixDeviceTouchEvent,
|
|
29
37
|
HelixDismissEvent,
|
|
30
38
|
HelixEndEvent,
|
|
31
39
|
HelixExpandEvent,
|
|
@@ -76,6 +84,7 @@ import type {
|
|
|
76
84
|
HelixHeadlessDatePicker,
|
|
77
85
|
HelixHeadlessDescriptionList,
|
|
78
86
|
HelixHeadlessDescriptionListItem,
|
|
87
|
+
HelixHeadlessDeviceScreen,
|
|
79
88
|
HelixHeadlessDialog,
|
|
80
89
|
HelixHeadlessDivider,
|
|
81
90
|
HelixHeadlessDonutChart,
|
|
@@ -6240,6 +6249,192 @@ makes the list a named group. */
|
|
|
6240
6249
|
|
|
6241
6250
|
export type HelixHeadlessDescriptionListVueEvents = {};
|
|
6242
6251
|
|
|
6252
|
+
/** `HelixHeadlessDeviceScreen` component event */
|
|
6253
|
+
export type HelixHeadlessDeviceScreenElementEvent<E = Event> = TypedEvent<
|
|
6254
|
+
HelixHeadlessDeviceScreen,
|
|
6255
|
+
E
|
|
6256
|
+
>;
|
|
6257
|
+
/** `helix-device-button` event type */
|
|
6258
|
+
export type HelixHeadlessDeviceScreenHelixDeviceButtonElementEvent =
|
|
6259
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceButtonEvent>;
|
|
6260
|
+
/** `helix-device-key` event type */
|
|
6261
|
+
export type HelixHeadlessDeviceScreenHelixDeviceKeyElementEvent =
|
|
6262
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceKeyEvent>;
|
|
6263
|
+
/** `helix-device-screenshot` event type */
|
|
6264
|
+
export type HelixHeadlessDeviceScreenHelixDeviceScreenshotElementEvent =
|
|
6265
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceScreenshotEvent>;
|
|
6266
|
+
/** `helix-device-scroll` event type */
|
|
6267
|
+
export type HelixHeadlessDeviceScreenHelixDeviceScrollElementEvent =
|
|
6268
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceScrollEvent>;
|
|
6269
|
+
/** `helix-device-swipe` event type */
|
|
6270
|
+
export type HelixHeadlessDeviceScreenHelixDeviceSwipeElementEvent =
|
|
6271
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceSwipeEvent>;
|
|
6272
|
+
/** `helix-device-tap` event type */
|
|
6273
|
+
export type HelixHeadlessDeviceScreenHelixDeviceTapElementEvent =
|
|
6274
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceTapEvent>;
|
|
6275
|
+
/** `helix-device-text` event type */
|
|
6276
|
+
export type HelixHeadlessDeviceScreenHelixDeviceTextElementEvent =
|
|
6277
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceTextEvent>;
|
|
6278
|
+
/** `helix-device-touch` event type */
|
|
6279
|
+
export type HelixHeadlessDeviceScreenHelixDeviceTouchElementEvent =
|
|
6280
|
+
HelixHeadlessDeviceScreenElementEvent<HelixDeviceTouchEvent>;
|
|
6281
|
+
|
|
6282
|
+
export type HelixHeadlessDeviceScreenVueProps = {
|
|
6283
|
+
/** The Back button's label. */
|
|
6284
|
+
"back-label"?: (HelixHeadlessDeviceScreen["backLabel"]) | undefined;
|
|
6285
|
+
/** The Back button's label. */
|
|
6286
|
+
backLabel?: (HelixHeadlessDeviceScreen["backLabel"]) | undefined;
|
|
6287
|
+
/** Which hardware buttons to draw, as a list: `back`, `home`, `recents`,
|
|
6288
|
+
`power`, `volume`, `rotate`, `screenshot`, and `fullscreen`, or `none`.
|
|
6289
|
+
They are drawn in that order whatever order the list is in. Absent is
|
|
6290
|
+
`home screenshot`. `volume` draws Volume up and Volume down, and `rotate`
|
|
6291
|
+
draws Rotate left and Rotate right. */
|
|
6292
|
+
controls?: (HelixHeadlessDeviceScreen["controls"]) | undefined;
|
|
6293
|
+
/** The name of the toolbar of hardware buttons, read by screen readers. */
|
|
6294
|
+
"controls-label"?: (HelixHeadlessDeviceScreen["controlsLabel"]) | undefined;
|
|
6295
|
+
/** The name of the toolbar of hardware buttons, read by screen readers. */
|
|
6296
|
+
controlsLabel?: (HelixHeadlessDeviceScreen["controlsLabel"]) | undefined;
|
|
6297
|
+
/** Which side of the device the hardware buttons sit on. Absent and `top`
|
|
6298
|
+
are a row above it, `bottom` is a row below it, and `start` and `end` are
|
|
6299
|
+
a column beside it, as the Android Emulator draws its toolbar. The words
|
|
6300
|
+
are sides, as Carousel's are, and not the corners a map's controls take. */
|
|
6301
|
+
"controls-placement"?: (HelixHeadlessDeviceScreen["controlsPlacement"]) | undefined;
|
|
6302
|
+
/** Which side of the device the hardware buttons sit on. Absent and `top`
|
|
6303
|
+
are a row above it, `bottom` is a row below it, and `start` and `end` are
|
|
6304
|
+
a column beside it, as the Android Emulator draws its toolbar. The words
|
|
6305
|
+
are sides, as Carousel's are, and not the corners a map's controls take. */
|
|
6306
|
+
controlsPlacement?: (HelixHeadlessDeviceScreen["controlsPlacement"]) | undefined;
|
|
6307
|
+
/** The screen's name where `label` is empty and the host has no `aria-label`. */
|
|
6308
|
+
"fallback-label"?: (HelixHeadlessDeviceScreen["fallbackLabel"]) | undefined;
|
|
6309
|
+
/** The screen's name where `label` is empty and the host has no `aria-label`. */
|
|
6310
|
+
fallbackLabel?: (HelixHeadlessDeviceScreen["fallbackLabel"]) | undefined;
|
|
6311
|
+
/** Also sends key presses with Control, Command, or Alt held, which are left
|
|
6312
|
+
to the browser otherwise. For an app that owns its window. Command or
|
|
6313
|
+
Control with V pastes either way. */
|
|
6314
|
+
"forward-shortcuts"?: (HelixHeadlessDeviceScreen["forwardShortcuts"]) | undefined;
|
|
6315
|
+
/** Also sends key presses with Control, Command, or Alt held, which are left
|
|
6316
|
+
to the browser otherwise. For an app that owns its window. Command or
|
|
6317
|
+
Control with V pastes either way. */
|
|
6318
|
+
forwardShortcuts?: (HelixHeadlessDeviceScreen["forwardShortcuts"]) | undefined;
|
|
6319
|
+
/** The fullscreen button's label. */
|
|
6320
|
+
"fullscreen-label"?: (HelixHeadlessDeviceScreen["fullscreenLabel"]) | undefined;
|
|
6321
|
+
/** The fullscreen button's label. */
|
|
6322
|
+
fullscreenLabel?: (HelixHeadlessDeviceScreen["fullscreenLabel"]) | undefined;
|
|
6323
|
+
/** The Home button's label. */
|
|
6324
|
+
"home-label"?: (HelixHeadlessDeviceScreen["homeLabel"]) | undefined;
|
|
6325
|
+
/** The Home button's label. */
|
|
6326
|
+
homeLabel?: (HelixHeadlessDeviceScreen["homeLabel"]) | undefined;
|
|
6327
|
+
/** What a screen reader says about the keys when it reaches the screen,
|
|
6328
|
+
after its name. */
|
|
6329
|
+
"keys-hint-label"?: (HelixHeadlessDeviceScreen["keysHintLabel"]) | undefined;
|
|
6330
|
+
/** What a screen reader says about the keys when it reaches the screen,
|
|
6331
|
+
after its name. */
|
|
6332
|
+
keysHintLabel?: (HelixHeadlessDeviceScreen["keysHintLabel"]) | undefined;
|
|
6333
|
+
/** The device's name, read by screen readers as the screen's name, such as
|
|
6334
|
+
"iPhone 17 Pro". Name each device on a page with several. Required. */
|
|
6335
|
+
label?: (HelixHeadlessDeviceScreen["label"]) | undefined;
|
|
6336
|
+
/** Shows the `loading` slot over the screen, for a stream that is starting
|
|
6337
|
+
or has stopped. Screen readers hear `loading-label`. */
|
|
6338
|
+
loading?: (HelixHeadlessDeviceScreen["loading"]) | undefined;
|
|
6339
|
+
/** What the screen shows and screen readers hear while `loading` is set and nothing is in the `loading` slot. */
|
|
6340
|
+
"loading-label"?: (HelixHeadlessDeviceScreen["loadingLabel"]) | undefined;
|
|
6341
|
+
/** What the screen shows and screen readers hear while `loading` is set and nothing is in the `loading` slot. */
|
|
6342
|
+
loadingLabel?: (HelixHeadlessDeviceScreen["loadingLabel"]) | undefined;
|
|
6343
|
+
/** The Power button's label. */
|
|
6344
|
+
"power-label"?: (HelixHeadlessDeviceScreen["powerLabel"]) | undefined;
|
|
6345
|
+
/** The Power button's label. */
|
|
6346
|
+
powerLabel?: (HelixHeadlessDeviceScreen["powerLabel"]) | undefined;
|
|
6347
|
+
/** Shows the screen and sends nothing: no touches, scrolls, keys, or button
|
|
6348
|
+
presses. The screen is then a picture, out of the tab order, and the
|
|
6349
|
+
hardware buttons are off but for screenshot and fullscreen. Buttons of
|
|
6350
|
+
your own in the `controls` slot are yours to turn off. */
|
|
6351
|
+
readonly?: (HelixHeadlessDeviceScreen["readonly"]) | undefined;
|
|
6352
|
+
/** The Recent apps button's label. */
|
|
6353
|
+
"recents-label"?: (HelixHeadlessDeviceScreen["recentsLabel"]) | undefined;
|
|
6354
|
+
/** The Recent apps button's label. */
|
|
6355
|
+
recentsLabel?: (HelixHeadlessDeviceScreen["recentsLabel"]) | undefined;
|
|
6356
|
+
/** What a screen reader calls the screen in place of its role, after its
|
|
6357
|
+
name: "iPhone 17 Pro, screen". Empty leaves the role. */
|
|
6358
|
+
"role-label"?: (HelixHeadlessDeviceScreen["roleLabel"]) | undefined;
|
|
6359
|
+
/** What a screen reader calls the screen in place of its role, after its
|
|
6360
|
+
name: "iPhone 17 Pro, screen". Empty leaves the role. */
|
|
6361
|
+
roleLabel?: (HelixHeadlessDeviceScreen["roleLabel"]) | undefined;
|
|
6362
|
+
/** The Rotate left button's label. */
|
|
6363
|
+
"rotate-left-label"?: (HelixHeadlessDeviceScreen["rotateLeftLabel"]) | undefined;
|
|
6364
|
+
/** The Rotate left button's label. */
|
|
6365
|
+
rotateLeftLabel?: (HelixHeadlessDeviceScreen["rotateLeftLabel"]) | undefined;
|
|
6366
|
+
/** The Rotate right button's label. */
|
|
6367
|
+
"rotate-right-label"?: (HelixHeadlessDeviceScreen["rotateRightLabel"]) | undefined;
|
|
6368
|
+
/** The Rotate right button's label. */
|
|
6369
|
+
rotateRightLabel?: (HelixHeadlessDeviceScreen["rotateRightLabel"]) | undefined;
|
|
6370
|
+
/** How far to turn the picture clockwise, in degrees: `90`, `180`, or `270`.
|
|
6371
|
+
For a source that sends frames in the device's natural orientation while
|
|
6372
|
+
the device is turned. Every point is turned back, so events stay in the
|
|
6373
|
+
device's own orientation. A source whose frames turn with the device
|
|
6374
|
+
needs none. */
|
|
6375
|
+
rotation?: (HelixHeadlessDeviceScreen["rotation"]) | undefined;
|
|
6376
|
+
/** The screen's height in the units your device takes input in: points for
|
|
6377
|
+
the iOS Simulator, pixels for an Android device. Set with `screen-width`.
|
|
6378
|
+
Set alone, the width follows the stream's shape, and with neither, both
|
|
6379
|
+
are the stream's own size in pixels. */
|
|
6380
|
+
"screen-height"?: (HelixHeadlessDeviceScreen["screenHeight"] | `${number}`) | undefined;
|
|
6381
|
+
/** The screen's height in the units your device takes input in: points for
|
|
6382
|
+
the iOS Simulator, pixels for an Android device. Set with `screen-width`.
|
|
6383
|
+
Set alone, the width follows the stream's shape, and with neither, both
|
|
6384
|
+
are the stream's own size in pixels. */
|
|
6385
|
+
screenHeight?: (HelixHeadlessDeviceScreen["screenHeight"]) | undefined;
|
|
6386
|
+
/** The screenshot button's label. */
|
|
6387
|
+
"screenshot-label"?: (HelixHeadlessDeviceScreen["screenshotLabel"]) | undefined;
|
|
6388
|
+
/** The screenshot button's label. */
|
|
6389
|
+
screenshotLabel?: (HelixHeadlessDeviceScreen["screenshotLabel"]) | undefined;
|
|
6390
|
+
/** The screen's width in the units your device takes input in, as
|
|
6391
|
+
`screen-height` is. Set alone, the height follows the stream's shape. */
|
|
6392
|
+
"screen-width"?: (HelixHeadlessDeviceScreen["screenWidth"] | `${number}`) | undefined;
|
|
6393
|
+
/** The screen's width in the units your device takes input in, as
|
|
6394
|
+
`screen-height` is. Set alone, the height follows the stream's shape. */
|
|
6395
|
+
screenWidth?: (HelixHeadlessDeviceScreen["screenWidth"]) | undefined;
|
|
6396
|
+
/** The screen's outline. Absent is a rectangle with rounded corners;
|
|
6397
|
+
`square` has square corners, as on a phone with a Home button or a
|
|
6398
|
+
television, and `circle` is round, as on a round watch, and takes
|
|
6399
|
+
touches inside the circle only. */
|
|
6400
|
+
shape?: (HelixHeadlessDeviceScreen["shape"]) | undefined;
|
|
6401
|
+
/** Draws a ring under each finger on the screen, as the iOS Simulator's
|
|
6402
|
+
Show single touches does. Rings from `showTap()` and `showSwipe()` are
|
|
6403
|
+
drawn either way. */
|
|
6404
|
+
"show-touches"?: (HelixHeadlessDeviceScreen["showTouches"]) | undefined;
|
|
6405
|
+
/** Draws a ring under each finger on the screen, as the iOS Simulator's
|
|
6406
|
+
Show single touches does. Rings from `showTap()` and `showSwipe()` are
|
|
6407
|
+
drawn either way. */
|
|
6408
|
+
showTouches?: (HelixHeadlessDeviceScreen["showTouches"]) | undefined;
|
|
6409
|
+
/** The Volume down button's label. */
|
|
6410
|
+
"volume-down-label"?: (HelixHeadlessDeviceScreen["volumeDownLabel"]) | undefined;
|
|
6411
|
+
/** The Volume down button's label. */
|
|
6412
|
+
volumeDownLabel?: (HelixHeadlessDeviceScreen["volumeDownLabel"]) | undefined;
|
|
6413
|
+
/** The Volume up button's label. */
|
|
6414
|
+
"volume-up-label"?: (HelixHeadlessDeviceScreen["volumeUpLabel"]) | undefined;
|
|
6415
|
+
/** The Volume up button's label. */
|
|
6416
|
+
volumeUpLabel?: (HelixHeadlessDeviceScreen["volumeUpLabel"]) | undefined;
|
|
6417
|
+
};
|
|
6418
|
+
|
|
6419
|
+
export type HelixHeadlessDeviceScreenVueEvents = {
|
|
6420
|
+
/** A hardware button was pressed, with how long it was held. Press it on the device in response. */
|
|
6421
|
+
"helix-device-button": HelixHeadlessDeviceScreenHelixDeviceButtonElementEvent;
|
|
6422
|
+
/** A key went down or came up while the screen had focus. Press or release it on the device in response. */
|
|
6423
|
+
"helix-device-key": HelixHeadlessDeviceScreenHelixDeviceKeyElementEvent;
|
|
6424
|
+
/** A screenshot was asked for. Take one in response. */
|
|
6425
|
+
"helix-device-screenshot": HelixHeadlessDeviceScreenHelixDeviceScreenshotElementEvent;
|
|
6426
|
+
/** A wheel or a trackpad scrolled over the screen. Scroll the device in response. */
|
|
6427
|
+
"helix-device-scroll": HelixHeadlessDeviceScreenHelixDeviceScrollElementEvent;
|
|
6428
|
+
/** One finger moved across the screen and lifted. Swipe the device in response. */
|
|
6429
|
+
"helix-device-swipe": HelixHeadlessDeviceScreenHelixDeviceSwipeElementEvent;
|
|
6430
|
+
/** One finger touched the screen and lifted near where it landed. Tap the device in response. */
|
|
6431
|
+
"helix-device-tap": HelixHeadlessDeviceScreenHelixDeviceTapElementEvent;
|
|
6432
|
+
/** Text was pasted into the screen. Type it on the device in response. */
|
|
6433
|
+
"helix-device-text": HelixHeadlessDeviceScreenHelixDeviceTextElementEvent;
|
|
6434
|
+
/** A finger landed, moved, lifted, or was taken away. Touch the device in response. */
|
|
6435
|
+
"helix-device-touch": HelixHeadlessDeviceScreenHelixDeviceTouchElementEvent;
|
|
6436
|
+
};
|
|
6437
|
+
|
|
6243
6438
|
/** `HelixHeadlessDialog` component event */
|
|
6244
6439
|
export type HelixHeadlessDialogElementEvent<E = Event> = TypedEvent<
|
|
6245
6440
|
HelixHeadlessDialog,
|
|
@@ -20593,6 +20788,20 @@ export type CustomCssProperties = {
|
|
|
20593
20788
|
"--data-table-template"?: (string) | undefined;
|
|
20594
20789
|
/** How many month columns are drawn, capped at two. `--date-picker-columns` overrides it. */
|
|
20595
20790
|
"--date-picker-column-count"?: (string) | undefined;
|
|
20791
|
+
/** The drawn screen's width divided by its height, turned by `rotation`, as a number. Written by the frame once the screen's size is known. */
|
|
20792
|
+
"--device-screen-ratio"?: (string) | undefined;
|
|
20793
|
+
/** How far the picture is turned, as an angle. The frame writes it from `rotation`. */
|
|
20794
|
+
"--device-screen-rotation"?: (string) | undefined;
|
|
20795
|
+
/** How long a swipe's ring takes to travel, as a time. Written on each ring from `showSwipe()`. */
|
|
20796
|
+
"--device-screen-touch-duration"?: (string) | undefined;
|
|
20797
|
+
/** Where a swipe's ring travels to, across the screen, as a percentage. Written on each ring from `showSwipe()`. */
|
|
20798
|
+
"--device-screen-touch-to-x"?: (string) | undefined;
|
|
20799
|
+
/** Where a swipe's ring travels to, down the screen, as a percentage. Written on each ring from `showSwipe()`. */
|
|
20800
|
+
"--device-screen-touch-to-y"?: (string) | undefined;
|
|
20801
|
+
/** Where a ring is, across the screen, as a percentage. Written on each ring. */
|
|
20802
|
+
"--device-screen-touch-x"?: (string) | undefined;
|
|
20803
|
+
/** Where a ring is, down the screen, as a percentage. Written on each ring. */
|
|
20804
|
+
"--device-screen-touch-y"?: (string) | undefined;
|
|
20596
20805
|
/** How thick the ring is drawn, derived from `hole`. */
|
|
20597
20806
|
"--donut-chart-stroke"?: (string) | undefined;
|
|
20598
20807
|
/** How far a swipe, or a snap point, has moved the panel across, in pixels, toward the right. */
|
|
@@ -21069,6 +21278,12 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
21069
21278
|
HelixHeadlessDescriptionListVueProps,
|
|
21070
21279
|
HelixHeadlessDescriptionListVueEvents
|
|
21071
21280
|
>;
|
|
21281
|
+
/** Shows the screen of a phone, a tablet, or a watch, such as the iOS Simulator or the Android Emulator, and turns what you do on it into events. Helix does not connect to the device. Put the element that draws the stream inside: a '<video>' fed by WebRTC or Media Source, an '<img>' showing an MJPEG stream, or a '<canvas>' you draw decoded frames on. The frame gives the screen the device's shape and stretches the element to fill it. Set 'screen-width' and 'screen-height' to the screen's size in the units your device takes input in: points for the iOS Simulator, and pixels for an Android device. Every point an event carries is in those units, beside the 'width' and 'height' it is measured against. Without them, the frame reads the stream's own size in pixels. **Touches.** Listen in one of two ways, and not both, or the device moves twice: - 'helix-device-touch' for each finger as it lands, moves, and lifts, for a source that takes live touches. A drag and a pinch need it. - 'helix-device-tap' and 'helix-device-swipe' once the finger lifts, for a source that takes whole gestures. A long press is a tap with a long 'duration'. Alt, or Option on a Mac, with a drag sends two touches mirrored about the middle of the screen, for a pinch or a turn, as the iOS Simulator does. A wheel or a trackpad over the screen sends 'helix-device-scroll'. **Keyboard.** Press Tab to reach the screen, or press the screen. While it has focus: | Key | What it does | |---|---| | Any key | Sends 'helix-device-key' as it goes down, and again as it comes up. | | Tab, Shift with Tab | Moves focus on from the screen. Never sent. | | Control, Command, or Alt with a key | Left to the browser, unless 'forward-shortcuts' is set. | | Command or Control with V | Sends the clipboard's text as 'helix-device-text'. | A key still held when focus leaves is sent as released. The screen has the 'application' role, so a screen reader passes every key to it, and its description says how to leave. **Buttons.** 'controls' names the hardware buttons to draw: 'back', 'home', 'recents', 'power', 'volume', 'rotate', 'screenshot', and 'fullscreen', 'home screenshot' by default. Each sends 'helix-device-button' with how long it was held, and the screenshot button sends 'helix-device-screenshot'. 'press()' and 'screenshot()' do the same from a script. Put buttons of your own in the 'controls' slot, and they join the row. The row is one tab stop, and the arrow keys move along it, or Up and Down in a column. Set 'rotation' where your source sends frames in the device's natural orientation while the device is turned: the frame turns the picture, and turns every point back. Set 'readonly' to show the screen and send nothing, such as while an agent drives the device. The screen is then a picture, and 'showTap()' and 'showSwipe()' mark where the agent touched it. */
|
|
21282
|
+
"helix-headless-device-screen": DefineCustomElement<
|
|
21283
|
+
HelixHeadlessDeviceScreen,
|
|
21284
|
+
HelixHeadlessDeviceScreenVueProps,
|
|
21285
|
+
HelixHeadlessDeviceScreenVueEvents
|
|
21286
|
+
>;
|
|
21072
21287
|
/** Renders a native '<dialog>' opened with 'showModal()'. The platform provides: - the top layer, so the dialog is above everything whatever the 'z-index' - a backdrop - closing with Escape - an inert page behind the dialog, unreachable by pointer, keyboard, or virtual cursor The dialog adds one thing to those: 'Tab' from its last control goes to its first, and 'Shift+Tab' from its first to its last. A native modal lets 'Tab' past its last control out to the browser's own controls. 'open' calls 'showModal()', and every way the dialog closes goes through 'requestOpen'. A native dialog closes three ways: the property, Escape, and a '<form method="dialog">' submit. Routing all three through 'requestOpen' keeps your state in step, so the dialog never closes while your state still says it is open, which would leave it impossible to reopen. The dialog's name is 'label' when you set it. Otherwise it is the heading in the 'header' slot, or the elements an 'aria-labelledby' on the host names, and 'fallback-label' where nothing names it. While it is open, the page behind it does not scroll. The dialog is described by the words at the start of its body: the elements in the default slot before the first one that is or holds a control. A question above a form describes the dialog, and the form does not. A Helix component that draws words and no control, such as 'Text', counts as words. An 'aria-describedby' on the host replaces it. Set 'alert' for a dialog that interrupts to ask for an answer, such as a confirmation before a deletion. It is an 'alertdialog', which a screen reader announces with its description as it opens. Set 'dismissible' to draw a close control, labeled by 'dismiss-label'. **Keyboard.** Opening moves focus to the first control in the dialog. | Key | What it does | |---|---| | Tab, Shift+Tab | Moves through the controls in the dialog, from the last round to the first and from the first round to the last. | | Escape | Asks to close the dialog. A 'helix-before-close' listener can refuse, and 'persistent' or 'closedby="none"' keeps it open. | | Enter, Space | On the close control, closes the dialog. | Closing puts focus back on the element that had it before the dialog opened. */
|
|
21073
21288
|
"helix-headless-dialog": DefineCustomElement<
|
|
21074
21289
|
HelixHeadlessDialog,
|
package/types/words.d.ts
CHANGED
|
@@ -1461,6 +1461,100 @@ declare module '@fusion.dev/helix-core' {
|
|
|
1461
1461
|
*/
|
|
1462
1462
|
yearViewLabel: Message
|
|
1463
1463
|
}
|
|
1464
|
+
'helix-device-screen': {
|
|
1465
|
+
/**
|
|
1466
|
+
* The Back button's label.
|
|
1467
|
+
*
|
|
1468
|
+
* English: `Back`
|
|
1469
|
+
*/
|
|
1470
|
+
backLabel: Message
|
|
1471
|
+
/**
|
|
1472
|
+
* The name of the toolbar of hardware buttons, read by screen readers.
|
|
1473
|
+
*
|
|
1474
|
+
* English: `Device controls`
|
|
1475
|
+
*/
|
|
1476
|
+
controlsLabel: Message
|
|
1477
|
+
/**
|
|
1478
|
+
* The screen's name where `label` is empty and the host has no `aria-label`.
|
|
1479
|
+
*
|
|
1480
|
+
* English: `Device`
|
|
1481
|
+
*/
|
|
1482
|
+
fallbackLabel: Message
|
|
1483
|
+
/**
|
|
1484
|
+
* The fullscreen button's label.
|
|
1485
|
+
*
|
|
1486
|
+
* English: `Fill the screen`
|
|
1487
|
+
*/
|
|
1488
|
+
fullscreenLabel: Message
|
|
1489
|
+
/**
|
|
1490
|
+
* The Home button's label.
|
|
1491
|
+
*
|
|
1492
|
+
* English: `Home`
|
|
1493
|
+
*/
|
|
1494
|
+
homeLabel: Message
|
|
1495
|
+
/**
|
|
1496
|
+
* What a screen reader says about the keys when it reaches the screen,
|
|
1497
|
+
* after its name.
|
|
1498
|
+
*
|
|
1499
|
+
* English: `Keys you press go to the device. Press Tab to leave the screen.`
|
|
1500
|
+
*/
|
|
1501
|
+
keysHintLabel: Message
|
|
1502
|
+
/**
|
|
1503
|
+
* What the screen shows and screen readers hear while `loading` is set and nothing is in the `loading` slot.
|
|
1504
|
+
*
|
|
1505
|
+
* English: `Connecting to the device`
|
|
1506
|
+
*/
|
|
1507
|
+
loadingLabel: Message
|
|
1508
|
+
/**
|
|
1509
|
+
* The Power button's label.
|
|
1510
|
+
*
|
|
1511
|
+
* English: `Power`
|
|
1512
|
+
*/
|
|
1513
|
+
powerLabel: Message
|
|
1514
|
+
/**
|
|
1515
|
+
* The Recent apps button's label.
|
|
1516
|
+
*
|
|
1517
|
+
* English: `Recent apps`
|
|
1518
|
+
*/
|
|
1519
|
+
recentsLabel: Message
|
|
1520
|
+
/**
|
|
1521
|
+
* What a screen reader calls the screen in place of its role, after its
|
|
1522
|
+
* name: "iPhone 17 Pro, screen". Empty leaves the role.
|
|
1523
|
+
*
|
|
1524
|
+
* English: `screen`
|
|
1525
|
+
*/
|
|
1526
|
+
roleLabel: Message
|
|
1527
|
+
/**
|
|
1528
|
+
* The Rotate left button's label.
|
|
1529
|
+
*
|
|
1530
|
+
* English: `Rotate left`
|
|
1531
|
+
*/
|
|
1532
|
+
rotateLeftLabel: Message
|
|
1533
|
+
/**
|
|
1534
|
+
* The Rotate right button's label.
|
|
1535
|
+
*
|
|
1536
|
+
* English: `Rotate right`
|
|
1537
|
+
*/
|
|
1538
|
+
rotateRightLabel: Message
|
|
1539
|
+
/**
|
|
1540
|
+
* The screenshot button's label.
|
|
1541
|
+
*
|
|
1542
|
+
* English: `Take a screenshot`
|
|
1543
|
+
*/
|
|
1544
|
+
screenshotLabel: Message
|
|
1545
|
+
/**
|
|
1546
|
+
* The Volume down button's label.
|
|
1547
|
+
*
|
|
1548
|
+
* English: `Volume down`
|
|
1549
|
+
*/
|
|
1550
|
+
volumeDownLabel: Message
|
|
1551
|
+
/**
|
|
1552
|
+
* The Volume up button's label.
|
|
1553
|
+
*
|
|
1554
|
+
* English: `Volume up`
|
|
1555
|
+
*/
|
|
1556
|
+
volumeUpLabel: Message
|
|
1557
|
+
}
|
|
1464
1558
|
'helix-dialog': {
|
|
1465
1559
|
/**
|
|
1466
1560
|
* The close control's accessible name. Translate it with the rest of your
|