@rozenite/vite-plugin 2.0.0 → 2.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 (39) hide show
  1. package/dist/bundle-dts.d.ts.map +1 -1
  2. package/dist/client-plugin.d.ts.map +1 -1
  3. package/dist/dev-config-module.d.ts.map +1 -1
  4. package/dist/dev-host/assets/{index-Xsb6uYhI.js → index-BgAxGQdD.js} +8 -8
  5. package/dist/dev-host/assets/index-ClIYIppU.css +1 -0
  6. package/dist/dev-host/index.html +2 -2
  7. package/dist/dev-host/manifest.json +2 -2
  8. package/dist/index.cjs +21 -66
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +21 -66
  12. package/dist/load-config.d.ts.map +1 -1
  13. package/dist/package-json.d.ts.map +1 -1
  14. package/dist/react-native-plugin.d.ts.map +1 -1
  15. package/dist/require-plugin.d.ts.map +1 -1
  16. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  17. package/dist/utils.d.ts.map +1 -1
  18. package/package.json +25 -25
  19. package/src/bundle-dts.ts +3 -12
  20. package/src/client-plugin.ts +9 -34
  21. package/src/dev-config-module.ts +1 -4
  22. package/src/dev-host/App.tsx +20 -56
  23. package/src/dev-host/components/DispatchForm.tsx +4 -14
  24. package/src/dev-host/components/FlowList.tsx +4 -16
  25. package/src/dev-host/components/MessageDetailsPane.tsx +3 -9
  26. package/src/dev-host/components/MessageLogPane.tsx +4 -13
  27. package/src/dev-host/components/PanelTabs.tsx +3 -13
  28. package/src/dev-host/config.ts +2 -6
  29. package/src/dev-host/flow-runtime.ts +6 -24
  30. package/src/dev-host/server.ts +3 -9
  31. package/src/dev-host/types.ts +1 -5
  32. package/src/dev-host/utils.ts +3 -12
  33. package/src/index.ts +4 -14
  34. package/src/load-config.ts +9 -20
  35. package/src/package-json.ts +1 -3
  36. package/src/react-native-plugin.ts +1 -2
  37. package/src/require-plugin.ts +6 -18
  38. package/src/utils.ts +1 -4
  39. package/dist/dev-host/assets/index-DU3zXL2c.css +0 -1
@@ -0,0 +1 @@
1
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:calc(var(--radius) * .6);--radius-md:calc(var(--radius) * .8);--radius-lg:var(--radius);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--border);border-radius:var(--radius-lg);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-thumb:hover{background-color:var(--muted-foreground)}html,body,#root{height:100%;margin:0}body{overflow:hidden}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.right-1\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0\.5{left:calc(var(--spacing) * .5)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.z-10{z-index:10}.z-50{z-index:50}.row-0{grid-row:0}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing) * 0)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-auto{margin-top:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-3\.5{margin-left:calc(var(--spacing) * 3.5)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-28{min-height:calc(var(--spacing) * 28)}.min-h-56{min-height:calc(var(--spacing) * 56)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-56{width:calc(var(--spacing) * 56)}.w-80{width:calc(var(--spacing) * 80)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[--anchor-width\]{min-width:--anchor-width}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\(--transform-origin\){transform-origin:var(--transform-origin)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-\[minmax\(7rem\,25\%\)_minmax\(3rem\,1fr\)\]{grid-template-columns:minmax(7rem,25%) minmax(3rem,1fr)}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-border{border-color:var(--border)}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive) 50%,transparent)}}.border-input{border-color:var(--input)}.border-ring{border-color:var(--ring)}.border-sidebar-border{border-color:var(--sidebar-border)}.bg-background,.bg-background\/70{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/70{background-color:color-mix(in oklab,var(--background) 70%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-foreground{background-color:var(--foreground)}.bg-muted{background-color:var(--muted)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-transparent{background-color:#0000}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-14{padding-right:calc(var(--spacing) * 14)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-muted-foreground,.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/60{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/60{color:color-mix(in oklab,var(--sidebar-foreground) 60%,transparent)}}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-\[transform\,opacity\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,scale\,opacity\]{transition-property:transform,scale,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.running{animation-play-state:running}@media(hover:hover){.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-0\.5:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}}.group-aria-\[orientation\=horizontal\]\/split-handle\:h-3:is(:where(.group\/split-handle)[aria-orientation=horizontal] *){height:calc(var(--spacing) * 3)}.group-aria-\[orientation\=horizontal\]\/split-handle\:w-4:is(:where(.group\/split-handle)[aria-orientation=horizontal] *){width:calc(var(--spacing) * 4)}.group-aria-\[orientation\=horizontal\]\/split-handle\:rotate-90:is(:where(.group\/split-handle)[aria-orientation=horizontal] *){rotate:90deg}.group-aria-\[orientation\=vertical\]\/split-handle\:h-4:is(:where(.group\/split-handle)[aria-orientation=vertical] *){height:calc(var(--spacing) * 4)}.group-aria-\[orientation\=vertical\]\/split-handle\:w-3:is(:where(.group\/split-handle)[aria-orientation=vertical] *){width:calc(var(--spacing) * 3)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-muted-foreground:hover{background-color:var(--muted-foreground)}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-primary:hover{color:var(--primary)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-sidebar-ring:focus-visible{--tw-ring-color:var(--sidebar-ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.aria-\[orientation\=horizontal\]\:h-px[aria-orientation=horizontal]{height:1px}.aria-\[orientation\=horizontal\]\:cursor-row-resize[aria-orientation=horizontal]{cursor:row-resize}.aria-\[orientation\=vertical\]\:w-px[aria-orientation=vertical]{width:1px}.aria-\[orientation\=vertical\]\:cursor-col-resize[aria-orientation=vertical]{cursor:col-resize}.data-\[checked\]\:translate-x-4[data-checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[checked\]\:border-primary[data-checked]{border-color:var(--primary)}.data-\[checked\]\:bg-primary[data-checked]{background-color:var(--primary)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[ending-style\]\:scale-90[data-ending-style]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[ending-style\]\:scale-95[data-ending-style]{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[ending-style\]\:opacity-0[data-ending-style]{opacity:0}.data-\[highlighted\]\:bg-accent[data-highlighted]{background-color:var(--accent)}.data-\[highlighted\]\:text-accent-foreground[data-highlighted]{color:var(--accent-foreground)}.data-\[selected\]\:bg-background[data-selected]{background-color:var(--background)}.data-\[selected\]\:bg-sidebar-accent[data-selected]{background-color:var(--sidebar-accent)}.data-\[selected\]\:font-medium[data-selected]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\[selected\]\:text-foreground[data-selected]{color:var(--foreground)}.data-\[selected\]\:text-sidebar-accent-foreground[data-selected]{color:var(--sidebar-accent-foreground)}.data-\[selected\]\:shadow-xs[data-selected]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[starting-style\]\:scale-90[data-starting-style]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[starting-style\]\:scale-95[data-starting-style]{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[starting-style\]\:opacity-0[data-starting-style]{opacity:0}@media(min-width:40rem){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-3\.5 svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:h-3\.5 svg{height:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:w-3\.5 svg{width:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&\:\:-webkit-search-cancel-button\]\:appearance-none::-webkit-search-cancel-button{appearance:none}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:0;--background:#fff;--foreground:#201f24;--card:#fff;--card-foreground:#201f24;--popover:#fff;--popover-foreground:#201f24;--primary:#8232ff;--primary-foreground:#fff;--secondary:#f9f8fd;--secondary-foreground:#201f24;--muted:#f9f8fd;--muted-foreground:#838289;--accent:#8232ff29;--accent-foreground:#201f24;--destructive:#fa7171;--destructive-foreground:#201f24;--border:#cfced5;--input:#cfced5;--ring:#8232ff;--sidebar:#fff;--sidebar-foreground:#201f24;--sidebar-primary:#8232ff;--sidebar-primary-foreground:#fff;--sidebar-accent:#8232ff29;--sidebar-accent-foreground:#201f24;--sidebar-border:#cfced5;--sidebar-ring:#8232ff}.dark{--background:#201f24;--foreground:#fff;--card:#201f24;--card-foreground:#fff;--popover:#2b2a2f;--popover-foreground:#fff;--primary:#8232ff;--primary-foreground:#fff;--secondary:#2b2a2f;--secondary-foreground:#fff;--muted:#2b2a2f;--muted-foreground:#cfced5;--accent:#8232ff33;--accent-foreground:#fff;--destructive:#fa7171;--destructive-foreground:#201f24;--border:#424145;--input:#424145;--ring:#8232ff;--sidebar:#201f24;--sidebar-foreground:#fff;--sidebar-primary:#8232ff;--sidebar-primary-foreground:#fff;--sidebar-accent:#8232ff33;--sidebar-accent-foreground:#fff;--sidebar-border:#424145;--sidebar-ring:#8232ff}.dev-host{height:100dvh;overflow:hidden}.dev-host-body{min-height:0;overflow:hidden!important}.dev-host-header{min-height:3.25rem}.dev-host-header-title{flex-direction:column;gap:.125rem;min-width:0;display:flex}.dev-host-header-subtitle{text-overflow:ellipsis;white-space:nowrap;max-width:30rem;overflow:hidden}.dev-host-panel-select{width:min(16rem,32vw)}.dev-host-main-split{flex:1;min-height:0}.dev-host-preview{background:var(--background);height:100%;min-height:0;position:relative;overflow:hidden}.dev-host-iframe{background:var(--background);border:0;width:100%;height:100%;display:block}.dev-host-devtools{height:100%;min-height:0;overflow:hidden}.dev-host-pane{background:var(--background);flex-direction:column;flex:1;height:100%;min-height:0;display:flex;overflow:hidden}.dev-host-pane-header{border-bottom:1px solid var(--border);background:var(--card);flex-shrink:0;justify-content:space-between;align-items:center;gap:.75rem;min-height:2.75rem;padding:.625rem .875rem;display:flex}.dev-host-pane-title{color:var(--foreground);letter-spacing:.06em;text-transform:uppercase;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.6875rem;font-weight:600}.dev-host-pane-actions{align-items:center;gap:.25rem;display:flex}.dev-host-scroll{flex:1;min-height:0}.dev-host-message-table{min-width:42rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.dev-host-direction-in{color:#22c55e}.dev-host-direction-out{color:#f59e0b}.dev-host-form,.dev-host-flow-list,.dev-host-details{flex-direction:column;gap:1rem;min-height:0;padding:1rem;display:flex}.dev-host-form{flex:1}.dev-host-field{gap:.375rem;display:grid}.dev-host-label{color:var(--muted-foreground);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.75rem}.dev-host-actions{justify-content:flex-end;gap:.5rem;margin-top:auto;display:flex}.dev-host-tabs-header{justify-content:space-between;align-items:center;gap:.75rem;padding:.75rem 1rem 0;display:flex}.dev-host-tab-panel{flex:1;min-height:0;overflow:auto}.dev-host-flow-list{padding-top:.75rem}.dev-host-flow-button{text-align:left;justify-content:space-between;align-items:center;gap:.75rem;width:100%;display:flex}.dev-host-flow-name,.dev-host-flow-title{align-items:center;gap:.375rem;display:inline-flex}.dev-host-flow-runs{gap:.75rem;display:grid}.dev-host-flow-state{border:1px solid var(--border);border-radius:var(--radius-md);gap:.5rem;padding:.75rem;display:grid}.dev-host-flow-state[data-status=running]{border-color:var(--primary)}.dev-host-flow-state[data-status=failed]{border-color:var(--destructive)}.dev-host-flow-state-header{justify-content:space-between;align-items:center;gap:.5rem;display:flex}.dev-host-flow-state-result,.dev-host-flow-state-error,.dev-host-detail-value,.dev-host-detail-payload{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--muted);white-space:pre-wrap;word-break:break-word;padding:.625rem .75rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.75rem;line-height:1.5;overflow:auto}.dev-host-flow-state-error{color:var(--destructive)}.dev-host-detail-section{gap:.375rem;display:grid}.dev-host-detail-payload{min-height:4rem}.dev-host-mobile-tabs{flex-direction:column;flex:1;height:100%;min-height:0;display:flex}.dev-host-mobile-tab-list{flex-shrink:0;padding:.5rem .75rem 0}.dev-host-mobile-tab-panel{flex-direction:column;flex:1;min-height:0;display:flex}.dev-host-mobile-tab-panel>.dev-host-pane{display:flex}@media(max-width:960px){.dev-host-header{padding-inline:.75rem}.dev-host-header-subtitle{display:none}.dev-host-panel-select{width:min(12rem,42vw)}.dev-host-message-table{min-width:36rem}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Rozenite Dev Host</title>
7
- <script type="module" crossorigin src="./assets/index-Xsb6uYhI.js"></script>
8
- <link rel="stylesheet" crossorigin href="./assets/index-DU3zXL2c.css">
7
+ <script type="module" crossorigin src="./assets/index-BgAxGQdD.js"></script>
8
+ <link rel="stylesheet" crossorigin href="./assets/index-ClIYIppU.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "index.html": {
3
- "file": "assets/index-Xsb6uYhI.js",
3
+ "file": "assets/index-BgAxGQdD.js",
4
4
  "name": "index",
5
5
  "src": "index.html",
6
6
  "isEntry": true,
7
7
  "css": [
8
- "assets/index-DU3zXL2c.css"
8
+ "assets/index-ClIYIppU.css"
9
9
  ]
10
10
  }
11
11
  }
package/dist/index.cjs CHANGED
@@ -53,19 +53,12 @@ const loadConfig = async (configPath) => {
53
53
  throw new Error(`Configuration file not found: ${absoluteConfigPath}`);
54
54
  }
55
55
  try {
56
- const configContent = await fs.promises.readFile(
57
- absoluteConfigPath,
58
- "utf-8"
59
- );
60
- const result = await vite.transformWithEsbuild(
61
- configContent,
62
- absoluteConfigPath,
63
- {
64
- loader: "ts",
65
- format: "cjs",
66
- target: "esnext"
67
- }
68
- );
56
+ const configContent = await fs.promises.readFile(absoluteConfigPath, "utf-8");
57
+ const result = await vite.transformWithEsbuild(configContent, absoluteConfigPath, {
58
+ loader: "ts",
59
+ format: "cjs",
60
+ target: "esnext"
61
+ });
69
62
  const moduleExports = {};
70
63
  const module2 = { exports: moduleExports };
71
64
  const exports2 = moduleExports;
@@ -79,9 +72,7 @@ const loadConfig = async (configPath) => {
79
72
  return config;
80
73
  } catch (error) {
81
74
  if (error instanceof Error) {
82
- throw new Error(
83
- `Failed to load configuration from ${configPath}: ${error.message}`
84
- );
75
+ throw new Error(`Failed to load configuration from ${configPath}: ${error.message}`);
85
76
  }
86
77
  throw new Error(`Failed to load configuration from ${configPath}`);
87
78
  }
@@ -116,14 +107,10 @@ const getBuiltDevHostAssets = (packageDir) => {
116
107
  if (!fs.existsSync(manifestPath)) {
117
108
  return null;
118
109
  }
119
- const manifest = JSON.parse(
120
- fs.readFileSync(manifestPath, "utf8")
121
- );
110
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
122
111
  const entry = manifest[DEV_HOST_BUILD_ENTRY_KEY];
123
112
  if (!entry?.file) {
124
- throw new Error(
125
- `Missing ${DEV_HOST_BUILD_ENTRY_KEY} entry in dev host manifest.`
126
- );
113
+ throw new Error(`Missing ${DEV_HOST_BUILD_ENTRY_KEY} entry in dev host manifest.`);
127
114
  }
128
115
  return {
129
116
  script: path.join(devHostDistDir, entry.file),
@@ -149,12 +136,7 @@ const loadRozeniteDevConfigModule = (id, projectRoot) => {
149
136
  const configPath = vite.normalizePath(getRozeniteConfigPath(projectRoot));
150
137
  return `export { default } from ${JSON.stringify(`/@fs${configPath}`)};`;
151
138
  };
152
- const TEMPLATES_DIR = path.resolve(
153
- node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.cjs", document.baseURI).href),
154
- "..",
155
- "..",
156
- "templates"
157
- );
139
+ const TEMPLATES_DIR = path.resolve(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.cjs", document.baseURI).href), "..", "..", "templates");
158
140
  const PACKAGE_DIR = path.resolve(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.cjs", document.baseURI).href), "..", "..");
159
141
  const DEV_HOST_SOURCE_ENTRY_FILE = getDevHostSourceEntryFile(PACKAGE_DIR);
160
142
  const PANELS_DIR = "./panels";
@@ -268,10 +250,7 @@ const rozeniteClientPlugin = () => {
268
250
  config.build.rollupOptions.input = {
269
251
  ...config.build.rollupOptions.input,
270
252
  ...Object.fromEntries(
271
- panels.map((panel) => [
272
- panel.name,
273
- `${DEVTOOLS_DIR}/${panel.htmlFile}`
274
- ])
253
+ panels.map((panel) => [panel.name, `${DEVTOOLS_DIR}/${panel.htmlFile}`])
275
254
  )
276
255
  };
277
256
  config.build.rollupOptions.output = {
@@ -286,9 +265,7 @@ const rozeniteClientPlugin = () => {
286
265
  if (devConfigModuleId) {
287
266
  return devConfigModuleId;
288
267
  }
289
- const isPanel = getPanels().some(
290
- (panel) => `${DEVTOOLS_DIR}/${panel.htmlFile}` === id
291
- );
268
+ const isPanel = getPanels().some((panel) => `${DEVTOOLS_DIR}/${panel.htmlFile}` === id);
292
269
  if (isPanel) {
293
270
  return id;
294
271
  }
@@ -299,9 +276,7 @@ const rozeniteClientPlugin = () => {
299
276
  if (devConfigModule) {
300
277
  return devConfigModule;
301
278
  }
302
- const panel = getPanels().find(
303
- (panel2) => `${DEVTOOLS_DIR}/${panel2.htmlFile}` === id
304
- );
279
+ const panel = getPanels().find((panel2) => `${DEVTOOLS_DIR}/${panel2.htmlFile}` === id);
305
280
  if (panel) {
306
281
  return generatePanelHtmlContent(panel);
307
282
  }
@@ -347,14 +322,8 @@ const rozeniteClientPlugin = () => {
347
322
  const packageJSON = await getPackageJSON(projectRoot);
348
323
  server.middlewares.use((req, res, next) => {
349
324
  res.setHeader("Access-Control-Allow-Origin", "*");
350
- res.setHeader(
351
- "Access-Control-Allow-Methods",
352
- "GET, POST, PUT, DELETE, OPTIONS"
353
- );
354
- res.setHeader(
355
- "Access-Control-Allow-Headers",
356
- "Content-Type, Authorization"
357
- );
325
+ res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
326
+ res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization");
358
327
  if (req.method === "OPTIONS") {
359
328
  res.statusCode = 200;
360
329
  res.end();
@@ -388,9 +357,7 @@ const rozeniteClientPlugin = () => {
388
357
  );
389
358
  return;
390
359
  }
391
- const panel = panels.find(
392
- (panel2) => `/${DEVTOOLS_DIR}/` + panel2.htmlFile === url
393
- );
360
+ const panel = panels.find((panel2) => `/${DEVTOOLS_DIR}/` + panel2.htmlFile === url);
394
361
  if (panel) {
395
362
  const htmlContent = generatePanelHtmlContent(panel);
396
363
  server.transformIndexHtml(requestUrl, htmlContent).then((html) => {
@@ -566,9 +533,7 @@ const transformRequireToChunkReferences = (code, moduleInfoMap, getFileName) =>
566
533
  return match;
567
534
  }
568
535
  const outFileName = getFileName(moduleInfo.referenceId);
569
- const relPath = vite.normalizePath(
570
- path.posix.relative("react-native", outFileName)
571
- );
536
+ const relPath = vite.normalizePath(path.posix.relative("react-native", outFileName));
572
537
  const requirePath = relPath.startsWith(".") ? relPath : `./${relPath}`;
573
538
  return `require('${requirePath}')`;
574
539
  });
@@ -611,10 +576,7 @@ function requirePlugin() {
611
576
  async buildStart(options) {
612
577
  try {
613
578
  assert(Array.isArray(options.input), "input must be an array");
614
- assert(
615
- options.input.length === 1,
616
- "input must be an array with one entry"
617
- );
579
+ assert(options.input.length === 1, "input must be an array with one entry");
618
580
  input = options.input[0];
619
581
  inputName = extractModuleName(input);
620
582
  moduleInfoMap.clear();
@@ -629,15 +591,10 @@ function requirePlugin() {
629
591
  continue;
630
592
  }
631
593
  this.addWatchFile(resolved.id);
632
- const exportName = sanitizeChunkName(
633
- extractModuleName(resolved.id)
634
- );
594
+ const exportName = sanitizeChunkName(extractModuleName(resolved.id));
635
595
  const wrapperName = `${exportName}${REQUIRE_WRAPPER_SUFFIX}`;
636
596
  const virtualId = `${VIRTUAL_REQUIRE_PREFIX}${wrapperName}`;
637
- virtualModuleSources.set(
638
- virtualId,
639
- `export * from ${JSON.stringify(req)};`
640
- );
597
+ virtualModuleSources.set(virtualId, `export * from ${JSON.stringify(req)};`);
641
598
  const referenceId = this.emitFile({
642
599
  type: "chunk",
643
600
  id: virtualId,
@@ -822,9 +779,7 @@ const getDtsPlugin = (target) => {
822
779
  }
823
780
  });
824
781
  };
825
- const rozenitePlugin = ({
826
- tailwind = true
827
- } = {}) => {
782
+ const rozenitePlugin = ({ tailwind = true } = {}) => {
828
783
  const isServer = process.env.VITE_ROZENITE_TARGET === "server";
829
784
  const isReactNative = process.env.VITE_ROZENITE_TARGET === "react-native";
830
785
  const isSdk = process.env.VITE_ROZENITE_TARGET === "sdk";
package/dist/index.d.ts CHANGED
@@ -7,5 +7,5 @@ export type RozenitePluginOptions = {
7
7
  */
8
8
  tailwind?: boolean;
9
9
  };
10
- export declare const rozenitePlugin: ({ tailwind, }?: RozenitePluginOptions) => PluginOption[];
10
+ export declare const rozenitePlugin: ({ tailwind }?: RozenitePluginOptions) => PluginOption[];
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAuFzC,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,gBAE5B,qBAA0B,KAAG,YAAY,EAyB3C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AA+EzC,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,eAAqB,qBAA0B,KAAG,YAAY,EAyB5F,CAAC"}
package/dist/index.js CHANGED
@@ -50,19 +50,12 @@ const loadConfig = async (configPath) => {
50
50
  throw new Error(`Configuration file not found: ${absoluteConfigPath}`);
51
51
  }
52
52
  try {
53
- const configContent = await fs.promises.readFile(
54
- absoluteConfigPath,
55
- "utf-8"
56
- );
57
- const result = await transformWithEsbuild(
58
- configContent,
59
- absoluteConfigPath,
60
- {
61
- loader: "ts",
62
- format: "cjs",
63
- target: "esnext"
64
- }
65
- );
53
+ const configContent = await fs.promises.readFile(absoluteConfigPath, "utf-8");
54
+ const result = await transformWithEsbuild(configContent, absoluteConfigPath, {
55
+ loader: "ts",
56
+ format: "cjs",
57
+ target: "esnext"
58
+ });
66
59
  const moduleExports = {};
67
60
  const module = { exports: moduleExports };
68
61
  const exports = moduleExports;
@@ -76,9 +69,7 @@ const loadConfig = async (configPath) => {
76
69
  return config;
77
70
  } catch (error) {
78
71
  if (error instanceof Error) {
79
- throw new Error(
80
- `Failed to load configuration from ${configPath}: ${error.message}`
81
- );
72
+ throw new Error(`Failed to load configuration from ${configPath}: ${error.message}`);
82
73
  }
83
74
  throw new Error(`Failed to load configuration from ${configPath}`);
84
75
  }
@@ -113,14 +104,10 @@ const getBuiltDevHostAssets = (packageDir) => {
113
104
  if (!fs.existsSync(manifestPath)) {
114
105
  return null;
115
106
  }
116
- const manifest = JSON.parse(
117
- fs.readFileSync(manifestPath, "utf8")
118
- );
107
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
119
108
  const entry = manifest[DEV_HOST_BUILD_ENTRY_KEY];
120
109
  if (!entry?.file) {
121
- throw new Error(
122
- `Missing ${DEV_HOST_BUILD_ENTRY_KEY} entry in dev host manifest.`
123
- );
110
+ throw new Error(`Missing ${DEV_HOST_BUILD_ENTRY_KEY} entry in dev host manifest.`);
124
111
  }
125
112
  return {
126
113
  script: path.join(devHostDistDir, entry.file),
@@ -146,12 +133,7 @@ const loadRozeniteDevConfigModule = (id, projectRoot) => {
146
133
  const configPath = normalizePath(getRozeniteConfigPath(projectRoot));
147
134
  return `export { default } from ${JSON.stringify(`/@fs${configPath}`)};`;
148
135
  };
149
- const TEMPLATES_DIR = path.resolve(
150
- fileURLToPath(import.meta.url),
151
- "..",
152
- "..",
153
- "templates"
154
- );
136
+ const TEMPLATES_DIR = path.resolve(fileURLToPath(import.meta.url), "..", "..", "templates");
155
137
  const PACKAGE_DIR = path.resolve(fileURLToPath(import.meta.url), "..", "..");
156
138
  const DEV_HOST_SOURCE_ENTRY_FILE = getDevHostSourceEntryFile(PACKAGE_DIR);
157
139
  const PANELS_DIR = "./panels";
@@ -265,10 +247,7 @@ const rozeniteClientPlugin = () => {
265
247
  config.build.rollupOptions.input = {
266
248
  ...config.build.rollupOptions.input,
267
249
  ...Object.fromEntries(
268
- panels.map((panel) => [
269
- panel.name,
270
- `${DEVTOOLS_DIR}/${panel.htmlFile}`
271
- ])
250
+ panels.map((panel) => [panel.name, `${DEVTOOLS_DIR}/${panel.htmlFile}`])
272
251
  )
273
252
  };
274
253
  config.build.rollupOptions.output = {
@@ -283,9 +262,7 @@ const rozeniteClientPlugin = () => {
283
262
  if (devConfigModuleId) {
284
263
  return devConfigModuleId;
285
264
  }
286
- const isPanel = getPanels().some(
287
- (panel) => `${DEVTOOLS_DIR}/${panel.htmlFile}` === id
288
- );
265
+ const isPanel = getPanels().some((panel) => `${DEVTOOLS_DIR}/${panel.htmlFile}` === id);
289
266
  if (isPanel) {
290
267
  return id;
291
268
  }
@@ -296,9 +273,7 @@ const rozeniteClientPlugin = () => {
296
273
  if (devConfigModule) {
297
274
  return devConfigModule;
298
275
  }
299
- const panel = getPanels().find(
300
- (panel2) => `${DEVTOOLS_DIR}/${panel2.htmlFile}` === id
301
- );
276
+ const panel = getPanels().find((panel2) => `${DEVTOOLS_DIR}/${panel2.htmlFile}` === id);
302
277
  if (panel) {
303
278
  return generatePanelHtmlContent(panel);
304
279
  }
@@ -344,14 +319,8 @@ const rozeniteClientPlugin = () => {
344
319
  const packageJSON = await getPackageJSON(projectRoot);
345
320
  server.middlewares.use((req, res, next) => {
346
321
  res.setHeader("Access-Control-Allow-Origin", "*");
347
- res.setHeader(
348
- "Access-Control-Allow-Methods",
349
- "GET, POST, PUT, DELETE, OPTIONS"
350
- );
351
- res.setHeader(
352
- "Access-Control-Allow-Headers",
353
- "Content-Type, Authorization"
354
- );
322
+ res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
323
+ res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization");
355
324
  if (req.method === "OPTIONS") {
356
325
  res.statusCode = 200;
357
326
  res.end();
@@ -385,9 +354,7 @@ const rozeniteClientPlugin = () => {
385
354
  );
386
355
  return;
387
356
  }
388
- const panel = panels.find(
389
- (panel2) => `/${DEVTOOLS_DIR}/` + panel2.htmlFile === url
390
- );
357
+ const panel = panels.find((panel2) => `/${DEVTOOLS_DIR}/` + panel2.htmlFile === url);
391
358
  if (panel) {
392
359
  const htmlContent = generatePanelHtmlContent(panel);
393
360
  server.transformIndexHtml(requestUrl, htmlContent).then((html) => {
@@ -563,9 +530,7 @@ const transformRequireToChunkReferences = (code, moduleInfoMap, getFileName) =>
563
530
  return match;
564
531
  }
565
532
  const outFileName = getFileName(moduleInfo.referenceId);
566
- const relPath = normalizePath(
567
- path.posix.relative("react-native", outFileName)
568
- );
533
+ const relPath = normalizePath(path.posix.relative("react-native", outFileName));
569
534
  const requirePath = relPath.startsWith(".") ? relPath : `./${relPath}`;
570
535
  return `require('${requirePath}')`;
571
536
  });
@@ -608,10 +573,7 @@ function requirePlugin() {
608
573
  async buildStart(options) {
609
574
  try {
610
575
  assert(Array.isArray(options.input), "input must be an array");
611
- assert(
612
- options.input.length === 1,
613
- "input must be an array with one entry"
614
- );
576
+ assert(options.input.length === 1, "input must be an array with one entry");
615
577
  input = options.input[0];
616
578
  inputName = extractModuleName(input);
617
579
  moduleInfoMap.clear();
@@ -626,15 +588,10 @@ function requirePlugin() {
626
588
  continue;
627
589
  }
628
590
  this.addWatchFile(resolved.id);
629
- const exportName = sanitizeChunkName(
630
- extractModuleName(resolved.id)
631
- );
591
+ const exportName = sanitizeChunkName(extractModuleName(resolved.id));
632
592
  const wrapperName = `${exportName}${REQUIRE_WRAPPER_SUFFIX}`;
633
593
  const virtualId = `${VIRTUAL_REQUIRE_PREFIX}${wrapperName}`;
634
- virtualModuleSources.set(
635
- virtualId,
636
- `export * from ${JSON.stringify(req)};`
637
- );
594
+ virtualModuleSources.set(virtualId, `export * from ${JSON.stringify(req)};`);
638
595
  const referenceId = this.emitFile({
639
596
  type: "chunk",
640
597
  id: virtualId,
@@ -819,9 +776,7 @@ const getDtsPlugin = (target) => {
819
776
  }
820
777
  });
821
778
  };
822
- const rozenitePlugin = ({
823
- tailwind = true
824
- } = {}) => {
779
+ const rozenitePlugin = ({ tailwind = true } = {}) => {
825
780
  const isServer = process.env.VITE_ROZENITE_TARGET === "server";
826
781
  const isReactNative = process.env.VITE_ROZENITE_TARGET === "react-native";
827
782
  const isSdk = process.env.VITE_ROZENITE_TARGET === "sdk";
@@ -1 +1 @@
1
- {"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../src/load-config.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,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"file":"package-json.d.ts","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,aAAa,MAAM,KAClB,OAAO,CAAC,WAAW,CAIrB,CAAC"}
1
+ {"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,WAAW,CAI7E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"react-native-plugin.d.ts","sourceRoot":"","sources":["../src/react-native-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,eAAO,MAAM,yBAAyB,QAAO,MAgD5C,CAAC"}
1
+ {"version":3,"file":"react-native-plugin.d.ts","sourceRoot":"","sources":["../src/react-native-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,eAAO,MAAM,yBAAyB,QAAO,MA+C5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"require-plugin.d.ts","sourceRoot":"","sources":["../src/require-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,MAAM,EAAE,MAAM,MAAM,CAAC;AA8F7C,MAAM,CAAC,OAAO,UAAU,aAAa,IAAI,MAAM,CA2H9C"}
1
+ {"version":3,"file":"require-plugin.d.ts","sourceRoot":"","sources":["../src/require-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,MAAM,EAAE,MAAM,MAAM,CAAC;AA4F7C,MAAM,CAAC,OAAO,UAAU,aAAa,IAAI,MAAM,CAiH9C"}