notionsoft-ui 1.0.12 → 1.0.14

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/cli/index.cjs CHANGED
@@ -10,10 +10,10 @@ const { execSync } = require("child_process");
10
10
  Helper: get template path
11
11
  ------------------------------- */
12
12
  function getTemplateFile(component) {
13
- // Library template: src/components/notion-ui/button/button.tsx
13
+ // Library template: src/notion-ui/button/button.tsx
14
14
  return path.join(
15
15
  __dirname,
16
- "../src/components/notion-ui",
16
+ "../src/notion-ui",
17
17
  component,
18
18
  component + ".tsx"
19
19
  );
@@ -153,7 +153,7 @@ program
153
153
  .command("list")
154
154
  .description("List available components")
155
155
  .action(() => {
156
- const templatesDir = path.join(__dirname, "../src/components/notion-ui");
156
+ const templatesDir = path.join(__dirname, "../src/notion-ui");
157
157
  const components = fs.readdirSync(templatesDir).filter((folder) => {
158
158
  const file = path.join(templatesDir, folder, folder + ".tsx");
159
159
  return fs.existsSync(file);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notionsoft-ui",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "A React UI component installer (shadcn-style). Installs components directly into your project.",
5
5
  "bin": {
6
6
  "notionsoft-ui": "./cli/index.cjs"
@@ -32,7 +32,7 @@ export interface AnimatedItemProps {
32
32
  children: React.ReactNode | ((inView: boolean) => React.ReactNode);
33
33
  }
34
34
 
35
- export function AnimatedItem(props: AnimatedItemProps) {
35
+ export default function AnimatedItem(props: AnimatedItemProps) {
36
36
  const [inView, setInView] = useState(false);
37
37
  const { springProps, intersectionArgs, children } = props;
38
38
  const defaultOnStart = useCallback(
@@ -1,4 +1,4 @@
1
- import { BooleanStatusButton } from "./BooleanStatusButton";
1
+ import BooleanStatusButton from "./BooleanStatusButton";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
3
 
4
4
  // --------------------------------------------
@@ -9,7 +9,7 @@ export interface BooleanStatusButtonProps {
9
9
  className?: string;
10
10
  }
11
11
 
12
- export function BooleanStatusButton(props: BooleanStatusButtonProps) {
12
+ export default function BooleanStatusButton(props: BooleanStatusButtonProps) {
13
13
  const { getColor, className } = props;
14
14
  const data = getColor();
15
15
 
@@ -1,5 +1,5 @@
1
1
  import Button from "../button/button";
2
- import { ButtonSpinner } from "./button-spinner";
2
+ import ButtonSpinner from "./button-spinner";
3
3
  import type { Meta, StoryObj } from "@storybook/react";
4
4
 
5
5
  const meta: Meta<typeof ButtonSpinner> = {
@@ -7,7 +7,7 @@ export interface IButtonSpinnerProps {
7
7
  className?: string;
8
8
  }
9
9
 
10
- export function ButtonSpinner(props: IButtonSpinnerProps) {
10
+ export default function ButtonSpinner(props: IButtonSpinnerProps) {
11
11
  const { loading, children, className } = props;
12
12
  return (
13
13
  <>
@@ -1,4 +1,4 @@
1
- import { CircleLoader } from "./circle-loader"; // Adjust the import path as needed
1
+ import CircleLoader from "./circle-loader"; // Adjust the import path as needed
2
2
  import { CircleLoaderProps } from "./circle-loader";
3
3
 
4
4
  // Meta information for Storybook
@@ -8,7 +8,7 @@ export interface CircleLoaderProps {
8
8
  parentClassName?: string;
9
9
  }
10
10
 
11
- export function CircleLoader(props: CircleLoaderProps) {
11
+ export default function CircleLoader(props: CircleLoaderProps) {
12
12
  const { label, className, labelclassname, parentClassName, ...restProps } =
13
13
  props;
14
14
 
@@ -1,7 +1,7 @@
1
1
  import React, { useMemo } from "react";
2
2
  // import { cn } from "@/utils/cn";
3
3
  import { cn } from "../../utils/cn";
4
- import AnimatedItem from "@/components/notion-ui/animated-item";
4
+ import AnimatedItem from "@/components/notion-ui/animated-item/animated-item";
5
5
  // import AnimatedItem from "../animated-item";
6
6
 
7
7
  export type NastranInputSize = "sm" | "md" | "lg";
@@ -191,3 +191,5 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
191
191
  );
192
192
  }
193
193
  );
194
+
195
+ export default Input;
@@ -1,5 +1,5 @@
1
1
  import Button from "../button/button";
2
- import { AnimatedSheet } from "./AnimatedSheet";
2
+ import AnimatedSheet from "./AnimatedSheet";
3
3
  import type { Meta, StoryObj } from "@storybook/react";
4
4
  import { useState } from "react";
5
5
 
@@ -22,7 +22,7 @@ type AnimatedSheetProps = {
22
22
  animate: AnimateType;
23
23
  };
24
24
 
25
- export function AnimatedSheet({
25
+ export default function AnimatedSheet({
26
26
  open,
27
27
  onClose,
28
28
  children,
@@ -1,4 +1,4 @@
1
- import { ShiningText } from "./shining-text";
1
+ import ShiningText from "./shining-text";
2
2
 
3
3
  import type { Meta, StoryObj } from "@storybook/react";
4
4
 
@@ -7,7 +7,11 @@ interface ShiningTextProps extends React.HTMLAttributes<HTMLSpanElement> {
7
7
  text: string;
8
8
  }
9
9
 
10
- export function ShiningText({ text, className, ...props }: ShiningTextProps) {
10
+ export default function ShiningText({
11
+ text,
12
+ className,
13
+ ...props
14
+ }: ShiningTextProps) {
11
15
  // Animate strictly left → right
12
16
  const styles = useSpring({
13
17
  from: { backgroundPosition: "-100% 0%" }, // start offscreen left
@@ -1,3 +0,0 @@
1
- import { AnimatedItem } from "./animated-item";
2
-
3
- export default AnimatedItem;
@@ -1,3 +0,0 @@
1
- import { BooleanStatusButton } from "./BooleanStatusButton";
2
-
3
- export default BooleanStatusButton;
@@ -1,3 +0,0 @@
1
- import Button from "./button";
2
-
3
- export default Button;
@@ -1,3 +0,0 @@
1
- import { CircleLoader } from "./circle-loader";
2
-
3
- export default CircleLoader;
@@ -1,3 +0,0 @@
1
- import { Input } from "./input";
2
-
3
- export default Input;
@@ -1,3 +0,0 @@
1
- import { AnimatedSheet } from "./AnimatedSheet";
2
-
3
- export default AnimatedSheet;
@@ -1,3 +0,0 @@
1
- import { ShiningText } from "./shining-text";
2
-
3
- export default ShiningText;