@joy-ride/joy-ride 0.8.0 → 0.9.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 +4 -2
- package/npm/bookmarklet.d.ts +2 -2
- package/npm/bookmarklet.js +1 -1
- package/npm/embed-chunks/{Documentation-COD3aHk0.js → Documentation-DBOvw4Ij.js} +2 -2
- package/npm/embed-chunks/bookmarklet-C3K26Y7k.js +12 -0
- package/npm/embed-chunks/{src-Dk3uJEXq.js → src-DYSy-EVA.js} +12 -12
- package/npm/embed-chunks/{vehicle-popover-BOloRPP9.js → vehicle-popover-DJ2SKhyg.js} +3 -3
- package/npm/embed.js +1 -1
- package/npm/index.d.ts +21 -9
- package/npm/index.js +1 -1
- package/npm/{playground-y4NLx1mF.d.ts → playground-BNQUTNXc.d.ts} +9 -9
- package/package.json +1 -1
- package/npm/embed-chunks/bookmarklet-DiJXCaH2.js +0 -20
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Drive through any website. Joy Ride turns page elements into a playground for ca
|
|
|
16
16
|
<script
|
|
17
17
|
type="module"
|
|
18
18
|
src="https://unpkg.com/@joy-ride/joy-ride@latest/npm/embed.js"
|
|
19
|
-
data-jr-
|
|
19
|
+
data-jr-mount
|
|
20
20
|
></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -26,7 +26,9 @@ Install the root package with `npm install @joy-ride/joy-ride` and import `JoyRi
|
|
|
26
26
|
|
|
27
27
|
Mark an initial destination with `data-jr-arrive-to` to have the car fade in and skid to that element automatically. Add `data-jr-arrive-to-delay-ms="1000"` to start the entrance one second after mount. Without a marker, the embed skids into the viewport center from a random direction. Call `ride.arriveAt({ ...options, delayMs: 1000 })` for a later entrance.
|
|
28
28
|
|
|
29
|
-
For a quieter embed,
|
|
29
|
+
For a quieter embed, add `data-jr-mount-preset="sfw"` to that script. You can also call `JoyRide.mount(JoyRide.getPreset('sfw', { options: { ui: { brandName: 'Drive' } } }))`. The preset disables numbered tools, vehicle names, deformation, and sparks while keeping Boost and slow motion available.
|
|
30
|
+
|
|
31
|
+
Pass mount options without page JavaScript by setting `data-jr-mount='{"options":{"autoPaint":true}}'`. In React, create the module script element with these attributes after the page content exists; the script mounts itself when loaded. Use `data-jr-mount="false"` to leave it unmounted.
|
|
30
32
|
|
|
31
33
|
Package owners can follow the [npm publishing guide](docs/npm-publishing.md) for later releases.
|
|
32
34
|
|
package/npm/bookmarklet.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as PlaygroundConfiguration } from "./playground-
|
|
1
|
+
import { c as PlaygroundConfiguration } from "./playground-BNQUTNXc.js";
|
|
2
2
|
/** A self-contained bookmark URL that captures the complete configuration. */
|
|
3
3
|
export declare function bookmarkletUrl(configuration: PlaygroundConfiguration): string;
|
|
4
|
-
/** A
|
|
4
|
+
/** A declarative CDN embed that mounts from its own attributes. */
|
|
5
5
|
export declare function fullEmbedCode(configuration: PlaygroundConfiguration): string;
|
|
6
6
|
/** Browser-native, on-demand CDN loading for a client-side application or React effect. */
|
|
7
7
|
export declare function asyncEmbedCode(configuration: PlaygroundConfiguration): string;
|
package/npm/bookmarklet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as asyncEmbedCode,n as bookmarkletUrl,r as fullEmbedCode,i as npmEmbedCode}from"./embed-chunks/bookmarklet-
|
|
1
|
+
export{t as asyncEmbedCode,n as bookmarkletUrl,r as fullEmbedCode,i as npmEmbedCode}from"./embed-chunks/bookmarklet-C3K26Y7k.js";
|