upwwwards 0.0.0-stage → 0.1.0-beta.1
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 +278 -0
- package/README.md +188 -3
- package/dist/Classter-BvYgmPAa.d.ts +148 -0
- package/dist/Thread-BALvpZzB.d.ts +779 -0
- package/dist/Wait-DlWKCFXN.d.ts +231 -0
- package/dist/adapters/@/Adapter.js +209 -0
- package/dist/adapters/@/Adapter.js.map +1 -0
- package/dist/adapters/Nuxt.d.ts +89 -0
- package/dist/adapters/Nuxt.js +107 -0
- package/dist/adapters/Nuxt.js.map +1 -0
- package/dist/adapters/Svelte.d.ts +88 -0
- package/dist/adapters/Svelte.js +93 -0
- package/dist/adapters/Svelte.js.map +1 -0
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.js +1 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/classter/@/@classter/props.js +388 -0
- package/dist/classter/@/@classter/props.js.map +1 -0
- package/dist/classter/@/Classter.js +396 -0
- package/dist/classter/@/Classter.js.map +1 -0
- package/dist/classter/Svelte.d.ts +23 -0
- package/dist/classter/Svelte.js +103 -0
- package/dist/classter/Svelte.js.map +1 -0
- package/dist/classter/Vue.d.ts +23 -0
- package/dist/classter/Vue.js +226 -0
- package/dist/classter/Vue.js.map +1 -0
- package/dist/contexts/@/Client.js +15 -0
- package/dist/contexts/@/Client.js.map +1 -0
- package/dist/contexts/@/Context.js +58 -0
- package/dist/contexts/@/Context.js.map +1 -0
- package/dist/contexts/@/Server.js +39 -0
- package/dist/contexts/@/Server.js.map +1 -0
- package/dist/contexts/nuxt.d.ts +41 -0
- package/dist/contexts/nuxt.js +22 -0
- package/dist/contexts/nuxt.js.map +1 -0
- package/dist/contexts/sveltekit.d.ts +24 -0
- package/dist/contexts/sveltekit.js +16 -0
- package/dist/contexts/sveltekit.js.map +1 -0
- package/dist/core/Up.js +180 -0
- package/dist/core/Up.js.map +1 -0
- package/dist/core/[1]/Event.js +587 -0
- package/dist/core/[1]/Event.js.map +1 -0
- package/dist/core/[1]/[2]/Thread.js +578 -0
- package/dist/core/[1]/[2]/Thread.js.map +1 -0
- package/dist/core/[1]/[2]/[3]/App.js +339 -0
- package/dist/core/[1]/[2]/[3]/App.js.map +1 -0
- package/dist/index-CFDGHuDd.d.ts +1228 -0
- package/dist/index-CZXR_S0p.d.ts +3096 -0
- package/dist/index.d.ts +555 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/initializers/vite.d.ts +285 -0
- package/dist/initializers/vite.js +401 -0
- package/dist/initializers/vite.js.map +1 -0
- package/dist/plugins/@/Lazy.js +233 -0
- package/dist/plugins/@/Lazy.js.map +1 -0
- package/dist/plugins/@/Plugin.js +61 -0
- package/dist/plugins/@/Plugin.js.map +1 -0
- package/dist/plugins/@anime/Split.js +54 -0
- package/dist/plugins/@anime/Split.js.map +1 -0
- package/dist/plugins/@anime/Timeline.js +507 -0
- package/dist/plugins/@anime/Timeline.js.map +1 -0
- package/dist/plugins/@anime/Tweens.js +104 -0
- package/dist/plugins/@anime/Tweens.js.map +1 -0
- package/dist/plugins/@puppeteer/Matrix4.js +567 -0
- package/dist/plugins/@puppeteer/Matrix4.js.map +1 -0
- package/dist/plugins/@synthra/Package.js +84 -0
- package/dist/plugins/@synthra/Package.js.map +1 -0
- package/dist/plugins/@synthra/Spider.js +216 -0
- package/dist/plugins/@synthra/Spider.js.map +1 -0
- package/dist/plugins/@synthra/X3D.js +797 -0
- package/dist/plugins/@synthra/X3D.js.map +1 -0
- package/dist/plugins/@synthra/plugins/@/Plugin.js +143 -0
- package/dist/plugins/@synthra/plugins/@/Plugin.js.map +1 -0
- package/dist/plugins/@synthra/plugins/Basic.js +77 -0
- package/dist/plugins/@synthra/plugins/Basic.js.map +1 -0
- package/dist/plugins/Anime.d.ts +9 -0
- package/dist/plugins/Anime.js +241 -0
- package/dist/plugins/Anime.js.map +1 -0
- package/dist/plugins/Observer.js +205 -0
- package/dist/plugins/Observer.js.map +1 -0
- package/dist/plugins/Puppeteer.d.ts +9 -0
- package/dist/plugins/Puppeteer.js +46 -0
- package/dist/plugins/Puppeteer.js.map +1 -0
- package/dist/plugins/Screen.js +257 -0
- package/dist/plugins/Screen.js.map +1 -0
- package/dist/plugins/Scroll.d.ts +9 -0
- package/dist/plugins/Scroll.js +203 -0
- package/dist/plugins/Scroll.js.map +1 -0
- package/dist/plugins/Synthra.d.ts +9 -0
- package/dist/plugins/Synthra.js +196 -0
- package/dist/plugins/Synthra.js.map +1 -0
- package/dist/plugins/Transmitter.d.ts +9 -0
- package/dist/plugins/Transmitter.js +176 -0
- package/dist/plugins/Transmitter.js.map +1 -0
- package/dist/plugins/index.d.ts +9 -0
- package/dist/plugins/index.js +17 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/scripts/@arrays/Callstack.js +140 -0
- package/dist/scripts/@arrays/Callstack.js.map +1 -0
- package/dist/scripts/@trees/Interval.js +352 -0
- package/dist/scripts/@trees/Interval.js.map +1 -0
- package/dist/scripts/Arrays.d.ts +3 -0
- package/dist/scripts/Arrays.js +26 -0
- package/dist/scripts/Arrays.js.map +1 -0
- package/dist/scripts/Colors.js +127 -0
- package/dist/scripts/Colors.js.map +1 -0
- package/dist/scripts/Cookies.js +92 -0
- package/dist/scripts/Cookies.js.map +1 -0
- package/dist/scripts/Hrt.js +99 -0
- package/dist/scripts/Hrt.js.map +1 -0
- package/dist/scripts/Is.js +206 -0
- package/dist/scripts/Is.js.map +1 -0
- package/dist/scripts/Logs.js +132 -0
- package/dist/scripts/Logs.js.map +1 -0
- package/dist/scripts/Maths.js +273 -0
- package/dist/scripts/Maths.js.map +1 -0
- package/dist/scripts/Parser.js +488 -0
- package/dist/scripts/Parser.js.map +1 -0
- package/dist/scripts/Strings.js +306 -0
- package/dist/scripts/Strings.js.map +1 -0
- package/dist/scripts/Trees.d.ts +135 -0
- package/dist/scripts/Trees.js +27 -0
- package/dist/scripts/Trees.js.map +1 -0
- package/dist/scripts/Wait.js +310 -0
- package/dist/scripts/Wait.js.map +1 -0
- package/dist/scripts/index.d.ts +442 -0
- package/dist/scripts/index.js +23 -0
- package/dist/scripts/index.js.map +1 -0
- package/dist/styles/_screen.scss +131 -0
- package/dist/symbols/index.d.ts +98 -0
- package/dist/symbols/index.js +23 -0
- package/dist/symbols/index.js.map +1 -0
- package/docs/adapters.md +146 -0
- package/docs/advanced/license.md +31 -0
- package/docs/advanced/symbols.md +83 -0
- package/docs/classter-aliases.md +496 -0
- package/docs/classter.md +124 -0
- package/docs/compatibility.md +67 -0
- package/docs/concepts.md +53 -0
- package/docs/contexts.md +81 -0
- package/docs/core.md +298 -0
- package/docs/faq.md +131 -0
- package/docs/getting-started.md +182 -0
- package/docs/index.md +87 -0
- package/docs/initializers.md +270 -0
- package/docs/plugins/anime.md +218 -0
- package/docs/plugins/observer.md +81 -0
- package/docs/plugins/puppeteer.md +83 -0
- package/docs/plugins/screen.md +133 -0
- package/docs/plugins/scroll.md +94 -0
- package/docs/plugins/synthra.md +167 -0
- package/docs/plugins/transmitter.md +98 -0
- package/docs/plugins.md +107 -0
- package/docs/recipes.md +276 -0
- package/docs/scripts/arrays.md +62 -0
- package/docs/scripts/colors.md +63 -0
- package/docs/scripts/cookies.md +58 -0
- package/docs/scripts/is.md +58 -0
- package/docs/scripts/logs.md +64 -0
- package/docs/scripts/maths.md +65 -0
- package/docs/scripts/parser.md +60 -0
- package/docs/scripts/strings.md +71 -0
- package/docs/scripts/trees.md +57 -0
- package/docs/scripts/wait.md +92 -0
- package/docs/scripts.md +81 -0
- package/llms.txt +82 -0
- package/package.json +136 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
upwwwards Standard "No Charge" License
|
|
2
|
+
======================================
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 Morgan Le Thuaut. All rights reserved.
|
|
5
|
+
|
|
6
|
+
This license is a proprietary software license. It is not an open-source
|
|
7
|
+
license (it is not OSI-approved). It is provided as a practical template
|
|
8
|
+
inspired by common “standard use / no charge” models; it is not legal advice.
|
|
9
|
+
Have counsel review it before relying on it commercially.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
I. DEFINITIONS
|
|
13
|
+
|
|
14
|
+
“License” means these terms.
|
|
15
|
+
|
|
16
|
+
“Copyright Holder” means Morgan Le Thuaut.
|
|
17
|
+
|
|
18
|
+
“Licensee” or “you” means the individual or legal entity exercising rights
|
|
19
|
+
under this License.
|
|
20
|
+
|
|
21
|
+
“Software” means the upwwwards library and any related packages, plugins,
|
|
22
|
+
tools, documentation, or materials made available by the Copyright Holder
|
|
23
|
+
under this License (including npm distributions and updates).
|
|
24
|
+
|
|
25
|
+
“Permitted Use” means implementing and/or using the Software, as provided,
|
|
26
|
+
in a website, web application, digital product, or similar end-user-facing
|
|
27
|
+
experience that you (or your client) own or operate — including commercial
|
|
28
|
+
projects — where the Software is a dependency or runtime of that experience.
|
|
29
|
+
|
|
30
|
+
Permitted Use also includes developing, distributing, and operating software
|
|
31
|
+
packages, libraries, frameworks, and developer tools that use the Software as
|
|
32
|
+
a dependency, provided that such products are not Competitive Products.
|
|
33
|
+
|
|
34
|
+
“Competitive Product” means a software product whose primary purpose
|
|
35
|
+
is to provide substantially similar functionality to the Software itself,
|
|
36
|
+
and which is marketed or distributed as a substitute for the Software.
|
|
37
|
+
|
|
38
|
+
A product shall not be considered a Competitive Product solely because
|
|
39
|
+
it uses the Software as a dependency, integrates its APIs, or provides
|
|
40
|
+
additional functionality built on top of the Software.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
II. GRANT OF LICENSE
|
|
44
|
+
|
|
45
|
+
Subject to this License, the Copyright Holder grants you a non-exclusive,
|
|
46
|
+
worldwide, royalty-free license to use, reproduce, display, and implement
|
|
47
|
+
the Software solely for Permitted Uses. This grant continues for so long as
|
|
48
|
+
this License remains in effect and is not terminated under Section VI.
|
|
49
|
+
|
|
50
|
+
You may modify the Software solely for your own internal use or for use in
|
|
51
|
+
a Permitted Use, provided that such modifications are not distributed as a
|
|
52
|
+
standalone library or as part of a Competitive Product. For clarity, this
|
|
53
|
+
permission includes maintaining private forks or modified copies of the
|
|
54
|
+
Software solely for internal use or for a Permitted Use.
|
|
55
|
+
|
|
56
|
+
You may distribute the Software as a dependency of your own software package
|
|
57
|
+
(for example, declaring it in package.json so that npm, pnpm, or yarn installs
|
|
58
|
+
it for consumers of your package), provided that:
|
|
59
|
+
|
|
60
|
+
(a) the Software is not redistributed as a standalone product;
|
|
61
|
+
|
|
62
|
+
(b) the Software is not modified for that redistribution (consumers must
|
|
63
|
+
receive the Software as published by the Copyright Holder, typically via
|
|
64
|
+
the official package registry entry);
|
|
65
|
+
|
|
66
|
+
(c) the distribution is solely intended to enable a Permitted Use; and
|
|
67
|
+
|
|
68
|
+
(d) the distribution does not grant recipients any rights beyond those
|
|
69
|
+
expressly granted under this License (recipients are licensed directly
|
|
70
|
+
under this License, not under broader terms of your package).
|
|
71
|
+
|
|
72
|
+
This dependency permission includes direct and transitive dependencies, as
|
|
73
|
+
well as Software bundled into or distributed with packages solely to enable
|
|
74
|
+
a Permitted Use. In all cases, the Software remains subject to this License
|
|
75
|
+
and may not be redistributed as a standalone product or Competitive Product.
|
|
76
|
+
|
|
77
|
+
No other rights are granted, whether by implication, estoppel, or otherwise.
|
|
78
|
+
In particular, except for the modification and dependency-distribution
|
|
79
|
+
rights above, this License does not grant you rights to create derivative
|
|
80
|
+
works for public or commercial distribution as a library, or to sublicense
|
|
81
|
+
the Software except as necessary to deliver a Permitted Use (for example,
|
|
82
|
+
bundling minified runtime code — including your Permitted Use modifications —
|
|
83
|
+
into your deployed website or application).
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
III. RESTRICTIONS
|
|
87
|
+
|
|
88
|
+
You may not, without prior written consent of the Copyright Holder:
|
|
89
|
+
|
|
90
|
+
(a) use the Software for any purpose other than a Permitted Use;
|
|
91
|
+
|
|
92
|
+
(b) use the Software to develop, operate, or distribute a Competitive Product;
|
|
93
|
+
|
|
94
|
+
(c) fork, clone, or republish the Software’s source code as a separate
|
|
95
|
+
public project, package, or repository, or otherwise distribute a fork
|
|
96
|
+
or clone of the Software to third parties, except as expressly permitted
|
|
97
|
+
under Section II;
|
|
98
|
+
|
|
99
|
+
(d) modify the Software and distribute, publish, or sell the modified
|
|
100
|
+
version (or a substantial portion of it) to third parties, except as
|
|
101
|
+
expressly permitted under Section II for modifications included in a
|
|
102
|
+
Permitted Use deployment;
|
|
103
|
+
|
|
104
|
+
(e) reverse engineer, decompile, or disassemble the Software in order to
|
|
105
|
+
build a Competitive Product (interoperability analysis strictly limited
|
|
106
|
+
to integrating the Software into a Permitted Use is not restricted by
|
|
107
|
+
this clause where such restriction is prohibited by applicable law);
|
|
108
|
+
|
|
109
|
+
(f) remove, obscure, or alter any proprietary notices, copyright notices,
|
|
110
|
+
or branding included with the Software. This restriction does not require
|
|
111
|
+
displaying the Copyright Holder’s branding or trademarks in the user
|
|
112
|
+
interface of a Permitted Use deployment. Copyright and license notices
|
|
113
|
+
must be retained in the Software distribution or accompanying
|
|
114
|
+
documentation, where technically and reasonably practicable;
|
|
115
|
+
|
|
116
|
+
(g) redistribute the Software on a standalone basis (including republishing
|
|
117
|
+
it on package registries under another name or as a competing package),
|
|
118
|
+
except as expressly allowed by Section II for dependency distribution
|
|
119
|
+
or bundling inside a Permitted Use deployment.
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
IV. OWNERSHIP
|
|
123
|
+
|
|
124
|
+
The Software is licensed, not sold. All right, title, and interest in and
|
|
125
|
+
to the Software — including copyrights, trademarks, trade secrets, and
|
|
126
|
+
other intellectual property — remain the exclusive property of the
|
|
127
|
+
Copyright Holder and its licensors. This License does not transfer any
|
|
128
|
+
ownership rights to you.
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
V. NO WARRANTY
|
|
132
|
+
|
|
133
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
134
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
135
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
|
136
|
+
THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY,
|
|
137
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT
|
|
138
|
+
OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
139
|
+
THE SOFTWARE, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
VI. TERMINATION
|
|
143
|
+
|
|
144
|
+
This License may be terminated only as expressly provided in this Section VI.
|
|
145
|
+
The Copyright Holder may not revoke the License at its discretion for users
|
|
146
|
+
who remain in compliance with its terms.
|
|
147
|
+
|
|
148
|
+
(a) Notice and cure. If you breach this License, the Copyright Holder may
|
|
149
|
+
terminate it only after giving you written notice describing the breach
|
|
150
|
+
with reasonable particularity and allowing a cure period of thirty (30)
|
|
151
|
+
days (or longer if stated in the notice). If you cure the breach within
|
|
152
|
+
that period, this License does not terminate by reason of that notice.
|
|
153
|
+
|
|
154
|
+
(b) Effect of termination. If this License terminates under Section VI(a)
|
|
155
|
+
because the breach was not cured in time, then, except as provided in
|
|
156
|
+
Section VI(c), you must cease new use of the Software and destroy copies
|
|
157
|
+
in your possession that are not covered by Section VI(c).
|
|
158
|
+
|
|
159
|
+
(c) Grandfathered Permitted Uses. Termination does not require you to
|
|
160
|
+
recall, disable, or rebuild:
|
|
161
|
+
(i) websites, applications, or other products already delivered to
|
|
162
|
+
a client or end users under a Permitted Use before termination;
|
|
163
|
+
(ii) production deployments already live under a Permitted Use before
|
|
164
|
+
termination; or
|
|
165
|
+
(iii) copies of a specific Software version you lawfully obtained and
|
|
166
|
+
embedded in such delivered or published work before termination.
|
|
167
|
+
|
|
168
|
+
For those grandfathered artifacts only, the rights needed to keep them
|
|
169
|
+
running under a Permitted Use continue on a perpetual, royalty-free basis
|
|
170
|
+
even after termination, and do not require a new license grant. Ordinary
|
|
171
|
+
maintenance of those artifacts is included and may cover bug fixes,
|
|
172
|
+
security updates to dependencies, rebuilds for updated toolchains (for
|
|
173
|
+
example a newer Node.js or bundler), and other changes reasonably
|
|
174
|
+
necessary to keep an already delivered or already live project operating
|
|
175
|
+
as previously shipped. That maintenance right does not authorize new
|
|
176
|
+
projects, new distributions, or using the Software to start work that was
|
|
177
|
+
not already covered under Section VI(c)(i)–(iii) before termination.
|
|
178
|
+
|
|
179
|
+
(d) Survival. Sections IV, V, VI, and VII survive termination.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
VII. MISCELLANEOUS
|
|
183
|
+
|
|
184
|
+
(a) Amendments. The Copyright Holder may update this License by publishing a
|
|
185
|
+
revised text with the Software.
|
|
186
|
+
|
|
187
|
+
(i) Versions you already obtained remain under the License terms that
|
|
188
|
+
applied when you obtained them.
|
|
189
|
+
|
|
190
|
+
(ii) New Software versions first published after revised terms are
|
|
191
|
+
published are offered under those revised terms. By downloading,
|
|
192
|
+
installing, or using such a later version, you accept the then-
|
|
193
|
+
current terms for that version only (to the extent such acceptance
|
|
194
|
+
is recognized under applicable law).
|
|
195
|
+
|
|
196
|
+
(iii) Patch, bug-fix, or security releases that the Copyright Holder
|
|
197
|
+
expressly designates as continuing under the same License text as
|
|
198
|
+
a prior version may be obtained and used under that prior text,
|
|
199
|
+
even if a newer License text exists for other releases.
|
|
200
|
+
|
|
201
|
+
Nothing in this Section VII(a) allows the Copyright Holder to re-license,
|
|
202
|
+
by amendment alone, a Software version you already lawfully obtained.
|
|
203
|
+
|
|
204
|
+
(b) Entire agreement. This License constitutes the entire agreement regarding
|
|
205
|
+
the Software, unless you have a separate written agreement with the
|
|
206
|
+
Copyright Holder that expressly supersedes it.
|
|
207
|
+
|
|
208
|
+
(c) Severability. If any provision is held unenforceable, the remainder stays
|
|
209
|
+
in effect.
|
|
210
|
+
|
|
211
|
+
(d) No waiver. Failure to enforce any provision is not a waiver of future
|
|
212
|
+
enforcement.
|
|
213
|
+
|
|
214
|
+
(e) Governing law and jurisdiction. This License is governed by the laws of
|
|
215
|
+
France, excluding its conflict-of-law rules. Any dispute arising out of or
|
|
216
|
+
in connection with this License shall be submitted to the competent courts
|
|
217
|
+
of France, subject to any mandatory rules of jurisdiction and applicable
|
|
218
|
+
consumer protection laws.
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
FAQ (informative only; does not modify the License)
|
|
222
|
+
---------------------------------------------------
|
|
223
|
+
|
|
224
|
+
Q: Can I use upwwwards in a paid client website or SaaS product UI?
|
|
225
|
+
A: Yes — that is a Permitted Use, including commercial projects.
|
|
226
|
+
|
|
227
|
+
Q: Can AI tools generate code that calls upwwwards APIs?
|
|
228
|
+
A: Yes. Generating integration code for a Permitted Use is fine. Shipping a
|
|
229
|
+
Competitive Product or republishing the Software source is not.
|
|
230
|
+
|
|
231
|
+
Q: If the License is terminated, do my client sites have to go offline?
|
|
232
|
+
A: No. Section VI(c) grandfathers delivered and already-published Permitted
|
|
233
|
+
Uses (and the Software versions embedded in them). Termination stops new
|
|
234
|
+
use and new projects, after notice and an uncured breach.
|
|
235
|
+
|
|
236
|
+
Q: Can I patch or fork the Software for my own app?
|
|
237
|
+
A: Yes. Section II allows private forks and modifications for internal use or
|
|
238
|
+
a Permitted Use (including shipping those mods inside a client deployment).
|
|
239
|
+
Publishing a public fork or alternate package is not allowed.
|
|
240
|
+
|
|
241
|
+
Q: Must client sites show upwwwards branding?
|
|
242
|
+
A: No. Section III(f) keeps copyright/license notices in the distribution
|
|
243
|
+
where practicable, but does not require UI trademarks or branding.
|
|
244
|
+
|
|
245
|
+
Q: Can my npm package (e.g. my-framework) depend on upwwwards?
|
|
246
|
+
A: Yes. Section II allows distributing the Software as a dependency of your
|
|
247
|
+
own package so installs pull the official upwwwards package, provided it
|
|
248
|
+
enables a Permitted Use, is not a Competitive Product, and is not a
|
|
249
|
+
modified or rebranded standalone republish of the Software.
|
|
250
|
+
|
|
251
|
+
Q: If my package is MIT (or another OSS license), does that open-source
|
|
252
|
+
upwwwards?
|
|
253
|
+
A: No. Section II(d) is clear: recipients of your package are licensed for
|
|
254
|
+
the Software only under this License, not under broader terms of your
|
|
255
|
+
package. Publishing an MIT (or similar) wrapper that depends on upwwwards
|
|
256
|
+
does not make upwwwards open source; your users must still comply with
|
|
257
|
+
this License for the Software itself.
|
|
258
|
+
|
|
259
|
+
Q: Is the license perpetual for my client’s shipped site?
|
|
260
|
+
A: For grandfathered delivered / already-live Permitted Uses, Section VI(c)
|
|
261
|
+
keeps the rights needed to run those artifacts perpetual and royalty-free,
|
|
262
|
+
even if your License later terminates. That does not cover new projects
|
|
263
|
+
after termination.
|
|
264
|
+
|
|
265
|
+
Q: What counts as a Competitive Product?
|
|
266
|
+
A: A package that mainly reproduces upwwwards’ functionality and is marketed
|
|
267
|
+
as a substitute can be competitive. A package that depends on upwwwards to
|
|
268
|
+
add complementary features (for example a larger site framework, router,
|
|
269
|
+
or UI toolkit that uses upwwwards for page lifecycle / animation) is not
|
|
270
|
+
automatically a Competitive Product solely for that reason.
|
|
271
|
+
|
|
272
|
+
Q: What is allowed at a glance?
|
|
273
|
+
A: Use in client/commercial sites: yes. Private patches for your project: yes.
|
|
274
|
+
npm package depending on upwwwards: yes. Distributed modified fork: no.
|
|
275
|
+
Competing / rebranded standalone package: no.
|
|
276
|
+
|
|
277
|
+
Q: Is this MIT / Apache / GPL?
|
|
278
|
+
A: No. This is a proprietary no-charge standard-use license.
|
package/README.md
CHANGED
|
@@ -1,3 +1,188 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# upwwwards
|
|
2
|
+
|
|
3
|
+
**One shared page lifecycle, one frame loop, and opt-in plugins for Nuxt 4 and SvelteKit 2.**
|
|
4
|
+
|
|
5
|
+
Every feature in your app subscribes to the same cues — leave, enter, ready — and the same `requestAnimationFrame` budget, instead of each one wiring its own router hooks, scroll library, GSAP context, or render loop. Plugins (Scroll, Anime, Synthra, …) are optional; the core works on its own.
|
|
6
|
+
|
|
7
|
+
*(Think of it as a conductor: the framework is the stage, `Up` keeps everyone on the same beat.)*
|
|
8
|
+
|
|
9
|
+
**Free for commercial use** under a proprietary Standard “No Charge” license (not OSI open source). Details: [docs/advanced/license.md](docs/advanced/license.md) · [`LICENSE`](LICENSE)
|
|
10
|
+
|
|
11
|
+
**Requirements:** Nuxt 4 or SvelteKit 2 · Vite 7 · TypeScript recommended · Version `0.1.0-beta.1`
|
|
12
|
+
|
|
13
|
+
| You want… | upwwwards gives you… |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| Leave / enter / ready that matches the router | `Up.Event` + `Up.Adapter` |
|
|
16
|
+
| One `requestAnimationFrame` budget for the app | `Up.Thread` |
|
|
17
|
+
| Viewport metrics, cache, “wait before ready” | `Up.App` |
|
|
18
|
+
| GSAP / Lenis / Three without ad-hoc glue | Opt-in [plugins](docs/plugins.md) |
|
|
19
|
+
| The same spine on Nuxt *or* SvelteKit | Vite `adapter: 'nuxt' \| 'svelte'` |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install upwwwards
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`pnpm add`, `yarn add`, and `bun add` work the same way.
|
|
30
|
+
|
|
31
|
+
Peer dependencies are optional and match what you enable (`gsap`, `lenis`, `three`, …). See [Getting started](docs/getting-started.md).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
Two steps (Vite plugin, then root layout). After that you should see `LIFE` then `LOAD` in the console on first paint (and again after each client navigation).
|
|
38
|
+
|
|
39
|
+
**Glossary:** `DEATH` = leave · `LIFE` = enter · `LOAD` = ready. Build on `LIFE`, tear down on `DEATH`.
|
|
40
|
+
|
|
41
|
+
### Nuxt 4
|
|
42
|
+
|
|
43
|
+
**1 — Vite plugin** — `nuxt.config.ts`:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import initializer from 'upwwwards/initializers/vite'
|
|
47
|
+
|
|
48
|
+
export default defineNuxtConfig({
|
|
49
|
+
vite: {
|
|
50
|
+
plugins: [initializer({ adapter: 'nuxt' })]
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**2 — Start once** — `app/layouts/default.vue`:
|
|
56
|
+
|
|
57
|
+
```vue
|
|
58
|
+
<script lang="ts" setup>
|
|
59
|
+
import Up from 'upwwwards'
|
|
60
|
+
|
|
61
|
+
const router = useRouter()
|
|
62
|
+
const { hook } = useNuxtApp()
|
|
63
|
+
|
|
64
|
+
Up.set({ hook, router })
|
|
65
|
+
|
|
66
|
+
Up.Event.sub([
|
|
67
|
+
['DEATH', () => console.log('DEATH')],
|
|
68
|
+
['LIFE', () => console.log('LIFE')],
|
|
69
|
+
['LOAD', () => console.log('LOAD')]
|
|
70
|
+
])
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<slot />
|
|
75
|
+
</template>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### SvelteKit 2
|
|
79
|
+
|
|
80
|
+
**1 — Vite plugin** — `vite.config.ts`:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import { sveltekit } from '@sveltejs/kit/vite'
|
|
84
|
+
import { defineConfig } from 'vite'
|
|
85
|
+
import initializer from 'upwwwards/initializers/vite'
|
|
86
|
+
|
|
87
|
+
export default defineConfig({
|
|
88
|
+
plugins: [
|
|
89
|
+
initializer({ adapter: 'svelte' }),
|
|
90
|
+
sveltekit()
|
|
91
|
+
]
|
|
92
|
+
})
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**2 — Start once** — `src/routes/+layout.svelte`:
|
|
96
|
+
|
|
97
|
+
```svelte
|
|
98
|
+
<script lang="ts">
|
|
99
|
+
import { beforeNavigate, onNavigate, afterNavigate } from '$app/navigation'
|
|
100
|
+
import Up from 'upwwwards'
|
|
101
|
+
|
|
102
|
+
let { children } = $props()
|
|
103
|
+
|
|
104
|
+
Up.set({ beforeNavigate, onNavigate, afterNavigate })
|
|
105
|
+
|
|
106
|
+
Up.Event.sub([
|
|
107
|
+
['DEATH', () => console.log('DEATH')],
|
|
108
|
+
['LIFE', () => console.log('LIFE')],
|
|
109
|
+
['LOAD', () => console.log('LOAD')]
|
|
110
|
+
])
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
{@render children()}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If nothing logs on first paint, subscribe earlier (right after `Up.set`) — [getting-started — First load](docs/getting-started.md#first-load-note).
|
|
117
|
+
|
|
118
|
+
Full walkthrough + SSR: **[Getting started](docs/getting-started.md)** · Mental model: **[concepts](docs/concepts.md)**
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## What you get
|
|
123
|
+
|
|
124
|
+
- **Common spine** — `Up.Adapter`, `Up.App`, `Up.Thread`, `Up.Event` on both hosts
|
|
125
|
+
- **Predictable page cycle** — construct on `LIFE`, destroy on `DEATH`
|
|
126
|
+
- **Opt-in plugins** — Scroll (Lenis), Anime (GSAP), Synthra (Three.js), Screen, Observer, Transmitter, Puppeteer (DOM helpers)
|
|
127
|
+
- **Build-time wiring** — adapter selection, generated types, optional Classter CSS
|
|
128
|
+
- **SSR helpers** — `upwwwards/contexts/nuxt` or `…/sveltekit`
|
|
129
|
+
- **Standalone scripts** — `Wait`, `Logs`, `Maths`, … from `upwwwards/scripts` (no `Up.set` needed)
|
|
130
|
+
|
|
131
|
+
Compared to wiring router hooks + GSAP Context + Lenis yourself: one place to subscribe, one teardown story, one frame scheduler.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Showcase (Anime)
|
|
136
|
+
|
|
137
|
+
**Optional** — needs `plugins: ['Anime']` and `npm install gsap`. Skip on a first read; more patterns: **[docs/recipes.md](docs/recipes.md)**.
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
import Up from 'upwwwards'
|
|
141
|
+
|
|
142
|
+
const KEY = Symbol('Hero')
|
|
143
|
+
|
|
144
|
+
function build() {
|
|
145
|
+
Up.Anime.sub(KEY, ({ gsap }) => {
|
|
146
|
+
gsap.from('.hero', { opacity: 0, y: 40, duration: 0.8 })
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function teardown() {
|
|
151
|
+
Up.Anime.unsub(KEY)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
Up.Event.sub([
|
|
155
|
+
['LIFE', build],
|
|
156
|
+
['DEATH', teardown]
|
|
157
|
+
])
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Documentation
|
|
163
|
+
|
|
164
|
+
Docs live in this repo (`docs/`, this README, [`llms.txt`](llms.txt)). A hosted site and changelog are planned.
|
|
165
|
+
|
|
166
|
+
| Path | Start here if… |
|
|
167
|
+
| --- | --- |
|
|
168
|
+
| [docs/getting-started.md](docs/getting-started.md) | You are wiring a project today |
|
|
169
|
+
| [docs/concepts.md](docs/concepts.md) | You want the mental model |
|
|
170
|
+
| [docs/core.md](docs/core.md) | You need `App` / `Thread` / `Event` detail |
|
|
171
|
+
| [docs/recipes.md](docs/recipes.md) | You want copy-paste patterns |
|
|
172
|
+
| [docs/faq.md](docs/faq.md) | Something behaves unexpectedly |
|
|
173
|
+
| [docs/compatibility.md](docs/compatibility.md) | Host / peer version matrix |
|
|
174
|
+
| [docs/plugins.md](docs/plugins.md) | You enable Scroll, Anime, Synthra, … |
|
|
175
|
+
| [docs/scripts.md](docs/scripts.md) | Standalone utilities |
|
|
176
|
+
| [docs/index.md](docs/index.md) | Full map |
|
|
177
|
+
|
|
178
|
+
API pages use 🟢 **Essentials** · 🟡 **Going further** · ⬛ **Under the hood** — only Essentials is required.
|
|
179
|
+
|
|
180
|
+
Layers: [initializers](docs/initializers.md) · [adapters](docs/adapters.md) · [contexts](docs/contexts.md) · [classter](docs/classter.md) · [symbols](docs/advanced/symbols.md)
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
|
|
184
|
+
See the summary at the top, [`LICENSE`](LICENSE), and [docs/advanced/license.md](docs/advanced/license.md).
|
|
185
|
+
|
|
186
|
+
## For AI agents
|
|
187
|
+
|
|
188
|
+
[`llms.txt`](llms.txt) → [getting-started](docs/getting-started.md) → [concepts](docs/concepts.md) → [core](docs/core.md). Prefer public entry points; don’t assume MIT/Apache rights.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { Property, SpreadElement, Expression, PrivateIdentifier, Pattern } from 'estree';
|
|
2
|
+
|
|
3
|
+
declare const run: unique symbol;
|
|
4
|
+
declare const runProperties: unique symbol;
|
|
5
|
+
declare const push: unique symbol;
|
|
6
|
+
declare const check: unique symbol;
|
|
7
|
+
declare namespace Classter {
|
|
8
|
+
/**
|
|
9
|
+
* Attribute / prop name scanned for class tokens (e.g. `"class"`, or a custom name such as `"innerClass"`).
|
|
10
|
+
*/
|
|
11
|
+
type IDENTIFIER = string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Base of Classter, the optional atomic-CSS generator, shared by the framework analyzers
|
|
15
|
+
* `Vue` (`upwwwards/classter/Vue`) and `Svelte` (`upwwwards/classter/Svelte`).
|
|
16
|
+
*
|
|
17
|
+
* Templates and HTML are scanned for class tokens shaped `alias:value`, `alias:[value]` or `alias:value:pseudo`:
|
|
18
|
+
* - `alias` is a shortcut of a CSS property (`pa` for `padding`, `ba-co` for `background-color`, see `props`; extend with {@link Classter.addAlias}).
|
|
19
|
+
* - a bracketed value may also contain `:` or `[`, and `_` stands for a space (`ma:[0_auto]` gives `margin:0 auto`).
|
|
20
|
+
* - `pseudo` is `:before` or `:after` (`co:[#fff]:before`).
|
|
21
|
+
*
|
|
22
|
+
* Each valid token becomes one CSS rule, collected into the stylesheet returned by {@link Classter.get}.
|
|
23
|
+
* The Vite plugin serves it as the virtual module `classter.css`. All state is static and shared by the subclasses.
|
|
24
|
+
*/
|
|
25
|
+
declare abstract class Classter {
|
|
26
|
+
#private;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the "stylesheet changed" flag; the Vite plugin resets it to `false` after reloading `classter.css`.
|
|
29
|
+
* Shared across the inheritance hierarchy.
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
static set updated(b: boolean);
|
|
33
|
+
/**
|
|
34
|
+
* Enables / disables warnings about unknown aliases and expressions that cannot be analyzed statically.
|
|
35
|
+
* Set to `false` by the `silent` option of the Vite plugin. Shared across the inheritance hierarchy.
|
|
36
|
+
*/
|
|
37
|
+
static set warn(b: boolean);
|
|
38
|
+
/**
|
|
39
|
+
* Sets the component file extension (`.vue` / `.svelte`) whose files are passed to `analyze`; set by the Vite plugin from the adapter.
|
|
40
|
+
* Shared across the inheritance hierarchy.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
static set ext(s: string);
|
|
44
|
+
/**
|
|
45
|
+
* Attribute names whose values are scanned as class lists: `"class"` plus names added with {@link Classter.addClassIdentifiers}.
|
|
46
|
+
*/
|
|
47
|
+
static get CLASS_IDENTIFIERS(): Classter.IDENTIFIER[];
|
|
48
|
+
/**
|
|
49
|
+
* Attribute names whose object-literal values are scanned for class identifiers (added with {@link Classter.addAttributesIdentifiers}).
|
|
50
|
+
*/
|
|
51
|
+
static get ATTRIBUTES_IDENTIFIERS(): Classter.IDENTIFIER[];
|
|
52
|
+
/**
|
|
53
|
+
* `true` when at least one new rule was registered since the flag was last reset.
|
|
54
|
+
*/
|
|
55
|
+
static get updated(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether warnings about unknown aliases and expressions that cannot be analyzed statically are logged. Default `true`.
|
|
58
|
+
*/
|
|
59
|
+
static get warn(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Component file extension (`.vue` / `.svelte`) whose files are passed to `analyze`; empty until set by the Vite plugin.
|
|
62
|
+
*/
|
|
63
|
+
static get ext(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Builds the stylesheet from every registered token: one rule per token, with the token escaped as class selector
|
|
66
|
+
* (e.g. `.pa\:1rem{padding:1rem}`).
|
|
67
|
+
* @returns Concatenated CSS rules, or an empty string when no token is registered.
|
|
68
|
+
*/
|
|
69
|
+
static get(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Adds attribute / prop names whose values are scanned as class lists, in addition to `class`.
|
|
72
|
+
* Usually set through `classter.identifiers.class` of the Vite plugin.
|
|
73
|
+
* @param identifiers Names to add (each stored in lowercase and kebab-case, e.g. `innerClass` gives `innerclass` and `inner-class`).
|
|
74
|
+
*/
|
|
75
|
+
static addClassIdentifiers(identifiers: Classter.IDENTIFIER[]): void;
|
|
76
|
+
/**
|
|
77
|
+
* Adds attribute / prop names whose object-literal values are scanned for class identifiers
|
|
78
|
+
* (e.g. `attrs` for `attrs={{ class: 'pa:1rem' }}`). Usually set through `classter.identifiers.attributes` of the Vite plugin.
|
|
79
|
+
* @param identifiers Names to add (each stored in lowercase and kebab-case).
|
|
80
|
+
*/
|
|
81
|
+
static addAttributesIdentifiers(identifiers: Classter.IDENTIFIER[]): void;
|
|
82
|
+
/**
|
|
83
|
+
* Registers custom aliases, each mapping a shortcut to a CSS property, on the shared alias table.
|
|
84
|
+
* Usually set through `classter.alias` of the Vite plugin.
|
|
85
|
+
* Logs a warning and skips the entry when the key is not lowercase letters / hyphens (optionally prefixed with `@`),
|
|
86
|
+
* when the key is already used, or when the property is not a valid name (letters, digits, `_`, `-`).
|
|
87
|
+
* @param alias Map of shortcut keys to CSS property names.
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* import Vue from 'upwwwards/classter/Vue'
|
|
91
|
+
*
|
|
92
|
+
* Vue.addAlias({ 'my-pa': 'padding', 'ac-co': 'accent-color' }) // 'ac-co' is already defined: warns and is skipped
|
|
93
|
+
*
|
|
94
|
+
* // <div class="my-pa:1rem"> now generates .my-pa\:1rem{padding:1rem}
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
static addAlias(alias: Record<string, string>): void;
|
|
98
|
+
/**
|
|
99
|
+
* Splits a whitespace-separated class string and registers each token; falsy values are ignored.
|
|
100
|
+
* @param _class Class attribute content (coerced via `toString`).
|
|
101
|
+
* @param id Source file id for warnings.
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
static [run](_class: string | number | bigint | boolean | RegExp | null | undefined, id: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Walks ESTree object properties: either push keys as class tokens, or follow class-identifier values.
|
|
107
|
+
* Recurses into nested `ObjectExpression` spreads.
|
|
108
|
+
* @param props Object properties (and spreads).
|
|
109
|
+
* @param checkKey When `true`, treat property keys as class tokens; otherwise resolve class-identifier values.
|
|
110
|
+
* @param id Source file id for warnings.
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
static [runProperties](props: (Property | SpreadElement)[], checkKey: boolean, id: string): void;
|
|
114
|
+
/**
|
|
115
|
+
* Analyzes a component source file and registers the class tokens it contains.
|
|
116
|
+
* Base implementation does nothing; overridden by `Vue` and `Svelte`. Called by the Vite plugin on transform.
|
|
117
|
+
* @param code Source file contents.
|
|
118
|
+
* @param id Source file id, used in warnings.
|
|
119
|
+
*/
|
|
120
|
+
static analyze(code: string, id: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* Analyzes raw HTML with a lightweight scan: only double-quoted `class="..."` attributes are read
|
|
123
|
+
* (custom class identifiers are ignored).
|
|
124
|
+
* @param code Raw HTML / markup string.
|
|
125
|
+
* @param id Source file id, used in warnings.
|
|
126
|
+
*/
|
|
127
|
+
static analyzeHTML(code: string, id: string): void;
|
|
128
|
+
/**
|
|
129
|
+
* Registers one token: parses `alias:value[:pseudo]`, resolves the alias, validates the value and pseudo-element,
|
|
130
|
+
* and stores the declaration (sets `updated` on first insert). Tokens not shaped like `alias:value` are ignored silently.
|
|
131
|
+
* @param _class Single class token (e.g. `pa:1rem` or `co:[#fff]:before`).
|
|
132
|
+
* @param id Source file id for unknown-alias warnings.
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
135
|
+
static [push](_class: string, id: string): void;
|
|
136
|
+
/**
|
|
137
|
+
* Walks an ESTree expression and extracts class tokens where statically knowable.
|
|
138
|
+
* Supports arrays, `+` of literals, logical / conditional, literals, templates, and objects.
|
|
139
|
+
* Identifiers and member expressions are intentionally skipped (runtime values).
|
|
140
|
+
* @param expression ESTree node to inspect.
|
|
141
|
+
* @param toString When `true`, mimic string coercion (objects not expanded as class maps; arrays with length ≠ 1 skipped).
|
|
142
|
+
* @param id Source file id for warnings.
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
static [check](expression: Expression | PrivateIdentifier | Pattern, toString: boolean, id: string): void;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export { Classter as C };
|