@versini/ui-main 5.0.4 → 5.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.
package/dist/index.d.ts CHANGED
@@ -1,34 +1,33 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare const MAIN_CLASSNAME = "av-main";
4
-
5
- type MainProps = {
6
- /**
7
- * The children to render.
8
- */
9
- children: React.ReactNode;
10
- /**
11
- * CSS class(es) to add to the main component wrapper.
12
- */
13
- className?: string;
14
- /**
15
- * Whether or not to render the Main component with no styles.
16
- * @default false
17
- */
18
- raw?: boolean;
19
- /**
20
- * Whether or not to render the Main component with no margin.
21
- * @default false
22
- */
23
- noMargin?: boolean;
24
- /**
25
- * Whether or not to render the Main component with no padding.
26
- * @default false
27
- */
28
- noPadding?: boolean;
29
- } & React.HTMLAttributes<HTMLElement> &
30
- React.ComponentPropsWithRef<"main">;
31
-
32
- declare const Main: ({ children, className, raw, noMargin, noPadding, ...otherProps }: MainProps) => react_jsx_runtime.JSX.Element;
33
-
34
- export { MAIN_CLASSNAME, Main };
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Main: ({ children, className, raw, noMargin, noPadding, ...otherProps }: MainProps) => JSX.Element;
4
+
5
+ export declare const MAIN_CLASSNAME = "av-main";
6
+
7
+ declare type MainProps = {
8
+ /**
9
+ * The children to render.
10
+ */
11
+ children: React.ReactNode;
12
+ /**
13
+ * CSS class(es) to add to the main component wrapper.
14
+ */
15
+ className?: string;
16
+ /**
17
+ * Whether or not to render the Main component with no styles.
18
+ * @default false
19
+ */
20
+ raw?: boolean;
21
+ /**
22
+ * Whether or not to render the Main component with no margin.
23
+ * @default false
24
+ */
25
+ noMargin?: boolean;
26
+ /**
27
+ * Whether or not to render the Main component with no padding.
28
+ * @default false
29
+ */
30
+ noPadding?: boolean;
31
+ } & React.HTMLAttributes<HTMLElement> & React.ComponentPropsWithRef<"main">;
32
+
33
+ export { }
package/dist/index.js CHANGED
@@ -1,18 +1,49 @@
1
- import { MAIN_CLASSNAME as o, Main as I } from "./components/Main/Main.js";
2
1
  /*!
3
- @versini/ui-main v5.0.4
2
+ @versini/ui-main v5.1.0
4
3
  © 2025 gizmette.com
5
4
  */
6
5
  try {
7
- window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
8
- version: "5.0.4",
9
- buildTime: "10/24/2025 07:47 PM EDT",
10
- homepage: "https://github.com/aversini/ui-components",
11
- license: "MIT"
12
- });
13
- } catch {
6
+ if (!window.__VERSINI_UI_MAIN__) {
7
+ window.__VERSINI_UI_MAIN__ = {
8
+ version: "5.1.0",
9
+ buildTime: "11/04/2025 03:44 PM EST",
10
+ homepage: "https://github.com/aversini/ui-components",
11
+ license: "MIT",
12
+ };
13
+ }
14
+ } catch (error) {
15
+ // nothing to declare officer
14
16
  }
15
- export {
16
- o as MAIN_CLASSNAME,
17
- I as Main
17
+
18
+ import { jsx } from "react/jsx-runtime";
19
+ import clsx from "clsx";
20
+
21
+ ;// CONCATENATED MODULE: ./src/common/constants.ts
22
+ const MAIN_CLASSNAME = "av-main";
23
+
24
+ ;// CONCATENATED MODULE: external "react/jsx-runtime"
25
+
26
+ ;// CONCATENATED MODULE: external "clsx"
27
+
28
+ ;// CONCATENATED MODULE: ./src/components/Main/Main.tsx
29
+
30
+
31
+
32
+ const Main = ({ children, className, raw = false, noMargin = false, noPadding = false, ...otherProps })=>{
33
+ const mainClass = clsx(MAIN_CLASSNAME, {
34
+ "mt-2 sm:mt-3": !raw && !noMargin,
35
+ "p-2": !raw && !noPadding,
36
+ "flex w-full flex-col md:mx-auto md:max-w-4xl": !raw
37
+ }, className);
38
+ return /*#__PURE__*/ jsx("main", {
39
+ className: mainClass,
40
+ ...otherProps,
41
+ children: children
42
+ });
18
43
  };
44
+
45
+ ;// CONCATENATED MODULE: ./src/components/index.ts
46
+
47
+
48
+
49
+ export { MAIN_CLASSNAME, Main };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-main",
3
- "version": "5.0.4",
3
+ "version": "5.1.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -20,13 +20,13 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "build:check": "tsc",
23
- "build:js": "vite build",
24
- "build:types": "tsup",
25
- "build": "npm-run-all --serial clean build:check build:js build:types",
23
+ "build:js": "rslib build",
24
+ "build:types": "echo 'Types now built with rslib'",
25
+ "build": "npm-run-all --serial clean build:check build:js",
26
26
  "clean": "rimraf dist tmp",
27
- "dev:js": "vite build --watch --mode development",
28
- "dev:types": "tsup --watch src",
29
- "dev": "npm-run-all clean --parallel dev:js dev:types",
27
+ "dev:js": "rslib build --watch",
28
+ "dev:types": "echo 'Types now watched with rslib'",
29
+ "dev": "rslib build --watch",
30
30
  "lint": "biome lint src",
31
31
  "lint:fix": "biome check src --write --no-errors-on-unmatched",
32
32
  "prettier": "biome check --write --no-errors-on-unmatched",
@@ -46,5 +46,5 @@
46
46
  "sideEffects": [
47
47
  "**/*.css"
48
48
  ],
49
- "gitHead": "26763e1e738bcdcb0806c39612161666e4bc4459"
49
+ "gitHead": "7484ad443b77ef31e52ae3a7d88b8129bc6cdf1d"
50
50
  }
@@ -1,25 +0,0 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import n from "clsx";
3
- const x = "av-main", r = ({
4
- children: s,
5
- className: l,
6
- raw: m = !1,
7
- noMargin: a = !1,
8
- noPadding: o = !1,
9
- ...t
10
- }) => {
11
- const e = n(
12
- x,
13
- {
14
- "mt-2 sm:mt-3": !m && !a,
15
- "p-2": !m && !o,
16
- "flex w-full flex-col md:mx-auto md:max-w-4xl": !m
17
- },
18
- l
19
- );
20
- return /* @__PURE__ */ f("main", { className: e, ...t, children: s });
21
- };
22
- export {
23
- x as MAIN_CLASSNAME,
24
- r as Main
25
- };