@format.dev/compile 0.0.0 → 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 (466) hide show
  1. package/README.md +30 -20
  2. package/bin/format-compile +3 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/defineProperty.mjs +14 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPrimitive.mjs +16 -0
  5. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPropertyKey.mjs +11 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/typeof.mjs +12 -0
  7. package/dist/_virtual/rolldown_runtime.mjs +46 -0
  8. package/dist/node_modules/.pnpm/@babel_parser@7.29.8/node_modules/@babel/parser/lib/index.mjs +12606 -0
  9. package/dist/node_modules/.pnpm/@babel_parser@7.29.8/node_modules/@babel/parser/lib/index.mjs.map +1 -0
  10. package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs +4866 -0
  11. package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs.map +1 -0
  12. package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/index.mjs +13 -0
  13. package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/index.mjs.map +1 -0
  14. package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs +663 -0
  15. package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs.map +1 -0
  16. package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/index.mjs +13 -0
  17. package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/index.mjs.map +1 -0
  18. package/dist/node_modules/.pnpm/@vue_compiler-ssr@3.5.41/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.mjs +846 -0
  19. package/dist/node_modules/.pnpm/@vue_compiler-ssr@3.5.41/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.mjs.map +1 -0
  20. package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs +1600 -0
  21. package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs.map +1 -0
  22. package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/index.mjs +13 -0
  23. package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/index.mjs.map +1 -0
  24. package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs +5619 -0
  25. package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs.map +1 -0
  26. package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/index.mjs +13 -0
  27. package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/index.mjs.map +1 -0
  28. package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs +1479 -0
  29. package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs.map +1 -0
  30. package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/index.mjs +13 -0
  31. package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/index.mjs.map +1 -0
  32. package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/dist/server-renderer.cjs.mjs +510 -0
  33. package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/dist/server-renderer.cjs.mjs.map +1 -0
  34. package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/index.mjs +13 -0
  35. package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/index.mjs.map +1 -0
  36. package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/dist/shared.cjs.mjs +499 -0
  37. package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/dist/shared.cjs.mjs.map +1 -0
  38. package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/index.mjs +13 -0
  39. package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/index.mjs.map +1 -0
  40. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.mjs +79 -0
  41. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.mjs.map +1 -0
  42. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode.mjs +471 -0
  43. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode.mjs.map +1 -0
  44. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.mjs +16 -0
  45. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.mjs.map +1 -0
  46. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.mjs +16 -0
  47. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.mjs.map +1 -0
  48. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.mjs +30 -0
  49. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.mjs.map +1 -0
  50. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.mjs +24 -0
  51. package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.mjs.map +1 -0
  52. package/dist/node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs +253 -0
  53. package/dist/node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs.map +1 -0
  54. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.mjs +5246 -0
  55. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.mjs.map +1 -0
  56. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server.node.development.mjs +5616 -0
  57. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server.node.development.mjs.map +1 -0
  58. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.development.mjs +183 -0
  59. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.development.mjs.map +1 -0
  60. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/index.mjs +13 -0
  61. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/index.mjs.map +1 -0
  62. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/server.node.mjs +21 -0
  63. package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/server.node.mjs.map +1 -0
  64. package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.mjs +766 -0
  65. package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.mjs.map +1 -0
  66. package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/index.mjs +13 -0
  67. package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/index.mjs.map +1 -0
  68. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs +100 -0
  69. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs.map +1 -0
  70. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs +73 -0
  71. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs.map +1 -0
  72. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs +41 -0
  73. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs.map +1 -0
  74. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs +68 -0
  75. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs.map +1 -0
  76. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs +77 -0
  77. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs.map +1 -0
  78. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs +89 -0
  79. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs.map +1 -0
  80. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs +788 -0
  81. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs.map +1 -0
  82. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs +295 -0
  83. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs.map +1 -0
  84. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs +293 -0
  85. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs.map +1 -0
  86. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs +352 -0
  87. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs.map +1 -0
  88. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs +17 -0
  89. package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs.map +1 -0
  90. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/dist/vue.cjs.mjs +67 -0
  91. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/dist/vue.cjs.mjs.map +1 -0
  92. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index.mjs +13 -0
  93. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index.mjs.map +1 -0
  94. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index2.mjs +10 -0
  95. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index2.mjs.map +1 -0
  96. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/server-renderer/index.mjs +10 -0
  97. package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/server-renderer/index.mjs.map +1 -0
  98. package/dist/server/cli/bin.d.mts +1 -0
  99. package/dist/server/cli/bin.mjs +8 -0
  100. package/dist/server/cli/bin.mjs.map +1 -0
  101. package/dist/server/cli/cli-spec.mjs +150 -0
  102. package/dist/server/cli/cli-spec.mjs.map +1 -0
  103. package/dist/server/cli/index.d.mts +16 -0
  104. package/dist/server/cli/index.d.mts.map +1 -0
  105. package/dist/server/cli/index.mjs +64 -0
  106. package/dist/server/cli/index.mjs.map +1 -0
  107. package/dist/server/compile/adaptors/html-partials.d.mts +24 -0
  108. package/dist/server/compile/adaptors/html-partials.d.mts.map +1 -0
  109. package/dist/server/compile/adaptors/html-partials.mjs +50 -0
  110. package/dist/server/compile/adaptors/html-partials.mjs.map +1 -0
  111. package/dist/server/compile/adaptors/html.d.mts +15 -0
  112. package/dist/server/compile/adaptors/html.d.mts.map +1 -0
  113. package/dist/server/compile/adaptors/html.mjs +39 -0
  114. package/dist/server/compile/adaptors/html.mjs.map +1 -0
  115. package/dist/server/compile/adaptors/node-require.d.mts +6 -0
  116. package/dist/server/compile/adaptors/node-require.d.mts.map +1 -0
  117. package/dist/server/compile/adaptors/node-require.mjs +35 -0
  118. package/dist/server/compile/adaptors/node-require.mjs.map +1 -0
  119. package/dist/server/compile/adaptors/react-browser.d.mts +20 -0
  120. package/dist/server/compile/adaptors/react-browser.d.mts.map +1 -0
  121. package/dist/server/compile/adaptors/react-browser.mjs +19 -0
  122. package/dist/server/compile/adaptors/react-browser.mjs.map +1 -0
  123. package/dist/server/compile/adaptors/react-node.d.mts +17 -0
  124. package/dist/server/compile/adaptors/react-node.d.mts.map +1 -0
  125. package/dist/server/compile/adaptors/react-node.mjs +50 -0
  126. package/dist/server/compile/adaptors/react-node.mjs.map +1 -0
  127. package/dist/server/compile/adaptors/types.d.mts +14 -0
  128. package/dist/server/compile/adaptors/types.d.mts.map +1 -0
  129. package/dist/server/compile/adaptors/types.mjs +1 -0
  130. package/dist/server/compile/adaptors/vue-browser.d.mts +16 -0
  131. package/dist/server/compile/adaptors/vue-browser.d.mts.map +1 -0
  132. package/dist/server/compile/adaptors/vue-browser.mjs +16 -0
  133. package/dist/server/compile/adaptors/vue-browser.mjs.map +1 -0
  134. package/dist/server/compile/adaptors/vue-node.d.mts +17 -0
  135. package/dist/server/compile/adaptors/vue-node.d.mts.map +1 -0
  136. package/dist/server/compile/adaptors/vue-node.mjs +50 -0
  137. package/dist/server/compile/adaptors/vue-node.mjs.map +1 -0
  138. package/dist/server/compile/build-entry-module.d.mts +20 -0
  139. package/dist/server/compile/build-entry-module.d.mts.map +1 -0
  140. package/dist/server/compile/build-entry-module.mjs +56 -0
  141. package/dist/server/compile/build-entry-module.mjs.map +1 -0
  142. package/dist/server/compile/bundle-name.d.mts +5 -0
  143. package/dist/server/compile/bundle-name.d.mts.map +1 -0
  144. package/dist/server/compile/bundle-name.mjs +13 -0
  145. package/dist/server/compile/bundle-name.mjs.map +1 -0
  146. package/dist/server/compile/compile-cache.d.mts +23 -0
  147. package/dist/server/compile/compile-cache.d.mts.map +1 -0
  148. package/dist/server/compile/compile-cache.mjs +102 -0
  149. package/dist/server/compile/compile-cache.mjs.map +1 -0
  150. package/dist/server/compile/compile.d.mts +100 -0
  151. package/dist/server/compile/compile.d.mts.map +1 -0
  152. package/dist/server/compile/compile.mjs +735 -0
  153. package/dist/server/compile/compile.mjs.map +1 -0
  154. package/dist/server/compile/constants.d.mts +11 -0
  155. package/dist/server/compile/constants.d.mts.map +1 -0
  156. package/dist/server/compile/constants.mjs +12 -0
  157. package/dist/server/compile/constants.mjs.map +1 -0
  158. package/dist/server/compile/create-renderer.d.mts +16 -0
  159. package/dist/server/compile/create-renderer.d.mts.map +1 -0
  160. package/dist/server/compile/create-renderer.mjs +59 -0
  161. package/dist/server/compile/create-renderer.mjs.map +1 -0
  162. package/dist/server/compile/decode-style-entities.d.mts +12 -0
  163. package/dist/server/compile/decode-style-entities.d.mts.map +1 -0
  164. package/dist/server/compile/decode-style-entities.mjs +32 -0
  165. package/dist/server/compile/decode-style-entities.mjs.map +1 -0
  166. package/dist/server/compile/defaults.d.mts +18 -0
  167. package/dist/server/compile/defaults.d.mts.map +1 -0
  168. package/dist/server/compile/defaults.mjs +128 -0
  169. package/dist/server/compile/defaults.mjs.map +1 -0
  170. package/dist/server/compile/dependency-closure.d.mts +10 -0
  171. package/dist/server/compile/dependency-closure.d.mts.map +1 -0
  172. package/dist/server/compile/dependency-closure.mjs +79 -0
  173. package/dist/server/compile/dependency-closure.mjs.map +1 -0
  174. package/dist/server/compile/document-assets.d.mts +103 -0
  175. package/dist/server/compile/document-assets.d.mts.map +1 -0
  176. package/dist/server/compile/document-assets.mjs +184 -0
  177. package/dist/server/compile/document-assets.mjs.map +1 -0
  178. package/dist/server/compile/finalize-document-html.d.mts +53 -0
  179. package/dist/server/compile/finalize-document-html.d.mts.map +1 -0
  180. package/dist/server/compile/finalize-document-html.mjs +132 -0
  181. package/dist/server/compile/finalize-document-html.mjs.map +1 -0
  182. package/dist/server/compile/generated/adaptorHtml.mjs +6 -0
  183. package/dist/server/compile/generated/adaptorHtml.mjs.map +1 -0
  184. package/dist/server/compile/generated/adaptorReactBrowser.mjs +6 -0
  185. package/dist/server/compile/generated/adaptorReactBrowser.mjs.map +1 -0
  186. package/dist/server/compile/generated/adaptorReactNode.mjs +6 -0
  187. package/dist/server/compile/generated/adaptorReactNode.mjs.map +1 -0
  188. package/dist/server/compile/generated/adaptorVueBrowser.mjs +6 -0
  189. package/dist/server/compile/generated/adaptorVueBrowser.mjs.map +1 -0
  190. package/dist/server/compile/generated/adaptorVueNode.mjs +6 -0
  191. package/dist/server/compile/generated/adaptorVueNode.mjs.map +1 -0
  192. package/dist/server/compile/generated/createRenderer.mjs +6 -0
  193. package/dist/server/compile/generated/createRenderer.mjs.map +1 -0
  194. package/dist/server/compile/generated/decodeStyleEntities.mjs +6 -0
  195. package/dist/server/compile/generated/decodeStyleEntities.mjs.map +1 -0
  196. package/dist/server/compile/generated/sanitizeHtml.mjs +6 -0
  197. package/dist/server/compile/generated/sanitizeHtml.mjs.map +1 -0
  198. package/dist/server/compile/generated/validate.mjs +6 -0
  199. package/dist/server/compile/generated/validate.mjs.map +1 -0
  200. package/dist/server/compile/generated/virtualStyles.mjs +6 -0
  201. package/dist/server/compile/generated/virtualStyles.mjs.map +1 -0
  202. package/dist/server/compile/get-renderer.d.mts +18 -0
  203. package/dist/server/compile/get-renderer.d.mts.map +1 -0
  204. package/dist/server/compile/get-renderer.mjs +31 -0
  205. package/dist/server/compile/get-renderer.mjs.map +1 -0
  206. package/dist/server/compile/index.d.mts +2 -0
  207. package/dist/server/compile/index.mjs +3 -0
  208. package/dist/server/compile/make-config.d.mts +39 -0
  209. package/dist/server/compile/make-config.d.mts.map +1 -0
  210. package/dist/server/compile/make-config.mjs +272 -0
  211. package/dist/server/compile/make-config.mjs.map +1 -0
  212. package/dist/server/compile/package-json.d.mts +5 -0
  213. package/dist/server/compile/package-json.d.mts.map +1 -0
  214. package/dist/server/compile/package-json.mjs +33 -0
  215. package/dist/server/compile/package-json.mjs.map +1 -0
  216. package/dist/server/compile/producer-agreement.d.mts +82 -0
  217. package/dist/server/compile/producer-agreement.d.mts.map +1 -0
  218. package/dist/server/compile/producer-agreement.mjs +143 -0
  219. package/dist/server/compile/producer-agreement.mjs.map +1 -0
  220. package/dist/server/compile/producer-release.d.mts +19 -0
  221. package/dist/server/compile/producer-release.d.mts.map +1 -0
  222. package/dist/server/compile/producer-release.mjs +27 -0
  223. package/dist/server/compile/producer-release.mjs.map +1 -0
  224. package/dist/server/compile/render-error.d.mts +37 -0
  225. package/dist/server/compile/render-error.d.mts.map +1 -0
  226. package/dist/server/compile/render-error.mjs +55 -0
  227. package/dist/server/compile/render-error.mjs.map +1 -0
  228. package/dist/server/compile/sanitize/shared.d.mts +19 -0
  229. package/dist/server/compile/sanitize/shared.d.mts.map +1 -0
  230. package/dist/server/compile/sanitize/shared.mjs +131 -0
  231. package/dist/server/compile/sanitize/shared.mjs.map +1 -0
  232. package/dist/server/compile/sanitize-html.d.mts +5 -0
  233. package/dist/server/compile/sanitize-html.d.mts.map +1 -0
  234. package/dist/server/compile/sanitize-html.mjs +65 -0
  235. package/dist/server/compile/sanitize-html.mjs.map +1 -0
  236. package/dist/server/compile/structured-log.d.mts +22 -0
  237. package/dist/server/compile/structured-log.d.mts.map +1 -0
  238. package/dist/server/compile/structured-log.mjs +31 -0
  239. package/dist/server/compile/structured-log.mjs.map +1 -0
  240. package/dist/server/compile/virtual-styles.d.mts +5 -0
  241. package/dist/server/compile/virtual-styles.d.mts.map +1 -0
  242. package/dist/server/compile/virtual-styles.mjs +19 -0
  243. package/dist/server/compile/virtual-styles.mjs.map +1 -0
  244. package/dist/server/compile/wrapper-source.d.mts +55 -0
  245. package/dist/server/compile/wrapper-source.d.mts.map +1 -0
  246. package/dist/server/compile/wrapper-source.mjs +187 -0
  247. package/dist/server/compile/wrapper-source.mjs.map +1 -0
  248. package/dist/server/constants.d.mts +17 -0
  249. package/dist/server/constants.d.mts.map +1 -0
  250. package/dist/server/constants.mjs +41 -0
  251. package/dist/server/constants.mjs.map +1 -0
  252. package/dist/server/errors.d.mts +21 -0
  253. package/dist/server/errors.d.mts.map +1 -0
  254. package/dist/server/errors.mjs +24 -0
  255. package/dist/server/errors.mjs.map +1 -0
  256. package/dist/server/index.d.mts +4 -0
  257. package/dist/server/index.mjs +4 -0
  258. package/dist/server/integrations/nextjs/generate-entry.d.mts +19 -0
  259. package/dist/server/integrations/nextjs/generate-entry.d.mts.map +1 -0
  260. package/dist/server/integrations/nextjs/generate-entry.mjs +246 -0
  261. package/dist/server/integrations/nextjs/generate-entry.mjs.map +1 -0
  262. package/dist/server/integrations/nextjs/index.d.mts +8 -0
  263. package/dist/server/integrations/nextjs/index.d.mts.map +1 -0
  264. package/dist/server/integrations/nextjs/index.mjs +90 -0
  265. package/dist/server/integrations/nextjs/index.mjs.map +1 -0
  266. package/dist/server/integrations/nextjs/watcher.d.mts +9 -0
  267. package/dist/server/integrations/nextjs/watcher.d.mts.map +1 -0
  268. package/dist/server/integrations/nextjs/watcher.mjs +45 -0
  269. package/dist/server/integrations/nextjs/watcher.mjs.map +1 -0
  270. package/dist/server/integrations/unplugin/esbuild.d.mts +2 -0
  271. package/dist/server/integrations/unplugin/esbuild.mjs +3 -0
  272. package/dist/server/integrations/unplugin/index.d.mts +69 -0
  273. package/dist/server/integrations/unplugin/index.d.mts.map +1 -0
  274. package/dist/server/integrations/unplugin/index.mjs +539 -0
  275. package/dist/server/integrations/unplugin/index.mjs.map +1 -0
  276. package/dist/server/integrations/unplugin/rollup.d.mts +2 -0
  277. package/dist/server/integrations/unplugin/rollup.mjs +3 -0
  278. package/dist/server/integrations/unplugin/utils.d.mts +12 -0
  279. package/dist/server/integrations/unplugin/utils.d.mts.map +1 -0
  280. package/dist/server/integrations/unplugin/utils.mjs +46 -0
  281. package/dist/server/integrations/unplugin/utils.mjs.map +1 -0
  282. package/dist/server/integrations/unplugin/vite.d.mts +2 -0
  283. package/dist/server/integrations/unplugin/vite.mjs +3 -0
  284. package/dist/server/integrations/unplugin/webpack.d.mts +2 -0
  285. package/dist/server/integrations/unplugin/webpack.mjs +3 -0
  286. package/dist/server/project/documents.d.mts +21 -0
  287. package/dist/server/project/documents.d.mts.map +1 -0
  288. package/dist/server/project/documents.mjs +114 -0
  289. package/dist/server/project/documents.mjs.map +1 -0
  290. package/dist/server/project/format-env-types.d.mts +19 -0
  291. package/dist/server/project/format-env-types.d.mts.map +1 -0
  292. package/dist/server/project/format-env-types.mjs +64 -0
  293. package/dist/server/project/format-env-types.mjs.map +1 -0
  294. package/dist/server/project/paths.d.mts +21 -0
  295. package/dist/server/project/paths.d.mts.map +1 -0
  296. package/dist/server/project/paths.mjs +31 -0
  297. package/dist/server/project/paths.mjs.map +1 -0
  298. package/dist/server/project/user-project-dir.d.mts +7 -0
  299. package/dist/server/project/user-project-dir.d.mts.map +1 -0
  300. package/dist/server/project/user-project-dir.mjs +16 -0
  301. package/dist/server/project/user-project-dir.mjs.map +1 -0
  302. package/dist/server/render-worker/client.d.mts +83 -0
  303. package/dist/server/render-worker/client.d.mts.map +1 -0
  304. package/dist/server/render-worker/client.mjs +359 -0
  305. package/dist/server/render-worker/client.mjs.map +1 -0
  306. package/dist/server/render-worker/document-css.d.mts +27 -0
  307. package/dist/server/render-worker/document-css.d.mts.map +1 -0
  308. package/dist/server/render-worker/document-css.mjs +37 -0
  309. package/dist/server/render-worker/document-css.mjs.map +1 -0
  310. package/dist/server/render-worker/env.d.mts +11 -0
  311. package/dist/server/render-worker/env.d.mts.map +1 -0
  312. package/dist/server/render-worker/env.mjs +26 -0
  313. package/dist/server/render-worker/env.mjs.map +1 -0
  314. package/dist/server/render-worker/error.d.mts +17 -0
  315. package/dist/server/render-worker/error.d.mts.map +1 -0
  316. package/dist/server/render-worker/error.mjs +40 -0
  317. package/dist/server/render-worker/error.mjs.map +1 -0
  318. package/dist/server/render-worker/host.d.mts +1 -0
  319. package/dist/server/render-worker/host.mjs +181 -0
  320. package/dist/server/render-worker/host.mjs.map +1 -0
  321. package/dist/server/render-worker/index.d.mts +4 -0
  322. package/dist/server/render-worker/index.mjs +4 -0
  323. package/dist/server/render-worker/sandbox.d.mts +25 -0
  324. package/dist/server/render-worker/sandbox.d.mts.map +1 -0
  325. package/dist/server/render-worker/sandbox.mjs +60 -0
  326. package/dist/server/render-worker/sandbox.mjs.map +1 -0
  327. package/dist/server/render-worker/types.d.mts +59 -0
  328. package/dist/server/render-worker/types.d.mts.map +1 -0
  329. package/dist/server/render-worker/types.mjs +1 -0
  330. package/dist/server/runtime-state.d.mts +12 -0
  331. package/dist/server/runtime-state.d.mts.map +1 -0
  332. package/dist/server/runtime-state.mjs +24 -0
  333. package/dist/server/runtime-state.mjs.map +1 -0
  334. package/dist/server/utils/check-dir.d.mts +12 -0
  335. package/dist/server/utils/check-dir.d.mts.map +1 -0
  336. package/dist/server/utils/check-dir.mjs +30 -0
  337. package/dist/server/utils/check-dir.mjs.map +1 -0
  338. package/dist/server/utils/dependencies.d.mts +11 -0
  339. package/dist/server/utils/dependencies.d.mts.map +1 -0
  340. package/dist/server/utils/dependencies.mjs +34 -0
  341. package/dist/server/utils/dependencies.mjs.map +1 -0
  342. package/dist/server/utils/env-var.d.mts +6 -0
  343. package/dist/server/utils/env-var.d.mts.map +1 -0
  344. package/dist/server/utils/env-var.mjs +28 -0
  345. package/dist/server/utils/env-var.mjs.map +1 -0
  346. package/dist/server/utils/format-for-log.d.mts +5 -0
  347. package/dist/server/utils/format-for-log.d.mts.map +1 -0
  348. package/dist/server/utils/format-for-log.mjs +17 -0
  349. package/dist/server/utils/format-for-log.mjs.map +1 -0
  350. package/dist/server/utils/index.d.mts +8 -0
  351. package/dist/server/utils/index.mjs +9 -0
  352. package/dist/server/utils/load-config.d.mts +13 -0
  353. package/dist/server/utils/load-config.d.mts.map +1 -0
  354. package/dist/server/utils/load-config.mjs +65 -0
  355. package/dist/server/utils/load-config.mjs.map +1 -0
  356. package/dist/server/utils/log.d.mts +36 -0
  357. package/dist/server/utils/log.d.mts.map +1 -0
  358. package/dist/server/utils/log.mjs +125 -0
  359. package/dist/server/utils/log.mjs.map +1 -0
  360. package/dist/server/utils/read-file.d.mts +5 -0
  361. package/dist/server/utils/read-file.d.mts.map +1 -0
  362. package/dist/server/utils/read-file.mjs +14 -0
  363. package/dist/server/utils/read-file.mjs.map +1 -0
  364. package/dist/server/utils/resolve-path-with-extensions.d.mts +21 -0
  365. package/dist/server/utils/resolve-path-with-extensions.d.mts.map +1 -0
  366. package/dist/server/utils/resolve-path-with-extensions.mjs +39 -0
  367. package/dist/server/utils/resolve-path-with-extensions.mjs.map +1 -0
  368. package/dist/server/utils/schema.d.mts +7 -0
  369. package/dist/server/utils/schema.d.mts.map +1 -0
  370. package/dist/server/utils/schema.mjs +21 -0
  371. package/dist/server/utils/schema.mjs.map +1 -0
  372. package/dist/server/utils/standard-schema-validate.d.mts +13 -0
  373. package/dist/server/utils/standard-schema-validate.d.mts.map +1 -0
  374. package/dist/server/utils/standard-schema-validate.mjs +21 -0
  375. package/dist/server/utils/standard-schema-validate.mjs.map +1 -0
  376. package/dist/server/utils/suggest-similar.d.mts +9 -0
  377. package/dist/server/utils/suggest-similar.d.mts.map +1 -0
  378. package/dist/server/utils/suggest-similar.mjs +39 -0
  379. package/dist/server/utils/suggest-similar.mjs.map +1 -0
  380. package/dist/server/utils/warn-lockstep.d.mts +13 -0
  381. package/dist/server/utils/warn-lockstep.d.mts.map +1 -0
  382. package/dist/server/utils/warn-lockstep.mjs +23 -0
  383. package/dist/server/utils/warn-lockstep.mjs.map +1 -0
  384. package/dist/server/vite/create-config.d.mts +35 -0
  385. package/dist/server/vite/create-config.d.mts.map +1 -0
  386. package/dist/server/vite/create-config.mjs +64 -0
  387. package/dist/server/vite/create-config.mjs.map +1 -0
  388. package/dist/server/vite/plugins/collect-css.d.mts +8 -0
  389. package/dist/server/vite/plugins/collect-css.d.mts.map +1 -0
  390. package/dist/server/vite/plugins/collect-css.mjs +21 -0
  391. package/dist/server/vite/plugins/collect-css.mjs.map +1 -0
  392. package/dist/server/vite/plugins/get-styles.d.mts +14 -0
  393. package/dist/server/vite/plugins/get-styles.d.mts.map +1 -0
  394. package/dist/server/vite/plugins/get-styles.mjs +88 -0
  395. package/dist/server/vite/plugins/get-styles.mjs.map +1 -0
  396. package/dist/server/vite/plugins/html-loader.d.mts +18 -0
  397. package/dist/server/vite/plugins/html-loader.d.mts.map +1 -0
  398. package/dist/server/vite/plugins/html-loader.mjs +88 -0
  399. package/dist/server/vite/plugins/html-loader.mjs.map +1 -0
  400. package/dist/server/vite/plugins/postcss/import-url.d.mts +14 -0
  401. package/dist/server/vite/plugins/postcss/import-url.d.mts.map +1 -0
  402. package/dist/server/vite/plugins/postcss/import-url.mjs +163 -0
  403. package/dist/server/vite/plugins/postcss/import-url.mjs.map +1 -0
  404. package/dist/server/vite/plugins/styles-pre-processor.d.mts +7 -0
  405. package/dist/server/vite/plugins/styles-pre-processor.d.mts.map +1 -0
  406. package/dist/server/vite/plugins/styles-pre-processor.mjs +64 -0
  407. package/dist/server/vite/plugins/styles-pre-processor.mjs.map +1 -0
  408. package/dist/server/vite/plugins/utils.d.mts +9 -0
  409. package/dist/server/vite/plugins/utils.d.mts.map +1 -0
  410. package/dist/server/vite/plugins/utils.mjs +14 -0
  411. package/dist/server/vite/plugins/utils.mjs.map +1 -0
  412. package/dist/shared/constants.d.mts +11 -0
  413. package/dist/shared/constants.d.mts.map +1 -0
  414. package/dist/shared/constants.mjs +12 -0
  415. package/dist/shared/constants.mjs.map +1 -0
  416. package/dist/shared/env.d.mts +6 -0
  417. package/dist/shared/env.d.mts.map +1 -0
  418. package/dist/shared/env.mjs +11 -0
  419. package/dist/shared/env.mjs.map +1 -0
  420. package/dist/shared/http.d.mts +15 -0
  421. package/dist/shared/http.d.mts.map +1 -0
  422. package/dist/shared/http.mjs +54 -0
  423. package/dist/shared/http.mjs.map +1 -0
  424. package/dist/shared/types/document.d.mts +17 -0
  425. package/dist/shared/types/document.d.mts.map +1 -0
  426. package/dist/shared/types/document.mjs +1 -0
  427. package/dist/shared/types/index.d.mts +7 -0
  428. package/dist/shared/types/index.mjs +4 -0
  429. package/dist/shared/types/log.d.mts +10 -0
  430. package/dist/shared/types/log.d.mts.map +1 -0
  431. package/dist/shared/types/log.mjs +12 -0
  432. package/dist/shared/types/log.mjs.map +1 -0
  433. package/dist/shared/types/public/cli.d.mts +33 -0
  434. package/dist/shared/types/public/cli.d.mts.map +1 -0
  435. package/dist/shared/types/public/cli.mjs +1 -0
  436. package/dist/shared/types/public/compile.d.mts +45 -0
  437. package/dist/shared/types/public/compile.d.mts.map +1 -0
  438. package/dist/shared/types/public/compile.mjs +29 -0
  439. package/dist/shared/types/public/compile.mjs.map +1 -0
  440. package/dist/shared/types/public/config.d.mts +94 -0
  441. package/dist/shared/types/public/config.d.mts.map +1 -0
  442. package/dist/shared/types/public/config.mjs +20 -0
  443. package/dist/shared/types/public/config.mjs.map +1 -0
  444. package/dist/shared/types/public/index.d.mts +6 -0
  445. package/dist/shared/types/public/index.mjs +4 -0
  446. package/dist/shared/types/public/nextjs.d.mts +111 -0
  447. package/dist/shared/types/public/nextjs.d.mts.map +1 -0
  448. package/dist/shared/types/public/nextjs.mjs +1 -0
  449. package/dist/shared/types/public/renderer.d.mts +2 -0
  450. package/dist/shared/types/public/renderer.mjs +1 -0
  451. package/dist/shared/types/public/unplugin.d.mts +65 -0
  452. package/dist/shared/types/public/unplugin.d.mts.map +1 -0
  453. package/dist/shared/types/public/unplugin.mjs +1 -0
  454. package/dist/shared/types/server.d.mts +5 -0
  455. package/dist/shared/types/server.d.mts.map +1 -0
  456. package/dist/shared/types/server.mjs +1 -0
  457. package/dist/shared/types/state.d.mts +15 -0
  458. package/dist/shared/types/state.d.mts.map +1 -0
  459. package/dist/shared/types/state.mjs +1 -0
  460. package/dist/shared/types/system.d.mts +18 -0
  461. package/dist/shared/types/system.d.mts.map +1 -0
  462. package/dist/shared/types/system.mjs +1 -0
  463. package/package.json +146 -34
  464. package/types/next.d.ts +6 -0
  465. package/index.d.ts +0 -2
  466. package/index.js +0 -3
@@ -0,0 +1,64 @@
1
+ import { getUserProjectDir } from "../../project/user-project-dir.mjs";
2
+ import { CompileError } from "../../errors.mjs";
3
+ import { logger } from "../../utils/log.mjs";
4
+ import "../../utils/index.mjs";
5
+ import { compileState } from "../../runtime-state.mjs";
6
+ import { getStyleIdInfo } from "./utils.mjs";
7
+ import { postcssImportUrl } from "./postcss/import-url.mjs";
8
+ import { createRequire } from "node:module";
9
+ import { join, resolve } from "node:path";
10
+ import postcss from "postcss";
11
+ import postcssImport from "postcss-import";
12
+
13
+ //#region src/server/vite/plugins/styles-pre-processor.ts
14
+ function loadUserPandaPostcssPlugin() {
15
+ const projectDir = getUserProjectDir();
16
+ try {
17
+ const plugin = createRequire(join(projectDir, "package.json"))("@pandacss/dev/postcss");
18
+ return plugin.default ?? plugin;
19
+ } catch {
20
+ throw new CompileError("Your Format config enables Panda CSS, but @pandacss/dev is not installed in your project. Install it with `npm install -D @pandacss/dev` and try again.");
21
+ }
22
+ }
23
+ async function stylesPreProcessor(inlineRemoteCss = false) {
24
+ const config = compileState.getConfig();
25
+ const processor = postcss();
26
+ if (config.pandaCss?.enabled) {
27
+ const pandacssPlugin = loadUserPandaPostcssPlugin();
28
+ const defaultPandaCssConfigPath = resolve(getUserProjectDir(), "panda.config.ts");
29
+ const { postCssConfig = {} } = config.pandaCss;
30
+ processor.use(pandacssPlugin({
31
+ cwd: getUserProjectDir(),
32
+ configPath: defaultPandaCssConfigPath,
33
+ ...postCssConfig
34
+ }));
35
+ }
36
+ if (inlineRemoteCss) {
37
+ processor.use(postcssImportUrl());
38
+ processor.use(postcssImport());
39
+ }
40
+ return {
41
+ name: "styles-pre-processor",
42
+ enforce: "pre",
43
+ async transform(code, id) {
44
+ const { cleanId, isCssFile, isVueStyleRequest } = getStyleIdInfo(id);
45
+ if (!isCssFile && !isVueStyleRequest) return null;
46
+ const result = await processor.process(code, {
47
+ from: cleanId,
48
+ map: false
49
+ });
50
+ if (result.css === code) return null;
51
+ result.messages.forEach((message) => {
52
+ if (message.type === "warning") logger.warn(message.text);
53
+ });
54
+ return {
55
+ code: result.css,
56
+ map: null
57
+ };
58
+ }
59
+ };
60
+ }
61
+
62
+ //#endregion
63
+ export { stylesPreProcessor };
64
+ //# sourceMappingURL=styles-pre-processor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-pre-processor.mjs","names":[],"sources":["../../../../src/server/vite/plugins/styles-pre-processor.ts"],"sourcesContent":["import type { Plugin } from 'vite'\nimport { createRequire } from 'node:module'\nimport { join, resolve } from 'node:path'\nimport postcss from 'postcss'\nimport postcssImport from 'postcss-import'\nimport { logger } from '../../utils'\nimport { compileState } from '../../runtime-state'\nimport { CompileError } from '../../errors'\nimport { getUserProjectDir } from '../../project/user-project-dir'\nimport { getStyleIdInfo } from './utils'\nimport { postcssImportUrl } from './postcss/import-url'\n\n// The user's own Panda installation processes their panda.config — Studio\n// deliberately doesn't bundle a copy, so there is never a version mismatch\n// between the config they wrote and the Panda that reads it. Panda projects\n// should always have @pandacss/dev installed: either `format new project` adds\n// it, or the user should have installed from following docs.\nfunction loadUserPandaPostcssPlugin(): (options: Record<string, unknown>) => never {\n\tconst projectDir = getUserProjectDir()\n\n\ttry {\n\t\tconst userRequire = createRequire(join(projectDir, 'package.json'))\n\t\tconst plugin = userRequire('@pandacss/dev/postcss')\n\n\t\treturn plugin.default ?? plugin\n\t} catch {\n\t\tthrow new CompileError(\n\t\t\t'Your Format config enables Panda CSS, but @pandacss/dev is not installed in your project. Install it with `npm install -D @pandacss/dev` and try again.'\n\t\t)\n\t}\n}\n\nexport async function stylesPreProcessor(inlineRemoteCss = false): Promise<Plugin> {\n\tconst config = compileState.getConfig()\n\tconst processor = postcss()\n\n\tif (config.pandaCss?.enabled) {\n\t\tconst pandacssPlugin = loadUserPandaPostcssPlugin()\n\t\tconst defaultPandaCssConfigPath = resolve(getUserProjectDir(), 'panda.config.ts')\n\t\tconst { postCssConfig = {} } = config.pandaCss\n\n\t\tprocessor.use(\n\t\t\tpandacssPlugin({\n\t\t\t\tcwd: getUserProjectDir(),\n\t\t\t\tconfigPath: defaultPandaCssConfigPath,\n\t\t\t\t...postCssConfig\n\t\t\t})\n\t\t)\n\t}\n\n\tif (inlineRemoteCss) {\n\t\tprocessor.use(postcssImportUrl())\n\t\tprocessor.use(postcssImport())\n\t}\n\n\treturn {\n\t\tname: 'styles-pre-processor',\n\t\tenforce: 'pre',\n\t\tasync transform(code, id) {\n\t\t\tconst { cleanId, isCssFile, isVueStyleRequest } = getStyleIdInfo(id)\n\n\t\t\tif (!isCssFile && !isVueStyleRequest) {\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\tconst result = await processor.process(code, { from: cleanId, map: false })\n\n\t\t\tif (result.css === code) {\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\tresult.messages.forEach(message => {\n\t\t\t\tif (message.type === 'warning') {\n\t\t\t\t\tlogger.warn(message.text)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn { code: result.css, map: null }\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;AAiBA,SAAS,6BAA0E;CAClF,MAAM,aAAa,mBAAmB;AAEtC,KAAI;EAEH,MAAM,SADc,cAAc,KAAK,YAAY,eAAe,CAAC,CACxC,wBAAwB;AAEnD,SAAO,OAAO,WAAW;SAClB;AACP,QAAM,IAAI,aACT,0JACA;;;AAIH,eAAsB,mBAAmB,kBAAkB,OAAwB;CAClF,MAAM,SAAS,aAAa,WAAW;CACvC,MAAM,YAAY,SAAS;AAE3B,KAAI,OAAO,UAAU,SAAS;EAC7B,MAAM,iBAAiB,4BAA4B;EACnD,MAAM,4BAA4B,QAAQ,mBAAmB,EAAE,kBAAkB;EACjF,MAAM,EAAE,gBAAgB,EAAE,KAAK,OAAO;AAEtC,YAAU,IACT,eAAe;GACd,KAAK,mBAAmB;GACxB,YAAY;GACZ,GAAG;GACH,CAAC,CACF;;AAGF,KAAI,iBAAiB;AACpB,YAAU,IAAI,kBAAkB,CAAC;AACjC,YAAU,IAAI,eAAe,CAAC;;AAG/B,QAAO;EACN,MAAM;EACN,SAAS;EACT,MAAM,UAAU,MAAM,IAAI;GACzB,MAAM,EAAE,SAAS,WAAW,sBAAsB,eAAe,GAAG;AAEpE,OAAI,CAAC,aAAa,CAAC,kBAClB,QAAO;GAGR,MAAM,SAAS,MAAM,UAAU,QAAQ,MAAM;IAAE,MAAM;IAAS,KAAK;IAAO,CAAC;AAE3E,OAAI,OAAO,QAAQ,KAClB,QAAO;AAGR,UAAO,SAAS,SAAQ,YAAW;AAClC,QAAI,QAAQ,SAAS,UACpB,QAAO,KAAK,QAAQ,KAAK;KAEzB;AAEF,UAAO;IAAE,MAAM,OAAO;IAAK,KAAK;IAAM;;EAEvC"}
@@ -0,0 +1,9 @@
1
+ //#region src/server/vite/plugins/utils.d.ts
2
+ declare function getStyleIdInfo(id: string, extensions?: string[]): {
3
+ cleanId: string;
4
+ isCssFile: boolean;
5
+ isVueStyleRequest: boolean;
6
+ };
7
+ //#endregion
8
+ export { getStyleIdInfo };
9
+ //# sourceMappingURL=utils.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.mts","names":[],"sources":["../../../../src/server/vite/plugins/utils.ts"],"sourcesContent":[],"mappings":";iBAEgB,cAAA;EAAA,OAAA,EAAA,MAAA"}
@@ -0,0 +1,14 @@
1
+ //#region src/server/vite/plugins/utils.ts
2
+ const DEFAULT_STYLE_EXTENSIONS = [".css"];
3
+ function getStyleIdInfo(id, extensions = DEFAULT_STYLE_EXTENSIONS) {
4
+ const cleanId = id.split("?")[0];
5
+ return {
6
+ cleanId,
7
+ isCssFile: extensions.some((ext) => cleanId.endsWith(ext)),
8
+ isVueStyleRequest: id.includes("type=style")
9
+ };
10
+ }
11
+
12
+ //#endregion
13
+ export { getStyleIdInfo };
14
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","names":[],"sources":["../../../../src/server/vite/plugins/utils.ts"],"sourcesContent":["const DEFAULT_STYLE_EXTENSIONS = ['.css']\n\nexport function getStyleIdInfo(id: string, extensions: string[] = DEFAULT_STYLE_EXTENSIONS) {\n\tconst cleanId = id.split('?')[0]\n\tconst isCssFile = extensions.some(ext => cleanId.endsWith(ext))\n\tconst isVueStyleRequest = id.includes('type=style')\n\n\treturn { cleanId, isCssFile, isVueStyleRequest }\n}\n"],"mappings":";AAAA,MAAM,2BAA2B,CAAC,OAAO;AAEzC,SAAgB,eAAe,IAAY,aAAuB,0BAA0B;CAC3F,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC;AAI9B,QAAO;EAAE;EAAS,WAHA,WAAW,MAAK,QAAO,QAAQ,SAAS,IAAI,CAAC;EAGlC,mBAFH,GAAG,SAAS,aAAa;EAEH"}
@@ -0,0 +1,11 @@
1
+ //#region src/shared/constants.d.ts
2
+ declare const DEFAULT_VARIANT = "default";
3
+ declare const VARIANT_PARAM = "variant";
4
+ declare const NO_DOCUMENTS_MESSAGE = "No documents found. Ensure you have a documents folder, followed by a folder per document and an entry point file, using the default export. Example: /documents/my-document/index.[tsx|jsx|vue|ts|js]. Refer to our documentation for more information.";
5
+ declare const DEV_DASHBOARD_API_PORT = 3211;
6
+ declare const DEV_DASHBOARD_PORT = 3000;
7
+ declare const DEV_API_PORT = 8080;
8
+ declare const DEV_WEB_PORT = 4317;
9
+ //#endregion
10
+ export { DEFAULT_VARIANT, DEV_API_PORT, DEV_DASHBOARD_API_PORT, DEV_DASHBOARD_PORT, DEV_WEB_PORT, NO_DOCUMENTS_MESSAGE, VARIANT_PARAM };
11
+ //# sourceMappingURL=constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.mts","names":[],"sources":["../../src/shared/constants.ts"],"sourcesContent":[],"mappings":";cAEa,eAAA;AAAA,cACA,aAAA,GADe,SAAA;AACf,cAEA,oBAAA,GAFa,0PAAA;AAEb,cAGA,sBAAA,GAHoB,IAAA;AAGpB,cACA,kBAAA,GADsB,IAAA;AACtB,cACA,YAAA,GADkB,IAAA;AAClB,cACA,YAAA,GADY,IAAA"}
@@ -0,0 +1,12 @@
1
+ //#region src/shared/constants.ts
2
+ const DEFAULT_VARIANT = "default";
3
+ const VARIANT_PARAM = "variant";
4
+ const NO_DOCUMENTS_MESSAGE = "No documents found. Ensure you have a documents folder, followed by a folder per document and an entry point file, using the default export. Example: /documents/my-document/index.[tsx|jsx|vue|ts|js]. Refer to our documentation for more information.";
5
+ const DEV_DASHBOARD_API_PORT = 3211;
6
+ const DEV_DASHBOARD_PORT = 3e3;
7
+ const DEV_API_PORT = 8080;
8
+ const DEV_WEB_PORT = 4317;
9
+
10
+ //#endregion
11
+ export { DEFAULT_VARIANT, DEV_API_PORT, DEV_DASHBOARD_API_PORT, DEV_DASHBOARD_PORT, DEV_WEB_PORT, NO_DOCUMENTS_MESSAGE, VARIANT_PARAM };
12
+ //# sourceMappingURL=constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.mjs","names":[],"sources":["../../src/shared/constants.ts"],"sourcesContent":["// This file MUST stay side-effect free. No imports allowed.\n\nexport const DEFAULT_VARIANT = 'default'\nexport const VARIANT_PARAM = 'variant'\n\nexport const NO_DOCUMENTS_MESSAGE =\n\t'No documents found. Ensure you have a documents folder, followed by a folder per document and an entry point file, using the default export. Example: /documents/my-document/index.[tsx|jsx|vue|ts|js]. Refer to our documentation for more information.'\n\nexport const DEV_DASHBOARD_API_PORT = 3211\nexport const DEV_DASHBOARD_PORT = 3000\nexport const DEV_API_PORT = 8080\nexport const DEV_WEB_PORT = 4317\n"],"mappings":";AAEA,MAAa,kBAAkB;AAC/B,MAAa,gBAAgB;AAE7B,MAAa,uBACZ;AAED,MAAa,yBAAyB;AACtC,MAAa,qBAAqB;AAClC,MAAa,eAAe;AAC5B,MAAa,eAAe"}
@@ -0,0 +1,6 @@
1
+ //#region src/shared/env.d.ts
2
+ declare function isDev(): boolean;
3
+ declare function isProd(): boolean;
4
+ //#endregion
5
+ export { isDev, isProd };
6
+ //# sourceMappingURL=env.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.mts","names":[],"sources":["../../src/shared/env.ts"],"sourcesContent":[],"mappings":";iBAgBgB,KAAA,CAAA;AAAA,iBAYA,MAAA,CAAA,CAZK,EAAA,OAAA"}
@@ -0,0 +1,11 @@
1
+ //#region src/shared/env.ts
2
+ function isDev() {
3
+ return true;
4
+ }
5
+ function isProd() {
6
+ return false;
7
+ }
8
+
9
+ //#endregion
10
+ export { isDev, isProd };
11
+ //# sourceMappingURL=env.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.mjs","names":[],"sources":["../../src/shared/env.ts"],"sourcesContent":["// `isDev`/`isProd` are imported by Studio, where\n// there is no `process` global. The browser build replaces the static\n// `process.env.NODE_ENV` reads with literals via `define`, so those stay safe —\n// but VITEST/VITEST_WORKER_ID are not in that define list, so reading them\n// evaluates a bare `process` and throws `ReferenceError: process is not defined`.\n// It only surfaced once a production browser build stopped short-circuiting on\n// the NODE_ENV checks. Guarding on `process` existing keeps Vitest detection\n// working in Node while staying inert in the browser.\nfunction isVitest(): boolean {\n\tif (typeof process === 'undefined') {\n\t\treturn false\n\t}\n\n\treturn Boolean(process.env.VITEST || process.env.VITEST_WORKER_ID)\n}\n\nexport function isDev(): boolean {\n\tif (process.env.NODE_ENV === 'development') {\n\t\treturn true\n\t}\n\n\tif (process.env.NODE_ENV === 'test') {\n\t\treturn true\n\t}\n\n\treturn isVitest()\n}\n\nexport function isProd(): boolean {\n\treturn process.env.NODE_ENV === 'production'\n}\n"],"mappings":";AAgBA,SAAgB,QAAiB;AAE/B,QAAO;;AAUT,SAAgB,SAAkB;AACjC,QAAO"}
@@ -0,0 +1,15 @@
1
+ //#region src/shared/http.d.ts
2
+ interface HttpOptions extends Omit<RequestInit, 'body' | 'headers'> {
3
+ body?: unknown;
4
+ headers?: Record<string, string>;
5
+ responseType?: 'json' | 'text' | 'blob' | 'arrayBuffer';
6
+ }
7
+ interface HttpResult<T = unknown> {
8
+ data: T | null;
9
+ error: string | null;
10
+ status: number | null;
11
+ }
12
+ declare function http<T = unknown>(url: string, options?: HttpOptions): Promise<HttpResult<T>>;
13
+ //#endregion
14
+ export { http };
15
+ //# sourceMappingURL=http.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.mts","names":[],"sources":["../../src/shared/http.ts"],"sourcesContent":[],"mappings":";UAAU,WAAA,SAAoB,KAAK;EAAzB,IAAA,CAAA,EAAA,OAAY;EAAa,OAAA,CAAA,EAExB,MAFwB,CAAA,MAAA,EAAA,MAAA,CAAA;EAExB,YAAA,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,aAAA;;UAID,UANwB,CAAA,IAAA,OAAA,CAAA,CAAA;EAMxB,IAAA,EACH,CADG,GAAA,IAAU;EA6DE,KAAA,EAAI,MAAA,GAAA,IAAA;EAAoC,MAAA,EAAA,MAAA,GAAA,IAAA;;AAA2B,iBAAnE,IAAmE,CAAA,IAAA,OAAA,CAAA,CAAA,GAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAA3B,WAA2B,CAAA,EAAR,OAAQ,CAAA,UAAA,CAAW,CAAX,CAAA,CAAA"}
@@ -0,0 +1,54 @@
1
+ //#region src/shared/http.ts
2
+ function toErrorMessage(payload) {
3
+ if (typeof payload === "string") return payload;
4
+ if (payload && typeof payload === "object") {
5
+ const record = payload;
6
+ if (typeof record.error === "string") return record.error;
7
+ if (typeof record.message === "string") return record.message;
8
+ }
9
+ return "Request failed";
10
+ }
11
+ async function handleResponse(response, responseType) {
12
+ if (responseType === "text") return await response.text();
13
+ if (responseType === "blob") return await response.blob();
14
+ if (responseType === "arrayBuffer") return await response.arrayBuffer();
15
+ return await response.json();
16
+ }
17
+ async function getErrorMessage(response) {
18
+ try {
19
+ return toErrorMessage(await response.json());
20
+ } catch {}
21
+ return `${response.status} ${response.statusText}`.trim();
22
+ }
23
+ async function http(url, options = {}) {
24
+ const { body, headers = {}, responseType = "json", ...restOptions } = options;
25
+ const requestHeaders = { ...headers };
26
+ if (body !== void 0) requestHeaders["Content-Type"] = "application/json";
27
+ try {
28
+ const response = await fetch(url, {
29
+ ...restOptions,
30
+ headers: requestHeaders,
31
+ body: body !== void 0 ? JSON.stringify(body) : void 0
32
+ });
33
+ if (!response.ok) return {
34
+ data: null,
35
+ error: await getErrorMessage(response),
36
+ status: response.status
37
+ };
38
+ return {
39
+ data: await handleResponse(response, responseType),
40
+ error: null,
41
+ status: response.status
42
+ };
43
+ } catch (err) {
44
+ return {
45
+ data: null,
46
+ error: err instanceof Error ? err.message : toErrorMessage(err),
47
+ status: null
48
+ };
49
+ }
50
+ }
51
+
52
+ //#endregion
53
+ export { http };
54
+ //# sourceMappingURL=http.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.mjs","names":["requestHeaders: Record<string, string>"],"sources":["../../src/shared/http.ts"],"sourcesContent":["interface HttpOptions extends Omit<RequestInit, 'body' | 'headers'> {\n\tbody?: unknown\n\theaders?: Record<string, string>\n\tresponseType?: 'json' | 'text' | 'blob' | 'arrayBuffer'\n}\n\ninterface HttpResult<T = unknown> {\n\tdata: T | null\n\t// A display-ready message. Every consumer treats a failed request's error as a\n\t// string (setError, new Error), so the payload is normalized here, not caller-side.\n\terror: string | null\n\t// The HTTP status, or null when the request never reached a response (fetch\n\t// threw — DNS/connection refused/offline). Callers that must tell \"server\n\t// unreachable\" from \"server rejected us\" branch on this.\n\tstatus: number | null\n}\n\nfunction toErrorMessage(payload: unknown): string {\n\tif (typeof payload === 'string') {\n\t\treturn payload\n\t}\n\n\tif (payload && typeof payload === 'object') {\n\t\tconst record = payload as Record<string, unknown>\n\n\t\tif (typeof record.error === 'string') {\n\t\t\treturn record.error\n\t\t}\n\n\t\tif (typeof record.message === 'string') {\n\t\t\treturn record.message\n\t\t}\n\t}\n\n\treturn 'Request failed'\n}\n\nasync function handleResponse<T>(\n\tresponse: Response,\n\tresponseType: 'json' | 'text' | 'blob' | 'arrayBuffer'\n): Promise<T> {\n\tif (responseType === 'text') {\n\t\treturn (await response.text()) as T\n\t}\n\n\tif (responseType === 'blob') {\n\t\treturn (await response.blob()) as T\n\t}\n\n\tif (responseType === 'arrayBuffer') {\n\t\treturn (await response.arrayBuffer()) as T\n\t}\n\n\treturn (await response.json()) as T\n}\n\nasync function getErrorMessage(response: Response): Promise<string> {\n\ttry {\n\t\tconst errorData = await response.json()\n\t\treturn toErrorMessage(errorData)\n\t} catch {\n\t\t// Body wasn't JSON — fall back to the status line.\n\t}\n\n\treturn `${response.status} ${response.statusText}`.trim()\n}\n\nexport async function http<T = unknown>(url: string, options: HttpOptions = {}): Promise<HttpResult<T>> {\n\tconst { body, headers = {}, responseType = 'json', ...restOptions } = options\n\n\tconst requestHeaders: Record<string, string> = { ...headers }\n\n\tif (body !== undefined) {\n\t\trequestHeaders['Content-Type'] = 'application/json'\n\t}\n\n\ttry {\n\t\tconst response = await fetch(url, {\n\t\t\t...restOptions,\n\t\t\theaders: requestHeaders,\n\t\t\tbody: body !== undefined ? JSON.stringify(body) : undefined\n\t\t})\n\n\t\tif (!response.ok) {\n\t\t\treturn { data: null, error: await getErrorMessage(response), status: response.status }\n\t\t}\n\n\t\tconst data = await handleResponse<T>(response, responseType)\n\t\treturn { data, error: null, status: response.status }\n\t} catch (err) {\n\t\treturn { data: null, error: err instanceof Error ? err.message : toErrorMessage(err), status: null }\n\t}\n}\n"],"mappings":";AAiBA,SAAS,eAAe,SAA0B;AACjD,KAAI,OAAO,YAAY,SACtB,QAAO;AAGR,KAAI,WAAW,OAAO,YAAY,UAAU;EAC3C,MAAM,SAAS;AAEf,MAAI,OAAO,OAAO,UAAU,SAC3B,QAAO,OAAO;AAGf,MAAI,OAAO,OAAO,YAAY,SAC7B,QAAO,OAAO;;AAIhB,QAAO;;AAGR,eAAe,eACd,UACA,cACa;AACb,KAAI,iBAAiB,OACpB,QAAQ,MAAM,SAAS,MAAM;AAG9B,KAAI,iBAAiB,OACpB,QAAQ,MAAM,SAAS,MAAM;AAG9B,KAAI,iBAAiB,cACpB,QAAQ,MAAM,SAAS,aAAa;AAGrC,QAAQ,MAAM,SAAS,MAAM;;AAG9B,eAAe,gBAAgB,UAAqC;AACnE,KAAI;AAEH,SAAO,eADW,MAAM,SAAS,MAAM,CACP;SACzB;AAIR,QAAO,GAAG,SAAS,OAAO,GAAG,SAAS,aAAa,MAAM;;AAG1D,eAAsB,KAAkB,KAAa,UAAuB,EAAE,EAA0B;CACvG,MAAM,EAAE,MAAM,UAAU,EAAE,EAAE,eAAe,QAAQ,GAAG,gBAAgB;CAEtE,MAAMA,iBAAyC,EAAE,GAAG,SAAS;AAE7D,KAAI,SAAS,OACZ,gBAAe,kBAAkB;AAGlC,KAAI;EACH,MAAM,WAAW,MAAM,MAAM,KAAK;GACjC,GAAG;GACH,SAAS;GACT,MAAM,SAAS,SAAY,KAAK,UAAU,KAAK,GAAG;GAClD,CAAC;AAEF,MAAI,CAAC,SAAS,GACb,QAAO;GAAE,MAAM;GAAM,OAAO,MAAM,gBAAgB,SAAS;GAAE,QAAQ,SAAS;GAAQ;AAIvF,SAAO;GAAE,MADI,MAAM,eAAkB,UAAU,aAAa;GAC7C,OAAO;GAAM,QAAQ,SAAS;GAAQ;UAC7C,KAAK;AACb,SAAO;GAAE,MAAM;GAAM,OAAO,eAAe,QAAQ,IAAI,UAAU,eAAe,IAAI;GAAE,QAAQ;GAAM"}
@@ -0,0 +1,17 @@
1
+ //#region src/shared/types/document.d.ts
2
+ type Document = {
3
+ name: string;
4
+ variants: string[];
5
+ extension: string;
6
+ lastModified?: number | null;
7
+ };
8
+ type DocumentAssetType = 'image' | 'font' | 'other';
9
+ interface DocumentAsset {
10
+ path: string;
11
+ size: number;
12
+ type: DocumentAssetType;
13
+ source: 'document' | 'shared';
14
+ }
15
+ //#endregion
16
+ export { Document, DocumentAsset, DocumentAssetType };
17
+ //# sourceMappingURL=document.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.mts","names":[],"sources":["../../../src/shared/types/document.ts"],"sourcesContent":[],"mappings":";KAAY,QAAA;EAAA,IAAA,EAAA,MAAQ;EASR,QAAA,EAAA,MAAA,EAAA;EAEK,SAAA,EAAA,MAAa;;;KAFlB,iBAAA;UAEK,aAAA;;;QAIV"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,7 @@
1
+ import { FormatConfig, Framework, KNOWN_CONFIG_KEYS, PandaCssPostCssPluginOptions, SUPPORTED_FRAMEWORKS } from "./public/config.mjs";
2
+ import { Document, DocumentAsset, DocumentAssetType } from "./document.mjs";
3
+ import { OSInfo, System } from "./system.mjs";
4
+ import { State } from "./state.mjs";
5
+ import { LogLevel } from "./log.mjs";
6
+ import { CssConcat } from "./server.mjs";
7
+ export { CssConcat, Document, DocumentAsset, DocumentAssetType, FormatConfig, Framework, KNOWN_CONFIG_KEYS, LogLevel, OSInfo, PandaCssPostCssPluginOptions, SUPPORTED_FRAMEWORKS, State, System };
@@ -0,0 +1,4 @@
1
+ import { KNOWN_CONFIG_KEYS, SUPPORTED_FRAMEWORKS } from "./public/config.mjs";
2
+ import { LogLevel } from "./log.mjs";
3
+
4
+ export { KNOWN_CONFIG_KEYS, LogLevel, SUPPORTED_FRAMEWORKS };
@@ -0,0 +1,10 @@
1
+ //#region src/shared/types/log.d.ts
2
+ declare enum LogLevel {
3
+ ERROR = 0,
4
+ WARN = 1,
5
+ INFO = 2,
6
+ DEBUG = 3,
7
+ }
8
+ //#endregion
9
+ export { LogLevel };
10
+ //# sourceMappingURL=log.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.mts","names":[],"sources":["../../../src/shared/types/log.ts"],"sourcesContent":[],"mappings":";aAAY,QAAA;EAAA,KAAA,GAAA,CAAA"}
@@ -0,0 +1,12 @@
1
+ //#region src/shared/types/log.ts
2
+ let LogLevel = /* @__PURE__ */ function(LogLevel$1) {
3
+ LogLevel$1[LogLevel$1["ERROR"] = 0] = "ERROR";
4
+ LogLevel$1[LogLevel$1["WARN"] = 1] = "WARN";
5
+ LogLevel$1[LogLevel$1["INFO"] = 2] = "INFO";
6
+ LogLevel$1[LogLevel$1["DEBUG"] = 3] = "DEBUG";
7
+ return LogLevel$1;
8
+ }({});
9
+
10
+ //#endregion
11
+ export { LogLevel };
12
+ //# sourceMappingURL=log.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.mjs","names":[],"sources":["../../../src/shared/types/log.ts"],"sourcesContent":["export enum LogLevel {\n\tERROR = 0,\n\tWARN = 1,\n\tINFO = 2,\n\tDEBUG = 3\n}\n"],"mappings":";AAAA,IAAY,gDAAL;AACN;AACA;AACA;AACA"}
@@ -0,0 +1,33 @@
1
+ //#region src/shared/types/public/cli.d.ts
2
+ type CliOptionValueType = 'string' | 'number' | 'boolean' | 'string[]';
3
+ type CliOptionParser = 'comma-separated';
4
+ interface CliOptionSpec {
5
+ field: string;
6
+ flags: string;
7
+ description: string;
8
+ summary?: string;
9
+ see?: string;
10
+ example?: string;
11
+ type: CliOptionValueType;
12
+ choices?: string[];
13
+ defaultValue?: string | number | boolean | null;
14
+ parser?: CliOptionParser;
15
+ }
16
+ interface CliArgumentSpec {
17
+ name: string;
18
+ description: string;
19
+ required?: boolean;
20
+ }
21
+ interface CliCommandSpec {
22
+ name: string;
23
+ description: string;
24
+ options: CliOptionSpec[];
25
+ arguments?: CliArgumentSpec[];
26
+ commands?: CliCommandSpec[];
27
+ }
28
+ interface CliSpec {
29
+ commands: CliCommandSpec[];
30
+ }
31
+ //#endregion
32
+ export { CliArgumentSpec, CliCommandSpec, CliOptionParser, CliOptionSpec, CliOptionValueType, CliSpec };
33
+ //# sourceMappingURL=cli.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.mts","names":[],"sources":["../../../../src/shared/types/public/cli.ts"],"sourcesContent":[],"mappings":";KAAY,kBAAA;AAAA,KAEA,eAAA,GAFkB,iBAAA;AAElB,UAEK,aAAA,CAFU;EAEV,KAAA,EAAA,MAAA;EAgBA,KAAA,EAAA,MAAA;EAMA,WAAA,EAAA,MAAc;EAGrB,OAAA,CAAA,EAAA,MAAA;EAEG,GAAA,CAAA,EAAA,MAAA;EAED,OAAA,CAAA,EAAA,MAAA;EAAc,IAAA,EAnBnB,kBAmBmB;EAGT,OAAA,CAAA,EAAO,MAAA,EAAA;;WAnBd;;UAGO,eAAA;;;;;UAMA,cAAA;;;WAGP;cAEG;aAED;;UAGK,OAAA;YACN"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,45 @@
1
+ //#region src/shared/types/public/compile.d.ts
2
+ declare const targets: readonly ["node", "browser", "worker"];
3
+ type Target = (typeof targets)[number];
4
+ declare const presets: readonly ["node", "browser", "edge"];
5
+ type Preset = (typeof presets)[number];
6
+ declare const formats: readonly ["cjs", "es"];
7
+ type Format = (typeof formats)[number];
8
+ declare const userBundlers: readonly ["vite", "rollup", "esbuild", "webpack", "rspack"];
9
+ type UserBundler = (typeof userBundlers)[number];
10
+ declare const assetModes: readonly ["static", "dynamic", "none"];
11
+ type AssetMode = (typeof assetModes)[number];
12
+ declare const outputs: readonly ["renderer", "html"];
13
+ type Output = (typeof outputs)[number];
14
+ interface CompileOptions {
15
+ target?: Target;
16
+ preset?: Preset;
17
+ bundle?: string[];
18
+ external?: string[];
19
+ conditions?: string[];
20
+ externalConditions?: string[];
21
+ documents?: string[];
22
+ assets?: AssetMode | null;
23
+ output?: Output | null;
24
+ variants?: string[];
25
+ remoteAssets?: boolean;
26
+ inlineRemoteCss?: boolean;
27
+ validateSchema?: boolean;
28
+ cjs?: boolean;
29
+ bundleName?: string;
30
+ version?: string | null;
31
+ clean?: boolean;
32
+ outDir?: string | null;
33
+ configPath?: string | null;
34
+ /** @internal */
35
+ userBundler?: UserBundler | null;
36
+ }
37
+ type NormalizedExtras = {
38
+ bundleAll: boolean;
39
+ assets: AssetMode;
40
+ output: Output;
41
+ };
42
+ type NormalizedCompileOptions = { [K in keyof CompileOptions]-?: CompileOptions[K] } & NormalizedExtras;
43
+ //#endregion
44
+ export { AssetMode, CompileOptions, Format, NormalizedCompileOptions, Output, Preset, Target, UserBundler, assetModes, formats, outputs, presets, targets, userBundlers };
45
+ //# sourceMappingURL=compile.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile.d.mts","names":[],"sources":["../../../../src/shared/types/public/compile.ts"],"sourcesContent":[],"mappings":";cAAa;AAAA,KACD,MAAA,GADiD,CAAA,OAChC,OADgC,CAAA,CAAA,MAAA,CAAA;AACjD,cAEC,OAFgB,EAAA,SAAO,CAAA,MAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAEvB,KACD,MAAA,GAD+C,CAAA,OAC9B,OAD8B,CAAA,CAAA,MAAA,CAAA;AAC/C,cAEC,OAFgB,EAAA,SAAO,CAAA,KAAA,EAAA,IAAA,CAAA;AAEvB,KACD,MAAA,GADiC,CAAA,OAChB,OADgB,CAAA,CAAA,MAAA,CAAA;AACjC,cAEC,YAFgB,EAAO,SAAA,CAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,QAAA,CAAA;AAEvB,KACD,WAAA,GAD2E,CAAA,OACrD,YADqD,CAAA,CAAA,MAAA,CAAA;AAC3E,cAEC,UAFqB,EAAA,SAAA,CAAA,QAAY,EAAA,SAAA,EAAA,MAAA,CAAA;AAEjC,KACD,SAAA,GADoD,CAAA,OAChC,UADgC,CAAA,CAAA,MAAA,CAAA;AACpD,cAEC,OAFQ,EAAW,SAAA,CAAU,UAAA,EAAA,MAAA,CAAA;AAE7B,KACD,MAAA,GADwC,CAAA,OACvB,OADuB,CAAA,CAAA,MAAA,CAAA;AACxC,UAEK,cAAA,CAFY;EAEZ,MAAA,CAAA,EACP,MADO;EACP,MAAA,CAAA,EACA,MADA;EACA,MAAA,CAAA,EAAA,MAAA,EAAA;EAMA,QAAA,CAAA,EAAA,MAAA,EAAA;EACA,UAAA,CAAA,EAAA,MAAA,EAAA;EAYK,kBAAA,CAAA,EAAA,MAAA,EAAA;EAAW,SAAA,CAAA,EAAA,MAAA,EAAA;EAIrB,MAAA,CAAA,EAjBK,SAiBL,GAAgB,IAAA;EAMT,MAAA,CAAA,EAtBF,MAsBE,GAAA,IAAA;EACC,QAAA,CAAA,EAAA,MAAA,EAAA;EAAmB,YAAA,CAAA,EAAA,OAAA;EAAe,eAAA,CAAA,EAAA,OAAA;EAC3C,cAAA,CAAA,EAAA,OAAA;EAAgB,GAAA,CAAA,EAAA,OAAA;;;;;;;gBAZL;;KAIV,gBAAA;;UAEI;UACA;;KAGG,wBAAA,iBACC,mBAAmB,eAAe,OAC3C"}
@@ -0,0 +1,29 @@
1
+ //#region src/shared/types/public/compile.ts
2
+ const targets = [
3
+ "node",
4
+ "browser",
5
+ "worker"
6
+ ];
7
+ const presets = [
8
+ "node",
9
+ "browser",
10
+ "edge"
11
+ ];
12
+ const formats = ["cjs", "es"];
13
+ const userBundlers = [
14
+ "vite",
15
+ "rollup",
16
+ "esbuild",
17
+ "webpack",
18
+ "rspack"
19
+ ];
20
+ const assetModes = [
21
+ "static",
22
+ "dynamic",
23
+ "none"
24
+ ];
25
+ const outputs = ["renderer", "html"];
26
+
27
+ //#endregion
28
+ export { assetModes, formats, outputs, presets, targets, userBundlers };
29
+ //# sourceMappingURL=compile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile.mjs","names":[],"sources":["../../../../src/shared/types/public/compile.ts"],"sourcesContent":["export const targets = ['node', 'browser', 'worker'] as const\nexport type Target = (typeof targets)[number]\n\nexport const presets = ['node', 'browser', 'edge'] as const\nexport type Preset = (typeof presets)[number]\n\nexport const formats = ['cjs', 'es'] as const\nexport type Format = (typeof formats)[number]\n\nexport const userBundlers = ['vite', 'rollup', 'esbuild', 'webpack', 'rspack'] as const\nexport type UserBundler = (typeof userBundlers)[number]\n\nexport const assetModes = ['static', 'dynamic', 'none'] as const\nexport type AssetMode = (typeof assetModes)[number]\n\nexport const outputs = ['renderer', 'html'] as const\nexport type Output = (typeof outputs)[number]\n\nexport interface CompileOptions {\n\ttarget?: Target\n\tpreset?: Preset\n\tbundle?: string[]\n\texternal?: string[]\n\tconditions?: string[]\n\texternalConditions?: string[]\n\tdocuments?: string[]\n\tassets?: AssetMode | null\n\toutput?: Output | null\n\tvariants?: string[]\n\tremoteAssets?: boolean\n\tinlineRemoteCss?: boolean\n\tvalidateSchema?: boolean\n\tcjs?: boolean\n\tbundleName?: string\n\tversion?: string | null\n\tclean?: boolean\n\toutDir?: string | null\n\tconfigPath?: string | null\n\t/** @internal */\n\tuserBundler?: UserBundler | null\n}\n\n// Include preset-derived fields that don't exist on the input options\ntype NormalizedExtras = {\n\tbundleAll: boolean\n\tassets: AssetMode\n\toutput: Output\n}\n\nexport type NormalizedCompileOptions = {\n\t[K in keyof CompileOptions]-?: CompileOptions[K]\n} & NormalizedExtras\n"],"mappings":";AAAA,MAAa,UAAU;CAAC;CAAQ;CAAW;CAAS;AAGpD,MAAa,UAAU;CAAC;CAAQ;CAAW;CAAO;AAGlD,MAAa,UAAU,CAAC,OAAO,KAAK;AAGpC,MAAa,eAAe;CAAC;CAAQ;CAAU;CAAW;CAAW;CAAS;AAG9E,MAAa,aAAa;CAAC;CAAU;CAAW;CAAO;AAGvD,MAAa,UAAU,CAAC,YAAY,OAAO"}
@@ -0,0 +1,94 @@
1
+ //#region src/shared/types/public/config.d.ts
2
+ /**
3
+ * Options for the Panda CSS PostCSS plugin.
4
+ */
5
+ interface PandaCssPostCssPluginOptions {
6
+ configPath?: string;
7
+ cwd?: string;
8
+ logfile?: string;
9
+ allow?: RegExp[];
10
+ }
11
+ declare const SUPPORTED_FRAMEWORKS: readonly ["react", "vue", "html"];
12
+ type Framework = (typeof SUPPORTED_FRAMEWORKS)[number];
13
+ interface FormatConfig {
14
+ /**
15
+ * Path or URL to the JSON schema for this file, used by editors for
16
+ * autocomplete and validation. Set it to: https://format.dev/schema/format-config.json.
17
+ *
18
+ * @example "https://format.dev/schema/format-config.json"
19
+ * */
20
+ $schema?: string;
21
+ /**
22
+ * The Format release version this project is pinned to. Every installed Format
23
+ * package is kept in lockstep with this version. Set it to the version you
24
+ * want and run `format update` to apply it everywhere. Must be an exact
25
+ * version, never a range.
26
+ *
27
+ * @example "0.1.2"
28
+ * */
29
+ version: string;
30
+ /**
31
+ * Which framework to use for your Format documents.
32
+ * */
33
+ framework: Framework;
34
+ /**
35
+ * The root directory where all Format code is located, relative to the config file. Change this if you want to root your Format documents and data under a different directory. For example, setting this to "format" would result in your documents being located in "format/documents".
36
+ *
37
+ * @example "format"
38
+ *
39
+ * @default "./"
40
+ *
41
+ * */
42
+ rootDir?: string;
43
+ /**
44
+ * The directory for assets shared across documents, as a relative path. Defaults to `assets` under the root dir, mirroring each document's own `./assets/` folder. In your template code, this resolves as `"./"`: place `image.png` in this directory and reference it as `"./image.png"`. Somewhat equivalent to a `public` dir in a Vite project.
45
+ *
46
+ * @default "assets"
47
+ * @example "./shared-assets"
48
+ *
49
+ * */
50
+ sharedAssetsDir?: string;
51
+ /**
52
+ * Override the base path resolution for Format. Useful if you want to have your config in a different directory to the root of your project. For example, if you put your `format.config.json` file in a `config` directory, you could set `cwd` to `../` to tell Format to look for your project in the parent directory.
53
+ *
54
+ * @example "../"
55
+ *
56
+ * @default process.cwd()
57
+ *
58
+ * */
59
+ cwd?: string;
60
+ /**
61
+ * Specify a path to a `.env` file. If path is relative, this is resolved relative to `cwd`.
62
+ *
63
+ * @example "../../.env"
64
+ *
65
+ * @default resolve(cwd, .env)
66
+ *
67
+ * */
68
+ dotEnvPath?: string;
69
+ /**
70
+ * Panda CSS configuration options. The `PandaCssPostCssPluginOptions` type is exposed as `PluginOptions` from the `@pandacss/dev/postcss` package. Useful resource: https://github.com/chakra-ui/panda/blob/main/packages/postcss/src/index.ts
71
+ *
72
+ * @default {
73
+ * enabled: false,
74
+ * postCssConfig: {
75
+ * cwd: rootDir || "./",
76
+ * configPath: resolve(rootDir || "./", "panda.config.ts")
77
+ * }
78
+ * }
79
+ */
80
+ pandaCss?: {
81
+ /**
82
+ * Enable Panda CSS processing.
83
+ */
84
+ enabled?: boolean;
85
+ /**
86
+ * Panda CSS PostCSS plugin options. Useful if your Panda config is located in a non-standard location.
87
+ */
88
+ postCssConfig?: PandaCssPostCssPluginOptions;
89
+ };
90
+ }
91
+ declare const KNOWN_CONFIG_KEYS: readonly (keyof FormatConfig)[];
92
+ //#endregion
93
+ export { FormatConfig, Framework, KNOWN_CONFIG_KEYS, PandaCssPostCssPluginOptions, SUPPORTED_FRAMEWORKS };
94
+ //# sourceMappingURL=config.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.mts","names":[],"sources":["../../../../src/shared/types/public/config.ts"],"sourcesContent":[],"mappings":";;AASA;AAOA;AACY,UARK,4BAAA,CAQe;EAEf,UAAA,CAAA,EAAA,MAAY;EA0FhB,GAAA,CAAA,EAAA,MAAA;;UAhGJ;;cAGI;KACD,SAAA,WAAoB;UAEf,YAAA;;;;;;;;;;;;;;;;;;;;aAsBL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA6DM;;;cAOL,mCAAmC"}
@@ -0,0 +1,20 @@
1
+ //#region src/shared/types/public/config.ts
2
+ const SUPPORTED_FRAMEWORKS = [
3
+ "react",
4
+ "vue",
5
+ "html"
6
+ ];
7
+ const KNOWN_CONFIG_KEYS = [
8
+ "$schema",
9
+ "version",
10
+ "framework",
11
+ "rootDir",
12
+ "sharedAssetsDir",
13
+ "cwd",
14
+ "dotEnvPath",
15
+ "pandaCss"
16
+ ];
17
+
18
+ //#endregion
19
+ export { KNOWN_CONFIG_KEYS, SUPPORTED_FRAMEWORKS };
20
+ //# sourceMappingURL=config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.mjs","names":["KNOWN_CONFIG_KEYS: readonly (keyof FormatConfig)[]"],"sources":["../../../../src/shared/types/public/config.ts"],"sourcesContent":["// Declared here rather than imported from `@pandacss/dev/postcss`, because Panda\n// is an optional peer dependency that most consumers never install. Importing it\n// would carry the reference into this file's published declaration and fail for\n// anyone who left the optional peer out, since TypeScript checks declaration\n// files unless `skipLibCheck` is turned on. The fields mirror `PluginOptions`\n// from `@pandacss/postcss`, so a value of that type still satisfies this one.\n/**\n * Options for the Panda CSS PostCSS plugin.\n */\nexport interface PandaCssPostCssPluginOptions {\n\tconfigPath?: string\n\tcwd?: string\n\tlogfile?: string\n\tallow?: RegExp[]\n}\n\nexport const SUPPORTED_FRAMEWORKS = ['react', 'vue', 'html'] as const\nexport type Framework = (typeof SUPPORTED_FRAMEWORKS)[number]\n\nexport interface FormatConfig {\n\t/**\n\t * Path or URL to the JSON schema for this file, used by editors for\n\t * autocomplete and validation. Set it to: https://format.dev/schema/format-config.json.\n\t *\n\t * @example \"https://format.dev/schema/format-config.json\"\n\t * */\n\t$schema?: string\n\n\t/**\n\t * The Format release version this project is pinned to. Every installed Format\n\t * package is kept in lockstep with this version. Set it to the version you\n\t * want and run `format update` to apply it everywhere. Must be an exact\n\t * version, never a range.\n\t *\n\t * @example \"0.1.2\"\n\t * */\n\tversion: string\n\n\t/**\n\t * Which framework to use for your Format documents.\n\t * */\n\tframework: Framework\n\n\t/**\n\t * The root directory where all Format code is located, relative to the config file. Change this if you want to root your Format documents and data under a different directory. For example, setting this to \"format\" would result in your documents being located in \"format/documents\".\n\t *\n\t * @example \"format\"\n\t *\n\t * @default \"./\"\n\t *\n\t * */\n\trootDir?: string\n\n\t/**\n\t * The directory for assets shared across documents, as a relative path. Defaults to `assets` under the root dir, mirroring each document's own `./assets/` folder. In your template code, this resolves as `\"./\"`: place `image.png` in this directory and reference it as `\"./image.png\"`. Somewhat equivalent to a `public` dir in a Vite project.\n\t *\n\t * @default \"assets\"\n\t * @example \"./shared-assets\"\n\t *\n\t * */\n\tsharedAssetsDir?: string\n\n\t/**\n\t * Override the base path resolution for Format. Useful if you want to have your config in a different directory to the root of your project. For example, if you put your `format.config.json` file in a `config` directory, you could set `cwd` to `../` to tell Format to look for your project in the parent directory.\n\t *\n\t * @example \"../\"\n\t *\n\t * @default process.cwd()\n\t *\n\t * */\n\tcwd?: string\n\n\t/**\n\t * Specify a path to a `.env` file. If path is relative, this is resolved relative to `cwd`.\n\t *\n\t * @example \"../../.env\"\n\t *\n\t * @default resolve(cwd, .env)\n\t *\n\t * */\n\tdotEnvPath?: string\n\n\t/**\n\t * Panda CSS configuration options. The `PandaCssPostCssPluginOptions` type is exposed as `PluginOptions` from the `@pandacss/dev/postcss` package. Useful resource: https://github.com/chakra-ui/panda/blob/main/packages/postcss/src/index.ts\n\t *\n\t * @default {\n\t * \tenabled: false,\n\t * \tpostCssConfig: {\n\t * \t\tcwd: rootDir || \"./\",\n\t * \t\tconfigPath: resolve(rootDir || \"./\", \"panda.config.ts\")\n\t * }\n\t * }\n\t */\n\tpandaCss?: {\n\t\t/**\n\t\t * Enable Panda CSS processing.\n\t\t */\n\t\tenabled?: boolean\n\n\t\t/**\n\t\t * Panda CSS PostCSS plugin options. Useful if your Panda config is located in a non-standard location.\n\t\t */\n\t\tpostCssConfig?: PandaCssPostCssPluginOptions\n\t}\n}\n\n// Runtime list of every valid config key. The FormatConfig type is erased at\n// runtime, so unknown-key detection in loadConfig needs a real array to diff\n// against. Keep this in sync when adding or removing a config option.\nexport const KNOWN_CONFIG_KEYS: readonly (keyof FormatConfig)[] = [\n\t'$schema',\n\t'version',\n\t'framework',\n\t'rootDir',\n\t'sharedAssetsDir',\n\t'cwd',\n\t'dotEnvPath',\n\t'pandaCss'\n]\n"],"mappings":";AAgBA,MAAa,uBAAuB;CAAC;CAAS;CAAO;CAAO;AA6F5D,MAAaA,oBAAqD;CACjE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA"}
@@ -0,0 +1,6 @@
1
+ import { FormatConfig, Framework, KNOWN_CONFIG_KEYS, PandaCssPostCssPluginOptions, SUPPORTED_FRAMEWORKS } from "./config.mjs";
2
+ import { AssetMode, CompileOptions, Format, NormalizedCompileOptions, Output, Preset, Target, UserBundler, assetModes, formats, outputs, presets, targets, userBundlers } from "./compile.mjs";
3
+ import { FormatAssetConfig, FormatDocument, FormatRenderer } from "./renderer.mjs";
4
+ import { FormatUnpluginOptions } from "./unplugin.mjs";
5
+ import { CliArgumentSpec, CliCommandSpec, CliOptionParser, CliOptionSpec, CliOptionValueType, CliSpec } from "./cli.mjs";
6
+ export { AssetMode, CliArgumentSpec, CliCommandSpec, CliOptionParser, CliOptionSpec, CliOptionValueType, CliSpec, CompileOptions, Format, FormatAssetConfig, FormatConfig, FormatDocument, FormatRenderer, FormatUnpluginOptions, Framework, KNOWN_CONFIG_KEYS, NormalizedCompileOptions, Output, PandaCssPostCssPluginOptions, Preset, SUPPORTED_FRAMEWORKS, Target, UserBundler, assetModes, formats, outputs, presets, targets, userBundlers };
@@ -0,0 +1,4 @@
1
+ import { KNOWN_CONFIG_KEYS, SUPPORTED_FRAMEWORKS } from "./config.mjs";
2
+ import { assetModes, formats, outputs, presets, targets, userBundlers } from "./compile.mjs";
3
+
4
+ export { KNOWN_CONFIG_KEYS, SUPPORTED_FRAMEWORKS, assetModes, formats, outputs, presets, targets, userBundlers };