@octane-xplat/macos-renderer 0.10.0 → 0.11.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 +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -2
- package/src/intrinsics.d.ts +9 -0
package/README.md
CHANGED
|
@@ -164,7 +164,7 @@ Registration does not change the renderer default. Registered weights resolve
|
|
|
164
164
|
to the first face at or above the requested weight, or the heaviest face.
|
|
165
165
|
Invalid names, empty face lists, and missing descriptors or invalid weights are
|
|
166
166
|
rejected. The renderer does not read assets, register Geist automatically, or
|
|
167
|
-
write a font cache. The [harness font setup](../../apps/macos/src/fonts.
|
|
167
|
+
write a font cache. The [harness font setup](../../apps/macos/src/fonts.ts)
|
|
168
168
|
demonstrates app-owned descriptors and packaged font bytes.
|
|
169
169
|
|
|
170
170
|
```js
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1852,8 +1852,10 @@ function applyStyle(node: ElementNode, style: PropBag) {
|
|
|
1852
1852
|
inputTransparentViews.delete(node.view!)
|
|
1853
1853
|
}
|
|
1854
1854
|
} else if (name === 'objectFit' && node.type === 'image') {
|
|
1855
|
-
//
|
|
1856
|
-
|
|
1855
|
+
// NSImageScaling: 0 ProportionallyDown, 1 AxesIndependently,
|
|
1856
|
+
// 2 None (centered, unscaled), 3 ProportionallyUpOrDown.
|
|
1857
|
+
// AppKit has no cover mode — 'cover' degrades to scale-down.
|
|
1858
|
+
node.view!.imageScaling = { contain: 3, 'scale-down': 0, fill: 1, none: 2 }[value] ?? 0
|
|
1857
1859
|
} else if (name === 'fontSize' && ['label', 'textfield', 'textview'].includes(node.type)) {
|
|
1858
1860
|
const weight = style.fontWeight ?? node.appliedFontWeight ?? 400
|
|
1859
1861
|
node.appliedFontWeight = String(weight)
|
package/src/intrinsics.d.ts
CHANGED
|
@@ -7,11 +7,20 @@ export namespace JSX {
|
|
|
7
7
|
|
|
8
8
|
export interface HostProps {
|
|
9
9
|
id?: string
|
|
10
|
+
key?: string | number
|
|
11
|
+
ref?: unknown
|
|
10
12
|
className?: string
|
|
11
13
|
style?: Record<string, unknown>
|
|
12
14
|
children?: unknown
|
|
15
|
+
flexGrow?: number
|
|
16
|
+
textAlignment?: string
|
|
17
|
+
onTap?: (event?: any) => void
|
|
13
18
|
accessibilityLabel?: string
|
|
14
19
|
accessibilityRole?: string
|
|
20
|
+
accessibilityHint?: string
|
|
21
|
+
accessibilityValue?: string
|
|
22
|
+
accessibilityState?: Record<string, unknown>
|
|
23
|
+
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive'
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
export interface IntrinsicElements {
|