@bitovi/vybit 0.11.0 → 0.11.2

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.
@@ -16,7 +16,7 @@
16
16
  font-size: 12px;
17
17
  }
18
18
  </style>
19
- <script type="module" crossorigin src="/panel/assets/index-aBt_Tt69.js"></script>
19
+ <script type="module" crossorigin src="/panel/assets/index-CGc6ZuTL.js"></script>
20
20
  <link rel="stylesheet" crossorigin href="/panel/assets/index-BdUOBofL.css">
21
21
  </head>
22
22
  <body>
package/server/app.ts CHANGED
@@ -53,12 +53,17 @@ export function createApp(packageRoot: string, storybookUrl: string | null = nul
53
53
 
54
54
  app.post("/css", express.json(), async (req, res) => {
55
55
  const { classes } = req.body as { classes?: unknown };
56
+ console.error("[http] POST /css — requested classes:", classes);
56
57
  if (!Array.isArray(classes) || classes.some((c) => typeof c !== "string")) {
58
+ console.error("[http] POST /css — invalid request body");
57
59
  res.status(400).json({ error: "classes must be an array of strings" });
58
60
  return;
59
61
  }
60
62
  try {
61
63
  const css = await generateCssForClasses(classes as string[]);
64
+ console.error(`[http] POST /css — generated ${css.length} chars for [${classes.join(', ')}]`);
65
+ if (css.length < 500) console.error("[http] POST /css — full CSS:", css);
66
+ else console.error("[http] POST /css — CSS preview:", css.substring(0, 300), "...");
62
67
  res.json({ css });
63
68
  } catch (err) {
64
69
  const message = err instanceof Error ? err.message : String(err);
@@ -462,10 +462,15 @@ export class TailwindV3Adapter implements TailwindAdapter {
462
462
  let userConfig: object = {};
463
463
  if (configPath) {
464
464
  try {
465
+ console.error(`[tailwind-v3] Loading config from: ${configPath}`);
465
466
  userConfig = (await import(pathToFileURL(configPath).href)).default;
466
- } catch {
467
+ console.error(`[tailwind-v3] Config loaded successfully, keys:`, Object.keys(userConfig));
468
+ } catch (err) {
469
+ console.error(`[tailwind-v3] Failed to load config from ${configPath}:`, err);
467
470
  // fall through to empty config
468
471
  }
472
+ } else {
473
+ console.error(`[tailwind-v3] No config file found in ${cwd}`);
469
474
  }
470
475
 
471
476
  // Load postcss and tailwindcss as a PostCSS plugin from the target project
@@ -475,6 +480,7 @@ export class TailwindV3Adapter implements TailwindAdapter {
475
480
  await import(pathToFileURL(req.resolve("tailwindcss")).href)
476
481
  ).default;
477
482
 
483
+ console.error(`[tailwind-v3] Running PostCSS with safelist:`, classes);
478
484
  const result = await postcss([
479
485
  tailwindPlugin({
480
486
  ...userConfig,
@@ -483,6 +489,8 @@ export class TailwindV3Adapter implements TailwindAdapter {
483
489
  }),
484
490
  ]).process("@tailwind utilities;", { from: undefined });
485
491
 
492
+ console.error(`[tailwind-v3] PostCSS result: ${result.css.length} chars`);
493
+ if (result.css.length < 500) console.error(`[tailwind-v3] Full CSS:`, result.css);
486
494
  return result.css;
487
495
  }
488
496
  }
@@ -267,7 +267,11 @@ export class TailwindV4Adapter implements TailwindAdapter {
267
267
  }
268
268
 
269
269
  async generateCssForClasses(classes: string[]): Promise<string> {
270
+ console.error(`[tailwind-v4] Generating CSS for classes:`, classes);
270
271
  const compiler = await getCompiler();
271
- return compiler.build(classes);
272
+ const css = compiler.build(classes);
273
+ console.error(`[tailwind-v4] Generated ${css.length} chars`);
274
+ if (css.length < 500) console.error(`[tailwind-v4] Full CSS:`, css);
275
+ return css;
272
276
  }
273
277
  }
package/shared/types.ts CHANGED
@@ -128,6 +128,8 @@ export interface ElementSelectedMessage {
128
128
  export interface ClearHighlightsMessage {
129
129
  type: 'CLEAR_HIGHLIGHTS';
130
130
  to: 'overlay';
131
+ /** When true, also clears the selected element context (currentTargetEl, currentBoundary, etc). */
132
+ deselect?: boolean;
131
133
  }
132
134
 
133
135
  export interface SwitchContainerMessage {