@shohojdhara/atomix 0.1.18 → 0.1.20
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/NEXTJS_INTEGRATION.md +26 -1
- package/README.md +29 -0
- package/dist/js/987.js +1 -0
- package/dist/js/atomix.react.cjs.js +1 -1
- package/dist/js/atomix.react.esm.js +1 -1
- package/dist/js/atomix.react.umd.js +1 -1
- package/dist/types/lib/composables/useTodo.d.ts +1 -2
- package/next.config.js +15 -0
- package/package.json +3 -2
- package/src/components/Todo/Todo.stories.tsx +59 -107
- package/src/components/Todo/Todo.tsx +2 -2
- package/src/components/Todo/scripts/index.ts +42 -2
- package/src/lib/composables/useTodo.ts +3 -4
- package/src/lib/utils/index.ts +13 -0
- package/webpack.config.js +4 -0
- package/dist/js/194.js +0 -1
- package/dist/js/244.js +0 -1
- package/dist/types/components/Todo/scripts/types.d.ts +0 -17
package/NEXTJS_INTEGRATION.md
CHANGED
|
@@ -92,7 +92,7 @@ const nextConfig = {
|
|
|
92
92
|
transpilePackages: ['@shohojdhara/atomix'],
|
|
93
93
|
|
|
94
94
|
// Configure webpack for custom assets
|
|
95
|
-
webpack: (config) => {
|
|
95
|
+
webpack: (config, { isServer }) => {
|
|
96
96
|
// Handle SCSS files from Atomix
|
|
97
97
|
config.module.rules.push({
|
|
98
98
|
test: /\.scss$/,
|
|
@@ -108,6 +108,21 @@ const nextConfig = {
|
|
|
108
108
|
],
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
+
// Handle TypeScript declaration files
|
|
112
|
+
config.module.rules.push({
|
|
113
|
+
test: /\.d\.ts$/,
|
|
114
|
+
exclude: /node_modules/,
|
|
115
|
+
use: [{ loader: 'ignore-loader' }]
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// Add fallbacks for Node.js core modules (required for Webpack 5)
|
|
119
|
+
if (!isServer) {
|
|
120
|
+
config.resolve.fallback = {
|
|
121
|
+
...config.resolve.fallback,
|
|
122
|
+
crypto: false, // Provide empty mock for crypto
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
111
126
|
return config;
|
|
112
127
|
},
|
|
113
128
|
};
|
|
@@ -115,6 +130,16 @@ const nextConfig = {
|
|
|
115
130
|
module.exports = nextConfig;
|
|
116
131
|
```
|
|
117
132
|
|
|
133
|
+
For the TypeScript declaration files fix, you'll need to install:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm install --save-dev ignore-loader
|
|
137
|
+
# or
|
|
138
|
+
yarn add --dev ignore-loader
|
|
139
|
+
# or
|
|
140
|
+
pnpm add --save-dev ignore-loader
|
|
141
|
+
```
|
|
142
|
+
|
|
118
143
|
### TypeScript Configuration
|
|
119
144
|
|
|
120
145
|
Ensure your `tsconfig.json` includes proper module resolution:
|
package/README.md
CHANGED
|
@@ -13,6 +13,35 @@ Atomix is a modern component library for Web, React and Next.js applications wit
|
|
|
13
13
|
- 📦 **Tree Shakeable** - Import only what you need
|
|
14
14
|
- 🔧 **TypeScript** - Full TypeScript support
|
|
15
15
|
|
|
16
|
+
## Webpack 5 & Next.js Compatibility
|
|
17
|
+
|
|
18
|
+
Atomix is fully compatible with Webpack 5 and Next.js (including Turbopack). For projects using Webpack 5 or Next.js, you may need to add the following configuration to handle Node.js core modules:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
// For Next.js (in next.config.js)
|
|
22
|
+
const nextConfig = {
|
|
23
|
+
webpack: (config, { isServer }) => {
|
|
24
|
+
if (!isServer) {
|
|
25
|
+
config.resolve.fallback = {
|
|
26
|
+
...config.resolve.fallback,
|
|
27
|
+
crypto: false, // Provide empty mock for crypto
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return config;
|
|
31
|
+
},
|
|
32
|
+
transpilePackages: ['@shohojdhara/atomix'],
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// For Webpack 5 (in webpack.config.js)
|
|
36
|
+
module.exports = {
|
|
37
|
+
resolve: {
|
|
38
|
+
fallback: {
|
|
39
|
+
crypto: false, // Provide empty mock for crypto
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
16
45
|
## Installation
|
|
17
46
|
|
|
18
47
|
```bash
|
package/dist/js/987.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(this.webpackChunkAtomix=this.webpackChunkAtomix||[]).push([[987],{160:(t,r,e)=>{"use strict";var n=e(3948),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},470:(t,r,e)=>{"use strict";var n=e(6028),o=e(5594);t.exports=function(t){var r=n(t,"string");return o(r)?r:r+""}},575:(t,r,e)=>{"use strict";var n=e(3121);t.exports=function(t){return n(t.length)}},581:(t,r,e)=>{"use strict";var n=e(3930),o=e(2250),i=e(6285),u=TypeError;t.exports=function(t,r){var e,s;if("string"===r&&o(e=t.toString)&&!i(s=n(e,t)))return s;if(o(e=t.valueOf)&&!i(s=n(e,t)))return s;if("string"!==r&&o(e=t.toString)&&!i(s=n(e,t)))return s;throw new u("Can't convert object to primitive value")}},798:(t,r,e)=>{"use strict";var n,o,i=e(5951),u=e(6794),s=i.process,c=i.Deno,a=s&&s.versions||c&&c.version,p=a&&a.v8;p&&(o=(n=p.split("."))[0]>0&&4>n[0]?1:+(n[0]+n[1])),!o&&u&&((n=u.match(/Edge\/(\d+)/))&&74>n[1]||(n=u.match(/Chrome\/(\d+)/))&&(o=+n[1])),t.exports=o},1020:(t,r,e)=>{"use strict";var n=e(5442),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function a(t,r,e){var n,i={},a=null,p=null;for(n in void 0!==e&&(a=""+e),void 0!==r.key&&(a=""+r.key),void 0!==r.ref&&(p=r.ref),r)u.call(r,n)&&!c.hasOwnProperty(n)&&(i[n]=r[n]);if(t&&t.defaultProps)for(n in r=t.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:t,key:a,ref:p,props:i,_owner:s.current}}r.Fragment=i,r.jsx=a,r.jsxs=a},1091:(t,r,e)=>{"use strict";var n=e(5951),o=e(6024),i=e(2361),u=e(2250),s=e(3846).f,c=e(7463),a=e(2046),p=e(8311),f=e(1626),v=e(9724);e(6128);var l=function(t){var r=function(e,n,i){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return o(t,this,arguments)};return r.prototype=t.prototype,r};t.exports=function(t,r){var e,o,y,b,h,x,d,m,g,w=t.target,O=t.global,j=t.stat,S=t.proto,E=O?n:j?n[w]:n[w]&&n[w].prototype,P=O?a:a[w]||f(a,w,{})[w],_=P.prototype;for(b in r)o=!(e=c(O?b:w+(j?".":"#")+b,t.forced))&&E&&v(E,b),x=P[b],o&&(d=t.dontCallGetSet?(g=s(E,b))&&g.value:E[b]),h=o&&d?d:r[b],(e||S||typeof x!=typeof h)&&(m=t.bind&&o?p(h,n):t.wrap&&o?l(h):S&&u(h)?i(h):h,(t.sham||h&&h.sham||x&&x.sham)&&f(m,"sham",!0),f(P,b,m),S&&(v(a,y=w+"Prototype")||f(a,y,{}),f(a[y],b,h),t.real&&_&&(e||!_[b])&&f(_,b,h)))}},1175:(t,r,e)=>{"use strict";var n=e(9846);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1176:t=>{"use strict";var r=Math.ceil,e=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?e:r)(n)}},1362:(t,r,e)=>{"use strict";e(9748);var n=e(1747);t.exports=n("Array","includes")},1505:(t,r,e)=>{"use strict";var n=e(8828);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},1626:(t,r,e)=>{"use strict";var n=e(9447),o=e(4284),i=e(5817);t.exports=n?function(t,r,e){return o.f(t,r,i(1,e))}:function(t,r,e){return t[r]=e,t}},1747:(t,r,e)=>{"use strict";var n=e(5951),o=e(2046);t.exports=function(t,r){var e=o[t+"Prototype"],i=e&&e[r];if(i)return i;var u=n[t],s=u&&u.prototype;return s&&s[r]}},1907:(t,r,e)=>{"use strict";var n=e(1505),o=Function.prototype,i=o.call,u=n&&o.bind.bind(i,i);t.exports=n?u:function(t){return function(){return i.apply(t,arguments)}}},2046:t=>{"use strict";t.exports={}},2074:(t,r,e)=>{"use strict";var n=e(2087),o=TypeError;t.exports=function(t){if(n(t))throw new o("The method doesn't accept regular expressions");return t}},2087:(t,r,e)=>{"use strict";var n=e(6285),o=e(5807),i=e(6264)("match");t.exports=function(t){var r;return n(t)&&(void 0!==(r=t[i])?!!r:"RegExp"===o(t))}},2156:t=>{"use strict";t.exports=function(){}},2159:(t,r,e)=>{"use strict";var n=e(2250),o=e(4640),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},2250:t=>{"use strict";var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},2361:(t,r,e)=>{"use strict";var n=e(5807),o=e(1907);t.exports=function(t){if("Function"===n(t))return o(t)}},2532:(t,r,e)=>{"use strict";var n=e(5951),o=Object.defineProperty;t.exports=function(t,r){try{o(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},2574:(t,r)=>{"use strict";var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);r.f=o?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},2623:(t,r,e)=>{"use strict";var n={};n[e(6264)("toStringTag")]="z",t.exports=n+""=="[object z]"},3121:(t,r,e)=>{"use strict";var n=e(5482),o=Math.min;t.exports=function(t){var r=n(t);return r>0?o(r,9007199254740991):0}},3648:(t,r,e)=>{"use strict";var n=e(9447),o=e(8828),i=e(9552);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},3846:(t,r,e)=>{"use strict";var n=e(9447),o=e(3930),i=e(2574),u=e(5817),s=e(7374),c=e(470),a=e(9724),p=e(3648),f=Object.getOwnPropertyDescriptor;r.f=n?f:function(t,r){if(t=s(t),r=c(r),p)try{return f(t,r)}catch(e){}if(a(t,r))return u(!o(i.f,t,r),t[r])}},3930:(t,r,e)=>{"use strict";var n=e(1505),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},3948:(t,r,e)=>{"use strict";var n=e(2623),o=e(2250),i=e(5807),u=e(6264)("toStringTag"),s=Object,c="Arguments"===i(function(){return arguments}());t.exports=n?i:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(e){}}(r=s(t),u))?e:c?i(r):"Object"===(n=i(r))&&o(r.callee)?"Arguments":n}},4239:(t,r,e)=>{"use strict";var n=e(7136),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},4284:(t,r,e)=>{"use strict";var n=e(9447),o=e(3648),i=e(8661),u=e(6624),s=e(470),c=TypeError,a=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f="enumerable",v="configurable",l="writable";r.f=n?i?function(t,r,e){if(u(t),r=s(r),u(e),"function"==typeof t&&"prototype"===r&&"value"in e&&l in e&&!e[l]){var n=p(t,r);n&&n[l]&&(t[r]=e.value,e={configurable:v in e?e[v]:n[v],enumerable:f in e?e[f]:n[f],writable:!1})}return a(t,r,e)}:a:function(t,r,e){if(u(t),r=s(r),u(e),o)try{return a(t,r,e)}catch(n){}if("get"in e||"set"in e)throw new c("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},4378:(t,r,e)=>{"use strict";e(9770);var n=e(1747);t.exports=n("String","includes")},4436:(t,r,e)=>{"use strict";var n=e(7374),o=e(4849),i=e(575),u=function(t){return function(r,e,u){var s=n(r),c=i(s);if(0===c)return!t&&-1;var a,p=o(u,c);if(t&&e!=e){for(;c>p;)if((a=s[p++])!=a)return!0}else for(;c>p;p++)if((t||p in s)&&s[p]===e)return t||p||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},4640:t=>{"use strict";var r=String;t.exports=function(t){try{return r(t)}catch(e){return"Object"}}},4848:(t,r,e)=>{"use strict";t.exports=e(1020)},4849:(t,r,e)=>{"use strict";var n=e(5482),o=Math.max,i=Math.min;t.exports=function(t,r){var e=n(t);return 0>e?o(e+r,0):i(e,r)}},5482:(t,r,e)=>{"use strict";var n=e(1176);t.exports=function(t){var r=+t;return r!=r||0===r?0:n(r)}},5582:(t,r,e)=>{"use strict";var n=e(2046),o=e(5951),i=e(2250),u=function(t){return i(t)?t:void 0};t.exports=function(t,r){return 2>arguments.length?u(n[t])||u(o[t]):n[t]&&n[t][r]||o[t]&&o[t][r]}},5594:(t,r,e)=>{"use strict";var n=e(5582),o=e(2250),i=e(8280),u=e(1175),s=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return o(r)&&i(r.prototype,s(t))}},5735:(t,r,e)=>{"use strict";var n=e(6264)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[n]=!1,"/./"[t](r)}catch(o){}}return!1}},5807:(t,r,e)=>{"use strict";var n=e(1907),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},5816:(t,r,e)=>{"use strict";var n=e(6128);t.exports=function(t,r){return n[t]||(n[t]=r||{})}},5817:t=>{"use strict";t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},5951:function(t,r,e){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e.g&&e.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6024:(t,r,e)=>{"use strict";var n=e(1505),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?u.bind(i):function(){return u.apply(i,arguments)})},6028:(t,r,e)=>{"use strict";var n=e(3930),o=e(6285),i=e(5594),u=e(9367),s=e(581),c=e(6264),a=TypeError,p=c("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var e,c=u(t,p);if(c){if(void 0===r&&(r="default"),e=n(c,t,r),!o(e)||i(e))return e;throw new a("Can't convert object to primitive value")}return void 0===r&&(r="number"),s(t,r)}},6128:(t,r,e)=>{"use strict";var n=e(7376),o=e(5951),i=e(2532),u="__core-js_shared__",s=t.exports=o[u]||i(u,{});(s.versions||(s.versions=[])).push({version:"3.43.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6264:(t,r,e)=>{"use strict";var n=e(5951),o=e(5816),i=e(9724),u=e(6499),s=e(9846),c=e(1175),a=n.Symbol,p=o("wks"),f=c?a.for||a:a&&a.withoutSetter||u;t.exports=function(t){return i(p,t)||(p[t]=s&&i(a,t)?a[t]:f("Symbol."+t)),p[t]}},6285:(t,r,e)=>{"use strict";var n=e(2250);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},6343:(t,r,e)=>{"use strict";var n=e(6880);t.exports=n},6499:(t,r,e)=>{"use strict";var n=e(1907),o=0,i=Math.random(),u=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},6624:(t,r,e)=>{"use strict";var n=e(6285),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},6794:(t,r,e)=>{"use strict";var n=e(5951).navigator,o=n&&n.userAgent;t.exports=o?o+"":""},6880:(t,r,e)=>{"use strict";var n=e(8280),o=e(1362),i=e(4378),u=Array.prototype,s=String.prototype;t.exports=function(t){var r=t.includes;return t===u||n(u,t)&&r===u.includes?o:"string"==typeof t||t===s||n(s,t)&&r===s.includes?i:r}},6946:(t,r,e)=>{"use strict";var n=e(1907),o=e(8828),i=e(5807),u=Object,s=n("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):u(t)}:u},7136:t=>{"use strict";t.exports=function(t){return null==t}},7374:(t,r,e)=>{"use strict";var n=e(6946),o=e(4239);t.exports=function(t){return n(o(t))}},7376:t=>{"use strict";t.exports=!0},7463:(t,r,e)=>{"use strict";var n=e(8828),o=e(2250),i=/#|\.prototype\./,u=function(t,r){var e=c[s(t)];return e===p||e!==a&&(o(r)?n(r):!!r)},s=u.normalize=function(t){return(t+"").replace(i,".").toLowerCase()},c=u.data={},a=u.NATIVE="N",p=u.POLYFILL="P";t.exports=u},8280:(t,r,e)=>{"use strict";var n=e(1907);t.exports=n({}.isPrototypeOf)},8311:(t,r,e)=>{"use strict";var n=e(2361),o=e(2159),i=e(1505),u=n(n.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?u(t,r):function(){return t.apply(r,arguments)}}},8628:(t,r,e)=>{t.exports=e(6343)},8661:(t,r,e)=>{"use strict";var n=e(9447),o=e(8828);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(r){return!0}}},9298:(t,r,e)=>{"use strict";var n=e(4239),o=Object;t.exports=function(t){return o(n(t))}},9367:(t,r,e)=>{"use strict";var n=e(2159),o=e(7136);t.exports=function(t,r){var e=t[r];return o(e)?void 0:n(e)}},9447:(t,r,e)=>{"use strict";var n=e(8828);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(t,r,e)=>{"use strict";var n=e(5951),o=e(6285),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},9724:(t,r,e)=>{"use strict";var n=e(1907),o=e(9298),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},9748:(t,r,e)=>{"use strict";var n=e(1091),o=e(4436).includes,i=e(8828),u=e(2156);n({target:"Array",proto:!0,forced:i((function(){return!1}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),u("includes")},9770:(t,r,e)=>{"use strict";var n=e(1091),o=e(1907),i=e(2074),u=e(4239),s=e(160),c=e(5735),a=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~a(s(u(this)),s(i(t)),arguments.length>1?arguments[1]:void 0)}})},9846:(t,r,e)=>{"use strict";var n=e(798),o=e(8828),i=e(5951).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&41>n}))}}]);
|