@wardic/dom 0.0.0-stage → 1.0.0-rc.2
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/LICENSE +21 -0
- package/README.md +8 -2
- package/THIRD_PARTY_NOTICES.md +145 -0
- package/dist/Appear.d.ts +24 -0
- package/dist/Appear.d.ts.map +1 -0
- package/dist/Appear.js +25 -0
- package/dist/Appear.js.map +1 -0
- package/dist/Color.d.ts +14 -0
- package/dist/Color.d.ts.map +1 -0
- package/dist/Color.js +16 -0
- package/dist/Color.js.map +1 -0
- package/dist/DomAnnouncer.d.ts +13 -0
- package/dist/DomAnnouncer.d.ts.map +1 -0
- package/dist/DomAnnouncer.js +14 -0
- package/dist/DomAnnouncer.js.map +1 -0
- package/dist/DomClock.d.ts +11 -0
- package/dist/DomClock.d.ts.map +1 -0
- package/dist/DomClock.js +12 -0
- package/dist/DomClock.js.map +1 -0
- package/dist/DomDefaultTransition.d.ts +12 -0
- package/dist/DomDefaultTransition.d.ts.map +1 -0
- package/dist/DomDefaultTransition.js +13 -0
- package/dist/DomDefaultTransition.js.map +1 -0
- package/dist/DomInput.d.ts +13 -0
- package/dist/DomInput.d.ts.map +1 -0
- package/dist/DomInput.js +15 -0
- package/dist/DomInput.js.map +1 -0
- package/dist/DomInterpolators.d.ts +13 -0
- package/dist/DomInterpolators.d.ts.map +1 -0
- package/dist/DomInterpolators.js +14 -0
- package/dist/DomInterpolators.js.map +1 -0
- package/dist/DomKeyRules.d.ts +13 -0
- package/dist/DomKeyRules.d.ts.map +1 -0
- package/dist/DomKeyRules.js +14 -0
- package/dist/DomKeyRules.js.map +1 -0
- package/dist/DomPositionalKeys.d.ts +13 -0
- package/dist/DomPositionalKeys.d.ts.map +1 -0
- package/dist/DomPositionalKeys.js +14 -0
- package/dist/DomPositionalKeys.js.map +1 -0
- package/dist/DomProbe.d.ts +13 -0
- package/dist/DomProbe.d.ts.map +1 -0
- package/dist/DomProbe.js +14 -0
- package/dist/DomProbe.js.map +1 -0
- package/dist/DomProjectionSystem.d.ts +28 -0
- package/dist/DomProjectionSystem.d.ts.map +1 -0
- package/dist/DomProjectionSystem.js +41 -0
- package/dist/DomProjectionSystem.js.map +1 -0
- package/dist/DomRenderer.d.ts +13 -0
- package/dist/DomRenderer.d.ts.map +1 -0
- package/dist/DomRenderer.js +15 -0
- package/dist/DomRenderer.js.map +1 -0
- package/dist/FlushGate.d.ts +48 -0
- package/dist/FlushGate.d.ts.map +1 -0
- package/dist/FlushGate.js +62 -0
- package/dist/FlushGate.js.map +1 -0
- package/dist/MeasuredPair.d.ts +14 -0
- package/dist/MeasuredPair.d.ts.map +1 -0
- package/dist/MeasuredPair.js +16 -0
- package/dist/MeasuredPair.js.map +1 -0
- package/dist/OwnValues.d.ts +14 -0
- package/dist/OwnValues.d.ts.map +1 -0
- package/dist/OwnValues.js +15 -0
- package/dist/OwnValues.js.map +1 -0
- package/dist/ProjectionSystem.d.ts +34 -0
- package/dist/ProjectionSystem.d.ts.map +1 -0
- package/dist/ProjectionSystem.js +29 -0
- package/dist/ProjectionSystem.js.map +1 -0
- package/dist/ReorderController.d.ts +41 -0
- package/dist/ReorderController.d.ts.map +1 -0
- package/dist/ReorderController.js +44 -0
- package/dist/ReorderController.js.map +1 -0
- package/dist/Report.d.ts +12 -0
- package/dist/Report.d.ts.map +1 -0
- package/dist/Report.js +13 -0
- package/dist/Report.js.map +1 -0
- package/dist/ScrollOffset.d.ts +34 -0
- package/dist/ScrollOffset.d.ts.map +1 -0
- package/dist/ScrollOffset.js +42 -0
- package/dist/ScrollOffset.js.map +1 -0
- package/dist/Style.d.ts +15 -0
- package/dist/Style.d.ts.map +1 -0
- package/dist/Style.js +17 -0
- package/dist/Style.js.map +1 -0
- package/dist/Svg.d.ts +13 -0
- package/dist/Svg.d.ts.map +1 -0
- package/dist/Svg.js +14 -0
- package/dist/Svg.js.map +1 -0
- package/dist/Variables.d.ts +13 -0
- package/dist/Variables.d.ts.map +1 -0
- package/dist/Variables.js +14 -0
- package/dist/Variables.js.map +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/announcer.d.ts +50 -0
- package/dist/internal/announcer.d.ts.map +1 -0
- package/dist/internal/announcer.js +115 -0
- package/dist/internal/announcer.js.map +1 -0
- package/dist/internal/appear.d.ts +169 -0
- package/dist/internal/appear.d.ts.map +1 -0
- package/dist/internal/appear.js +499 -0
- package/dist/internal/appear.js.map +1 -0
- package/dist/internal/auto-scroll.d.ts +24 -0
- package/dist/internal/auto-scroll.d.ts.map +1 -0
- package/dist/internal/auto-scroll.js +124 -0
- package/dist/internal/auto-scroll.js.map +1 -0
- package/dist/internal/clock.d.ts +19 -0
- package/dist/internal/clock.d.ts.map +1 -0
- package/dist/internal/clock.js +39 -0
- package/dist/internal/clock.js.map +1 -0
- package/dist/internal/colors.d.ts +45 -0
- package/dist/internal/colors.d.ts.map +1 -0
- package/dist/internal/colors.js +193 -0
- package/dist/internal/colors.js.map +1 -0
- package/dist/internal/complex.d.ts +24 -0
- package/dist/internal/complex.d.ts.map +1 -0
- package/dist/internal/complex.js +28 -0
- package/dist/internal/complex.js.map +1 -0
- package/dist/internal/content-watch.d.ts +20 -0
- package/dist/internal/content-watch.d.ts.map +1 -0
- package/dist/internal/content-watch.js +76 -0
- package/dist/internal/content-watch.js.map +1 -0
- package/dist/internal/default-transition.d.ts +25 -0
- package/dist/internal/default-transition.d.ts.map +1 -0
- package/dist/internal/default-transition.js +41 -0
- package/dist/internal/default-transition.js.map +1 -0
- package/dist/internal/drag-defaults.d.ts +18 -0
- package/dist/internal/drag-defaults.d.ts.map +1 -0
- package/dist/internal/drag-defaults.js +38 -0
- package/dist/internal/drag-defaults.js.map +1 -0
- package/dist/internal/gate.d.ts +186 -0
- package/dist/internal/gate.d.ts.map +1 -0
- package/dist/internal/gate.js +453 -0
- package/dist/internal/gate.js.map +1 -0
- package/dist/internal/input.d.ts +41 -0
- package/dist/internal/input.d.ts.map +1 -0
- package/dist/internal/input.js +476 -0
- package/dist/internal/input.js.map +1 -0
- package/dist/internal/interpolators.d.ts +19 -0
- package/dist/internal/interpolators.d.ts.map +1 -0
- package/dist/internal/interpolators.js +30 -0
- package/dist/internal/interpolators.js.map +1 -0
- package/dist/internal/key-rules.d.ts +11 -0
- package/dist/internal/key-rules.d.ts.map +1 -0
- package/dist/internal/key-rules.js +244 -0
- package/dist/internal/key-rules.js.map +1 -0
- package/dist/internal/measure.d.ts +150 -0
- package/dist/internal/measure.d.ts.map +1 -0
- package/dist/internal/measure.js +278 -0
- package/dist/internal/measure.js.map +1 -0
- package/dist/internal/measured-pairs.d.ts +38 -0
- package/dist/internal/measured-pairs.d.ts.map +1 -0
- package/dist/internal/measured-pairs.js +251 -0
- package/dist/internal/measured-pairs.js.map +1 -0
- package/dist/internal/own-values.d.ts +35 -0
- package/dist/internal/own-values.d.ts.map +1 -0
- package/dist/internal/own-values.js +117 -0
- package/dist/internal/own-values.js.map +1 -0
- package/dist/internal/pass-ends.d.ts +21 -0
- package/dist/internal/pass-ends.d.ts.map +1 -0
- package/dist/internal/pass-ends.js +14 -0
- package/dist/internal/pass-ends.js.map +1 -0
- package/dist/internal/positional-keys.d.ts +16 -0
- package/dist/internal/positional-keys.d.ts.map +1 -0
- package/dist/internal/positional-keys.js +21 -0
- package/dist/internal/positional-keys.js.map +1 -0
- package/dist/internal/probe.d.ts +10 -0
- package/dist/internal/probe.d.ts.map +1 -0
- package/dist/internal/probe.js +117 -0
- package/dist/internal/probe.js.map +1 -0
- package/dist/internal/projection-defaults.d.ts +34 -0
- package/dist/internal/projection-defaults.d.ts.map +1 -0
- package/dist/internal/projection-defaults.js +21 -0
- package/dist/internal/projection-defaults.js.map +1 -0
- package/dist/internal/projection.d.ts +529 -0
- package/dist/internal/projection.d.ts.map +1 -0
- package/dist/internal/projection.js +4990 -0
- package/dist/internal/projection.js.map +1 -0
- package/dist/internal/renderer.d.ts +86 -0
- package/dist/internal/renderer.d.ts.map +1 -0
- package/dist/internal/renderer.js +616 -0
- package/dist/internal/renderer.js.map +1 -0
- package/dist/internal/reorder.d.ts +159 -0
- package/dist/internal/reorder.d.ts.map +1 -0
- package/dist/internal/reorder.js +437 -0
- package/dist/internal/reorder.js.map +1 -0
- package/dist/internal/report.d.ts +30 -0
- package/dist/internal/report.d.ts.map +1 -0
- package/dist/internal/report.js +60 -0
- package/dist/internal/report.js.map +1 -0
- package/dist/internal/require-global.d.ts +11 -0
- package/dist/internal/require-global.d.ts.map +1 -0
- package/dist/internal/require-global.js +31 -0
- package/dist/internal/require-global.js.map +1 -0
- package/dist/internal/reveal.d.ts +16 -0
- package/dist/internal/reveal.d.ts.map +1 -0
- package/dist/internal/reveal.js +66 -0
- package/dist/internal/reveal.js.map +1 -0
- package/dist/internal/runner.d.ts +21 -0
- package/dist/internal/runner.d.ts.map +1 -0
- package/dist/internal/runner.js +48 -0
- package/dist/internal/runner.js.map +1 -0
- package/dist/internal/scale-correction.d.ts +80 -0
- package/dist/internal/scale-correction.d.ts.map +1 -0
- package/dist/internal/scale-correction.js +227 -0
- package/dist/internal/scale-correction.js.map +1 -0
- package/dist/internal/scroll.d.ts +35 -0
- package/dist/internal/scroll.d.ts.map +1 -0
- package/dist/internal/scroll.js +244 -0
- package/dist/internal/scroll.js.map +1 -0
- package/dist/internal/scrollers.d.ts +35 -0
- package/dist/internal/scrollers.d.ts.map +1 -0
- package/dist/internal/scrollers.js +38 -0
- package/dist/internal/scrollers.js.map +1 -0
- package/dist/internal/starting-style.d.ts +141 -0
- package/dist/internal/starting-style.d.ts.map +1 -0
- package/dist/internal/starting-style.js +300 -0
- package/dist/internal/starting-style.js.map +1 -0
- package/dist/internal/svg.d.ts +60 -0
- package/dist/internal/svg.d.ts.map +1 -0
- package/dist/internal/svg.js +257 -0
- package/dist/internal/svg.js.map +1 -0
- package/dist/internal/variables.d.ts +45 -0
- package/dist/internal/variables.d.ts.map +1 -0
- package/dist/internal/variables.js +92 -0
- package/dist/internal/variables.js.map +1 -0
- package/package.json +65 -4
- package/src/Appear.ts +45 -0
- package/src/Color.ts +24 -0
- package/src/DomAnnouncer.ts +22 -0
- package/src/DomClock.ts +13 -0
- package/src/DomDefaultTransition.ts +16 -0
- package/src/DomInput.ts +22 -0
- package/src/DomInterpolators.ts +16 -0
- package/src/DomKeyRules.ts +17 -0
- package/src/DomPositionalKeys.ts +16 -0
- package/src/DomProbe.ts +15 -0
- package/src/DomProjectionSystem.ts +44 -0
- package/src/DomRenderer.ts +26 -0
- package/src/FlushGate.ts +81 -0
- package/src/MeasuredPair.ts +15 -0
- package/src/OwnValues.ts +19 -0
- package/src/ProjectionSystem.ts +51 -0
- package/src/ReorderController.ts +72 -0
- package/src/Report.ts +17 -0
- package/src/ScrollOffset.ts +54 -0
- package/src/Style.ts +37 -0
- package/src/Svg.ts +21 -0
- package/src/Variables.ts +17 -0
- package/src/index.ts +106 -0
- package/src/internal/announcer.ts +132 -0
- package/src/internal/appear.ts +739 -0
- package/src/internal/auto-scroll.ts +176 -0
- package/src/internal/clock.ts +45 -0
- package/src/internal/colors.ts +258 -0
- package/src/internal/complex.ts +29 -0
- package/src/internal/content-watch.ts +84 -0
- package/src/internal/culori.d.ts +58 -0
- package/src/internal/default-transition.ts +50 -0
- package/src/internal/drag-defaults.ts +54 -0
- package/src/internal/gate.ts +593 -0
- package/src/internal/input.ts +579 -0
- package/src/internal/interpolators.ts +33 -0
- package/src/internal/key-rules.ts +357 -0
- package/src/internal/measure.ts +357 -0
- package/src/internal/measured-pairs.ts +297 -0
- package/src/internal/own-values.ts +166 -0
- package/src/internal/pass-ends.ts +23 -0
- package/src/internal/positional-keys.ts +24 -0
- package/src/internal/probe.ts +176 -0
- package/src/internal/projection-defaults.ts +45 -0
- package/src/internal/projection.ts +5999 -0
- package/src/internal/renderer.ts +646 -0
- package/src/internal/reorder.ts +604 -0
- package/src/internal/report.ts +69 -0
- package/src/internal/require-global.ts +46 -0
- package/src/internal/reveal.ts +69 -0
- package/src/internal/runner.ts +64 -0
- package/src/internal/scale-correction.ts +310 -0
- package/src/internal/scroll.ts +356 -0
- package/src/internal/scrollers.ts +51 -0
- package/src/internal/starting-style.ts +396 -0
- package/src/internal/svg.ts +300 -0
- package/src/internal/variables.ts +145 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 the Wardic contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @wardic/dom
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The browser environment for [Wardic](https://wardic.dev): its clock on `requestAnimationFrame`, the renderer that writes styles, pointer, keyboard and focus input, the probe that reads the page, and the projection system behind layout animations, as Effect Layers.
|
|
4
|
+
|
|
5
|
+
[`@wardic/solid`](https://www.npmjs.com/package/@wardic/solid) brings it; install it yourself only to build a binding of your own.
|
|
6
|
+
|
|
7
|
+
- Docs: https://wardic.dev
|
|
8
|
+
- Source: https://github.com/wardiclabs/wardic/tree/main/packages/dom
|
|
9
|
+
- Licence: MIT
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
Wardic follows the API of [Motion](https://motion.dev) for React, and parts of its source are ported from Motion's: rewritten in Wardic's own style, keeping Motion's algorithms, formulas and constants so the results match. Motion is MIT licensed, and its notice follows.
|
|
4
|
+
|
|
5
|
+
## Motion
|
|
6
|
+
|
|
7
|
+
https://github.com/motiondivision/motion
|
|
8
|
+
|
|
9
|
+
Ported from Motion's source:
|
|
10
|
+
|
|
11
|
+
- `@wardic/core`:
|
|
12
|
+
- `Box` and `Projection`: the projection geometry (`motion-dom`'s `projection/geometry`: `models`, `delta-calc`, `delta-apply`, `applyTreeDeltas`);
|
|
13
|
+
- `Spring`: the solver for a spring's stiffness and damping from its duration and bounce (`findSpring`);
|
|
14
|
+
- `Velocity`: a gesture's velocity from its points (`getVelocity`);
|
|
15
|
+
- `Reorder`: moving an item, and the axis a list runs on (`moveItem`, `detectAxis`);
|
|
16
|
+
- `AutoScroll`: scrolling a container while an item is dragged near its edge (`autoScrollIfNeeded`).
|
|
17
|
+
- `@wardic/dom`:
|
|
18
|
+
- the projection transform (`buildProjectionTransform`);
|
|
19
|
+
- the scroll offsets (`render/dom/scroll/offsets`).
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
The MIT License (MIT)
|
|
23
|
+
|
|
24
|
+
Copyright (c) 2024 [Motion](https://motion.dev) B.V.
|
|
25
|
+
|
|
26
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
27
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
28
|
+
in the Software without restriction, including without limitation the rights
|
|
29
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
30
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
31
|
+
furnished to do so, subject to the following conditions:
|
|
32
|
+
|
|
33
|
+
The above copyright notice and this permission notice shall be included in all
|
|
34
|
+
copies or substantial portions of the Software.
|
|
35
|
+
|
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
37
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
38
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
39
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
40
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
41
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
42
|
+
SOFTWARE.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Manrope
|
|
46
|
+
|
|
47
|
+
https://github.com/googlefonts/manrope
|
|
48
|
+
|
|
49
|
+
The docs site serves Manrope for its headings (`site/public/fonts/manrope-latin.woff2`, its variable weights 600 to 800, Latin only, with its licence beside it as `OFL.txt`), and Wardic's wordmark is "wardic" set in Manrope ExtraBold and outlined (`brand/`, and the docs header's logo, `site/src/components/logo-paths.ts`). Manrope is licensed under the SIL Open Font License, Version 1.1.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Copyright 2018 The Manrope Project Authors (https://github.com/googlefonts/manrope)
|
|
53
|
+
|
|
54
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
55
|
+
This license is copied below, and is also available with a FAQ at:
|
|
56
|
+
http://scripts.sil.org/OFL
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
-----------------------------------------------------------
|
|
60
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
61
|
+
-----------------------------------------------------------
|
|
62
|
+
|
|
63
|
+
PREAMBLE
|
|
64
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
65
|
+
development of collaborative font projects, to support the font creation
|
|
66
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
67
|
+
open framework in which fonts may be shared and improved in partnership
|
|
68
|
+
with others.
|
|
69
|
+
|
|
70
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
71
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
72
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
73
|
+
redistributed and/or sold with any software provided that any reserved
|
|
74
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
75
|
+
however, cannot be released under any other type of license. The
|
|
76
|
+
requirement for fonts to remain under this license does not apply
|
|
77
|
+
to any document created using the fonts or their derivatives.
|
|
78
|
+
|
|
79
|
+
DEFINITIONS
|
|
80
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
81
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
82
|
+
include source files, build scripts and documentation.
|
|
83
|
+
|
|
84
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
85
|
+
copyright statement(s).
|
|
86
|
+
|
|
87
|
+
"Original Version" refers to the collection of Font Software components as
|
|
88
|
+
distributed by the Copyright Holder(s).
|
|
89
|
+
|
|
90
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
91
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
92
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
93
|
+
new environment.
|
|
94
|
+
|
|
95
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
96
|
+
writer or other person who contributed to the Font Software.
|
|
97
|
+
|
|
98
|
+
PERMISSION & CONDITIONS
|
|
99
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
100
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
101
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
102
|
+
Software, subject to the following conditions:
|
|
103
|
+
|
|
104
|
+
1) Neither the Font Software nor any of its individual components,
|
|
105
|
+
in Original or Modified Versions, may be sold by itself.
|
|
106
|
+
|
|
107
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
108
|
+
redistributed and/or sold with any software, provided that each copy
|
|
109
|
+
contains the above copyright notice and this license. These can be
|
|
110
|
+
included either as stand-alone text files, human-readable headers or
|
|
111
|
+
in the appropriate machine-readable metadata fields within text or
|
|
112
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
113
|
+
|
|
114
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
115
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
116
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
117
|
+
presented to the users.
|
|
118
|
+
|
|
119
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
120
|
+
Software shall not be used to promote, endorse or advertise any
|
|
121
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
122
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
123
|
+
permission.
|
|
124
|
+
|
|
125
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
126
|
+
must be distributed entirely under this license, and must not be
|
|
127
|
+
distributed under any other license. The requirement for fonts to
|
|
128
|
+
remain under this license does not apply to any document created
|
|
129
|
+
using the Font Software.
|
|
130
|
+
|
|
131
|
+
TERMINATION
|
|
132
|
+
This license becomes null and void if any of the above conditions are
|
|
133
|
+
not met.
|
|
134
|
+
|
|
135
|
+
DISCLAIMER
|
|
136
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
137
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
138
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
139
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
140
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
141
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
142
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
143
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
144
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
145
|
+
```
|
package/dist/Appear.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appear animations: a mount animation a server renders as CSS, played from the first paint, before any
|
|
3
|
+
* code runs, which the engine takes over at mount from where it has got to. The DOM's half, for any
|
|
4
|
+
* binding:
|
|
5
|
+
* - **On a server:** `keyframes` samples an element's spec, its mount animation built with core's
|
|
6
|
+
* machines, into one `@keyframes` rule, cached across requests. A render's `sheet` gives each element a
|
|
7
|
+
* slot, whose `animation` goes in its inline style, and writes the head's `<style>` once every slot's
|
|
8
|
+
* timing is defined.
|
|
9
|
+
* - **At mount:** `find` the element's animation, check it `matches` the client's own spec, start the run
|
|
10
|
+
* `elapsedOf` it in (`Machine.startAt`), and `release` the element in the task that writes the engine's
|
|
11
|
+
* first frame.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import * as Appear from "@wardic/dom/Appear"
|
|
15
|
+
*
|
|
16
|
+
* // On a server, a sheet a render:
|
|
17
|
+
* const render = Appear.sheet()
|
|
18
|
+
* const slot = render.slot()
|
|
19
|
+
* slot.define({ spec, delay: 0 }) // `slot.animation` goes in the element's style, `render.css()` in the head
|
|
20
|
+
* // At mount:
|
|
21
|
+
* const elapsed = Option.map(Appear.find(element), Appear.elapsedOf)
|
|
22
|
+
*/
|
|
23
|
+
export { adoptChunks, animationOf, CHUNK_ATTRIBUTE, chunkStyle, delayOf, elapsedOf, find, keyframes, type Keyframes, matches, MAX_SECONDS, nameOf, pending, type Play, PREFIX, release, sheet, type Sheet, type Slot, type Spec, } from "./internal/appear.ts";
|
|
24
|
+
//# sourceMappingURL=Appear.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Appear.d.ts","sourceRoot":"","sources":["../src/Appear.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,OAAO,EACP,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAK,SAAS,EACd,OAAO,EACP,WAAW,EACX,MAAM,EACN,OAAO,EACP,KAAK,IAAI,EACT,MAAM,EACN,OAAO,EACP,KAAK,EACL,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,IAAI,GACV,MAAM,sBAAsB,CAAA"}
|
package/dist/Appear.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appear animations: a mount animation a server renders as CSS, played from the first paint, before any
|
|
3
|
+
* code runs, which the engine takes over at mount from where it has got to. The DOM's half, for any
|
|
4
|
+
* binding:
|
|
5
|
+
* - **On a server:** `keyframes` samples an element's spec, its mount animation built with core's
|
|
6
|
+
* machines, into one `@keyframes` rule, cached across requests. A render's `sheet` gives each element a
|
|
7
|
+
* slot, whose `animation` goes in its inline style, and writes the head's `<style>` once every slot's
|
|
8
|
+
* timing is defined.
|
|
9
|
+
* - **At mount:** `find` the element's animation, check it `matches` the client's own spec, start the run
|
|
10
|
+
* `elapsedOf` it in (`Machine.startAt`), and `release` the element in the task that writes the engine's
|
|
11
|
+
* first frame.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import * as Appear from "@wardic/dom/Appear"
|
|
15
|
+
*
|
|
16
|
+
* // On a server, a sheet a render:
|
|
17
|
+
* const render = Appear.sheet()
|
|
18
|
+
* const slot = render.slot()
|
|
19
|
+
* slot.define({ spec, delay: 0 }) // `slot.animation` goes in the element's style, `render.css()` in the head
|
|
20
|
+
* // At mount:
|
|
21
|
+
* const elapsed = Option.map(Appear.find(element), Appear.elapsedOf)
|
|
22
|
+
*/
|
|
23
|
+
// #48, ADR-0044: the **Handoff**. `@wardic/dom/Appear` (ADR-0041).
|
|
24
|
+
export { adoptChunks, animationOf, CHUNK_ATTRIBUTE, chunkStyle, delayOf, elapsedOf, find, keyframes, matches, MAX_SECONDS, nameOf, pending, PREFIX, release, sheet, } from "./internal/appear.js";
|
|
25
|
+
//# sourceMappingURL=Appear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Appear.js","sourceRoot":"","sources":["../src/Appear.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,mEAAmE;AACnE,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,OAAO,EACP,SAAS,EACT,IAAI,EACJ,SAAS,EAET,OAAO,EACP,WAAW,EACX,MAAM,EACN,OAAO,EAEP,MAAM,EACN,OAAO,EACP,KAAK,GAIN,MAAM,sBAAsB,CAAA"}
|
package/dist/Color.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS colours: `parse` reads a colour string, `format` writes one, `interpolator` blends two in a colour
|
|
3
|
+
* space, and `TOKEN` finds a colour inside a longer value, a shadow's say. A hex, `rgb()`, `hsl()` and the
|
|
4
|
+
* named colours are colours from the start; `registerSpaces` adds every other CSS colour space, so
|
|
5
|
+
* `oklch()` and `lab()` are colours too, and `interpolator("oklch")` can blend in it.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import * as Color from "@wardic/dom/Color"
|
|
9
|
+
*
|
|
10
|
+
* Color.parse("#bf616a") // Some({ mode: "rgb", r: 0.749, g: 0.38, b: 0.416 })
|
|
11
|
+
* Color.format({ mode: "rgb", r: 1, g: 0.5, b: 0 }) // "rgb(255, 128, 0)"
|
|
12
|
+
*/
|
|
13
|
+
export { color as interpolator, cssColor as css, type Color, formatColor as format, parseColor as parse, COLOR_TOKEN as TOKEN, registerSpaces, spacesRegistered, } from "./internal/colors.ts";
|
|
14
|
+
//# sourceMappingURL=Color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../src/Color.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EACL,KAAK,IAAI,YAAY,EACrB,QAAQ,IAAI,GAAG,EACf,KAAK,KAAK,EACV,WAAW,IAAI,MAAM,EACrB,UAAU,IAAI,KAAK,EACnB,WAAW,IAAI,KAAK,EACpB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAA"}
|
package/dist/Color.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS colours: `parse` reads a colour string, `format` writes one, `interpolator` blends two in a colour
|
|
3
|
+
* space, and `TOKEN` finds a colour inside a longer value, a shadow's say. A hex, `rgb()`, `hsl()` and the
|
|
4
|
+
* named colours are colours from the start; `registerSpaces` adds every other CSS colour space, so
|
|
5
|
+
* `oklch()` and `lab()` are colours too, and `interpolator("oklch")` can blend in it.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import * as Color from "@wardic/dom/Color"
|
|
9
|
+
*
|
|
10
|
+
* Color.parse("#bf616a") // Some({ mode: "rgb", r: 0.749, g: 0.38, b: 0.416 })
|
|
11
|
+
* Color.format({ mode: "rgb", r: 1, g: 0.5, b: 0 }) // "rgb(255, 128, 0)"
|
|
12
|
+
*/
|
|
13
|
+
// `@wardic/dom/Color` (#132, ADR-0041): a colour Interpolator in a culori mode, the DOM's own (`css`,
|
|
14
|
+
// sRGB), its `parse` and `format`, and its token (ADR-0024, ADR-0026); `registerSpaces` (#511).
|
|
15
|
+
export { color as interpolator, cssColor as css, formatColor as format, parseColor as parse, COLOR_TOKEN as TOKEN, registerSpaces, spacesRegistered, } from "./internal/colors.js";
|
|
16
|
+
//# sourceMappingURL=Color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Color.js","sourceRoot":"","sources":["../src/Color.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,sGAAsG;AACtG,gGAAgG;AAChG,OAAO,EACL,KAAK,IAAI,YAAY,EACrB,QAAQ,IAAI,GAAG,EAEf,WAAW,IAAI,MAAM,EACrB,UAAU,IAAI,KAAK,EACnB,WAAW,IAAI,KAAK,EACpB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Announcer: a shared live region, an element a screen reader watches and reads out as its
|
|
3
|
+
* text changes, and the helpers a binding uses to describe a Reorder group's items to one. `layer` is
|
|
4
|
+
* what `DomLive` provides; `prepare` and `announceIn` work on any document.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import * as DomAnnouncer from "@wardic/dom/DomAnnouncer"
|
|
8
|
+
*
|
|
9
|
+
* DomAnnouncer.prepare(document) // its live region, before the first announcement
|
|
10
|
+
* DomAnnouncer.announceIn(document, "Picked up Milk, position 2 of 5.")
|
|
11
|
+
*/
|
|
12
|
+
export { AnnouncerDomLive as layer, ANNOUNCER_ATTRIBUTE as ATTRIBUTE, documentOf, instructionsId, instructionsIdOf, showInstructions, prepareAnnouncer as prepare, announceIn, } from "./internal/announcer.ts";
|
|
13
|
+
//# sourceMappingURL=DomAnnouncer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomAnnouncer.d.ts","sourceRoot":"","sources":["../src/DomAnnouncer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,gBAAgB,IAAI,KAAK,EACzB,mBAAmB,IAAI,SAAS,EAChC,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,IAAI,OAAO,EAC3B,UAAU,GACX,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Announcer: a shared live region, an element a screen reader watches and reads out as its
|
|
3
|
+
* text changes, and the helpers a binding uses to describe a Reorder group's items to one. `layer` is
|
|
4
|
+
* what `DomLive` provides; `prepare` and `announceIn` work on any document.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import * as DomAnnouncer from "@wardic/dom/DomAnnouncer"
|
|
8
|
+
*
|
|
9
|
+
* DomAnnouncer.prepare(document) // its live region, before the first announcement
|
|
10
|
+
* DomAnnouncer.announceIn(document, "Picked up Milk, position 2 of 5.")
|
|
11
|
+
*/
|
|
12
|
+
// `@wardic/dom/DomAnnouncer` (#132, ADR-0041): a shared assertive live region (ADR-0037).
|
|
13
|
+
export { AnnouncerDomLive as layer, ANNOUNCER_ATTRIBUTE as ATTRIBUTE, documentOf, instructionsId, instructionsIdOf, showInstructions, prepareAnnouncer as prepare, announceIn, } from "./internal/announcer.js";
|
|
14
|
+
//# sourceMappingURL=DomAnnouncer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomAnnouncer.js","sourceRoot":"","sources":["../src/DomAnnouncer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,0FAA0F;AAC1F,OAAO,EACL,gBAAgB,IAAI,KAAK,EACzB,mBAAmB,IAAI,SAAS,EAChC,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,IAAI,OAAO,EAC3B,UAAU,GACX,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Clock: core's Clock and its Refresh frame source over the browser's `requestAnimationFrame`,
|
|
3
|
+
* as one Layer that needs nothing. `DomLive` provides it.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import * as DomClock from "@wardic/dom/DomClock"
|
|
7
|
+
*
|
|
8
|
+
* const now = Effect.map(Clock.Clock, (clock) => clock.now()).pipe(Effect.provide(DomClock.layer))
|
|
9
|
+
*/
|
|
10
|
+
export { ClockDomLive as layer, } from "./internal/clock.ts";
|
|
11
|
+
//# sourceMappingURL=DomClock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomClock.d.ts","sourceRoot":"","sources":["../src/DomClock.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,YAAY,IAAI,KAAK,GACtB,MAAM,qBAAqB,CAAA"}
|
package/dist/DomClock.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Clock: core's Clock and its Refresh frame source over the browser's `requestAnimationFrame`,
|
|
3
|
+
* as one Layer that needs nothing. `DomLive` provides it.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import * as DomClock from "@wardic/dom/DomClock"
|
|
7
|
+
*
|
|
8
|
+
* const now = Effect.map(Clock.Clock, (clock) => clock.now()).pipe(Effect.provide(DomClock.layer))
|
|
9
|
+
*/
|
|
10
|
+
// `@wardic/dom/DomClock` (#132, ADR-0041): rAF-driven (ADR-0031).
|
|
11
|
+
export { ClockDomLive as layer, } from "./internal/clock.js";
|
|
12
|
+
//# sourceMappingURL=DomClock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomClock.js","sourceRoot":"","sources":["../src/DomClock.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,kEAAkE;AAClE,OAAO,EACL,YAAY,IAAI,KAAK,GACtB,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Default transition, Motion's by value: a spring for the transforms, a 0.3 s ease for the
|
|
3
|
+
* rest, and a 0.8 s tween through more than two keyframes. `layer` is what `DomLive` provides.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import * as DomDefaultTransition from "@wardic/dom/DomDefaultTransition"
|
|
7
|
+
*
|
|
8
|
+
* DomDefaultTransition.transitionFor("x", 100) // { type: "spring", stiffness: 500, damping: 25, restSpeed: 10 }
|
|
9
|
+
* DomDefaultTransition.transitionFor("opacity", 1) // a 0.3 s tween
|
|
10
|
+
*/
|
|
11
|
+
export { DefaultTransitionDomLive as layer, keyframes, transitionFor, } from "./internal/default-transition.ts";
|
|
12
|
+
//# sourceMappingURL=DomDefaultTransition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomDefaultTransition.d.ts","sourceRoot":"","sources":["../src/DomDefaultTransition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,wBAAwB,IAAI,KAAK,EACjC,SAAS,EACT,aAAa,GACd,MAAM,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Default transition, Motion's by value: a spring for the transforms, a 0.3 s ease for the
|
|
3
|
+
* rest, and a 0.8 s tween through more than two keyframes. `layer` is what `DomLive` provides.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import * as DomDefaultTransition from "@wardic/dom/DomDefaultTransition"
|
|
7
|
+
*
|
|
8
|
+
* DomDefaultTransition.transitionFor("x", 100) // { type: "spring", stiffness: 500, damping: 25, restSpeed: 10 }
|
|
9
|
+
* DomDefaultTransition.transitionFor("opacity", 1) // a 0.3 s tween
|
|
10
|
+
*/
|
|
11
|
+
// `@wardic/dom/DomDefaultTransition` (#132, ADR-0041): ADR-0051, #357; keyframes #429.
|
|
12
|
+
export { DefaultTransitionDomLive as layer, keyframes, transitionFor, } from "./internal/default-transition.js";
|
|
13
|
+
//# sourceMappingURL=DomDefaultTransition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomDefaultTransition.js","sourceRoot":"","sources":["../src/DomDefaultTransition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,uFAAuF;AACvF,OAAO,EACL,wBAAwB,IAAI,KAAK,EACjC,SAAS,EACT,aAAa,GACd,MAAM,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's InputSource: pointer, keyboard and focus events as core's own, mapped from the DOM's names by
|
|
3
|
+
* `toPointer`, `keyOf`, `kindOf` and `buttonOf`. It isn't in `DomLive`: a binding builds `layer` with the
|
|
4
|
+
* first gesture an app uses, so an app with none ships no input code.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import * as DomInput from "@wardic/dom/DomInput"
|
|
8
|
+
*
|
|
9
|
+
* DomInput.keyOf("ArrowLeft") // "left"
|
|
10
|
+
* DomInput.buttonOf(2) // "secondary"
|
|
11
|
+
*/
|
|
12
|
+
export { InputDomLive as layer, keyOf, kindOf, makeFocusable, buttonOf, toPointer, type Where, } from "./internal/input.ts";
|
|
13
|
+
//# sourceMappingURL=DomInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomInput.d.ts","sourceRoot":"","sources":["../src/DomInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACL,YAAY,IAAI,KAAK,EACrB,KAAK,EACL,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,EACT,KAAK,KAAK,GACX,MAAM,qBAAqB,CAAA"}
|
package/dist/DomInput.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's InputSource: pointer, keyboard and focus events as core's own, mapped from the DOM's names by
|
|
3
|
+
* `toPointer`, `keyOf`, `kindOf` and `buttonOf`. It isn't in `DomLive`: a binding builds `layer` with the
|
|
4
|
+
* first gesture an app uses, so an app with none ships no input code.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import * as DomInput from "@wardic/dom/DomInput"
|
|
8
|
+
*
|
|
9
|
+
* DomInput.keyOf("ArrowLeft") // "left"
|
|
10
|
+
* DomInput.buttonOf(2) // "secondary"
|
|
11
|
+
*/
|
|
12
|
+
// `@wardic/dom/DomInput` (#132, ADR-0041): ADR-0019, ADR-0036 *Amendment (#189)*, ADR-0037. Not in
|
|
13
|
+
// `DomLive`: #511, ADR-0067 decision 14.
|
|
14
|
+
export { InputDomLive as layer, keyOf, kindOf, makeFocusable, buttonOf, toPointer, } from "./internal/input.js";
|
|
15
|
+
//# sourceMappingURL=DomInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomInput.js","sourceRoot":"","sources":["../src/DomInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,mGAAmG;AACnG,yCAAyC;AACzC,OAAO,EACL,YAAY,IAAI,KAAK,EACrB,KAAK,EACL,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GAEV,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's InterpolatorRegistry: core's value kinds with the DOM's colours and complex values, and the
|
|
3
|
+
* DOM's Key rules. `layer` is what `DomLive` provides; `all` is its kinds, in the order they're tried.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import * as DomInterpolators from "@wardic/dom/DomInterpolators"
|
|
7
|
+
*
|
|
8
|
+
* const registry = yield* InterpolatorRegistry.make(DomInterpolators.all, DomKeyRules.all)
|
|
9
|
+
* const blend = yield* registry.resolve("#bf616a", "#a3be8c")
|
|
10
|
+
* blend(0.5) // the colour halfway
|
|
11
|
+
*/
|
|
12
|
+
export { InterpolatorRegistryDomLive as layer, interpolators as all, } from "./internal/interpolators.ts";
|
|
13
|
+
//# sourceMappingURL=DomInterpolators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomInterpolators.d.ts","sourceRoot":"","sources":["../src/DomInterpolators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,2BAA2B,IAAI,KAAK,EACpC,aAAa,IAAI,GAAG,GACrB,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's InterpolatorRegistry: core's value kinds with the DOM's colours and complex values, and the
|
|
3
|
+
* DOM's Key rules. `layer` is what `DomLive` provides; `all` is its kinds, in the order they're tried.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import * as DomInterpolators from "@wardic/dom/DomInterpolators"
|
|
7
|
+
*
|
|
8
|
+
* const registry = yield* InterpolatorRegistry.make(DomInterpolators.all, DomKeyRules.all)
|
|
9
|
+
* const blend = yield* registry.resolve("#bf616a", "#a3be8c")
|
|
10
|
+
* blend(0.5) // the colour halfway
|
|
11
|
+
*/
|
|
12
|
+
// `@wardic/dom/DomInterpolators` (#132, ADR-0041): ADR-0024, ADR-0035, ADR-0036.
|
|
13
|
+
export { InterpolatorRegistryDomLive as layer, interpolators as all, } from "./internal/interpolators.js";
|
|
14
|
+
//# sourceMappingURL=DomInterpolators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomInterpolators.js","sourceRoot":"","sources":["../src/DomInterpolators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,iFAAiF;AACjF,OAAO,EACL,2BAA2B,IAAI,KAAK,EACpC,aAAa,IAAI,GAAG,GACrB,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Key rules, for the keys it blends by name. `visibility` keeps `display` and `visibility` at
|
|
3
|
+
* their start until an animation's last frame when they're hiding the element, and `animatableNone`
|
|
4
|
+
* grows a shadow, a filter or a fill from nothing when one end is empty. `all` is both, in the order
|
|
5
|
+
* they're asked.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import * as DomKeyRules from "@wardic/dom/DomKeyRules"
|
|
9
|
+
*
|
|
10
|
+
* const registry = yield* InterpolatorRegistry.make(DomInterpolators.all, [DomKeyRules.visibility])
|
|
11
|
+
*/
|
|
12
|
+
export { keyRules as all, visibility, animatableNone, } from "./internal/key-rules.ts";
|
|
13
|
+
//# sourceMappingURL=DomKeyRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomKeyRules.d.ts","sourceRoot":"","sources":["../src/DomKeyRules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,QAAQ,IAAI,GAAG,EACf,UAAU,EACV,cAAc,GACf,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Key rules, for the keys it blends by name. `visibility` keeps `display` and `visibility` at
|
|
3
|
+
* their start until an animation's last frame when they're hiding the element, and `animatableNone`
|
|
4
|
+
* grows a shadow, a filter or a fill from nothing when one end is empty. `all` is both, in the order
|
|
5
|
+
* they're asked.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import * as DomKeyRules from "@wardic/dom/DomKeyRules"
|
|
9
|
+
*
|
|
10
|
+
* const registry = yield* InterpolatorRegistry.make(DomInterpolators.all, [DomKeyRules.visibility])
|
|
11
|
+
*/
|
|
12
|
+
// `@wardic/dom/DomKeyRules` (#132, ADR-0041): ADR-0015, ADR-0035.
|
|
13
|
+
export { keyRules as all, visibility, animatableNone, } from "./internal/key-rules.js";
|
|
14
|
+
//# sourceMappingURL=DomKeyRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomKeyRules.js","sourceRoot":"","sources":["../src/DomKeyRules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,kEAAkE;AAClE,OAAO,EACL,QAAQ,IAAI,GAAG,EACf,UAAU,EACV,cAAc,GACf,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Positional keys, the keys reduced motion lands at once rather than animating: the
|
|
3
|
+
* transforms, and the keys that place and size an element's box, `top`, `width` and the rest. `layer`
|
|
4
|
+
* is what `DomLive` provides.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import * as DomPositionalKeys from "@wardic/dom/DomPositionalKeys"
|
|
8
|
+
*
|
|
9
|
+
* DomPositionalKeys.isPositional("width") // true: it lands at once
|
|
10
|
+
* DomPositionalKeys.isPositional("opacity") // false: it still fades
|
|
11
|
+
*/
|
|
12
|
+
export { PositionalKeysDomLive as layer, isPositional, } from "./internal/positional-keys.ts";
|
|
13
|
+
//# sourceMappingURL=DomPositionalKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomPositionalKeys.d.ts","sourceRoot":"","sources":["../src/DomPositionalKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,qBAAqB,IAAI,KAAK,EAC9B,YAAY,GACb,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Positional keys, the keys reduced motion lands at once rather than animating: the
|
|
3
|
+
* transforms, and the keys that place and size an element's box, `top`, `width` and the rest. `layer`
|
|
4
|
+
* is what `DomLive` provides.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import * as DomPositionalKeys from "@wardic/dom/DomPositionalKeys"
|
|
8
|
+
*
|
|
9
|
+
* DomPositionalKeys.isPositional("width") // true: it lands at once
|
|
10
|
+
* DomPositionalKeys.isPositional("opacity") // false: it still fades
|
|
11
|
+
*/
|
|
12
|
+
// `@wardic/dom/DomPositionalKeys` (#132, ADR-0041): ADR-0029, ADR-0036.
|
|
13
|
+
export { PositionalKeysDomLive as layer, isPositional, } from "./internal/positional-keys.js";
|
|
14
|
+
//# sourceMappingURL=DomPositionalKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomPositionalKeys.js","sourceRoot":"","sources":["../src/DomPositionalKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wEAAwE;AACxE,OAAO,EACL,qBAAqB,IAAI,KAAK,EAC9B,YAAY,GACb,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Probe: boxes from `getBoundingClientRect`, sizes and visibility from the observers, the
|
|
3
|
+
* viewport, the reduced-motion preference from `matchMedia`, whether the page is shown, and a container's
|
|
4
|
+
* scroll. `layer` needs the Environment's `AtomRegistry`, which it writes its live values through;
|
|
5
|
+
* `DomLive` provides both.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import * as DomProbe from "@wardic/dom/DomProbe"
|
|
9
|
+
*
|
|
10
|
+
* const probe = DomProbe.layer.pipe(Layer.provide(AtomRegistry.layer))
|
|
11
|
+
*/
|
|
12
|
+
export { ProbeDomLive as layer, } from "./internal/probe.ts";
|
|
13
|
+
//# sourceMappingURL=DomProbe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomProbe.d.ts","sourceRoot":"","sources":["../src/DomProbe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,YAAY,IAAI,KAAK,GACtB,MAAM,qBAAqB,CAAA"}
|
package/dist/DomProbe.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Probe: boxes from `getBoundingClientRect`, sizes and visibility from the observers, the
|
|
3
|
+
* viewport, the reduced-motion preference from `matchMedia`, whether the page is shown, and a container's
|
|
4
|
+
* scroll. `layer` needs the Environment's `AtomRegistry`, which it writes its live values through;
|
|
5
|
+
* `DomLive` provides both.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import * as DomProbe from "@wardic/dom/DomProbe"
|
|
9
|
+
*
|
|
10
|
+
* const probe = DomProbe.layer.pipe(Layer.provide(AtomRegistry.layer))
|
|
11
|
+
*/
|
|
12
|
+
// `@wardic/dom/DomProbe` (#132, ADR-0041).
|
|
13
|
+
export { ProbeDomLive as layer, } from "./internal/probe.js";
|
|
14
|
+
//# sourceMappingURL=DomProbe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomProbe.js","sourceRoot":"","sources":["../src/DomProbe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,2CAA2C;AAC3C,OAAO,EACL,YAAY,IAAI,KAAK,GACtB,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Projection system: `layer` builds it, writing through the Environment's
|
|
3
|
+
* `FlushGate`, and `make` builds it over any sink, for a binding that wires it itself. Only a binding's
|
|
4
|
+
* layout feature imports it, so a page that never lays out ships none of it. Closing its Scope stops the
|
|
5
|
+
* engine: its run, its observers and listeners, and what it forked. Built after the gate, it ends before
|
|
6
|
+
* it.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* import * as DomProjectionSystem from "@wardic/dom/DomProjectionSystem"
|
|
10
|
+
*
|
|
11
|
+
* const layout = DomProjectionSystem.layer().pipe(Layer.provide(FlushGate.layer({ batch: (apply) => apply() })))
|
|
12
|
+
*/
|
|
13
|
+
import * as Context from "effect/Context";
|
|
14
|
+
import * as Effect from "effect/Effect";
|
|
15
|
+
import * as Layer from "effect/Layer";
|
|
16
|
+
import type * as Scope from "effect/Scope";
|
|
17
|
+
import * as FlushGate from "./FlushGate.ts";
|
|
18
|
+
import { PassEnds } from "./internal/pass-ends.ts";
|
|
19
|
+
import { ProjectionSystem, type Options, type Services, type Sink } from "./ProjectionSystem.ts";
|
|
20
|
+
/**
|
|
21
|
+
* Build the engine over `sink`, the context's Frame loop and Renderer, in the current Scope: what
|
|
22
|
+
* it forks runs in that Scope, and closing it ends the engine. It's the `ProjectionSystem` in the
|
|
23
|
+
* context it gives, beside what a Reorder controller over it needs.
|
|
24
|
+
*/
|
|
25
|
+
export declare const make: (sink: Sink, options?: Options) => Effect.Effect<Context.Context<ProjectionSystem | PassEnds>, never, Services | Scope.Scope>;
|
|
26
|
+
/** The engine as a Layer, writing through the Environment's `FlushGate`: built by `make`, ended by the Layer's Scope. */
|
|
27
|
+
export declare const layer: (options?: Options) => Layer.Layer<ProjectionSystem | PassEnds, never, FlushGate.FlushGate | Services>;
|
|
28
|
+
//# sourceMappingURL=DomProjectionSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomProjectionSystem.d.ts","sourceRoot":"","sources":["../src/DomProjectionSystem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAGlD,OAAO,EAAE,gBAAgB,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAc,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAE5G;;;;GAIG;AAKH,eAAO,MAAM,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,GAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,KAAK,CAAC,KAAK,CAM3I,CAAA;AAEJ,yHAAyH;AACzH,eAAO,MAAM,KAAK,aAAa,OAAO,KAAQ,KAAK,CAAC,KAAK,CAAC,gBAAgB,GAAG,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,SAAS,GAAG,QAAQ,CACnB,CAAA"}
|