@react-three/fiber 8.0.8 → 8.0.11
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/CHANGELOG.md +18 -0
- package/dist/declarations/src/core/events.d.ts +69 -69
- package/dist/declarations/src/core/hooks.d.ts +21 -21
- package/dist/declarations/src/core/index.d.ts +60 -56
- package/dist/declarations/src/core/loop.d.ts +13 -13
- package/dist/declarations/src/core/renderer.d.ts +51 -51
- package/dist/declarations/src/core/store.d.ts +92 -91
- package/dist/declarations/src/core/utils.d.ts +80 -83
- package/dist/declarations/src/index.d.ts +10 -10
- package/dist/declarations/src/native/Canvas.d.ts +8 -8
- package/dist/declarations/src/native/events.d.ts +4 -4
- package/dist/declarations/src/native.d.ts +10 -10
- package/dist/declarations/src/three-types.d.ts +327 -327
- package/dist/declarations/src/web/Canvas.d.ts +9 -9
- package/dist/declarations/src/web/events.d.ts +4 -4
- package/dist/{index-548cf96a.esm.js → index-3c7aae97.esm.js} +84 -66
- package/dist/{index-c4e0ac66.cjs.prod.js → index-e936c560.cjs.prod.js} +84 -68
- package/dist/{index-b8ee55f0.cjs.dev.js → index-f7939a95.cjs.dev.js} +84 -68
- package/dist/react-three-fiber.cjs.dev.js +40 -21
- package/dist/react-three-fiber.cjs.prod.js +40 -21
- package/dist/react-three-fiber.esm.js +41 -22
- package/native/dist/react-three-fiber-native.cjs.dev.js +50 -34
- package/native/dist/react-three-fiber-native.cjs.prod.js +50 -34
- package/native/dist/react-three-fiber-native.esm.js +51 -35
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var THREE = require('three');
|
|
6
6
|
var expoAsset = require('expo-asset');
|
|
7
|
-
var index = require('../../dist/index-
|
|
7
|
+
var index = require('../../dist/index-f7939a95.cjs.dev.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var mergeRefs = require('react-merge-refs');
|
|
@@ -127,23 +127,32 @@ function createTouchEvents(store) {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
131
130
|
/**
|
|
132
131
|
* A native canvas which accepts threejs elements as children.
|
|
133
132
|
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
134
133
|
*/
|
|
135
|
-
|
|
136
134
|
const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
137
135
|
children,
|
|
138
136
|
style,
|
|
139
|
-
|
|
137
|
+
gl,
|
|
138
|
+
events = createTouchEvents,
|
|
139
|
+
shadows,
|
|
140
|
+
linear,
|
|
141
|
+
flat,
|
|
142
|
+
legacy,
|
|
143
|
+
orthographic,
|
|
144
|
+
frameloop,
|
|
145
|
+
performance,
|
|
146
|
+
raycaster,
|
|
147
|
+
camera,
|
|
148
|
+
onPointerMissed,
|
|
149
|
+
onCreated,
|
|
140
150
|
...props
|
|
141
151
|
}, forwardedRef) => {
|
|
142
152
|
// Create a known catalogue of Threejs-native elements
|
|
143
153
|
// This will include the entire THREE namespace by default, users can extend
|
|
144
154
|
// their own elements by using the createRoot API instead
|
|
145
155
|
React__namespace.useMemo(() => index.extend(THREE__namespace), []);
|
|
146
|
-
const onPointerMissed = index.useMemoizedFn(props.onPointerMissed);
|
|
147
156
|
const [{
|
|
148
157
|
width,
|
|
149
158
|
height
|
|
@@ -153,12 +162,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
153
162
|
});
|
|
154
163
|
const [canvas, setCanvas] = React__namespace.useState(null);
|
|
155
164
|
const [bind, setBind] = React__namespace.useState();
|
|
156
|
-
const
|
|
157
|
-
onPointerMissed
|
|
158
|
-
}, CANVAS_PROPS);
|
|
159
|
-
const viewProps = index.omit({ ...props,
|
|
160
|
-
onPointerMissed
|
|
161
|
-
}, CANVAS_PROPS);
|
|
165
|
+
const handlePointerMissed = index.useMutableCallback(onPointerMissed);
|
|
162
166
|
const [block, setBlock] = React__namespace.useState(false);
|
|
163
167
|
const [error, setError] = React__namespace.useState(false); // Suspend this component if block is a promise (2nd run)
|
|
164
168
|
|
|
@@ -191,25 +195,19 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
191
195
|
}, []);
|
|
192
196
|
|
|
193
197
|
if (width > 0 && height > 0 && canvas) {
|
|
194
|
-
if (!root.current) root.current = index.createRoot(canvas);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
return canvasProps == null ? void 0 : canvasProps.onCreated == null ? void 0 : canvasProps.onCreated(state);
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
root.current.configure({ ...canvasProps,
|
|
198
|
+
if (!root.current) root.current = index.createRoot(canvas);
|
|
199
|
+
root.current.configure({
|
|
200
|
+
gl,
|
|
201
|
+
events,
|
|
202
|
+
shadows,
|
|
203
|
+
linear,
|
|
204
|
+
flat,
|
|
205
|
+
legacy,
|
|
206
|
+
orthographic,
|
|
207
|
+
frameloop,
|
|
208
|
+
performance,
|
|
209
|
+
raycaster,
|
|
210
|
+
camera,
|
|
213
211
|
// expo-gl can only render at native dpr/resolution
|
|
214
212
|
// https://github.com/expo/expo-three/issues/39
|
|
215
213
|
dpr: reactNative.PixelRatio.get(),
|
|
@@ -217,8 +215,24 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
217
215
|
width,
|
|
218
216
|
height
|
|
219
217
|
},
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
// Pass mutable reference to onPointerMissed so it's free to update
|
|
219
|
+
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
220
|
+
// Overwrite onCreated to apply RN bindings
|
|
221
|
+
onCreated: state => {
|
|
222
|
+
// Bind events after creation
|
|
223
|
+
const handlers = state.events.connect == null ? void 0 : state.events.connect(viewRef.current);
|
|
224
|
+
setBind(handlers); // Bind render to RN bridge
|
|
225
|
+
|
|
226
|
+
const context = state.gl.getContext();
|
|
227
|
+
const renderFrame = state.gl.render.bind(state.gl);
|
|
228
|
+
|
|
229
|
+
state.gl.render = (scene, camera) => {
|
|
230
|
+
renderFrame(scene, camera);
|
|
231
|
+
context.endFrameEXP();
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
return onCreated == null ? void 0 : onCreated(state);
|
|
235
|
+
}
|
|
222
236
|
});
|
|
223
237
|
root.current.render( /*#__PURE__*/React__namespace.createElement(index.ErrorBoundary, {
|
|
224
238
|
set: setError
|
|
@@ -230,9 +244,11 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
230
244
|
}
|
|
231
245
|
|
|
232
246
|
React__namespace.useEffect(() => {
|
|
233
|
-
|
|
247
|
+
if (canvas) {
|
|
248
|
+
return () => index.unmountComponentAtNode(canvas);
|
|
249
|
+
}
|
|
234
250
|
}, [canvas]);
|
|
235
|
-
return /*#__PURE__*/React__namespace.createElement(reactNative.View, _extends({},
|
|
251
|
+
return /*#__PURE__*/React__namespace.createElement(reactNative.View, _extends({}, props, {
|
|
236
252
|
ref: mergeRefs__default['default']([viewRef, forwardedRef]),
|
|
237
253
|
onLayout: onLayout,
|
|
238
254
|
style: {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var THREE = require('three');
|
|
6
6
|
var expoAsset = require('expo-asset');
|
|
7
|
-
var index = require('../../dist/index-
|
|
7
|
+
var index = require('../../dist/index-e936c560.cjs.prod.js');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var mergeRefs = require('react-merge-refs');
|
|
@@ -127,23 +127,32 @@ function createTouchEvents(store) {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
131
130
|
/**
|
|
132
131
|
* A native canvas which accepts threejs elements as children.
|
|
133
132
|
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
134
133
|
*/
|
|
135
|
-
|
|
136
134
|
const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
137
135
|
children,
|
|
138
136
|
style,
|
|
139
|
-
|
|
137
|
+
gl,
|
|
138
|
+
events = createTouchEvents,
|
|
139
|
+
shadows,
|
|
140
|
+
linear,
|
|
141
|
+
flat,
|
|
142
|
+
legacy,
|
|
143
|
+
orthographic,
|
|
144
|
+
frameloop,
|
|
145
|
+
performance,
|
|
146
|
+
raycaster,
|
|
147
|
+
camera,
|
|
148
|
+
onPointerMissed,
|
|
149
|
+
onCreated,
|
|
140
150
|
...props
|
|
141
151
|
}, forwardedRef) => {
|
|
142
152
|
// Create a known catalogue of Threejs-native elements
|
|
143
153
|
// This will include the entire THREE namespace by default, users can extend
|
|
144
154
|
// their own elements by using the createRoot API instead
|
|
145
155
|
React__namespace.useMemo(() => index.extend(THREE__namespace), []);
|
|
146
|
-
const onPointerMissed = index.useMemoizedFn(props.onPointerMissed);
|
|
147
156
|
const [{
|
|
148
157
|
width,
|
|
149
158
|
height
|
|
@@ -153,12 +162,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
153
162
|
});
|
|
154
163
|
const [canvas, setCanvas] = React__namespace.useState(null);
|
|
155
164
|
const [bind, setBind] = React__namespace.useState();
|
|
156
|
-
const
|
|
157
|
-
onPointerMissed
|
|
158
|
-
}, CANVAS_PROPS);
|
|
159
|
-
const viewProps = index.omit({ ...props,
|
|
160
|
-
onPointerMissed
|
|
161
|
-
}, CANVAS_PROPS);
|
|
165
|
+
const handlePointerMissed = index.useMutableCallback(onPointerMissed);
|
|
162
166
|
const [block, setBlock] = React__namespace.useState(false);
|
|
163
167
|
const [error, setError] = React__namespace.useState(false); // Suspend this component if block is a promise (2nd run)
|
|
164
168
|
|
|
@@ -191,25 +195,19 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
191
195
|
}, []);
|
|
192
196
|
|
|
193
197
|
if (width > 0 && height > 0 && canvas) {
|
|
194
|
-
if (!root.current) root.current = index.createRoot(canvas);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
return canvasProps == null ? void 0 : canvasProps.onCreated == null ? void 0 : canvasProps.onCreated(state);
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
root.current.configure({ ...canvasProps,
|
|
198
|
+
if (!root.current) root.current = index.createRoot(canvas);
|
|
199
|
+
root.current.configure({
|
|
200
|
+
gl,
|
|
201
|
+
events,
|
|
202
|
+
shadows,
|
|
203
|
+
linear,
|
|
204
|
+
flat,
|
|
205
|
+
legacy,
|
|
206
|
+
orthographic,
|
|
207
|
+
frameloop,
|
|
208
|
+
performance,
|
|
209
|
+
raycaster,
|
|
210
|
+
camera,
|
|
213
211
|
// expo-gl can only render at native dpr/resolution
|
|
214
212
|
// https://github.com/expo/expo-three/issues/39
|
|
215
213
|
dpr: reactNative.PixelRatio.get(),
|
|
@@ -217,8 +215,24 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
217
215
|
width,
|
|
218
216
|
height
|
|
219
217
|
},
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
// Pass mutable reference to onPointerMissed so it's free to update
|
|
219
|
+
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
220
|
+
// Overwrite onCreated to apply RN bindings
|
|
221
|
+
onCreated: state => {
|
|
222
|
+
// Bind events after creation
|
|
223
|
+
const handlers = state.events.connect == null ? void 0 : state.events.connect(viewRef.current);
|
|
224
|
+
setBind(handlers); // Bind render to RN bridge
|
|
225
|
+
|
|
226
|
+
const context = state.gl.getContext();
|
|
227
|
+
const renderFrame = state.gl.render.bind(state.gl);
|
|
228
|
+
|
|
229
|
+
state.gl.render = (scene, camera) => {
|
|
230
|
+
renderFrame(scene, camera);
|
|
231
|
+
context.endFrameEXP();
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
return onCreated == null ? void 0 : onCreated(state);
|
|
235
|
+
}
|
|
222
236
|
});
|
|
223
237
|
root.current.render( /*#__PURE__*/React__namespace.createElement(index.ErrorBoundary, {
|
|
224
238
|
set: setError
|
|
@@ -230,9 +244,11 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
230
244
|
}
|
|
231
245
|
|
|
232
246
|
React__namespace.useEffect(() => {
|
|
233
|
-
|
|
247
|
+
if (canvas) {
|
|
248
|
+
return () => index.unmountComponentAtNode(canvas);
|
|
249
|
+
}
|
|
234
250
|
}, [canvas]);
|
|
235
|
-
return /*#__PURE__*/React__namespace.createElement(reactNative.View, _extends({},
|
|
251
|
+
return /*#__PURE__*/React__namespace.createElement(reactNative.View, _extends({}, props, {
|
|
236
252
|
ref: mergeRefs__default['default']([viewRef, forwardedRef]),
|
|
237
253
|
onLayout: onLayout,
|
|
238
254
|
style: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { Asset } from 'expo-asset';
|
|
3
|
-
import { c as createEvents, e as extend, u as
|
|
4
|
-
export { t as ReactThreeFiber,
|
|
3
|
+
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-3c7aae97.esm.js';
|
|
4
|
+
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-3c7aae97.esm.js';
|
|
5
5
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import mergeRefs from 'react-merge-refs';
|
|
@@ -97,23 +97,32 @@ function createTouchEvents(store) {
|
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
const CANVAS_PROPS = ['gl', 'events', 'shadows', 'linear', 'flat', 'legacy', 'orthographic', 'frameloop', 'performance', 'raycaster', 'camera', 'onPointerMissed', 'onCreated'];
|
|
101
100
|
/**
|
|
102
101
|
* A native canvas which accepts threejs elements as children.
|
|
103
102
|
* @see https://docs.pmnd.rs/react-three-fiber/api/canvas
|
|
104
103
|
*/
|
|
105
|
-
|
|
106
104
|
const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
107
105
|
children,
|
|
108
106
|
style,
|
|
109
|
-
|
|
107
|
+
gl,
|
|
108
|
+
events = createTouchEvents,
|
|
109
|
+
shadows,
|
|
110
|
+
linear,
|
|
111
|
+
flat,
|
|
112
|
+
legacy,
|
|
113
|
+
orthographic,
|
|
114
|
+
frameloop,
|
|
115
|
+
performance,
|
|
116
|
+
raycaster,
|
|
117
|
+
camera,
|
|
118
|
+
onPointerMissed,
|
|
119
|
+
onCreated,
|
|
110
120
|
...props
|
|
111
121
|
}, forwardedRef) => {
|
|
112
122
|
// Create a known catalogue of Threejs-native elements
|
|
113
123
|
// This will include the entire THREE namespace by default, users can extend
|
|
114
124
|
// their own elements by using the createRoot API instead
|
|
115
125
|
React.useMemo(() => extend(THREE), []);
|
|
116
|
-
const onPointerMissed = useMemoizedFn(props.onPointerMissed);
|
|
117
126
|
const [{
|
|
118
127
|
width,
|
|
119
128
|
height
|
|
@@ -123,12 +132,7 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
123
132
|
});
|
|
124
133
|
const [canvas, setCanvas] = React.useState(null);
|
|
125
134
|
const [bind, setBind] = React.useState();
|
|
126
|
-
const
|
|
127
|
-
onPointerMissed
|
|
128
|
-
}, CANVAS_PROPS);
|
|
129
|
-
const viewProps = omit({ ...props,
|
|
130
|
-
onPointerMissed
|
|
131
|
-
}, CANVAS_PROPS);
|
|
135
|
+
const handlePointerMissed = useMutableCallback(onPointerMissed);
|
|
132
136
|
const [block, setBlock] = React.useState(false);
|
|
133
137
|
const [error, setError] = React.useState(false); // Suspend this component if block is a promise (2nd run)
|
|
134
138
|
|
|
@@ -161,25 +165,19 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
161
165
|
}, []);
|
|
162
166
|
|
|
163
167
|
if (width > 0 && height > 0 && canvas) {
|
|
164
|
-
if (!root.current) root.current = createRoot(canvas);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
return canvasProps == null ? void 0 : canvasProps.onCreated == null ? void 0 : canvasProps.onCreated(state);
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
root.current.configure({ ...canvasProps,
|
|
168
|
+
if (!root.current) root.current = createRoot(canvas);
|
|
169
|
+
root.current.configure({
|
|
170
|
+
gl,
|
|
171
|
+
events,
|
|
172
|
+
shadows,
|
|
173
|
+
linear,
|
|
174
|
+
flat,
|
|
175
|
+
legacy,
|
|
176
|
+
orthographic,
|
|
177
|
+
frameloop,
|
|
178
|
+
performance,
|
|
179
|
+
raycaster,
|
|
180
|
+
camera,
|
|
183
181
|
// expo-gl can only render at native dpr/resolution
|
|
184
182
|
// https://github.com/expo/expo-three/issues/39
|
|
185
183
|
dpr: PixelRatio.get(),
|
|
@@ -187,8 +185,24 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
187
185
|
width,
|
|
188
186
|
height
|
|
189
187
|
},
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
// Pass mutable reference to onPointerMissed so it's free to update
|
|
189
|
+
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
190
|
+
// Overwrite onCreated to apply RN bindings
|
|
191
|
+
onCreated: state => {
|
|
192
|
+
// Bind events after creation
|
|
193
|
+
const handlers = state.events.connect == null ? void 0 : state.events.connect(viewRef.current);
|
|
194
|
+
setBind(handlers); // Bind render to RN bridge
|
|
195
|
+
|
|
196
|
+
const context = state.gl.getContext();
|
|
197
|
+
const renderFrame = state.gl.render.bind(state.gl);
|
|
198
|
+
|
|
199
|
+
state.gl.render = (scene, camera) => {
|
|
200
|
+
renderFrame(scene, camera);
|
|
201
|
+
context.endFrameEXP();
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
return onCreated == null ? void 0 : onCreated(state);
|
|
205
|
+
}
|
|
192
206
|
});
|
|
193
207
|
root.current.render( /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
194
208
|
set: setError
|
|
@@ -200,9 +214,11 @@ const Canvas = /*#__PURE__*/React.forwardRef(({
|
|
|
200
214
|
}
|
|
201
215
|
|
|
202
216
|
React.useEffect(() => {
|
|
203
|
-
|
|
217
|
+
if (canvas) {
|
|
218
|
+
return () => unmountComponentAtNode(canvas);
|
|
219
|
+
}
|
|
204
220
|
}, [canvas]);
|
|
205
|
-
return /*#__PURE__*/React.createElement(View, _extends({},
|
|
221
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, props, {
|
|
206
222
|
ref: mergeRefs([viewRef, forwardedRef]),
|
|
207
223
|
onLayout: onLayout,
|
|
208
224
|
style: {
|