@agimon-ai/po-style-system-tooling 0.2.14-alpha.13 → 0.2.14-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_stdio = require("./stdio-DGIW9Sfo.cjs");
2
+ const require_stdio = require("./stdio-Dk3WHLnn.cjs");
3
3
  let node_fs = require("node:fs");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_stdio.__toESM(node_path, 1);
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { A as resolveStyleSystemThemePath, B as STYLE_SYSTEM_TYPES, F as TailwindCSSClassesService, P as DEFAULT_STYLE_SYSTEM_CONFIG, a as STYLE_SYSTEM_CLI_NAME, i as createServer$1, o as STYLE_SYSTEM_VERSION, r as generateRestrictedClassesConfig, s as createContainer, t as StdioTransportHandler, w as getAppDesignSystemConfig, y as getBundlerServiceFromConfig, z as log } from "./stdio-BN8nqygh.mjs";
2
+ import { A as resolveStyleSystemThemePath, B as STYLE_SYSTEM_TYPES, F as TailwindCSSClassesService, P as DEFAULT_STYLE_SYSTEM_CONFIG, a as STYLE_SYSTEM_CLI_NAME, i as createServer$1, o as STYLE_SYSTEM_VERSION, r as generateRestrictedClassesConfig, s as createContainer, t as StdioTransportHandler, w as getAppDesignSystemConfig, y as getBundlerServiceFromConfig, z as log } from "./stdio-C9TOHF1h.mjs";
3
3
  import { promises } from "node:fs";
4
4
  import path, { join } from "node:path";
5
5
  import { z } from "zod";
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stdio = require("./stdio-DGIW9Sfo.cjs");
2
+ const require_stdio = require("./stdio-Dk3WHLnn.cjs");
3
3
  let node_fs = require("node:fs");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_stdio.__toESM(node_path, 1);
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as resolveStyleSystemThemePath, B as STYLE_SYSTEM_TYPES, C as launchBrowserWithFallback, D as resetStyleSystemConfigCache, E as hasStyleSystemProjectConfig, F as TailwindCSSClassesService, I as BaseCSSClassesService, L as TemplatesManagerService, M as StoriesIndexService, N as CSSClassesServiceFactory, O as resolveAppDesignSystemConfig, P as DEFAULT_STYLE_SYSTEM_CONFIG, R as isContained, S as BaseBundlerService, T as getSharedComponentTags, _ as createDefaultBundlerService, b as ViteReactNativeBundlerService, c as createStyleSystemModule, d as GetComponentVisualTool, f as GetCSSClassesTool, g as ThemeService, h as ComponentRendererService, i as createServer, j as MAX_STYLE_SYSTEM_VIEWPORT_DIMENSION, k as StyleSystemConfigLoader, l as ListAppComponentsTool, m as GetUiComponentService, n as extractCustomTokenNames, p as ListThemesTool, r as generateRestrictedClassesConfig, s as createContainer, t as StdioTransportHandler, u as ListSharedComponentsTool, v as getBundlerService, w as getAppDesignSystemConfig, x as ViteReactBundlerService, y as getBundlerServiceFromConfig } from "./stdio-BN8nqygh.mjs";
1
+ import { A as resolveStyleSystemThemePath, B as STYLE_SYSTEM_TYPES, C as launchBrowserWithFallback, D as resetStyleSystemConfigCache, E as hasStyleSystemProjectConfig, F as TailwindCSSClassesService, I as BaseCSSClassesService, L as TemplatesManagerService, M as StoriesIndexService, N as CSSClassesServiceFactory, O as resolveAppDesignSystemConfig, P as DEFAULT_STYLE_SYSTEM_CONFIG, R as isContained, S as BaseBundlerService, T as getSharedComponentTags, _ as createDefaultBundlerService, b as ViteReactNativeBundlerService, c as createStyleSystemModule, d as GetComponentVisualTool, f as GetCSSClassesTool, g as ThemeService, h as ComponentRendererService, i as createServer, j as MAX_STYLE_SYSTEM_VIEWPORT_DIMENSION, k as StyleSystemConfigLoader, l as ListAppComponentsTool, m as GetUiComponentService, n as extractCustomTokenNames, p as ListThemesTool, r as generateRestrictedClassesConfig, s as createContainer, t as StdioTransportHandler, u as ListSharedComponentsTool, v as getBundlerService, w as getAppDesignSystemConfig, x as ViteReactBundlerService, y as getBundlerServiceFromConfig } from "./stdio-C9TOHF1h.mjs";
2
2
  import { promises } from "node:fs";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -2131,6 +2131,7 @@ var ViteReactBundlerService = class ViteReactBundlerService extends BaseBundlerS
2131
2131
  */
2132
2132
  async doStartDevServer(resolvedAppPath) {
2133
2133
  const tmpDir = path.join(resolvedAppPath, TMP_DIR_NAME);
2134
+ let createdServer;
2134
2135
  try {
2135
2136
  await promises.mkdir(tmpDir, { recursive: true });
2136
2137
  const { createServer } = await import("vite");
@@ -2183,6 +2184,7 @@ var ViteReactBundlerService = class ViteReactBundlerService extends BaseBundlerS
2183
2184
  open: false
2184
2185
  }
2185
2186
  });
2187
+ createdServer = this.server;
2186
2188
  await this.server.listen();
2187
2189
  const address = this.server.httpServer?.address();
2188
2190
  if (!address || typeof address === "string") throw new Error("Failed to start Vite dev server. Ensure no other process is using the port.");
@@ -2197,6 +2199,15 @@ var ViteReactBundlerService = class ViteReactBundlerService extends BaseBundlerS
2197
2199
  port
2198
2200
  };
2199
2201
  } catch (error) {
2202
+ try {
2203
+ await createdServer?.close();
2204
+ } catch (closeError) {
2205
+ log.warn(`[ViteReactBundlerService] Failed to close server after startup failure: ${String(closeError)}`);
2206
+ }
2207
+ this.server = null;
2208
+ this.serverUrl = null;
2209
+ this.serverPort = null;
2210
+ this.currentAppPath = null;
2200
2211
  const err = /* @__PURE__ */ new Error(`Failed to start dev server for ${resolvedAppPath}: ${error instanceof Error ? error.message : String(error)}`);
2201
2212
  err.cause = error;
2202
2213
  throw err;
@@ -2803,6 +2814,7 @@ function createNativeBabelTransformPlugin(appPath) {
2803
2814
  name: NATIVE_BABEL_TRANSFORM_PLUGIN_NAME,
2804
2815
  enforce: VITE_PLUGIN_ENFORCE_PRE,
2805
2816
  async transform(code, id) {
2817
+ id = id.split(VITE_QUERY_SEPARATOR)[0] ?? id;
2806
2818
  const isFlowModule = toViteImportPath(id).includes("/@react-native-segmented-control/segmented-control/");
2807
2819
  const isSupportedNodeModule = isFlowModule || id.includes(REACT_NATIVE_MARKDOWN_DISPLAY_PATH_SEGMENT);
2808
2820
  if (id.includes(NODE_MODULES_PATH_SEGMENT) && !isSupportedNodeModule || !BABEL_TRANSFORM_EXTENSION_PATTERN.test(id)) return null;
@@ -2950,6 +2962,14 @@ var ViteReactNativeBundlerService = class ViteReactNativeBundlerService extends
2950
2962
  {
2951
2963
  name: REACT_NATIVE_REDIRECT_PLUGIN_NAME,
2952
2964
  enforce: VITE_PLUGIN_ENFORCE_PRE,
2965
+ config: () => ({ optimizeDeps: {
2966
+ exclude: [
2967
+ "@react-native-segmented-control/segmented-control",
2968
+ SAFE_AREA_CONTEXT_PACKAGE,
2969
+ "react-native-gesture-handler"
2970
+ ],
2971
+ include: ["react-native-gesture-handler > hoist-non-react-statics", "react-native-gesture-handler > invariant"]
2972
+ } }),
2953
2973
  resolveId(source) {
2954
2974
  if (source === REACT_NATIVE_PACKAGE || source === REACT_NATIVE_INDEX_SUBPATH) return reactNativeWebEntry;
2955
2975
  return null;
@@ -4699,7 +4719,7 @@ function createContainer(options) {
4699
4719
  }
4700
4720
  //#endregion
4701
4721
  //#region package.json
4702
- var version = "0.2.14-alpha.13";
4722
+ var version = "0.2.14-alpha.15";
4703
4723
  //#endregion
4704
4724
  //#region src/metadata.ts
4705
4725
  const STYLE_SYSTEM_CLI_NAME = "style-system";
@@ -2158,6 +2158,7 @@ var ViteReactBundlerService = class ViteReactBundlerService extends BaseBundlerS
2158
2158
  */
2159
2159
  async doStartDevServer(resolvedAppPath) {
2160
2160
  const tmpDir = node_path.default.join(resolvedAppPath, TMP_DIR_NAME);
2161
+ let createdServer;
2161
2162
  try {
2162
2163
  await node_fs.promises.mkdir(tmpDir, { recursive: true });
2163
2164
  const { createServer } = await import("vite");
@@ -2210,6 +2211,7 @@ var ViteReactBundlerService = class ViteReactBundlerService extends BaseBundlerS
2210
2211
  open: false
2211
2212
  }
2212
2213
  });
2214
+ createdServer = this.server;
2213
2215
  await this.server.listen();
2214
2216
  const address = this.server.httpServer?.address();
2215
2217
  if (!address || typeof address === "string") throw new Error("Failed to start Vite dev server. Ensure no other process is using the port.");
@@ -2224,6 +2226,15 @@ var ViteReactBundlerService = class ViteReactBundlerService extends BaseBundlerS
2224
2226
  port
2225
2227
  };
2226
2228
  } catch (error) {
2229
+ try {
2230
+ await createdServer?.close();
2231
+ } catch (closeError) {
2232
+ log.warn(`[ViteReactBundlerService] Failed to close server after startup failure: ${String(closeError)}`);
2233
+ }
2234
+ this.server = null;
2235
+ this.serverUrl = null;
2236
+ this.serverPort = null;
2237
+ this.currentAppPath = null;
2227
2238
  const err = /* @__PURE__ */ new Error(`Failed to start dev server for ${resolvedAppPath}: ${error instanceof Error ? error.message : String(error)}`);
2228
2239
  err.cause = error;
2229
2240
  throw err;
@@ -2830,6 +2841,7 @@ function createNativeBabelTransformPlugin(appPath) {
2830
2841
  name: NATIVE_BABEL_TRANSFORM_PLUGIN_NAME,
2831
2842
  enforce: VITE_PLUGIN_ENFORCE_PRE,
2832
2843
  async transform(code, id) {
2844
+ id = id.split(VITE_QUERY_SEPARATOR)[0] ?? id;
2833
2845
  const isFlowModule = toViteImportPath(id).includes("/@react-native-segmented-control/segmented-control/");
2834
2846
  const isSupportedNodeModule = isFlowModule || id.includes(REACT_NATIVE_MARKDOWN_DISPLAY_PATH_SEGMENT);
2835
2847
  if (id.includes(NODE_MODULES_PATH_SEGMENT) && !isSupportedNodeModule || !BABEL_TRANSFORM_EXTENSION_PATTERN.test(id)) return null;
@@ -2977,6 +2989,14 @@ var ViteReactNativeBundlerService = class ViteReactNativeBundlerService extends
2977
2989
  {
2978
2990
  name: REACT_NATIVE_REDIRECT_PLUGIN_NAME,
2979
2991
  enforce: VITE_PLUGIN_ENFORCE_PRE,
2992
+ config: () => ({ optimizeDeps: {
2993
+ exclude: [
2994
+ "@react-native-segmented-control/segmented-control",
2995
+ SAFE_AREA_CONTEXT_PACKAGE,
2996
+ "react-native-gesture-handler"
2997
+ ],
2998
+ include: ["react-native-gesture-handler > hoist-non-react-statics", "react-native-gesture-handler > invariant"]
2999
+ } }),
2980
3000
  resolveId(source) {
2981
3001
  if (source === REACT_NATIVE_PACKAGE || source === REACT_NATIVE_INDEX_SUBPATH) return reactNativeWebEntry;
2982
3002
  return null;
@@ -4726,7 +4746,7 @@ function createContainer(options) {
4726
4746
  }
4727
4747
  //#endregion
4728
4748
  //#region package.json
4729
- var version = "0.2.14-alpha.13";
4749
+ var version = "0.2.14-alpha.15";
4730
4750
  //#endregion
4731
4751
  //#region src/metadata.ts
4732
4752
  const STYLE_SYSTEM_CLI_NAME = "style-system";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-style-system-tooling",
3
- "version": "0.2.14-alpha.13",
3
+ "version": "0.2.14-alpha.15",
4
4
  "description": "MCP server for exploring themes, Tailwind CSS classes, and UI components from Storybook with standalone component rendering capabilities",
5
5
  "keywords": [
6
6
  "design-system",