@stacksjs/stx 0.2.390 → 0.2.392

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 (65) hide show
  1. package/dist/{chunk-1fdxe8se.js → chunk-0pebnyzt.js} +1 -1
  2. package/dist/{chunk-j1cgk9nd.js → chunk-1pxwq40x.js} +1 -1
  3. package/dist/{chunk-vhg7gdr0.js → chunk-1yzdabyy.js} +1 -1
  4. package/dist/{chunk-bxterj8a.js → chunk-223vzq8j.js} +1 -1
  5. package/dist/{chunk-b6y36enr.js → chunk-24xnt3px.js} +1 -1
  6. package/dist/chunk-2cmxwd6w.js +12 -0
  7. package/dist/{chunk-545trbhm.js → chunk-2ftbvapr.js} +1 -1
  8. package/dist/{chunk-bcpht2r7.js → chunk-49e1gmv3.js} +1 -1
  9. package/dist/{chunk-n6s2bq1b.js → chunk-52g4btva.js} +1 -1
  10. package/dist/{chunk-jhza6whf.js → chunk-5hgyae56.js} +1 -1
  11. package/dist/{chunk-b4bkpec2.js → chunk-5s9rq5b0.js} +116 -22
  12. package/dist/{chunk-f90qe49m.js → chunk-5vb82w9y.js} +1 -1
  13. package/dist/{chunk-7dssgqhq.js → chunk-69xtab4b.js} +1 -1
  14. package/dist/{chunk-wmy4p5cf.js → chunk-6an0y3xq.js} +1 -1
  15. package/dist/{chunk-r78zcktn.js → chunk-6dcejpga.js} +1 -1
  16. package/dist/{chunk-4xadybex.js → chunk-74y52dk9.js} +1 -1
  17. package/dist/{chunk-t9vx6jxb.js → chunk-79ssnrdj.js} +1 -1
  18. package/dist/{chunk-y2xg2tjh.js → chunk-7bg47s1c.js} +1 -1
  19. package/dist/{chunk-1f2yt51v.js → chunk-7tercwsn.js} +2 -2
  20. package/dist/{chunk-7nht89wk.js → chunk-7x4ysnkz.js} +1 -1
  21. package/dist/{chunk-f7wfqt7e.js → chunk-7x7czj4z.js} +1 -1
  22. package/dist/{chunk-8jzat6x2.js → chunk-92f9g9gx.js} +1 -1
  23. package/dist/{chunk-yjzdmr4e.js → chunk-bjf7w6af.js} +1 -1
  24. package/dist/{chunk-sxt11khy.js → chunk-bzp65pxe.js} +1 -1
  25. package/dist/{chunk-00qy8vdm.js → chunk-e9pvv48y.js} +1 -1
  26. package/dist/{chunk-9ahj4v22.js → chunk-en97n5zg.js} +1 -1
  27. package/dist/{chunk-r0wymkcf.js → chunk-f1fghtrb.js} +1 -1
  28. package/dist/{chunk-z2g4z3d9.js → chunk-fmpcfh80.js} +1 -1
  29. package/dist/{chunk-75ygxj6z.js → chunk-hs7mf74d.js} +2 -2
  30. package/dist/{chunk-c0t57qt0.js → chunk-j0tytzct.js} +1 -1
  31. package/dist/{chunk-ssnjz7xp.js → chunk-jbygdeh4.js} +1 -1
  32. package/dist/{chunk-jrdf6nvr.js → chunk-jfbbdhhm.js} +1 -1
  33. package/dist/{chunk-46p84d9j.js → chunk-k2skh4r2.js} +8 -8
  34. package/dist/{chunk-stytdpkq.js → chunk-k52zzb5b.js} +1 -1
  35. package/dist/{chunk-hhtqm3r7.js → chunk-kht013ys.js} +1 -1
  36. package/dist/{chunk-zrq6ns8t.js → chunk-nms84kb4.js} +1 -1
  37. package/dist/{chunk-3hjfd62b.js → chunk-q71ypp9b.js} +1 -1
  38. package/dist/{chunk-rytgxvwa.js → chunk-qhbbmctx.js} +1 -1
  39. package/dist/{chunk-vp772b0f.js → chunk-s30154nz.js} +1 -1
  40. package/dist/{chunk-n6g6x1nm.js → chunk-sk6vb9t6.js} +1 -1
  41. package/dist/{chunk-28jzbc7x.js → chunk-sv3c7nrf.js} +1 -1
  42. package/dist/{chunk-v5n0ekbw.js → chunk-tp4m2gj2.js} +1 -1
  43. package/dist/{chunk-bbh827hr.js → chunk-tx5f09kp.js} +1 -1
  44. package/dist/{chunk-3nrpmwej.js → chunk-vmja8kcd.js} +1 -1
  45. package/dist/{chunk-k1zzjwwj.js → chunk-wkcgmhkc.js} +1 -1
  46. package/dist/{chunk-dha02qwj.js → chunk-wraknp0v.js} +1 -1
  47. package/dist/{chunk-80pt01tg.js → chunk-y4gehck2.js} +1 -1
  48. package/dist/{chunk-m5jgx548.js → chunk-z29ff4pn.js} +1 -1
  49. package/dist/{chunk-bz5q6jft.js → chunk-z4z3s2xj.js} +2 -2
  50. package/dist/{chunk-78m27g3h.js → chunk-zpzjyd4v.js} +8 -3
  51. package/dist/cli.js +8 -8
  52. package/dist/composables/index.d.ts +1 -1
  53. package/dist/composables/index.js +1 -1
  54. package/dist/composables/use-offline.d.ts +13 -0
  55. package/dist/composables/use-offline.js +20 -0
  56. package/dist/craft-entry.js +1 -1
  57. package/dist/craft.js +1 -1
  58. package/dist/offline/app-service-worker.d.ts +5 -0
  59. package/dist/offline/app-service-worker.js +101 -6
  60. package/dist/pwa.js +1 -1
  61. package/dist/signals.js +8 -3
  62. package/dist/ssg.js +2 -2
  63. package/dist/unresolved-identifiers.js +1 -0
  64. package/package.json +5 -5
  65. package/dist/chunk-br2bw16g.js +0 -12
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.390",
4
+ "version": "0.2.392",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -118,12 +118,12 @@
118
118
  "dependencies": {
119
119
  "@stacksjs/ts-css": "^0.3.2",
120
120
  "@stacksjs/clapp": "^0.2.16",
121
- "@stacksjs/desktop": "0.2.390",
122
- "@stacksjs/sanitizer": "0.2.390",
121
+ "@stacksjs/desktop": "0.2.392",
122
+ "@stacksjs/sanitizer": "0.2.392",
123
123
  "@stacksjs/ts-i18n": "^0.1.11",
124
- "bun-plugin-stx": "0.2.390",
124
+ "bun-plugin-stx": "0.2.392",
125
125
  "bunfig": "^0.15.19",
126
- "stx-router": "0.2.390",
126
+ "stx-router": "0.2.392",
127
127
  "ts-broadcasting": "^0.0.11",
128
128
  "ts-images": "^0.2.22",
129
129
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,12 +0,0 @@
1
- // @bun
2
- import{bm as x,kq as M}from"./chunk-b4bkpec2.js";import"./chunk-fc8471kb.js";import"./chunk-3wa1ybzj.js";import"./chunk-89tp5zsn.js";import"./chunk-y33pm4g5.js";import"./chunk-q9zsjgpf.js";import{Ps as B,Rs as P}from"./chunk-yjzdmr4e.js";import"./chunk-n98anpe9.js";import"./chunk-y70wabha.js";import"./chunk-stytdpkq.js";import"./chunk-hestqebq.js";import"./chunk-qsq1eha8.js";import"./chunk-3rf705aq.js";import"./chunk-3ha78evt.js";import"./chunk-y9f2csr0.js";import"./chunk-mvnjpwes.js";import"./chunk-8hqayvjh.js";import"./chunk-kwz3tfdm.js";import"./chunk-zn70s4gs.js";import"./chunk-8ph7mee2.js";import"./chunk-n0hrb3ek.js";import G from"path";var T=["broadcast","calculateDistance","canNotify","clearCookies","clearFetchCache","clearOfflineData","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useOutbox","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],O=new Set(T);var K=new Map,U=B(64),V=new Set,D=0,N=new Set(T);function f(){K.clear(),U.clear()}function S(H){let J=new Map;for(let Q of H){let Z=G.basename(Q);if(Z.endsWith(".d.ts"))continue;let z=Z.replace(/\.[jt]s$/,"");if(z==="index")continue;if(z===Z)continue;let X=J.get(z);if(X&&!X.endsWith(".js"))continue;J.set(z,Q)}return[...J.values()].sort()}function g(H,J){let Q=J.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${Q}\\b`).test(H)}function y(H){if(!H)return[];let J=P(H,D),Q=U.get(J);if(Q)return Q.slice();let Z=H.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),z=[];for(let X of N){if(V.has(X))continue;let A=X.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${A}\\s*\\(`).test(Z))z.push(X)}return z.sort(),U.set(J,z),z.slice()}async function p(H,J){let Q=y(H);if(Q.length===0)return null;let Z=J??G.join(import.meta.dir,"composables"),z=`${Z}\x00${Q.join(",")}`,X=K.get(z);if(X!==void 0)return X||null;let A=M({loader:"ts",target:"browser",define:x()}),L=new Set(Q),W=[],C=new Set,F=[];try{let q=new Bun.Glob("*.{ts,js}");for await(let j of q.scan({cwd:Z,absolute:!0}))F.push(j)}catch{return K.set(z,""),null}F=S(F);for(let q of F){let j;try{j=await Bun.file(q).text()}catch{continue}let I=[];try{I=A.scan(j).exports.filter(($)=>$!=="default")}catch{continue}if(!I.some(($)=>L.has($)))continue;try{j=j.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^import\s+type\s+.*$/gm,""),j=j.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),j=j.replace(/^export\s+default\s+/gm,""),j=j.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),W.push(`// ${G.basename(q).replace(/\.[jt]s$/,"")}
3
- ${A.transformSync(j).trim()}`);for(let $ of I)C.add($)}catch($){console.warn(`[stx] framework composable ${G.basename(q)} could not be bundled:`,$)}}let Y=Q.filter((q)=>!C.has(q)&&!g(H,q));if(Y.length>0)console.warn(`[stx] could not bundle ${Y.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(W.length===0)return K.set(z,""),null;let k=[...C].map((q)=>` try { if (!(${JSON.stringify(q)} in __s)) { __s[${JSON.stringify(q)}] = ${q}; if (!(${JSON.stringify(q)} in window)) window[${JSON.stringify(q)}] = ${q}; } } catch (e) {}`).join(`
4
- `),w=`<script data-stx-framework-composables>
5
- ;(function(){
6
- var __s = window.stx = window.stx || {};
7
- ${W.join(`
8
-
9
- `)}
10
- ${k}
11
- })();
12
- </script>`;return K.set(z,w),w}function l(H){V.clear();for(let J of H)V.add(J);D++}export{S as selectComposableFiles,y as referencedFrameworkComposables,p as getFrameworkComposableScript,f as clearFrameworkComposableCache,l as __setRuntimeOwnedForTest};