@zero-library/common 2.1.1 → 2.1.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.
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -5221,22 +5221,22 @@ var MarkdownEditor_default = ({ value = "", onChange, onScrollPage, searchValue,
|
|
|
5221
5221
|
function isRenderFn(node) {
|
|
5222
5222
|
return isFunction(node) || isObject(node) && !isNull(node) && "$$typeof" in node && node.$$typeof === Symbol.for("react.forward_ref");
|
|
5223
5223
|
}
|
|
5224
|
-
function renderDefault(DefaultComponent, props) {
|
|
5224
|
+
function renderDefault(DefaultComponent, ref, props) {
|
|
5225
5225
|
if (!DefaultComponent) return null;
|
|
5226
|
-
return isRenderFn(DefaultComponent) ? /* @__PURE__ */ jsxRuntime.jsx(DefaultComponent, { ...props }) : DefaultComponent;
|
|
5226
|
+
return isRenderFn(DefaultComponent) ? /* @__PURE__ */ jsxRuntime.jsx(DefaultComponent, { ref, ...props }) : DefaultComponent;
|
|
5227
5227
|
}
|
|
5228
|
-
|
|
5228
|
+
var RenderWrapper = React16.forwardRef(function RenderWrapper2({ control = true, ctx, DefaultComponent }, ref) {
|
|
5229
5229
|
if (control === false || isNull(control)) return null;
|
|
5230
5230
|
if (control === true || control === void 0) {
|
|
5231
|
-
return renderDefault(DefaultComponent);
|
|
5231
|
+
return renderDefault(DefaultComponent, ref);
|
|
5232
5232
|
}
|
|
5233
5233
|
const { visible = true, render, props } = control;
|
|
5234
5234
|
if (!visible) return null;
|
|
5235
5235
|
if (render) {
|
|
5236
5236
|
return typeof render === "function" ? render(ctx) : render;
|
|
5237
5237
|
}
|
|
5238
|
-
return renderDefault(DefaultComponent, props);
|
|
5239
|
-
}
|
|
5238
|
+
return renderDefault(DefaultComponent, ref, props);
|
|
5239
|
+
});
|
|
5240
5240
|
var shouldRender = (control) => control != null && (isBoolean(control) ? control : control?.visible !== false);
|
|
5241
5241
|
function propsMerge(control, props) {
|
|
5242
5242
|
if (control === true || control === void 0) {
|