@builder.io/mitosis 0.9.2 → 0.9.3
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.
|
@@ -299,15 +299,14 @@ const getBlockBindings = (block, options) => {
|
|
|
299
299
|
exports.symbolBlocksAsChildren = false;
|
|
300
300
|
const componentMappers = {
|
|
301
301
|
Symbol(block, options) {
|
|
302
|
-
var _a
|
|
302
|
+
var _a;
|
|
303
303
|
let css = getCssFromBlock(block);
|
|
304
304
|
const styleString = getStyleStringFromBlock(block, options);
|
|
305
305
|
const actionBindings = getActionBindingsFromBlock(block, options);
|
|
306
306
|
const bindings = {
|
|
307
307
|
symbol: (0, bindings_1.createSingleBinding)({
|
|
308
308
|
code: JSON.stringify({
|
|
309
|
-
|
|
310
|
-
content: (_b = block.component) === null || _b === void 0 ? void 0 : _b.options.symbol.content,
|
|
309
|
+
...(_a = block.component) === null || _a === void 0 ? void 0 : _a.options.symbol,
|
|
311
310
|
}),
|
|
312
311
|
}),
|
|
313
312
|
...actionBindings,
|
|
@@ -284,6 +284,15 @@ const jsxElementToJson = (node) => {
|
|
|
284
284
|
bindingType: 'function',
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
|
+
else if (/^on[A-Z]/.test(key) && types.isExpression(expression)) {
|
|
288
|
+
// regex ignores props that happen to start with "on" but are not handlers
|
|
289
|
+
// <Foo onClick={state.handler} />
|
|
290
|
+
const call = types.callExpression(expression, []);
|
|
291
|
+
memo.bindings[key] = (0, bindings_1.createSingleBinding)({
|
|
292
|
+
code: (0, generator_1.default)(call, { compact: true }).code,
|
|
293
|
+
bindingType: 'function',
|
|
294
|
+
});
|
|
295
|
+
}
|
|
287
296
|
else if (types.isJSXElement(expression) || types.isJSXFragment(expression)) {
|
|
288
297
|
// <Foo myProp={<MoreMitosisNode><div /></MoreMitosisNode>} />
|
|
289
298
|
// <Foo myProp={<><Node /><Node /></>} />
|
package/jsx-runtime.d.ts
CHANGED
|
@@ -393,6 +393,9 @@ export declare namespace JSX {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
interface DetailsHtmlAttributes<T> extends HTMLAttributes<T> {
|
|
396
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/name) */
|
|
397
|
+
name?: string;
|
|
398
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/open) */
|
|
396
399
|
open?: boolean;
|
|
397
400
|
}
|
|
398
401
|
|
|
@@ -500,6 +503,8 @@ export declare namespace JSX {
|
|
|
500
503
|
// camelcase
|
|
501
504
|
crossOrigin?: HTMLCrossorigin;
|
|
502
505
|
formAction?: string;
|
|
506
|
+
autoComplete?: string;
|
|
507
|
+
autoFocus?: boolean;
|
|
503
508
|
formEnctype?: HTMLFormEncType;
|
|
504
509
|
formMethod?: HTMLFormMethod;
|
|
505
510
|
formNoValidate?: boolean;
|