@swiftbrowser/web 0.3.1 → 0.5.0
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/README.md +4 -1
- package/app/index.html +1 -0
- package/package.json +5 -2
- package/src/animation.ts +154 -3
- package/src/dragDrop.ts +549 -0
- package/src/hostContent.ts +37 -0
- package/src/interaction.ts +128 -22
- package/src/largeTitle.ts +98 -54
- package/src/layout/engine.ts +582 -135
- package/src/layout/index.ts +8 -5
- package/src/layout/measure.ts +2 -0
- package/src/layout/text.ts +6 -3
- package/src/layout/types.ts +16 -1
- package/src/layout/typography.ts +30 -10
- package/src/layoutDom.ts +87 -16
- package/src/page.css +234 -0
- package/src/pointerEffects.ts +182 -0
- package/src/protocol.ts +219 -9
- package/src/renderer.ts +355 -15
- package/src/scrollEdge.ts +109 -0
- package/src/scrollTo.ts +6 -0
- package/src/styles.css +457 -251
- package/src/symbols.ts +3 -1
- package/src/typography.ts +5 -2
package/src/symbols.ts
CHANGED
|
@@ -215,6 +215,7 @@ import {
|
|
|
215
215
|
Link2,
|
|
216
216
|
List,
|
|
217
217
|
ListChecks,
|
|
218
|
+
ListFilter,
|
|
218
219
|
ListIndentIncrease,
|
|
219
220
|
ListMusic,
|
|
220
221
|
ListOrdered,
|
|
@@ -571,7 +572,8 @@ export const SF_SYMBOLS: Readonly<Record<string, SymbolGlyph>> = {
|
|
|
571
572
|
'tag.fill': solid(Tag),
|
|
572
573
|
textformat: outline(CaseSensitive),
|
|
573
574
|
'line.3.horizontal': outline(Menu),
|
|
574
|
-
|
|
575
|
+
// Three lines, each shorter than the one above.
|
|
576
|
+
'line.3.horizontal.decrease': outline(ListFilter),
|
|
575
577
|
'line.3.horizontal.decrease.circle': outline(Funnel),
|
|
576
578
|
'slider.horizontal.3': outline(SlidersHorizontal),
|
|
577
579
|
'list.bullet': outline(List),
|
package/src/typography.ts
CHANGED
|
@@ -22,7 +22,10 @@ export {
|
|
|
22
22
|
DYNAMIC_TYPE_SIZES,
|
|
23
23
|
FONT_FAMILIES,
|
|
24
24
|
FONT_WEIGHTS,
|
|
25
|
-
|
|
25
|
+
LINE_HEIGHT_RATIO,
|
|
26
|
+
LEADINGS,
|
|
27
|
+
leadingFor,
|
|
28
|
+
textHeight,
|
|
26
29
|
TEXT_STYLE_SIZES,
|
|
27
30
|
defaultFont,
|
|
28
31
|
lineHeightFor,
|
|
@@ -70,7 +73,7 @@ export function applyTypeSizeVariables(target: HTMLElement, size: DynamicTypeSiz
|
|
|
70
73
|
for (const style of TEXT_STYLES) {
|
|
71
74
|
const { fontSize, lineHeight } = resolveTextStyle(style, size);
|
|
72
75
|
target.style.setProperty(textStyleVar(style, 'size'), `${fontSize}px`);
|
|
73
|
-
target.style.setProperty(textStyleVar(style, 'lh'), `${lineHeight}px`);
|
|
76
|
+
target.style.setProperty(textStyleVar(style, 'lh'), `${Math.round(lineHeight * 100) / 100}px`);
|
|
74
77
|
target.style.setProperty(`--sb-ts-${style}-scale`, String(relativeScale(style, size)));
|
|
75
78
|
}
|
|
76
79
|
}
|