@enhance-eng/sandbox 0.4.2-beta.c8712ae → 0.5.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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Enhance sandbox library for adding preview functionality to your application.
4
4
 
5
- **Supported frameworks:** React SPAs and statically generated sites. SSR is not supported.
5
+ **Supported frameworks:** React SPAs, Next.js (App Router), and statically generated sites.
6
6
 
7
7
  ## Installation
8
8
 
@@ -10,6 +10,32 @@ Enhance sandbox library for adding preview functionality to your application.
10
10
  npm install @enhance-eng/sandbox
11
11
  ```
12
12
 
13
+ ## Next.js (App Router)
14
+
15
+ To enable Enhance in your Next.js application and resolve hydration errors, add the `EnhanceScripts` component to your root layout.
16
+
17
+ ```tsx
18
+ // app/layout.tsx
19
+ import { EnhanceScripts } from "@enhance-eng/sandbox/next";
20
+
21
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
22
+ return (
23
+ <html lang="en">
24
+ <head>
25
+ <EnhanceScripts />
26
+ </head>
27
+ <body>{children}</body>
28
+ </html>
29
+ );
30
+ }
31
+ ```
32
+
33
+ This component ensures:
34
+
35
+ - The Service Worker is installed reliably.
36
+ - HMR works correctly through the preview proxy.
37
+ - React hydrates without mismatch errors by rendering the scripts natively.
38
+
13
39
  ## Vite
14
40
 
15
41
  Add the plugin to your Vite config:
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const _0x2e0585=_0x23db;function _0x1c26(){const _0x2cc84f=['utf-8','output','command','1435448GhIBnr','publishableKey','--publishable-key\x20<key>','stringify','https://cdn.enhancelabs.ai','0.0.0','public/enhance-sw.js','50ZvHJSd','description','option','stdout','5067330CvLZfR','18660UJNNRw','--cdn-url\x20<url>','cwd','cdnUrl','8visKAr','name','Generate\x20the\x20service\x20worker\x20loader\x20file','Publishable\x20key\x20for\x20enhance','4211676IqHqsE','write','182tOvOUX','1254624kzAhCQ','Output\x20path\x20for\x20the\x20service\x20worker\x20file','CDN\x20URL\x20for\x20enhance\x20assets\x20(defaults\x20to\x20production)','14387148ohbMvN','--output\x20<path>','requiredOption','44058UELfta'];_0x1c26=function(){return _0x2cc84f;};return _0x1c26();}(function(_0x59d124,_0x20fd6c){const _0x46f429=_0x23db,_0x8598ce=_0x59d124();while(!![]){try{const _0x25d616=-parseInt(_0x46f429(0x77))/0x1+-parseInt(_0x46f429(0x8d))/0x2*(-parseInt(_0x46f429(0x73))/0x3)+-parseInt(_0x46f429(0x8b))/0x4+parseInt(_0x46f429(0x7e))/0x5*(parseInt(_0x46f429(0x83))/0x6)+-parseInt(_0x46f429(0x6d))/0x7*(parseInt(_0x46f429(0x87))/0x8)+parseInt(_0x46f429(0x70))/0x9+parseInt(_0x46f429(0x82))/0xa;if(_0x25d616===_0x20fd6c)break;else _0x8598ce['push'](_0x8598ce['shift']());}catch(_0x24200e){_0x8598ce['push'](_0x8598ce['shift']());}}}(_0x1c26,0xc4970));import{Command}from'commander';import{writeFile,mkdir}from'fs/promises';function _0x23db(_0x5a6282,_0x5beb2b){_0x5a6282=_0x5a6282-0x6d;const _0x1c2663=_0x1c26();let _0x23dbf4=_0x1c2663[_0x5a6282];return _0x23dbf4;}import{dirname,resolve}from'path';import _0x560062 from'dedent';var DEFAULT_CDN_URL=_0x2e0585(0x7b);function buildSwSource(_0x13b422){const _0x267c88=_0x2e0585,_0x55ed5a=_0x13b422['cdnUrl']??DEFAULT_CDN_URL;return _0x560062`
4
- self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x267c88(0x7a)](_0x13b422[_0x267c88(0x78)])};
5
- self.__ENHANCE_CDN__ = ${JSON[_0x267c88(0x7a)](_0x55ed5a)};
3
+ function _0x39ae(_0x1cc14,_0x1856a3){_0x1cc14=_0x1cc14-0xdb;const _0xd87329=_0xd873();let _0x39ae73=_0xd87329[_0x1cc14];return _0x39ae73;}const _0x25baf0=_0x39ae;(function(_0xef7e99,_0x31d8b3){const _0x381e67=_0x39ae,_0x174caa=_0xef7e99();while(!![]){try{const _0x1afd9a=parseInt(_0x381e67(0xf7))/0x1*(parseInt(_0x381e67(0xdc))/0x2)+parseInt(_0x381e67(0xf2))/0x3*(-parseInt(_0x381e67(0xea))/0x4)+parseInt(_0x381e67(0xe7))/0x5+-parseInt(_0x381e67(0xe5))/0x6*(-parseInt(_0x381e67(0xe9))/0x7)+parseInt(_0x381e67(0xe6))/0x8*(-parseInt(_0x381e67(0xf6))/0x9)+-parseInt(_0x381e67(0xf9))/0xa*(parseInt(_0x381e67(0xe1))/0xb)+parseInt(_0x381e67(0xf3))/0xc;if(_0x1afd9a===_0x31d8b3)break;else _0x174caa['push'](_0x174caa['shift']());}catch(_0x3899fe){_0x174caa['push'](_0x174caa['shift']());}}}(_0xd873,0x4396f));import{Command}from'commander';import{writeFile,mkdir}from'fs/promises';import{dirname,resolve}from'path';import _0x304d3b from'dedent';var DEFAULT_CDN_URL=_0x25baf0(0xe4);function _0xd873(){const _0x45f087=['option','stdout','stringify','--publishable-key\x20<key>','cdnUrl','--cdn-url\x20<url>','utf-8','6kXVoNp','5406300flEFVM','CDN\x20URL\x20for\x20enhance\x20assets\x20(defaults\x20to\x20production)','Enhance\x20sandbox\x20utility\x20CLI','1612134UGIyBq','20rsKBOB','parseAsync','3513910QsMuLA','Output\x20path\x20for\x20the\x20service\x20worker\x20file','write','output','name','description','51702pVwfbF','publishableKey','public/enhance-sw.js','Created\x20','cwd','11RpSUqC','command','version','https://cdn.enhancelabs.ai','3306uFiTFX','16YDvJEl','1112555fMuFmp','action','4200zFYmbs','1068332MMcfAs'];_0xd873=function(){return _0x45f087;};return _0xd873();}function buildSwSource(_0x191913){const _0x1d2b90=_0x25baf0,_0x5a6475=_0x191913['cdnUrl']??DEFAULT_CDN_URL;return _0x304d3b`
4
+ self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON['stringify'](_0x191913[_0x1d2b90(0xdd)])};
5
+ self.__ENHANCE_CDN__ = ${JSON[_0x1d2b90(0xed)](_0x5a6475)};
6
6
  importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
7
- `;}var program=new Command();program[_0x2e0585(0x88)]('enhance-sandbox')[_0x2e0585(0x7f)]('Enhance\x20sandbox\x20utility\x20CLI')['version'](_0x2e0585(0x7c)),program[_0x2e0585(0x76)]('init')[_0x2e0585(0x7f)](_0x2e0585(0x89))[_0x2e0585(0x72)](_0x2e0585(0x79),_0x2e0585(0x8a))[_0x2e0585(0x80)](_0x2e0585(0x84),_0x2e0585(0x6f))[_0x2e0585(0x80)](_0x2e0585(0x71),_0x2e0585(0x6e),_0x2e0585(0x7d))['action'](async _0x39847d=>{const _0x55eb64=_0x2e0585,_0x38ec99=resolve(process[_0x55eb64(0x85)](),_0x39847d[_0x55eb64(0x75)]),_0x21f989=buildSwSource({'publishableKey':_0x39847d['publishableKey'],'cdnUrl':_0x39847d[_0x55eb64(0x86)]});await mkdir(dirname(_0x38ec99),{'recursive':!![]}),await writeFile(_0x38ec99,_0x21f989,_0x55eb64(0x74)),process[_0x55eb64(0x81)][_0x55eb64(0x8c)]('Created\x20'+_0x39847d['output']+'\x0a');}),program['parseAsync']();
7
+ `;}var program=new Command();program[_0x25baf0(0xfd)]('enhance-sandbox')[_0x25baf0(0xdb)](_0x25baf0(0xf5))[_0x25baf0(0xe3)]('0.0.0'),program[_0x25baf0(0xe2)]('init')['description']('Generate\x20the\x20service\x20worker\x20loader\x20file')['requiredOption'](_0x25baf0(0xee),'Publishable\x20key\x20for\x20enhance')[_0x25baf0(0xeb)](_0x25baf0(0xf0),_0x25baf0(0xf4))[_0x25baf0(0xeb)]('--output\x20<path>',_0x25baf0(0xfa),_0x25baf0(0xde))[_0x25baf0(0xe8)](async _0x3d64a6=>{const _0x104580=_0x25baf0,_0x27062d=resolve(process[_0x104580(0xe0)](),_0x3d64a6[_0x104580(0xfc)]),_0x3bc787=buildSwSource({'publishableKey':_0x3d64a6['publishableKey'],'cdnUrl':_0x3d64a6[_0x104580(0xef)]});await mkdir(dirname(_0x27062d),{'recursive':!![]}),await writeFile(_0x27062d,_0x3bc787,_0x104580(0xf1)),process[_0x104580(0xec)][_0x104580(0xfb)](_0x104580(0xdf)+_0x3d64a6['output']+'\x0a');}),program[_0x25baf0(0xf8)]();
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var _0x419f69=_0xf425;(function(_0xd747bb,_0xc77a7e){var _0x5e2a60=_0xf425,_0x4e4d56=_0xd747bb();while(!![]){try{var _0x3de63f=-parseInt(_0x5e2a60(0x1dc))/0x1*(-parseInt(_0x5e2a60(0x1e1))/0x2)+-parseInt(_0x5e2a60(0x1da))/0x3+parseInt(_0x5e2a60(0x1df))/0x4*(-parseInt(_0x5e2a60(0x1d9))/0x5)+parseInt(_0x5e2a60(0x1e3))/0x6*(parseInt(_0x5e2a60(0x1d7))/0x7)+parseInt(_0x5e2a60(0x1d6))/0x8*(-parseInt(_0x5e2a60(0x1db))/0x9)+parseInt(_0x5e2a60(0x1d8))/0xa+parseInt(_0x5e2a60(0x1de))/0xb;if(_0x3de63f===_0xc77a7e)break;else _0x4e4d56['push'](_0x4e4d56['shift']());}catch(_0x4736eb){_0x4e4d56['push'](_0x4e4d56['shift']());}}}(_0x5107,0xd65b4));var SW_PATH=_0x419f69(0x1e5);function enhance(){var _0x3ffbb4=_0x419f69;const _0x5db717=document[_0x3ffbb4(0x1dd)]('script');_0x5db717[_0x3ffbb4(0x1e2)]=_0x3ffbb4(0x1e0)+SW_PATH+'\x22)',document['head'][_0x3ffbb4(0x1e4)](_0x5db717);}function _0x5107(){var _0x284c2f=['navigator.serviceWorker?.register(\x22','74362AVvYbE','textContent','102grVamW','appendChild','/enhance-sw.js','1466224zZRKsm','129822sdoLZM','17175010HvSUhp','105765TfjfYq','5148819LqsZTj','63TKyEwH','46roQpWW','createElement','9386476pOCUEP','136YARZHK'];_0x5107=function(){return _0x284c2f;};return _0x5107();}function _0xf425(_0x221507,_0x355b41){_0x221507=_0x221507-0x1d6;var _0x5107b7=_0x5107();var _0xf42568=_0x5107b7[_0x221507];return _0xf42568;}export{enhance};
1
+ function _0x399a(){var _0x4a8466=['890xCFMpv','8682PMfMKL','/enhance-sw.js','createElement','3207348rDwcpQ','330058zvTPDH','head','1730JLyMUs','4726015HMiadh','8DaPCKb','1924100xRZhIO','8obAXRL','62433qEIObR','8940525LsZDgT'];_0x399a=function(){return _0x4a8466;};return _0x399a();}var _0x19df33=_0x4102;(function(_0xd7350d,_0x33c52d){var _0x498a31=_0x4102,_0x2d133c=_0xd7350d();while(!![]){try{var _0x3aa225=parseInt(_0x498a31(0x9c))/0x1*(parseInt(_0x498a31(0xa0))/0x2)+-parseInt(_0x498a31(0x9b))/0x3+parseInt(_0x498a31(0xa1))/0x4+-parseInt(_0x498a31(0x97))/0x5*(-parseInt(_0x498a31(0x98))/0x6)+parseInt(_0x498a31(0x9f))/0x7*(-parseInt(_0x498a31(0xa2))/0x8)+-parseInt(_0x498a31(0xa3))/0x9*(-parseInt(_0x498a31(0x9e))/0xa)+-parseInt(_0x498a31(0x96))/0xb;if(_0x3aa225===_0x33c52d)break;else _0x2d133c['push'](_0x2d133c['shift']());}catch(_0x42c2c8){_0x2d133c['push'](_0x2d133c['shift']());}}}(_0x399a,0xab5c0));function _0x4102(_0x56934a,_0x244299){_0x56934a=_0x56934a-0x96;var _0x399ada=_0x399a();var _0x41023d=_0x399ada[_0x56934a];return _0x41023d;}var SW_PATH=_0x19df33(0x99);function enhance(){var _0x44d10d=_0x19df33;const _0x57c3f3=document[_0x44d10d(0x9a)]('script');_0x57c3f3['textContent']='navigator.serviceWorker?.register(\x22'+SW_PATH+'\x22)',document[_0x44d10d(0x9d)]['appendChild'](_0x57c3f3);}export{enhance};
@@ -0,0 +1,7 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function EnhanceScripts({ nonce }: {
4
+ nonce?: string;
5
+ }): react_jsx_runtime.JSX.Element;
6
+
7
+ export { EnhanceScripts };
@@ -0,0 +1 @@
1
+ (function(_0x429c3e,_0xfdecdc){var _0xeade24=_0x87a1,_0x38a56d=_0x429c3e();while(!![]){try{var _0x27bbc5=-parseInt(_0xeade24(0x179))/0x1*(-parseInt(_0xeade24(0x17f))/0x2)+-parseInt(_0xeade24(0x183))/0x3*(-parseInt(_0xeade24(0x17c))/0x4)+parseInt(_0xeade24(0x184))/0x5*(parseInt(_0xeade24(0x187))/0x6)+-parseInt(_0xeade24(0x17a))/0x7+-parseInt(_0xeade24(0x182))/0x8+parseInt(_0xeade24(0x186))/0x9+-parseInt(_0xeade24(0x178))/0xa*(parseInt(_0xeade24(0x181))/0xb);if(_0x27bbc5===_0xfdecdc)break;else _0x38a56d['push'](_0x38a56d['shift']());}catch(_0x45dc85){_0x38a56d['push'](_0x38a56d['shift']());}}}(_0xd937,0x7ec5a));import _0x5b161e from'next/script';import{Fragment,jsx,jsxs}from'react/jsx-runtime';function EnhanceScripts({nonce:_0x55d1ce}){var _0x36f584=_0x87a1;return jsxs(Fragment,{'children':[jsx(_0x36f584(0x180),{'name':_0x36f584(0x17e),'content':'1'}),jsx(_0x5b161e,{'id':'enhance-sw-register','strategy':_0x36f584(0x185),'nonce':_0x55d1ce,'children':_0x36f584(0x177)}),jsx(_0x5b161e,{'id':_0x36f584(0x17b),'src':_0x36f584(0x188),'strategy':_0x36f584(0x185),'nonce':_0x55d1ce}),jsx(_0x5b161e,{'id':_0x36f584(0x176),'src':_0x36f584(0x175),'strategy':_0x36f584(0x17d),'nonce':_0x55d1ce})]});}function _0x87a1(_0x45dd76,_0x52d624){_0x45dd76=_0x45dd76-0x175;var _0xd937c7=_0xd937();var _0x87a18=_0xd937c7[_0x45dd76];return _0x87a18;}function _0xd937(){var _0x54a2d0=['124518QlrZHN','/__enhance/init.js','/__enhance/overlay.js','enhance-overlay','navigator.serviceWorker?.register(\x22/enhance-sw.js\x22)','9930NcRdSl','43OFRyJu','5623898LJhzjt','enhance-init','34756ykBqIZ','afterInteractive','enhance-integrated','8054IYDPiC','meta','55gZsFDP','4690656WChCOZ','186qzAOsX','170jPFzbw','beforeInteractive','4468392CAMJVW'];_0xd937=function(){return _0x54a2d0;};return _0xd937();}export{EnhanceScripts};
@@ -1,5 +1,5 @@
1
- var _0x5727d2=_0x3e79;(function(_0x491bd0,_0x2fd535){var _0xab12a1=_0x3e79,_0x31cf9c=_0x491bd0();while(!![]){try{var _0x13e6de=parseInt(_0xab12a1(0xea))/0x1+parseInt(_0xab12a1(0xe5))/0x2*(parseInt(_0xab12a1(0xe9))/0x3)+parseInt(_0xab12a1(0xde))/0x4*(-parseInt(_0xab12a1(0xdc))/0x5)+parseInt(_0xab12a1(0xe8))/0x6+parseInt(_0xab12a1(0xed))/0x7*(-parseInt(_0xab12a1(0xdd))/0x8)+-parseInt(_0xab12a1(0xda))/0x9+parseInt(_0xab12a1(0xd9))/0xa;if(_0x13e6de===_0x2fd535)break;else _0x31cf9c['push'](_0x31cf9c['shift']());}catch(_0x2b5535){_0x31cf9c['push'](_0x31cf9c['shift']());}}}(_0x13b4,0xca0af));function _0x13b4(){var _0x44bc64=['10niWhET','6909032yWpaBS','3016576vTiMyL','<script>navigator.serviceWorker?.register(\x22','middlewares','publishableKey','https://cdn.enhancelabs.ai','replace','end','27100GPSQzK','stringify','Content-Type','9736392WDPmSG','291ZKrWET','714802apnNOl','cdnUrl','asset','7pKQoJT','url','use','setHeader','35880noYYuD','4103892BmqYQN','enhance-sw.js'];_0x13b4=function(){return _0x44bc64;};return _0x13b4();}import _0x4666e1 from'dedent';function _0x3e79(_0x2fdb36,_0x351527){_0x2fdb36=_0x2fdb36-0xd9;var _0x13b4f2=_0x13b4();var _0x3e799f=_0x13b4f2[_0x2fdb36];return _0x3e799f;}var DEFAULT_CDN_URL=_0x5727d2(0xe2);function buildSwSource(_0x2daf3c){var _0x287f4d=_0x5727d2;const _0xea5204=_0x2daf3c[_0x287f4d(0xeb)]??DEFAULT_CDN_URL;return _0x4666e1`
2
- self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x287f4d(0xe6)](_0x2daf3c[_0x287f4d(0xe1)])};
3
- self.__ENHANCE_CDN__ = ${JSON[_0x287f4d(0xe6)](_0xea5204)};
1
+ function _0x51f6(){var _0x139ac1=['url','2786571CUIbRk','808695dZUwfJ','emitFile','\x22)</script>','<script>navigator.serviceWorker?.register(\x22','enhance-sw.js','https://cdn.enhancelabs.ai','asset','end','Content-Type','use','303826OArAdD','21mXReNv','stringify','<head$1>','application/javascript','replace','3QbtOsO','1771912DzcKgv','3848556QUhYGo','/enhance-sw.js','enhance','2163090OjsijO','1292252FHagJO','middlewares'];_0x51f6=function(){return _0x139ac1;};return _0x51f6();}var _0x10cb34=_0x2b48;(function(_0x1ff09a,_0x517e1a){var _0x3b54d8=_0x2b48,_0x48beca=_0x1ff09a();while(!![]){try{var _0x118009=-parseInt(_0x3b54d8(0x6e))/0x1*(-parseInt(_0x3b54d8(0x82))/0x2)+-parseInt(_0x3b54d8(0x78))/0x3+parseInt(_0x3b54d8(0x74))/0x4+-parseInt(_0x3b54d8(0x73))/0x5+parseInt(_0x3b54d8(0x70))/0x6+parseInt(_0x3b54d8(0x83))/0x7*(-parseInt(_0x3b54d8(0x6f))/0x8)+parseInt(_0x3b54d8(0x77))/0x9;if(_0x118009===_0x517e1a)break;else _0x48beca['push'](_0x48beca['shift']());}catch(_0x5bceb6){_0x48beca['push'](_0x48beca['shift']());}}}(_0x51f6,0x58abd));function _0x2b48(_0x50139d,_0x5acd90){_0x50139d=_0x50139d-0x6d;var _0x51f6fc=_0x51f6();var _0x2b48ae=_0x51f6fc[_0x50139d];return _0x2b48ae;}import _0x5a26bb from'dedent';var DEFAULT_CDN_URL=_0x10cb34(0x7d);function buildSwSource(_0x8f6b86){var _0x526f1f=_0x10cb34;const _0x141dcb=_0x8f6b86['cdnUrl']??DEFAULT_CDN_URL;return _0x5a26bb`
2
+ self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x526f1f(0x84)](_0x8f6b86['publishableKey'])};
3
+ self.__ENHANCE_CDN__ = ${JSON['stringify'](_0x141dcb)};
4
4
  importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
5
- `;}var SW_PATH='/enhance-sw.js',enhance=_0x5b2e6a=>{var _0x1e35b9=_0x5727d2;const _0x4f0f63=buildSwSource(_0x5b2e6a),_0x280cb8=_0x1e35b9(0xdf)+SW_PATH+'\x22)</script>';return{'name':'enhance','configureServer'(_0x507aa0){_0x507aa0['middlewares']['use']((_0x26731e,_0x4da57e,_0xd279ae)=>{var _0xfd8bd0=_0x3e79;if(_0x26731e['url']===SW_PATH){_0x4da57e[_0xfd8bd0(0xf0)](_0xfd8bd0(0xe7),'application/javascript'),_0x4da57e[_0xfd8bd0(0xe4)](_0x4f0f63);return;}_0xd279ae();});},'configurePreviewServer'(_0x2d3825){var _0x48076a=_0x1e35b9;_0x2d3825[_0x48076a(0xe0)][_0x48076a(0xef)]((_0x2472a8,_0x5dac2d,_0x51b8e3)=>{var _0x42f95e=_0x48076a;if(_0x2472a8[_0x42f95e(0xee)]===SW_PATH){_0x5dac2d[_0x42f95e(0xf0)](_0x42f95e(0xe7),'application/javascript'),_0x5dac2d['end'](_0x4f0f63);return;}_0x51b8e3();});},'generateBundle'(){var _0xf11646=_0x1e35b9;this['emitFile']({'type':_0xf11646(0xec),'fileName':_0xf11646(0xdb),'source':_0x4f0f63});},'transformIndexHtml'(_0x29ebd1){var _0x231112=_0x1e35b9;return _0x29ebd1[_0x231112(0xe3)](/<head([^>]*)>/,'<head$1>'+_0x280cb8);}};};export{enhance};
5
+ `;}var SW_PATH=_0x10cb34(0x71),enhance=_0x27d2c5=>{var _0x175996=_0x10cb34;const _0x1f590b=buildSwSource(_0x27d2c5),_0xdcd7c0=_0x175996(0x7b)+SW_PATH+_0x175996(0x7a);return{'name':_0x175996(0x72),'configureServer'(_0x3c5400){_0x3c5400['middlewares']['use']((_0x52e1c6,_0x107e80,_0x165cf0)=>{var _0x46ad4c=_0x2b48;if(_0x52e1c6[_0x46ad4c(0x76)]===SW_PATH){_0x107e80['setHeader'](_0x46ad4c(0x80),_0x46ad4c(0x86)),_0x107e80[_0x46ad4c(0x7f)](_0x1f590b);return;}_0x165cf0();});},'configurePreviewServer'(_0x856979){var _0x593117=_0x175996;_0x856979[_0x593117(0x75)][_0x593117(0x81)]((_0x385165,_0x5e79e4,_0x4fb33c)=>{var _0x1ca821=_0x593117;if(_0x385165[_0x1ca821(0x76)]===SW_PATH){_0x5e79e4['setHeader'](_0x1ca821(0x80),_0x1ca821(0x86)),_0x5e79e4[_0x1ca821(0x7f)](_0x1f590b);return;}_0x4fb33c();});},'generateBundle'(){var _0x3269f0=_0x175996;this[_0x3269f0(0x79)]({'type':_0x3269f0(0x7e),'fileName':_0x3269f0(0x7c),'source':_0x1f590b});},'transformIndexHtml'(_0x5edbea){var _0x50b5ce=_0x175996;return _0x5edbea[_0x50b5ce(0x6d)](/<head([^>]*)>/,_0x50b5ce(0x85)+_0xdcd7c0);}};};export{enhance};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enhance-eng/sandbox",
3
- "version": "0.4.2-beta.c8712ae",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Enhance preview bootstrap and tooling package.",
6
6
  "license": "MIT",
@@ -15,6 +15,10 @@
15
15
  "./vite": {
16
16
  "types": "./dist/vite/index.d.ts",
17
17
  "import": "./dist/vite/index.js"
18
+ },
19
+ "./next": {
20
+ "types": "./dist/next/index.d.ts",
21
+ "import": "./dist/next/index.js"
18
22
  }
19
23
  },
20
24
  "files": [
@@ -29,6 +33,11 @@
29
33
  "dedent": "^1.7.1",
30
34
  "zod": "^3.22.4"
31
35
  },
36
+ "peerDependencies": {
37
+ "next": ">=13.0.0",
38
+ "react": ">=18.0.0",
39
+ "react-dom": ">=18.0.0"
40
+ },
32
41
  "publishConfig": {
33
42
  "access": "public"
34
43
  }