Skip to content

Commit fdbbbab

Browse files
committed
Fix(#5): import and install errors
1 parent ee61036 commit fdbbbab

File tree

6 files changed

+58
-40
lines changed

6 files changed

+58
-40
lines changed

bun.lockb

-4.76 KB
Binary file not shown.

esbuild.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ const options = {
3636

3737
build({
3838
...options,
39-
outfile: "./dist/index.js"
39+
outfile: "./dist/index.mjs"
40+
});
41+
42+
build({
43+
...options,
44+
format: "cjs",
45+
outfile: "./dist/index.cjs"
4046
});
4147

4248
build({

package.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
"name": "@mezh-hq/react-seat-toolkit",
33
"version": "1.3.1",
44
"description": "React UI library to design and render seat layouts",
5-
"browser": "dist/index.js",
6-
"main": "dist/index.js",
7-
"module": "dist/index.js",
5+
"main": "dist/index.cjs",
6+
"module": "dist/index.mjs",
87
"types": "dist/index.d.ts",
98
"private": false,
109
"exports": {
11-
".": "./dist/index.js",
10+
".": {
11+
"import": {
12+
"types": "./dist/index.d.ts",
13+
"import": "./dist/index.mjs"
14+
},
15+
"require": {
16+
"types": "./dist/index.d.ts",
17+
"require": "./dist/index.cjs"
18+
}
19+
},
1220
"./slim": "./dist/index.slim.js",
1321
"./styles": "./dist/index.css",
1422
"./raw-styles": "./dist/styles/index.css",
@@ -24,7 +32,6 @@
2432
"storybook": "NODE_ENV=storybook storybook dev -p 6006",
2533
"build-storybook": "storybook build",
2634
"postbuild": "bun build:types && bun build:css",
27-
"postinstall": "patch-package",
2835
"prepare": "lefthook install",
2936
"release": "bunx github:akalanka47000/bunpublish --tag=${TAG:=latest} --provenance",
3037
"test": "echo \"Error: no test specified\" && exit 1"
@@ -104,7 +111,6 @@
104111
"install": "0.13.0",
105112
"lefthook": "1.4.3",
106113
"npm": "10.8.1",
107-
"patch-package": "8.0.0",
108114
"postcss": "8.4.31",
109115
"prettier": "2.8.8",
110116
"sonner": "1.5.0",
@@ -118,5 +124,8 @@
118124
"overrides": {
119125
"jsondiffpatch": "^0.5.0",
120126
"use-sync-external-store": "1.2.0"
127+
},
128+
"patchedDependencies": {
129+
121130
}
122131
}
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
1+
diff --git a/cjs/use-sync-external-store-shim.development.js b/cjs/use-sync-external-store-shim.development.js
22
index c849ab8..348baaa 100644
3-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
4-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
3+
--- a/cjs/use-sync-external-store-shim.development.js
4+
+++ b/cjs/use-sync-external-store-shim.development.js
55
@@ -10,6 +10,8 @@
66

77
'use strict';
@@ -19,10 +19,10 @@ index c849ab8..348baaa 100644
1919

2020
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2121

22-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js
22+
diff --git a/cjs/use-sync-external-store-shim.native.development.js b/cjs/use-sync-external-store-shim.native.development.js
2323
index 5e2bebc..ae1e46d 100644
24-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js
25-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js
24+
--- a/cjs/use-sync-external-store-shim.native.development.js
25+
+++ b/cjs/use-sync-external-store-shim.native.development.js
2626
@@ -10,6 +10,8 @@
2727

2828
'use strict';
@@ -40,10 +40,10 @@ index 5e2bebc..ae1e46d 100644
4040

4141
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
4242

43-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js
43+
diff --git a/cjs/use-sync-external-store-shim.native.production.min.js b/cjs/use-sync-external-store-shim.native.production.min.js
4444
index 0e7f3dc..ac8e426 100644
45-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js
46-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js
45+
--- a/cjs/use-sync-external-store-shim.native.production.min.js
46+
+++ b/cjs/use-sync-external-store-shim.native.production.min.js
4747
@@ -7,5 +7,7 @@
4848
* This source code is licensed under the MIT license found in the
4949
* LICENSE file in the root directory of this source tree.
@@ -53,10 +53,10 @@ index 0e7f3dc..ac8e426 100644
5353
+import e from "react";
5454
+function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}
5555
function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:q;
56-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js
56+
diff --git a/cjs/use-sync-external-store-shim.production.min.js b/cjs/use-sync-external-store-shim.production.min.js
5757
index 0ca00c7..e457d83 100644
58-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js
59-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js
58+
--- a/cjs/use-sync-external-store-shim.production.min.js
59+
+++ b/cjs/use-sync-external-store-shim.production.min.js
6060
@@ -7,5 +7,7 @@
6161
* This source code is licensed under the MIT license found in the
6262
* LICENSE file in the root directory of this source tree.
@@ -66,10 +66,10 @@ index 0ca00c7..e457d83 100644
6666
+import e from "react";
6767
+function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}
6868
function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;
69-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
69+
diff --git a/cjs/use-sync-external-store-shim/with-selector.development.js b/cjs/use-sync-external-store-shim/with-selector.development.js
7070
index 3c875ea..e7ec965 100644
71-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
72-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
71+
--- a/cjs/use-sync-external-store-shim/with-selector.development.js
72+
+++ b/cjs/use-sync-external-store-shim/with-selector.development.js
7373
@@ -10,6 +10,9 @@
7474

7575
'use strict';
@@ -89,10 +89,10 @@ index 3c875ea..e7ec965 100644
8989

9090
/**
9191
* inlined Object.is polyfill to avoid requiring consumers ship their own
92-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js
92+
diff --git a/cjs/use-sync-external-store-shim/with-selector.production.min.js b/cjs/use-sync-external-store-shim/with-selector.production.min.js
9393
index 84485da..201748b 100644
94-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js
95-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js
94+
--- a/cjs/use-sync-external-store-shim/with-selector.production.min.js
95+
+++ b/cjs/use-sync-external-store-shim/with-selector.production.min.js
9696
@@ -7,6 +7,9 @@
9797
* This source code is licensed under the MIT license found in the
9898
* LICENSE file in the root directory of this source tree.
@@ -104,10 +104,10 @@ index 84485da..201748b 100644
104104
+function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
105105
exports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
106106
u(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};
107-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js
107+
diff --git a/cjs/use-sync-external-store-with-selector.development.js b/cjs/use-sync-external-store-with-selector.development.js
108108
index eacc4be..d99209e 100644
109-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js
110-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js
109+
--- a/cjs/use-sync-external-store-with-selector.development.js
110+
+++ b/cjs/use-sync-external-store-with-selector.development.js
111111
@@ -10,6 +10,8 @@
112112

113113
'use strict';
@@ -125,10 +125,10 @@ index eacc4be..d99209e 100644
125125

126126
/**
127127
* inlined Object.is polyfill to avoid requiring consumers ship their own
128-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js
128+
diff --git a/cjs/use-sync-external-store-with-selector.production.min.js b/cjs/use-sync-external-store-with-selector.production.min.js
129129
index 06bad1a..7ea7656 100644
130-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js
131-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js
130+
--- a/cjs/use-sync-external-store-with-selector.production.min.js
131+
+++ b/cjs/use-sync-external-store-with-selector.production.min.js
132132
@@ -7,6 +7,10 @@
133133
* This source code is licensed under the MIT license found in the
134134
* LICENSE file in the root directory of this source tree.
@@ -143,10 +143,10 @@ index 06bad1a..7ea7656 100644
143143
+ var c = r(null); if (null === c.current) { var f = { hasValue: !1, value: null }; c.current = f } else f = c.current; c = u(function () { function a(a) { if (!c) { c = !0; d = a; a = l(a); if (void 0 !== h && f.hasValue) { var b = f.value; if (h(b, a)) return k = b } return k = a } b = k; if (p(d, a)) return b; var e = l(a); if (void 0 !== h && h(b, e)) return b; d = a; return k = e } var c = !1, d, k, m = void 0 === e ? null : e; return [function () { return a(b()) }, null === m ? void 0 : function () { return a(m()) }] }, [b, e, l, h]); var d = q(a, c[0], c[1]);
144144
+ t(function () { f.hasValue = !0; f.value = d }, [d]); v(d); return d
145145
+};
146-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js
146+
diff --git a/cjs/use-sync-external-store.development.js b/cjs/use-sync-external-store.development.js
147147
index 82368bc..7d6ddb3 100644
148-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js
149-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js
148+
--- a/cjs/use-sync-external-store.development.js
149+
+++ b/cjs/use-sync-external-store.development.js
150150
@@ -10,6 +10,8 @@
151151

152152
'use strict';
@@ -164,10 +164,10 @@ index 82368bc..7d6ddb3 100644
164164

165165
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
166166

167-
diff --git a/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.min.js b/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.min.js
167+
diff --git a/cjs/use-sync-external-store.production.min.js b/cjs/use-sync-external-store.production.min.js
168168
index 8d684a6..927067e 100644
169-
--- a/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.min.js
170-
+++ b/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.min.js
169+
--- a/cjs/use-sync-external-store.production.min.js
170+
+++ b/cjs/use-sync-external-store.production.min.js
171171
@@ -7,4 +7,8 @@
172172
* This source code is licensed under the MIT license found in the
173173
* LICENSE file in the root directory of this source tree.

src/components/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const Designer: React.FC<ISTKProps> = (props) => {
1616
<>
1717
<div
1818
className={twMerge(
19-
"bg-white h-full min-h-[85vh] flex flex-col overflow-x-hidden",
19+
"bg-white text-black h-full min-h-[calc(100vh-32px)] flex flex-col overflow-x-hidden",
2020
props.styles?.root?.className
2121
)}
2222
style={props?.styles?.root?.properties}
@@ -41,7 +41,10 @@ const User: React.FC<ISTKProps> = (props) => {
4141
useUserEvents(props);
4242
return (
4343
<div
44-
className={twMerge("bg-white h-full min-h-[85vh] flex flex-col relative", props.styles?.root?.className)}
44+
className={twMerge(
45+
"bg-white text-black h-full min-h-screen flex flex-col relative",
46+
props.styles?.root?.className
47+
)}
4548
style={props?.styles?.root?.properties}
4649
>
4750
<Workspace {...props} />

src/components/workspace/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const Workspace: React.FC<ISTKProps> = (props) => {
5959
<div
6060
id={ids.workspaceContainer}
6161
className={twMerge(
62-
"w-full h-full flex flex-col flex-1 relative border border-b-0 border-black transition-all",
62+
"w-full flex flex-col flex-1 relative border border-b-0 border-black transition-all",
6363
initialized ? "opacity-100" : "opacity-0",
6464
props.styles?.workspace?.root?.className
6565
)}

0 commit comments

Comments
 (0)