Skip to content

Commit

Permalink
fix: update remove-css-imports regex to be more precise (#14)
Browse files Browse the repository at this point in the history
* fix: update remove-css-imports regex to be more precise

* fix: add aarchive styles on touch devices

* add changeset

* fix: default published packages to public
  • Loading branch information
connorlindsey authored Jan 17, 2024
1 parent 8988230 commit 8315372
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
6 changes: 6 additions & 0 deletions .changeset/new-balloons-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@knocklabs/react-core": patch
"@knocklabs/react": patch
---

Fix cjs build output for React components
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@
margin-left: auto;
color: var(--rnf-archive-notification-btn-bg-color);
padding: var(--rnf-spacing-1) var(--rnf-spacing-2);
transition: color 0.1s ease-in-out, opacity 0.2s ease-in-out;
transition:
color 0.1s ease-in-out,
opacity 0.2s ease-in-out;
}

.rnf-notification-cell:focus .rnf-archive-notification-btn,
Expand Down Expand Up @@ -228,3 +230,9 @@
.rnf-tooltip--dark {
background-color: #565a61;
}

@media screen and (hover: none) {
.rnf-archive-notification-btn {
opacity: 1;
}
}
2 changes: 1 addition & 1 deletion packages/react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default defineConfig(({ mode }) => {
if (file?.type === "chunk") {
// Replace .css imports and requires
const pattern =
/(import\s+['"].+\.css(\.mjs)?['"];?)|(require\(['"].+\.css(\.js)?['"]\);?)/;
/(import\s+['"].+\.css(\.mjs)?['"];?)|(require\(['"][^()]+\.css(\.js)?['"]\);?)/;
file.code = file.code.replace(pattern, "");
}
}
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6602,9 +6602,9 @@ ejs@^3.1.6:
jake "^10.8.5"

electron-to-chromium@^1.4.601:
version "1.4.632"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.632.tgz#df6253483b802eb83eee2fdc0e5067bd46f36f11"
integrity sha512-JGmudTwg7yxMYvR/gWbalqqQiyu7WTFv2Xu3vw4cJHXPFxNgAk0oy8UHaer8nLF4lZJa+rNoj6GsrKIVJTV6Tw==
version "1.4.633"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.633.tgz#df8831d2fef994fe9c013e61db6cfb98eeebf52d"
integrity sha512-7BvxzXrHFliyQ1oZc6NRMjyEaKOO1Ma1NY98sFZofogWlm+klLWSgrDw7EhatiMgi4R4NV+iWxDdxuIKXtPbOw==

emittery@^0.10.2:
version "0.10.2"
Expand Down

0 comments on commit 8315372

Please sign in to comment.