@rokkit/themes 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/build.mjs +1 -5
  3. package/package.json +2 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jerry Thomas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/build.mjs CHANGED
@@ -118,7 +118,6 @@ function fixModeSelectors(css) {
118
118
  let i = 0
119
119
 
120
120
  while (i < css.length) {
121
- // Find next { (opening of a declarations block)
122
121
  const braceOpen = css.indexOf('{', i)
123
122
  if (braceOpen === -1) {
124
123
  result += css.slice(i)
@@ -127,9 +126,7 @@ function fixModeSelectors(css) {
127
126
 
128
127
  const selectorText = css.slice(i, braceOpen)
129
128
 
130
- // Only expand selectors that contain the problematic pattern
131
129
  if (modePattern.test(selectorText)) {
132
- // Split on comma, but only top-level commas (not inside :not(), :is(), etc.)
133
130
  const parts = splitTopLevelSelectors(selectorText)
134
131
  const expanded = []
135
132
 
@@ -140,7 +137,7 @@ function fixModeSelectors(css) {
140
137
  // Compound form: [data-mode="X"][data-style="Y"]rest (same-element match)
141
138
  expanded.push(`${ws}${modeSelector}${styleSelector}${rest}`)
142
139
  }
143
- // Always include original descendant form
140
+ // Always include original :is() form
144
141
  expanded.push(part)
145
142
  }
146
143
 
@@ -149,7 +146,6 @@ function fixModeSelectors(css) {
149
146
  result += selectorText + '{'
150
147
  }
151
148
 
152
- // Find the matching closing brace, handling nesting
153
149
  let depth = 1
154
150
  let j = braceOpen + 1
155
151
  while (j < css.length && depth > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/themes",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Theme styles for @rokkit/ui components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -212,7 +212,7 @@
212
212
  "build": "bun run build.mjs"
213
213
  },
214
214
  "dependencies": {
215
- "@rokkit/core": "1.0.2"
215
+ "@rokkit/core": "1.0.3"
216
216
  },
217
217
  "devDependencies": {
218
218
  "magic-string": "^0.30.21",