@macolmenerori/component-library 1.0.1 → 1.1.0

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.
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MarkdownRender-C-bSlM80.cjs");exports.MarkdownRender=e.MarkdownRender;
2
+ //# sourceMappingURL=markdown-render.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-render.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { M as o } from "./MarkdownRender-DLY5lZNG.js";
2
+ export {
3
+ o as MarkdownRender
4
+ };
5
+ //# sourceMappingURL=markdown-render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-render.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ThemeSwitch-C7k1_MA4.cjs");exports.ThemeSwitch=e.ThemeSwitch;
2
+ //# sourceMappingURL=theme-switch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-switch.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { T as m } from "./ThemeSwitch-DbaEio36.js";
2
+ export {
3
+ m as ThemeSwitch
4
+ };
5
+ //# sourceMappingURL=theme-switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-switch.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,13 @@
1
+ export interface MarkdownProps {
2
+ /** The markdown string to render */
3
+ content: string;
4
+ /** Optional CSS class name for the container */
5
+ className?: string;
6
+ }
7
+ /**
8
+ * A component that renders a markdown string as HTML.
9
+ * Supports GitHub Flavored Markdown (GFM) including tables,
10
+ * strikethrough, task lists, and autolinks.
11
+ */
12
+ declare const MarkdownRender: React.FC<MarkdownProps>;
13
+ export default MarkdownRender;
@@ -0,0 +1,2 @@
1
+ export type { MarkdownProps } from './MarkdownRender';
2
+ export { default as MarkdownRender } from './MarkdownRender';
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Props for the ThemeSwitch component
4
+ */
5
+ export interface ThemeSwitchProps {
6
+ /** Whether dark mode is currently enabled */
7
+ enableDarkMode: boolean;
8
+ /** Callback function to update the dark mode state */
9
+ setEnableDarkMode: (value: boolean) => void;
10
+ /** Size variant of the switch. Defaults to 'large' */
11
+ size?: 'small' | 'medium' | 'large';
12
+ }
13
+ /**
14
+ * ThemeSwitch Component
15
+ *
16
+ * An animated toggle switch for switching between light and dark themes.
17
+ * Features sun/moon icons with animated clouds (light mode) and stars (dark mode).
18
+ *
19
+ * @component
20
+ * @example
21
+ * ```tsx
22
+ * const [darkMode, setDarkMode] = useState(false);
23
+ * <ThemeSwitch
24
+ * enableDarkMode={darkMode}
25
+ * setEnableDarkMode={setDarkMode}
26
+ * size="medium"
27
+ * />
28
+ * ```
29
+ */
30
+ declare const ThemeSwitch: React.FC<ThemeSwitchProps>;
31
+ export default ThemeSwitch;
@@ -0,0 +1,2 @@
1
+ export type { ThemeSwitchProps } from './ThemeSwitch';
2
+ export { default as ThemeSwitch } from './ThemeSwitch';
@@ -1,48 +1,2 @@
1
- import { default as default_2 } from 'react';
2
-
3
- export declare interface MarkdownProps {
4
- /** The markdown string to render */
5
- content: string;
6
- /** Optional CSS class name for the container */
7
- className?: string;
8
- }
9
-
10
- /**
11
- * A component that renders a markdown string as HTML.
12
- * Supports GitHub Flavored Markdown (GFM) including tables,
13
- * strikethrough, task lists, and autolinks.
14
- */
15
- export declare const MarkdownRender: React.FC<MarkdownProps>;
16
-
17
- /**
18
- * ThemeSwitch Component
19
- *
20
- * An animated toggle switch for switching between light and dark themes.
21
- * Features sun/moon icons with animated clouds (light mode) and stars (dark mode).
22
- *
23
- * @component
24
- * @example
25
- * ```tsx
26
- * const [darkMode, setDarkMode] = useState(false);
27
- * <ThemeSwitch
28
- * enableDarkMode={darkMode}
29
- * setEnableDarkMode={setDarkMode}
30
- * size="medium"
31
- * />
32
- * ```
33
- */
34
- export declare const ThemeSwitch: default_2.FC<ThemeSwitchProps>;
35
-
36
- /**
37
- * Props for the ThemeSwitch component
38
- */
39
- declare interface ThemeSwitchProps {
40
- /** Whether dark mode is currently enabled */
41
- enableDarkMode: boolean;
42
- /** Callback function to update the dark mode state */
43
- setEnableDarkMode: (value: boolean) => void;
44
- /** Size variant of the switch. Defaults to 'large' */
45
- size?: 'small' | 'medium' | 'large';
46
- }
47
-
48
- export { }
1
+ export * from './components/MarkdownRender';
2
+ export * from './components/ThemeSwitch';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@macolmenerori/component-library",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "keywords": [],
@@ -26,8 +26,31 @@
26
26
  "types": "./dist/types/index.d.ts",
27
27
  "default": "./dist/index.cjs"
28
28
  }
29
+ },
30
+ "./theme-switch": {
31
+ "import": {
32
+ "types": "./dist/types/components/ThemeSwitch/index.d.ts",
33
+ "default": "./dist/theme-switch.js"
34
+ },
35
+ "require": {
36
+ "types": "./dist/types/components/ThemeSwitch/index.d.ts",
37
+ "default": "./dist/theme-switch.cjs"
38
+ }
39
+ },
40
+ "./markdown-render": {
41
+ "import": {
42
+ "types": "./dist/types/components/MarkdownRender/index.d.ts",
43
+ "default": "./dist/markdown-render.js"
44
+ },
45
+ "require": {
46
+ "types": "./dist/types/components/MarkdownRender/index.d.ts",
47
+ "default": "./dist/markdown-render.cjs"
48
+ }
29
49
  }
30
50
  },
51
+ "sideEffects": [
52
+ "**/*.css"
53
+ ],
31
54
  "files": [
32
55
  "dist"
33
56
  ],
@@ -36,8 +59,18 @@
36
59
  "access": "public"
37
60
  },
38
61
  "peerDependencies": {
39
- "react": "^19.2.1",
40
- "react-dom": "^19.2.1"
62
+ "react": "^18.0.0 || ^19.0.0",
63
+ "react-dom": "^18.0.0 || ^19.0.0",
64
+ "react-markdown": "^10.0.0",
65
+ "remark-gfm": "^4.0.0"
66
+ },
67
+ "peerDependenciesMeta": {
68
+ "react-markdown": {
69
+ "optional": true
70
+ },
71
+ "remark-gfm": {
72
+ "optional": true
73
+ }
41
74
  },
42
75
  "devDependencies": {
43
76
  "@eslint/js": "^9.39.1",
@@ -71,10 +104,6 @@
71
104
  "vite-plugin-dts": "^4.5.4",
72
105
  "vite-plugin-lib-inject-css": "^2.2.2"
73
106
  },
74
- "dependencies": {
75
- "react-markdown": "^10.1.0",
76
- "remark-gfm": "^4.0.1"
77
- },
78
107
  "scripts": {
79
108
  "dev": "vite",
80
109
  "build": "tsc --noEmit && vite build",
File without changes