@stacksjs/bun-router 0.0.27 → 0.1.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 (102) hide show
  1. package/dist/chunk-0gjq8ttx.js +14 -0
  2. package/dist/chunk-0t5vz87j.js +35 -0
  3. package/dist/chunk-30rkn2ym.js +2 -0
  4. package/dist/chunk-38cmrard.js +2 -0
  5. package/dist/chunk-3qna6dwd.js +2 -0
  6. package/dist/chunk-4d5fmta0.js +2 -0
  7. package/dist/chunk-4x3b4b4q.js +2 -0
  8. package/dist/chunk-5be9x5cq.js +3 -0
  9. package/dist/chunk-5mxby3fd.js +1654 -0
  10. package/dist/chunk-5n0ckcmc.js +3 -0
  11. package/dist/chunk-5ncn73tp.js +3 -0
  12. package/dist/chunk-5s0pnsd6.js +12 -0
  13. package/dist/chunk-5s1pr62n.js +3 -0
  14. package/dist/chunk-67wgad4f.js +60 -0
  15. package/dist/chunk-6bbmkwng.js +3 -0
  16. package/dist/chunk-6s1kbajm.js +7851 -0
  17. package/dist/chunk-6sjvhy5f.js +3 -0
  18. package/dist/chunk-6xed4va1.js +2 -0
  19. package/dist/chunk-73k79n7q.js +15413 -0
  20. package/dist/chunk-748n6ydj.js +2 -0
  21. package/dist/chunk-7qnxdedn.js +321 -0
  22. package/dist/chunk-7rsf8tes.js +898 -0
  23. package/dist/chunk-8aspmtf1.js +2 -0
  24. package/dist/chunk-8wpj3fqe.js +351 -0
  25. package/dist/chunk-8yfdg595.js +2 -0
  26. package/dist/chunk-90eze7av.js +3 -0
  27. package/dist/chunk-9805tt8n.js +341 -0
  28. package/dist/chunk-9dvwyej7.js +2 -0
  29. package/dist/chunk-9ght4n4r.js +216 -0
  30. package/dist/chunk-a2w45krb.js +2 -0
  31. package/dist/chunk-a3wahyg7.js +3 -0
  32. package/dist/chunk-a547f2ab.js +48 -0
  33. package/dist/chunk-bqdycvtc.js +2 -0
  34. package/dist/chunk-brpgjyqg.js +3 -0
  35. package/dist/chunk-cd03rk3x.js +2 -0
  36. package/dist/chunk-csfrpsp7.js +185 -0
  37. package/dist/chunk-ct0m17q5.js +2 -0
  38. package/dist/chunk-dhbvvr5h.js +2 -0
  39. package/dist/chunk-dhptcsya.js +943 -0
  40. package/dist/chunk-dq93zag9.js +2 -0
  41. package/dist/chunk-dxg045wj.js +5 -0
  42. package/dist/chunk-e3qej0jr.js +4 -0
  43. package/dist/chunk-edrtesh7.js +2 -0
  44. package/dist/chunk-ejcws37w.js +2 -0
  45. package/dist/chunk-ex5fkjah.js +397 -0
  46. package/dist/chunk-ex890p45.js +51 -0
  47. package/dist/chunk-f69cpnhw.js +2 -0
  48. package/dist/chunk-fjf53b44.js +2 -0
  49. package/dist/chunk-fjzye4qj.js +2 -0
  50. package/dist/chunk-gfd23b6t.js +2 -0
  51. package/dist/chunk-habv0vef.js +12 -0
  52. package/dist/chunk-hmgedrmr.js +11 -0
  53. package/dist/chunk-hz6fc788.js +2 -0
  54. package/dist/chunk-jff6j9y3.js +10 -0
  55. package/dist/chunk-jmeb7n8k.js +70 -0
  56. package/dist/chunk-jrf5a2ap.js +2 -0
  57. package/dist/chunk-jy2jhcpy.js +246 -0
  58. package/dist/chunk-kc659vhx.js +4 -0
  59. package/dist/chunk-kjtjbcq4.js +71 -0
  60. package/dist/chunk-krkchy8v.js +4 -0
  61. package/dist/chunk-kxp888dn.js +4540 -0
  62. package/dist/chunk-m249t3je.js +3 -0
  63. package/dist/chunk-m9yabnjx.js +2 -0
  64. package/dist/chunk-mekrq9wd.js +2 -0
  65. package/dist/chunk-mmxv535f.js +82 -0
  66. package/dist/chunk-mypn7jss.js +2 -0
  67. package/dist/chunk-n18x1k3c.js +2 -0
  68. package/dist/chunk-nkddjzsa.js +2 -0
  69. package/dist/chunk-pjmhqmr9.js +2 -0
  70. package/dist/chunk-qyrnsaq1.js +2 -0
  71. package/dist/chunk-r19ff2qm.js +62 -0
  72. package/dist/chunk-r338fssq.js +2 -0
  73. package/dist/chunk-s36z58x2.js +29 -0
  74. package/dist/chunk-s3dn1kwx.js +231 -0
  75. package/dist/chunk-s79dd325.js +471 -0
  76. package/dist/chunk-sw0chtw4.js +4 -0
  77. package/dist/chunk-ta38j9em.js +2 -0
  78. package/dist/chunk-tpfgntwj.js +4211 -0
  79. package/dist/chunk-vr10sbbh.js +3 -0
  80. package/dist/chunk-vsh4390q.js +358 -0
  81. package/dist/chunk-vv3gb1m5.js +84 -0
  82. package/dist/chunk-vw8rwv6e.js +2 -0
  83. package/dist/chunk-w4r464v5.js +288 -0
  84. package/dist/chunk-wcrqs5z9.js +2 -0
  85. package/dist/chunk-x6d1rmwa.js +2 -0
  86. package/dist/chunk-x7ft15zz.js +2 -0
  87. package/dist/chunk-x8trwn7j.js +3 -0
  88. package/dist/chunk-xg9xscqz.js +1 -0
  89. package/dist/chunk-xhepdj1f.js +2 -0
  90. package/dist/chunk-xv2em0q4.js +4 -0
  91. package/dist/chunk-ypw6g0te.js +2 -0
  92. package/dist/chunk-z8szsm21.js +2 -0
  93. package/dist/chunk-zetqzgf3.js +194 -0
  94. package/dist/chunk-zfbh14qe.js +2 -0
  95. package/dist/chunk-zhx0hxdd.js +28 -0
  96. package/dist/cli.js +67 -3240
  97. package/dist/container/index.js +1 -321
  98. package/dist/index.js +80 -13987
  99. package/package.json +1 -1
  100. package/dist/chunk-1ahs68ys.js +0 -18
  101. package/dist/chunk-cgptvjdf.js +0 -18131
  102. package/dist/chunk-g3ybefhg.js +0 -1923
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{o as a,p as b,q as c,r as d,s as e,t as f}from"./chunk-5ncn73tp.js";import"./chunk-tpfgntwj.js";import"./chunk-jff6j9y3.js";import"./chunk-csfrpsp7.js";import"./chunk-0t5vz87j.js";import"./chunk-krkchy8v.js";import"./chunk-brpgjyqg.js";import"./chunk-5mxby3fd.js";import"./chunk-5be9x5cq.js";import"./chunk-jmeb7n8k.js";import"./chunk-kc659vhx.js";import"./chunk-a3wahyg7.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -0,0 +1,321 @@
1
+ // @bun
2
+ function m(e,t={}){return{enterFrom:t.enterClass||`${e}-enter-from`,enterActive:t.enterActiveClass||`${e}-enter-active`,enterTo:t.enterToClass||`${e}-enter-to`,leaveFrom:t.leaveClass||`${e}-leave-from`,leaveActive:t.leaveActiveClass||`${e}-leave-active`,leaveTo:t.leaveToClass||`${e}-leave-to`}}function u(e){let t=getComputedStyle(e),r=t.transitionDuration||"0s",a=t.animationDuration||"0s",s=(n)=>{let o=n.match(/^([\d.]+)(s|ms)?$/);if(!o)return 0;let i=parseFloat(o[1]);return(o[2]||"s")==="ms"?i:i*1000};return Math.max(s(r),s(a))}function v(e,t){return new Promise((r)=>{let a=t??u(e);if(a===0){r();return}let s=!1,n=()=>{if(s)return;s=!0,e.removeEventListener("transitionend",o),e.removeEventListener("animationend",o),r()},o=(i)=>{if(i.target===e)n()};e.addEventListener("transitionend",o),e.addEventListener("animationend",o),setTimeout(n,a+50)})}function f(e){e.offsetHeight}async function y(e,t={}){let r=t.name||"stx",a=m(r,t),s=typeof t.duration==="object"?t.duration.enter:t.duration;if(t.onBeforeEnter?.(e),e.classList.add(a.enterFrom),e.classList.add(a.enterActive),f(e),e.classList.remove(a.enterFrom),e.classList.add(a.enterTo),t.onEnter)await new Promise((n)=>{t.onEnter(e,n)});else await v(e,s);e.classList.remove(a.enterActive),e.classList.remove(a.enterTo),t.onAfterEnter?.(e)}async function h(e,t={}){let r=t.name||"stx",a=m(r,t),s=typeof t.duration==="object"?t.duration.leave:t.duration;if(t.onBeforeLeave?.(e),e.classList.add(a.leaveFrom),e.classList.add(a.leaveActive),f(e),e.classList.remove(a.leaveFrom),e.classList.add(a.leaveTo),t.onLeave)await new Promise((n)=>{t.onLeave(e,n)});else await v(e,s);e.classList.remove(a.leaveActive),e.classList.remove(a.leaveTo),t.onAfterLeave?.(e)}function w(e,t={},r){let a=/@transition\s*\(([^)]*)\)([\s\S]*?)@endtransition/gi;return e.replace(a,(s,n,o)=>{let i=p(n),l=i.name||"stx",c=i.duration||300,d=`stx-transition-${Math.random().toString(36).slice(2,9)}`;return`
3
+ <div
4
+ class="stx-transition-wrapper"
5
+ data-transition="${l}"
6
+ data-transition-id="${d}"
7
+ data-transition-duration="${c}"
8
+ ${i.mode?`data-transition-mode="${i.mode}"`:""}
9
+ >
10
+ ${o.trim()}
11
+ </div>
12
+ <script>
13
+ (function() {
14
+ const wrapper = document.querySelector('[data-transition-id="${d}"]');
15
+ if (!wrapper) return;
16
+
17
+ const name = '${l}';
18
+ const duration = ${c};
19
+
20
+ // Observe for child changes to trigger transitions
21
+ const observer = new MutationObserver(function(mutations) {
22
+ mutations.forEach(function(mutation) {
23
+ mutation.addedNodes.forEach(function(node) {
24
+ if (node.nodeType === 1) {
25
+ window.STX?.transition?.enter(node, { name: name, duration: duration });
26
+ }
27
+ });
28
+ mutation.removedNodes.forEach(function(node) {
29
+ if (node.nodeType === 1) {
30
+ // Leave transition handled before removal
31
+ }
32
+ });
33
+ });
34
+ });
35
+
36
+ observer.observe(wrapper, { childList: true });
37
+
38
+ // Initial enter transition for existing children
39
+ Array.from(wrapper.children).forEach(function(child) {
40
+ window.STX?.transition?.enter(child, { name: name, duration: duration });
41
+ });
42
+ })();
43
+ </script>
44
+ `})}function p(e){let t={},r=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,a;while((a=r.exec(e))!==null){let s=a[1],n=a[2]||a[3]||a[4]||a[5];switch(s){case"name":t.name=n;break;case"duration":t.duration=parseInt(n,10);break;case"mode":t.mode=n;break;case"easing":t.easing=n;break}}return t}function g(){return`
45
+ /* STX Transition Presets */
46
+
47
+ /* Fade */
48
+ .fade-enter-from,
49
+ .fade-leave-to {
50
+ opacity: 0;
51
+ }
52
+ .fade-enter-active,
53
+ .fade-leave-active {
54
+ transition: opacity 0.3s ease;
55
+ }
56
+ .fade-enter-to,
57
+ .fade-leave-from {
58
+ opacity: 1;
59
+ }
60
+
61
+ /* Slide Up */
62
+ .slide-up-enter-from,
63
+ .slide-up-leave-to {
64
+ opacity: 0;
65
+ transform: translateY(20px);
66
+ }
67
+ .slide-up-enter-active,
68
+ .slide-up-leave-active {
69
+ transition: opacity 0.3s ease, transform 0.3s ease;
70
+ }
71
+ .slide-up-enter-to,
72
+ .slide-up-leave-from {
73
+ opacity: 1;
74
+ transform: translateY(0);
75
+ }
76
+
77
+ /* Slide Down */
78
+ .slide-down-enter-from,
79
+ .slide-down-leave-to {
80
+ opacity: 0;
81
+ transform: translateY(-20px);
82
+ }
83
+ .slide-down-enter-active,
84
+ .slide-down-leave-active {
85
+ transition: opacity 0.3s ease, transform 0.3s ease;
86
+ }
87
+ .slide-down-enter-to,
88
+ .slide-down-leave-from {
89
+ opacity: 1;
90
+ transform: translateY(0);
91
+ }
92
+
93
+ /* Slide Left */
94
+ .slide-left-enter-from {
95
+ opacity: 0;
96
+ transform: translateX(20px);
97
+ }
98
+ .slide-left-leave-to {
99
+ opacity: 0;
100
+ transform: translateX(-20px);
101
+ }
102
+ .slide-left-enter-active,
103
+ .slide-left-leave-active {
104
+ transition: opacity 0.3s ease, transform 0.3s ease;
105
+ }
106
+ .slide-left-enter-to,
107
+ .slide-left-leave-from {
108
+ opacity: 1;
109
+ transform: translateX(0);
110
+ }
111
+
112
+ /* Slide Right */
113
+ .slide-right-enter-from {
114
+ opacity: 0;
115
+ transform: translateX(-20px);
116
+ }
117
+ .slide-right-leave-to {
118
+ opacity: 0;
119
+ transform: translateX(20px);
120
+ }
121
+ .slide-right-enter-active,
122
+ .slide-right-leave-active {
123
+ transition: opacity 0.3s ease, transform 0.3s ease;
124
+ }
125
+ .slide-right-enter-to,
126
+ .slide-right-leave-from {
127
+ opacity: 1;
128
+ transform: translateX(0);
129
+ }
130
+
131
+ /* Scale */
132
+ .scale-enter-from,
133
+ .scale-leave-to {
134
+ opacity: 0;
135
+ transform: scale(0.9);
136
+ }
137
+ .scale-enter-active,
138
+ .scale-leave-active {
139
+ transition: opacity 0.3s ease, transform 0.3s ease;
140
+ }
141
+ .scale-enter-to,
142
+ .scale-leave-from {
143
+ opacity: 1;
144
+ transform: scale(1);
145
+ }
146
+
147
+ /* Scale Up (grow) */
148
+ .scale-up-enter-from,
149
+ .scale-up-leave-to {
150
+ opacity: 0;
151
+ transform: scale(0.5);
152
+ }
153
+ .scale-up-enter-active,
154
+ .scale-up-leave-active {
155
+ transition: opacity 0.3s ease, transform 0.3s ease;
156
+ }
157
+ .scale-up-enter-to,
158
+ .scale-up-leave-from {
159
+ opacity: 1;
160
+ transform: scale(1);
161
+ }
162
+
163
+ /* Bounce */
164
+ .bounce-enter-active {
165
+ animation: bounce-in 0.5s;
166
+ }
167
+ .bounce-leave-active {
168
+ animation: bounce-in 0.5s reverse;
169
+ }
170
+ @keyframes bounce-in {
171
+ 0% {
172
+ transform: scale(0);
173
+ }
174
+ 50% {
175
+ transform: scale(1.1);
176
+ }
177
+ 100% {
178
+ transform: scale(1);
179
+ }
180
+ }
181
+
182
+ /* Flip */
183
+ .flip-enter-from,
184
+ .flip-leave-to {
185
+ opacity: 0;
186
+ transform: perspective(400px) rotateY(90deg);
187
+ }
188
+ .flip-enter-active,
189
+ .flip-leave-active {
190
+ transition: opacity 0.4s ease, transform 0.4s ease;
191
+ }
192
+ .flip-enter-to,
193
+ .flip-leave-from {
194
+ opacity: 1;
195
+ transform: perspective(400px) rotateY(0);
196
+ }
197
+
198
+ /* Zoom */
199
+ .zoom-enter-from,
200
+ .zoom-leave-to {
201
+ opacity: 0;
202
+ transform: scale(0);
203
+ }
204
+ .zoom-enter-active,
205
+ .zoom-leave-active {
206
+ transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
207
+ }
208
+ .zoom-enter-to,
209
+ .zoom-leave-from {
210
+ opacity: 1;
211
+ transform: scale(1);
212
+ }
213
+
214
+ /* Collapse (height) */
215
+ .collapse-enter-from,
216
+ .collapse-leave-to {
217
+ opacity: 0;
218
+ max-height: 0;
219
+ overflow: hidden;
220
+ }
221
+ .collapse-enter-active,
222
+ .collapse-leave-active {
223
+ transition: opacity 0.3s ease, max-height 0.3s ease;
224
+ overflow: hidden;
225
+ }
226
+ .collapse-enter-to,
227
+ .collapse-leave-from {
228
+ opacity: 1;
229
+ max-height: 1000px;
230
+ }
231
+ `}function x(){return`
232
+ // STX Transition Runtime
233
+ (function() {
234
+ if (typeof window === 'undefined') return;
235
+
236
+ window.STX = window.STX || {};
237
+ window.STX.transition = {
238
+ // Perform enter transition
239
+ enter: function(el, options) {
240
+ options = options || {};
241
+ const name = options.name || 'stx';
242
+ const duration = options.duration || 300;
243
+
244
+ const classes = {
245
+ enterFrom: name + '-enter-from',
246
+ enterActive: name + '-enter-active',
247
+ enterTo: name + '-enter-to'
248
+ };
249
+
250
+ // Add initial classes
251
+ el.classList.add(classes.enterFrom);
252
+ el.classList.add(classes.enterActive);
253
+
254
+ // Force reflow
255
+ void el.offsetHeight;
256
+
257
+ // Start transition
258
+ el.classList.remove(classes.enterFrom);
259
+ el.classList.add(classes.enterTo);
260
+
261
+ // Cleanup after transition
262
+ setTimeout(function() {
263
+ el.classList.remove(classes.enterActive);
264
+ el.classList.remove(classes.enterTo);
265
+ }, duration + 50);
266
+
267
+ return el;
268
+ },
269
+
270
+ // Perform leave transition
271
+ leave: function(el, options) {
272
+ return new Promise(function(resolve) {
273
+ options = options || {};
274
+ const name = options.name || 'stx';
275
+ const duration = options.duration || 300;
276
+
277
+ const classes = {
278
+ leaveFrom: name + '-leave-from',
279
+ leaveActive: name + '-leave-active',
280
+ leaveTo: name + '-leave-to'
281
+ };
282
+
283
+ // Add initial classes
284
+ el.classList.add(classes.leaveFrom);
285
+ el.classList.add(classes.leaveActive);
286
+
287
+ // Force reflow
288
+ void el.offsetHeight;
289
+
290
+ // Start transition
291
+ el.classList.remove(classes.leaveFrom);
292
+ el.classList.add(classes.leaveTo);
293
+
294
+ // Cleanup and resolve after transition
295
+ setTimeout(function() {
296
+ el.classList.remove(classes.leaveActive);
297
+ el.classList.remove(classes.leaveTo);
298
+ resolve(el);
299
+ }, duration + 50);
300
+ });
301
+ },
302
+
303
+ // Toggle with transition
304
+ toggle: function(el, show, options) {
305
+ if (show) {
306
+ el.style.display = '';
307
+ return this.enter(el, options);
308
+ }
309
+ else {
310
+ return this.leave(el, options).then(function() {
311
+ el.style.display = 'none';
312
+ return el;
313
+ });
314
+ }
315
+ }
316
+ };
317
+
318
+ console.log('[stx] Transition runtime initialized');
319
+ })();
320
+ `}function T(e){let t=/@transition\.([a-z-]+)(?:\.(\d+))?="([^"]+)"/gi;return e.replace(t,(r,a,s,n)=>{let o=s||"300",i=`stx-t-${Math.random().toString(36).slice(2,7)}`;return`data-stx-transition="${a}" data-stx-transition-duration="${o}" data-stx-transition-condition="${n}" data-stx-transition-id="${i}"`})}
321
+ export{y as ze,h as Ae,w as Be,g as Ce,x as De,T as Ee};