app-studio 0.7.16 → 0.7.17
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 +35 -4
- 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 +35 -4
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +35 -4
- 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/package.json +1 -1
|
@@ -2028,6 +2028,24 @@ function hash(str) {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
|
|
2030
2030
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2031
|
+
// Top-level CSS shorthands that reset a wide set of longhands on conflict.
|
|
2032
|
+
// Rules for these properties are injected into a stylesheet that appears
|
|
2033
|
+
// FIRST in the document, so longhand overrides written later in source order
|
|
2034
|
+
// win the cascade regardless of which element first instantiated each class.
|
|
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
|
+
// Sub-shorthands: reset some longhands but are themselves reset by tier-2.
|
|
2037
|
+
// Example: `border` resets `borderColor`; `borderColor` resets `borderTopColor`.
|
|
2038
|
+
const TIER3_SUB_SHORTHANDS = /*#__PURE__*/new Set(['borderTop', 'borderRight', 'borderBottom', 'borderLeft', 'borderColor', 'borderStyle', 'borderWidth', 'borderImage', 'flexFlow', 'overflowX', 'overflowY']);
|
|
2039
|
+
function baseContextForProperty(property) {
|
|
2040
|
+
if (TIER2_SHORTHANDS.has(property)) return 'base-shorthand';
|
|
2041
|
+
if (TIER3_SUB_SHORTHANDS.has(property)) return 'base-sub';
|
|
2042
|
+
return 'base';
|
|
2043
|
+
}
|
|
2044
|
+
function overrideContextForProperty(property) {
|
|
2045
|
+
if (TIER2_SHORTHANDS.has(property)) return 'override-shorthand';
|
|
2046
|
+
if (TIER3_SUB_SHORTHANDS.has(property)) return 'override-sub';
|
|
2047
|
+
return 'override';
|
|
2048
|
+
}
|
|
2031
2049
|
// Implement a simple LRU cache for classCache
|
|
2032
2050
|
class LRUCache {
|
|
2033
2051
|
constructor(maxSize) {
|
|
@@ -2269,11 +2287,20 @@ class UtilityClassManager {
|
|
|
2269
2287
|
if (!this.styleSheets.has(targetDocument)) {
|
|
2270
2288
|
const sheetMap = {};
|
|
2271
2289
|
// Initialize all style sheets at once
|
|
2290
|
+
// Order matters: <style> tags are appended to <head> in the order
|
|
2291
|
+
// listed here, and the cascade resolves equal-specificity rules by
|
|
2292
|
+
// source order. Earlier entries cascade FIRST (lower priority), so
|
|
2293
|
+
// top-level shorthands like `border` are listed before their
|
|
2294
|
+
// sub-shorthands and longhands.
|
|
2272
2295
|
const contextIds = {
|
|
2296
|
+
'base-shorthand': 'utility-classes-base-shorthand',
|
|
2297
|
+
'base-sub': 'utility-classes-base-sub',
|
|
2273
2298
|
base: 'utility-classes-base',
|
|
2274
2299
|
pseudo: 'utility-classes-pseudo',
|
|
2275
2300
|
media: 'utility-classes-media',
|
|
2276
2301
|
modifier: 'utility-classes-modifier',
|
|
2302
|
+
'override-shorthand': 'utility-classes-override-shorthand',
|
|
2303
|
+
'override-sub': 'utility-classes-override-sub',
|
|
2277
2304
|
override: 'utility-classes-override'
|
|
2278
2305
|
};
|
|
2279
2306
|
for (const [context, id] of Object.entries(contextIds)) {
|
|
@@ -2350,7 +2377,7 @@ class UtilityClassManager {
|
|
|
2350
2377
|
}
|
|
2351
2378
|
}
|
|
2352
2379
|
getServerStyles() {
|
|
2353
|
-
const contexts = ['base', 'pseudo', 'media', 'modifier', 'override'];
|
|
2380
|
+
const contexts = ['base-shorthand', 'base-sub', 'base', 'pseudo', 'media', 'modifier', 'override-shorthand', 'override-sub', 'override'];
|
|
2354
2381
|
let css = '';
|
|
2355
2382
|
contexts.forEach(context => {
|
|
2356
2383
|
const rules = this.serverRules.get(context);
|
|
@@ -2468,12 +2495,16 @@ class UtilityClassManager {
|
|
|
2468
2495
|
});
|
|
2469
2496
|
} else {
|
|
2470
2497
|
const escapedClassName = this.escapeClassName(baseClassName);
|
|
2471
|
-
// Add rules for all necessary vendor prefixes
|
|
2472
|
-
//
|
|
2498
|
+
// Add rules for all necessary vendor prefixes.
|
|
2499
|
+
// Route to a tiered sheet (shorthand → sub → longhand) within the
|
|
2500
|
+
// passed context (base or override), so shorthand properties cascade
|
|
2501
|
+
// BEFORE their longhands regardless of which element first
|
|
2502
|
+
// instantiated each utility class.
|
|
2503
|
+
const tier = context === 'override' ? overrideContextForProperty(property) : baseContextForProperty(property);
|
|
2473
2504
|
cssProperties.forEach(prefixedProperty => {
|
|
2474
2505
|
rules.push({
|
|
2475
2506
|
rule: `.${escapedClassName} { ${prefixedProperty}: ${valueForCss}; }`,
|
|
2476
|
-
context:
|
|
2507
|
+
context: tier
|
|
2477
2508
|
});
|
|
2478
2509
|
});
|
|
2479
2510
|
}
|
|
@@ -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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