@joy-ride/game 0.25.0 → 0.25.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/README.md +3 -0
- package/embed-chunks/{CodeBlock-SbsdRltK.js → CodeBlock-DMi-BeLY.js} +1 -1
- package/embed-chunks/{Documentation-it27YLKx.js → Documentation-CI9JoAsv.js} +2 -2
- package/embed-chunks/{EmbedPanel-yRsx9glF.js → EmbedPanel-CgEZTMF7.js} +1 -1
- package/embed-chunks/{JoyRideView-o-2qdJkr.js → JoyRideView-C3AYwIPH.js} +1 -1
- package/embed-chunks/{src-BJXg-amK.js → src-v4km-Xn-.js} +2 -2
- package/embed-chunks/{vehicle-popover-CtdtJ1cl.js → vehicle-popover-CBTIiR6Q.js} +1 -1
- package/embed.js +1 -1
- package/{index-sebzwsKw.d.ts → index-BqJy85Tu.d.ts} +12 -8
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/npm-chunks/{Documentation-B6U46upd.js → Documentation-D5RIEQza.js} +2 -2
- package/npm-chunks/{EmbedPanel-dnDwQhT5.js → EmbedPanel-COgcEIgT.js} +1 -1
- package/npm-chunks/{vehicle-popover-D0e1ZKfF.js → vehicle-popover-CbBEYEjM.js} +1 -1
- package/package.json +1 -1
- package/react.d.ts +5 -3
- package/react.js +1 -1
package/embed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t,r as n}from"./embed-chunks/controls~index~embed-B_C92tUz.js";import{t as r}from"./embed-chunks/definitions~index~embed-CDMM_m1T.js";import{i,n as a,r as o,t as s}from"./embed-chunks/configuration~index~embed-CG9auZKS.js";import{a as c,c as l,i as u,l as d,t as f}from"./embed-chunks/vehicle-catalog~index~embed-DcyLaPhV.js";import{n as p,r as m,t as h}from"./embed-chunks/src-
|
|
1
|
+
import{n as e,o as t,r as n}from"./embed-chunks/controls~index~embed-B_C92tUz.js";import{t as r}from"./embed-chunks/definitions~index~embed-CDMM_m1T.js";import{i,n as a,r as o,t as s}from"./embed-chunks/configuration~index~embed-CG9auZKS.js";import{a as c,c as l,i as u,l as d,t as f}from"./embed-chunks/vehicle-catalog~index~embed-DcyLaPhV.js";import{n as p,r as m,t as h}from"./embed-chunks/src-v4km-Xn-.js";var g=`script[data-jr-mount]`;function _(e){if(e.nodeType!==1)return!1;let t=e;return t.matches(g)||!!t.querySelector(g)}function v(e){let t=e.getAttribute(`data-jr-mount`);if(t===`false`||t===null)return null;let n=!t||t===`true`?{}:JSON.parse(t);if(!n||typeof n!=`object`||Array.isArray(n))throw TypeError(`data-jr-mount must be true or a JSON object`);let r=e.getAttribute(`data-jr-mount-preset`),a=r?i(r,n):n,o=e.getAttribute(`data-jr-dialog-theme`);if(o!==null){if(o!==`auto`&&o!==`light`&&o!==`dark`)throw TypeError(`data-jr-dialog-theme must be auto, light, or dark`);a.dialog={...a.dialog,dialogTheme:o}}let s=e.getAttribute(`data-jr-accent-color`),c=e.getAttribute(`data-jr-dialog-font-family`);if(s!==null||c!==null){if(s!==null&&!/^#[\da-f]{6}$/i.test(s))throw TypeError(`data-jr-accent-color must be six-digit hex`);if(c!==null&&!c.trim())throw TypeError(`data-jr-dialog-font-family must be a CSS font-family value`);a.dialog={...a.dialog,...s===null?{}:{accentColor:s},...c===null?{}:{dialogFontFamily:c}}}for(let[t,n]of[[`vehicle`,`data-jr-persist-vehicle`],[`audio`,`data-jr-persist-audio`]]){let r=e.getAttribute(n);if(r!==null){if(r!==``&&r!==`true`&&r!==`false`)throw TypeError(`${n} must be true or false`);a.persist={...a.persist,[t]:r!==`false`}}}return a}function y(e){let t=e.getAttribute(`data-jr-unmount`);if(t===null||t===`false`||t===`none`)return{route:!1,remove:!1};if(t===``||t===`true`)return{route:!0,remove:!0};let n=t.trim().split(/[\s,]+/);if(n.some(e=>e!==`route`&&e!==`remove`))throw TypeError(`data-jr-unmount accepts route, remove, or both`);return{route:n.includes(`route`),remove:n.includes(`remove`)}}function b(e,t){let n=e.location.href,r=e.history,i=r.pushState,a=r.replaceState,o=!0,s=()=>{o&&e.location.href!==n&&t()},c=function(...e){i.apply(this,e),s()},l=function(...e){a.apply(this,e),s()};return r.pushState=c,r.replaceState=l,e.addEventListener(`popstate`,s),e.addEventListener(`hashchange`,s),()=>{o=!1,e.removeEventListener(`popstate`,s),e.removeEventListener(`hashchange`,s),r.pushState===c&&(r.pushState=i),r.replaceState===l&&(r.replaceState=a)}}function x(e,t=document,n=window){let r=new WeakSet,i,a,o=()=>{if(!e.active){for(let s of t.querySelectorAll(g))if(!r.has(s)&&s.isConnected)try{let c=v(s),l=y(s);if(r.add(s),!c)continue;let u=e.mount(c);i={script:s,controller:u,remove:l.remove,route:l.route,href:n.location.href};let d=l.route?b(n,()=>u.dispose()):()=>{};u.on(`dispose`,()=>{d(),i?.controller===u&&(i=void 0),queueMicrotask(o)}),(l.route||l.remove)&&!a&&(a=new MutationObserver(t=>{i?.route&&n.location.href!==i.href&&i.controller.dispose(),i?.remove&&!i.script.isConnected&&i.controller.dispose(),!e.active&&t.some(e=>[...e.addedNodes].some(_))&&o()}),a.observe(t.documentElement,{childList:!0,subtree:!0}));break}catch(e){r.add(s),console.error(`Joy Ride could not mount from script attributes`,e)}}};t.readyState===`loading`?t.addEventListener(`DOMContentLoaded`,o,{once:!0}):queueMicrotask(o)}typeof window<`u`&&(window.JoyRide=h,x(h));var S=h;export{f as availableVehicleTools,S as default,r as define,p as getActive,i as getMountPreset,c as getVehiclePreset,t as keyboardControls,l as listVehicleOptions,d as listVehiclePresets,m as mount,e as overlayLayers,n as overlayZIndex,s as publicDataAttributeNames,a as publicDataAttributePrefixes,o as publicDataAttributes,u as vehicleTools};
|
|
@@ -999,12 +999,12 @@ declare class VehicleEntity {
|
|
|
999
999
|
id: string;
|
|
1000
1000
|
label: string;
|
|
1001
1001
|
appearance: "auto" | "light" | "dark";
|
|
1002
|
-
slots: Readonly<Partial<Record<1 | 2 |
|
|
1003
|
-
slotHeld: (1 | 2 |
|
|
1004
|
-
slotPulses: (1 | 2 |
|
|
1005
|
-
slotPresses: (1 | 2 |
|
|
1006
|
-
blockedSlots: (1 | 2 |
|
|
1007
|
-
previousSlotInput: (1 | 2 |
|
|
1002
|
+
slots: Readonly<Partial<Record<1 | 2 | 4 | 3 | 5 | 8 | 9 | 7 | 6, false | VehicleSlot>>>;
|
|
1003
|
+
slotHeld: (1 | 2 | 4 | 3 | 5 | 8 | 9 | 7 | 6)[];
|
|
1004
|
+
slotPulses: (1 | 2 | 4 | 3 | 5 | 8 | 9 | 7 | 6)[];
|
|
1005
|
+
slotPresses: (1 | 2 | 4 | 3 | 5 | 8 | 9 | 7 | 6)[];
|
|
1006
|
+
blockedSlots: (1 | 2 | 4 | 3 | 5 | 8 | 9 | 7 | 6)[];
|
|
1007
|
+
previousSlotInput: (1 | 2 | 4 | 3 | 5 | 8 | 9 | 7 | 6)[];
|
|
1008
1008
|
activeEmitters: {
|
|
1009
1009
|
slot: SlotNumber;
|
|
1010
1010
|
liquid: string;
|
|
@@ -1862,7 +1862,7 @@ declare class Odometer {
|
|
|
1862
1862
|
mode: "screen" | "print";
|
|
1863
1863
|
};
|
|
1864
1864
|
restoreState(state: ReturnType<Odometer['captureState']>): void;
|
|
1865
|
-
get dpi():
|
|
1865
|
+
get dpi(): 96 | 300;
|
|
1866
1866
|
cycleDpi(): DistanceReadout;
|
|
1867
1867
|
flush(): void;
|
|
1868
1868
|
get kilometers(): number;
|
|
@@ -2383,6 +2383,10 @@ declare const keyboardControls: readonly [{
|
|
|
2383
2383
|
}];
|
|
2384
2384
|
declare const getActive: () => RideController | undefined;
|
|
2385
2385
|
declare const mount: (input?: MountOptions | PlaygroundConfiguration) => RideController;
|
|
2386
|
+
declare const presets: {
|
|
2387
|
+
sfw: RuntimeOptionsPatch;
|
|
2388
|
+
};
|
|
2389
|
+
type MountPreset = keyof typeof presets;
|
|
2386
2390
|
/** Return ordinary mount options. Overrides win within each runtime group. */
|
|
2387
2391
|
declare function getMountPreset(id: string, overrides?: MountOptions): MountOptions;
|
|
2388
2392
|
/** Public HTML authoring vocabulary, grouped by the feature that consumes it. */
|
|
@@ -2489,4 +2493,4 @@ declare const api: {
|
|
|
2489
2493
|
readonly codes: readonly ["Escape"];
|
|
2490
2494
|
}];
|
|
2491
2495
|
};
|
|
2492
|
-
export {
|
|
2496
|
+
export { listVehicleOptions as C, overlayLayers as D, vehicleTools as E, overlayZIndex as O, getVehiclePreset as S, availableVehicleTools as T, PlayerEntryResult as _, MountPreset as a, PageDebrisHandle as b, mount as c, MountOptions as d, PlaygroundEventMap as f, PlayerEntryOptions as g, PageTarget as h, publicDataAttributes as i, keyboardControls as l, RideController as m, publicDataAttributeNames as n, getMountPreset as o, PlaygroundState as p, publicDataAttributePrefixes as r, getActive as s, api as t, MountHostOptions as u, VehicleHandle as v, listVehiclePresets as w, PageDebrisTarget as x, VehicleSpawnOptions as y };
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { B as RuntimeOptionsPatch, C as VehiclePatch, O as SlotNumber, S as VehicleConfiguration, V as VehicleHintOptions, _ as ObjectiveSpec, at as DebrisKind, c as PlaygroundConfiguration, d as DeepReadonly, f as ObjectPatch, g as ObjectiveProgress, h as ObjectiveHandle, it as DebrisHandle, l as definePlayground, m as ObjectiveEventDetail, nt as DebrisAnchor, ot as DebrisOptions, p as ObjectSpec, u as Appearance, v as ObjectiveType, w as PickupEffectInput, y as PlayerConfiguration, z as RuntimeOptions } from "./playground-DrT_x51v.js";
|
|
2
|
-
import { C as
|
|
3
|
-
export { type Appearance, type DebrisAnchor, type DebrisHandle, type DebrisKind, type DebrisOptions, type DeepReadonly, type MountHostOptions, type MountOptions, type ObjectPatch, type ObjectSpec, type ObjectiveEventDetail, type ObjectiveHandle, type ObjectiveProgress, type ObjectiveSpec, type ObjectiveType, type PageDebrisHandle, type PageDebrisTarget, type PageTarget, type PickupEffectInput, type PlayerConfiguration, type PlayerEntryOptions, type PlayerEntryResult, type PlaygroundConfiguration, type PlaygroundEventMap, type PlaygroundState, type RideController, type RuntimeOptions, type RuntimeOptionsPatch, type SlotNumber, type VehicleConfiguration, type VehicleHandle, type VehicleHintOptions, type VehiclePatch, type VehicleSpawnOptions, availableVehicleTools, api as default, definePlayground as define, getActive, getMountPreset, getVehiclePreset, keyboardControls, listVehicleOptions, listVehiclePresets, mount, overlayLayers, overlayZIndex, publicDataAttributeNames, publicDataAttributePrefixes, publicDataAttributes, vehicleTools };
|
|
2
|
+
import { C as listVehicleOptions, D as overlayLayers, E as vehicleTools, O as overlayZIndex, S as getVehiclePreset, T as availableVehicleTools, _ as PlayerEntryResult, a as MountPreset, b as PageDebrisHandle, c as mount, d as MountOptions, f as PlaygroundEventMap, g as PlayerEntryOptions, h as PageTarget, i as publicDataAttributes, l as keyboardControls, m as RideController, n as publicDataAttributeNames, o as getMountPreset, p as PlaygroundState, r as publicDataAttributePrefixes, s as getActive, t as api, u as MountHostOptions, v as VehicleHandle, w as listVehiclePresets, x as PageDebrisTarget, y as VehicleSpawnOptions } from "./index-BqJy85Tu.js";
|
|
3
|
+
export { type Appearance, type DebrisAnchor, type DebrisHandle, type DebrisKind, type DebrisOptions, type DeepReadonly, type MountHostOptions, type MountOptions, type MountPreset, type ObjectPatch, type ObjectSpec, type ObjectiveEventDetail, type ObjectiveHandle, type ObjectiveProgress, type ObjectiveSpec, type ObjectiveType, type PageDebrisHandle, type PageDebrisTarget, type PageTarget, type PickupEffectInput, type PlayerConfiguration, type PlayerEntryOptions, type PlayerEntryResult, type PlaygroundConfiguration, type PlaygroundEventMap, type PlaygroundState, type RideController, type RuntimeOptions, type RuntimeOptionsPatch, type SlotNumber, type VehicleConfiguration, type VehicleHandle, type VehicleHintOptions, type VehiclePatch, type VehicleSpawnOptions, availableVehicleTools, api as default, definePlayground as define, getActive, getMountPreset, getVehiclePreset, keyboardControls, listVehicleOptions, listVehiclePresets, mount, overlayLayers, overlayZIndex, publicDataAttributeNames, publicDataAttributePrefixes, publicDataAttributes, vehicleTools };
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t,r as n}from"./embed-chunks/controls~index~embed-B_C92tUz.js";import{t as r}from"./embed-chunks/definitions~index~embed-CDMM_m1T.js";import{i,n as a,r as o,t as s}from"./embed-chunks/configuration~index~embed-CG9auZKS.js";import{a as c,c as l,i as u,l as d,t as f}from"./embed-chunks/vehicle-catalog~index~embed-DcyLaPhV.js";import{n as p,r as m,t as h}from"./embed-chunks/src-
|
|
1
|
+
import{n as e,o as t,r as n}from"./embed-chunks/controls~index~embed-B_C92tUz.js";import{t as r}from"./embed-chunks/definitions~index~embed-CDMM_m1T.js";import{i,n as a,r as o,t as s}from"./embed-chunks/configuration~index~embed-CG9auZKS.js";import{a as c,c as l,i as u,l as d,t as f}from"./embed-chunks/vehicle-catalog~index~embed-DcyLaPhV.js";import{n as p,r as m,t as h}from"./embed-chunks/src-v4km-Xn-.js";export{f as availableVehicleTools,h as default,r as define,p as getActive,i as getMountPreset,c as getVehiclePreset,t as keyboardControls,l as listVehicleOptions,d as listVehiclePresets,m as mount,e as overlayLayers,n as overlayZIndex,s as publicDataAttributeNames,a as publicDataAttributePrefixes,o as publicDataAttributes,u as vehicleTools};
|