app-studio 0.7.17 → 0.7.18
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/app-studio.cjs.development.js +20 -8
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +1 -1
- package/dist/app-studio.esm.js +20 -8
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +20 -8
- package/dist/app-studio.umd.development.js.map +1 -1
- package/dist/app-studio.umd.production.min.js +1 -1
- package/dist/element/css.d.ts +2 -2
- package/dist/stories/CssCascadeOrder.stories.d.ts +10 -0
- package/package.json +1 -1
|
@@ -2033,17 +2033,27 @@ function hash(str) {
|
|
|
2033
2033
|
// FIRST in the document, so longhand overrides written later in source order
|
|
2034
2034
|
// win the cascade regardless of which element first instantiated each class.
|
|
2035
2035
|
const TIER2_SHORTHANDS = /*#__PURE__*/new Set(['all', 'background', 'border', 'borderRadius', 'font', 'margin', 'padding', 'animation', 'transition', 'flex', 'grid', 'gridTemplate', 'gridArea', 'outline', 'inset', 'gap', 'gridGap', 'listStyle', 'textDecoration', 'placeItems', 'placeContent', 'placeSelf', 'overflow', 'mask', 'columns', 'columnRule']);
|
|
2036
|
-
//
|
|
2037
|
-
// Example: `
|
|
2038
|
-
|
|
2036
|
+
// Side-shorthands: target a single side of the box and override tier-2
|
|
2037
|
+
// shorthands for that side. Example: `borderTop` overrides the top piece of
|
|
2038
|
+
// `border`. They MUST cascade before tier-4 cross-property shorthands so
|
|
2039
|
+
// that `borderColor` wins the per-side color slot when both are written.
|
|
2040
|
+
const TIER3_SIDE_SHORTHANDS = /*#__PURE__*/new Set(['borderTop', 'borderRight', 'borderBottom', 'borderLeft']);
|
|
2041
|
+
// Cross-property shorthands: span all sides for one CSS property and reset
|
|
2042
|
+
// the per-side longhands. Example: `borderColor` resets all four
|
|
2043
|
+
// `border-*-color` longhands. These intersect with side-shorthands at
|
|
2044
|
+
// `border-{side}-{prop}` (e.g. `border-top-color`), so they must cascade
|
|
2045
|
+
// AFTER side-shorthands to win that intersection.
|
|
2046
|
+
const TIER4_CROSS_SHORTHANDS = /*#__PURE__*/new Set(['borderColor', 'borderStyle', 'borderWidth', 'borderImage']);
|
|
2039
2047
|
function baseContextForProperty(property) {
|
|
2040
2048
|
if (TIER2_SHORTHANDS.has(property)) return 'base-shorthand';
|
|
2041
|
-
if (
|
|
2049
|
+
if (TIER3_SIDE_SHORTHANDS.has(property)) return 'base-side';
|
|
2050
|
+
if (TIER4_CROSS_SHORTHANDS.has(property)) return 'base-cross';
|
|
2042
2051
|
return 'base';
|
|
2043
2052
|
}
|
|
2044
2053
|
function overrideContextForProperty(property) {
|
|
2045
2054
|
if (TIER2_SHORTHANDS.has(property)) return 'override-shorthand';
|
|
2046
|
-
if (
|
|
2055
|
+
if (TIER3_SIDE_SHORTHANDS.has(property)) return 'override-side';
|
|
2056
|
+
if (TIER4_CROSS_SHORTHANDS.has(property)) return 'override-cross';
|
|
2047
2057
|
return 'override';
|
|
2048
2058
|
}
|
|
2049
2059
|
// Implement a simple LRU cache for classCache
|
|
@@ -2294,13 +2304,15 @@ class UtilityClassManager {
|
|
|
2294
2304
|
// sub-shorthands and longhands.
|
|
2295
2305
|
const contextIds = {
|
|
2296
2306
|
'base-shorthand': 'utility-classes-base-shorthand',
|
|
2297
|
-
'base-
|
|
2307
|
+
'base-side': 'utility-classes-base-side',
|
|
2308
|
+
'base-cross': 'utility-classes-base-cross',
|
|
2298
2309
|
base: 'utility-classes-base',
|
|
2299
2310
|
pseudo: 'utility-classes-pseudo',
|
|
2300
2311
|
media: 'utility-classes-media',
|
|
2301
2312
|
modifier: 'utility-classes-modifier',
|
|
2302
2313
|
'override-shorthand': 'utility-classes-override-shorthand',
|
|
2303
|
-
'override-
|
|
2314
|
+
'override-side': 'utility-classes-override-side',
|
|
2315
|
+
'override-cross': 'utility-classes-override-cross',
|
|
2304
2316
|
override: 'utility-classes-override'
|
|
2305
2317
|
};
|
|
2306
2318
|
for (const [context, id] of Object.entries(contextIds)) {
|
|
@@ -2377,7 +2389,7 @@ class UtilityClassManager {
|
|
|
2377
2389
|
}
|
|
2378
2390
|
}
|
|
2379
2391
|
getServerStyles() {
|
|
2380
|
-
const contexts = ['base-shorthand', 'base-
|
|
2392
|
+
const contexts = ['base-shorthand', 'base-side', 'base-cross', 'base', 'pseudo', 'media', 'modifier', 'override-shorthand', 'override-side', 'override-cross', 'override'];
|
|
2381
2393
|
let css = '';
|
|
2382
2394
|
contexts.forEach(context => {
|
|
2383
2395
|
const rules = this.serverRules.get(context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-studio.cjs.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-studio.cjs.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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