myoperator-ui 0.0.154-beta.0 → 0.0.154-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +18 -27
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5679,7 +5679,7 @@ export { PageHeader, pageHeaderVariants };
5679
5679
  {
5680
5680
  name: "event-selector.tsx",
5681
5681
  content: prefixTailwindClasses(`import * as React from "react";
5682
- import { cn } from "../../lib/utils";
5682
+ import { cn } from "../../../lib/utils";
5683
5683
  import { EventGroupComponent } from "./event-group";
5684
5684
  import type { EventSelectorProps, EventCategory, EventGroup } from "./types";
5685
5685
 
@@ -5872,7 +5872,7 @@ EventSelector.displayName = "EventSelector";
5872
5872
  {
5873
5873
  name: "event-group.tsx",
5874
5874
  content: prefixTailwindClasses(`import * as React from "react";
5875
- import { cn } from "../../lib/utils";
5875
+ import { cn } from "../../../lib/utils";
5876
5876
  import { Checkbox, type CheckedState } from "../checkbox";
5877
5877
  import {
5878
5878
  Accordion,
@@ -6058,7 +6058,7 @@ EventGroupComponent.displayName = "EventGroupComponent";
6058
6058
  {
6059
6059
  name: "event-item.tsx",
6060
6060
  content: prefixTailwindClasses(`import * as React from "react";
6061
- import { cn } from "../../lib/utils";
6061
+ import { cn } from "../../../lib/utils";
6062
6062
  import { Checkbox } from "../checkbox";
6063
6063
  import type { EventItemComponentProps } from "./types";
6064
6064
 
@@ -6236,7 +6236,7 @@ export interface EventItemComponentProps {
6236
6236
  name: "key-value-input.tsx",
6237
6237
  content: prefixTailwindClasses(`import * as React from "react";
6238
6238
  import { Plus } from "lucide-react";
6239
- import { cn } from "../../lib/utils";
6239
+ import { cn } from "../../../lib/utils";
6240
6240
  import { Button } from "../button";
6241
6241
  import { KeyValueRow } from "./key-value-row";
6242
6242
  import type { KeyValueInputProps, KeyValuePair } from "./types";
@@ -6479,7 +6479,7 @@ KeyValueInput.displayName = "KeyValueInput";
6479
6479
  name: "key-value-row.tsx",
6480
6480
  content: prefixTailwindClasses(`import * as React from "react";
6481
6481
  import { Trash2 } from "lucide-react";
6482
- import { cn } from "../../lib/utils";
6482
+ import { cn } from "../../../lib/utils";
6483
6483
  import { Input } from "../input";
6484
6484
  import { Button } from "../button";
6485
6485
  import type { KeyValueRowProps } from "./types";
@@ -6669,7 +6669,7 @@ export interface KeyValueRowProps {
6669
6669
  name: "api-feature-card.tsx",
6670
6670
  content: prefixTailwindClasses(`import * as React from "react";
6671
6671
  import { Button } from "../button";
6672
- import { cn } from "../../lib/utils";
6672
+ import { cn } from "../../../lib/utils";
6673
6673
 
6674
6674
  export interface Capability {
6675
6675
  /** Unique identifier for the capability */
@@ -6834,7 +6834,7 @@ export type { ApiFeatureCardProps, Capability } from "./api-feature-card";
6834
6834
  name: "endpoint-details.tsx",
6835
6835
  content: prefixTailwindClasses(`import * as React from "react";
6836
6836
  import { XCircle } from "lucide-react";
6837
- import { cn } from "../../lib/utils";
6837
+ import { cn } from "../../../lib/utils";
6838
6838
  import { ReadableField } from "../readable-field";
6839
6839
 
6840
6840
  export interface EndpointDetailsProps
@@ -7068,7 +7068,7 @@ export type { EndpointDetailsProps } from "./endpoint-details";
7068
7068
  content: prefixTailwindClasses(`import * as React from "react";
7069
7069
  import { Button } from "../button";
7070
7070
  import { Pencil } from "lucide-react";
7071
- import { cn } from "../../lib/utils";
7071
+ import { cn } from "../../../lib/utils";
7072
7072
 
7073
7073
  export interface AlertConfigurationProps {
7074
7074
  /** Minimum balance threshold */
@@ -7359,7 +7359,7 @@ export type { AlertValuesModalProps } from "./alert-values-modal";
7359
7359
  {
7360
7360
  name: "auto-pay-setup.tsx",
7361
7361
  content: prefixTailwindClasses(`import * as React from "react";
7362
- import { cn } from "../../lib/utils";
7362
+ import { cn } from "../../../lib/utils";
7363
7363
  import { Button } from "../button";
7364
7364
  import {
7365
7365
  Accordion,
@@ -7549,7 +7549,7 @@ export type { AutoPaySetupProps } from "./types";
7549
7549
  name: "bank-details.tsx",
7550
7550
  content: prefixTailwindClasses(`import * as React from "react";
7551
7551
  import { Copy, Check } from "lucide-react";
7552
- import { cn } from "../../lib/utils";
7552
+ import { cn } from "../../../lib/utils";
7553
7553
  import {
7554
7554
  Accordion,
7555
7555
  AccordionItem,
@@ -7767,7 +7767,7 @@ export type { BankDetailsProps, BankDetailItem } from "./types";
7767
7767
  name: "payment-summary.tsx",
7768
7768
  content: prefixTailwindClasses(`import * as React from "react";
7769
7769
  import { Info } from "lucide-react";
7770
- import { cn } from "../../lib/utils";
7770
+ import { cn } from "../../../lib/utils";
7771
7771
  import {
7772
7772
  Tooltip,
7773
7773
  TooltipContent,
@@ -7951,7 +7951,7 @@ export type {
7951
7951
  name: "wallet-topup.tsx",
7952
7952
  content: prefixTailwindClasses(`import * as React from "react";
7953
7953
  import { Check, Ticket } from "lucide-react";
7954
- import { cn } from "../../lib/utils";
7954
+ import { cn } from "../../../lib/utils";
7955
7955
  import { Button } from "../button";
7956
7956
  import { Input } from "../input";
7957
7957
  import {
@@ -9609,9 +9609,8 @@ async function sync(options) {
9609
9609
  const upToDate = [];
9610
9610
  for (const componentName of availableComponents) {
9611
9611
  const component = registry[componentName];
9612
- const isCustomComponent = component.category === "custom";
9613
- const baseDir = isCustomComponent ? path6.join(cwd, "src/components/custom") : path6.join(cwd, options.path);
9614
- const targetDir = component.isMultiFile ? path6.join(baseDir, component.directory) : baseDir;
9612
+ const componentsDir = path6.join(cwd, options.path);
9613
+ const targetDir = component.isMultiFile ? path6.join(componentsDir, component.directory) : componentsDir;
9615
9614
  const mainFileName = component.isMultiFile ? component.mainFile : component.files[0]?.name;
9616
9615
  if (!mainFileName) continue;
9617
9616
  const mainFilePath = path6.join(targetDir, mainFileName);
@@ -9679,6 +9678,7 @@ async function sync(options) {
9679
9678
  const installed = [];
9680
9679
  const dependencies = /* @__PURE__ */ new Set();
9681
9680
  const processedComponents = /* @__PURE__ */ new Set();
9681
+ const componentsDir = path6.join(cwd, options.path);
9682
9682
  const installComponent = async (componentName, action) => {
9683
9683
  if (processedComponents.has(componentName)) return;
9684
9684
  const component = registry[componentName];
@@ -9687,9 +9687,7 @@ async function sync(options) {
9687
9687
  for (const depName of component.internalDependencies) {
9688
9688
  const depComponent = registry[depName];
9689
9689
  if (depComponent) {
9690
- const depIsCustom = depComponent.category === "custom";
9691
- const depBaseDir = depIsCustom ? path6.join(cwd, "src/components/custom") : path6.join(cwd, options.path);
9692
- const depTargetDir = depComponent.isMultiFile ? path6.join(depBaseDir, depComponent.directory) : depBaseDir;
9690
+ const depTargetDir = depComponent.isMultiFile ? path6.join(componentsDir, depComponent.directory) : componentsDir;
9693
9691
  const depMainFile = depComponent.isMultiFile ? depComponent.mainFile : depComponent.files[0]?.name;
9694
9692
  if (depMainFile) {
9695
9693
  const depExists = await fs6.pathExists(path6.join(depTargetDir, depMainFile));
@@ -9701,16 +9699,13 @@ async function sync(options) {
9701
9699
  }
9702
9700
  }
9703
9701
  spinner.text = `${action === "added" ? "Adding" : "Updating"} ${componentName}...`;
9704
- const isCustomComponent = component.category === "custom";
9705
- const baseDir = isCustomComponent ? path6.join(cwd, "src/components/custom") : path6.join(cwd, options.path);
9706
- const targetDir = component.isMultiFile ? path6.join(baseDir, component.directory) : baseDir;
9702
+ const targetDir = component.isMultiFile ? path6.join(componentsDir, component.directory) : componentsDir;
9707
9703
  for (const file of component.files) {
9708
9704
  const filePath = path6.join(targetDir, file.name);
9709
9705
  await fs6.ensureDir(path6.dirname(filePath));
9710
9706
  await fs6.writeFile(filePath, file.content);
9711
- const basePath = isCustomComponent ? "src/components/custom" : options.path;
9712
9707
  const relativePath = component.isMultiFile ? `${component.directory}/${file.name}` : file.name;
9713
- installed.push({ path: relativePath, basePath, action });
9708
+ installed.push({ path: relativePath, basePath: options.path, action });
9714
9709
  }
9715
9710
  if (component.dependencies) {
9716
9711
  component.dependencies.forEach((dep) => dependencies.add(dep));
@@ -9742,10 +9737,6 @@ async function sync(options) {
9742
9737
  console.log(chalk5.yellow("\n Required dependencies:"));
9743
9738
  console.log(chalk5.cyan(` npm install ${Array.from(dependencies).join(" ")}`));
9744
9739
  }
9745
- const hasCustomComponents = installed.some((file) => file.basePath.includes("custom"));
9746
- if (hasCustomComponents) {
9747
- await ensureCustomComponentsInTailwindConfig(cwd);
9748
- }
9749
9740
  console.log("");
9750
9741
  } catch (error) {
9751
9742
  spinner.fail("Sync failed");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.154-beta.0",
3
+ "version": "0.0.154-beta.2",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",