"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RenderPeritext = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const context_1 = require("./context");
const state_1 = require("./state");
const RenderPeritext = ({ ctx, children }) => {
    const state = React.useMemo(() => new state_1.CursorState(ctx), [ctx]);
    React.useEffect(() => state.start(), [state]);
    return React.createElement(context_1.context.Provider, { value: state }, children);
};
exports.RenderPeritext = RenderPeritext;
//# sourceMappingURL=RenderPeritext.js.map