shadcn-studio-extension-cli 0.1.0 → 0.1.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.
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import React__default, { createContext, useState, useEffect, useContext, useCallback, useMemo, useRef, forwardRef, createElement, useLayoutEffect, Fragment as Fragment$1, isValidElement, cloneElement, useId as useId$1, useReducer, useSyncExternalStore, createRef, useImperativeHandle, StrictMode } from "react";
3
3
  import { createRoot } from "react-dom/client";
4
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
- import { A as AgentStateType, u as useAgents, a as useAppState, b as usePlugins, c as useAgentMessaging, d as usePanels, g as getSelectedElementInfo, e as getSelectedDocInfo, f as getSelectedBlockInfo, h as getSelectedThemeInfo, i as collectUserMessageMetadata, j as generateId, C as ConfigProvider, k as AgentProvider, l as AgentAvailabilityProvider, m as AgentMessagingProvider, P as PanelsProvider, n as PluginProvider, H as HotkeyActions, o as hotkeyActionDefinitions, p as getIFrameWindow, q as cn, r as getElementAtPoint, s as getXPathForElement, B as Button, t as glassyBoxClassName, v as AgentAvailabilityError, w as useAgentAvailability, x as Panel, y as PanelHeader, z as PanelContent, D as PanelFooter, E as cva, G as Glassy, F as AppStateProvider } from "index-DZzSFjno.js";
5
+ import { A as AgentStateType, u as useAgents, a as useAppState, b as usePlugins, c as useAgentMessaging, d as usePanels, g as getSelectedElementInfo, e as getSelectedDocInfo, f as getSelectedBlockInfo, h as getSelectedThemeInfo, i as collectUserMessageMetadata, j as generateId, C as ConfigProvider, k as AgentProvider, l as AgentAvailabilityProvider, m as AgentMessagingProvider, P as PanelsProvider, n as PluginProvider, H as HotkeyActions, o as hotkeyActionDefinitions, p as getIFrameWindow, q as cn, r as getElementAtPoint, s as getXPathForElement, B as Button, t as glassyBoxClassName, v as AgentAvailabilityError, w as useAgentAvailability, x as Panel, y as PanelHeader, z as PanelContent, D as PanelFooter, E as cva, F as getLicenseDataFromStorage, G as Glassy, I as AppStateProvider } from "index-ChCX2CjU.js";
6
6
  import * as ReactDOM from "react-dom";
7
7
  import { createPortal, flushSync } from "react-dom";
8
8
  import config from "@stagewise/toolbar/config";
@@ -1377,7 +1377,7 @@ function NoAgentFound() {
1377
1377
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2 text-foreground text-sm", children: [
1378
1378
  /* @__PURE__ */ jsx("p", { className: "font-medium", children: "To connect:" }),
1379
1379
  /* @__PURE__ */ jsxs("ol", { className: "list-inside list-decimal space-y-1 pl-2 text-sm", children: [
1380
- /* @__PURE__ */ jsx("li", { children: "Open your IDE (Cursor, Windsurf, etc.)" }),
1380
+ /* @__PURE__ */ jsx("li", { children: "Open your IDE (Cursor, Windsurf, Antigravity, etc.)" }),
1381
1381
  /* @__PURE__ */ jsx("li", { children: "Install the stagewise extension" }),
1382
1382
  /* @__PURE__ */ jsx("li", { children: "Make sure the extension is active" }),
1383
1383
  /* @__PURE__ */ jsx("li", { children: "Click refresh in the toolbar" })
@@ -5985,11 +5985,6 @@ const options = [
5985
5985
  label: "Documentation",
5986
5986
  Icon: "Context7Logo"
5987
5987
  },
5988
- {
5989
- type: "shadcn-studio-docs",
5990
- label: "ShadcnStudio Docs",
5991
- Icon: "ShadcnStudioLogo"
5992
- },
5993
5988
  {
5994
5989
  type: "blocks",
5995
5990
  label: "ShadcnStudio Blocks",
@@ -7173,7 +7168,7 @@ const performLocalSearch = (blocks, query) => {
7173
7168
  const apiResults = await fetchAndSearchBlocks(query, isValidated);
7174
7169
  if (apiResults.length > 0) {
7175
7170
  const combinedResults = [...apiResults, ...localResults], uniqueResults = removeDuplicateBlocks(combinedResults);
7176
- setSearchResults(uniqueResults.slice(0, maxResults));
7171
+ setSearchResults(uniqueResults);
7177
7172
  } else
7178
7173
  console.log("No API results found, keeping local results only");
7179
7174
  } catch (error2) {
@@ -7551,7 +7546,7 @@ const RECENT_BLOCKS_KEY = "toolbar-blocks-recent", getRecentBlocks = () => {
7551
7546
  ] }) }),
7552
7547
  /* @__PURE__ */ jsx("div", { className: "ml-auto text-primary text-xs", children: "↑↓ navigate • ⏎ select" })
7553
7548
  ] })
7554
- ] }) : /* @__PURE__ */ jsx("div", { className: "px-1 py-2 text-muted-foreground text-xs", children: searchQuery != null && searchQuery.trim() ? `No components found for "${searchQuery}"` : "No components found" })
7549
+ ] }) : /* @__PURE__ */ jsx("div", { className: "px-1 py-2 text-center text-muted-foreground text-xs", children: searchQuery != null && searchQuery.trim() ? `No components found for "${searchQuery}"` : 'Try searching blocks like "Hero Section", "Pricing", etc.' })
7555
7550
  ]
7556
7551
  }
7557
7552
  );
@@ -8011,7 +8006,7 @@ const fetchGenericThemesFromAPI = async () => {
8011
8006
  return console.warn("Error fetching themes:", error2), [];
8012
8007
  }
8013
8008
  }, fetchUserThemesFromAPI = async () => {
8014
- const fetchThemesUrl = "https://shadcnstudio.com/api/user-themes?email=dev@themeselection.com&license_key=BFC37484-BBD6-4B40-888E-DBDC50E176DE&is_extension=true";
8009
+ const { email, licenseKey } = getLicenseDataFromStorage(), fetchThemesUrl = `https://shadcnstudio.com/api/user-themes?email=${email}&license_key=${licenseKey}&is_extension=true`;
8015
8010
  try {
8016
8011
  const response = await fetch(fetchThemesUrl, { method: "GET" });
8017
8012
  return response.ok ? (await response.json()).themes : (console.warn(
@@ -10997,79 +10992,73 @@ const Logo = () => /* @__PURE__ */ jsxs(
10997
10992
  /* @__PURE__ */ jsx(
10998
10993
  "rect",
10999
10994
  {
11000
- x: "0.5",
11001
- y: "0.5",
11002
- width: "39",
11003
- height: "39",
11004
- rx: "19.5",
11005
- fill: "url(#paint0_linear_15373_2835)"
10995
+ width: "40",
10996
+ height: "40",
10997
+ rx: "20",
10998
+ transform: "matrix(-4.37114e-08 1 1 4.37114e-08 1.74846e-06 0)",
10999
+ fill: "#171717"
11006
11000
  }
11007
11001
  ),
11008
11002
  /* @__PURE__ */ jsx(
11009
- "rect",
11003
+ "path",
11010
11004
  {
11011
- x: "0.5",
11012
- y: "0.5",
11013
- width: "39",
11014
- height: "39",
11015
- rx: "19.5",
11016
- stroke: "url(#paint1_linear_15373_2835)"
11005
+ d: "M8.75586 20.1258L16.1303 20.1258C18.5549 20.1258 20.5205 18.1603 20.5205 15.7356L20.5205 8.56616",
11006
+ stroke: "#FAFAFA",
11007
+ "stroke-width": "2.43902"
11017
11008
  }
11018
11009
  ),
11019
11010
  /* @__PURE__ */ jsx(
11020
11011
  "path",
11021
11012
  {
11022
- d: "M18.8222 23.4734C19.0679 23.1621 19.5363 23.1499 19.7978 23.448L23.7441 27.947C24.1036 28.3571 23.8128 28.9995 23.2675 28.9998H15.7685C15.2388 28.9994 14.9426 28.3884 15.2704 27.9724L18.8222 23.4734ZM18.8437 11.2381C19.0963 10.9228 19.5756 10.9202 19.831 11.2332L30.9706 24.9021C31.3082 25.3167 31.0131 25.9373 30.4785 25.9373H27.0175C26.8265 25.9372 26.6458 25.8511 26.5253 25.7029L19.8408 17.4636C19.5827 17.1458 19.0957 17.1522 18.8456 17.4763L12.7568 25.3806C12.6367 25.5365 12.4507 25.6277 12.2538 25.6277H8.63568C8.10337 25.6277 7.80772 25.0119 8.14056 24.5964L18.8437 11.2381Z",
11023
- fill: "url(#paint2_linear_15373_2835)"
11013
+ d: "M32.2852 20.3198L24.9107 20.3198C22.4861 20.3198 20.5205 22.2854 20.5205 24.7101L20.5205 31.8795",
11014
+ stroke: "#FAFAFA",
11015
+ "stroke-width": "2.43902"
11024
11016
  }
11025
11017
  ),
11026
- /* @__PURE__ */ jsxs("defs", { children: [
11027
- /* @__PURE__ */ jsxs(
11028
- "linearGradient",
11029
- {
11030
- id: "paint0_linear_15373_2835",
11031
- x1: "35.625",
11032
- y1: "3.125",
11033
- x2: "5",
11034
- y2: "38.125",
11035
- gradientUnits: "userSpaceOnUse",
11036
- children: [
11037
- /* @__PURE__ */ jsx("stop", { "stop-color": "#794DFF" }),
11038
- /* @__PURE__ */ jsx("stop", { offset: "1", "stop-color": "#5A16EB" })
11039
- ]
11040
- }
11041
- ),
11042
- /* @__PURE__ */ jsxs(
11043
- "linearGradient",
11044
- {
11045
- id: "paint1_linear_15373_2835",
11046
- x1: "18.6478",
11047
- y1: "40",
11048
- x2: "21.3522",
11049
- y2: "2.96227e-07",
11050
- gradientUnits: "userSpaceOnUse",
11051
- children: [
11052
- /* @__PURE__ */ jsx("stop", { "stop-color": "#E4E9EC" }),
11053
- /* @__PURE__ */ jsx("stop", { offset: "1", "stop-color": "white", "stop-opacity": "0.6" })
11054
- ]
11055
- }
11056
- ),
11057
- /* @__PURE__ */ jsxs(
11058
- "linearGradient",
11059
- {
11060
- id: "paint2_linear_15373_2835",
11061
- x1: "19.5572",
11062
- y1: "11",
11063
- x2: "19.5572",
11064
- y2: "28.9998",
11065
- gradientUnits: "userSpaceOnUse",
11066
- children: [
11067
- /* @__PURE__ */ jsx("stop", { "stop-color": "white" }),
11068
- /* @__PURE__ */ jsx("stop", { offset: "1", "stop-color": "white", "stop-opacity": "0.6" })
11069
- ]
11070
- }
11071
- )
11072
- ] })
11018
+ /* @__PURE__ */ jsx(
11019
+ "line",
11020
+ {
11021
+ y1: "-1.21951",
11022
+ x2: "7.09397",
11023
+ y2: "-1.21951",
11024
+ transform: "matrix(0.70291 -0.711279 -0.711279 -0.70291 11.123 28.1847)",
11025
+ stroke: "#FAFAFA",
11026
+ "stroke-width": "2.43902"
11027
+ }
11028
+ ),
11029
+ /* @__PURE__ */ jsx(
11030
+ "line",
11031
+ {
11032
+ y1: "-1.21951",
11033
+ x2: "7.09397",
11034
+ y2: "-1.21951",
11035
+ transform: "matrix(0.70291 -0.711279 -0.711279 -0.70291 23.5781 15.6893)",
11036
+ stroke: "#FAFAFA",
11037
+ "stroke-width": "2.43902"
11038
+ }
11039
+ ),
11040
+ /* @__PURE__ */ jsx(
11041
+ "line",
11042
+ {
11043
+ y1: "-1.21951",
11044
+ x2: "7.09397",
11045
+ y2: "-1.21951",
11046
+ transform: "matrix(-0.707107 -0.707107 -0.707107 0.707107 15.8486 17.1644)",
11047
+ stroke: "#FAFAFA",
11048
+ "stroke-width": "2.43902"
11049
+ }
11050
+ ),
11051
+ /* @__PURE__ */ jsx(
11052
+ "line",
11053
+ {
11054
+ y1: "-1.21951",
11055
+ x2: "7.09397",
11056
+ y2: "-1.21951",
11057
+ transform: "matrix(-0.707107 -0.707107 -0.707107 0.707107 28.5645 29.8483)",
11058
+ stroke: "#FAFAFA",
11059
+ "stroke-width": "2.43902"
11060
+ }
11061
+ )
11073
11062
  ]
11074
11063
  }
11075
11064
  );
@@ -1,5 +1,5 @@
1
- import { q as cn, E as cva, b as usePlugins } from "index-DZzSFjno.js";
2
- import { B, x, z, D, y } from "index-DZzSFjno.js";
1
+ import { q as cn, E as cva, b as usePlugins } from "index-ChCX2CjU.js";
2
+ import { B, x, z, D, y } from "index-ChCX2CjU.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  const badgeVariants = cva("rounded-md p-2", {
5
5
  variants: {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "shadcn-studio-extension-cli",
3
3
  "module": "src/index.ts",
4
4
  "type": "module",
5
- "version": "0.1.0",
5
+ "version": "0.1.2",
6
6
  "description": "Shadcn/Studio Extension CLI",
7
7
  "author": "stagewise GmbH",
8
8
  "license": "AGPL-3.0-only",