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