@kirill.konshin/tailwind 0.0.1 → 0.0.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.
package/.ctirc CHANGED
@@ -1,11 +1,20 @@
1
1
  {
2
- "addNewline": true,
3
- "fileExcludePatterns": [
4
- "*.stories.*",
5
- "*.test.*",
6
- "*.fixture.*"
7
- ],
8
- "verbose": false,
9
- "withoutBackupFile": true,
10
- "withoutComment": true
11
- }
2
+ "options": [
3
+ {
4
+ "mode": "create",
5
+ "project": "tsconfig.json",
6
+ "include": "src/**/*.{ts,tsx}",
7
+ "exclude": [
8
+ "**/*.stories.*",
9
+ "**/*.test.*",
10
+ "**/*.fixture.*"
11
+ ],
12
+ "startFrom": "src",
13
+ "backup": false,
14
+ "overwrite": true,
15
+ "generationStyle": "default-alias-named-star",
16
+ "output": "src",
17
+ "verbose": true
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,2 @@
1
+ import config from '../../utils-private/.storybook/main';
2
+ export default config;
@@ -0,0 +1,2 @@
1
+ import preview from '../../utils-private/.storybook/preview';
2
+ export default preview;
@@ -1,14 +1,21 @@
1
1
  vite v7.0.6 building SSR bundle for production...
2
- create succeeded: /home/runner/work/utils/utils/packages/tailwind/src
2
+ - ctix 'create' mode start, ...
3
+ ✔ /home/runner/work/utils/utils/packages/tailwind/tsconfig.json loading complete!
4
+ ✔ analysis export statements completed!
5
+ - build "index.ts" file start
6
+ - output file exists check, ...
7
+
8
+
9
+ ✔ ctix 'create' mode complete!
3
10
  transforming...
4
11
  ✓ 3 modules transformed.
5
12
  rendering chunks...
6
13
 
7
14
  [vite:dts] Start generate declaration files...
8
15
  dist/index.js 0.18 kB │ map: 0.09 kB
9
- dist/fullpage.js 0.32 kB │ map: 0.63 kB
10
- dist/responsiveHelper.js 0.87 kB │ map: 1.20 kB
11
- [vite:dts] Declaration files built in 1381ms.
16
+ dist/fullpage.js 0.42 kB │ map: 0.85 kB
17
+ dist/responsiveHelper.js 0.90 kB │ map: 1.31 kB
18
+ [vite:dts] Declaration files built in 1785ms.
12
19
 
13
- ✓ built in 2.02s
20
+ ✓ built in 5.06s
14
21
  Updated package.json with exports
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # @kirill.konshin/tailwind
2
+
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 63fdba8: Agent-assisted refactoring
8
+ - 63fdba8: Divided core to browser/node/worker-specific packages, CTIX upgrade, etc.
@@ -1,7 +1,8 @@
1
1
  import { FC, RefObject } from 'react';
2
- export declare const Fullpage: FC<{
2
+ export type FullpageProps = {
3
3
  ref: RefObject<HTMLDivElement>;
4
- className: string;
4
+ className?: string;
5
5
  children: any;
6
- }>;
6
+ };
7
+ export declare const Fullpage: FC<FullpageProps>;
7
8
  //# sourceMappingURL=fullpage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fullpage.d.ts","sourceRoot":"","sources":["../src/fullpage.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC;IAAE,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAA;CAAE,CAS7F,CAAC"}
1
+ {"version":3,"file":"fullpage.d.ts","sourceRoot":"","sources":["../src/fullpage.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAQ,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IACxB,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAUrC,CAAC"}
package/dist/fullpage.js CHANGED
@@ -1,10 +1,16 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- const Fullpage = ({
3
- ref,
4
- className = "",
5
- children,
6
- ...props
7
- }) => /* @__PURE__ */ jsx("div", { ref, ...props, className: `container h-screen flex flex-col justify-center items-center ${className}`, children });
2
+ import { memo } from "react";
3
+ const Fullpage = memo(function Fullpage2({ ref, className = "", children, ...props }) {
4
+ return /* @__PURE__ */ jsx(
5
+ "div",
6
+ {
7
+ ref,
8
+ ...props,
9
+ className: `container h-screen flex flex-col justify-center items-center ${className}`,
10
+ children
11
+ }
12
+ );
13
+ });
8
14
  export {
9
15
  Fullpage
10
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fullpage.js","sources":["../src/fullpage.tsx"],"sourcesContent":["import React, { FC, RefObject } from 'react';\n\nexport const Fullpage: FC<{ ref: RefObject<HTMLDivElement>; className: string; children: any }> = ({\n ref,\n className = '',\n children,\n ...props\n}) => (\n <div ref={ref} {...props} className={`container h-screen flex flex-col justify-center items-center ${className}`}>\n {children}\n </div>\n);\n"],"names":[],"mappings":";AAEO,MAAM,WAAqF,CAAC;AAAA,EAC/F;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACP,MACI,oBAAC,SAAI,KAAW,GAAG,OAAO,WAAW,gEAAgE,SAAS,IACzG,SAAA,CACL;"}
1
+ {"version":3,"file":"fullpage.js","sources":["../src/fullpage.tsx"],"sourcesContent":["import React, { FC, memo, RefObject } from 'react';\n\nexport type FullpageProps = {\n ref: RefObject<HTMLDivElement>;\n className?: string;\n children: any;\n};\n\nexport const Fullpage: FC<FullpageProps> = memo(function Fullpage({ ref, className = '', children, ...props }) {\n return (\n <div\n ref={ref}\n {...props}\n className={`container h-screen flex flex-col justify-center items-center ${className}`}\n >\n {children}\n </div>\n );\n});\n"],"names":["Fullpage"],"mappings":";;AAQO,MAAM,WAA8B,KAAK,SAASA,UAAS,EAAE,KAAK,YAAY,IAAI,UAAU,GAAG,SAAS;AAC3G,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG;AAAA,MACC,GAAG;AAAA,MACJ,WAAW,gEAAgE,SAAS;AAAA,MAEnF;AAAA,IAAA;AAAA,EAAA;AAGb,CAAC;"}
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Fullpage } from './fullpage';
3
+ declare const meta: Meta<typeof Fullpage>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Fullpage>;
6
+ export declare const Default: Story;
7
+ export declare const WithCustomClass: Story;
8
+ //# sourceMappingURL=fullpage.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fullpage.stories.d.ts","sourceRoot":"","sources":["../src/fullpage.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,iBAAiB,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAM/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAYvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { FC } from 'react';
2
- export declare const ResponsiveHelperTW: FC<any>;
2
+ export type ResponsiveHelperTWProps = Record<string, never>;
3
+ export declare const ResponsiveHelperTW: FC<ResponsiveHelperTWProps>;
3
4
  //# sourceMappingURL=responsiveHelper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsiveHelper.d.ts","sourceRoot":"","sources":["../src/responsiveHelper.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,GAAG,CAWtC,CAAC"}
1
+ {"version":3,"file":"responsiveHelper.d.ts","sourceRoot":"","sources":["../src/responsiveHelper.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAQ,MAAM,OAAO,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAWzD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
- const ResponsiveHelperTW = function ResponsiveHelperTW2() {
3
+ import { memo } from "react";
4
+ const ResponsiveHelperTW = memo(function ResponsiveHelperTW2() {
4
5
  return /* @__PURE__ */ jsxs("span", { className: "fixed bottom-0 right-2 z-30 leading-none text-xs", children: [
5
6
  /* @__PURE__ */ jsx("small", { className: "hidden xs:max-sm:block", children: "XS" }),
6
7
  /* @__PURE__ */ jsx("small", { className: "hidden sm:max-md:block", children: "SM" }),
@@ -9,7 +10,7 @@ const ResponsiveHelperTW = function ResponsiveHelperTW2() {
9
10
  /* @__PURE__ */ jsx("small", { className: "hidden xl:max-2xl:block", children: "XL" }),
10
11
  /* @__PURE__ */ jsx("small", { className: "hidden 2xl:block", children: "XXL" })
11
12
  ] });
12
- };
13
+ });
13
14
  export {
14
15
  ResponsiveHelperTW
15
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"responsiveHelper.js","sources":["../src/responsiveHelper.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC } from 'react';\n\nexport const ResponsiveHelperTW: FC<any> = function ResponsiveHelperTW() {\n return (\n <span className=\"fixed bottom-0 right-2 z-30 leading-none text-xs\">\n <small className=\"hidden xs:max-sm:block\">XS</small>\n <small className=\"hidden sm:max-md:block\">SM</small>\n <small className=\"hidden md:max-lg:block\">MD</small>\n <small className=\"hidden lg:max-xl:block\">LG</small>\n <small className=\"hidden xl:max-2xl:block\">XL</small>\n <small className=\"hidden 2xl:block\">XXL</small>\n </span>\n );\n};\n"],"names":["ResponsiveHelperTW"],"mappings":";;AAIO,MAAM,qBAA8B,SAASA,sBAAqB;AACrE,SACI,qBAAC,QAAA,EAAK,WAAU,oDACZ,UAAA;AAAA,IAAA,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,2BAA0B,UAAA,MAAE;AAAA,IAC7C,oBAAC,SAAA,EAAM,WAAU,oBAAmB,UAAA,MAAA,CAAG;AAAA,EAAA,GAC3C;AAER;"}
1
+ {"version":3,"file":"responsiveHelper.js","sources":["../src/responsiveHelper.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC, memo } from 'react';\n\nexport type ResponsiveHelperTWProps = Record<string, never>;\n\nexport const ResponsiveHelperTW: FC<ResponsiveHelperTWProps> = memo(function ResponsiveHelperTW() {\n return (\n <span className=\"fixed bottom-0 right-2 z-30 leading-none text-xs\">\n <small className=\"hidden xs:max-sm:block\">XS</small>\n <small className=\"hidden sm:max-md:block\">SM</small>\n <small className=\"hidden md:max-lg:block\">MD</small>\n <small className=\"hidden lg:max-xl:block\">LG</small>\n <small className=\"hidden xl:max-2xl:block\">XL</small>\n <small className=\"hidden 2xl:block\">XXL</small>\n </span>\n );\n});\n"],"names":["ResponsiveHelperTW"],"mappings":";;;AAMO,MAAM,qBAAkD,KAAK,SAASA,sBAAqB;AAC9F,SACI,qBAAC,QAAA,EAAK,WAAU,oDACZ,UAAA;AAAA,IAAA,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,2BAA0B,UAAA,MAAE;AAAA,IAC7C,oBAAC,SAAA,EAAM,WAAU,oBAAmB,UAAA,MAAA,CAAG;AAAA,EAAA,GAC3C;AAER,CAAC;"}
@@ -0,0 +1,5 @@
1
+ import { Meta, StoryFn } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Default: StoryFn;
5
+ //# sourceMappingURL=responsiveHelper.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responsiveHelper.stories.d.ts","sourceRoot":"","sources":["../src/responsiveHelper.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,iBAAiB,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,IAMX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,OAQrB,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@kirill.konshin/tailwind",
3
3
  "description": "Utilities",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "----- BUILD -----": "",
8
8
  "clean": "rm -rf dist .tscache tsconfig.tsbuildinfo",
9
9
  "build": "vite build",
10
- "build:index": "cti create ./src",
10
+ "build:index": "ctix build",
11
11
  "build:check-types": "attw --pack .",
12
12
  "start": "yarn build --watch",
13
13
  "wait": "wait-on ./dist/index.js",
@@ -0,0 +1,36 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { useRef } from 'react';
3
+ import { Fullpage } from './fullpage';
4
+ import '../tailwind.css';
5
+
6
+ const meta: Meta<typeof Fullpage> = {
7
+ title: 'Components/Fullpage',
8
+ component: Fullpage,
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ },
12
+ };
13
+
14
+ export default meta;
15
+ type Story = StoryObj<typeof Fullpage>;
16
+
17
+ const FullpageWrapper = (args: any) => {
18
+ const ref = useRef<HTMLDivElement>(null);
19
+ return (
20
+ <Fullpage ref={ref} {...args}>
21
+ <h1 className="text-4xl font-bold text-blue-600">Hello Tailwind!</h1>
22
+ <p className="mt-4 text-gray-600">This is a fullpage component with Tailwind CSS styling.</p>
23
+ </Fullpage>
24
+ );
25
+ };
26
+
27
+ export const Default: Story = {
28
+ render: (args) => <FullpageWrapper {...args} />,
29
+ };
30
+
31
+ export const WithCustomClass: Story = {
32
+ render: (args) => <FullpageWrapper {...args} />,
33
+ args: {
34
+ className: 'bg-gray-100',
35
+ },
36
+ };
package/src/fullpage.tsx CHANGED
@@ -1,12 +1,19 @@
1
- import React, { FC, RefObject } from 'react';
1
+ import React, { FC, memo, RefObject } from 'react';
2
2
 
3
- export const Fullpage: FC<{ ref: RefObject<HTMLDivElement>; className: string; children: any }> = ({
4
- ref,
5
- className = '',
6
- children,
7
- ...props
8
- }) => (
9
- <div ref={ref} {...props} className={`container h-screen flex flex-col justify-center items-center ${className}`}>
10
- {children}
11
- </div>
12
- );
3
+ export type FullpageProps = {
4
+ ref: RefObject<HTMLDivElement>;
5
+ className?: string;
6
+ children: any;
7
+ };
8
+
9
+ export const Fullpage: FC<FullpageProps> = memo(function Fullpage({ ref, className = '', children, ...props }) {
10
+ return (
11
+ <div
12
+ ref={ref}
13
+ {...props}
14
+ className={`container h-screen flex flex-col justify-center items-center ${className}`}
15
+ >
16
+ {children}
17
+ </div>
18
+ );
19
+ });
@@ -0,0 +1,23 @@
1
+ import type { Meta, StoryFn } from '@storybook/react';
2
+ import { ResponsiveHelperTW } from './responsiveHelper';
3
+ import '../tailwind.css';
4
+
5
+ const meta: Meta = {
6
+ title: 'Components/ResponsiveHelperTW',
7
+ component: ResponsiveHelperTW,
8
+ parameters: {
9
+ layout: 'fullscreen',
10
+ },
11
+ };
12
+
13
+ export default meta;
14
+
15
+ export const Default: StoryFn = () => (
16
+ <div className="min-h-screen bg-gray-50 p-8">
17
+ <h1 className="text-2xl font-bold mb-4">Responsive Helper Demo</h1>
18
+ <p className="text-gray-600">
19
+ Resize the browser window to see the breakpoint indicator in the bottom-right corner.
20
+ </p>
21
+ <ResponsiveHelperTW />
22
+ </div>
23
+ );
@@ -1,8 +1,10 @@
1
1
  'use client';
2
2
 
3
- import React, { FC } from 'react';
3
+ import React, { FC, memo } from 'react';
4
4
 
5
- export const ResponsiveHelperTW: FC<any> = function ResponsiveHelperTW() {
5
+ export type ResponsiveHelperTWProps = Record<string, never>;
6
+
7
+ export const ResponsiveHelperTW: FC<ResponsiveHelperTWProps> = memo(function ResponsiveHelperTW() {
6
8
  return (
7
9
  <span className="fixed bottom-0 right-2 z-30 leading-none text-xs">
8
10
  <small className="hidden xs:max-sm:block">XS</small>
@@ -13,4 +15,4 @@ export const ResponsiveHelperTW: FC<any> = function ResponsiveHelperTW() {
13
15
  <small className="hidden 2xl:block">XXL</small>
14
16
  </span>
15
17
  );
16
- };
18
+ });
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ content: ['./src/**/*.{js,jsx,ts,tsx}'],
3
+ theme: {
4
+ extend: {},
5
+ },
6
+ plugins: [],
7
+ };
package/tailwind.css ADDED
@@ -0,0 +1,2 @@
1
+ @import 'tailwindcss';
2
+ @source 'src';