@modern-js/devtools-client 0.0.0-nightly-20240125170634 → 0.0.0-nightly-20240128170732

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 (29) hide show
  1. package/dist/html/client/index.html +3 -3
  2. package/dist/html/mount/index.html +3 -3
  3. package/dist/modern.config.json +1 -1
  4. package/dist/routes-manifest.json +21 -19
  5. package/dist/static/js/663.3b35ada3.js +2 -0
  6. package/dist/static/js/{729.4e95d957.js.LICENSE.txt → 663.3b35ada3.js.LICENSE.txt} +75 -85
  7. package/dist/static/js/{768.9ad59bf6.js → 768.15ad6345.js} +3 -3
  8. package/dist/static/js/768.15ad6345.js.LICENSE.txt +17 -0
  9. package/dist/static/js/810.9dc6ace6.js +2 -0
  10. package/dist/static/js/{810.00bd18a0.js.LICENSE.txt → 810.9dc6ace6.js.LICENSE.txt} +277 -275
  11. package/dist/static/js/959.0439ed6f.js +6 -0
  12. package/dist/static/js/{464.2cdd566b.js.LICENSE.txt → 959.0439ed6f.js.LICENSE.txt} +269 -281
  13. package/dist/static/js/{729.4e95d957.js → async/851.f1680ec1.js} +10 -10
  14. package/dist/static/js/async/851.f1680ec1.js.LICENSE.txt +21 -0
  15. package/dist/static/js/async/client_react/(tab)/page.5f6acbff.js +2 -0
  16. package/dist/static/js/builder-runtime.eae4db6d.js +1 -0
  17. package/dist/static/js/{client.c92ddbaa.js → client.cf8578e8.js} +2 -2
  18. package/dist/static/js/{client.c92ddbaa.js.LICENSE.txt → client.cf8578e8.js.LICENSE.txt} +116 -120
  19. package/dist/static/js/mount.7371d6ce.js +2 -0
  20. package/dist/static/js/{mount.efcb4bc8.js.LICENSE.txt → mount.7371d6ce.js.LICENSE.txt} +38 -38
  21. package/package.json +11 -11
  22. package/dist/static/js/464.2cdd566b.js +0 -6
  23. package/dist/static/js/768.9ad59bf6.js.LICENSE.txt +0 -5
  24. package/dist/static/js/810.00bd18a0.js +0 -2
  25. package/dist/static/js/async/client_react/(tab)/page.72c702ed.js +0 -2
  26. package/dist/static/js/builder-runtime.2a0b224c.js +0 -1
  27. package/dist/static/js/mount.efcb4bc8.js +0 -2
  28. /package/dist/static/css/{464.ad540914.css → 959.ad540914.css} +0 -0
  29. /package/dist/static/js/async/client_react/(tab)/{page.72c702ed.js.LICENSE.txt → page.5f6acbff.js.LICENSE.txt} +0 -0
@@ -4,33 +4,31 @@
4
4
 
5
5
  /*! react */
6
6
 
7
+ /*! react */
8
+
7
9
  /*! react/jsx-runtime */
8
10
 
9
- /*! @radix-ui/themes */
11
+ /*! react/jsx-runtime */
10
12
 
11
- /*! @modern-js/runtime/router */
13
+ /*! @/components/Loading */
12
14
 
13
- /*! ufo */
15
+ /*! @radix-ui/themes */
14
16
 
15
17
  /*! @modern-js/runtime-utils/parsed */
16
18
 
17
19
  /*! @swc/helpers/_/_object_spread */
18
20
 
19
- /*! @modern-js/runtime/router */
20
-
21
- /*! ufo */
21
+ /*! ./state */
22
22
 
23
- /*! @/components/ErrorFallback/ErrorFallback */
23
+ /*! react-icons/ri */
24
24
 
25
25
  /*! ./core */
26
26
 
27
- /*! @/utils/react-devtools */
28
-
29
- /*! @swc/helpers/_/_object_spread_props */
27
+ /*! @radix-ui/themes */
30
28
 
31
- /*! react/jsx-runtime */
29
+ /*! lodash */
32
30
 
33
- /*! @modern-js/runtime/router */
31
+ /*! @swc/helpers/_/_object_spread_props */
34
32
 
35
33
  /*! @modern-js/runtime-utils/browser */
36
34
 
@@ -40,52 +38,64 @@
40
38
 
41
39
  /*! hoist-non-react-statics */
42
40
 
43
- /*! @modern-js/runtime/router */
44
-
45
41
  /*! @/components/ErrorFallback/ErrorFallback */
46
42
 
47
- /*! @modern-js/runtime/router */
48
-
49
- /*! @/components/SelectLink */
50
-
51
- /*! @modern-js/runtime/router */
52
-
53
43
  /*! @swc/helpers/_/_object_spread */
54
44
 
45
+ /*! react/jsx-runtime */
46
+
55
47
  /*! @swc/helpers/_/_object_spread */
56
48
 
57
49
  /*! @swc/helpers/_/_sliced_to_array */
58
50
 
59
51
  /*! @/entries/client/routes/react/state */
60
52
 
61
- /*! @/styles/theme.scss */
53
+ /*! react */
62
54
 
63
- /*! @modern-js/runtime/router */
55
+ /*! lodash */
64
56
 
65
- /*! react-use */
57
+ /*! react/jsx-runtime */
66
58
 
67
59
  /*! @swc/helpers/_/_object_without_properties */
68
60
 
69
- /*! @/components/ErrorFallback/ErrorFallback */
70
-
71
61
  /*! @modern-js/plugin */
72
62
 
63
+ /*! ufo */
64
+
73
65
  /*! @swc/helpers/_/_to_consumable_array */
74
66
 
75
- /*! valtio */
67
+ /*! ufo */
76
68
 
77
69
  /*! ./hooks */
78
70
 
79
- /*! ./hooks */
71
+ /*! @radix-ui/themes */
80
72
 
81
- /*! @modern-js/devtools-kit */
73
+ /*! birpc */
74
+
75
+ /*! @swc/helpers/_/_object_spread_props */
76
+
77
+ /*! react */
82
78
 
83
79
  /*! ../runtimeContext */
84
80
 
85
- /*! ufo */
81
+ /*! react/jsx-runtime */
82
+
83
+ /*! react/jsx-runtime */
86
84
 
87
85
  /*! @swc/helpers/_/_instanceof */
88
86
 
87
+ /*! @swc/helpers/_/_object_without_properties */
88
+
89
+ /*! @swc/helpers/_/_object_spread_props */
90
+
91
+ /*! react/jsx-runtime */
92
+
93
+ /*! @swc/helpers/_/_object_spread */
94
+
95
+ /*! react-icons/hi2 */
96
+
97
+ /*! @radix-ui/themes */
98
+
89
99
  /*! ./utils */
90
100
 
91
101
  /*! @modern-js/runtime/router */
@@ -96,32 +106,26 @@
96
106
 
97
107
  /*! @swc/helpers/_/_async_to_generator */
98
108
 
99
- /*! @swc/helpers/_/_object_spread_props */
100
-
101
- /*! react/jsx-runtime */
109
+ /*! @radix-ui/themes */
102
110
 
103
- /*! ../state */
111
+ /*! ufo */
104
112
 
105
- /*! @/components/ErrorFallback/ErrorFallback */
113
+ /*! @/utils/react-devtools */
106
114
 
107
115
  /*! react-router-dom */
108
116
 
109
117
  /*! @swc/helpers/_/_object_without_properties */
110
118
 
111
- /*! @swc/helpers/_/_object_without_properties */
112
-
113
- /*! hookable */
114
-
115
119
  /*! @modern-js/runtime/router */
116
120
 
121
+ /*! ufo */
122
+
117
123
  /*! react/jsx-runtime */
118
124
 
119
- /*! @modern-js/runtime/router */
125
+ /*! @/components/ErrorFallback/ErrorFallback */
120
126
 
121
127
  /*! @modern-js/plugin */
122
128
 
123
- /*! @swc/helpers/_/_object_spread */
124
-
125
129
  /*! @modern-js/runtime/router */
126
130
 
127
131
  /*! @swc/helpers/_/_object_spread_props */
@@ -130,8 +134,12 @@
130
134
 
131
135
  /*! ../runtimeContext */
132
136
 
137
+ /*! react/jsx-runtime */
138
+
133
139
  /*! @swc/helpers/_/_sliced_to_array */
134
140
 
141
+ /*! @modern-js/runtime/router */
142
+
135
143
  /*! ./nestedRoutes */
136
144
 
137
145
  /*! @swc/helpers/_/_ts_generator */
@@ -142,67 +150,87 @@
142
150
 
143
151
  /*! ../time */
144
152
 
145
- /*! ./layout.module.scss */
153
+ /*! @modern-js/runtime/router */
154
+
155
+ /*! @/components/ErrorFallback/ErrorFallback */
156
+
157
+ /*! @modern-js/runtime/router */
158
+
159
+ /*! @/components/SelectLink */
160
+
161
+ /*! @modern-js/runtime/router */
162
+
163
+ /*! @/styles/theme.scss */
146
164
 
147
165
  /*! react/jsx-runtime */
148
166
 
149
167
  /*! react */
150
168
 
151
- /*! react-icons/hi2 */
169
+ /*! @modern-js/runtime/router */
152
170
 
153
171
  /*! react/jsx-runtime */
154
172
 
173
+ /*! react-use */
174
+
175
+ /*! @/components/ErrorFallback/ErrorFallback */
176
+
155
177
  /*! @swc/helpers/_/_sliced_to_array */
156
178
 
157
179
  /*! @swc/helpers/_/_object_spread_props */
158
180
 
159
- /*! ./layout.module.scss */
181
+ /*! valtio */
160
182
 
161
183
  /*! @swc/helpers/_/_async_to_generator */
162
184
 
163
- /*! @/components/Theme */
164
-
165
185
  /*! ./DefaultNotFound */
166
186
 
187
+ /*! ./hooks */
188
+
167
189
  /*! ./routeModule */
168
190
 
169
191
  /*! @swc/helpers/_/_to_consumable_array */
170
192
 
171
- /*! @/components/Breadcrumbs */
193
+ /*! @modern-js/devtools-kit */
172
194
 
173
195
  /*! @swc/helpers/_/_object_spread_props */
174
196
 
197
+ /*! ufo */
198
+
175
199
  /*! @remix-run/router */
176
200
 
177
- /*! @/components/SelectLink */
201
+ /*! ../state */
178
202
 
179
203
  /*! ./compatible */
180
204
 
181
- /*! valtio */
182
-
183
205
  /*! @modern-js/runtime-utils/router */
184
206
 
207
+ /*! @modern-js/runtime/router */
208
+
209
+ /*! @swc/helpers/_/_object_spread_props */
210
+
185
211
  /*! react/jsx-runtime */
186
212
 
187
- /*! @radix-ui/themes */
213
+ /*! @/components/ErrorFallback/ErrorFallback */
188
214
 
189
- /*! ./context */
215
+ /*! @radix-ui/themes */
190
216
 
191
217
  /*! lodash */
192
218
 
193
- /*! @swc/helpers/_/_async_to_generator */
219
+ /*! @swc/helpers/_/_object_without_properties */
194
220
 
195
- /*! ./plugin */
221
+ /*! @modern-js/runtime/router */
196
222
 
197
- /*! react-devtools-inline/frontend */
223
+ /*! hookable */
198
224
 
199
- /*! react */
225
+ /*! @modern-js/runtime/router */
200
226
 
201
- /*! @/entries/client/routes/state */
227
+ /*! @swc/helpers/_/_async_to_generator */
202
228
 
203
- /*! react/jsx-runtime */
229
+ /*! @swc/helpers/_/_object_spread */
204
230
 
205
- /*! ./state */
231
+ /*! ./plugin */
232
+
233
+ /*! @/entries/client/routes/state */
206
234
 
207
235
  /*! @modern-js/utils/universal/constants */
208
236
 
@@ -212,19 +240,13 @@
212
240
 
213
241
  /*! @swc/helpers/_/_instanceof */
214
242
 
215
- /*! @swc/helpers/_/_object_spread_props */
216
-
217
243
  /*! @swc/helpers/_/_to_consumable_array */
218
244
 
219
- /*! @/components/ErrorFallback/ErrorFallback */
220
-
221
245
  /*! @swc/helpers/_/_to_consumable_array */
222
246
 
223
- /*! react */
224
-
225
- /*! @/components/Devtools/Puller */
247
+ /*! ./layout.module.scss */
226
248
 
227
- /*! react */
249
+ /*! react-icons/hi2 */
228
250
 
229
251
  /*! react */
230
252
 
@@ -234,7 +256,9 @@
234
256
 
235
257
  /*! react/jsx-runtime */
236
258
 
237
- /*! @swc/helpers/_/_object_spread */
259
+ /*! ./layout.module.scss */
260
+
261
+ /*! @/components/Theme */
238
262
 
239
263
  /*! @swc/helpers/_/_ts_generator */
240
264
 
@@ -244,31 +268,19 @@
244
268
 
245
269
  /*! react/jsx-runtime */
246
270
 
247
- /*! react */
248
-
249
- /*! react/jsx-runtime */
250
-
251
- /*! react-icons/hi2 */
252
-
253
- /*! lodash */
254
-
255
- /*! @swc/helpers/_/_object_spread */
271
+ /*! @/components/Breadcrumbs */
256
272
 
257
273
  /*! @modern-js/utils/universal/plugin-dag-sort */
258
274
 
259
275
  /*! @modern-js/utils/universal/constants */
260
276
 
261
- /*! ufo */
262
-
263
277
  /*! react-router-dom */
264
278
 
265
- /*! react/jsx-runtime */
266
-
267
- /*! @/components/ErrorFallback/ErrorFallback */
279
+ /*! @/components/SelectLink */
268
280
 
269
281
  /*! hoist-non-react-statics */
270
282
 
271
- /*! @radix-ui/themes */
283
+ /*! valtio */
272
284
 
273
285
  /*! @/utils */
274
286
 
@@ -278,31 +290,27 @@
278
290
 
279
291
  /*! ../../core */
280
292
 
281
- /*! react */
282
-
283
293
  /*! react/jsx-runtime */
284
294
 
285
- /*! @/components/Loading */
286
-
287
- /*! @radix-ui/themes */
288
-
289
295
  /*! ./Link */
290
296
 
291
- /*! @/entries/client/routes/react/state */
297
+ /*! ./context */
292
298
 
293
299
  /*! @swc/helpers/_/_object_spread */
294
300
 
295
301
  /*! ./plugin */
296
302
 
297
- /*! ./state */
303
+ /*! react */
298
304
 
299
- /*! react-icons/ri */
305
+ /*! ./state */
300
306
 
301
307
  /*! ../../core */
302
308
 
303
- /*! @radix-ui/themes */
309
+ /*! react/jsx-runtime */
304
310
 
305
- /*! lodash */
311
+ /*! @swc/helpers/_/_object_spread_props */
312
+
313
+ /*! @/components/ErrorFallback/ErrorFallback */
306
314
 
307
315
  /*! @swc/helpers/_/_ts_generator */
308
316
 
@@ -310,56 +318,44 @@
310
318
 
311
319
  /*! @modern-js/utils/universal/constants */
312
320
 
313
- /*! @/components/ErrorFallback/ErrorFallback */
314
-
315
- /*! react/jsx-runtime */
316
-
317
- /*! @swc/helpers/_/_object_spread */
321
+ /*! @/components/Devtools/Puller */
318
322
 
319
323
  /*! react */
320
324
 
321
- /*! lodash */
322
-
323
- /*! react/jsx-runtime */
325
+ /*! react */
324
326
 
325
- /*! ufo */
327
+ /*! @swc/helpers/_/_object_spread */
326
328
 
327
- /*! ufo */
329
+ /*! @swc/helpers/_/_object_spread */
328
330
 
329
331
  /*! ./DeferredDataScripts */
330
332
 
333
+ /*! react */
334
+
331
335
  /*! @swc/helpers/_/_async_to_generator */
332
336
 
333
- /*! @radix-ui/themes */
337
+ /*! react/jsx-runtime */
334
338
 
335
- /*! birpc */
339
+ /*! lodash */
336
340
 
337
- /*! @modern-js/runtime-utils/router */
341
+ /*! @swc/helpers/_/_object_spread */
338
342
 
339
- /*! @swc/helpers/_/_object_spread_props */
343
+ /*! react-icons/hi2 */
340
344
 
341
- /*! react */
345
+ /*! @modern-js/runtime-utils/router */
346
+
347
+ /*! ufo */
342
348
 
343
349
  /*! @swc/helpers/_/_object_spread */
344
350
 
345
351
  /*! react/jsx-runtime */
346
352
 
347
- /*! react/jsx-runtime */
353
+ /*! @/components/ErrorFallback/ErrorFallback */
348
354
 
349
355
  /*! ./runtime */
350
356
 
351
- /*! @swc/helpers/_/_object_without_properties */
352
-
353
- /*! @swc/helpers/_/_object_spread_props */
354
-
355
- /*! react/jsx-runtime */
356
-
357
357
  /*! @modern-js/runtime/router */
358
358
 
359
359
  /*! @swc/helpers/_/_object_without_properties */
360
360
 
361
- /*! @swc/helpers/_/_object_spread */
362
-
363
- /*! react-icons/hi2 */
364
-
365
361
  /*! @radix-ui/themes */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see mount.7371d6ce.js.LICENSE.txt */
2
+ (self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["400"],{4423:function(e,t,n){"use strict";n.r(t),n.d(t,{DevtoolsCapsuleButton:function(){return i}});var o=n("86834");n("5872");var r=n("20421"),l=n("37112");let i=e=>{var t;let[n,i]=(0,r.useAsyncFn)(()=>Promise.resolve(e.onClick()),[]);return(0,o.jsx)("button",{className:l.container,onClick:i,"data-type":null!==(t=e.type)&&void 0!==t?t:"default",disabled:n.loading,children:e.children})}},62328:function(e,t,n){"use strict";n.r(t),n.d(t,{DevtoolsCapsule:function(){return g}});var o=n("90247"),r=n("55709"),l=n("86834"),i=n("83982"),a=n("5872"),s=n("20421"),c=n("29214"),u=n("55058"),d=n("15785"),m=n("54163"),v=n("57844"),p=n("4423"),f=n("21967"),h=n("78225"),_=n("85623");let g=e=>{let t=e.def.assets.logo,[n,g]=(0,s.useToggle)(!1),[y,w]=(0,a.useState)(!1),k=(0,u.withQuery)(e.endpoint,{src:e.dataSource}),b=(0,f.useStickyDraggable)({clamp:!0}),[x,E]=(0,a.useState)(()=>{var e;let t=null!==(e=localStorage.getItem("__modern_js_devtools_appearance"))&&void 0!==e?e:"light";return localStorage.setItem("__modern_js_devtools_appearance",t),t});(0,s.useEvent)("storage",e=>{"__modern_js_devtools_appearance"===e.key&&E(e.newValue||void 0)}),(0,s.useEvent)("keydown",e=>{e.shiftKey&&e.altKey&&"KeyD"===e.code&&g()}),(0,a.useEffect)(()=>{h.wallAgent.hook("receive",e=>{"startInspectingNative"===e.event&&(g(!1),document.documentElement.style.setProperty("cursor","cell"))});let e=e=>{"stopInspectingNative"===e.event&&(g(!0),document.documentElement.style.removeProperty("cursor"))};return h.wallAgent.hook("send",e),()=>{h.wallAgent.removeHook("send",e)}},[]);let C=async()=>{document.documentElement.style.setProperty("cursor","wait"),g(!1),w(!0);try{(await (0,_.pTimeout)(h.$client,1e4)).remote.pullUpReactInspector()}catch(e){console.error(e),document.documentElement.style.removeProperty("cursor")}};return(0,l.jsxs)(i.Theme,{appearance:x,className:x,children:[(0,l.jsx)(d.default,{when:n,keepAlive:!0,load:y,children:(0,l.jsx)("div",{className:m.container,children:(0,l.jsx)(v.FrameBox,{src:k,onClose:()=>g(!1),style:{pointerEvents:b.isDragging?"none":"auto"}})})}),(0,l.jsxs)(i.Flex,(0,r._)((0,o._)({className:m.fab},b.props),{align:"center",children:[(0,l.jsx)(p.DevtoolsCapsuleButton,{type:"primary",onClick:g,children:(0,l.jsx)("img",{className:m.logo,src:t})}),(0,l.jsx)(p.DevtoolsCapsuleButton,{onClick:C,children:(0,l.jsx)(c.HiMiniCursorArrowRipple,{})})]}))]})}},57844:function(e,t,n){"use strict";n.r(t),n.d(t,{FrameBox:function(){return v}});var o=n("90247"),r=n("55709"),l=n("16170"),i=n("86834"),a=n("83982");n("5872");var s=n("29214"),c=n("42700"),u=n("19512"),d=n("78122"),m=n("78225");let v=e=>{var{src:t,onClose:n}=e,v=(0,l._)(e,["src","onClose"]);let{loaded:p}=(0,c.useSnapshot)(m.$inner);return(0,i.jsxs)(a.Box,(0,r._)((0,o._)({className:d.container},v),{children:[(0,i.jsx)("iframe",{className:d.frame,src:t}),(0,i.jsx)(s.HiMiniXMark,{className:d.closeButton,onClick:n}),(0,i.jsx)("div",{className:d.backdrop,style:{display:p?"none":void 0},children:(0,i.jsx)(u.Loading,{})})]}))}},15785:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var o=n("86834"),r=n("5872"),l=e=>{var t;let n=null===(t=e.keepAlive)||void 0===t||t,{when:l}=e,i=(0,r.useRef)(!1);l&&(i.current=!0);let a=e.load||(n?i.current:l);return a?(0,o.jsx)("div",{style:{display:!n||l?"unset":"none"},children:e.children}):null}},76942:function(e,t,n){"use strict";n.r(t);var o=n("90247"),r=n("86834");n("24547"),n("78225");var l=n("60182"),i=n("55370"),a=n("62328");document.addEventListener("DOMContentLoaded",()=>{let e=document.createElement("div");e.className="_modern_js_devtools_container",document.body.appendChild(e);let t=e.attachShadow({mode:"closed"}),n=document.getElementById("_modern_js_devtools_styles");if(!(n instanceof HTMLTemplateElement))throw Error("template not found");t.appendChild(n.content);let s=document.createElement("div");s.classList.add("_modern_js_devtools_mountpoint","theme-register",i.container),t.appendChild(s);let c=window.__MODERN_JS_DEVTOOLS_OPTIONS__;(0,l.createRoot)(s).render((0,r.jsx)(a.DevtoolsCapsule,(0,o._)({},c)))})},24547:function(e,t,n){"use strict";n.r(t);var o=n("57662");if(!window.opener)try{try{delete window.__REACT_DEVTOOLS_GLOBAL_HOOK__}catch(e){}(0,o.initialize)(window);let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.sub;window.__REACT_DEVTOOLS_GLOBAL_HOOK__.sub=(t,n)=>{if("devtools-backend-installed"!==t)return e(t,n)}}catch(t){let e=Error("Failed to inject React DevTools backend.");e.cause=t,console.error(e)}},78225:function(e,t,n){"use strict";n.r(t),n.d(t,{$client:function(){return h},$inner:function(){return _},wallAgent:function(){return p}});var o=n("90247"),r=n("55709"),l=n("93549"),i=n("88739"),a=n("65872"),s=n("9880"),c=n.n(s),u=n("42700"),d=n("57662"),m=n("48463");let v=l.MessagePortChannel.wait(window,"channel:connect:client"),p=new m.WallAgent,f=(0,d.createBridge)(window,p),h=v.then(e=>{let t=(0,a.createHooks)();return{remote:(0,i.createBirpc)({async activateReactDevtools(){(0,d.activate)(window,{bridge:f})},async onFinishRender(){await t.callHook("onFinishRender")}},(0,r._)((0,o._)({},e.handlers),{timeout:500})),hooks:t}}),_=(0,u.proxy)({loaded:!1}),g=c()();h.then(e=>{let{remote:t,hooks:n}=e;p.bindRemote(t,"sendReactDevtoolsData"),n.hook("onFinishRender",async()=>{_.loaded=!0,g.resolve()})})},21967:function(e,t,n){"use strict";n.r(t),n.d(t,{useStickyDraggable:function(){return s}});var o=n("5872"),r=n("20421");let l=(e,t)=>{var n,o;return null!==(o=null===(n=({top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]})[e])||void 0===n?void 0:n.includes(t))&&void 0!==o&&o},i=e=>{let[t,...n]=[{key:"top",value:e.top},{key:"bottom",value:e.bottom},{key:"left",value:e.left},{key:"right",value:e.right}].sort((e,t)=>e.value-t.value),o=n.findIndex(e=>{let{key:n}=e;return l(t.key,n)}),[r]=n.splice(o,1);return[t,r,n[0],n[1]]},a=e=>{let{top:t,left:n,height:o,width:r}=e.getBoundingClientRect();return{top:t,left:n,bottom:window.innerHeight-t-o,right:window.innerWidth-n-r}},s=e=>{var t;let n=null!==(t=null==e?void 0:e.margin)&&void 0!==t?t:"10px",l="number"==typeof n?"".concat(n,"px"):n,[s,c]=(0,o.useState)(),u=()=>{if(!s)return;s.moveable=!1;let{el:e}=s,[t]=i(a(e));e.style.transition="".concat(t.key," 200ms"),requestIdleCallback(()=>{c(void 0),e.style[t.key]=l}),e.addEventListener("transitionend",()=>e.style.transition="",{once:!0})},d=t=>{let n="touches"in t?t.touches[0]:t;if(!(null==s?void 0:s.moveable))return;let{startX:o,startY:r}=s;(o-n.clientX)**2+(r-n.clientY)**2>9&&(s.clickable=!1);let{width:a,height:c}=s.el.getBoundingClientRect(),u=n.clientY-s.offsetY,d=n.clientX-s.offsetX,m=i({top:u,left:d,bottom:window.innerHeight-u-c,right:window.innerWidth-d-a}).map(e=>{let{key:t,value:n}=e;return{key:t,value:"".concat(n,"px")}});if(null==e?void 0:e.clamp)for(let e of m){let t=["top","bottom"].includes(e.key)?window.innerHeight-c:window.innerWidth-a;e.value="clamp(".concat(l,", ").concat(e.value,", ").concat(t,"px)")}let[v,p,...f]=m,{style:h}=s.el;h.transition="",h[v.key]=v.value,h[p.key]=p.value,h[f[0].key]="auto",h[f[1].key]="auto"};(0,r.useEvent)("blur",u),(0,r.useEvent)("mouseup",u),(0,r.useEvent)("touchend",u),(0,r.useEvent)("mousemove",d),(0,r.useEvent)("touchmove",d);let m=e=>{let t="touches"in e?e.touches[0]:e,n=e.currentTarget,o=n.getBoundingClientRect(),r=t.clientX-o.left;c({el:n,clickable:!0,moveable:!0,offsetX:r,offsetY:t.clientY-o.top,startX:t.clientX,startY:t.clientY})};return{isDragging:!!s,props:{onMouseDown:m,onTouchStart:m,onClickCapture:e=>{(null==s?void 0:s.clickable)||e.stopPropagation()}}}}},85623:function(e,t,n){"use strict";n.r(t),n.d(t,{pTimeout:function(){return o}});let o=(e,t)=>new Promise((n,o)=>{let r=!0,l=setTimeout(()=>{r=!1,o(Error("Promise Timeout"))},t);e.then(e=>{r&&n(e),clearTimeout(l)}),e.catch(o)})},37112:function(e){"use strict";e.exports={container:"container-a41eae"}},54163:function(e){"use strict";e.exports={container:"container-c37ff8",fab:"fab-b17740",logo:"logo-c7a29e",slideInFromRight:"slideInFromRight-e1026d"}},78122:function(e){"use strict";e.exports={backdrop:"backdrop-_51706","close-button":"close-button-c3742a",closeButton:"close-button-c3742a",container:"container-fb8255",frame:"frame-_5d7ff"}},55370:function(e){"use strict";e.exports={container:"container-d972e2"}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["126","58","768","810","959"],function(){return t("18466"),t("79155"),t("65183"),t("24366"),t("76942")}),e.O()}]);
@@ -1,101 +1,101 @@
1
- /*! react-devtools-inline/backend */
2
-
3
- /*! @swc/helpers/_/_object_spread_props */
4
-
5
- /*! react/jsx-runtime */
6
-
7
- /*! react */
8
-
9
1
  /*! react/jsx-runtime */
10
2
 
11
3
  /*! ./Capsule.module.scss */
12
4
 
5
+ /*! @swc/helpers/_/_object_without_properties */
6
+
13
7
  /*! ../Visible */
14
8
 
15
- /*! react-use */
9
+ /*! react */
16
10
 
17
- /*! @swc/helpers/_/_object_without_properties */
11
+ /*! react-use */
18
12
 
19
13
  /*! react */
20
14
 
21
- /*! hookable */
22
-
23
15
  /*! @/entries/mount/state */
24
16
 
25
- /*! @radix-ui/themes */
26
-
27
17
  /*! @/components/Devtools/Capsule */
28
18
 
29
- /*! react-use */
30
-
31
- /*! react-devtools-inline/backend */
32
-
33
- /*! ./Button */
19
+ /*! @radix-ui/themes */
34
20
 
35
21
  /*! react-dom/client */
36
22
 
37
23
  /*! @/entries/mount/state */
38
24
 
25
+ /*! react-use */
26
+
39
27
  /*! react/jsx-runtime */
40
28
 
41
- /*! valtio */
29
+ /*! hookable */
42
30
 
43
- /*! @swc/helpers/_/_object_spread */
31
+ /*! ./Button */
44
32
 
45
33
  /*! @swc/helpers/_/_object_spread */
46
34
 
47
- /*! @/utils/react-devtools */
35
+ /*! react-devtools-inline/backend */
36
+
37
+ /*! @swc/helpers/_/_object_spread */
48
38
 
49
39
  /*! react/jsx-runtime */
50
40
 
51
- /*! p-defer */
41
+ /*! valtio */
52
42
 
53
43
  /*! ufo */
54
44
 
55
- /*! @swc/helpers/_/_object_spread_props */
56
-
57
45
  /*! ./state */
58
46
 
47
+ /*! @/utils/react-devtools */
48
+
49
+ /*! @swc/helpers/_/_object_spread_props */
50
+
59
51
  /*! ../Loading */
60
52
 
53
+ /*! p-defer */
54
+
61
55
  /*! ./Button.module.scss */
62
56
 
63
57
  /*! @/utils/draggable */
64
58
 
65
- /*! react */
66
-
67
- /*! react/jsx-runtime */
68
-
69
59
  /*! ./FrameBox.module.scss */
70
60
 
71
- /*! @swc/helpers/_/_object_spread */
61
+ /*! react */
72
62
 
73
- /*! birpc */
63
+ /*! react/jsx-runtime */
74
64
 
75
- /*! @modern-js/devtools-kit */
65
+ /*! react */
76
66
 
77
67
  /*! @/utils/promise */
78
68
 
79
69
  /*! react-use */
80
70
 
81
- /*! react */
82
-
83
71
  /*! @radix-ui/themes */
84
72
 
85
- /*! ./FrameBox */
86
-
87
73
  /*! ./react-devtools-backend */
88
74
 
89
75
  /*! react-icons/hi2 */
90
76
 
91
- /*! react-icons/hi2 */
77
+ /*! birpc */
92
78
 
93
- /*! @swc/helpers/_/_object_spread_props */
79
+ /*! @swc/helpers/_/_object_spread */
80
+
81
+ /*! ./FrameBox */
94
82
 
95
83
  /*! @swc/helpers/_/_object_spread */
96
84
 
85
+ /*! react-icons/hi2 */
86
+
87
+ /*! @modern-js/devtools-kit */
88
+
97
89
  /*! ./index.module.scss */
98
90
 
99
91
  /*! valtio */
100
92
 
93
+ /*! @swc/helpers/_/_object_spread_props */
94
+
95
+ /*! react-devtools-inline/backend */
96
+
97
+ /*! @swc/helpers/_/_object_spread_props */
98
+
99
+ /*! react/jsx-runtime */
100
+
101
101
  /*! react */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/devtools-client",
3
- "version": "0.0.0-nightly-20240125170634",
3
+ "version": "0.0.0-nightly-20240128170732",
4
4
  "engines": {
5
5
  "node": ">=14.0.0"
6
6
  },
@@ -56,16 +56,16 @@
56
56
  "ufo": "^1.3.0",
57
57
  "valtio": "^1.11.1",
58
58
  "jest": "^29",
59
- "@modern-js/app-tools": "0.0.0-nightly-20240125170634",
60
- "@modern-js-app/eslint-config": "0.0.0-nightly-20240125170634",
61
- "@modern-js/devtools-kit": "0.0.0-nightly-20240125170634",
62
- "@modern-js/runtime": "0.0.0-nightly-20240125170634",
63
- "@modern-js/plugin-proxy": "0.0.0-nightly-20240125170634",
64
- "@modern-js/tsconfig": "0.0.0-nightly-20240125170634",
65
- "@modern-js/eslint-config": "0.0.0-nightly-20240125170634",
66
- "@modern-js/types": "0.0.0-nightly-20240125170634",
67
- "@scripts/jest-config": "0.0.0-nightly-20240125170634",
68
- "@modern-js/utils": "0.0.0-nightly-20240125170634"
59
+ "@modern-js-app/eslint-config": "0.0.0-nightly-20240128170732",
60
+ "@modern-js/devtools-kit": "0.0.0-nightly-20240128170732",
61
+ "@modern-js/app-tools": "0.0.0-nightly-20240128170732",
62
+ "@modern-js/eslint-config": "0.0.0-nightly-20240128170732",
63
+ "@modern-js/plugin-proxy": "0.0.0-nightly-20240128170732",
64
+ "@modern-js/runtime": "0.0.0-nightly-20240128170732",
65
+ "@modern-js/types": "0.0.0-nightly-20240128170732",
66
+ "@modern-js/tsconfig": "0.0.0-nightly-20240128170732",
67
+ "@modern-js/utils": "0.0.0-nightly-20240128170732",
68
+ "@scripts/jest-config": "0.0.0-nightly-20240128170732"
69
69
  },
70
70
  "scripts": {
71
71
  "reset": "npx rimraf ./**/node_modules",