@joy-ride/game 0.28.0 → 0.29.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.
Files changed (51) hide show
  1. package/README.md +1 -0
  2. package/bookmarklet.d.ts +1 -1
  3. package/bookmarklet.js +1 -1
  4. package/embed-chunks/{CodeBlock-ZJVQKkJK.js → CodeBlock-C-uqwCCE.js} +1 -1
  5. package/embed-chunks/{Documentation-C1avN9ar.js → Documentation-CCpuHmnH.js} +3 -3
  6. package/embed-chunks/{EmbedPanel-G7q47IIF.js → EmbedPanel-CltTMTEZ.js} +1 -1
  7. package/embed-chunks/{JoyRideView-iI9D7qYG.js → JoyRideView-dbTrQ6zf.js} +1 -1
  8. package/embed-chunks/{configuration~index~embed-yIM-mirE.js → configuration~index~embed-E9p3ySKG.js} +1 -1
  9. package/embed-chunks/{configuration~index~embed~bookmarklet-D5yd-nGZ.js → configuration~index~embed~bookmarklet-5ym-TX_u.js} +1 -1
  10. package/embed-chunks/configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~Documentation~JoyRideView~~n76yhyet-C39ouO-X.js +1 -0
  11. package/embed-chunks/{configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~JoyRideView~browser-sessio~iaaa3ndj-DuwqBPZc.js → configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~JoyRideView~browser-sessio~iaaa3ndj-DF2q8EGO.js} +1 -1
  12. package/embed-chunks/{runtime~JoyRideView~browser-session-core-D0evk3rV.js → runtime~JoyRideView~browser-session-core-hIS-xQed.js} +1 -1
  13. package/embed-chunks/runtime~browser-session-core-DfamcX9U.js +1 -0
  14. package/embed-chunks/{runtime~index~embed-DRvLAw-Q.js → runtime~index~embed-Bm1M0iiY.js} +2 -2
  15. package/embed-chunks/{runtime~index~embed~vehicle-popover~browser-session-core~renderer-7QR7zJ4G.js → runtime~index~embed~vehicle-popover~browser-session-core~renderer-iEgK-2uE.js} +1 -1
  16. package/embed-chunks/{runtime~vehicle-popover-B9yI0IDm.js → runtime~vehicle-popover-CA1iUObq.js} +1 -1
  17. package/embed-chunks/{runtime~vehicle-popover~browser-session-core-CG3br9PK.js → runtime~vehicle-popover~browser-session-core-B5JA0YNt.js} +1 -1
  18. package/embed-chunks/{runtime~vehicle-popover~browser-session-core~renderer-D9Tkkuld.js → runtime~vehicle-popover~browser-session-core~renderer-FYzuLkAN.js} +1 -1
  19. package/embed-chunks/{runtime~vehicle-popover~renderer-CucvcM5-.js → runtime~vehicle-popover~renderer-B44auM3E.js} +1 -1
  20. package/embed-chunks/{src-DpO0cT8m.js → src-sen5Yp2R.js} +2 -2
  21. package/embed-chunks/{vehicle-catalog~index~embed-CP-EevYT.js → vehicle-catalog~index~embed-CKTjozQr.js} +1 -1
  22. package/embed-chunks/{vehicle-popover-Dn9KYK8F.js → vehicle-popover-RZXv8RjT.js} +1 -1
  23. package/embed.js +1 -1
  24. package/{index-CTJwxnBj.d.ts → index-DztYDfpU.d.ts} +9 -9
  25. package/index.d.ts +2 -2
  26. package/index.js +1 -1
  27. package/npm-chunks/{Documentation-C0eIjv6u.js → Documentation-DjEkQvvy.js} +3 -3
  28. package/npm-chunks/{EmbedPanel-f5UGGrmb.js → EmbedPanel-DBoR1Dci.js} +1 -1
  29. package/npm-chunks/{JoyRideView-D5KwW5-l.js → JoyRideView-CqVA2IWS.js} +1 -1
  30. package/npm-chunks/VehicleHint-BaLJr7O5.js +1 -0
  31. package/npm-chunks/{configuration~react-DUPESsWt.js → configuration~react-Wr_iMhZB.js} +1 -1
  32. package/npm-chunks/configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js +1 -0
  33. package/npm-chunks/{configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-PAwcrwen.js → configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-BLdLriTd.js} +1 -1
  34. package/npm-chunks/{configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core~renderer-DjaRQi9I.js → configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core~renderer-D5v3L-_1.js} +1 -1
  35. package/npm-chunks/{runtime~JoyRideView~browser-session-core-CqexK4_9.js → runtime~JoyRideView~browser-session-core-Del73NUd.js} +1 -1
  36. package/npm-chunks/runtime~browser-session-core-Cicrs9mu.js +1 -0
  37. package/npm-chunks/{runtime~react-BiRrgv8z.js → runtime~react-De_WENZT.js} +1 -1
  38. package/npm-chunks/{runtime~react~browser-session-core-BwCcJzcZ.js → runtime~react~browser-session-core-DPWW9TnO.js} +1 -1
  39. package/npm-chunks/{runtime~vehicle-popover~renderer-4k-iW9CG.js → runtime~vehicle-popover~renderer-CTrAfI2e.js} +1 -1
  40. package/npm-chunks/{sync-shadow-theme-BfMjtxaN.js → sync-shadow-theme-CTVN45GY.js} +1 -1
  41. package/npm-chunks/{theme-DdVUqUf4.js → theme-CyUONXaD.js} +1 -1
  42. package/npm-chunks/{vehicle-popover-CVncA-Cd.js → vehicle-popover-CAG797YN.js} +1 -1
  43. package/package.json +1 -1
  44. package/{playground-CSIrDKFk.d.ts → playground-B7tHL_J3.d.ts} +4 -3
  45. package/react.d.ts +7 -5
  46. package/react.js +10 -10
  47. package/embed-chunks/configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~Documentation~JoyRideView~~n76yhyet-CxkUNnei.js +0 -1
  48. package/embed-chunks/runtime~browser-session-core-Coi2m2K_.js +0 -1
  49. package/npm-chunks/VehicleHint-YUZ0kRNw.js +0 -1
  50. package/npm-chunks/configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-CxkUNnei.js +0 -1
  51. package/npm-chunks/runtime~browser-session-core-CnigdG4N.js +0 -1
package/README.md CHANGED
@@ -127,6 +127,7 @@ level, so the root import does not require them.
127
127
 
128
128
  - [Page objects](packages/ui/src/documentation/api.md#page-objects): make elements breakable, movable, crushable, or paintable.
129
129
  - [Objectives](packages/ui/src/documentation/api.md#objectives): collect pickups, crush or break targets, ignite objects, and reach a score.
130
+ - [Accessibility](packages/ui/src/documentation/api.md#accessibility): focus-scoped driving, autofocus, and embedding guidance.
130
131
  - [Settings](packages/ui/src/documentation/api.md#settings): configure sound, tools, lighting, and the vehicle hint.
131
132
  - [Script options](packages/ui/src/documentation/api.md#script-tag-options): choose an arrival target, apply presets, or handle page navigation.
132
133
  - [Advanced integrations](packages/ui/src/documentation/api.md#advanced-integrations): use your own interface or canvas.
package/bookmarklet.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as PlaygroundConfiguration } from "./playground-CSIrDKFk.js";
1
+ import { c as PlaygroundConfiguration } from "./playground-B7tHL_J3.js";
2
2
  /** A self-contained bookmark URL that captures the complete configuration. */
3
3
  export declare function bookmarkletUrl(configuration: PlaygroundConfiguration): string;
4
4
  /** A declarative CDN embed that mounts from its own attributes. */
package/bookmarklet.js CHANGED
@@ -1,4 +1,4 @@
1
- import{t as e}from"./embed-chunks/configuration~index~embed~bookmarklet-D5yd-nGZ.js";var t=`https://unpkg.com/@joy-ride/game@latest/embed.js`,n=`https://unpkg.com/@joy-ride/game@latest/index.js`;function r(n){let r=e(n),i=r.definitions?.vehicles;if(!i)return r;let a=typeof document<`u`&&document.baseURI||t;return{...r,definitions:{...r.definitions,vehicles:Object.fromEntries(Object.entries(i).map(([e,t])=>[e,{...t,...t.image?.src?{image:{...t.image,src:new URL(t.image.src,a).href}}:{}}]))}}}function i(e){return`javascript:(()=>{const u=${JSON.stringify(t)},o=${JSON.stringify(r(e))},d=window.JoyRide;if(d){d.active?d.active.dispose():d.mount(o);return}const s=document.createElement('script');s.type='module';s.src=u;s.async=true;s.charset='utf-8';s.onload=()=>window.JoyRide.mount(o);document.head.append(s)})()`}function a(e){return JSON.stringify(r(e),null,2).replace(/^(\s*)"([A-Za-z_$][\w$]*)":/gm,`$1$2:`).replace(/</g,`\\u003c`)}function o(e){return`<script
1
+ import{t as e}from"./embed-chunks/configuration~index~embed~bookmarklet-5ym-TX_u.js";var t=`https://unpkg.com/@joy-ride/game@latest/embed.js`,n=`https://unpkg.com/@joy-ride/game@latest/index.js`;function r(n){let r=e(n),i=r.definitions?.vehicles;if(!i)return r;let a=typeof document<`u`&&document.baseURI||t;return{...r,definitions:{...r.definitions,vehicles:Object.fromEntries(Object.entries(i).map(([e,t])=>[e,{...t,...t.image?.src?{image:{...t.image,src:new URL(t.image.src,a).href}}:{}}]))}}}function i(e){return`javascript:(()=>{const u=${JSON.stringify(t)},o=${JSON.stringify(r(e))},d=window.JoyRide;if(d){d.active?d.active.dispose():d.mount(o);return}const s=document.createElement('script');s.type='module';s.src=u;s.async=true;s.charset='utf-8';s.onload=()=>window.JoyRide.mount(o);document.head.append(s)})()`}function a(e){return JSON.stringify(r(e),null,2).replace(/^(\s*)"([A-Za-z_$][\w$]*)":/gm,`$1$2:`).replace(/</g,`\\u003c`)}function o(e){return`<script
2
2
  type="module"
3
3
  src="${t}"
4
4
  data-jr-mount='${JSON.stringify(r(e),null,2).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/'/g,`&#39;`).replace(/\n/g,`
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{r as n,t as r}from"./react-vendor~index~embed~vehicle-popover~EmbedPanel~Documentation~JoyRideView-DSe2UFlv.js";import{a as i,i as a,o,s}from"./X.es-BZV6GJho.js";import{T as c}from"./vehicle-popover-Dn9KYK8F.js";var l=t(n(),1),u=new Map([[`bold`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),l.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),d=l.forwardRef((e,t)=>l.createElement(a,{ref:t,...e,weights:u}));d.displayName=`CopyIcon`;var f=`identifier keyword string class property entity jsxliterals sign comment break space`.split(` `),[p,m,h,g,_,v,y,b,x,S,C]=f.map((e,t)=>t);new Map(f.map((e,t)=>[e,t]));function ee(e,t){let n=[],r=0,i=[],a=!1;function o(e){let t=``,i=Array(e.length);for(let n=0;n<e.length;n++){let[r,a]=e[n];t+=a,i[n]={type:f[r],value:a}}n.push({index:r++,value:t,tokens:i,annotations:[]})}for(let e=0;e<t.length;e++){let n=t[e],[r,s]=n;if(r!==S){if(s.includes(`
1
+ import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{r as n,t as r}from"./react-vendor~index~embed~vehicle-popover~EmbedPanel~Documentation~JoyRideView-DSe2UFlv.js";import{a as i,i as a,o,s}from"./X.es-BZV6GJho.js";import{T as c}from"./vehicle-popover-RZXv8RjT.js";var l=t(n(),1),u=new Map([[`bold`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),l.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),d=l.forwardRef((e,t)=>l.createElement(a,{ref:t,...e,weights:u}));d.displayName=`CopyIcon`;var f=`identifier keyword string class property entity jsxliterals sign comment break space`.split(` `),[p,m,h,g,_,v,y,b,x,S,C]=f.map((e,t)=>t);new Map(f.map((e,t)=>[e,t]));function ee(e,t){let n=[],r=0,i=[],a=!1;function o(e){let t=``,i=Array(e.length);for(let n=0;n<e.length;n++){let[r,a]=e[n];t+=a,i[n]={type:f[r],value:a}}n.push({index:r++,value:t,tokens:i,annotations:[]})}for(let e=0;e<t.length;e++){let n=t[e],[r,s]=n;if(r!==S){if(s.includes(`
2
2
  `)){let e=s.split(`
3
3
  `);for(let t=0;t<e.length;t++){let n=t<e.length-1,a=e[t];i.push([r,n&&a.endsWith(`\r`)?a.slice(0,-1):a]),n&&(o(i),i.length=0)}}else i.push(n);a=!1}else{if(a)o([]);else{let e=i[i.length-1];s===`
4
4
  `&&e&&e[1].endsWith(`\r`)&&(i[i.length-1]=[e[0],e[1].slice(0,-1)]),o(i),i.length=0}e===t.length-1&&o([]),a=!0}}return i.length&&o(i),{value:e,lines:n}}function te(e,t){let n={index:e.index,value:e.value,tokens:e.tokens,annotations:e.annotations,className:`sh__line${e.annotations.map(e=>` sh__line--${e}`).join(``)}`,style:{},properties:{}};return t?.(n),n}function ne({type:e,value:t},n,r){let i=n?.[e],a={type:e,value:t,className:`sh__token--${e}${i?` ${i}`:``}`,style:{color:`var(--sh-${e})`},properties:{}};return r?.(a),a}function w(e,t){let n=t?.cx,r=t?.mark,i=t?.markLine;return e.lines.map(e=>{let t=te(e,i);return{type:`element`,tagName:`span`,children:e.tokens.map(e=>{let t=ne(e,n,r);return{type:`element`,tokenType:t.type,tagName:`span`,children:[{type:`text`,value:t.value}],properties:{...t.properties,className:t.className,style:t.style}}}),properties:{...t.properties,className:t.className,style:t.style}}})}Object.fromEntries(f.map(e=>[e,`<span class="sh__token--${e}" style="color:var(--sh-${e})">`]));var T=new Set(`+-*/%=!&|^~?:.,;()[]{}<>#@\\`.split(``)),E=()=>0,D=e=>{let t=e.charCodeAt(0);return t<128?t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36:/[\p{L}\p{N}]/u.test(e)},O=e=>e>=48&&e<=57,k=(e,t)=>{let n=e.charCodeAt(t);return n<128?n===32||n===9||n===11||n===12:/\s/.test(e[t])},A=e=>{let t=e.charCodeAt(0);return t<128?t>=65&&t<=90:/^\p{Lu}/u.test(e)};function j(e,t){for(;t<e.length&&/\s/.test(e[t]);)t++;return e[t]===`:`}function M(e,t){if(typeof t?.tokenize==`function`)return t.tokenize(e,t);let n=t?.keywords||new Set,r=t?.typeKeywords||new Set,i=t?.onCommentStart||E,a=t?.onCommentEnd||E,o=t?.caseInsensitive?e=>e.toLowerCase():e=>e,s=[],c=``;function l(e,t){t&&(s.push([e,t]),e!==C&&e!==S&&(c=t))}for(let s=0;s<e.length;){let u=e[s],d=e[s+1],f=i(u,d,s,e);if(f){let t=s++;for(;s<e.length;){if(a(e[s-1],e[s],s,e,t)==f){s++;break}s++}l(x,e.slice(t,s));continue}let v=t?.onLiteral?.(u,s,e);if(v)l(h,e.slice(s,s+v)),s+=v;else{if(typeof t?.onQuote==`function`&&u===`'`){let n=t.onQuote(u,s,e);if(typeof n==`number`&&n>=1){l(p,e.slice(s,s+n)),s+=n;continue}}if(u===`"`||u===`'`||t?.templateStrings&&u==="`"){let n=u,r=s++;for(;s<e.length;){if(e[s]===`\\`)s++;else if(e[s]===n){s++;break}s++}let i=e.slice(r,s);l(t?.quotedKeys&&j(e,s)?_:h,i)}else if(u===`