@joy-ride/joy-ride 0.8.1 → 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 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-auto
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, start with `JoyRide.mount(JoyRide.options.presets.sfw({ options: { ui: { brandName: 'Drive' } } }))`. Override only the settings you need; the preset supplies the rest.
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
 
@@ -1,7 +1,7 @@
1
- import { c as PlaygroundConfiguration } from "./playground-y4NLx1mF.js";
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 small HTML button that loads the CDN module only on demand. */
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;
@@ -1 +1 @@
1
- export{t as asyncEmbedCode,n as bookmarkletUrl,r as fullEmbedCode,i as npmEmbedCode}from"./embed-chunks/bookmarklet-wdtwjNRT.js";
1
+ export{t as asyncEmbedCode,n as bookmarkletUrl,r as fullEmbedCode,i as npmEmbedCode}from"./embed-chunks/bookmarklet-C3K26Y7k.js";