@atomic-ui/ui 0.1.7 → 0.3.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/README.md +82 -95
- package/custom-elements.json +25364 -0
- package/dist/base/FieldElement.d.ts +11 -0
- package/dist/base/ImpktElement.d.ts +14 -0
- package/dist/base/locale.d.ts +8 -0
- package/dist/base/say.d.ts +1 -0
- package/dist/base/scroll-lock.d.ts +2 -0
- package/dist/base/styles.d.ts +25 -6
- package/dist/base/tokens.d.ts +5 -1
- package/dist/chunk-2YRTFWW2.js +26 -0
- package/dist/chunk-2YRTFWW2.js.map +1 -0
- package/dist/{chunk-X7IPZPTG.js → chunk-37PA72FC.js} +34 -19
- package/dist/chunk-37PA72FC.js.map +1 -0
- package/dist/chunk-3IGNZTJU.js +14 -0
- package/dist/chunk-3IGNZTJU.js.map +1 -0
- package/dist/{chunk-NTNXHLTM.js → chunk-3KO55PZK.js} +47 -2
- package/dist/chunk-3KO55PZK.js.map +1 -0
- package/dist/chunk-3RE4H2XO.js +53 -0
- package/dist/chunk-3RE4H2XO.js.map +1 -0
- package/dist/{chunk-5EA4IDUD.js → chunk-46BYUQ5A.js} +2 -2
- package/dist/{chunk-WECSVHIM.js → chunk-4OYHT4BN.js} +7 -3
- package/dist/chunk-4OYHT4BN.js.map +1 -0
- package/dist/{chunk-4HU4Y23Q.js → chunk-55DK75QF.js} +6 -4
- package/dist/chunk-55DK75QF.js.map +1 -0
- package/dist/{chunk-XVKEM5JY.js → chunk-5QSTXIPG.js} +2 -2
- package/dist/{chunk-QCNT7D5V.js → chunk-7P4Z4CLK.js} +63 -20
- package/dist/chunk-7P4Z4CLK.js.map +1 -0
- package/dist/{chunk-GSCVG2ER.js → chunk-APJ5JGRW.js} +3 -3
- package/dist/chunk-AUVIOU5G.js +522 -0
- package/dist/chunk-AUVIOU5G.js.map +1 -0
- package/dist/{chunk-6ICOJPMD.js → chunk-CUUBAETM.js} +4 -3
- package/dist/chunk-CUUBAETM.js.map +1 -0
- package/dist/{chunk-NQKYHILD.js → chunk-DAH7RLW3.js} +3 -3
- package/dist/{chunk-OB7LC6NJ.js → chunk-DJEZW7AC.js} +2 -2
- package/dist/{chunk-XJP45LFA.js → chunk-DKZ425AM.js} +15 -5
- package/dist/chunk-DKZ425AM.js.map +1 -0
- package/dist/{chunk-GO2IBRFP.js → chunk-F4YQWKK2.js} +7 -4
- package/dist/chunk-F4YQWKK2.js.map +1 -0
- package/dist/chunk-FVCM4WHD.js +328 -0
- package/dist/chunk-FVCM4WHD.js.map +1 -0
- package/dist/chunk-GBRML4RF.js +264 -0
- package/dist/chunk-GBRML4RF.js.map +1 -0
- package/dist/{chunk-ZQJD4YEJ.js → chunk-HXINWP3V.js} +42 -13
- package/dist/chunk-HXINWP3V.js.map +1 -0
- package/dist/{chunk-T6L3USBZ.js → chunk-IOBSIAHB.js} +23 -11
- package/dist/chunk-IOBSIAHB.js.map +1 -0
- package/dist/{chunk-7Y6UCSUS.js → chunk-IZOTGWWI.js} +5 -5
- package/dist/chunk-IZOTGWWI.js.map +1 -0
- package/dist/{chunk-MLVUMCQ2.js → chunk-J2FACXYI.js} +14 -5
- package/dist/chunk-J2FACXYI.js.map +1 -0
- package/dist/{chunk-VTFCTWSX.js → chunk-KKJEEKL2.js} +33 -7
- package/dist/chunk-KKJEEKL2.js.map +1 -0
- package/dist/{chunk-HWWA27DN.js → chunk-KMCGX76Y.js} +2 -2
- package/dist/{chunk-2YQA3VBY.js → chunk-NKMVICB5.js} +4 -2
- package/dist/chunk-NKMVICB5.js.map +1 -0
- package/dist/{chunk-ZBLTU67D.js → chunk-OFLMG6RN.js} +15 -11
- package/dist/chunk-OFLMG6RN.js.map +1 -0
- package/dist/{chunk-CMAU4DSB.js → chunk-P6GDMZK4.js} +5 -5
- package/dist/chunk-P6GDMZK4.js.map +1 -0
- package/dist/{chunk-MOEMFL4K.js → chunk-PO6FCAIS.js} +5 -5
- package/dist/chunk-PO6FCAIS.js.map +1 -0
- package/dist/chunk-PWLZFGS3.js +494 -0
- package/dist/chunk-PWLZFGS3.js.map +1 -0
- package/dist/chunk-QJIB36DM.js +249 -0
- package/dist/chunk-QJIB36DM.js.map +1 -0
- package/dist/{chunk-TPF4MOMF.js → chunk-R7FKGFW6.js} +7 -4
- package/dist/chunk-R7FKGFW6.js.map +1 -0
- package/dist/{chunk-ZGAOMRYD.js → chunk-RWWRTURA.js} +3 -3
- package/dist/{chunk-QDNI54ON.js → chunk-RYBY35QE.js} +10 -8
- package/dist/chunk-RYBY35QE.js.map +1 -0
- package/dist/chunk-S7F5VKWU.js +453 -0
- package/dist/chunk-S7F5VKWU.js.map +1 -0
- package/dist/chunk-T5W3FDSF.js +396 -0
- package/dist/chunk-T5W3FDSF.js.map +1 -0
- package/dist/{chunk-BTGCUONV.js → chunk-TCXKZDMR.js} +2 -2
- package/dist/{chunk-C36CZRHK.js → chunk-WGPB3QQU.js} +43 -13
- package/dist/chunk-WGPB3QQU.js.map +1 -0
- package/dist/{chunk-G6OVKNL7.js → chunk-XPCU4KUY.js} +5 -4
- package/dist/chunk-XPCU4KUY.js.map +1 -0
- package/dist/chunk-YRYZUYY7.js +236 -0
- package/dist/chunk-YRYZUYY7.js.map +1 -0
- package/dist/{chunk-7BIQ3K6H.js → chunk-ZOTAAYO5.js} +12 -2
- package/dist/chunk-ZOTAAYO5.js.map +1 -0
- package/dist/components/accordion.js +2 -2
- package/dist/components/alert.js +2 -2
- package/dist/components/app-ui.d.ts +28 -12
- package/dist/components/app-ui.js +6 -4
- package/dist/components/blocks.d.ts +28 -2
- package/dist/components/blocks.js +3 -3
- package/dist/components/button.d.ts +7 -0
- package/dist/components/button.js +3 -3
- package/dist/components/changelog.d.ts +386 -0
- package/dist/components/changelog.js +25 -0
- package/dist/components/changelog.js.map +1 -0
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +3 -3
- package/dist/components/date-input.js +3 -3
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.js +3 -2
- package/dist/components/estimator.d.ts +246 -0
- package/dist/components/estimator.js +16 -0
- package/dist/components/estimator.js.map +1 -0
- package/dist/components/fieldset.js +2 -2
- package/dist/components/grid.js +2 -2
- package/dist/components/help.js +2 -2
- package/dist/components/icon.d.ts +2 -0
- package/dist/components/icon.js +2 -2
- package/dist/components/journey.d.ts +447 -0
- package/dist/components/journey.js +22 -0
- package/dist/components/journey.js.map +1 -0
- package/dist/components/layout.d.ts +24 -0
- package/dist/components/layout.js +2 -2
- package/dist/components/link.js +3 -3
- package/dist/components/list.d.ts +50 -0
- package/dist/components/list.js +8 -0
- package/dist/components/list.js.map +1 -0
- package/dist/components/marketing.d.ts +1 -1
- package/dist/components/marketing.js +3 -3
- package/dist/components/media.d.ts +10 -0
- package/dist/components/media.js +2 -2
- package/dist/components/navigation.d.ts +16 -0
- package/dist/components/navigation.js +3 -3
- package/dist/components/organisms.d.ts +13 -1
- package/dist/components/organisms.js +3 -3
- package/dist/components/page.js +2 -2
- package/dist/components/price.d.ts +1 -1
- package/dist/components/price.js +3 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/property.d.ts +1 -1
- package/dist/components/property.js +4 -3
- package/dist/components/radio-group.js +3 -3
- package/dist/components/scene.d.ts +138 -0
- package/dist/components/scene.js +8 -0
- package/dist/components/scene.js.map +1 -0
- package/dist/components/scrubber.d.ts +86 -0
- package/dist/components/scrubber.js +8 -0
- package/dist/components/scrubber.js.map +1 -0
- package/dist/components/select.js +3 -3
- package/dist/components/selling.d.ts +409 -0
- package/dist/components/selling.js +25 -0
- package/dist/components/selling.js.map +1 -0
- package/dist/components/site.d.ts +283 -0
- package/dist/components/site.js +20 -0
- package/dist/components/site.js.map +1 -0
- package/dist/components/summary-list.js +2 -2
- package/dist/components/table.d.ts +94 -2
- package/dist/components/table.js +4 -2
- package/dist/components/text-input.js +3 -3
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/textarea.js +3 -3
- package/dist/index.d.ts +10 -2
- package/dist/index.js +135 -55
- package/dist/standalone/atomic-ui.js +3134 -0
- package/dist/standalone/atomic-ui.js.map +7 -0
- package/dist/standalone/index.html +174 -0
- package/package.json +26 -7
- package/scripts/copy-to-product.mjs +52 -0
- package/specimen/index.html +174 -0
- package/dist/chunk-2YQA3VBY.js.map +0 -1
- package/dist/chunk-4HU4Y23Q.js.map +0 -1
- package/dist/chunk-6ICOJPMD.js.map +0 -1
- package/dist/chunk-7BIQ3K6H.js.map +0 -1
- package/dist/chunk-7Y6UCSUS.js.map +0 -1
- package/dist/chunk-C36CZRHK.js.map +0 -1
- package/dist/chunk-CMAU4DSB.js.map +0 -1
- package/dist/chunk-G6OVKNL7.js.map +0 -1
- package/dist/chunk-GO2IBRFP.js.map +0 -1
- package/dist/chunk-MLVUMCQ2.js.map +0 -1
- package/dist/chunk-MOEMFL4K.js.map +0 -1
- package/dist/chunk-NTNXHLTM.js.map +0 -1
- package/dist/chunk-QCNT7D5V.js.map +0 -1
- package/dist/chunk-QDNI54ON.js.map +0 -1
- package/dist/chunk-T6L3USBZ.js.map +0 -1
- package/dist/chunk-TPF4MOMF.js.map +0 -1
- package/dist/chunk-VTFCTWSX.js.map +0 -1
- package/dist/chunk-VWNBB7FW.js +0 -104
- package/dist/chunk-VWNBB7FW.js.map +0 -1
- package/dist/chunk-WECSVHIM.js.map +0 -1
- package/dist/chunk-X7IPZPTG.js.map +0 -1
- package/dist/chunk-XJP45LFA.js.map +0 -1
- package/dist/chunk-ZBLTU67D.js.map +0 -1
- package/dist/chunk-ZQJD4YEJ.js.map +0 -1
- /package/dist/{chunk-5EA4IDUD.js.map → chunk-46BYUQ5A.js.map} +0 -0
- /package/dist/{chunk-XVKEM5JY.js.map → chunk-5QSTXIPG.js.map} +0 -0
- /package/dist/{chunk-GSCVG2ER.js.map → chunk-APJ5JGRW.js.map} +0 -0
- /package/dist/{chunk-NQKYHILD.js.map → chunk-DAH7RLW3.js.map} +0 -0
- /package/dist/{chunk-OB7LC6NJ.js.map → chunk-DJEZW7AC.js.map} +0 -0
- /package/dist/{chunk-HWWA27DN.js.map → chunk-KMCGX76Y.js.map} +0 -0
- /package/dist/{chunk-ZGAOMRYD.js.map → chunk-RWWRTURA.js.map} +0 -0
- /package/dist/{chunk-BTGCUONV.js.map → chunk-TCXKZDMR.js.map} +0 -0
|
@@ -32,6 +32,15 @@ export declare class ImpktNav extends ImpktElement {
|
|
|
32
32
|
type: StringConstructor;
|
|
33
33
|
attribute: string;
|
|
34
34
|
};
|
|
35
|
+
menuLook: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
reflect: boolean;
|
|
38
|
+
attribute: string;
|
|
39
|
+
};
|
|
40
|
+
size: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
reflect: boolean;
|
|
43
|
+
};
|
|
35
44
|
align: {
|
|
36
45
|
type: StringConstructor;
|
|
37
46
|
reflect: boolean;
|
|
@@ -43,6 +52,13 @@ export declare class ImpktNav extends ImpktElement {
|
|
|
43
52
|
label: string;
|
|
44
53
|
/** The words on the button that opens the links on a narrow screen. */
|
|
45
54
|
menuText: string;
|
|
55
|
+
/**
|
|
56
|
+
* The Menu button: `button` with its words, or `icon`, a round button with
|
|
57
|
+
* only the icon, the words kept as its name for screen readers.
|
|
58
|
+
*/
|
|
59
|
+
menuLook: 'button' | 'icon';
|
|
60
|
+
/** `sm` sets the links a step smaller and closer, as a site header's are. */
|
|
61
|
+
size: 'md' | 'sm';
|
|
46
62
|
/** Where the links sit along the row. */
|
|
47
63
|
align: 'start' | 'center' | 'end';
|
|
48
64
|
/** Whether the menu is open on a narrow screen. Not a setting: it is the visitor's. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImpktBreadcrumbs,
|
|
3
3
|
ImpktNav
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-J2FACXYI.js";
|
|
5
|
+
import "../chunk-NKMVICB5.js";
|
|
6
|
+
import "../chunk-3KO55PZK.js";
|
|
7
7
|
export {
|
|
8
8
|
ImpktBreadcrumbs,
|
|
9
9
|
ImpktNav
|
|
@@ -211,6 +211,8 @@ export interface StepItem {
|
|
|
211
211
|
id?: string;
|
|
212
212
|
heading: string;
|
|
213
213
|
text?: string;
|
|
214
|
+
/** A short line above the heading, such as how long the step takes. */
|
|
215
|
+
meta?: string;
|
|
214
216
|
}
|
|
215
217
|
/**
|
|
216
218
|
* A process, in order, joined by a line: how buying a home works, what happens
|
|
@@ -231,6 +233,10 @@ export declare class ImpktSteps extends ImpktElement {
|
|
|
231
233
|
type: StringConstructor;
|
|
232
234
|
reflect: boolean;
|
|
233
235
|
};
|
|
236
|
+
look: {
|
|
237
|
+
type: StringConstructor;
|
|
238
|
+
reflect: boolean;
|
|
239
|
+
};
|
|
234
240
|
headingLevel: {
|
|
235
241
|
type: NumberConstructor;
|
|
236
242
|
attribute: string;
|
|
@@ -249,6 +255,12 @@ export declare class ImpktSteps extends ImpktElement {
|
|
|
249
255
|
items: StepItem[];
|
|
250
256
|
/** Across the page, or down it. Across becomes down on a narrow screen. */
|
|
251
257
|
orientation: 'horizontal' | 'vertical';
|
|
258
|
+
/**
|
|
259
|
+
* `numbered` joins numbered circles with a line. `ruled` gives each step a
|
|
260
|
+
* coloured rule along its top, in the brand's chart colours, as a project
|
|
261
|
+
* plan's phases are drawn. The steps are an ordered list either way.
|
|
262
|
+
*/
|
|
263
|
+
look: 'numbered' | 'ruled';
|
|
252
264
|
/** The level of each step's heading. One below the heading above the steps. */
|
|
253
265
|
headingLevel: 2 | 3 | 4;
|
|
254
266
|
spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
@@ -475,7 +487,7 @@ export declare class ImpktReviews extends ImpktElement {
|
|
|
475
487
|
*
|
|
476
488
|
* @category form
|
|
477
489
|
* @icon mail
|
|
478
|
-
* @fires impkt-submit - When a valid address is sent. The address is in detail.email.
|
|
490
|
+
* @fires {CustomEvent<{ email: string }>} impkt-submit - When a valid address is sent. The address is in detail.email.
|
|
479
491
|
*/
|
|
480
492
|
export declare class ImpktNewsletter extends ImpktElement {
|
|
481
493
|
static properties: {
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
ImpktReviews,
|
|
9
9
|
ImpktSteps,
|
|
10
10
|
gallerySpan
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-37PA72FC.js";
|
|
12
|
+
import "../chunk-NKMVICB5.js";
|
|
13
|
+
import "../chunk-3KO55PZK.js";
|
|
14
14
|
export {
|
|
15
15
|
ImpktCarousel,
|
|
16
16
|
ImpktCtaBanner,
|
package/dist/components/page.js
CHANGED
|
@@ -5,7 +5,7 @@ import { ImpktElement } from '../base/ImpktElement';
|
|
|
5
5
|
*
|
|
6
6
|
* This component exists because of a decision taken in the content model: a
|
|
7
7
|
* binding names a source and cannot compute
|
|
8
|
-
* ([ADR 0003](
|
|
8
|
+
* ([ADR 0003](https://github.com/matthill8286/strata/blob/main/docs/decisions/0003-binding-expressions.md)). The
|
|
9
9
|
* consequence is that formatting lives here, where the locale and the currency
|
|
10
10
|
* are known, rather than in authored content — so there is one place that
|
|
11
11
|
* decides what "£24.99" looks like, and nobody writes a format string into a
|
package/dist/components/price.js
CHANGED
|
@@ -25,7 +25,7 @@ export interface SitePlot {
|
|
|
25
25
|
*
|
|
26
26
|
* @category content
|
|
27
27
|
* @icon map
|
|
28
|
-
* @fires impkt-select - When a plot is chosen. The plot is in detail.plot.
|
|
28
|
+
* @fires {CustomEvent<{ plot: SitePlot }>} impkt-select - When a plot is chosen. The plot is in detail.plot.
|
|
29
29
|
*/
|
|
30
30
|
export declare class ImpktSitePlan extends ImpktElement {
|
|
31
31
|
static properties: {
|
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
ImpktSitePlan,
|
|
6
6
|
ImpktStickyBar,
|
|
7
7
|
monthlyPayment
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-OFLMG6RN.js";
|
|
9
|
+
import "../chunk-3IGNZTJU.js";
|
|
10
|
+
import "../chunk-NKMVICB5.js";
|
|
11
|
+
import "../chunk-3KO55PZK.js";
|
|
11
12
|
export {
|
|
12
13
|
ImpktBeforeAfter,
|
|
13
14
|
ImpktLocationCard,
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { type TemplateResult, type PropertyValues } from 'lit';
|
|
2
|
+
import { ImpktElement } from '../base/ImpktElement';
|
|
3
|
+
export type SceneDrive = 'view' | 'page' | 'loop' | 'scrubber';
|
|
4
|
+
export type SceneLayout = 'stage' | 'split';
|
|
5
|
+
/**
|
|
6
|
+
* A scene: a stage whose children move along a progress from 0 to 1.
|
|
7
|
+
*
|
|
8
|
+
* The children declare timelines in their `motion` block, and `@atomic-ui/motion`
|
|
9
|
+
* compiles them to keyframes. This element owns only the progress, and where it
|
|
10
|
+
* comes from is the `drive` (ADR 0027):
|
|
11
|
+
*
|
|
12
|
+
* - `view` — the scene's own passage through the viewport. The stage pins
|
|
13
|
+
* while the scene scrolls past, for `length` screens, or beside the content
|
|
14
|
+
* in the default slot when `layout` is `split`.
|
|
15
|
+
* - `page` — the scroll position of the whole page.
|
|
16
|
+
* - `loop` — time, over `duration` seconds, repeating. **It always shows a
|
|
17
|
+
* pause button**, because anything that moves on its own for more than five
|
|
18
|
+
* seconds must be pausable (WCAG 2.2.2), and a scene that could forget that
|
|
19
|
+
* is one the gate would have to catch on every page.
|
|
20
|
+
* - `scrubber` — an `impkt-scrubber` placed in the `controls` slot.
|
|
21
|
+
*
|
|
22
|
+
* Progress is published three ways: the `progress` property, the
|
|
23
|
+
* `--impkt-scene-progress` custom property on the host, and an
|
|
24
|
+
* `impkt-scene-progress` event. Engines with scroll-driven animations run `view`
|
|
25
|
+
* and `page` scenes natively, and the runtime ignores the event for them.
|
|
26
|
+
*
|
|
27
|
+
* Under reduced motion a `loop` does not start, and nothing pins: the stage
|
|
28
|
+
* and the content stack, so every state of the scene can be read in order.
|
|
29
|
+
*
|
|
30
|
+
* @category layout
|
|
31
|
+
* @icon layers
|
|
32
|
+
* @slot stage - What moves, layered one over another. Pinned while the scene plays,
|
|
33
|
+
* beside the content in `split` layout, after it, so the words are read first.
|
|
34
|
+
* @slot - Content that scrolls past the stage, such as chapters.
|
|
35
|
+
* @slot controls - An `impkt-scrubber`, for a scene driven by one.
|
|
36
|
+
* @fires {CustomEvent<{ progress: number }>} impkt-scene-progress - `{ progress }` whenever the progress changes.
|
|
37
|
+
*/
|
|
38
|
+
export declare class ImpktScene extends ImpktElement {
|
|
39
|
+
static properties: {
|
|
40
|
+
drive: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
reflect: boolean;
|
|
43
|
+
};
|
|
44
|
+
layout: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
reflect: boolean;
|
|
47
|
+
};
|
|
48
|
+
length: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
};
|
|
51
|
+
duration: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
};
|
|
54
|
+
label: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
};
|
|
57
|
+
progress: {
|
|
58
|
+
type: NumberConstructor;
|
|
59
|
+
};
|
|
60
|
+
controls: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
reflect: boolean;
|
|
63
|
+
};
|
|
64
|
+
bleed: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
reflect: boolean;
|
|
67
|
+
};
|
|
68
|
+
hideOn: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
reflect: boolean;
|
|
71
|
+
attribute: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/** Where the progress comes from. */
|
|
75
|
+
drive: 'view' | 'page' | 'loop' | 'scrubber';
|
|
76
|
+
/** `stage` pins one full-width stage; `split` pins it beside the content. */
|
|
77
|
+
layout: 'stage' | 'split';
|
|
78
|
+
/** How many screens of scrolling a `view` scene lasts, in `stage` layout. */
|
|
79
|
+
length: number;
|
|
80
|
+
/** Seconds per cycle of a `loop` scene. */
|
|
81
|
+
duration: number;
|
|
82
|
+
/** The scene's accessible name. Also names its pause button. */
|
|
83
|
+
label: string;
|
|
84
|
+
/** From 0 to 1. Set it to seek a `scrubber` scene, or where one starts. */
|
|
85
|
+
progress: number;
|
|
86
|
+
/**
|
|
87
|
+
* Where the controls sit: `below` the stage, or `over` its foot, floating
|
|
88
|
+
* on what it shows, as a video's do. Under reduced motion they sit below.
|
|
89
|
+
*/
|
|
90
|
+
controls: 'below' | 'over';
|
|
91
|
+
/** Run the stage to the window's edges, past the page's margins, as a hero drawn edge to edge does. */
|
|
92
|
+
bleed: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Leave it out on a phone, or on anything wider, for a picture drawn twice:
|
|
95
|
+
* once for a wide screen and once for a narrow one. Never both.
|
|
96
|
+
*/
|
|
97
|
+
hideOn: 'never' | 'phone' | 'wide';
|
|
98
|
+
/**
|
|
99
|
+
* Whether a loop is paused: the scene's own state, set by its pause button
|
|
100
|
+
* or by `pause()`. A plain field rather than a property, so it is never one
|
|
101
|
+
* of the settings an author is offered.
|
|
102
|
+
*/
|
|
103
|
+
private paused;
|
|
104
|
+
private frame;
|
|
105
|
+
private started;
|
|
106
|
+
private reduced;
|
|
107
|
+
private seekFrom;
|
|
108
|
+
private seekTo;
|
|
109
|
+
private seekStart;
|
|
110
|
+
private seekMs;
|
|
111
|
+
constructor();
|
|
112
|
+
static styles: import("lit").CSSResult[];
|
|
113
|
+
/** @ignore */
|
|
114
|
+
connectedCallback(): void;
|
|
115
|
+
/** @ignore */
|
|
116
|
+
disconnectedCallback(): void;
|
|
117
|
+
/** @ignore */
|
|
118
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
119
|
+
/**
|
|
120
|
+
* Move to a progress. With `ms`, ease there; without, jump. A scrubber seeks
|
|
121
|
+
* a scene to a named stop this way.
|
|
122
|
+
*/
|
|
123
|
+
seek(to: number, ms?: number): void;
|
|
124
|
+
private onScroll;
|
|
125
|
+
private schedule;
|
|
126
|
+
private tick;
|
|
127
|
+
private publish;
|
|
128
|
+
private setPaused;
|
|
129
|
+
private togglePause;
|
|
130
|
+
/** Stop a loop where it is, as its pause button does. An editor scrubbing the scene calls it. */
|
|
131
|
+
pause(): void;
|
|
132
|
+
render(): TemplateResult;
|
|
133
|
+
}
|
|
134
|
+
declare global {
|
|
135
|
+
interface HTMLElementTagNameMap {
|
|
136
|
+
'impkt-scene': ImpktScene;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { ImpktElement } from '../base/ImpktElement';
|
|
3
|
+
export interface ScrubberStop {
|
|
4
|
+
/** Where the stop sits on the scene's progress, from 0 to 1. */
|
|
5
|
+
at: number;
|
|
6
|
+
label: string;
|
|
7
|
+
/** A short code beside it in the graph look, such as a commit hash. */
|
|
8
|
+
meta?: string;
|
|
9
|
+
/** A line under the code in the graph look, such as a commit message. */
|
|
10
|
+
note?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The colour of the line up to this stop, in the graph look: a named tone,
|
|
13
|
+
* or 1 to 5 for the brand's chart colours, as a project's phases are drawn.
|
|
14
|
+
*/
|
|
15
|
+
tone?: 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | 1 | 2 | 3 | 4 | 5;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Drives the scene it sits in, by hand.
|
|
19
|
+
*
|
|
20
|
+
* Place it in an `impkt-scene`'s `controls` slot and set that scene's `drive`
|
|
21
|
+
* to `scrubber`. Dragging moves through the scene; a named stop seeks to it
|
|
22
|
+
* with an eased move rather than a cut, which is what makes the Commit-style
|
|
23
|
+
* "time travel" read as travel.
|
|
24
|
+
*
|
|
25
|
+
* **It is a native range input.** A slider built from divs has to recreate
|
|
26
|
+
* arrow keys, Page Up and Down, Home and End, the value announcement and touch
|
|
27
|
+
* handling, and every one of those is a place to get it wrong. The input
|
|
28
|
+
* already does all of it. The stops are buttons beside it, so a keyboard or
|
|
29
|
+
* switch user reaches each named moment in one action instead of nudging a
|
|
30
|
+
* thumb to find it (2.5.7, dragging movements).
|
|
31
|
+
*
|
|
32
|
+
* @category action
|
|
33
|
+
* @icon adjustments-horizontal
|
|
34
|
+
*/
|
|
35
|
+
export declare class ImpktScrubber extends ImpktElement {
|
|
36
|
+
static properties: {
|
|
37
|
+
label: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
stops: {
|
|
41
|
+
type: ArrayConstructor;
|
|
42
|
+
};
|
|
43
|
+
look: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
reflect: boolean;
|
|
46
|
+
};
|
|
47
|
+
hint: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
};
|
|
50
|
+
value: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
state: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/** The slider's accessible name. */
|
|
56
|
+
label: string;
|
|
57
|
+
stops: ScrubberStop[];
|
|
58
|
+
/**
|
|
59
|
+
* `buttons` lists the stops as buttons under the slider. `graph` draws them
|
|
60
|
+
* as commits on a line that fills in each stop's colour as it is dragged,
|
|
61
|
+
* with the current one's code and note beside it.
|
|
62
|
+
*/
|
|
63
|
+
look: 'buttons' | 'graph';
|
|
64
|
+
/** A word of help in the graph look, such as "drag to time-travel". */
|
|
65
|
+
hint: string;
|
|
66
|
+
value: number;
|
|
67
|
+
private scene;
|
|
68
|
+
constructor();
|
|
69
|
+
static styles: import("lit").CSSResult[];
|
|
70
|
+
/** @ignore */
|
|
71
|
+
connectedCallback(): void;
|
|
72
|
+
/** @ignore */
|
|
73
|
+
disconnectedCallback(): void;
|
|
74
|
+
private onProgress;
|
|
75
|
+
private onInput;
|
|
76
|
+
private goTo;
|
|
77
|
+
/** The stop nearest the current position, which the stop list marks as current. */
|
|
78
|
+
private nearest;
|
|
79
|
+
private renderGraph;
|
|
80
|
+
render(): TemplateResult;
|
|
81
|
+
}
|
|
82
|
+
declare global {
|
|
83
|
+
interface HTMLElementTagNameMap {
|
|
84
|
+
'impkt-scrubber': ImpktScrubber;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|