@tokenami/config 0.0.90 → 0.0.92

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/dist/index.cjs CHANGED
@@ -143,101 +143,98 @@ function* iterateAliasProperties(styleEntries, config) {
143
143
  }
144
144
  }
145
145
  var calcProperty = (property) => property + "__calc";
146
- var createLRUCache = (limit = 1500) => {
147
- return {
148
- limit,
149
- cache: /* @__PURE__ */ new Map(),
150
- get(key) {
151
- const value = this.cache.get(key);
152
- if (!value) return;
153
- this.cache.delete(key);
154
- this.cache.set(key, value);
155
- return value;
156
- },
157
- set(key, value) {
158
- this.cache.delete(key);
159
- if (this.cache.size === this.limit) this.cache.delete(this.cache.keys().next().value);
160
- this.cache.set(key, value);
161
- }
162
- };
163
- };
146
+ var createLRUCache = (limit = 1500) => ({
147
+ limit,
148
+ cache: /* @__PURE__ */ new Map(),
149
+ get(key) {
150
+ const value = this.cache.get(key);
151
+ if (!value) return;
152
+ this.cache.delete(key);
153
+ this.cache.set(key, value);
154
+ return value;
155
+ },
156
+ set(key, value) {
157
+ this.cache.delete(key);
158
+ if (this.cache.size === this.limit) this.cache.delete(this.cache.keys().next().value);
159
+ this.cache.set(key, value);
160
+ }
161
+ });
164
162
 
165
163
  // src/shorthands.ts
166
164
  var shorthandsToLonghands = [
167
165
  ["all", []],
168
- ["animation", ["&-name", "&-duration", "&-timing-function", "&-delay", "&-iteration-count", "&-direction", "&-fill-mode", "&-play-state", "&-timeline"]],
169
- ["background", ["&-attachment", "&-clip", "&-color", "&-image", "&-position", "&-repeat", "&-size"]],
170
- ["background-position", ["&-x", "&-y"]],
171
- ["border", ["&-top", "&-right", "&-bottom", "&-left", "&-color", "&-style", "&-width", "&-image", "&-block", "&-inline"]],
172
- ["border-top", ["&-width", "&-style", "&-color"]],
173
- ["border-right", ["&-width", "&-style", "&-color"]],
174
- ["border-bottom", ["&-width", "&-style", "&-color"]],
175
- ["border-left", ["&-width", "&-style", "&-color"]],
166
+ ["animation", ["~name", "~duration", "~timing-function", "~delay", "~iteration-count", "~direction", "~fill-mode", "~play-state", "~timeline"]],
167
+ ["background", ["~attachment", "~clip", "~color", "~image", "~position", "~repeat", "~size"]],
168
+ ["background-position", ["~x", "~y"]],
169
+ ["border", ["~top", "~right", "~bottom", "~left", "~color", "~style", "~width", "~image", "~block", "~inline"]],
170
+ ["border-top", ["~width", "~style", "~color"]],
171
+ ["border-right", ["~width", "~style", "~color"]],
172
+ ["border-bottom", ["~width", "~style", "~color"]],
173
+ ["border-left", ["~width", "~style", "~color"]],
176
174
  ["border-color", ["border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "border-inline-color", "border-block-color"]],
177
175
  ["border-style", ["border-top-style", "border-right-style", "border-bottom-style", "border-left-style", "border-inline-style", "border-block-style"]],
178
176
  ["border-width", ["border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-inline-width", "border-block-width"]],
179
- ["border-image", ["&-source", "&-slice", "&-width", "&-outset", "&-repeat"]],
177
+ ["border-image", ["~source", "~slice", "~width", "~outset", "~repeat"]],
180
178
  ["border-radius", ["border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius", "border-bottom-left-radius", "border-start-start-radius", "border-start-end-radius", "border-end-start-radius", "border-end-end-radius"]],
181
- ["border-block", ["&-width", "&-style", "&-color", "&-start", "&-end"]],
179
+ ["border-block", ["~width", "~style", "~color", "~start", "~end"]],
182
180
  ["border-block-width", ["border-block-start-width", "border-block-end-width"]],
183
181
  ["border-block-style", ["border-block-start-style", "border-block-end-style"]],
184
182
  ["border-block-color", ["border-block-start-color", "border-block-end-color"]],
185
- ["border-block-start", ["&-width", "&-style", "&-color"]],
186
- ["border-block-end", ["&-width", "&-style", "&-color"]],
187
- ["border-inline", ["&-width", "&-style", "&-color", "&-start", "&-end"]],
183
+ ["border-block-start", ["~width", "~style", "~color"]],
184
+ ["border-block-end", ["~width", "~style", "~color"]],
185
+ ["border-inline", ["~width", "~style", "~color", "~start", "~end"]],
188
186
  ["border-inline-width", ["border-inline-start-width", "border-inline-end-width"]],
189
187
  ["border-inline-style", ["border-inline-start-style", "border-inline-end-style"]],
190
188
  ["border-inline-color", ["border-inline-start-color", "border-inline-end-color"]],
191
- ["border-inline-start", ["&-width", "&-style", "&-color"]],
192
- ["border-inline-end", ["&-width", "&-style", "&-color"]],
193
- ["column-rule", ["&-width", "&-style", "&-color"]],
189
+ ["border-inline-start", ["~width", "~style", "~color"]],
190
+ ["border-inline-end", ["~width", "~style", "~color"]],
191
+ ["column-rule", ["~width", "~style", "~color"]],
194
192
  ["columns", ["column-width", "column-count"]],
195
- ["container", ["&-name", "&-type"]],
193
+ ["container", ["~name", "~type"]],
196
194
  ["contain-intrinsic-size", ["contain-intrinsic-width", "contain-intrinsic-height"]],
197
- ["flex", ["&-grow", "&-shrink", "&-basis"]],
195
+ ["flex", ["~grow", "~shrink", "~basis"]],
198
196
  ["flex-flow", ["flex-direction", "flex-wrap"]],
199
- ["font", ["&-style", "&-variant", "&-weight", "&-stretch", "&-size", "line-height", "&-family"]],
200
- ["font-variant", ["&-alternates", "&-caps", "&-east-asian", "&-emoji", "&-ligatures", "&-numeric", "&-position"]],
197
+ ["font", ["~style", "~variant", "~weight", "~stretch", "~size", "line-height", "~family"]],
198
+ ["font-variant", ["~alternates", "~caps", "~east-asian", "~emoji", "~ligatures", "~numeric", "~position"]],
201
199
  ["gap", ["row-gap", "column-gap"]],
202
- ["grid", ["&-auto-columns", "&-auto-flow", "&-auto-rows", "&-template-areas", "&-template-columns", "&-template-rows"]],
200
+ ["grid", ["~auto-columns", "~auto-flow", "~auto-rows", "~template-areas", "~template-columns", "~template-rows"]],
203
201
  ["grid-area", ["grid-row-start", "grid-column-start", "grid-row-end", "grid-column-end"]],
204
- ["grid-column", ["&-start", "&-end"]],
205
- ["grid-row", ["&-start", "&-end"]],
206
- ["grid-template", ["&-rows", "&-columns", "&-areas"]],
207
- ["inset", ["top", "right", "bottom", "left", "&-block", "&-inline"]],
208
- ["list-style", ["&-type", "&-position", "&-image"]],
209
- ["inset-block", ["&-start", "&-end"]],
210
- ["inset-inline", ["&-start", "&-end"]],
211
- ["margin", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
212
- ["margin-block", ["&-start", "&-end"]],
213
- ["margin-inline", ["&-start", "&-end"]],
214
- ["mask", ["&-image", "&-mode", "&-position", "&-size", "&-repeat", "&-origin", "&-clip", "&-composite", "&-type"]],
215
- ["mask-border", ["&-mode", "&-outset", "&-repeat", "&-slice", "&-source", "&-width"]],
216
- ["offset", ["&-position", "&-path", "&-distance", "&-anchor", "&-rotate"]],
217
- ["outline", ["&-color", "&-style", "&-width"]],
218
- ["overflow", ["&-x", "&-y", "&-block", "&-inline"]],
219
- ["overscroll-behavior", ["&-x", "&-y", "&-block", "&-inline"]],
220
- ["padding", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
221
- ["padding-block", ["&-start", "&-end"]],
222
- ["padding-inline", ["&-start", "&-end"]],
202
+ ["grid-column", ["~start", "~end"]],
203
+ ["grid-row", ["~start", "~end"]],
204
+ ["grid-template", ["~rows", "~columns", "~areas"]],
205
+ ["inset", ["top", "right", "bottom", "left", "~block", "~inline"]],
206
+ ["list-style", ["~type", "~position", "~image"]],
207
+ ["inset-block", ["~start", "~end"]],
208
+ ["inset-inline", ["~start", "~end"]],
209
+ ["margin", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
210
+ ["margin-block", ["~start", "~end"]],
211
+ ["margin-inline", ["~start", "~end"]],
212
+ ["mask", ["~image", "~mode", "~position", "~size", "~repeat", "~origin", "~clip", "~composite", "~type"]],
213
+ ["mask-border", ["~mode", "~outset", "~repeat", "~slice", "~source", "~width"]],
214
+ ["offset", ["~position", "~path", "~distance", "~anchor", "~rotate"]],
215
+ ["outline", ["~color", "~style", "~width"]],
216
+ ["overflow", ["~x", "~y", "~block", "~inline"]],
217
+ ["overscroll-behavior", ["~x", "~y", "~block", "~inline"]],
218
+ ["padding", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
219
+ ["padding-block", ["~start", "~end"]],
220
+ ["padding-inline", ["~start", "~end"]],
223
221
  ["place-content", ["align-content", "justify-content"]],
224
222
  ["place-items", ["align-items", "justify-items"]],
225
223
  ["place-self", ["align-self", "justify-self"]],
226
- ["scroll-margin", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
227
- ["scroll-margin-block", ["&-start", "&-end"]],
228
- ["scroll-margin-inline", ["&-start", "&-end"]],
229
- ["scroll-padding", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
230
- ["scroll-padding-block", ["&-start", "&-end"]],
231
- ["scroll-padding-inline", ["&-start", "&-end"]],
232
- ["scroll-timeline", ["&-name", "&-axis"]],
233
- ["text-decoration", ["&-line", "&-style", "&-color", "&-thickness"]],
234
- ["text-emphasis", ["&-style", "&-color"]],
235
- ["transition", ["&-delay", "&-duration", "&-property", "&-timing-function"]]
224
+ ["scroll-margin", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
225
+ ["scroll-margin-block", ["~start", "~end"]],
226
+ ["scroll-margin-inline", ["~start", "~end"]],
227
+ ["scroll-padding", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
228
+ ["scroll-padding-block", ["~start", "~end"]],
229
+ ["scroll-padding-inline", ["~start", "~end"]],
230
+ ["scroll-timeline", ["~name", "~axis"]],
231
+ ["text-decoration", ["~line", "~style", "~color", "~thickness"]],
232
+ ["text-emphasis", ["~style", "~color"]],
233
+ ["transition", ["~delay", "~duration", "~property", "~timing-function"]]
236
234
  ];
237
- var replacedAmpersands = shorthandsToLonghands.map(
238
- ([key, values]) => [key, values.map((value) => value.replace("&", key))]
235
+ var mapShorthandToLonghands = new Map(
236
+ shorthandsToLonghands.map(([k, v]) => [k, v.map((s) => s.replace("~", k + "-"))])
239
237
  );
240
- var mapShorthandToLonghands = new Map(replacedAmpersands);
241
238
 
242
239
  Object.defineProperty(exports, "hash", {
243
240
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -124,11 +124,11 @@ declare function iterateAliasProperties(styleEntries: [key: string, value: any][
124
124
  cssProperties: string[];
125
125
  }]>;
126
126
  declare const calcProperty: (property: string) => `--${string}`;
127
- declare const createLRUCache: (limit?: number) => {
127
+ declare const createLRUCache: <T = any>(limit?: number) => {
128
128
  limit: number;
129
129
  cache: Map<any, any>;
130
- get(key: string): any;
131
- set(key: string, value: any): void;
130
+ get(key: string): T | undefined;
131
+ set(key: string, value: T): void;
132
132
  };
133
133
 
134
134
  declare const mapShorthandToLonghands: Map<"flex" | "grid" | "all" | "border-block-color" | "border-block-style" | "border-block-width" | "border-inline-color" | "border-inline-style" | "border-inline-width" | "font-variant" | "animation" | "background" | "background-position" | "border" | "border-block" | "border-block-end" | "border-block-start" | "border-bottom" | "border-color" | "border-image" | "border-inline" | "border-inline-end" | "border-inline-start" | "border-left" | "border-radius" | "border-right" | "border-style" | "border-top" | "border-width" | "column-rule" | "columns" | "contain-intrinsic-size" | "container" | "flex-flow" | "font" | "gap" | "grid-area" | "grid-column" | "grid-row" | "grid-template" | "inset" | "inset-block" | "inset-inline" | "list-style" | "margin" | "margin-block" | "margin-inline" | "mask" | "mask-border" | "offset" | "outline" | "overflow" | "overscroll-behavior" | "padding" | "padding-block" | "padding-inline" | "place-content" | "place-items" | "place-self" | "scroll-margin" | "scroll-margin-block" | "scroll-margin-inline" | "scroll-padding" | "scroll-padding-block" | "scroll-padding-inline" | "scroll-timeline" | "text-decoration" | "text-emphasis" | "transition", string[]>;
package/dist/index.d.ts CHANGED
@@ -124,11 +124,11 @@ declare function iterateAliasProperties(styleEntries: [key: string, value: any][
124
124
  cssProperties: string[];
125
125
  }]>;
126
126
  declare const calcProperty: (property: string) => `--${string}`;
127
- declare const createLRUCache: (limit?: number) => {
127
+ declare const createLRUCache: <T = any>(limit?: number) => {
128
128
  limit: number;
129
129
  cache: Map<any, any>;
130
- get(key: string): any;
131
- set(key: string, value: any): void;
130
+ get(key: string): T | undefined;
131
+ set(key: string, value: T): void;
132
132
  };
133
133
 
134
134
  declare const mapShorthandToLonghands: Map<"flex" | "grid" | "all" | "border-block-color" | "border-block-style" | "border-block-width" | "border-inline-color" | "border-inline-style" | "border-inline-width" | "font-variant" | "animation" | "background" | "background-position" | "border" | "border-block" | "border-block-end" | "border-block-start" | "border-bottom" | "border-color" | "border-image" | "border-inline" | "border-inline-end" | "border-inline-start" | "border-left" | "border-radius" | "border-right" | "border-style" | "border-top" | "border-width" | "column-rule" | "columns" | "contain-intrinsic-size" | "container" | "flex-flow" | "font" | "gap" | "grid-area" | "grid-column" | "grid-row" | "grid-template" | "inset" | "inset-block" | "inset-inline" | "list-style" | "margin" | "margin-block" | "margin-inline" | "mask" | "mask-border" | "offset" | "outline" | "overflow" | "overscroll-behavior" | "padding" | "padding-block" | "padding-inline" | "place-content" | "place-items" | "place-self" | "scroll-margin" | "scroll-margin-block" | "scroll-margin-inline" | "scroll-padding" | "scroll-padding-block" | "scroll-padding-inline" | "scroll-timeline" | "text-decoration" | "text-emphasis" | "transition", string[]>;
package/dist/index.js CHANGED
@@ -138,100 +138,97 @@ function* iterateAliasProperties(styleEntries, config) {
138
138
  }
139
139
  }
140
140
  var calcProperty = (property) => property + "__calc";
141
- var createLRUCache = (limit = 1500) => {
142
- return {
143
- limit,
144
- cache: /* @__PURE__ */ new Map(),
145
- get(key) {
146
- const value = this.cache.get(key);
147
- if (!value) return;
148
- this.cache.delete(key);
149
- this.cache.set(key, value);
150
- return value;
151
- },
152
- set(key, value) {
153
- this.cache.delete(key);
154
- if (this.cache.size === this.limit) this.cache.delete(this.cache.keys().next().value);
155
- this.cache.set(key, value);
156
- }
157
- };
158
- };
141
+ var createLRUCache = (limit = 1500) => ({
142
+ limit,
143
+ cache: /* @__PURE__ */ new Map(),
144
+ get(key) {
145
+ const value = this.cache.get(key);
146
+ if (!value) return;
147
+ this.cache.delete(key);
148
+ this.cache.set(key, value);
149
+ return value;
150
+ },
151
+ set(key, value) {
152
+ this.cache.delete(key);
153
+ if (this.cache.size === this.limit) this.cache.delete(this.cache.keys().next().value);
154
+ this.cache.set(key, value);
155
+ }
156
+ });
159
157
 
160
158
  // src/shorthands.ts
161
159
  var shorthandsToLonghands = [
162
160
  ["all", []],
163
- ["animation", ["&-name", "&-duration", "&-timing-function", "&-delay", "&-iteration-count", "&-direction", "&-fill-mode", "&-play-state", "&-timeline"]],
164
- ["background", ["&-attachment", "&-clip", "&-color", "&-image", "&-position", "&-repeat", "&-size"]],
165
- ["background-position", ["&-x", "&-y"]],
166
- ["border", ["&-top", "&-right", "&-bottom", "&-left", "&-color", "&-style", "&-width", "&-image", "&-block", "&-inline"]],
167
- ["border-top", ["&-width", "&-style", "&-color"]],
168
- ["border-right", ["&-width", "&-style", "&-color"]],
169
- ["border-bottom", ["&-width", "&-style", "&-color"]],
170
- ["border-left", ["&-width", "&-style", "&-color"]],
161
+ ["animation", ["~name", "~duration", "~timing-function", "~delay", "~iteration-count", "~direction", "~fill-mode", "~play-state", "~timeline"]],
162
+ ["background", ["~attachment", "~clip", "~color", "~image", "~position", "~repeat", "~size"]],
163
+ ["background-position", ["~x", "~y"]],
164
+ ["border", ["~top", "~right", "~bottom", "~left", "~color", "~style", "~width", "~image", "~block", "~inline"]],
165
+ ["border-top", ["~width", "~style", "~color"]],
166
+ ["border-right", ["~width", "~style", "~color"]],
167
+ ["border-bottom", ["~width", "~style", "~color"]],
168
+ ["border-left", ["~width", "~style", "~color"]],
171
169
  ["border-color", ["border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "border-inline-color", "border-block-color"]],
172
170
  ["border-style", ["border-top-style", "border-right-style", "border-bottom-style", "border-left-style", "border-inline-style", "border-block-style"]],
173
171
  ["border-width", ["border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-inline-width", "border-block-width"]],
174
- ["border-image", ["&-source", "&-slice", "&-width", "&-outset", "&-repeat"]],
172
+ ["border-image", ["~source", "~slice", "~width", "~outset", "~repeat"]],
175
173
  ["border-radius", ["border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius", "border-bottom-left-radius", "border-start-start-radius", "border-start-end-radius", "border-end-start-radius", "border-end-end-radius"]],
176
- ["border-block", ["&-width", "&-style", "&-color", "&-start", "&-end"]],
174
+ ["border-block", ["~width", "~style", "~color", "~start", "~end"]],
177
175
  ["border-block-width", ["border-block-start-width", "border-block-end-width"]],
178
176
  ["border-block-style", ["border-block-start-style", "border-block-end-style"]],
179
177
  ["border-block-color", ["border-block-start-color", "border-block-end-color"]],
180
- ["border-block-start", ["&-width", "&-style", "&-color"]],
181
- ["border-block-end", ["&-width", "&-style", "&-color"]],
182
- ["border-inline", ["&-width", "&-style", "&-color", "&-start", "&-end"]],
178
+ ["border-block-start", ["~width", "~style", "~color"]],
179
+ ["border-block-end", ["~width", "~style", "~color"]],
180
+ ["border-inline", ["~width", "~style", "~color", "~start", "~end"]],
183
181
  ["border-inline-width", ["border-inline-start-width", "border-inline-end-width"]],
184
182
  ["border-inline-style", ["border-inline-start-style", "border-inline-end-style"]],
185
183
  ["border-inline-color", ["border-inline-start-color", "border-inline-end-color"]],
186
- ["border-inline-start", ["&-width", "&-style", "&-color"]],
187
- ["border-inline-end", ["&-width", "&-style", "&-color"]],
188
- ["column-rule", ["&-width", "&-style", "&-color"]],
184
+ ["border-inline-start", ["~width", "~style", "~color"]],
185
+ ["border-inline-end", ["~width", "~style", "~color"]],
186
+ ["column-rule", ["~width", "~style", "~color"]],
189
187
  ["columns", ["column-width", "column-count"]],
190
- ["container", ["&-name", "&-type"]],
188
+ ["container", ["~name", "~type"]],
191
189
  ["contain-intrinsic-size", ["contain-intrinsic-width", "contain-intrinsic-height"]],
192
- ["flex", ["&-grow", "&-shrink", "&-basis"]],
190
+ ["flex", ["~grow", "~shrink", "~basis"]],
193
191
  ["flex-flow", ["flex-direction", "flex-wrap"]],
194
- ["font", ["&-style", "&-variant", "&-weight", "&-stretch", "&-size", "line-height", "&-family"]],
195
- ["font-variant", ["&-alternates", "&-caps", "&-east-asian", "&-emoji", "&-ligatures", "&-numeric", "&-position"]],
192
+ ["font", ["~style", "~variant", "~weight", "~stretch", "~size", "line-height", "~family"]],
193
+ ["font-variant", ["~alternates", "~caps", "~east-asian", "~emoji", "~ligatures", "~numeric", "~position"]],
196
194
  ["gap", ["row-gap", "column-gap"]],
197
- ["grid", ["&-auto-columns", "&-auto-flow", "&-auto-rows", "&-template-areas", "&-template-columns", "&-template-rows"]],
195
+ ["grid", ["~auto-columns", "~auto-flow", "~auto-rows", "~template-areas", "~template-columns", "~template-rows"]],
198
196
  ["grid-area", ["grid-row-start", "grid-column-start", "grid-row-end", "grid-column-end"]],
199
- ["grid-column", ["&-start", "&-end"]],
200
- ["grid-row", ["&-start", "&-end"]],
201
- ["grid-template", ["&-rows", "&-columns", "&-areas"]],
202
- ["inset", ["top", "right", "bottom", "left", "&-block", "&-inline"]],
203
- ["list-style", ["&-type", "&-position", "&-image"]],
204
- ["inset-block", ["&-start", "&-end"]],
205
- ["inset-inline", ["&-start", "&-end"]],
206
- ["margin", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
207
- ["margin-block", ["&-start", "&-end"]],
208
- ["margin-inline", ["&-start", "&-end"]],
209
- ["mask", ["&-image", "&-mode", "&-position", "&-size", "&-repeat", "&-origin", "&-clip", "&-composite", "&-type"]],
210
- ["mask-border", ["&-mode", "&-outset", "&-repeat", "&-slice", "&-source", "&-width"]],
211
- ["offset", ["&-position", "&-path", "&-distance", "&-anchor", "&-rotate"]],
212
- ["outline", ["&-color", "&-style", "&-width"]],
213
- ["overflow", ["&-x", "&-y", "&-block", "&-inline"]],
214
- ["overscroll-behavior", ["&-x", "&-y", "&-block", "&-inline"]],
215
- ["padding", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
216
- ["padding-block", ["&-start", "&-end"]],
217
- ["padding-inline", ["&-start", "&-end"]],
197
+ ["grid-column", ["~start", "~end"]],
198
+ ["grid-row", ["~start", "~end"]],
199
+ ["grid-template", ["~rows", "~columns", "~areas"]],
200
+ ["inset", ["top", "right", "bottom", "left", "~block", "~inline"]],
201
+ ["list-style", ["~type", "~position", "~image"]],
202
+ ["inset-block", ["~start", "~end"]],
203
+ ["inset-inline", ["~start", "~end"]],
204
+ ["margin", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
205
+ ["margin-block", ["~start", "~end"]],
206
+ ["margin-inline", ["~start", "~end"]],
207
+ ["mask", ["~image", "~mode", "~position", "~size", "~repeat", "~origin", "~clip", "~composite", "~type"]],
208
+ ["mask-border", ["~mode", "~outset", "~repeat", "~slice", "~source", "~width"]],
209
+ ["offset", ["~position", "~path", "~distance", "~anchor", "~rotate"]],
210
+ ["outline", ["~color", "~style", "~width"]],
211
+ ["overflow", ["~x", "~y", "~block", "~inline"]],
212
+ ["overscroll-behavior", ["~x", "~y", "~block", "~inline"]],
213
+ ["padding", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
214
+ ["padding-block", ["~start", "~end"]],
215
+ ["padding-inline", ["~start", "~end"]],
218
216
  ["place-content", ["align-content", "justify-content"]],
219
217
  ["place-items", ["align-items", "justify-items"]],
220
218
  ["place-self", ["align-self", "justify-self"]],
221
- ["scroll-margin", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
222
- ["scroll-margin-block", ["&-start", "&-end"]],
223
- ["scroll-margin-inline", ["&-start", "&-end"]],
224
- ["scroll-padding", ["&-top", "&-right", "&-bottom", "&-left", "&-block", "&-inline"]],
225
- ["scroll-padding-block", ["&-start", "&-end"]],
226
- ["scroll-padding-inline", ["&-start", "&-end"]],
227
- ["scroll-timeline", ["&-name", "&-axis"]],
228
- ["text-decoration", ["&-line", "&-style", "&-color", "&-thickness"]],
229
- ["text-emphasis", ["&-style", "&-color"]],
230
- ["transition", ["&-delay", "&-duration", "&-property", "&-timing-function"]]
219
+ ["scroll-margin", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
220
+ ["scroll-margin-block", ["~start", "~end"]],
221
+ ["scroll-margin-inline", ["~start", "~end"]],
222
+ ["scroll-padding", ["~top", "~right", "~bottom", "~left", "~block", "~inline"]],
223
+ ["scroll-padding-block", ["~start", "~end"]],
224
+ ["scroll-padding-inline", ["~start", "~end"]],
225
+ ["scroll-timeline", ["~name", "~axis"]],
226
+ ["text-decoration", ["~line", "~style", "~color", "~thickness"]],
227
+ ["text-emphasis", ["~style", "~color"]],
228
+ ["transition", ["~delay", "~duration", "~property", "~timing-function"]]
231
229
  ];
232
- var replacedAmpersands = shorthandsToLonghands.map(
233
- ([key, values]) => [key, values.map((value) => value.replace("&", key))]
230
+ var mapShorthandToLonghands = new Map(
231
+ shorthandsToLonghands.map(([k, v]) => [k, v.map((s) => s.replace("~", k + "-"))])
234
232
  );
235
- var mapShorthandToLonghands = new Map(replacedAmpersands);
236
233
 
237
234
  export { ArbitraryValue, GridProperty, GridValue, TokenProperty, TokenValue, VariantProperty, arbitraryValue, calcProperty, createConfig, createLRUCache, createLonghandProperty, generateClassName, getArbitrarySelector, getCSSPropertiesForAlias, getTokenPropertyName, getTokenPropertyParts, getTokenPropertySplit, getTokenValueParts, gridProperty, iterateAliasProperties, mapShorthandToLonghands, parseProperty, parsedTokenProperty, parsedVariantProperty, stringifyProperty, tokenProperty, tokenValue, variantProperty };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenami/config",
3
- "version": "0.0.90",
3
+ "version": "0.0.92",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -39,5 +39,5 @@
39
39
  "tsup": "^8.4.0",
40
40
  "typescript": "^5.1.3"
41
41
  },
42
- "gitHead": "d6e7dfc673263649634b95ef9c422b845d53f584"
42
+ "gitHead": "377394b4ba58a7084ce5746ae635eac3de04170d"
43
43
  }