@prestyj/boss 4.10.1 → 4.10.2
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/{chunk-72J6ZGVA.js → chunk-OIHP3D3X.js} +342 -1757
- package/dist/{chunk-72J6ZGVA.js.map → chunk-OIHP3D3X.js.map} +1 -1
- package/dist/{devtools-ORTEPMCM.js → chunk-ZQMUKA6O.js} +4 -68
- package/dist/chunk-ZQMUKA6O.js.map +1 -0
- package/dist/cli.js +4299 -267
- package/dist/cli.js.map +1 -1
- package/dist/devtools-4WIKZSVM.js +74 -0
- package/dist/devtools-4WIKZSVM.js.map +1 -0
- package/dist/devtools-TQEAGQ4I.js +74 -0
- package/dist/devtools-TQEAGQ4I.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/dist/devtools-ORTEPMCM.js.map +0 -1
|
@@ -7429,7 +7429,7 @@ var require_react_production = __commonJS({
|
|
|
7429
7429
|
assign(pureComponentPrototype, Component.prototype);
|
|
7430
7430
|
pureComponentPrototype.isPureReactComponent = true;
|
|
7431
7431
|
var isArrayImpl = Array.isArray;
|
|
7432
|
-
function
|
|
7432
|
+
function noop4() {
|
|
7433
7433
|
}
|
|
7434
7434
|
var ReactSharedInternals = { H: null, A: null, T: null, S: null };
|
|
7435
7435
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -7466,7 +7466,7 @@ var require_react_production = __commonJS({
|
|
|
7466
7466
|
case "rejected":
|
|
7467
7467
|
throw thenable.reason;
|
|
7468
7468
|
default:
|
|
7469
|
-
switch ("string" === typeof thenable.status ? thenable.then(
|
|
7469
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop4, noop4) : (thenable.status = "pending", thenable.then(
|
|
7470
7470
|
function(fulfilledValue) {
|
|
7471
7471
|
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
7472
7472
|
},
|
|
@@ -7706,8 +7706,8 @@ var require_react_production = __commonJS({
|
|
|
7706
7706
|
exports.createRef = function() {
|
|
7707
7707
|
return { current: null };
|
|
7708
7708
|
};
|
|
7709
|
-
exports.forwardRef = function(
|
|
7710
|
-
return { $$typeof: REACT_FORWARD_REF_TYPE, render
|
|
7709
|
+
exports.forwardRef = function(render) {
|
|
7710
|
+
return { $$typeof: REACT_FORWARD_REF_TYPE, render };
|
|
7711
7711
|
};
|
|
7712
7712
|
exports.isValidElement = isValidElement;
|
|
7713
7713
|
exports.lazy = function(ctor) {
|
|
@@ -7730,7 +7730,7 @@ var require_react_production = __commonJS({
|
|
|
7730
7730
|
try {
|
|
7731
7731
|
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
7732
7732
|
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
7733
|
-
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(
|
|
7733
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop4, reportGlobalError);
|
|
7734
7734
|
} catch (error51) {
|
|
7735
7735
|
reportGlobalError(error51);
|
|
7736
7736
|
} finally {
|
|
@@ -7757,8 +7757,8 @@ var require_react_production = __commonJS({
|
|
|
7757
7757
|
exports.useDeferredValue = function(value, initialValue) {
|
|
7758
7758
|
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
7759
7759
|
};
|
|
7760
|
-
exports.useEffect = function(
|
|
7761
|
-
return ReactSharedInternals.H.useEffect(
|
|
7760
|
+
exports.useEffect = function(create2, deps) {
|
|
7761
|
+
return ReactSharedInternals.H.useEffect(create2, deps);
|
|
7762
7762
|
};
|
|
7763
7763
|
exports.useEffectEvent = function(callback) {
|
|
7764
7764
|
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
@@ -7766,17 +7766,17 @@ var require_react_production = __commonJS({
|
|
|
7766
7766
|
exports.useId = function() {
|
|
7767
7767
|
return ReactSharedInternals.H.useId();
|
|
7768
7768
|
};
|
|
7769
|
-
exports.useImperativeHandle = function(ref,
|
|
7770
|
-
return ReactSharedInternals.H.useImperativeHandle(ref,
|
|
7769
|
+
exports.useImperativeHandle = function(ref, create2, deps) {
|
|
7770
|
+
return ReactSharedInternals.H.useImperativeHandle(ref, create2, deps);
|
|
7771
7771
|
};
|
|
7772
|
-
exports.useInsertionEffect = function(
|
|
7773
|
-
return ReactSharedInternals.H.useInsertionEffect(
|
|
7772
|
+
exports.useInsertionEffect = function(create2, deps) {
|
|
7773
|
+
return ReactSharedInternals.H.useInsertionEffect(create2, deps);
|
|
7774
7774
|
};
|
|
7775
|
-
exports.useLayoutEffect = function(
|
|
7776
|
-
return ReactSharedInternals.H.useLayoutEffect(
|
|
7775
|
+
exports.useLayoutEffect = function(create2, deps) {
|
|
7776
|
+
return ReactSharedInternals.H.useLayoutEffect(create2, deps);
|
|
7777
7777
|
};
|
|
7778
|
-
exports.useMemo = function(
|
|
7779
|
-
return ReactSharedInternals.H.useMemo(
|
|
7778
|
+
exports.useMemo = function(create2, deps) {
|
|
7779
|
+
return ReactSharedInternals.H.useMemo(create2, deps);
|
|
7780
7780
|
};
|
|
7781
7781
|
exports.useOptimistic = function(passthrough, reducer) {
|
|
7782
7782
|
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
@@ -7850,7 +7850,7 @@ var require_react_development = __commonJS({
|
|
|
7850
7850
|
this.refs = emptyObject;
|
|
7851
7851
|
this.updater = updater2 || ReactNoopUpdateQueue;
|
|
7852
7852
|
}
|
|
7853
|
-
function
|
|
7853
|
+
function noop4() {
|
|
7854
7854
|
}
|
|
7855
7855
|
function testStringCoercion(value) {
|
|
7856
7856
|
return "" + value;
|
|
@@ -8041,7 +8041,7 @@ var require_react_development = __commonJS({
|
|
|
8041
8041
|
case "rejected":
|
|
8042
8042
|
throw thenable.reason;
|
|
8043
8043
|
default:
|
|
8044
|
-
switch ("string" === typeof thenable.status ? thenable.then(
|
|
8044
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop4, noop4) : (thenable.status = "pending", thenable.then(
|
|
8045
8045
|
function(fulfilledValue) {
|
|
8046
8046
|
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
8047
8047
|
},
|
|
@@ -8601,20 +8601,20 @@ var require_react_development = __commonJS({
|
|
|
8601
8601
|
Object.seal(refObject);
|
|
8602
8602
|
return refObject;
|
|
8603
8603
|
};
|
|
8604
|
-
exports.forwardRef = function(
|
|
8605
|
-
null !=
|
|
8604
|
+
exports.forwardRef = function(render) {
|
|
8605
|
+
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
|
|
8606
8606
|
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
8607
|
-
) : "function" !== typeof
|
|
8607
|
+
) : "function" !== typeof render ? console.error(
|
|
8608
8608
|
"forwardRef requires a render function but was given %s.",
|
|
8609
|
-
null ===
|
|
8610
|
-
) : 0 !==
|
|
8609
|
+
null === render ? "null" : typeof render
|
|
8610
|
+
) : 0 !== render.length && 2 !== render.length && console.error(
|
|
8611
8611
|
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
8612
|
-
1 ===
|
|
8612
|
+
1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
|
|
8613
8613
|
);
|
|
8614
|
-
null !=
|
|
8614
|
+
null != render && null != render.defaultProps && console.error(
|
|
8615
8615
|
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
8616
8616
|
);
|
|
8617
|
-
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render
|
|
8617
|
+
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
|
|
8618
8618
|
Object.defineProperty(elementType, "displayName", {
|
|
8619
8619
|
enumerable: false,
|
|
8620
8620
|
configurable: true,
|
|
@@ -8623,7 +8623,7 @@ var require_react_development = __commonJS({
|
|
|
8623
8623
|
},
|
|
8624
8624
|
set: function(name) {
|
|
8625
8625
|
ownName = name;
|
|
8626
|
-
|
|
8626
|
+
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
|
8627
8627
|
}
|
|
8628
8628
|
});
|
|
8629
8629
|
return elementType;
|
|
@@ -8679,7 +8679,7 @@ var require_react_development = __commonJS({
|
|
|
8679
8679
|
try {
|
|
8680
8680
|
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
8681
8681
|
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
8682
|
-
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(
|
|
8682
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop4, reportGlobalError));
|
|
8683
8683
|
} catch (error51) {
|
|
8684
8684
|
reportGlobalError(error51);
|
|
8685
8685
|
} finally {
|
|
@@ -8719,11 +8719,11 @@ var require_react_development = __commonJS({
|
|
|
8719
8719
|
exports.useDeferredValue = function(value, initialValue) {
|
|
8720
8720
|
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
8721
8721
|
};
|
|
8722
|
-
exports.useEffect = function(
|
|
8723
|
-
null ==
|
|
8722
|
+
exports.useEffect = function(create2, deps) {
|
|
8723
|
+
null == create2 && console.warn(
|
|
8724
8724
|
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
8725
8725
|
);
|
|
8726
|
-
return resolveDispatcher().useEffect(
|
|
8726
|
+
return resolveDispatcher().useEffect(create2, deps);
|
|
8727
8727
|
};
|
|
8728
8728
|
exports.useEffectEvent = function(callback) {
|
|
8729
8729
|
return resolveDispatcher().useEffectEvent(callback);
|
|
@@ -8731,23 +8731,23 @@ var require_react_development = __commonJS({
|
|
|
8731
8731
|
exports.useId = function() {
|
|
8732
8732
|
return resolveDispatcher().useId();
|
|
8733
8733
|
};
|
|
8734
|
-
exports.useImperativeHandle = function(ref,
|
|
8735
|
-
return resolveDispatcher().useImperativeHandle(ref,
|
|
8734
|
+
exports.useImperativeHandle = function(ref, create2, deps) {
|
|
8735
|
+
return resolveDispatcher().useImperativeHandle(ref, create2, deps);
|
|
8736
8736
|
};
|
|
8737
|
-
exports.useInsertionEffect = function(
|
|
8738
|
-
null ==
|
|
8737
|
+
exports.useInsertionEffect = function(create2, deps) {
|
|
8738
|
+
null == create2 && console.warn(
|
|
8739
8739
|
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
8740
8740
|
);
|
|
8741
|
-
return resolveDispatcher().useInsertionEffect(
|
|
8741
|
+
return resolveDispatcher().useInsertionEffect(create2, deps);
|
|
8742
8742
|
};
|
|
8743
|
-
exports.useLayoutEffect = function(
|
|
8744
|
-
null ==
|
|
8743
|
+
exports.useLayoutEffect = function(create2, deps) {
|
|
8744
|
+
null == create2 && console.warn(
|
|
8745
8745
|
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
8746
8746
|
);
|
|
8747
|
-
return resolveDispatcher().useLayoutEffect(
|
|
8747
|
+
return resolveDispatcher().useLayoutEffect(create2, deps);
|
|
8748
8748
|
};
|
|
8749
|
-
exports.useMemo = function(
|
|
8750
|
-
return resolveDispatcher().useMemo(
|
|
8749
|
+
exports.useMemo = function(create2, deps) {
|
|
8750
|
+
return resolveDispatcher().useMemo(create2, deps);
|
|
8751
8751
|
};
|
|
8752
8752
|
exports.useOptimistic = function(passthrough, reducer) {
|
|
8753
8753
|
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
@@ -9583,7 +9583,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
9583
9583
|
function createFiber(tag, pendingProps, key, mode) {
|
|
9584
9584
|
return new FiberNode(tag, pendingProps, key, mode);
|
|
9585
9585
|
}
|
|
9586
|
-
function
|
|
9586
|
+
function noop4() {
|
|
9587
9587
|
}
|
|
9588
9588
|
function formatProdErrorMessage(code) {
|
|
9589
9589
|
var url2 = "https://react.dev/errors/" + code;
|
|
@@ -12038,43 +12038,43 @@ var require_react_reconciler_production = __commonJS({
|
|
|
12038
12038
|
currentStateHook.memoizedState = action;
|
|
12039
12039
|
return [stateHook, dispatch, false];
|
|
12040
12040
|
}
|
|
12041
|
-
function pushSimpleEffect(tag, inst,
|
|
12042
|
-
tag = { tag, create:
|
|
12041
|
+
function pushSimpleEffect(tag, inst, create2, deps) {
|
|
12042
|
+
tag = { tag, create: create2, deps, inst, next: null };
|
|
12043
12043
|
inst = currentlyRenderingFiber.updateQueue;
|
|
12044
12044
|
null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
|
|
12045
|
-
|
|
12046
|
-
null ===
|
|
12045
|
+
create2 = inst.lastEffect;
|
|
12046
|
+
null === create2 ? inst.lastEffect = tag.next = tag : (deps = create2.next, create2.next = tag, tag.next = deps, inst.lastEffect = tag);
|
|
12047
12047
|
return tag;
|
|
12048
12048
|
}
|
|
12049
12049
|
function updateRef() {
|
|
12050
12050
|
return updateWorkInProgressHook().memoizedState;
|
|
12051
12051
|
}
|
|
12052
|
-
function mountEffectImpl(fiberFlags, hookFlags,
|
|
12052
|
+
function mountEffectImpl(fiberFlags, hookFlags, create2, deps) {
|
|
12053
12053
|
var hook = mountWorkInProgressHook();
|
|
12054
12054
|
currentlyRenderingFiber.flags |= fiberFlags;
|
|
12055
12055
|
hook.memoizedState = pushSimpleEffect(
|
|
12056
12056
|
1 | hookFlags,
|
|
12057
12057
|
{ destroy: void 0 },
|
|
12058
|
-
|
|
12058
|
+
create2,
|
|
12059
12059
|
void 0 === deps ? null : deps
|
|
12060
12060
|
);
|
|
12061
12061
|
}
|
|
12062
|
-
function updateEffectImpl(fiberFlags, hookFlags,
|
|
12062
|
+
function updateEffectImpl(fiberFlags, hookFlags, create2, deps) {
|
|
12063
12063
|
var hook = updateWorkInProgressHook();
|
|
12064
12064
|
deps = void 0 === deps ? null : deps;
|
|
12065
12065
|
var inst = hook.memoizedState.inst;
|
|
12066
|
-
null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst,
|
|
12066
|
+
null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create2, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
|
|
12067
12067
|
1 | hookFlags,
|
|
12068
12068
|
inst,
|
|
12069
|
-
|
|
12069
|
+
create2,
|
|
12070
12070
|
deps
|
|
12071
12071
|
));
|
|
12072
12072
|
}
|
|
12073
|
-
function mountEffect(
|
|
12074
|
-
mountEffectImpl(8390656, 8,
|
|
12073
|
+
function mountEffect(create2, deps) {
|
|
12074
|
+
mountEffectImpl(8390656, 8, create2, deps);
|
|
12075
12075
|
}
|
|
12076
|
-
function updateEffect(
|
|
12077
|
-
updateEffectImpl(2048, 8,
|
|
12076
|
+
function updateEffect(create2, deps) {
|
|
12077
|
+
updateEffectImpl(2048, 8, create2, deps);
|
|
12078
12078
|
}
|
|
12079
12079
|
function useEffectEventImpl(payload) {
|
|
12080
12080
|
currentlyRenderingFiber.flags |= 4;
|
|
@@ -12095,31 +12095,31 @@ var require_react_reconciler_production = __commonJS({
|
|
|
12095
12095
|
return ref.impl.apply(void 0, arguments);
|
|
12096
12096
|
};
|
|
12097
12097
|
}
|
|
12098
|
-
function updateInsertionEffect(
|
|
12099
|
-
return updateEffectImpl(4, 2,
|
|
12098
|
+
function updateInsertionEffect(create2, deps) {
|
|
12099
|
+
return updateEffectImpl(4, 2, create2, deps);
|
|
12100
12100
|
}
|
|
12101
|
-
function updateLayoutEffect(
|
|
12102
|
-
return updateEffectImpl(4, 4,
|
|
12101
|
+
function updateLayoutEffect(create2, deps) {
|
|
12102
|
+
return updateEffectImpl(4, 4, create2, deps);
|
|
12103
12103
|
}
|
|
12104
|
-
function imperativeHandleEffect(
|
|
12104
|
+
function imperativeHandleEffect(create2, ref) {
|
|
12105
12105
|
if ("function" === typeof ref) {
|
|
12106
|
-
|
|
12107
|
-
var refCleanup = ref(
|
|
12106
|
+
create2 = create2();
|
|
12107
|
+
var refCleanup = ref(create2);
|
|
12108
12108
|
return function() {
|
|
12109
12109
|
"function" === typeof refCleanup ? refCleanup() : ref(null);
|
|
12110
12110
|
};
|
|
12111
12111
|
}
|
|
12112
12112
|
if (null !== ref && void 0 !== ref)
|
|
12113
|
-
return
|
|
12113
|
+
return create2 = create2(), ref.current = create2, function() {
|
|
12114
12114
|
ref.current = null;
|
|
12115
12115
|
};
|
|
12116
12116
|
}
|
|
12117
|
-
function updateImperativeHandle(ref,
|
|
12117
|
+
function updateImperativeHandle(ref, create2, deps) {
|
|
12118
12118
|
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
|
|
12119
12119
|
updateEffectImpl(
|
|
12120
12120
|
4,
|
|
12121
12121
|
4,
|
|
12122
|
-
imperativeHandleEffect.bind(null,
|
|
12122
|
+
imperativeHandleEffect.bind(null, create2, ref),
|
|
12123
12123
|
deps
|
|
12124
12124
|
);
|
|
12125
12125
|
}
|
|
@@ -14255,8 +14255,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
14255
14255
|
do {
|
|
14256
14256
|
if ((updateQueue.tag & flags) === flags) {
|
|
14257
14257
|
lastEffect = void 0;
|
|
14258
|
-
var
|
|
14259
|
-
lastEffect =
|
|
14258
|
+
var create2 = updateQueue.create, inst = updateQueue.inst;
|
|
14259
|
+
lastEffect = create2();
|
|
14260
14260
|
inst.destroy = lastEffect;
|
|
14261
14261
|
}
|
|
14262
14262
|
updateQueue = updateQueue.next;
|
|
@@ -17103,20 +17103,20 @@ var require_react_reconciler_production = __commonJS({
|
|
|
17103
17103
|
},
|
|
17104
17104
|
useContext: readContext,
|
|
17105
17105
|
useEffect: mountEffect,
|
|
17106
|
-
useImperativeHandle: function(ref,
|
|
17106
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
17107
17107
|
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
|
|
17108
17108
|
mountEffectImpl(
|
|
17109
17109
|
4194308,
|
|
17110
17110
|
4,
|
|
17111
|
-
imperativeHandleEffect.bind(null,
|
|
17111
|
+
imperativeHandleEffect.bind(null, create2, ref),
|
|
17112
17112
|
deps
|
|
17113
17113
|
);
|
|
17114
17114
|
},
|
|
17115
|
-
useLayoutEffect: function(
|
|
17116
|
-
return mountEffectImpl(4194308, 4,
|
|
17115
|
+
useLayoutEffect: function(create2, deps) {
|
|
17116
|
+
return mountEffectImpl(4194308, 4, create2, deps);
|
|
17117
17117
|
},
|
|
17118
|
-
useInsertionEffect: function(
|
|
17119
|
-
mountEffectImpl(4, 2,
|
|
17118
|
+
useInsertionEffect: function(create2, deps) {
|
|
17119
|
+
mountEffectImpl(4, 2, create2, deps);
|
|
17120
17120
|
},
|
|
17121
17121
|
useMemo: function(nextCreate, deps) {
|
|
17122
17122
|
var hook = mountWorkInProgressHook();
|
|
@@ -17711,7 +17711,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
17711
17711
|
queue,
|
|
17712
17712
|
pendingState,
|
|
17713
17713
|
NotPendingTransition,
|
|
17714
|
-
null === action ?
|
|
17714
|
+
null === action ? noop4 : function() {
|
|
17715
17715
|
var stateHook = ensureFormComponentIsStateful(formFiber);
|
|
17716
17716
|
null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);
|
|
17717
17717
|
dispatchSetStateInternal(
|
|
@@ -17840,7 +17840,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
17840
17840
|
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
|
|
17841
17841
|
);
|
|
17842
17842
|
}
|
|
17843
|
-
function
|
|
17843
|
+
function noop4() {
|
|
17844
17844
|
}
|
|
17845
17845
|
function warnForMissingKey() {
|
|
17846
17846
|
}
|
|
@@ -21933,8 +21933,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
21933
21933
|
))
|
|
21934
21934
|
hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
|
|
21935
21935
|
hook = hook.queue;
|
|
21936
|
-
var
|
|
21937
|
-
updateEffectImpl(2048, Passive,
|
|
21936
|
+
var create2 = subscribeToStore.bind(null, fiber, hook, subscribe3);
|
|
21937
|
+
updateEffectImpl(2048, Passive, create2, [subscribe3]);
|
|
21938
21938
|
if (hook.getSnapshot !== getSnapshot3 || cachedSnapshot || null !== workInProgressHook && workInProgressHook.memoizedState.tag & HasEffect) {
|
|
21939
21939
|
fiber.flags |= 2048;
|
|
21940
21940
|
pushSimpleEffect(
|
|
@@ -22254,12 +22254,12 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22254
22254
|
currentStateHook.memoizedState = action;
|
|
22255
22255
|
return [stateHook, dispatch, false];
|
|
22256
22256
|
}
|
|
22257
|
-
function pushSimpleEffect(tag, inst,
|
|
22258
|
-
tag = { tag, create:
|
|
22257
|
+
function pushSimpleEffect(tag, inst, create2, deps) {
|
|
22258
|
+
tag = { tag, create: create2, deps, inst, next: null };
|
|
22259
22259
|
inst = currentlyRenderingFiber.updateQueue;
|
|
22260
22260
|
null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
|
|
22261
|
-
|
|
22262
|
-
null ===
|
|
22261
|
+
create2 = inst.lastEffect;
|
|
22262
|
+
null === create2 ? inst.lastEffect = tag.next = tag : (deps = create2.next, create2.next = tag, tag.next = deps, inst.lastEffect = tag);
|
|
22263
22263
|
return tag;
|
|
22264
22264
|
}
|
|
22265
22265
|
function mountRef(initialValue) {
|
|
@@ -22267,29 +22267,29 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22267
22267
|
initialValue = { current: initialValue };
|
|
22268
22268
|
return hook.memoizedState = initialValue;
|
|
22269
22269
|
}
|
|
22270
|
-
function mountEffectImpl(fiberFlags, hookFlags,
|
|
22270
|
+
function mountEffectImpl(fiberFlags, hookFlags, create2, deps) {
|
|
22271
22271
|
var hook = mountWorkInProgressHook();
|
|
22272
22272
|
currentlyRenderingFiber.flags |= fiberFlags;
|
|
22273
22273
|
hook.memoizedState = pushSimpleEffect(
|
|
22274
22274
|
HasEffect | hookFlags,
|
|
22275
22275
|
{ destroy: void 0 },
|
|
22276
|
-
|
|
22276
|
+
create2,
|
|
22277
22277
|
void 0 === deps ? null : deps
|
|
22278
22278
|
);
|
|
22279
22279
|
}
|
|
22280
|
-
function updateEffectImpl(fiberFlags, hookFlags,
|
|
22280
|
+
function updateEffectImpl(fiberFlags, hookFlags, create2, deps) {
|
|
22281
22281
|
var hook = updateWorkInProgressHook();
|
|
22282
22282
|
deps = void 0 === deps ? null : deps;
|
|
22283
22283
|
var inst = hook.memoizedState.inst;
|
|
22284
|
-
null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst,
|
|
22284
|
+
null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create2, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
|
|
22285
22285
|
HasEffect | hookFlags,
|
|
22286
22286
|
inst,
|
|
22287
|
-
|
|
22287
|
+
create2,
|
|
22288
22288
|
deps
|
|
22289
22289
|
));
|
|
22290
22290
|
}
|
|
22291
|
-
function mountEffect(
|
|
22292
|
-
(currentlyRenderingFiber.mode & 16) !== NoMode ? mountEffectImpl(276826112, Passive,
|
|
22291
|
+
function mountEffect(create2, deps) {
|
|
22292
|
+
(currentlyRenderingFiber.mode & 16) !== NoMode ? mountEffectImpl(276826112, Passive, create2, deps) : mountEffectImpl(8390656, Passive, create2, deps);
|
|
22293
22293
|
}
|
|
22294
22294
|
function useEffectEventImpl(payload) {
|
|
22295
22295
|
currentlyRenderingFiber.flags |= 4;
|
|
@@ -22323,15 +22323,15 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22323
22323
|
return ref.impl.apply(void 0, arguments);
|
|
22324
22324
|
};
|
|
22325
22325
|
}
|
|
22326
|
-
function mountLayoutEffect(
|
|
22326
|
+
function mountLayoutEffect(create2, deps) {
|
|
22327
22327
|
var fiberFlags = 4194308;
|
|
22328
22328
|
(currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 134217728);
|
|
22329
|
-
return mountEffectImpl(fiberFlags, Layout,
|
|
22329
|
+
return mountEffectImpl(fiberFlags, Layout, create2, deps);
|
|
22330
22330
|
}
|
|
22331
|
-
function imperativeHandleEffect(
|
|
22331
|
+
function imperativeHandleEffect(create2, ref) {
|
|
22332
22332
|
if ("function" === typeof ref) {
|
|
22333
|
-
|
|
22334
|
-
var refCleanup = ref(
|
|
22333
|
+
create2 = create2();
|
|
22334
|
+
var refCleanup = ref(create2);
|
|
22335
22335
|
return function() {
|
|
22336
22336
|
"function" === typeof refCleanup ? refCleanup() : ref(null);
|
|
22337
22337
|
};
|
|
@@ -22340,14 +22340,14 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22340
22340
|
return ref.hasOwnProperty("current") || console.error(
|
|
22341
22341
|
"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
|
|
22342
22342
|
"an object with keys {" + Object.keys(ref).join(", ") + "}"
|
|
22343
|
-
),
|
|
22343
|
+
), create2 = create2(), ref.current = create2, function() {
|
|
22344
22344
|
ref.current = null;
|
|
22345
22345
|
};
|
|
22346
22346
|
}
|
|
22347
|
-
function mountImperativeHandle(ref,
|
|
22348
|
-
"function" !== typeof
|
|
22347
|
+
function mountImperativeHandle(ref, create2, deps) {
|
|
22348
|
+
"function" !== typeof create2 && console.error(
|
|
22349
22349
|
"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
|
|
22350
|
-
null !==
|
|
22350
|
+
null !== create2 ? typeof create2 : "null"
|
|
22351
22351
|
);
|
|
22352
22352
|
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
|
|
22353
22353
|
var fiberFlags = 4194308;
|
|
@@ -22355,20 +22355,20 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22355
22355
|
mountEffectImpl(
|
|
22356
22356
|
fiberFlags,
|
|
22357
22357
|
Layout,
|
|
22358
|
-
imperativeHandleEffect.bind(null,
|
|
22358
|
+
imperativeHandleEffect.bind(null, create2, ref),
|
|
22359
22359
|
deps
|
|
22360
22360
|
);
|
|
22361
22361
|
}
|
|
22362
|
-
function updateImperativeHandle(ref,
|
|
22363
|
-
"function" !== typeof
|
|
22362
|
+
function updateImperativeHandle(ref, create2, deps) {
|
|
22363
|
+
"function" !== typeof create2 && console.error(
|
|
22364
22364
|
"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
|
|
22365
|
-
null !==
|
|
22365
|
+
null !== create2 ? typeof create2 : "null"
|
|
22366
22366
|
);
|
|
22367
22367
|
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
|
|
22368
22368
|
updateEffectImpl(
|
|
22369
22369
|
4,
|
|
22370
22370
|
Layout,
|
|
22371
|
-
imperativeHandleEffect.bind(null,
|
|
22371
|
+
imperativeHandleEffect.bind(null, create2, ref),
|
|
22372
22372
|
deps
|
|
22373
22373
|
);
|
|
22374
22374
|
}
|
|
@@ -29898,10 +29898,10 @@ var require_react_reconciler_development = __commonJS({
|
|
|
29898
29898
|
callComponentWillUnmount
|
|
29899
29899
|
), callCreate = {
|
|
29900
29900
|
react_stack_bottom_frame: function(effect) {
|
|
29901
|
-
var
|
|
29901
|
+
var create2 = effect.create;
|
|
29902
29902
|
effect = effect.inst;
|
|
29903
|
-
|
|
29904
|
-
return effect.destroy =
|
|
29903
|
+
create2 = create2();
|
|
29904
|
+
return effect.destroy = create2;
|
|
29905
29905
|
}
|
|
29906
29906
|
}, callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate), callDestroy = {
|
|
29907
29907
|
react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
|
|
@@ -30011,38 +30011,38 @@ var require_react_reconciler_development = __commonJS({
|
|
|
30011
30011
|
mountHookTypesDev();
|
|
30012
30012
|
return readContext(context);
|
|
30013
30013
|
},
|
|
30014
|
-
useEffect: function(
|
|
30014
|
+
useEffect: function(create2, deps) {
|
|
30015
30015
|
currentHookNameInDev = "useEffect";
|
|
30016
30016
|
mountHookTypesDev();
|
|
30017
30017
|
checkDepsAreArrayDev(deps);
|
|
30018
|
-
return mountEffect(
|
|
30018
|
+
return mountEffect(create2, deps);
|
|
30019
30019
|
},
|
|
30020
|
-
useImperativeHandle: function(ref,
|
|
30020
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
30021
30021
|
currentHookNameInDev = "useImperativeHandle";
|
|
30022
30022
|
mountHookTypesDev();
|
|
30023
30023
|
checkDepsAreArrayDev(deps);
|
|
30024
|
-
return mountImperativeHandle(ref,
|
|
30024
|
+
return mountImperativeHandle(ref, create2, deps);
|
|
30025
30025
|
},
|
|
30026
|
-
useInsertionEffect: function(
|
|
30026
|
+
useInsertionEffect: function(create2, deps) {
|
|
30027
30027
|
currentHookNameInDev = "useInsertionEffect";
|
|
30028
30028
|
mountHookTypesDev();
|
|
30029
30029
|
checkDepsAreArrayDev(deps);
|
|
30030
|
-
mountEffectImpl(4, Insertion,
|
|
30030
|
+
mountEffectImpl(4, Insertion, create2, deps);
|
|
30031
30031
|
},
|
|
30032
|
-
useLayoutEffect: function(
|
|
30032
|
+
useLayoutEffect: function(create2, deps) {
|
|
30033
30033
|
currentHookNameInDev = "useLayoutEffect";
|
|
30034
30034
|
mountHookTypesDev();
|
|
30035
30035
|
checkDepsAreArrayDev(deps);
|
|
30036
|
-
return mountLayoutEffect(
|
|
30036
|
+
return mountLayoutEffect(create2, deps);
|
|
30037
30037
|
},
|
|
30038
|
-
useMemo: function(
|
|
30038
|
+
useMemo: function(create2, deps) {
|
|
30039
30039
|
currentHookNameInDev = "useMemo";
|
|
30040
30040
|
mountHookTypesDev();
|
|
30041
30041
|
checkDepsAreArrayDev(deps);
|
|
30042
30042
|
var prevDispatcher = ReactSharedInternals.H;
|
|
30043
30043
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
30044
30044
|
try {
|
|
30045
|
-
return mountMemo(
|
|
30045
|
+
return mountMemo(create2, deps);
|
|
30046
30046
|
} finally {
|
|
30047
30047
|
ReactSharedInternals.H = prevDispatcher;
|
|
30048
30048
|
}
|
|
@@ -30146,33 +30146,33 @@ var require_react_reconciler_development = __commonJS({
|
|
|
30146
30146
|
updateHookTypesDev();
|
|
30147
30147
|
return readContext(context);
|
|
30148
30148
|
},
|
|
30149
|
-
useEffect: function(
|
|
30149
|
+
useEffect: function(create2, deps) {
|
|
30150
30150
|
currentHookNameInDev = "useEffect";
|
|
30151
30151
|
updateHookTypesDev();
|
|
30152
|
-
return mountEffect(
|
|
30152
|
+
return mountEffect(create2, deps);
|
|
30153
30153
|
},
|
|
30154
|
-
useImperativeHandle: function(ref,
|
|
30154
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
30155
30155
|
currentHookNameInDev = "useImperativeHandle";
|
|
30156
30156
|
updateHookTypesDev();
|
|
30157
|
-
return mountImperativeHandle(ref,
|
|
30157
|
+
return mountImperativeHandle(ref, create2, deps);
|
|
30158
30158
|
},
|
|
30159
|
-
useInsertionEffect: function(
|
|
30159
|
+
useInsertionEffect: function(create2, deps) {
|
|
30160
30160
|
currentHookNameInDev = "useInsertionEffect";
|
|
30161
30161
|
updateHookTypesDev();
|
|
30162
|
-
mountEffectImpl(4, Insertion,
|
|
30162
|
+
mountEffectImpl(4, Insertion, create2, deps);
|
|
30163
30163
|
},
|
|
30164
|
-
useLayoutEffect: function(
|
|
30164
|
+
useLayoutEffect: function(create2, deps) {
|
|
30165
30165
|
currentHookNameInDev = "useLayoutEffect";
|
|
30166
30166
|
updateHookTypesDev();
|
|
30167
|
-
return mountLayoutEffect(
|
|
30167
|
+
return mountLayoutEffect(create2, deps);
|
|
30168
30168
|
},
|
|
30169
|
-
useMemo: function(
|
|
30169
|
+
useMemo: function(create2, deps) {
|
|
30170
30170
|
currentHookNameInDev = "useMemo";
|
|
30171
30171
|
updateHookTypesDev();
|
|
30172
30172
|
var prevDispatcher = ReactSharedInternals.H;
|
|
30173
30173
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
30174
30174
|
try {
|
|
30175
|
-
return mountMemo(
|
|
30175
|
+
return mountMemo(create2, deps);
|
|
30176
30176
|
} finally {
|
|
30177
30177
|
ReactSharedInternals.H = prevDispatcher;
|
|
30178
30178
|
}
|
|
@@ -30276,33 +30276,33 @@ var require_react_reconciler_development = __commonJS({
|
|
|
30276
30276
|
updateHookTypesDev();
|
|
30277
30277
|
return readContext(context);
|
|
30278
30278
|
},
|
|
30279
|
-
useEffect: function(
|
|
30279
|
+
useEffect: function(create2, deps) {
|
|
30280
30280
|
currentHookNameInDev = "useEffect";
|
|
30281
30281
|
updateHookTypesDev();
|
|
30282
|
-
updateEffectImpl(2048, Passive,
|
|
30282
|
+
updateEffectImpl(2048, Passive, create2, deps);
|
|
30283
30283
|
},
|
|
30284
|
-
useImperativeHandle: function(ref,
|
|
30284
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
30285
30285
|
currentHookNameInDev = "useImperativeHandle";
|
|
30286
30286
|
updateHookTypesDev();
|
|
30287
|
-
return updateImperativeHandle(ref,
|
|
30287
|
+
return updateImperativeHandle(ref, create2, deps);
|
|
30288
30288
|
},
|
|
30289
|
-
useInsertionEffect: function(
|
|
30289
|
+
useInsertionEffect: function(create2, deps) {
|
|
30290
30290
|
currentHookNameInDev = "useInsertionEffect";
|
|
30291
30291
|
updateHookTypesDev();
|
|
30292
|
-
return updateEffectImpl(4, Insertion,
|
|
30292
|
+
return updateEffectImpl(4, Insertion, create2, deps);
|
|
30293
30293
|
},
|
|
30294
|
-
useLayoutEffect: function(
|
|
30294
|
+
useLayoutEffect: function(create2, deps) {
|
|
30295
30295
|
currentHookNameInDev = "useLayoutEffect";
|
|
30296
30296
|
updateHookTypesDev();
|
|
30297
|
-
return updateEffectImpl(4, Layout,
|
|
30297
|
+
return updateEffectImpl(4, Layout, create2, deps);
|
|
30298
30298
|
},
|
|
30299
|
-
useMemo: function(
|
|
30299
|
+
useMemo: function(create2, deps) {
|
|
30300
30300
|
currentHookNameInDev = "useMemo";
|
|
30301
30301
|
updateHookTypesDev();
|
|
30302
30302
|
var prevDispatcher = ReactSharedInternals.H;
|
|
30303
30303
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
30304
30304
|
try {
|
|
30305
|
-
return updateMemo(
|
|
30305
|
+
return updateMemo(create2, deps);
|
|
30306
30306
|
} finally {
|
|
30307
30307
|
ReactSharedInternals.H = prevDispatcher;
|
|
30308
30308
|
}
|
|
@@ -30406,33 +30406,33 @@ var require_react_reconciler_development = __commonJS({
|
|
|
30406
30406
|
updateHookTypesDev();
|
|
30407
30407
|
return readContext(context);
|
|
30408
30408
|
},
|
|
30409
|
-
useEffect: function(
|
|
30409
|
+
useEffect: function(create2, deps) {
|
|
30410
30410
|
currentHookNameInDev = "useEffect";
|
|
30411
30411
|
updateHookTypesDev();
|
|
30412
|
-
updateEffectImpl(2048, Passive,
|
|
30412
|
+
updateEffectImpl(2048, Passive, create2, deps);
|
|
30413
30413
|
},
|
|
30414
|
-
useImperativeHandle: function(ref,
|
|
30414
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
30415
30415
|
currentHookNameInDev = "useImperativeHandle";
|
|
30416
30416
|
updateHookTypesDev();
|
|
30417
|
-
return updateImperativeHandle(ref,
|
|
30417
|
+
return updateImperativeHandle(ref, create2, deps);
|
|
30418
30418
|
},
|
|
30419
|
-
useInsertionEffect: function(
|
|
30419
|
+
useInsertionEffect: function(create2, deps) {
|
|
30420
30420
|
currentHookNameInDev = "useInsertionEffect";
|
|
30421
30421
|
updateHookTypesDev();
|
|
30422
|
-
return updateEffectImpl(4, Insertion,
|
|
30422
|
+
return updateEffectImpl(4, Insertion, create2, deps);
|
|
30423
30423
|
},
|
|
30424
|
-
useLayoutEffect: function(
|
|
30424
|
+
useLayoutEffect: function(create2, deps) {
|
|
30425
30425
|
currentHookNameInDev = "useLayoutEffect";
|
|
30426
30426
|
updateHookTypesDev();
|
|
30427
|
-
return updateEffectImpl(4, Layout,
|
|
30427
|
+
return updateEffectImpl(4, Layout, create2, deps);
|
|
30428
30428
|
},
|
|
30429
|
-
useMemo: function(
|
|
30429
|
+
useMemo: function(create2, deps) {
|
|
30430
30430
|
currentHookNameInDev = "useMemo";
|
|
30431
30431
|
updateHookTypesDev();
|
|
30432
30432
|
var prevDispatcher = ReactSharedInternals.H;
|
|
30433
30433
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
|
|
30434
30434
|
try {
|
|
30435
|
-
return updateMemo(
|
|
30435
|
+
return updateMemo(create2, deps);
|
|
30436
30436
|
} finally {
|
|
30437
30437
|
ReactSharedInternals.H = prevDispatcher;
|
|
30438
30438
|
}
|
|
@@ -30542,38 +30542,38 @@ var require_react_reconciler_development = __commonJS({
|
|
|
30542
30542
|
mountHookTypesDev();
|
|
30543
30543
|
return readContext(context);
|
|
30544
30544
|
},
|
|
30545
|
-
useEffect: function(
|
|
30545
|
+
useEffect: function(create2, deps) {
|
|
30546
30546
|
currentHookNameInDev = "useEffect";
|
|
30547
30547
|
warnInvalidHookAccess();
|
|
30548
30548
|
mountHookTypesDev();
|
|
30549
|
-
return mountEffect(
|
|
30549
|
+
return mountEffect(create2, deps);
|
|
30550
30550
|
},
|
|
30551
|
-
useImperativeHandle: function(ref,
|
|
30551
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
30552
30552
|
currentHookNameInDev = "useImperativeHandle";
|
|
30553
30553
|
warnInvalidHookAccess();
|
|
30554
30554
|
mountHookTypesDev();
|
|
30555
|
-
return mountImperativeHandle(ref,
|
|
30555
|
+
return mountImperativeHandle(ref, create2, deps);
|
|
30556
30556
|
},
|
|
30557
|
-
useInsertionEffect: function(
|
|
30557
|
+
useInsertionEffect: function(create2, deps) {
|
|
30558
30558
|
currentHookNameInDev = "useInsertionEffect";
|
|
30559
30559
|
warnInvalidHookAccess();
|
|
30560
30560
|
mountHookTypesDev();
|
|
30561
|
-
mountEffectImpl(4, Insertion,
|
|
30561
|
+
mountEffectImpl(4, Insertion, create2, deps);
|
|
30562
30562
|
},
|
|
30563
|
-
useLayoutEffect: function(
|
|
30563
|
+
useLayoutEffect: function(create2, deps) {
|
|
30564
30564
|
currentHookNameInDev = "useLayoutEffect";
|
|
30565
30565
|
warnInvalidHookAccess();
|
|
30566
30566
|
mountHookTypesDev();
|
|
30567
|
-
return mountLayoutEffect(
|
|
30567
|
+
return mountLayoutEffect(create2, deps);
|
|
30568
30568
|
},
|
|
30569
|
-
useMemo: function(
|
|
30569
|
+
useMemo: function(create2, deps) {
|
|
30570
30570
|
currentHookNameInDev = "useMemo";
|
|
30571
30571
|
warnInvalidHookAccess();
|
|
30572
30572
|
mountHookTypesDev();
|
|
30573
30573
|
var prevDispatcher = ReactSharedInternals.H;
|
|
30574
30574
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
30575
30575
|
try {
|
|
30576
|
-
return mountMemo(
|
|
30576
|
+
return mountMemo(create2, deps);
|
|
30577
30577
|
} finally {
|
|
30578
30578
|
ReactSharedInternals.H = prevDispatcher;
|
|
30579
30579
|
}
|
|
@@ -30697,38 +30697,38 @@ var require_react_reconciler_development = __commonJS({
|
|
|
30697
30697
|
updateHookTypesDev();
|
|
30698
30698
|
return readContext(context);
|
|
30699
30699
|
},
|
|
30700
|
-
useEffect: function(
|
|
30700
|
+
useEffect: function(create2, deps) {
|
|
30701
30701
|
currentHookNameInDev = "useEffect";
|
|
30702
30702
|
warnInvalidHookAccess();
|
|
30703
30703
|
updateHookTypesDev();
|
|
30704
|
-
updateEffectImpl(2048, Passive,
|
|
30704
|
+
updateEffectImpl(2048, Passive, create2, deps);
|
|
30705
30705
|
},
|
|
30706
|
-
useImperativeHandle: function(ref,
|
|
30706
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
30707
30707
|
currentHookNameInDev = "useImperativeHandle";
|
|
30708
30708
|
warnInvalidHookAccess();
|
|
30709
30709
|
updateHookTypesDev();
|
|
30710
|
-
return updateImperativeHandle(ref,
|
|
30710
|
+
return updateImperativeHandle(ref, create2, deps);
|
|
30711
30711
|
},
|
|
30712
|
-
useInsertionEffect: function(
|
|
30712
|
+
useInsertionEffect: function(create2, deps) {
|
|
30713
30713
|
currentHookNameInDev = "useInsertionEffect";
|
|
30714
30714
|
warnInvalidHookAccess();
|
|
30715
30715
|
updateHookTypesDev();
|
|
30716
|
-
return updateEffectImpl(4, Insertion,
|
|
30716
|
+
return updateEffectImpl(4, Insertion, create2, deps);
|
|
30717
30717
|
},
|
|
30718
|
-
useLayoutEffect: function(
|
|
30718
|
+
useLayoutEffect: function(create2, deps) {
|
|
30719
30719
|
currentHookNameInDev = "useLayoutEffect";
|
|
30720
30720
|
warnInvalidHookAccess();
|
|
30721
30721
|
updateHookTypesDev();
|
|
30722
|
-
return updateEffectImpl(4, Layout,
|
|
30722
|
+
return updateEffectImpl(4, Layout, create2, deps);
|
|
30723
30723
|
},
|
|
30724
|
-
useMemo: function(
|
|
30724
|
+
useMemo: function(create2, deps) {
|
|
30725
30725
|
currentHookNameInDev = "useMemo";
|
|
30726
30726
|
warnInvalidHookAccess();
|
|
30727
30727
|
updateHookTypesDev();
|
|
30728
30728
|
var prevDispatcher = ReactSharedInternals.H;
|
|
30729
30729
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
30730
30730
|
try {
|
|
30731
|
-
return updateMemo(
|
|
30731
|
+
return updateMemo(create2, deps);
|
|
30732
30732
|
} finally {
|
|
30733
30733
|
ReactSharedInternals.H = prevDispatcher;
|
|
30734
30734
|
}
|
|
@@ -30852,38 +30852,38 @@ var require_react_reconciler_development = __commonJS({
|
|
|
30852
30852
|
updateHookTypesDev();
|
|
30853
30853
|
return readContext(context);
|
|
30854
30854
|
},
|
|
30855
|
-
useEffect: function(
|
|
30855
|
+
useEffect: function(create2, deps) {
|
|
30856
30856
|
currentHookNameInDev = "useEffect";
|
|
30857
30857
|
warnInvalidHookAccess();
|
|
30858
30858
|
updateHookTypesDev();
|
|
30859
|
-
updateEffectImpl(2048, Passive,
|
|
30859
|
+
updateEffectImpl(2048, Passive, create2, deps);
|
|
30860
30860
|
},
|
|
30861
|
-
useImperativeHandle: function(ref,
|
|
30861
|
+
useImperativeHandle: function(ref, create2, deps) {
|
|
30862
30862
|
currentHookNameInDev = "useImperativeHandle";
|
|
30863
30863
|
warnInvalidHookAccess();
|
|
30864
30864
|
updateHookTypesDev();
|
|
30865
|
-
return updateImperativeHandle(ref,
|
|
30865
|
+
return updateImperativeHandle(ref, create2, deps);
|
|
30866
30866
|
},
|
|
30867
|
-
useInsertionEffect: function(
|
|
30867
|
+
useInsertionEffect: function(create2, deps) {
|
|
30868
30868
|
currentHookNameInDev = "useInsertionEffect";
|
|
30869
30869
|
warnInvalidHookAccess();
|
|
30870
30870
|
updateHookTypesDev();
|
|
30871
|
-
return updateEffectImpl(4, Insertion,
|
|
30871
|
+
return updateEffectImpl(4, Insertion, create2, deps);
|
|
30872
30872
|
},
|
|
30873
|
-
useLayoutEffect: function(
|
|
30873
|
+
useLayoutEffect: function(create2, deps) {
|
|
30874
30874
|
currentHookNameInDev = "useLayoutEffect";
|
|
30875
30875
|
warnInvalidHookAccess();
|
|
30876
30876
|
updateHookTypesDev();
|
|
30877
|
-
return updateEffectImpl(4, Layout,
|
|
30877
|
+
return updateEffectImpl(4, Layout, create2, deps);
|
|
30878
30878
|
},
|
|
30879
|
-
useMemo: function(
|
|
30879
|
+
useMemo: function(create2, deps) {
|
|
30880
30880
|
currentHookNameInDev = "useMemo";
|
|
30881
30881
|
warnInvalidHookAccess();
|
|
30882
30882
|
updateHookTypesDev();
|
|
30883
30883
|
var prevDispatcher = ReactSharedInternals.H;
|
|
30884
30884
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
30885
30885
|
try {
|
|
30886
|
-
return updateMemo(
|
|
30886
|
+
return updateMemo(create2, deps);
|
|
30887
30887
|
} finally {
|
|
30888
30888
|
ReactSharedInternals.H = prevDispatcher;
|
|
30889
30889
|
}
|
|
@@ -31494,7 +31494,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
31494
31494
|
queue,
|
|
31495
31495
|
pendingState,
|
|
31496
31496
|
NotPendingTransition,
|
|
31497
|
-
null === action ?
|
|
31497
|
+
null === action ? noop4 : function() {
|
|
31498
31498
|
null === ReactSharedInternals.T && console.error(
|
|
31499
31499
|
"requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
|
|
31500
31500
|
);
|
|
@@ -32501,8 +32501,8 @@ var require_core3 = __commonJS({
|
|
|
32501
32501
|
this.add(node);
|
|
32502
32502
|
}
|
|
32503
32503
|
toHTML() {
|
|
32504
|
-
const
|
|
32505
|
-
return
|
|
32504
|
+
const renderer = new HTMLRenderer(this, this.options);
|
|
32505
|
+
return renderer.value();
|
|
32506
32506
|
}
|
|
32507
32507
|
finalize() {
|
|
32508
32508
|
this.closeAllNodes();
|
|
@@ -74088,10 +74088,11 @@ async function saveTasks(cwd2, tasks) {
|
|
|
74088
74088
|
|
|
74089
74089
|
// ../cli/dist/tools/tasks.js
|
|
74090
74090
|
var TasksParams = external_exports.object({
|
|
74091
|
-
action: external_exports.enum(["add", "list", "done", "remove"]).describe("Action: add a task, list tasks, mark done, or
|
|
74091
|
+
action: external_exports.enum(["add", "list", "done", "remove", "status"]).describe("Action: add a task, list tasks, mark done, remove, or status (set a task's status to pending/in-progress/done)"),
|
|
74092
74092
|
title: external_exports.string().optional().describe("Short task title for display (max ~10 words, required for add)"),
|
|
74093
74093
|
prompt: external_exports.string().optional().describe("The standalone prompt sent to an agent with no context (required for add). Concise, actionable instruction with file paths and what to change."),
|
|
74094
|
-
id: external_exports.string().optional().describe("Task ID (required for done/remove \u2014 use list to find IDs)")
|
|
74094
|
+
id: external_exports.string().optional().describe("Task ID (required for done/remove/status \u2014 use list to find IDs)"),
|
|
74095
|
+
status: external_exports.enum(["pending", "in-progress", "done"]).optional().describe("New status (required for the status action). Only the status changes \u2014 the task's title and prompt are preserved. Use this to roll a stuck task back to pending (e.g. it was left in-progress by a dispatch that never finished because of an auth/network error) or to mark one in-progress/done by hand.")
|
|
74095
74096
|
});
|
|
74096
74097
|
function createTasksTool(cwd2) {
|
|
74097
74098
|
let pending = Promise.resolve();
|
|
@@ -74104,10 +74105,10 @@ function createTasksTool(cwd2) {
|
|
|
74104
74105
|
}
|
|
74105
74106
|
return {
|
|
74106
74107
|
name: "tasks",
|
|
74107
|
-
description: "Manage the project task list. Each task has a short title (shown in the task pane) and a prompt (sent as a standalone instruction to an agent with no context). Write prompts as concise, actionable directives with specific file paths \u2014 the agent must complete it from the prompt alone. When adding multiple tasks, order them by dependency \u2014 foundational work first, then core logic, integration, UI, and tests. Do not use this tool proactively \u2014 only manage the task list when the user explicitly requests it.",
|
|
74108
|
+
description: "Manage the project task list. Each task has a short title (shown in the task pane) and a prompt (sent as a standalone instruction to an agent with no context). Write prompts as concise, actionable directives with specific file paths \u2014 the agent must complete it from the prompt alone. When adding multiple tasks, order them by dependency \u2014 foundational work first, then core logic, integration, UI, and tests. Use the `status` action to change a task's status (pending/in-progress/done) without touching its prompt \u2014 e.g. to reset a task that got stuck in-progress after an interrupted or errored run. Do not use this tool proactively \u2014 only manage the task list when the user explicitly requests it.",
|
|
74108
74109
|
parameters: TasksParams,
|
|
74109
74110
|
executionMode: "sequential",
|
|
74110
|
-
execute({ action, title, prompt, id: id2 }) {
|
|
74111
|
+
execute({ action, title, prompt, id: id2, status }) {
|
|
74111
74112
|
return enqueue(async () => {
|
|
74112
74113
|
switch (action) {
|
|
74113
74114
|
case "add": {
|
|
@@ -74161,6 +74162,24 @@ function createTasksTool(cwd2) {
|
|
|
74161
74162
|
log("INFO", "tasks", `Task removed: ${removed.title}`, { id: removed.id });
|
|
74162
74163
|
return `Removed: "${removed.title}"`;
|
|
74163
74164
|
}
|
|
74165
|
+
case "status": {
|
|
74166
|
+
if (!id2?.trim())
|
|
74167
|
+
return "Error: id is required for status action.";
|
|
74168
|
+
if (!status)
|
|
74169
|
+
return "Error: status is required for status action.";
|
|
74170
|
+
const tasks = await loadTasks(cwd2);
|
|
74171
|
+
const task = tasks.find((item) => item.id === id2 || item.id.startsWith(id2));
|
|
74172
|
+
if (!task)
|
|
74173
|
+
return `Error: no task found matching id "${id2}".`;
|
|
74174
|
+
if (task.status === status) {
|
|
74175
|
+
return `Task "${task.title}" is already ${status}.`;
|
|
74176
|
+
}
|
|
74177
|
+
const newStatus = status;
|
|
74178
|
+
const updated = tasks.map((item) => item.id === task.id ? { ...item, status: newStatus } : item);
|
|
74179
|
+
await saveTasks(cwd2, updated);
|
|
74180
|
+
log("INFO", "tasks", `Task status: ${task.title} -> ${newStatus}`, { id: task.id });
|
|
74181
|
+
return `Status set to ${newStatus}: "${task.title}"`;
|
|
74182
|
+
}
|
|
74164
74183
|
}
|
|
74165
74184
|
});
|
|
74166
74185
|
}
|
|
@@ -87033,15 +87052,15 @@ function wrapAnsi(string4, columns, options) {
|
|
|
87033
87052
|
return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
|
|
87034
87053
|
}
|
|
87035
87054
|
|
|
87036
|
-
//
|
|
87055
|
+
// ../ink/build/index.js
|
|
87037
87056
|
init_esm_shims();
|
|
87038
87057
|
|
|
87039
|
-
//
|
|
87058
|
+
// ../ink/build/render.js
|
|
87040
87059
|
init_esm_shims();
|
|
87041
87060
|
import { Stream as Stream3 } from "stream";
|
|
87042
87061
|
import process14 from "process";
|
|
87043
87062
|
|
|
87044
|
-
//
|
|
87063
|
+
// ../ink/build/ink.js
|
|
87045
87064
|
init_esm_shims();
|
|
87046
87065
|
var import_react15 = __toESM(require_react(), 1);
|
|
87047
87066
|
import process13 from "process";
|
|
@@ -87419,7 +87438,7 @@ function autoBind(self, { include, exclude } = {}) {
|
|
|
87419
87438
|
return self;
|
|
87420
87439
|
}
|
|
87421
87440
|
|
|
87422
|
-
//
|
|
87441
|
+
// ../ink/build/ink.js
|
|
87423
87442
|
var import_signal_exit2 = __toESM(require_signal_exit(), 1);
|
|
87424
87443
|
|
|
87425
87444
|
// ../../node_modules/.pnpm/patch-console@2.0.0/node_modules/patch-console/dist/index.js
|
|
@@ -87469,7 +87488,7 @@ var patchConsole = (callback) => {
|
|
|
87469
87488
|
};
|
|
87470
87489
|
var dist_default = patchConsole;
|
|
87471
87490
|
|
|
87472
|
-
//
|
|
87491
|
+
// ../ink/build/ink.js
|
|
87473
87492
|
var import_constants4 = __toESM(require_constants(), 1);
|
|
87474
87493
|
|
|
87475
87494
|
// ../../node_modules/.pnpm/yoga-layout@3.2.1/node_modules/yoga-layout/dist/src/index.js
|
|
@@ -89341,22 +89360,22 @@ var resize = () => {
|
|
|
89341
89360
|
}
|
|
89342
89361
|
};
|
|
89343
89362
|
|
|
89344
|
-
//
|
|
89363
|
+
// ../ink/build/utils.js
|
|
89345
89364
|
init_esm_shims();
|
|
89346
89365
|
import process6 from "process";
|
|
89347
89366
|
var isDev = () => process6.env["DEV"] === "true";
|
|
89348
89367
|
|
|
89349
|
-
//
|
|
89368
|
+
// ../ink/build/reconciler.js
|
|
89350
89369
|
init_esm_shims();
|
|
89351
89370
|
var import_react_reconciler = __toESM(require_react_reconciler(), 1);
|
|
89352
89371
|
var import_constants3 = __toESM(require_constants(), 1);
|
|
89353
89372
|
var Scheduler = __toESM(require_scheduler(), 1);
|
|
89354
89373
|
var import_react = __toESM(require_react(), 1);
|
|
89355
89374
|
|
|
89356
|
-
//
|
|
89375
|
+
// ../ink/build/dom.js
|
|
89357
89376
|
init_esm_shims();
|
|
89358
89377
|
|
|
89359
|
-
//
|
|
89378
|
+
// ../ink/build/measure-text.js
|
|
89360
89379
|
init_esm_shims();
|
|
89361
89380
|
|
|
89362
89381
|
// ../../node_modules/.pnpm/widest-line@6.0.0/node_modules/widest-line/index.js
|
|
@@ -89369,7 +89388,7 @@ function widestLine(string4) {
|
|
|
89369
89388
|
return lineWidth;
|
|
89370
89389
|
}
|
|
89371
89390
|
|
|
89372
|
-
//
|
|
89391
|
+
// ../ink/build/measure-text.js
|
|
89373
89392
|
var cache = /* @__PURE__ */ new Map();
|
|
89374
89393
|
var measureText = (text) => {
|
|
89375
89394
|
if (text.length === 0) {
|
|
@@ -89390,7 +89409,7 @@ var measureText = (text) => {
|
|
|
89390
89409
|
};
|
|
89391
89410
|
var measure_text_default = measureText;
|
|
89392
89411
|
|
|
89393
|
-
//
|
|
89412
|
+
// ../ink/build/wrap-text.js
|
|
89394
89413
|
init_esm_shims();
|
|
89395
89414
|
|
|
89396
89415
|
// ../../node_modules/.pnpm/cli-truncate@5.2.0/node_modules/cli-truncate/index.js
|
|
@@ -90346,7 +90365,7 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
90346
90365
|
throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
|
|
90347
90366
|
}
|
|
90348
90367
|
|
|
90349
|
-
//
|
|
90368
|
+
// ../ink/build/wrap-text.js
|
|
90350
90369
|
var cache2 = {};
|
|
90351
90370
|
var wrapText = (text, maxWidth, wrapType) => {
|
|
90352
90371
|
const cacheKey = text + String(maxWidth) + String(wrapType);
|
|
@@ -90376,13 +90395,13 @@ var wrapText = (text, maxWidth, wrapType) => {
|
|
|
90376
90395
|
};
|
|
90377
90396
|
var wrap_text_default = wrapText;
|
|
90378
90397
|
|
|
90379
|
-
//
|
|
90398
|
+
// ../ink/build/squash-text-nodes.js
|
|
90380
90399
|
init_esm_shims();
|
|
90381
90400
|
|
|
90382
|
-
//
|
|
90401
|
+
// ../ink/build/sanitize-ansi.js
|
|
90383
90402
|
init_esm_shims();
|
|
90384
90403
|
|
|
90385
|
-
//
|
|
90404
|
+
// ../ink/build/ansi-tokenizer.js
|
|
90386
90405
|
init_esm_shims();
|
|
90387
90406
|
var bellCharacter = "\x07";
|
|
90388
90407
|
var escapeCharacter = "\x1B";
|
|
@@ -90690,7 +90709,7 @@ var tokenizeAnsi2 = (text) => {
|
|
|
90690
90709
|
return tokens2;
|
|
90691
90710
|
};
|
|
90692
90711
|
|
|
90693
|
-
//
|
|
90712
|
+
// ../ink/build/sanitize-ansi.js
|
|
90694
90713
|
var sgrParametersRegex = /^[\d:;]*$/;
|
|
90695
90714
|
var sanitizeAnsi = (text) => {
|
|
90696
90715
|
if (!hasAnsiControlCharacters(text)) {
|
|
@@ -90710,7 +90729,7 @@ var sanitizeAnsi = (text) => {
|
|
|
90710
90729
|
};
|
|
90711
90730
|
var sanitize_ansi_default = sanitizeAnsi;
|
|
90712
90731
|
|
|
90713
|
-
//
|
|
90732
|
+
// ../ink/build/squash-text-nodes.js
|
|
90714
90733
|
var squashTextNodes = (node) => {
|
|
90715
90734
|
let text = "";
|
|
90716
90735
|
for (let index = 0; index < node.childNodes.length; index++) {
|
|
@@ -90735,7 +90754,7 @@ var squashTextNodes = (node) => {
|
|
|
90735
90754
|
};
|
|
90736
90755
|
var squash_text_nodes_default = squashTextNodes;
|
|
90737
90756
|
|
|
90738
|
-
//
|
|
90757
|
+
// ../ink/build/dom.js
|
|
90739
90758
|
var createNode = (nodeName) => {
|
|
90740
90759
|
const node = {
|
|
90741
90760
|
nodeName,
|
|
@@ -90851,7 +90870,7 @@ var setTextNodeValue = (node, text) => {
|
|
|
90851
90870
|
markNodeAsDirty(node);
|
|
90852
90871
|
};
|
|
90853
90872
|
|
|
90854
|
-
//
|
|
90873
|
+
// ../ink/build/styles.js
|
|
90855
90874
|
init_esm_shims();
|
|
90856
90875
|
var applyPositionStyles = (node, style) => {
|
|
90857
90876
|
if ("position" in style) {
|
|
@@ -91073,10 +91092,10 @@ var styles2 = (node, style = {}) => {
|
|
|
91073
91092
|
};
|
|
91074
91093
|
var styles_default = styles2;
|
|
91075
91094
|
|
|
91076
|
-
//
|
|
91095
|
+
// ../ink/build/reconciler.js
|
|
91077
91096
|
if (isDev()) {
|
|
91078
91097
|
try {
|
|
91079
|
-
await import("./devtools-
|
|
91098
|
+
await import("./devtools-TQEAGQ4I.js");
|
|
91080
91099
|
} catch (error51) {
|
|
91081
91100
|
if (error51.code === "ERR_MODULE_NOT_FOUND") {
|
|
91082
91101
|
console.warn(`
|
|
@@ -91334,10 +91353,10 @@ var reconciler_default = (0, import_react_reconciler.default)({
|
|
|
91334
91353
|
rendererVersion: packageJson.version
|
|
91335
91354
|
});
|
|
91336
91355
|
|
|
91337
|
-
//
|
|
91356
|
+
// ../ink/build/renderer.js
|
|
91338
91357
|
init_esm_shims();
|
|
91339
91358
|
|
|
91340
|
-
//
|
|
91359
|
+
// ../ink/build/render-node-to-output.js
|
|
91341
91360
|
init_esm_shims();
|
|
91342
91361
|
|
|
91343
91362
|
// ../../node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.js
|
|
@@ -91374,18 +91393,14 @@ function indentString(string4, count = 1, options = {}) {
|
|
|
91374
91393
|
return string4.replace(regex2, indent2.repeat(count));
|
|
91375
91394
|
}
|
|
91376
91395
|
|
|
91377
|
-
//
|
|
91396
|
+
// ../ink/build/get-max-width.js
|
|
91378
91397
|
init_esm_shims();
|
|
91379
|
-
var getMaxWidth = (yogaNode) => {
|
|
91380
|
-
return yogaNode.getComputedWidth() - yogaNode.getComputedPadding(src_default.EDGE_LEFT) - yogaNode.getComputedPadding(src_default.EDGE_RIGHT) - yogaNode.getComputedBorder(src_default.EDGE_LEFT) - yogaNode.getComputedBorder(src_default.EDGE_RIGHT);
|
|
91381
|
-
};
|
|
91382
|
-
var get_max_width_default = getMaxWidth;
|
|
91383
91398
|
|
|
91384
|
-
//
|
|
91399
|
+
// ../ink/build/render-border.js
|
|
91385
91400
|
init_esm_shims();
|
|
91386
91401
|
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
91387
91402
|
|
|
91388
|
-
//
|
|
91403
|
+
// ../ink/build/colorize.js
|
|
91389
91404
|
init_esm_shims();
|
|
91390
91405
|
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
|
|
91391
91406
|
var ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
@@ -91428,200 +91443,10 @@ var colorize = (str2, color2, type2) => {
|
|
|
91428
91443
|
};
|
|
91429
91444
|
var colorize_default = colorize;
|
|
91430
91445
|
|
|
91431
|
-
//
|
|
91432
|
-
var renderBorder = (x, y, node, output) => {
|
|
91433
|
-
if (node.style.borderStyle) {
|
|
91434
|
-
const width = node.yogaNode.getComputedWidth();
|
|
91435
|
-
const height = node.yogaNode.getComputedHeight();
|
|
91436
|
-
const box = typeof node.style.borderStyle === "string" ? import_cli_boxes.default[node.style.borderStyle] : node.style.borderStyle;
|
|
91437
|
-
const topBorderColor = node.style.borderTopColor ?? node.style.borderColor;
|
|
91438
|
-
const bottomBorderColor = node.style.borderBottomColor ?? node.style.borderColor;
|
|
91439
|
-
const leftBorderColor = node.style.borderLeftColor ?? node.style.borderColor;
|
|
91440
|
-
const rightBorderColor = node.style.borderRightColor ?? node.style.borderColor;
|
|
91441
|
-
const dimTopBorderColor = node.style.borderTopDimColor ?? node.style.borderDimColor;
|
|
91442
|
-
const dimBottomBorderColor = node.style.borderBottomDimColor ?? node.style.borderDimColor;
|
|
91443
|
-
const dimLeftBorderColor = node.style.borderLeftDimColor ?? node.style.borderDimColor;
|
|
91444
|
-
const dimRightBorderColor = node.style.borderRightDimColor ?? node.style.borderDimColor;
|
|
91445
|
-
const showTopBorder = node.style.borderTop !== false;
|
|
91446
|
-
const showBottomBorder = node.style.borderBottom !== false;
|
|
91447
|
-
const showLeftBorder = node.style.borderLeft !== false;
|
|
91448
|
-
const showRightBorder = node.style.borderRight !== false;
|
|
91449
|
-
const contentWidth = width - (showLeftBorder ? 1 : 0) - (showRightBorder ? 1 : 0);
|
|
91450
|
-
let topBorder = showTopBorder ? colorize_default((showLeftBorder ? box.topLeft : "") + box.top.repeat(contentWidth) + (showRightBorder ? box.topRight : ""), topBorderColor, "foreground") : void 0;
|
|
91451
|
-
if (showTopBorder && dimTopBorderColor) {
|
|
91452
|
-
topBorder = source_default.dim(topBorder);
|
|
91453
|
-
}
|
|
91454
|
-
let verticalBorderHeight = height;
|
|
91455
|
-
if (showTopBorder) {
|
|
91456
|
-
verticalBorderHeight -= 1;
|
|
91457
|
-
}
|
|
91458
|
-
if (showBottomBorder) {
|
|
91459
|
-
verticalBorderHeight -= 1;
|
|
91460
|
-
}
|
|
91461
|
-
let leftBorder = (colorize_default(box.left, leftBorderColor, "foreground") + "\n").repeat(verticalBorderHeight);
|
|
91462
|
-
if (dimLeftBorderColor) {
|
|
91463
|
-
leftBorder = source_default.dim(leftBorder);
|
|
91464
|
-
}
|
|
91465
|
-
let rightBorder = (colorize_default(box.right, rightBorderColor, "foreground") + "\n").repeat(verticalBorderHeight);
|
|
91466
|
-
if (dimRightBorderColor) {
|
|
91467
|
-
rightBorder = source_default.dim(rightBorder);
|
|
91468
|
-
}
|
|
91469
|
-
let bottomBorder = showBottomBorder ? colorize_default((showLeftBorder ? box.bottomLeft : "") + box.bottom.repeat(contentWidth) + (showRightBorder ? box.bottomRight : ""), bottomBorderColor, "foreground") : void 0;
|
|
91470
|
-
if (showBottomBorder && dimBottomBorderColor) {
|
|
91471
|
-
bottomBorder = source_default.dim(bottomBorder);
|
|
91472
|
-
}
|
|
91473
|
-
const offsetY = showTopBorder ? 1 : 0;
|
|
91474
|
-
if (topBorder) {
|
|
91475
|
-
output.write(x, y, topBorder, { transformers: [] });
|
|
91476
|
-
}
|
|
91477
|
-
if (showLeftBorder) {
|
|
91478
|
-
output.write(x, y + offsetY, leftBorder, { transformers: [] });
|
|
91479
|
-
}
|
|
91480
|
-
if (showRightBorder) {
|
|
91481
|
-
output.write(x + width - 1, y + offsetY, rightBorder, {
|
|
91482
|
-
transformers: []
|
|
91483
|
-
});
|
|
91484
|
-
}
|
|
91485
|
-
if (bottomBorder) {
|
|
91486
|
-
output.write(x, y + height - 1, bottomBorder, { transformers: [] });
|
|
91487
|
-
}
|
|
91488
|
-
}
|
|
91489
|
-
};
|
|
91490
|
-
var render_border_default = renderBorder;
|
|
91491
|
-
|
|
91492
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=6c70099ec5b01a8329f3b7bd932ceef28779e4c7f5795e7ff44fa28c2f9d6782_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/render-background.js
|
|
91446
|
+
// ../ink/build/render-background.js
|
|
91493
91447
|
init_esm_shims();
|
|
91494
|
-
var renderBackground = (x, y, node, output) => {
|
|
91495
|
-
if (!node.style.backgroundColor) {
|
|
91496
|
-
return;
|
|
91497
|
-
}
|
|
91498
|
-
const width = node.yogaNode.getComputedWidth();
|
|
91499
|
-
const height = node.yogaNode.getComputedHeight();
|
|
91500
|
-
const leftBorderWidth = node.style.borderStyle && node.style.borderLeft !== false ? 1 : 0;
|
|
91501
|
-
const rightBorderWidth = node.style.borderStyle && node.style.borderRight !== false ? 1 : 0;
|
|
91502
|
-
const topBorderHeight = node.style.borderStyle && node.style.borderTop !== false ? 1 : 0;
|
|
91503
|
-
const bottomBorderHeight = node.style.borderStyle && node.style.borderBottom !== false ? 1 : 0;
|
|
91504
|
-
const contentWidth = width - leftBorderWidth - rightBorderWidth;
|
|
91505
|
-
const contentHeight = height - topBorderHeight - bottomBorderHeight;
|
|
91506
|
-
if (!(contentWidth > 0 && contentHeight > 0)) {
|
|
91507
|
-
return;
|
|
91508
|
-
}
|
|
91509
|
-
const backgroundLine = colorize_default(" ".repeat(contentWidth), node.style.backgroundColor, "background");
|
|
91510
|
-
for (let row = 0; row < contentHeight; row++) {
|
|
91511
|
-
output.write(x + leftBorderWidth, y + topBorderHeight + row, backgroundLine, { transformers: [] });
|
|
91512
|
-
}
|
|
91513
|
-
};
|
|
91514
|
-
var render_background_default = renderBackground;
|
|
91515
91448
|
|
|
91516
|
-
//
|
|
91517
|
-
var applyPaddingToText = (node, text) => {
|
|
91518
|
-
const yogaNode = node.childNodes[0]?.yogaNode;
|
|
91519
|
-
if (yogaNode) {
|
|
91520
|
-
const offsetX = yogaNode.getComputedLeft();
|
|
91521
|
-
const offsetY = yogaNode.getComputedTop();
|
|
91522
|
-
text = "\n".repeat(offsetY) + indentString(text, offsetX);
|
|
91523
|
-
}
|
|
91524
|
-
return text;
|
|
91525
|
-
};
|
|
91526
|
-
var renderNodeToScreenReaderOutput = (node, options = {}) => {
|
|
91527
|
-
if (options.skipStaticElements && node.internal_static) {
|
|
91528
|
-
return "";
|
|
91529
|
-
}
|
|
91530
|
-
if (node.yogaNode?.getDisplay() === src_default.DISPLAY_NONE) {
|
|
91531
|
-
return "";
|
|
91532
|
-
}
|
|
91533
|
-
let output = "";
|
|
91534
|
-
if (node.nodeName === "ink-text") {
|
|
91535
|
-
output = squash_text_nodes_default(node);
|
|
91536
|
-
} else if (node.nodeName === "ink-box" || node.nodeName === "ink-root") {
|
|
91537
|
-
const separator = node.style.flexDirection === "row" || node.style.flexDirection === "row-reverse" ? " " : "\n";
|
|
91538
|
-
const childNodes = node.style.flexDirection === "row-reverse" || node.style.flexDirection === "column-reverse" ? [...node.childNodes].reverse() : [...node.childNodes];
|
|
91539
|
-
output = childNodes.map((childNode) => {
|
|
91540
|
-
const screenReaderOutput = renderNodeToScreenReaderOutput(childNode, {
|
|
91541
|
-
parentRole: node.internal_accessibility?.role,
|
|
91542
|
-
skipStaticElements: options.skipStaticElements
|
|
91543
|
-
});
|
|
91544
|
-
return screenReaderOutput;
|
|
91545
|
-
}).filter(Boolean).join(separator);
|
|
91546
|
-
}
|
|
91547
|
-
if (node.internal_accessibility) {
|
|
91548
|
-
const { role, state: state3 } = node.internal_accessibility;
|
|
91549
|
-
if (state3) {
|
|
91550
|
-
const stateKeys = Object.keys(state3);
|
|
91551
|
-
const stateDescription = stateKeys.filter((key) => state3[key]).join(", ");
|
|
91552
|
-
if (stateDescription) {
|
|
91553
|
-
output = `(${stateDescription}) ${output}`;
|
|
91554
|
-
}
|
|
91555
|
-
}
|
|
91556
|
-
if (role && role !== options.parentRole) {
|
|
91557
|
-
output = `${role}: ${output}`;
|
|
91558
|
-
}
|
|
91559
|
-
}
|
|
91560
|
-
return output;
|
|
91561
|
-
};
|
|
91562
|
-
var renderNodeToOutput = (node, output, options) => {
|
|
91563
|
-
const { offsetX = 0, offsetY = 0, transformers = [], skipStaticElements } = options;
|
|
91564
|
-
if (skipStaticElements && node.internal_static) {
|
|
91565
|
-
return;
|
|
91566
|
-
}
|
|
91567
|
-
const { yogaNode } = node;
|
|
91568
|
-
if (yogaNode) {
|
|
91569
|
-
if (yogaNode.getDisplay() === src_default.DISPLAY_NONE) {
|
|
91570
|
-
return;
|
|
91571
|
-
}
|
|
91572
|
-
const x = offsetX + yogaNode.getComputedLeft();
|
|
91573
|
-
const y = offsetY + yogaNode.getComputedTop();
|
|
91574
|
-
let newTransformers = transformers;
|
|
91575
|
-
if (typeof node.internal_transform === "function") {
|
|
91576
|
-
newTransformers = [node.internal_transform, ...transformers];
|
|
91577
|
-
}
|
|
91578
|
-
if (node.nodeName === "ink-text") {
|
|
91579
|
-
let text = squash_text_nodes_default(node);
|
|
91580
|
-
if (text.length > 0) {
|
|
91581
|
-
const currentWidth = widestLine(text);
|
|
91582
|
-
const maxWidth = get_max_width_default(yogaNode);
|
|
91583
|
-
if (currentWidth > maxWidth) {
|
|
91584
|
-
const textWrap = node.style.textWrap ?? "wrap";
|
|
91585
|
-
text = wrap_text_default(text, maxWidth, textWrap);
|
|
91586
|
-
}
|
|
91587
|
-
text = applyPaddingToText(node, text);
|
|
91588
|
-
output.write(x, y, text, { transformers: newTransformers });
|
|
91589
|
-
}
|
|
91590
|
-
return;
|
|
91591
|
-
}
|
|
91592
|
-
let clipped = false;
|
|
91593
|
-
if (node.nodeName === "ink-box") {
|
|
91594
|
-
render_background_default(x, y, node, output);
|
|
91595
|
-
render_border_default(x, y, node, output);
|
|
91596
|
-
const clipHorizontally = node.style.overflowX === "hidden" || node.style.overflow === "hidden";
|
|
91597
|
-
const clipVertically = node.style.overflowY === "hidden" || node.style.overflow === "hidden";
|
|
91598
|
-
if (clipHorizontally || clipVertically) {
|
|
91599
|
-
const x1 = clipHorizontally ? x + yogaNode.getComputedBorder(src_default.EDGE_LEFT) : void 0;
|
|
91600
|
-
const x2 = clipHorizontally ? x + yogaNode.getComputedWidth() - yogaNode.getComputedBorder(src_default.EDGE_RIGHT) : void 0;
|
|
91601
|
-
const y1 = clipVertically ? y + yogaNode.getComputedBorder(src_default.EDGE_TOP) : void 0;
|
|
91602
|
-
const y2 = clipVertically ? y + yogaNode.getComputedHeight() - yogaNode.getComputedBorder(src_default.EDGE_BOTTOM) : void 0;
|
|
91603
|
-
output.clip({ x1, x2, y1, y2 });
|
|
91604
|
-
clipped = true;
|
|
91605
|
-
}
|
|
91606
|
-
}
|
|
91607
|
-
if (node.nodeName === "ink-root" || node.nodeName === "ink-box") {
|
|
91608
|
-
for (const childNode of node.childNodes) {
|
|
91609
|
-
renderNodeToOutput(childNode, output, {
|
|
91610
|
-
offsetX: x,
|
|
91611
|
-
offsetY: y,
|
|
91612
|
-
transformers: newTransformers,
|
|
91613
|
-
skipStaticElements
|
|
91614
|
-
});
|
|
91615
|
-
}
|
|
91616
|
-
if (clipped) {
|
|
91617
|
-
output.unclip();
|
|
91618
|
-
}
|
|
91619
|
-
}
|
|
91620
|
-
}
|
|
91621
|
-
};
|
|
91622
|
-
var render_node_to_output_default = renderNodeToOutput;
|
|
91623
|
-
|
|
91624
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=6c70099ec5b01a8329f3b7bd932ceef28779e4c7f5795e7ff44fa28c2f9d6782_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/output.js
|
|
91449
|
+
// ../ink/build/output.js
|
|
91625
91450
|
init_esm_shims();
|
|
91626
91451
|
|
|
91627
91452
|
// ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.2.5/node_modules/@alcalzone/ansi-tokenize/build/index.js
|
|
@@ -91890,235 +91715,7 @@ function tokenize4(str2, endChar = Number.POSITIVE_INFINITY) {
|
|
|
91890
91715
|
return ret;
|
|
91891
91716
|
}
|
|
91892
91717
|
|
|
91893
|
-
//
|
|
91894
|
-
var OutputCaches = class {
|
|
91895
|
-
widths = /* @__PURE__ */ new Map();
|
|
91896
|
-
blockWidths = /* @__PURE__ */ new Map();
|
|
91897
|
-
styledChars = /* @__PURE__ */ new Map();
|
|
91898
|
-
getStyledChars(line) {
|
|
91899
|
-
let cached4 = this.styledChars.get(line);
|
|
91900
|
-
if (cached4 === void 0) {
|
|
91901
|
-
cached4 = styledCharsFromTokens(tokenize4(line));
|
|
91902
|
-
this.styledChars.set(line, cached4);
|
|
91903
|
-
}
|
|
91904
|
-
return cached4;
|
|
91905
|
-
}
|
|
91906
|
-
getStringWidth(text) {
|
|
91907
|
-
let cached4 = this.widths.get(text);
|
|
91908
|
-
if (cached4 === void 0) {
|
|
91909
|
-
cached4 = stringWidth(text);
|
|
91910
|
-
this.widths.set(text, cached4);
|
|
91911
|
-
}
|
|
91912
|
-
return cached4;
|
|
91913
|
-
}
|
|
91914
|
-
getWidestLine(text) {
|
|
91915
|
-
let cached4 = this.blockWidths.get(text);
|
|
91916
|
-
if (cached4 === void 0) {
|
|
91917
|
-
let lineWidth = 0;
|
|
91918
|
-
for (const line of text.split("\n")) {
|
|
91919
|
-
lineWidth = Math.max(lineWidth, this.getStringWidth(line));
|
|
91920
|
-
}
|
|
91921
|
-
cached4 = lineWidth;
|
|
91922
|
-
this.blockWidths.set(text, cached4);
|
|
91923
|
-
}
|
|
91924
|
-
return cached4;
|
|
91925
|
-
}
|
|
91926
|
-
};
|
|
91927
|
-
var Output = class {
|
|
91928
|
-
width;
|
|
91929
|
-
height;
|
|
91930
|
-
operations = [];
|
|
91931
|
-
caches = new OutputCaches();
|
|
91932
|
-
constructor(options) {
|
|
91933
|
-
const { width, height } = options;
|
|
91934
|
-
this.width = width;
|
|
91935
|
-
this.height = height;
|
|
91936
|
-
}
|
|
91937
|
-
write(x, y, text, options) {
|
|
91938
|
-
const { transformers } = options;
|
|
91939
|
-
if (!text) {
|
|
91940
|
-
return;
|
|
91941
|
-
}
|
|
91942
|
-
this.operations.push({
|
|
91943
|
-
type: "write",
|
|
91944
|
-
x,
|
|
91945
|
-
y,
|
|
91946
|
-
text,
|
|
91947
|
-
transformers
|
|
91948
|
-
});
|
|
91949
|
-
}
|
|
91950
|
-
clip(clip) {
|
|
91951
|
-
this.operations.push({
|
|
91952
|
-
type: "clip",
|
|
91953
|
-
clip
|
|
91954
|
-
});
|
|
91955
|
-
}
|
|
91956
|
-
unclip() {
|
|
91957
|
-
this.operations.push({
|
|
91958
|
-
type: "unclip"
|
|
91959
|
-
});
|
|
91960
|
-
}
|
|
91961
|
-
get() {
|
|
91962
|
-
const output = [];
|
|
91963
|
-
for (let y = 0; y < this.height; y++) {
|
|
91964
|
-
const row = [];
|
|
91965
|
-
for (let x = 0; x < this.width; x++) {
|
|
91966
|
-
row.push({
|
|
91967
|
-
type: "char",
|
|
91968
|
-
value: " ",
|
|
91969
|
-
fullWidth: false,
|
|
91970
|
-
styles: []
|
|
91971
|
-
});
|
|
91972
|
-
}
|
|
91973
|
-
output.push(row);
|
|
91974
|
-
}
|
|
91975
|
-
const clips = [];
|
|
91976
|
-
for (const operation of this.operations) {
|
|
91977
|
-
if (operation.type === "clip") {
|
|
91978
|
-
clips.push(operation.clip);
|
|
91979
|
-
}
|
|
91980
|
-
if (operation.type === "unclip") {
|
|
91981
|
-
clips.pop();
|
|
91982
|
-
}
|
|
91983
|
-
if (operation.type === "write") {
|
|
91984
|
-
const { text, transformers } = operation;
|
|
91985
|
-
let { x, y } = operation;
|
|
91986
|
-
let lines = text.split("\n");
|
|
91987
|
-
const clip = clips.at(-1);
|
|
91988
|
-
if (clip) {
|
|
91989
|
-
const clipHorizontally = typeof clip?.x1 === "number" && typeof clip?.x2 === "number";
|
|
91990
|
-
const clipVertically = typeof clip?.y1 === "number" && typeof clip?.y2 === "number";
|
|
91991
|
-
if (clipHorizontally) {
|
|
91992
|
-
const width = this.caches.getWidestLine(text);
|
|
91993
|
-
if (x + width < clip.x1 || x > clip.x2) {
|
|
91994
|
-
continue;
|
|
91995
|
-
}
|
|
91996
|
-
}
|
|
91997
|
-
if (clipVertically) {
|
|
91998
|
-
const height = lines.length;
|
|
91999
|
-
if (y + height < clip.y1 || y > clip.y2) {
|
|
92000
|
-
continue;
|
|
92001
|
-
}
|
|
92002
|
-
}
|
|
92003
|
-
if (clipHorizontally) {
|
|
92004
|
-
lines = lines.map((line) => {
|
|
92005
|
-
const from = x < clip.x1 ? clip.x1 - x : 0;
|
|
92006
|
-
const width = this.caches.getStringWidth(line);
|
|
92007
|
-
const to = x + width > clip.x2 ? clip.x2 - x : width;
|
|
92008
|
-
return sliceAnsi(line, from, to);
|
|
92009
|
-
});
|
|
92010
|
-
if (x < clip.x1) {
|
|
92011
|
-
x = clip.x1;
|
|
92012
|
-
}
|
|
92013
|
-
}
|
|
92014
|
-
if (clipVertically) {
|
|
92015
|
-
const from = y < clip.y1 ? clip.y1 - y : 0;
|
|
92016
|
-
const height = lines.length;
|
|
92017
|
-
const to = y + height > clip.y2 ? clip.y2 - y : height;
|
|
92018
|
-
lines = lines.slice(from, to);
|
|
92019
|
-
if (y < clip.y1) {
|
|
92020
|
-
y = clip.y1;
|
|
92021
|
-
}
|
|
92022
|
-
}
|
|
92023
|
-
}
|
|
92024
|
-
let offsetY = 0;
|
|
92025
|
-
for (let [index, line] of lines.entries()) {
|
|
92026
|
-
const currentLine = output[y + offsetY];
|
|
92027
|
-
if (!currentLine) {
|
|
92028
|
-
continue;
|
|
92029
|
-
}
|
|
92030
|
-
for (const transformer of transformers) {
|
|
92031
|
-
line = transformer(line, index);
|
|
92032
|
-
}
|
|
92033
|
-
const characters = this.caches.getStyledChars(line);
|
|
92034
|
-
let offsetX = x;
|
|
92035
|
-
for (const character of characters) {
|
|
92036
|
-
currentLine[offsetX] = character;
|
|
92037
|
-
const characterWidth = Math.max(1, this.caches.getStringWidth(character.value));
|
|
92038
|
-
if (characterWidth > 1) {
|
|
92039
|
-
for (let index2 = 1; index2 < characterWidth; index2++) {
|
|
92040
|
-
currentLine[offsetX + index2] = {
|
|
92041
|
-
type: "char",
|
|
92042
|
-
value: "",
|
|
92043
|
-
fullWidth: false,
|
|
92044
|
-
styles: character.styles
|
|
92045
|
-
};
|
|
92046
|
-
}
|
|
92047
|
-
}
|
|
92048
|
-
offsetX += characterWidth;
|
|
92049
|
-
}
|
|
92050
|
-
offsetY++;
|
|
92051
|
-
}
|
|
92052
|
-
}
|
|
92053
|
-
}
|
|
92054
|
-
const generatedOutput = output.map((line) => {
|
|
92055
|
-
const lineWithoutEmptyItems = line.filter((item) => item !== void 0);
|
|
92056
|
-
return styledCharsToString(lineWithoutEmptyItems).trimEnd();
|
|
92057
|
-
}).join("\n");
|
|
92058
|
-
return {
|
|
92059
|
-
output: generatedOutput,
|
|
92060
|
-
height: output.length
|
|
92061
|
-
};
|
|
92062
|
-
}
|
|
92063
|
-
};
|
|
92064
|
-
|
|
92065
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=6c70099ec5b01a8329f3b7bd932ceef28779e4c7f5795e7ff44fa28c2f9d6782_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/renderer.js
|
|
92066
|
-
var renderer = (node, isScreenReaderEnabled) => {
|
|
92067
|
-
if (node.yogaNode) {
|
|
92068
|
-
if (isScreenReaderEnabled) {
|
|
92069
|
-
const output2 = renderNodeToScreenReaderOutput(node, {
|
|
92070
|
-
skipStaticElements: true
|
|
92071
|
-
});
|
|
92072
|
-
const outputHeight2 = output2 === "" ? 0 : output2.split("\n").length;
|
|
92073
|
-
let staticOutput2 = "";
|
|
92074
|
-
if (node.staticNode) {
|
|
92075
|
-
staticOutput2 = renderNodeToScreenReaderOutput(node.staticNode, {
|
|
92076
|
-
skipStaticElements: false
|
|
92077
|
-
});
|
|
92078
|
-
}
|
|
92079
|
-
return {
|
|
92080
|
-
output: output2,
|
|
92081
|
-
outputHeight: outputHeight2,
|
|
92082
|
-
staticOutput: staticOutput2 ? `${staticOutput2}
|
|
92083
|
-
` : ""
|
|
92084
|
-
};
|
|
92085
|
-
}
|
|
92086
|
-
const output = new Output({
|
|
92087
|
-
width: node.yogaNode.getComputedWidth(),
|
|
92088
|
-
height: node.yogaNode.getComputedHeight()
|
|
92089
|
-
});
|
|
92090
|
-
render_node_to_output_default(node, output, {
|
|
92091
|
-
skipStaticElements: true
|
|
92092
|
-
});
|
|
92093
|
-
let staticOutput;
|
|
92094
|
-
if (node.staticNode?.yogaNode) {
|
|
92095
|
-
staticOutput = new Output({
|
|
92096
|
-
width: node.staticNode.yogaNode.getComputedWidth(),
|
|
92097
|
-
height: node.staticNode.yogaNode.getComputedHeight()
|
|
92098
|
-
});
|
|
92099
|
-
render_node_to_output_default(node.staticNode, staticOutput, {
|
|
92100
|
-
skipStaticElements: false
|
|
92101
|
-
});
|
|
92102
|
-
}
|
|
92103
|
-
const { output: generatedOutput, height: outputHeight } = output.get();
|
|
92104
|
-
return {
|
|
92105
|
-
output: generatedOutput,
|
|
92106
|
-
outputHeight,
|
|
92107
|
-
// Newline at the end is needed, because static output doesn't have one, so
|
|
92108
|
-
// interactive output will override last line of static output
|
|
92109
|
-
staticOutput: staticOutput ? `${staticOutput.get().output}
|
|
92110
|
-
` : ""
|
|
92111
|
-
};
|
|
92112
|
-
}
|
|
92113
|
-
return {
|
|
92114
|
-
output: "",
|
|
92115
|
-
outputHeight: 0,
|
|
92116
|
-
staticOutput: ""
|
|
92117
|
-
};
|
|
92118
|
-
};
|
|
92119
|
-
var renderer_default = renderer;
|
|
92120
|
-
|
|
92121
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=6c70099ec5b01a8329f3b7bd932ceef28779e4c7f5795e7ff44fa28c2f9d6782_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/log-update.js
|
|
91718
|
+
// ../ink/build/log-update.js
|
|
92122
91719
|
init_esm_shims();
|
|
92123
91720
|
|
|
92124
91721
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
@@ -92167,276 +91764,22 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
92167
91764
|
};
|
|
92168
91765
|
var cli_cursor_default = cliCursor;
|
|
92169
91766
|
|
|
92170
|
-
//
|
|
91767
|
+
// ../ink/build/cursor-helpers.js
|
|
92171
91768
|
init_esm_shims();
|
|
92172
|
-
var showCursorEscape = "\x1B[?25h";
|
|
92173
|
-
var hideCursorEscape = "\x1B[?25l";
|
|
92174
|
-
var cursorPositionChanged = (a, b) => a?.x !== b?.x || a?.y !== b?.y;
|
|
92175
|
-
var buildCursorSuffix = (visibleLineCount2, cursorPosition) => {
|
|
92176
|
-
if (!cursorPosition) {
|
|
92177
|
-
return "";
|
|
92178
|
-
}
|
|
92179
|
-
const moveUp = visibleLineCount2 - cursorPosition.y;
|
|
92180
|
-
return (moveUp > 0 ? base_exports.cursorUp(moveUp) : "") + base_exports.cursorTo(cursorPosition.x) + showCursorEscape;
|
|
92181
|
-
};
|
|
92182
|
-
var buildReturnToBottom = (previousLineCount, previousCursorPosition) => {
|
|
92183
|
-
if (!previousCursorPosition) {
|
|
92184
|
-
return "";
|
|
92185
|
-
}
|
|
92186
|
-
const down = previousLineCount - 1 - previousCursorPosition.y;
|
|
92187
|
-
return (down > 0 ? base_exports.cursorDown(down) : "") + base_exports.cursorTo(0);
|
|
92188
|
-
};
|
|
92189
|
-
var buildCursorOnlySequence = (input) => {
|
|
92190
|
-
const hidePrefix = input.cursorWasShown ? hideCursorEscape : "";
|
|
92191
|
-
const returnToBottom = buildReturnToBottom(input.previousLineCount, input.previousCursorPosition);
|
|
92192
|
-
const cursorSuffix = buildCursorSuffix(input.visibleLineCount, input.cursorPosition);
|
|
92193
|
-
return hidePrefix + returnToBottom + cursorSuffix;
|
|
92194
|
-
};
|
|
92195
|
-
var buildReturnToBottomPrefix = (cursorWasShown, previousLineCount, previousCursorPosition) => {
|
|
92196
|
-
if (!cursorWasShown) {
|
|
92197
|
-
return "";
|
|
92198
|
-
}
|
|
92199
|
-
return hideCursorEscape + buildReturnToBottom(previousLineCount, previousCursorPosition);
|
|
92200
|
-
};
|
|
92201
|
-
|
|
92202
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=6c70099ec5b01a8329f3b7bd932ceef28779e4c7f5795e7ff44fa28c2f9d6782_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/log-update.js
|
|
92203
|
-
var visibleLineCount = (lines, str2) => str2.endsWith("\n") ? lines.length - 1 : lines.length;
|
|
92204
|
-
var createStandard = (stream2, { showCursor = false } = {}) => {
|
|
92205
|
-
let previousLineCount = 0;
|
|
92206
|
-
let previousOutput = "";
|
|
92207
|
-
let hasHiddenCursor = false;
|
|
92208
|
-
let cursorPosition;
|
|
92209
|
-
let cursorDirty = false;
|
|
92210
|
-
let previousCursorPosition;
|
|
92211
|
-
let cursorWasShown = false;
|
|
92212
|
-
const getActiveCursor = () => cursorDirty ? cursorPosition : void 0;
|
|
92213
|
-
const hasChanges = (str2, activeCursor) => {
|
|
92214
|
-
const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
92215
|
-
return str2 !== previousOutput || cursorChanged;
|
|
92216
|
-
};
|
|
92217
|
-
const render2 = (str2) => {
|
|
92218
|
-
if (!showCursor && !hasHiddenCursor) {
|
|
92219
|
-
cli_cursor_default.hide(stream2);
|
|
92220
|
-
hasHiddenCursor = true;
|
|
92221
|
-
}
|
|
92222
|
-
const activeCursor = getActiveCursor();
|
|
92223
|
-
cursorDirty = false;
|
|
92224
|
-
const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
92225
|
-
if (!hasChanges(str2, activeCursor)) {
|
|
92226
|
-
return false;
|
|
92227
|
-
}
|
|
92228
|
-
const lines = str2.split("\n");
|
|
92229
|
-
const visibleCount = visibleLineCount(lines, str2);
|
|
92230
|
-
const cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
|
|
92231
|
-
if (str2 === previousOutput && cursorChanged) {
|
|
92232
|
-
stream2.write(buildCursorOnlySequence({
|
|
92233
|
-
cursorWasShown,
|
|
92234
|
-
previousLineCount,
|
|
92235
|
-
previousCursorPosition,
|
|
92236
|
-
visibleLineCount: visibleCount,
|
|
92237
|
-
cursorPosition: activeCursor
|
|
92238
|
-
}));
|
|
92239
|
-
} else {
|
|
92240
|
-
previousOutput = str2;
|
|
92241
|
-
const returnPrefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
|
|
92242
|
-
stream2.write(returnPrefix + base_exports.eraseLines(previousLineCount) + str2 + cursorSuffix);
|
|
92243
|
-
previousLineCount = lines.length;
|
|
92244
|
-
}
|
|
92245
|
-
previousCursorPosition = activeCursor ? { ...activeCursor } : void 0;
|
|
92246
|
-
cursorWasShown = activeCursor !== void 0;
|
|
92247
|
-
return true;
|
|
92248
|
-
};
|
|
92249
|
-
render2.clear = () => {
|
|
92250
|
-
const prefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
|
|
92251
|
-
stream2.write(prefix + base_exports.eraseLines(previousLineCount));
|
|
92252
|
-
previousOutput = "";
|
|
92253
|
-
previousLineCount = 0;
|
|
92254
|
-
previousCursorPosition = void 0;
|
|
92255
|
-
cursorWasShown = false;
|
|
92256
|
-
};
|
|
92257
|
-
render2.done = () => {
|
|
92258
|
-
previousOutput = "";
|
|
92259
|
-
previousLineCount = 0;
|
|
92260
|
-
previousCursorPosition = void 0;
|
|
92261
|
-
cursorWasShown = false;
|
|
92262
|
-
if (!showCursor) {
|
|
92263
|
-
cli_cursor_default.show(stream2);
|
|
92264
|
-
hasHiddenCursor = false;
|
|
92265
|
-
}
|
|
92266
|
-
};
|
|
92267
|
-
render2.sync = (str2) => {
|
|
92268
|
-
const activeCursor = cursorDirty ? cursorPosition : void 0;
|
|
92269
|
-
cursorDirty = false;
|
|
92270
|
-
const lines = str2.split("\n");
|
|
92271
|
-
previousOutput = str2;
|
|
92272
|
-
previousLineCount = lines.length;
|
|
92273
|
-
if (!activeCursor && cursorWasShown) {
|
|
92274
|
-
stream2.write(hideCursorEscape);
|
|
92275
|
-
}
|
|
92276
|
-
if (activeCursor) {
|
|
92277
|
-
stream2.write(buildCursorSuffix(visibleLineCount(lines, str2), activeCursor));
|
|
92278
|
-
}
|
|
92279
|
-
previousCursorPosition = activeCursor ? { ...activeCursor } : void 0;
|
|
92280
|
-
cursorWasShown = activeCursor !== void 0;
|
|
92281
|
-
};
|
|
92282
|
-
render2.setCursorPosition = (position) => {
|
|
92283
|
-
cursorPosition = position;
|
|
92284
|
-
cursorDirty = true;
|
|
92285
|
-
};
|
|
92286
|
-
render2.isCursorDirty = () => cursorDirty;
|
|
92287
|
-
render2.willRender = (str2) => hasChanges(str2, getActiveCursor());
|
|
92288
|
-
return render2;
|
|
92289
|
-
};
|
|
92290
|
-
var createIncremental = (stream2, { showCursor = false } = {}) => {
|
|
92291
|
-
let previousLines = [];
|
|
92292
|
-
let previousOutput = "";
|
|
92293
|
-
let hasHiddenCursor = false;
|
|
92294
|
-
let cursorPosition;
|
|
92295
|
-
let cursorDirty = false;
|
|
92296
|
-
let previousCursorPosition;
|
|
92297
|
-
let cursorWasShown = false;
|
|
92298
|
-
const getActiveCursor = () => cursorDirty ? cursorPosition : void 0;
|
|
92299
|
-
const hasChanges = (str2, activeCursor) => {
|
|
92300
|
-
const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
92301
|
-
return str2 !== previousOutput || cursorChanged;
|
|
92302
|
-
};
|
|
92303
|
-
const render2 = (str2) => {
|
|
92304
|
-
if (!showCursor && !hasHiddenCursor) {
|
|
92305
|
-
cli_cursor_default.hide(stream2);
|
|
92306
|
-
hasHiddenCursor = true;
|
|
92307
|
-
}
|
|
92308
|
-
const activeCursor = getActiveCursor();
|
|
92309
|
-
cursorDirty = false;
|
|
92310
|
-
const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
92311
|
-
if (!hasChanges(str2, activeCursor)) {
|
|
92312
|
-
return false;
|
|
92313
|
-
}
|
|
92314
|
-
const nextLines = str2.split("\n");
|
|
92315
|
-
const visibleCount = visibleLineCount(nextLines, str2);
|
|
92316
|
-
const previousVisible = visibleLineCount(previousLines, previousOutput);
|
|
92317
|
-
if (str2 === previousOutput && cursorChanged) {
|
|
92318
|
-
stream2.write(buildCursorOnlySequence({
|
|
92319
|
-
cursorWasShown,
|
|
92320
|
-
previousLineCount: previousLines.length,
|
|
92321
|
-
previousCursorPosition,
|
|
92322
|
-
visibleLineCount: visibleCount,
|
|
92323
|
-
cursorPosition: activeCursor
|
|
92324
|
-
}));
|
|
92325
|
-
previousCursorPosition = activeCursor ? { ...activeCursor } : void 0;
|
|
92326
|
-
cursorWasShown = activeCursor !== void 0;
|
|
92327
|
-
return true;
|
|
92328
|
-
}
|
|
92329
|
-
const returnPrefix = buildReturnToBottomPrefix(cursorWasShown, previousLines.length, previousCursorPosition);
|
|
92330
|
-
if (str2 === "\n" || previousOutput.length === 0) {
|
|
92331
|
-
const cursorSuffix2 = buildCursorSuffix(visibleCount, activeCursor);
|
|
92332
|
-
stream2.write(returnPrefix + base_exports.eraseLines(previousLines.length) + str2 + cursorSuffix2);
|
|
92333
|
-
cursorWasShown = activeCursor !== void 0;
|
|
92334
|
-
previousCursorPosition = activeCursor ? { ...activeCursor } : void 0;
|
|
92335
|
-
previousOutput = str2;
|
|
92336
|
-
previousLines = nextLines;
|
|
92337
|
-
return true;
|
|
92338
|
-
}
|
|
92339
|
-
const hasTrailingNewline = str2.endsWith("\n");
|
|
92340
|
-
const buffer = [];
|
|
92341
|
-
buffer.push(returnPrefix);
|
|
92342
|
-
if (visibleCount < previousVisible) {
|
|
92343
|
-
const previousHadTrailingNewline = previousOutput.endsWith("\n");
|
|
92344
|
-
const extraSlot = previousHadTrailingNewline ? 1 : 0;
|
|
92345
|
-
buffer.push(base_exports.eraseLines(previousVisible - visibleCount + extraSlot), base_exports.cursorUp(visibleCount));
|
|
92346
|
-
} else {
|
|
92347
|
-
buffer.push(base_exports.cursorUp(previousVisible - 1));
|
|
92348
|
-
}
|
|
92349
|
-
for (let i = 0; i < visibleCount; i++) {
|
|
92350
|
-
const isLastLine = i === visibleCount - 1;
|
|
92351
|
-
if (nextLines[i] === previousLines[i]) {
|
|
92352
|
-
if (!isLastLine || hasTrailingNewline) {
|
|
92353
|
-
buffer.push(base_exports.cursorNextLine);
|
|
92354
|
-
}
|
|
92355
|
-
continue;
|
|
92356
|
-
}
|
|
92357
|
-
buffer.push(base_exports.cursorTo(0) + nextLines[i] + base_exports.eraseEndLine + // Don't append newline after the last line when the input
|
|
92358
|
-
// has no trailing newline (fullscreen mode).
|
|
92359
|
-
(isLastLine && !hasTrailingNewline ? "" : "\n"));
|
|
92360
|
-
}
|
|
92361
|
-
const cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
|
|
92362
|
-
buffer.push(cursorSuffix);
|
|
92363
|
-
stream2.write(buffer.join(""));
|
|
92364
|
-
cursorWasShown = activeCursor !== void 0;
|
|
92365
|
-
previousCursorPosition = activeCursor ? { ...activeCursor } : void 0;
|
|
92366
|
-
previousOutput = str2;
|
|
92367
|
-
previousLines = nextLines;
|
|
92368
|
-
return true;
|
|
92369
|
-
};
|
|
92370
|
-
render2.clear = () => {
|
|
92371
|
-
const prefix = buildReturnToBottomPrefix(cursorWasShown, previousLines.length, previousCursorPosition);
|
|
92372
|
-
stream2.write(prefix + base_exports.eraseLines(previousLines.length));
|
|
92373
|
-
previousOutput = "";
|
|
92374
|
-
previousLines = [];
|
|
92375
|
-
previousCursorPosition = void 0;
|
|
92376
|
-
cursorWasShown = false;
|
|
92377
|
-
};
|
|
92378
|
-
render2.done = () => {
|
|
92379
|
-
previousOutput = "";
|
|
92380
|
-
previousLines = [];
|
|
92381
|
-
previousCursorPosition = void 0;
|
|
92382
|
-
cursorWasShown = false;
|
|
92383
|
-
if (!showCursor) {
|
|
92384
|
-
cli_cursor_default.show(stream2);
|
|
92385
|
-
hasHiddenCursor = false;
|
|
92386
|
-
}
|
|
92387
|
-
};
|
|
92388
|
-
render2.sync = (str2) => {
|
|
92389
|
-
const activeCursor = cursorDirty ? cursorPosition : void 0;
|
|
92390
|
-
cursorDirty = false;
|
|
92391
|
-
const lines = str2.split("\n");
|
|
92392
|
-
previousOutput = str2;
|
|
92393
|
-
previousLines = lines;
|
|
92394
|
-
if (!activeCursor && cursorWasShown) {
|
|
92395
|
-
stream2.write(hideCursorEscape);
|
|
92396
|
-
}
|
|
92397
|
-
if (activeCursor) {
|
|
92398
|
-
stream2.write(buildCursorSuffix(visibleLineCount(lines, str2), activeCursor));
|
|
92399
|
-
}
|
|
92400
|
-
previousCursorPosition = activeCursor ? { ...activeCursor } : void 0;
|
|
92401
|
-
cursorWasShown = activeCursor !== void 0;
|
|
92402
|
-
};
|
|
92403
|
-
render2.setCursorPosition = (position) => {
|
|
92404
|
-
cursorPosition = position;
|
|
92405
|
-
cursorDirty = true;
|
|
92406
|
-
};
|
|
92407
|
-
render2.isCursorDirty = () => cursorDirty;
|
|
92408
|
-
render2.willRender = (str2) => hasChanges(str2, getActiveCursor());
|
|
92409
|
-
return render2;
|
|
92410
|
-
};
|
|
92411
|
-
var create2 = (stream2, { showCursor = false, incremental = false } = {}) => {
|
|
92412
|
-
if (incremental) {
|
|
92413
|
-
return createIncremental(stream2, { showCursor });
|
|
92414
|
-
}
|
|
92415
|
-
return createStandard(stream2, { showCursor });
|
|
92416
|
-
};
|
|
92417
|
-
var logUpdate = { create: create2 };
|
|
92418
|
-
var log_update_default = logUpdate;
|
|
92419
91769
|
|
|
92420
|
-
//
|
|
91770
|
+
// ../ink/build/write-synchronized.js
|
|
92421
91771
|
init_esm_shims();
|
|
92422
|
-
var bsu = "\x1B[?2026h";
|
|
92423
|
-
var esu = "\x1B[?2026l";
|
|
92424
|
-
function shouldSynchronize(stream2) {
|
|
92425
|
-
return "isTTY" in stream2 && stream2.isTTY === true && !is_in_ci_default;
|
|
92426
|
-
}
|
|
92427
91772
|
|
|
92428
|
-
//
|
|
91773
|
+
// ../ink/build/instances.js
|
|
92429
91774
|
init_esm_shims();
|
|
92430
|
-
var instances = /* @__PURE__ */ new WeakMap();
|
|
92431
|
-
var instances_default = instances;
|
|
92432
91775
|
|
|
92433
|
-
//
|
|
91776
|
+
// ../ink/build/components/App.js
|
|
92434
91777
|
init_esm_shims();
|
|
92435
91778
|
var import_react14 = __toESM(require_react(), 1);
|
|
92436
91779
|
import { EventEmitter as EventEmitter2 } from "events";
|
|
92437
91780
|
import process12 from "process";
|
|
92438
91781
|
|
|
92439
|
-
//
|
|
91782
|
+
// ../ink/build/input-parser.js
|
|
92440
91783
|
init_esm_shims();
|
|
92441
91784
|
var escape2 = "\x1B";
|
|
92442
91785
|
var isCsiParameterByte = (byte) => {
|
|
@@ -92591,7 +91934,7 @@ var createInputParser = () => {
|
|
|
92591
91934
|
};
|
|
92592
91935
|
};
|
|
92593
91936
|
|
|
92594
|
-
//
|
|
91937
|
+
// ../ink/build/components/AppContext.js
|
|
92595
91938
|
init_esm_shims();
|
|
92596
91939
|
var import_react2 = __toESM(require_react(), 1);
|
|
92597
91940
|
var AppContext = (0, import_react2.createContext)({
|
|
@@ -92601,7 +91944,7 @@ var AppContext = (0, import_react2.createContext)({
|
|
|
92601
91944
|
AppContext.displayName = "InternalAppContext";
|
|
92602
91945
|
var AppContext_default = AppContext;
|
|
92603
91946
|
|
|
92604
|
-
//
|
|
91947
|
+
// ../ink/build/components/StdinContext.js
|
|
92605
91948
|
init_esm_shims();
|
|
92606
91949
|
var import_react3 = __toESM(require_react(), 1);
|
|
92607
91950
|
import { EventEmitter } from "events";
|
|
@@ -92619,7 +91962,7 @@ var StdinContext = (0, import_react3.createContext)({
|
|
|
92619
91962
|
StdinContext.displayName = "InternalStdinContext";
|
|
92620
91963
|
var StdinContext_default = StdinContext;
|
|
92621
91964
|
|
|
92622
|
-
//
|
|
91965
|
+
// ../ink/build/components/StdoutContext.js
|
|
92623
91966
|
init_esm_shims();
|
|
92624
91967
|
var import_react4 = __toESM(require_react(), 1);
|
|
92625
91968
|
import process10 from "process";
|
|
@@ -92631,7 +91974,7 @@ var StdoutContext = (0, import_react4.createContext)({
|
|
|
92631
91974
|
StdoutContext.displayName = "InternalStdoutContext";
|
|
92632
91975
|
var StdoutContext_default = StdoutContext;
|
|
92633
91976
|
|
|
92634
|
-
//
|
|
91977
|
+
// ../ink/build/components/StderrContext.js
|
|
92635
91978
|
init_esm_shims();
|
|
92636
91979
|
var import_react5 = __toESM(require_react(), 1);
|
|
92637
91980
|
import process11 from "process";
|
|
@@ -92643,7 +91986,7 @@ var StderrContext = (0, import_react5.createContext)({
|
|
|
92643
91986
|
StderrContext.displayName = "InternalStderrContext";
|
|
92644
91987
|
var StderrContext_default = StderrContext;
|
|
92645
91988
|
|
|
92646
|
-
//
|
|
91989
|
+
// ../ink/build/components/FocusContext.js
|
|
92647
91990
|
init_esm_shims();
|
|
92648
91991
|
var import_react6 = __toESM(require_react(), 1);
|
|
92649
91992
|
var FocusContext = (0, import_react6.createContext)({
|
|
@@ -92670,7 +92013,7 @@ var FocusContext = (0, import_react6.createContext)({
|
|
|
92670
92013
|
FocusContext.displayName = "InternalFocusContext";
|
|
92671
92014
|
var FocusContext_default = FocusContext;
|
|
92672
92015
|
|
|
92673
|
-
//
|
|
92016
|
+
// ../ink/build/components/CursorContext.js
|
|
92674
92017
|
init_esm_shims();
|
|
92675
92018
|
var import_react7 = __toESM(require_react(), 1);
|
|
92676
92019
|
var CursorContext = (0, import_react7.createContext)({
|
|
@@ -92680,11 +92023,11 @@ var CursorContext = (0, import_react7.createContext)({
|
|
|
92680
92023
|
CursorContext.displayName = "InternalCursorContext";
|
|
92681
92024
|
var CursorContext_default = CursorContext;
|
|
92682
92025
|
|
|
92683
|
-
//
|
|
92026
|
+
// ../ink/build/components/ErrorBoundary.js
|
|
92684
92027
|
init_esm_shims();
|
|
92685
92028
|
var import_react13 = __toESM(require_react(), 1);
|
|
92686
92029
|
|
|
92687
|
-
//
|
|
92030
|
+
// ../ink/build/components/ErrorOverview.js
|
|
92688
92031
|
init_esm_shims();
|
|
92689
92032
|
var import_react12 = __toESM(require_react(), 1);
|
|
92690
92033
|
var import_stack_utils = __toESM(require_stack_utils(), 1);
|
|
@@ -92727,23 +92070,23 @@ var codeExcerpt = (source2, line, options = {}) => {
|
|
|
92727
92070
|
};
|
|
92728
92071
|
var dist_default3 = codeExcerpt;
|
|
92729
92072
|
|
|
92730
|
-
//
|
|
92073
|
+
// ../ink/build/components/Box.js
|
|
92731
92074
|
init_esm_shims();
|
|
92732
92075
|
var import_react10 = __toESM(require_react(), 1);
|
|
92733
92076
|
|
|
92734
|
-
//
|
|
92077
|
+
// ../ink/build/components/AccessibilityContext.js
|
|
92735
92078
|
init_esm_shims();
|
|
92736
92079
|
var import_react8 = __toESM(require_react(), 1);
|
|
92737
92080
|
var accessibilityContext = (0, import_react8.createContext)({
|
|
92738
92081
|
isScreenReaderEnabled: false
|
|
92739
92082
|
});
|
|
92740
92083
|
|
|
92741
|
-
//
|
|
92084
|
+
// ../ink/build/components/BackgroundContext.js
|
|
92742
92085
|
init_esm_shims();
|
|
92743
92086
|
var import_react9 = __toESM(require_react(), 1);
|
|
92744
92087
|
var backgroundContext = (0, import_react9.createContext)(void 0);
|
|
92745
92088
|
|
|
92746
|
-
//
|
|
92089
|
+
// ../ink/build/components/Box.js
|
|
92747
92090
|
var Box = (0, import_react10.forwardRef)(({ children, backgroundColor, "aria-label": ariaLabel, "aria-hidden": ariaHidden, "aria-role": role, "aria-state": ariaState, ...style }, ref) => {
|
|
92748
92091
|
const { isScreenReaderEnabled } = (0, import_react10.useContext)(accessibilityContext);
|
|
92749
92092
|
const label = ariaLabel ? import_react10.default.createElement("ink-text", null, ariaLabel) : void 0;
|
|
@@ -92771,7 +92114,7 @@ var Box = (0, import_react10.forwardRef)(({ children, backgroundColor, "aria-lab
|
|
|
92771
92114
|
Box.displayName = "Box";
|
|
92772
92115
|
var Box_default = Box;
|
|
92773
92116
|
|
|
92774
|
-
//
|
|
92117
|
+
// ../ink/build/components/Text.js
|
|
92775
92118
|
init_esm_shims();
|
|
92776
92119
|
var import_react11 = __toESM(require_react(), 1);
|
|
92777
92120
|
function Text({ color: color2, backgroundColor, dimColor = false, bold = false, italic = false, underline = false, strikethrough = false, inverse = false, wrap = "wrap", children, "aria-label": ariaLabel, "aria-hidden": ariaHidden = false }) {
|
|
@@ -92815,7 +92158,7 @@ function Text({ color: color2, backgroundColor, dimColor = false, bold = false,
|
|
|
92815
92158
|
return import_react11.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row", textWrap: wrap }, internal_transform: transform2 }, isScreenReaderEnabled && ariaLabel ? ariaLabel : children);
|
|
92816
92159
|
}
|
|
92817
92160
|
|
|
92818
|
-
//
|
|
92161
|
+
// ../ink/build/components/ErrorOverview.js
|
|
92819
92162
|
var cleanupPath = (path46) => {
|
|
92820
92163
|
return path46?.replace(`file://${cwd()}/`, "");
|
|
92821
92164
|
};
|
|
@@ -92924,7 +92267,7 @@ function ErrorOverview({ error: error51 }) {
|
|
|
92924
92267
|
);
|
|
92925
92268
|
}
|
|
92926
92269
|
|
|
92927
|
-
//
|
|
92270
|
+
// ../ink/build/components/ErrorBoundary.js
|
|
92928
92271
|
var ErrorBoundary = class extends import_react13.PureComponent {
|
|
92929
92272
|
static displayName = "InternalErrorBoundary";
|
|
92930
92273
|
static getDerivedStateFromError(error51) {
|
|
@@ -92944,7 +92287,7 @@ var ErrorBoundary = class extends import_react13.PureComponent {
|
|
|
92944
92287
|
}
|
|
92945
92288
|
};
|
|
92946
92289
|
|
|
92947
|
-
//
|
|
92290
|
+
// ../ink/build/components/App.js
|
|
92948
92291
|
var tab = " ";
|
|
92949
92292
|
var shiftTab = "\x1B[Z";
|
|
92950
92293
|
var escape3 = "\x1B";
|
|
@@ -93276,24 +92619,9 @@ function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, ex
|
|
|
93276
92619
|
);
|
|
93277
92620
|
}
|
|
93278
92621
|
App.displayName = "InternalApp";
|
|
93279
|
-
var App_default = App;
|
|
93280
92622
|
|
|
93281
|
-
//
|
|
92623
|
+
// ../ink/build/kitty-keyboard.js
|
|
93282
92624
|
init_esm_shims();
|
|
93283
|
-
var kittyFlags = {
|
|
93284
|
-
disambiguateEscapeCodes: 1,
|
|
93285
|
-
reportEventTypes: 2,
|
|
93286
|
-
reportAlternateKeys: 4,
|
|
93287
|
-
reportAllKeysAsEscapeCodes: 8,
|
|
93288
|
-
reportAssociatedText: 16
|
|
93289
|
-
};
|
|
93290
|
-
function resolveFlags(flags) {
|
|
93291
|
-
let result = 0;
|
|
93292
|
-
for (const flag of flags) {
|
|
93293
|
-
result |= kittyFlags[flag];
|
|
93294
|
-
}
|
|
93295
|
-
return result;
|
|
93296
|
-
}
|
|
93297
92625
|
var kittyModifiers = {
|
|
93298
92626
|
shift: 1,
|
|
93299
92627
|
alt: 2,
|
|
@@ -93305,835 +92633,31 @@ var kittyModifiers = {
|
|
|
93305
92633
|
numLock: 128
|
|
93306
92634
|
};
|
|
93307
92635
|
|
|
93308
|
-
//
|
|
93309
|
-
var noop4 = () => {
|
|
93310
|
-
};
|
|
93311
|
-
var kittyQueryEscapeByte = 27;
|
|
93312
|
-
var kittyQueryOpenBracketByte = 91;
|
|
93313
|
-
var kittyQueryQuestionMarkByte = 63;
|
|
93314
|
-
var kittyQueryLetterByte = 117;
|
|
93315
|
-
var zeroByte = 48;
|
|
93316
|
-
var nineByte = 57;
|
|
93317
|
-
var isDigitByte = (byte) => byte >= zeroByte && byte <= nineByte;
|
|
93318
|
-
var matchKittyQueryResponse = (buffer, startIndex) => {
|
|
93319
|
-
if (buffer[startIndex] !== kittyQueryEscapeByte || buffer[startIndex + 1] !== kittyQueryOpenBracketByte || buffer[startIndex + 2] !== kittyQueryQuestionMarkByte) {
|
|
93320
|
-
return void 0;
|
|
93321
|
-
}
|
|
93322
|
-
let index = startIndex + 3;
|
|
93323
|
-
const digitsStartIndex = index;
|
|
93324
|
-
while (index < buffer.length && isDigitByte(buffer[index])) {
|
|
93325
|
-
index++;
|
|
93326
|
-
}
|
|
93327
|
-
if (index === digitsStartIndex) {
|
|
93328
|
-
return void 0;
|
|
93329
|
-
}
|
|
93330
|
-
if (index === buffer.length) {
|
|
93331
|
-
return { state: "partial" };
|
|
93332
|
-
}
|
|
93333
|
-
if (buffer[index] === kittyQueryLetterByte) {
|
|
93334
|
-
return { state: "complete", endIndex: index };
|
|
93335
|
-
}
|
|
93336
|
-
return void 0;
|
|
93337
|
-
};
|
|
93338
|
-
var hasCompleteKittyQueryResponse = (buffer) => {
|
|
93339
|
-
for (let index = 0; index < buffer.length; index++) {
|
|
93340
|
-
const match = matchKittyQueryResponse(buffer, index);
|
|
93341
|
-
if (match?.state === "complete") {
|
|
93342
|
-
return true;
|
|
93343
|
-
}
|
|
93344
|
-
}
|
|
93345
|
-
return false;
|
|
93346
|
-
};
|
|
93347
|
-
var stripKittyQueryResponsesAndTrailingPartial = (buffer) => {
|
|
93348
|
-
const keptBytes = [];
|
|
93349
|
-
let index = 0;
|
|
93350
|
-
while (index < buffer.length) {
|
|
93351
|
-
const match = matchKittyQueryResponse(buffer, index);
|
|
93352
|
-
if (match?.state === "complete") {
|
|
93353
|
-
index = match.endIndex + 1;
|
|
93354
|
-
continue;
|
|
93355
|
-
}
|
|
93356
|
-
if (match?.state === "partial") {
|
|
93357
|
-
break;
|
|
93358
|
-
}
|
|
93359
|
-
keptBytes.push(buffer[index]);
|
|
93360
|
-
index++;
|
|
93361
|
-
}
|
|
93362
|
-
return keptBytes;
|
|
93363
|
-
};
|
|
93364
|
-
var isErrorInput = (value) => {
|
|
93365
|
-
return value instanceof Error || Object.prototype.toString.call(value) === "[object Error]";
|
|
93366
|
-
};
|
|
93367
|
-
var Ink = class {
|
|
93368
|
-
/**
|
|
93369
|
-
Whether this instance is using concurrent rendering mode.
|
|
93370
|
-
*/
|
|
93371
|
-
isConcurrent;
|
|
93372
|
-
options;
|
|
93373
|
-
log;
|
|
93374
|
-
cursorPosition;
|
|
93375
|
-
throttledLog;
|
|
93376
|
-
isScreenReaderEnabled;
|
|
93377
|
-
// Ignore last render after unmounting a tree to prevent empty output before exit
|
|
93378
|
-
isUnmounted;
|
|
93379
|
-
isUnmounting;
|
|
93380
|
-
lastOutput;
|
|
93381
|
-
lastOutputToRender;
|
|
93382
|
-
lastOutputHeight;
|
|
93383
|
-
lastTerminalWidth;
|
|
93384
|
-
container;
|
|
93385
|
-
rootNode;
|
|
93386
|
-
// This variable is used only in debug mode to store full static output
|
|
93387
|
-
// so that it's rerendered every time, not just new static parts, like in non-debug mode
|
|
93388
|
-
fullStaticOutput;
|
|
93389
|
-
// [gg patch] Raw bytes queued via insertBeforeFrame(), folded atomically into the
|
|
93390
|
-
// next frame write. Invariant: every write that shrinks the live frame must carry
|
|
93391
|
-
// compensating scrollback bytes, otherwise the frame bottom (footer) jumps up.
|
|
93392
|
-
pendingFrameInsert;
|
|
93393
|
-
// [gg patch] Blank pad rows currently sitting directly above the frame
|
|
93394
|
-
// (written by anchorFrameToBottom on net shrink). Consumed by the next
|
|
93395
|
-
// net-growth write, which overwrites them instead of scrolling.
|
|
93396
|
-
framePadDebt = 0;
|
|
93397
|
-
// [gg patch] Runtime gate for pad CREATION (consumption always runs).
|
|
93398
|
-
// The app toggles this via setFrameAnchorActive(): on while the agent
|
|
93399
|
-
// runs (footer must not jump), off at idle so symmetric UI shrink
|
|
93400
|
-
// (slash menu close, etc.) lets the footer return up naturally.
|
|
93401
|
-
frameAnchorActive = true;
|
|
93402
|
-
// [gg patch] Content rows currently visible ABOVE the live frame on the
|
|
93403
|
-
// screen (excludes scrollback). Lets idle shrink know whether the frame
|
|
93404
|
-
// bottom is pinned at the screen bottom (shrink would strand dead rows).
|
|
93405
|
-
linesAboveFrame = 0;
|
|
93406
|
-
// [gg patch] App-provided callback: given a row count, return that many
|
|
93407
|
-
// hard-wrapped transcript-tail rows (newline-joined) to backfill vacated
|
|
93408
|
-
// rows on a bottom-pinned idle shrink. Undefined → footer rises (default).
|
|
93409
|
-
frameShrinkBackfill = void 0;
|
|
93410
|
-
exitPromise;
|
|
93411
|
-
exitResult;
|
|
93412
|
-
beforeExitHandler;
|
|
93413
|
-
restoreConsole;
|
|
93414
|
-
unsubscribeResize;
|
|
93415
|
-
throttledOnRender;
|
|
93416
|
-
hasPendingThrottledRender = false;
|
|
93417
|
-
kittyProtocolEnabled = false;
|
|
93418
|
-
cancelKittyDetection;
|
|
93419
|
-
constructor(options) {
|
|
93420
|
-
autoBind(this);
|
|
93421
|
-
this.options = options;
|
|
93422
|
-
this.rootNode = createNode("ink-root");
|
|
93423
|
-
this.rootNode.onComputeLayout = this.calculateLayout;
|
|
93424
|
-
this.isScreenReaderEnabled = options.isScreenReaderEnabled ?? process13.env["INK_SCREEN_READER"] === "true";
|
|
93425
|
-
const unthrottled = options.debug || this.isScreenReaderEnabled;
|
|
93426
|
-
const maxFps = options.maxFps ?? 30;
|
|
93427
|
-
const renderThrottleMs = maxFps > 0 ? Math.max(1, Math.ceil(1e3 / maxFps)) : 0;
|
|
93428
|
-
if (unthrottled) {
|
|
93429
|
-
this.rootNode.onRender = this.onRender;
|
|
93430
|
-
this.throttledOnRender = void 0;
|
|
93431
|
-
} else {
|
|
93432
|
-
const throttled = throttle(this.onRender, renderThrottleMs, {
|
|
93433
|
-
leading: true,
|
|
93434
|
-
trailing: true
|
|
93435
|
-
});
|
|
93436
|
-
this.rootNode.onRender = () => {
|
|
93437
|
-
this.hasPendingThrottledRender = true;
|
|
93438
|
-
throttled();
|
|
93439
|
-
};
|
|
93440
|
-
this.throttledOnRender = throttled;
|
|
93441
|
-
}
|
|
93442
|
-
this.rootNode.onImmediateRender = this.onRender;
|
|
93443
|
-
this.log = log_update_default.create(options.stdout, {
|
|
93444
|
-
incremental: options.incrementalRendering
|
|
93445
|
-
});
|
|
93446
|
-
this.cursorPosition = void 0;
|
|
93447
|
-
this.throttledLog = unthrottled ? this.log : throttle((output) => {
|
|
93448
|
-
const shouldWrite = this.log.willRender(output);
|
|
93449
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93450
|
-
if (sync && shouldWrite) {
|
|
93451
|
-
this.options.stdout.write(bsu);
|
|
93452
|
-
}
|
|
93453
|
-
this.log(output);
|
|
93454
|
-
if (sync && shouldWrite) {
|
|
93455
|
-
this.options.stdout.write(esu);
|
|
93456
|
-
}
|
|
93457
|
-
}, void 0, {
|
|
93458
|
-
leading: true,
|
|
93459
|
-
trailing: true
|
|
93460
|
-
});
|
|
93461
|
-
this.isUnmounted = false;
|
|
93462
|
-
this.isUnmounting = false;
|
|
93463
|
-
this.isConcurrent = options.concurrent ?? false;
|
|
93464
|
-
this.lastOutput = "";
|
|
93465
|
-
this.lastOutputToRender = "";
|
|
93466
|
-
this.lastOutputHeight = 0;
|
|
93467
|
-
this.lastTerminalWidth = this.getTerminalWidth();
|
|
93468
|
-
this.fullStaticOutput = "";
|
|
93469
|
-
this.pendingFrameInsert = "";
|
|
93470
|
-
const rootTag = options.concurrent ? import_constants4.ConcurrentRoot : import_constants4.LegacyRoot;
|
|
93471
|
-
this.container = reconciler_default.createContainer(this.rootNode, rootTag, null, false, null, "id", () => {
|
|
93472
|
-
}, () => {
|
|
93473
|
-
}, () => {
|
|
93474
|
-
}, () => {
|
|
93475
|
-
});
|
|
93476
|
-
this.unsubscribeExit = (0, import_signal_exit2.default)(this.unmount, { alwaysLast: false });
|
|
93477
|
-
if (isDev()) {
|
|
93478
|
-
reconciler_default.injectIntoDevTools();
|
|
93479
|
-
}
|
|
93480
|
-
if (options.patchConsole) {
|
|
93481
|
-
this.patchConsole();
|
|
93482
|
-
}
|
|
93483
|
-
if (!is_in_ci_default) {
|
|
93484
|
-
options.stdout.on("resize", this.resized);
|
|
93485
|
-
this.unsubscribeResize = () => {
|
|
93486
|
-
options.stdout.off("resize", this.resized);
|
|
93487
|
-
};
|
|
93488
|
-
}
|
|
93489
|
-
this.initKittyKeyboard();
|
|
93490
|
-
}
|
|
93491
|
-
getTerminalWidth = () => {
|
|
93492
|
-
if (this.options.stdout.columns) {
|
|
93493
|
-
return this.options.stdout.columns;
|
|
93494
|
-
}
|
|
93495
|
-
const size = terminalSize();
|
|
93496
|
-
return size?.columns ?? 80;
|
|
93497
|
-
};
|
|
93498
|
-
resized = () => {
|
|
93499
|
-
const currentWidth = this.getTerminalWidth();
|
|
93500
|
-
if (currentWidth < this.lastTerminalWidth) {
|
|
93501
|
-
this.log.clear();
|
|
93502
|
-
this.lastOutput = "";
|
|
93503
|
-
this.lastOutputToRender = "";
|
|
93504
|
-
}
|
|
93505
|
-
this.calculateLayout();
|
|
93506
|
-
this.onRender();
|
|
93507
|
-
this.lastTerminalWidth = currentWidth;
|
|
93508
|
-
};
|
|
93509
|
-
resolveExitPromise = () => {
|
|
93510
|
-
};
|
|
93511
|
-
rejectExitPromise = () => {
|
|
93512
|
-
};
|
|
93513
|
-
unsubscribeExit = () => {
|
|
93514
|
-
};
|
|
93515
|
-
handleAppExit = (errorOrResult) => {
|
|
93516
|
-
if (this.isUnmounted || this.isUnmounting) {
|
|
93517
|
-
return;
|
|
93518
|
-
}
|
|
93519
|
-
if (isErrorInput(errorOrResult)) {
|
|
93520
|
-
this.unmount(errorOrResult);
|
|
93521
|
-
return;
|
|
93522
|
-
}
|
|
93523
|
-
this.exitResult = errorOrResult;
|
|
93524
|
-
this.unmount();
|
|
93525
|
-
};
|
|
93526
|
-
setCursorPosition = (position) => {
|
|
93527
|
-
this.cursorPosition = position;
|
|
93528
|
-
this.log.setCursorPosition(position);
|
|
93529
|
-
};
|
|
93530
|
-
restoreLastOutput = () => {
|
|
93531
|
-
this.log.setCursorPosition(this.cursorPosition);
|
|
93532
|
-
this.log(this.lastOutputToRender || this.lastOutput + "\n");
|
|
93533
|
-
};
|
|
93534
|
-
calculateLayout = () => {
|
|
93535
|
-
const terminalWidth = this.getTerminalWidth();
|
|
93536
|
-
this.rootNode.yogaNode.setWidth(terminalWidth);
|
|
93537
|
-
this.rootNode.yogaNode.calculateLayout(void 0, void 0, src_default.DIRECTION_LTR);
|
|
93538
|
-
};
|
|
93539
|
-
onRender = () => {
|
|
93540
|
-
this.hasPendingThrottledRender = false;
|
|
93541
|
-
if (this.isUnmounted) {
|
|
93542
|
-
return;
|
|
93543
|
-
}
|
|
93544
|
-
const startTime = performance.now();
|
|
93545
|
-
let { output, outputHeight, staticOutput } = renderer_default(this.rootNode, this.isScreenReaderEnabled);
|
|
93546
|
-
this.options.onRender?.({ renderTime: performance.now() - startTime });
|
|
93547
|
-
if (this.options.clipFrameToTerminalHeight && this.options.stdout.isTTY && !this.isScreenReaderEnabled && !this.options.debug && !is_in_ci_default) {
|
|
93548
|
-
const maxRows = Math.max(1, this.options.stdout.rows - 2);
|
|
93549
|
-
if (outputHeight > maxRows) {
|
|
93550
|
-
output = output.split("\n").slice(-maxRows).join("\n");
|
|
93551
|
-
outputHeight = maxRows;
|
|
93552
|
-
}
|
|
93553
|
-
}
|
|
93554
|
-
const hasStaticOutput = staticOutput && staticOutput !== "\n";
|
|
93555
|
-
const frameInsert = this.pendingFrameInsert;
|
|
93556
|
-
this.pendingFrameInsert = "";
|
|
93557
|
-
const hasFrameInsert = frameInsert !== "";
|
|
93558
|
-
if (this.options.debug) {
|
|
93559
|
-
if (hasStaticOutput) {
|
|
93560
|
-
this.fullStaticOutput += staticOutput;
|
|
93561
|
-
}
|
|
93562
|
-
this.options.stdout.write(frameInsert + this.fullStaticOutput + output);
|
|
93563
|
-
return;
|
|
93564
|
-
}
|
|
93565
|
-
if (is_in_ci_default) {
|
|
93566
|
-
if (hasFrameInsert) {
|
|
93567
|
-
this.options.stdout.write(frameInsert);
|
|
93568
|
-
}
|
|
93569
|
-
if (hasStaticOutput) {
|
|
93570
|
-
this.options.stdout.write(staticOutput);
|
|
93571
|
-
}
|
|
93572
|
-
this.lastOutput = output;
|
|
93573
|
-
this.lastOutputToRender = output + "\n";
|
|
93574
|
-
this.lastOutputHeight = outputHeight;
|
|
93575
|
-
return;
|
|
93576
|
-
}
|
|
93577
|
-
if (this.isScreenReaderEnabled) {
|
|
93578
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93579
|
-
if (sync) {
|
|
93580
|
-
this.options.stdout.write(bsu);
|
|
93581
|
-
}
|
|
93582
|
-
if (hasStaticOutput || hasFrameInsert) {
|
|
93583
|
-
const erase = this.lastOutputHeight > 0 ? base_exports.eraseLines(this.lastOutputHeight) : "";
|
|
93584
|
-
this.options.stdout.write(erase + frameInsert + (hasStaticOutput ? staticOutput : ""));
|
|
93585
|
-
this.lastOutputHeight = 0;
|
|
93586
|
-
}
|
|
93587
|
-
if (output === this.lastOutput && !hasStaticOutput && !hasFrameInsert) {
|
|
93588
|
-
if (sync) {
|
|
93589
|
-
this.options.stdout.write(esu);
|
|
93590
|
-
}
|
|
93591
|
-
return;
|
|
93592
|
-
}
|
|
93593
|
-
const terminalWidth = this.getTerminalWidth();
|
|
93594
|
-
const wrappedOutput = wrapAnsi2(output, terminalWidth, {
|
|
93595
|
-
trim: false,
|
|
93596
|
-
hard: true
|
|
93597
|
-
});
|
|
93598
|
-
if (hasStaticOutput || hasFrameInsert) {
|
|
93599
|
-
this.options.stdout.write(wrappedOutput);
|
|
93600
|
-
} else {
|
|
93601
|
-
const erase = this.lastOutputHeight > 0 ? base_exports.eraseLines(this.lastOutputHeight) : "";
|
|
93602
|
-
this.options.stdout.write(erase + wrappedOutput);
|
|
93603
|
-
}
|
|
93604
|
-
this.lastOutput = output;
|
|
93605
|
-
this.lastOutputToRender = wrappedOutput;
|
|
93606
|
-
this.lastOutputHeight = wrappedOutput === "" ? 0 : wrappedOutput.split("\n").length;
|
|
93607
|
-
if (sync) {
|
|
93608
|
-
this.options.stdout.write(esu);
|
|
93609
|
-
}
|
|
93610
|
-
return;
|
|
93611
|
-
}
|
|
93612
|
-
if (hasStaticOutput) {
|
|
93613
|
-
this.fullStaticOutput += staticOutput;
|
|
93614
|
-
}
|
|
93615
|
-
const isFullscreen = this.options.stdout.isTTY && outputHeight >= this.options.stdout.rows;
|
|
93616
|
-
const outputToRender = isFullscreen ? output : output + "\n";
|
|
93617
|
-
let framePad = "";
|
|
93618
|
-
let padConsumeRows = 0;
|
|
93619
|
-
let backfillText = "";
|
|
93620
|
-
let backfillRows = 0;
|
|
93621
|
-
let doBackfillRepaint = false;
|
|
93622
|
-
if (this.options.anchorFrameToBottom && this.options.stdout.isTTY && !isFullscreen && this.lastOutputHeight > 0) {
|
|
93623
|
-
const insertLineCount = hasFrameInsert ? (frameInsert.match(/\n/g) ?? []).length : 0;
|
|
93624
|
-
const staticLineCount = hasStaticOutput ? (staticOutput.match(/\n/g) ?? []).length : 0;
|
|
93625
|
-
const delta = insertLineCount + staticLineCount + outputHeight - this.lastOutputHeight;
|
|
93626
|
-
const prevDebt = Math.min(this.framePadDebt, Math.max(0, this.options.stdout.rows - 2));
|
|
93627
|
-
const bottomPinned = this.linesAboveFrame + Math.max(this.lastOutputHeight, outputHeight) + 1 >= this.options.stdout.rows;
|
|
93628
|
-
if (!this.frameAnchorActive && delta !== 0 && bottomPinned && typeof this.frameShrinkBackfill === "function") {
|
|
93629
|
-
const needRows = Math.max(0, this.options.stdout.rows - outputHeight - 1);
|
|
93630
|
-
let fill;
|
|
93631
|
-
try {
|
|
93632
|
-
fill = needRows > 0 ? this.frameShrinkBackfill(needRows) : "";
|
|
93633
|
-
} catch {
|
|
93634
|
-
fill = void 0;
|
|
93635
|
-
}
|
|
93636
|
-
if (typeof fill === "string") {
|
|
93637
|
-
backfillText = fill === "" || fill.endsWith("\n") ? fill : fill + "\n";
|
|
93638
|
-
backfillRows = (backfillText.match(/\n/g) ?? []).length;
|
|
93639
|
-
doBackfillRepaint = true;
|
|
93640
|
-
padConsumeRows = 0;
|
|
93641
|
-
this.framePadDebt = 0;
|
|
93642
|
-
}
|
|
93643
|
-
}
|
|
93644
|
-
if (!doBackfillRepaint && (delta !== 0 && (this.frameAnchorActive || prevDebt > 0) || (hasFrameInsert || hasStaticOutput) && prevDebt > 0)) {
|
|
93645
|
-
const newDebt = this.frameAnchorActive ? Math.max(0, prevDebt - delta) : Math.min(prevDebt, Math.max(0, prevDebt - delta));
|
|
93646
|
-
padConsumeRows = prevDebt;
|
|
93647
|
-
framePad = newDebt > 0 ? "\n".repeat(newDebt) : "";
|
|
93648
|
-
this.framePadDebt = newDebt;
|
|
93649
|
-
}
|
|
93650
|
-
if (process13.env["GG_INK_DEBUG"] === "1" && (delta !== 0 || this.framePadDebt > 0)) {
|
|
93651
|
-
try {
|
|
93652
|
-
fs32.appendFileSync("/tmp/gg-ink-debug.log", JSON.stringify({
|
|
93653
|
-
t: Date.now() % 1e5,
|
|
93654
|
-
delta,
|
|
93655
|
-
ins: insertLineCount,
|
|
93656
|
-
out: outputHeight,
|
|
93657
|
-
last: this.lastOutputHeight,
|
|
93658
|
-
pad: framePad.length,
|
|
93659
|
-
consume: padConsumeRows,
|
|
93660
|
-
debt: this.framePadDebt,
|
|
93661
|
-
insHead: hasFrameInsert ? JSON.stringify(frameInsert.slice(0, 60)) : ""
|
|
93662
|
-
}) + "\n");
|
|
93663
|
-
} catch {
|
|
93664
|
-
}
|
|
93665
|
-
}
|
|
93666
|
-
}
|
|
93667
|
-
const hasFramePad = framePad !== "";
|
|
93668
|
-
const hasBackfill = doBackfillRepaint;
|
|
93669
|
-
const hasPadConsume = padConsumeRows > 0;
|
|
93670
|
-
if (hasBackfill) {
|
|
93671
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93672
|
-
if (sync) {
|
|
93673
|
-
this.options.stdout.write(bsu);
|
|
93674
|
-
}
|
|
93675
|
-
this.options.stdout.write(frameInsert + base_exports.cursorTo(0, 0) + base_exports.eraseDown + backfillText + outputToRender);
|
|
93676
|
-
this.lastOutput = output;
|
|
93677
|
-
this.lastOutputToRender = outputToRender;
|
|
93678
|
-
this.lastOutputHeight = outputHeight;
|
|
93679
|
-
this.log.sync(outputToRender);
|
|
93680
|
-
if (sync) {
|
|
93681
|
-
this.options.stdout.write(esu);
|
|
93682
|
-
}
|
|
93683
|
-
this.linesAboveFrame = backfillRows;
|
|
93684
|
-
return;
|
|
93685
|
-
}
|
|
93686
|
-
const rowsAddedAboveFrame = (hasFrameInsert ? (frameInsert.match(/\n/g) ?? []).length : 0) + (hasStaticOutput ? (staticOutput.match(/\n/g) ?? []).length : 0) + (hasFramePad ? framePad.length : 0) - padConsumeRows;
|
|
93687
|
-
if (isFullscreen && this.lastOutputHeight >= this.options.stdout.rows) {
|
|
93688
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93689
|
-
if (sync) {
|
|
93690
|
-
this.options.stdout.write(bsu);
|
|
93691
|
-
}
|
|
93692
|
-
this.framePadDebt = 0;
|
|
93693
|
-
this.options.stdout.write(frameInsert + base_exports.cursorTo(0, 0) + base_exports.eraseDown + this.fullStaticOutput + output);
|
|
93694
|
-
this.lastOutput = output;
|
|
93695
|
-
this.lastOutputToRender = outputToRender;
|
|
93696
|
-
this.lastOutputHeight = outputHeight;
|
|
93697
|
-
this.log.sync(outputToRender);
|
|
93698
|
-
if (sync) {
|
|
93699
|
-
this.options.stdout.write(esu);
|
|
93700
|
-
}
|
|
93701
|
-
return;
|
|
93702
|
-
}
|
|
93703
|
-
if (hasStaticOutput || hasFrameInsert || hasFramePad || hasPadConsume) {
|
|
93704
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93705
|
-
if (sync) {
|
|
93706
|
-
this.options.stdout.write(bsu);
|
|
93707
|
-
}
|
|
93708
|
-
this.log.clear();
|
|
93709
|
-
if (hasPadConsume) {
|
|
93710
|
-
this.options.stdout.write(base_exports.cursorUp(padConsumeRows));
|
|
93711
|
-
}
|
|
93712
|
-
this.options.stdout.write(frameInsert + (hasStaticOutput ? staticOutput : "") + framePad);
|
|
93713
|
-
this.log(outputToRender);
|
|
93714
|
-
if (sync) {
|
|
93715
|
-
this.options.stdout.write(esu);
|
|
93716
|
-
}
|
|
93717
|
-
} else if (output !== this.lastOutput || this.log.isCursorDirty()) {
|
|
93718
|
-
this.throttledLog(outputToRender);
|
|
93719
|
-
}
|
|
93720
|
-
this.linesAboveFrame = Math.max(0, this.linesAboveFrame + rowsAddedAboveFrame);
|
|
93721
|
-
const maxAbove = Math.max(0, this.options.stdout.rows - outputHeight);
|
|
93722
|
-
if (this.linesAboveFrame + outputHeight > this.options.stdout.rows) {
|
|
93723
|
-
this.linesAboveFrame = maxAbove;
|
|
93724
|
-
}
|
|
93725
|
-
this.lastOutput = output;
|
|
93726
|
-
this.lastOutputToRender = outputToRender;
|
|
93727
|
-
this.lastOutputHeight = outputHeight;
|
|
93728
|
-
};
|
|
93729
|
-
render(node) {
|
|
93730
|
-
const tree = import_react15.default.createElement(
|
|
93731
|
-
accessibilityContext.Provider,
|
|
93732
|
-
{ value: { isScreenReaderEnabled: this.isScreenReaderEnabled } },
|
|
93733
|
-
import_react15.default.createElement(App_default, { stdin: this.options.stdin, stdout: this.options.stdout, stderr: this.options.stderr, exitOnCtrlC: this.options.exitOnCtrlC, writeToStdout: this.writeToStdout, writeToStderr: this.writeToStderr, setCursorPosition: this.setCursorPosition, onExit: this.handleAppExit }, node)
|
|
93734
|
-
);
|
|
93735
|
-
if (this.options.concurrent) {
|
|
93736
|
-
reconciler_default.updateContainer(tree, this.container, null, noop4);
|
|
93737
|
-
} else {
|
|
93738
|
-
reconciler_default.updateContainerSync(tree, this.container, null, noop4);
|
|
93739
|
-
reconciler_default.flushSyncWork();
|
|
93740
|
-
}
|
|
93741
|
-
}
|
|
93742
|
-
// [gg patch] Toggle pad creation at runtime. See frameAnchorActive.
|
|
93743
|
-
// Deactivation reclaims leftover pad debt: a frame shrink right before the
|
|
93744
|
-
// run ended (tool panel collapse, finalization without a compensating
|
|
93745
|
-
// insert) left blank pad rows above the frame, and at idle nothing else
|
|
93746
|
-
// consumes them — they sit on screen as a permanent blank gap right above
|
|
93747
|
-
// the final response. While the frame is bottom-pinned the gap is
|
|
93748
|
-
// repainted in place with the app-provided transcript tail (footer stays
|
|
93749
|
-
// put); otherwise the frame rises over the pads (the vacated rows below
|
|
93750
|
-
// the risen frame are unwritten screen, not content).
|
|
93751
|
-
setFrameAnchorActive(active) {
|
|
93752
|
-
const reclaimDebt = this.frameAnchorActive && !active ? this.framePadDebt : 0;
|
|
93753
|
-
this.frameAnchorActive = active;
|
|
93754
|
-
if (reclaimDebt <= 0 || this.isUnmounted) {
|
|
93755
|
-
return;
|
|
93756
|
-
}
|
|
93757
|
-
this.framePadDebt = 0;
|
|
93758
|
-
if (this.options.debug || is_in_ci_default || !this.options.stdout.isTTY) {
|
|
93759
|
-
return;
|
|
93760
|
-
}
|
|
93761
|
-
const debt = Math.min(reclaimDebt, Math.max(0, this.options.stdout.rows - 2));
|
|
93762
|
-
const outputHeight = this.lastOutputHeight;
|
|
93763
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93764
|
-
const bottomPinned = this.linesAboveFrame + outputHeight + 1 >= this.options.stdout.rows;
|
|
93765
|
-
if (bottomPinned && typeof this.frameShrinkBackfill === "function") {
|
|
93766
|
-
const needRows = Math.max(0, this.options.stdout.rows - outputHeight - 1);
|
|
93767
|
-
let fill;
|
|
93768
|
-
try {
|
|
93769
|
-
fill = needRows > 0 ? this.frameShrinkBackfill(needRows) : "";
|
|
93770
|
-
} catch {
|
|
93771
|
-
fill = void 0;
|
|
93772
|
-
}
|
|
93773
|
-
if (typeof fill === "string") {
|
|
93774
|
-
const backfillText = fill === "" || fill.endsWith("\n") ? fill : fill + "\n";
|
|
93775
|
-
if (sync) {
|
|
93776
|
-
this.options.stdout.write(bsu);
|
|
93777
|
-
}
|
|
93778
|
-
this.options.stdout.write(base_exports.cursorTo(0, 0) + base_exports.eraseDown + backfillText + this.lastOutputToRender);
|
|
93779
|
-
this.log.sync(this.lastOutputToRender);
|
|
93780
|
-
if (sync) {
|
|
93781
|
-
this.options.stdout.write(esu);
|
|
93782
|
-
}
|
|
93783
|
-
this.linesAboveFrame = (backfillText.match(/\n/g) ?? []).length;
|
|
93784
|
-
return;
|
|
93785
|
-
}
|
|
93786
|
-
}
|
|
93787
|
-
if (sync) {
|
|
93788
|
-
this.options.stdout.write(bsu);
|
|
93789
|
-
}
|
|
93790
|
-
this.log.clear();
|
|
93791
|
-
this.options.stdout.write(base_exports.cursorUp(debt));
|
|
93792
|
-
this.log(this.lastOutputToRender);
|
|
93793
|
-
if (sync) {
|
|
93794
|
-
this.options.stdout.write(esu);
|
|
93795
|
-
}
|
|
93796
|
-
this.linesAboveFrame = Math.max(0, this.linesAboveFrame - debt);
|
|
93797
|
-
}
|
|
93798
|
-
// [gg patch] Install the transcript-tail provider. See frameShrinkBackfill.
|
|
93799
|
-
setFrameShrinkBackfill(fn) {
|
|
93800
|
-
this.frameShrinkBackfill = fn;
|
|
93801
|
-
}
|
|
93802
|
-
// [gg patch] Queue raw bytes to be written into scrollback atomically with the
|
|
93803
|
-
// next frame paint (mirrors Ink's <Static> output handling). Used by the app's
|
|
93804
|
-
// transcript flush so the frame shrink and the scrollback insert land in one write.
|
|
93805
|
-
insertBeforeFrame(data) {
|
|
93806
|
-
if (this.isUnmounted) {
|
|
93807
|
-
return;
|
|
93808
|
-
}
|
|
93809
|
-
if (this.options.debug || is_in_ci_default || !this.options.stdout.isTTY) {
|
|
93810
|
-
this.options.stdout.write(data);
|
|
93811
|
-
return;
|
|
93812
|
-
}
|
|
93813
|
-
this.pendingFrameInsert += data;
|
|
93814
|
-
setTimeout(() => {
|
|
93815
|
-
if (this.pendingFrameInsert && !this.isUnmounted) {
|
|
93816
|
-
this.onRender();
|
|
93817
|
-
}
|
|
93818
|
-
}, 100);
|
|
93819
|
-
}
|
|
93820
|
-
writeToStdout(data) {
|
|
93821
|
-
if (this.isUnmounted) {
|
|
93822
|
-
return;
|
|
93823
|
-
}
|
|
93824
|
-
if (this.options.debug) {
|
|
93825
|
-
this.options.stdout.write(data + this.fullStaticOutput + this.lastOutput);
|
|
93826
|
-
return;
|
|
93827
|
-
}
|
|
93828
|
-
if (is_in_ci_default) {
|
|
93829
|
-
this.options.stdout.write(data);
|
|
93830
|
-
return;
|
|
93831
|
-
}
|
|
93832
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93833
|
-
if (sync) {
|
|
93834
|
-
this.options.stdout.write(bsu);
|
|
93835
|
-
}
|
|
93836
|
-
this.log.clear();
|
|
93837
|
-
this.options.stdout.write(data);
|
|
93838
|
-
this.restoreLastOutput();
|
|
93839
|
-
if (sync) {
|
|
93840
|
-
this.options.stdout.write(esu);
|
|
93841
|
-
}
|
|
93842
|
-
if (data.includes("\n")) {
|
|
93843
|
-
this.framePadDebt = 0;
|
|
93844
|
-
this.linesAboveFrame = Math.min(this.linesAboveFrame + (data.match(/\n/g) ?? []).length, Math.max(0, this.options.stdout.rows - this.lastOutputHeight));
|
|
93845
|
-
}
|
|
93846
|
-
}
|
|
93847
|
-
writeToStderr(data) {
|
|
93848
|
-
if (this.isUnmounted) {
|
|
93849
|
-
return;
|
|
93850
|
-
}
|
|
93851
|
-
if (this.options.debug) {
|
|
93852
|
-
this.options.stderr.write(data);
|
|
93853
|
-
this.options.stdout.write(this.fullStaticOutput + this.lastOutput);
|
|
93854
|
-
return;
|
|
93855
|
-
}
|
|
93856
|
-
if (is_in_ci_default) {
|
|
93857
|
-
this.options.stderr.write(data);
|
|
93858
|
-
return;
|
|
93859
|
-
}
|
|
93860
|
-
const sync = shouldSynchronize(this.options.stdout);
|
|
93861
|
-
if (sync) {
|
|
93862
|
-
this.options.stdout.write(bsu);
|
|
93863
|
-
}
|
|
93864
|
-
this.log.clear();
|
|
93865
|
-
this.options.stderr.write(data);
|
|
93866
|
-
this.restoreLastOutput();
|
|
93867
|
-
if (sync) {
|
|
93868
|
-
this.options.stdout.write(esu);
|
|
93869
|
-
}
|
|
93870
|
-
if (data.includes("\n")) {
|
|
93871
|
-
this.framePadDebt = 0;
|
|
93872
|
-
this.linesAboveFrame = Math.min(this.linesAboveFrame + (data.match(/\n/g) ?? []).length, Math.max(0, this.options.stdout.rows - this.lastOutputHeight));
|
|
93873
|
-
}
|
|
93874
|
-
}
|
|
93875
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
93876
|
-
unmount(error51) {
|
|
93877
|
-
if (this.isUnmounted || this.isUnmounting) {
|
|
93878
|
-
return;
|
|
93879
|
-
}
|
|
93880
|
-
this.isUnmounting = true;
|
|
93881
|
-
if (this.beforeExitHandler) {
|
|
93882
|
-
process13.off("beforeExit", this.beforeExitHandler);
|
|
93883
|
-
this.beforeExitHandler = void 0;
|
|
93884
|
-
}
|
|
93885
|
-
const stdout = this.options.stdout;
|
|
93886
|
-
const canWriteToStdout = !stdout.destroyed && !stdout.writableEnded && (stdout.writable ?? true);
|
|
93887
|
-
const settleThrottle = (throttled) => {
|
|
93888
|
-
if (typeof throttled.flush !== "function") {
|
|
93889
|
-
return;
|
|
93890
|
-
}
|
|
93891
|
-
if (canWriteToStdout) {
|
|
93892
|
-
throttled.flush();
|
|
93893
|
-
} else if (typeof throttled.cancel === "function") {
|
|
93894
|
-
throttled.cancel();
|
|
93895
|
-
}
|
|
93896
|
-
};
|
|
93897
|
-
settleThrottle(this.throttledOnRender ?? {});
|
|
93898
|
-
if (canWriteToStdout) {
|
|
93899
|
-
const shouldRenderFinalFrame = !this.throttledOnRender || !this.hasPendingThrottledRender && this.fullStaticOutput === "";
|
|
93900
|
-
if (shouldRenderFinalFrame) {
|
|
93901
|
-
this.calculateLayout();
|
|
93902
|
-
this.onRender();
|
|
93903
|
-
}
|
|
93904
|
-
}
|
|
93905
|
-
if (this.pendingFrameInsert) {
|
|
93906
|
-
const pendingInsert = this.pendingFrameInsert;
|
|
93907
|
-
this.pendingFrameInsert = "";
|
|
93908
|
-
if (canWriteToStdout) {
|
|
93909
|
-
this.options.stdout.write(pendingInsert);
|
|
93910
|
-
}
|
|
93911
|
-
}
|
|
93912
|
-
this.isUnmounted = true;
|
|
93913
|
-
this.unsubscribeExit();
|
|
93914
|
-
if (typeof this.restoreConsole === "function") {
|
|
93915
|
-
this.restoreConsole();
|
|
93916
|
-
}
|
|
93917
|
-
if (typeof this.unsubscribeResize === "function") {
|
|
93918
|
-
this.unsubscribeResize();
|
|
93919
|
-
}
|
|
93920
|
-
if (this.cancelKittyDetection) {
|
|
93921
|
-
this.cancelKittyDetection();
|
|
93922
|
-
}
|
|
93923
|
-
const throttledLog = this.throttledLog;
|
|
93924
|
-
settleThrottle(throttledLog);
|
|
93925
|
-
if (canWriteToStdout) {
|
|
93926
|
-
if (this.kittyProtocolEnabled) {
|
|
93927
|
-
try {
|
|
93928
|
-
this.options.stdout.write("\x1B[<u");
|
|
93929
|
-
} catch {
|
|
93930
|
-
}
|
|
93931
|
-
}
|
|
93932
|
-
if (is_in_ci_default) {
|
|
93933
|
-
this.options.stdout.write(this.lastOutput + "\n");
|
|
93934
|
-
} else if (!this.options.debug) {
|
|
93935
|
-
this.log.done();
|
|
93936
|
-
}
|
|
93937
|
-
}
|
|
93938
|
-
this.kittyProtocolEnabled = false;
|
|
93939
|
-
if (this.options.concurrent) {
|
|
93940
|
-
reconciler_default.updateContainer(null, this.container, null, noop4);
|
|
93941
|
-
} else {
|
|
93942
|
-
reconciler_default.updateContainerSync(null, this.container, null, noop4);
|
|
93943
|
-
reconciler_default.flushSyncWork();
|
|
93944
|
-
}
|
|
93945
|
-
instances_default.delete(this.options.stdout);
|
|
93946
|
-
const { exitResult } = this;
|
|
93947
|
-
const resolveOrReject = () => {
|
|
93948
|
-
if (isErrorInput(error51)) {
|
|
93949
|
-
this.rejectExitPromise(error51);
|
|
93950
|
-
} else {
|
|
93951
|
-
this.resolveExitPromise(exitResult);
|
|
93952
|
-
}
|
|
93953
|
-
};
|
|
93954
|
-
const isProcessExiting = error51 !== void 0 && !isErrorInput(error51);
|
|
93955
|
-
const hasWritableState = stdout._writableState !== void 0 || stdout.writableLength !== void 0;
|
|
93956
|
-
if (isProcessExiting) {
|
|
93957
|
-
resolveOrReject();
|
|
93958
|
-
} else if (canWriteToStdout && hasWritableState) {
|
|
93959
|
-
this.options.stdout.write("", resolveOrReject);
|
|
93960
|
-
} else {
|
|
93961
|
-
setImmediate(resolveOrReject);
|
|
93962
|
-
}
|
|
93963
|
-
}
|
|
93964
|
-
async waitUntilExit() {
|
|
93965
|
-
this.exitPromise ||= new Promise((resolve3, reject) => {
|
|
93966
|
-
this.resolveExitPromise = resolve3;
|
|
93967
|
-
this.rejectExitPromise = reject;
|
|
93968
|
-
});
|
|
93969
|
-
if (!this.beforeExitHandler) {
|
|
93970
|
-
this.beforeExitHandler = () => {
|
|
93971
|
-
this.unmount();
|
|
93972
|
-
};
|
|
93973
|
-
process13.once("beforeExit", this.beforeExitHandler);
|
|
93974
|
-
}
|
|
93975
|
-
return this.exitPromise;
|
|
93976
|
-
}
|
|
93977
|
-
clear() {
|
|
93978
|
-
if (!is_in_ci_default && !this.options.debug) {
|
|
93979
|
-
this.log.clear();
|
|
93980
|
-
this.log.sync(this.lastOutputToRender || this.lastOutput + "\n");
|
|
93981
|
-
this.framePadDebt = 0;
|
|
93982
|
-
}
|
|
93983
|
-
}
|
|
93984
|
-
patchConsole() {
|
|
93985
|
-
if (this.options.debug) {
|
|
93986
|
-
return;
|
|
93987
|
-
}
|
|
93988
|
-
this.restoreConsole = dist_default((stream2, data) => {
|
|
93989
|
-
if (stream2 === "stdout") {
|
|
93990
|
-
this.writeToStdout(data);
|
|
93991
|
-
}
|
|
93992
|
-
if (stream2 === "stderr") {
|
|
93993
|
-
const isReactMessage = data.startsWith("The above error occurred");
|
|
93994
|
-
if (!isReactMessage) {
|
|
93995
|
-
this.writeToStderr(data);
|
|
93996
|
-
}
|
|
93997
|
-
}
|
|
93998
|
-
});
|
|
93999
|
-
}
|
|
94000
|
-
initKittyKeyboard() {
|
|
94001
|
-
if (!this.options.kittyKeyboard) {
|
|
94002
|
-
return;
|
|
94003
|
-
}
|
|
94004
|
-
const opts = this.options.kittyKeyboard;
|
|
94005
|
-
const mode = opts.mode ?? "auto";
|
|
94006
|
-
if (mode === "disabled" || !this.options.stdin.isTTY || !this.options.stdout.isTTY) {
|
|
94007
|
-
return;
|
|
94008
|
-
}
|
|
94009
|
-
const flags = opts.flags ?? ["disambiguateEscapeCodes"];
|
|
94010
|
-
if (mode === "enabled") {
|
|
94011
|
-
this.enableKittyProtocol(flags);
|
|
94012
|
-
return;
|
|
94013
|
-
}
|
|
94014
|
-
const term = process13.env["TERM"] ?? "";
|
|
94015
|
-
const termProgram = process13.env["TERM_PROGRAM"] ?? "";
|
|
94016
|
-
const isKnownSupportingTerminal = "KITTY_WINDOW_ID" in process13.env || term === "xterm-kitty" || termProgram === "WezTerm" || termProgram === "ghostty";
|
|
94017
|
-
if (!is_in_ci_default && isKnownSupportingTerminal) {
|
|
94018
|
-
this.confirmKittySupport(flags);
|
|
94019
|
-
}
|
|
94020
|
-
}
|
|
94021
|
-
confirmKittySupport(flags) {
|
|
94022
|
-
const { stdin, stdout } = this.options;
|
|
94023
|
-
let responseBuffer = [];
|
|
94024
|
-
const cleanup = () => {
|
|
94025
|
-
this.cancelKittyDetection = void 0;
|
|
94026
|
-
clearTimeout(timer);
|
|
94027
|
-
stdin.removeListener("data", onData);
|
|
94028
|
-
const remaining = stripKittyQueryResponsesAndTrailingPartial(responseBuffer);
|
|
94029
|
-
responseBuffer = [];
|
|
94030
|
-
if (remaining.length > 0) {
|
|
94031
|
-
stdin.unshift(Buffer.from(remaining));
|
|
94032
|
-
}
|
|
94033
|
-
};
|
|
94034
|
-
const onData = (data) => {
|
|
94035
|
-
const chunk = typeof data === "string" ? Buffer.from(data) : data;
|
|
94036
|
-
for (const byte of chunk) {
|
|
94037
|
-
responseBuffer.push(byte);
|
|
94038
|
-
}
|
|
94039
|
-
if (hasCompleteKittyQueryResponse(responseBuffer)) {
|
|
94040
|
-
cleanup();
|
|
94041
|
-
if (!this.isUnmounted) {
|
|
94042
|
-
this.enableKittyProtocol(flags);
|
|
94043
|
-
}
|
|
94044
|
-
}
|
|
94045
|
-
};
|
|
94046
|
-
stdin.on("data", onData);
|
|
94047
|
-
const timer = setTimeout(cleanup, 200);
|
|
94048
|
-
this.cancelKittyDetection = cleanup;
|
|
94049
|
-
stdout.write("\x1B[?u");
|
|
94050
|
-
}
|
|
94051
|
-
enableKittyProtocol(flags) {
|
|
94052
|
-
this.options.stdout.write(`\x1B[>${resolveFlags(flags)}u`);
|
|
94053
|
-
this.kittyProtocolEnabled = true;
|
|
94054
|
-
}
|
|
94055
|
-
};
|
|
94056
|
-
|
|
94057
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=6c70099ec5b01a8329f3b7bd932ceef28779e4c7f5795e7ff44fa28c2f9d6782_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/render.js
|
|
94058
|
-
var render = (node, options) => {
|
|
94059
|
-
const inkOptions = {
|
|
94060
|
-
stdout: process14.stdout,
|
|
94061
|
-
stdin: process14.stdin,
|
|
94062
|
-
stderr: process14.stderr,
|
|
94063
|
-
debug: false,
|
|
94064
|
-
exitOnCtrlC: true,
|
|
94065
|
-
patchConsole: true,
|
|
94066
|
-
maxFps: 30,
|
|
94067
|
-
incrementalRendering: false,
|
|
94068
|
-
concurrent: false,
|
|
94069
|
-
...getOptions(options)
|
|
94070
|
-
};
|
|
94071
|
-
const instance = getInstance(inkOptions.stdout, () => new Ink(inkOptions), inkOptions.concurrent ?? false);
|
|
94072
|
-
instance.render(node);
|
|
94073
|
-
return {
|
|
94074
|
-
rerender: instance.render,
|
|
94075
|
-
unmount() {
|
|
94076
|
-
instance.unmount();
|
|
94077
|
-
},
|
|
94078
|
-
waitUntilExit: instance.waitUntilExit,
|
|
94079
|
-
cleanup: () => instances_default.delete(inkOptions.stdout),
|
|
94080
|
-
clear: instance.clear,
|
|
94081
|
-
// [gg patch] Queue raw bytes to be written into scrollback atomically with
|
|
94082
|
-
// the next frame paint. See Ink#insertBeforeFrame in build/ink.js.
|
|
94083
|
-
insertBeforeFrame: instance.insertBeforeFrame,
|
|
94084
|
-
// [gg patch] Toggle bottom-anchor pad creation (on while agent runs).
|
|
94085
|
-
setFrameAnchorActive: instance.setFrameAnchorActive,
|
|
94086
|
-
// [gg patch] Install the transcript-tail backfill provider for
|
|
94087
|
-
// bottom-pinned idle shrink (slash menu close).
|
|
94088
|
-
setFrameShrinkBackfill: instance.setFrameShrinkBackfill
|
|
94089
|
-
};
|
|
94090
|
-
};
|
|
94091
|
-
var render_default = render;
|
|
94092
|
-
var getOptions = (stdout = {}) => {
|
|
94093
|
-
if (stdout instanceof Stream3) {
|
|
94094
|
-
return {
|
|
94095
|
-
stdout,
|
|
94096
|
-
stdin: process14.stdin
|
|
94097
|
-
};
|
|
94098
|
-
}
|
|
94099
|
-
return stdout;
|
|
94100
|
-
};
|
|
94101
|
-
var getInstance = (stdout, createInstance, concurrent) => {
|
|
94102
|
-
let instance = instances_default.get(stdout);
|
|
94103
|
-
if (!instance) {
|
|
94104
|
-
instance = createInstance();
|
|
94105
|
-
instances_default.set(stdout, instance);
|
|
94106
|
-
} else if (instance.isConcurrent !== concurrent) {
|
|
94107
|
-
console.warn(`Warning: render() was called with concurrent: ${concurrent}, but the existing instance for this stdout uses concurrent: ${instance.isConcurrent}. The concurrent option only takes effect on the first render. Call unmount() first if you need to change the rendering mode.`);
|
|
94108
|
-
}
|
|
94109
|
-
return instance;
|
|
94110
|
-
};
|
|
94111
|
-
|
|
94112
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=6c70099ec5b01a8329f3b7bd932ceef28779e4c7f5795e7ff44fa28c2f9d6782_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/render-to-string.js
|
|
92636
|
+
// ../ink/build/render-to-string.js
|
|
94113
92637
|
init_esm_shims();
|
|
94114
92638
|
var import_constants5 = __toESM(require_constants(), 1);
|
|
94115
92639
|
|
|
94116
|
-
//
|
|
92640
|
+
// ../ink/build/components/Static.js
|
|
94117
92641
|
init_esm_shims();
|
|
94118
92642
|
var import_react16 = __toESM(require_react(), 1);
|
|
94119
92643
|
|
|
94120
|
-
//
|
|
92644
|
+
// ../ink/build/components/Transform.js
|
|
94121
92645
|
init_esm_shims();
|
|
94122
92646
|
var import_react17 = __toESM(require_react(), 1);
|
|
94123
92647
|
|
|
94124
|
-
//
|
|
92648
|
+
// ../ink/build/components/Newline.js
|
|
94125
92649
|
init_esm_shims();
|
|
94126
92650
|
var import_react18 = __toESM(require_react(), 1);
|
|
94127
92651
|
|
|
94128
|
-
//
|
|
92652
|
+
// ../ink/build/components/Spacer.js
|
|
94129
92653
|
init_esm_shims();
|
|
94130
92654
|
var import_react19 = __toESM(require_react(), 1);
|
|
94131
92655
|
|
|
94132
|
-
//
|
|
92656
|
+
// ../ink/build/hooks/use-input.js
|
|
94133
92657
|
init_esm_shims();
|
|
94134
92658
|
var import_react21 = __toESM(require_react(), 1);
|
|
94135
92659
|
|
|
94136
|
-
//
|
|
92660
|
+
// ../ink/build/parse-keypress.js
|
|
94137
92661
|
init_esm_shims();
|
|
94138
92662
|
import { Buffer as Buffer2 } from "buffer";
|
|
94139
92663
|
var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/;
|
|
@@ -94563,13 +93087,13 @@ var parseKeypress = (s = "") => {
|
|
|
94563
93087
|
};
|
|
94564
93088
|
var parse_keypress_default = parseKeypress;
|
|
94565
93089
|
|
|
94566
|
-
//
|
|
93090
|
+
// ../ink/build/hooks/use-stdin.js
|
|
94567
93091
|
init_esm_shims();
|
|
94568
93092
|
var import_react20 = __toESM(require_react(), 1);
|
|
94569
93093
|
var useStdin = () => (0, import_react20.useContext)(StdinContext_default);
|
|
94570
93094
|
var use_stdin_default = useStdin;
|
|
94571
93095
|
|
|
94572
|
-
//
|
|
93096
|
+
// ../ink/build/hooks/use-input.js
|
|
94573
93097
|
var useInput = (inputHandler, options = {}) => {
|
|
94574
93098
|
const { stdin, setRawMode, internal_exitOnCtrlC, internal_eventEmitter } = use_stdin_default();
|
|
94575
93099
|
(0, import_react21.useEffect)(() => {
|
|
@@ -94652,31 +93176,29 @@ var useInput = (inputHandler, options = {}) => {
|
|
|
94652
93176
|
};
|
|
94653
93177
|
var use_input_default = useInput;
|
|
94654
93178
|
|
|
94655
|
-
//
|
|
93179
|
+
// ../ink/build/hooks/use-app.js
|
|
94656
93180
|
init_esm_shims();
|
|
94657
93181
|
var import_react22 = __toESM(require_react(), 1);
|
|
94658
|
-
var useApp = () => (0, import_react22.useContext)(AppContext_default);
|
|
94659
|
-
var use_app_default = useApp;
|
|
94660
93182
|
|
|
94661
|
-
//
|
|
93183
|
+
// ../ink/build/hooks/use-stdout.js
|
|
94662
93184
|
init_esm_shims();
|
|
94663
93185
|
var import_react23 = __toESM(require_react(), 1);
|
|
94664
93186
|
var useStdout = () => (0, import_react23.useContext)(StdoutContext_default);
|
|
94665
93187
|
var use_stdout_default = useStdout;
|
|
94666
93188
|
|
|
94667
|
-
//
|
|
93189
|
+
// ../ink/build/hooks/use-stderr.js
|
|
94668
93190
|
init_esm_shims();
|
|
94669
93191
|
var import_react24 = __toESM(require_react(), 1);
|
|
94670
93192
|
|
|
94671
|
-
//
|
|
93193
|
+
// ../ink/build/hooks/use-focus.js
|
|
94672
93194
|
init_esm_shims();
|
|
94673
93195
|
var import_react25 = __toESM(require_react(), 1);
|
|
94674
93196
|
|
|
94675
|
-
//
|
|
93197
|
+
// ../ink/build/hooks/use-focus-manager.js
|
|
94676
93198
|
init_esm_shims();
|
|
94677
93199
|
var import_react26 = __toESM(require_react(), 1);
|
|
94678
93200
|
|
|
94679
|
-
//
|
|
93201
|
+
// ../ink/build/hooks/use-is-screen-reader-enabled.js
|
|
94680
93202
|
init_esm_shims();
|
|
94681
93203
|
var import_react27 = __toESM(require_react(), 1);
|
|
94682
93204
|
var useIsScreenReaderEnabled = () => {
|
|
@@ -94685,11 +93207,11 @@ var useIsScreenReaderEnabled = () => {
|
|
|
94685
93207
|
};
|
|
94686
93208
|
var use_is_screen_reader_enabled_default = useIsScreenReaderEnabled;
|
|
94687
93209
|
|
|
94688
|
-
//
|
|
93210
|
+
// ../ink/build/hooks/use-cursor.js
|
|
94689
93211
|
init_esm_shims();
|
|
94690
93212
|
var import_react28 = __toESM(require_react(), 1);
|
|
94691
93213
|
|
|
94692
|
-
//
|
|
93214
|
+
// ../ink/build/measure-element.js
|
|
94693
93215
|
init_esm_shims();
|
|
94694
93216
|
var measureElement = (node) => ({
|
|
94695
93217
|
width: node.yogaNode?.getComputedWidth() ?? 0,
|
|
@@ -96261,9 +94783,9 @@ function buildToolGroupSummary(tools, allDone, extraRenderers) {
|
|
|
96261
94783
|
}
|
|
96262
94784
|
const parts = [];
|
|
96263
94785
|
for (const [name, toolsOfType] of Object.entries(byName)) {
|
|
96264
|
-
const
|
|
96265
|
-
if (
|
|
96266
|
-
parts.push(...
|
|
94786
|
+
const renderer = renderers[name];
|
|
94787
|
+
if (renderer) {
|
|
94788
|
+
parts.push(...renderer(toolsOfType, allDone));
|
|
96267
94789
|
}
|
|
96268
94790
|
}
|
|
96269
94791
|
if (parts.length === 0) {
|
|
@@ -116004,7 +114526,8 @@ Task plan (persistent backlog, visible in the user's Ctrl+T overlay):
|
|
|
116004
114526
|
|
|
116005
114527
|
- \`add_task(project, title, description, fresh?)\` \u2014 append a task to the plan. \`title\` is the short label shown in the overlay; \`description\` is what gets sent to the worker when dispatched.
|
|
116006
114528
|
- \`list_tasks(project?, status?)\` \u2014 read the plan. Returns task ids you can act on.
|
|
116007
|
-
- \`update_task(id, status?, notes?)\` \u2014
|
|
114529
|
+
- \`update_task(id, status?, notes?)\` \u2014 change a task's status and/or notes. Any transition is allowed: mark it done / blocked / skipped after a worker_turn_complete, OR roll it back to \`pending\` to recover a stuck task. The task's description (the worker prompt) is never changed \u2014 only status/notes.
|
|
114530
|
+
- \`reset_in_progress(project?)\` \u2014 bulk recovery: flip every \`in_progress\` task back to \`pending\` (omit \`project\` for all projects) without touching their prompts. Use when a dispatch was interrupted (e.g. an auth/network error) and left a batch of tasks stuck \`in_progress\` with nothing actually running. Then re-dispatch.
|
|
116008
114531
|
- \`dispatch_pending(project?)\` \u2014 send the next pending task. Without a \`project\` arg, dispatches one task per IDLE worker (parallel fan-out). With \`project\`, only that one. Marks each as in_progress.
|
|
116009
114532
|
|
|
116010
114533
|
# When to use prompt_worker vs add_task + dispatch_pending
|
|
@@ -116481,6 +115004,28 @@ var tasksStore = {
|
|
|
116481
115004
|
});
|
|
116482
115005
|
return candidates[0];
|
|
116483
115006
|
},
|
|
115007
|
+
/**
|
|
115008
|
+
* Reset stuck `in_progress` tasks back to `pending` WITHOUT touching their
|
|
115009
|
+
* description (the worker prompt) or any other field. Used to recover after
|
|
115010
|
+
* an interrupted/errored run (e.g. an auth error that rotated every task to
|
|
115011
|
+
* in_progress without a worker ever finishing). Returns the tasks that were
|
|
115012
|
+
* actually flipped. Optionally scope to one project.
|
|
115013
|
+
*/
|
|
115014
|
+
async resetInProgress(project) {
|
|
115015
|
+
const flipped = [];
|
|
115016
|
+
const tasks = state2.tasks.map((t) => {
|
|
115017
|
+
if (t.status !== "in_progress") return t;
|
|
115018
|
+
if (project && t.project !== project) return t;
|
|
115019
|
+
const next = { ...t, status: "pending", updatedAt: now() };
|
|
115020
|
+
flipped.push(next);
|
|
115021
|
+
return next;
|
|
115022
|
+
});
|
|
115023
|
+
if (flipped.length === 0) return [];
|
|
115024
|
+
state2 = { tasks, version: state2.version + 1 };
|
|
115025
|
+
await persist(state2.tasks);
|
|
115026
|
+
notify2();
|
|
115027
|
+
return flipped;
|
|
115028
|
+
},
|
|
116484
115029
|
/** Test/dev reset — wipes in-memory + disk. */
|
|
116485
115030
|
async reset() {
|
|
116486
115031
|
state2 = { tasks: [], version: state2.version + 1 };
|
|
@@ -116507,9 +115052,14 @@ var listTasksParams = external_exports.object({
|
|
|
116507
115052
|
});
|
|
116508
115053
|
var updateTaskParams = external_exports.object({
|
|
116509
115054
|
id: external_exports.string().describe("Task id from list_tasks."),
|
|
116510
|
-
status: external_exports.enum(["pending", "in_progress", "done", "blocked", "skipped"]).optional().describe(
|
|
115055
|
+
status: external_exports.enum(["pending", "in_progress", "done", "blocked", "skipped"]).optional().describe(
|
|
115056
|
+
"New status. Any transition is allowed \u2014 including rolling a stuck task BACK to `pending` (e.g. it was marked in_progress by a dispatch that never finished because of an auth/network error). Only the status changes; the title and description (the worker prompt) are preserved."
|
|
115057
|
+
),
|
|
116511
115058
|
notes: external_exports.string().optional().describe("Boss commentary / blocker reason / outcome notes.")
|
|
116512
115059
|
});
|
|
115060
|
+
var resetInProgressParams = external_exports.object({
|
|
115061
|
+
project: external_exports.string().optional().describe("Limit the reset to one project. Omit to reset every project's in_progress tasks.")
|
|
115062
|
+
});
|
|
116513
115063
|
var dispatchPendingParams = external_exports.object({
|
|
116514
115064
|
project: external_exports.string().optional().describe(
|
|
116515
115065
|
"Limit dispatch to one project. Omit to dispatch the next pending task for EVERY idle worker (parallel fan-out)."
|
|
@@ -116562,7 +115112,7 @@ function createTaskTools(deps) {
|
|
|
116562
115112
|
};
|
|
116563
115113
|
const updateTask = {
|
|
116564
115114
|
name: "update_task",
|
|
116565
|
-
description: "Update a task's status and/or notes.
|
|
115115
|
+
description: "Update a single task's status and/or notes. Any status transition is allowed: mark it DONE / BLOCKED / SKIPPED after a worker_turn_complete, or roll it BACK to PENDING / IN_PROGRESS to recover from a stuck state (e.g. a dispatch interrupted by an auth error left it in_progress but nothing is actually running). Only status/notes change \u2014 the task's description (the worker prompt) is never touched. The notes field is for boss commentary or blocker reasons.",
|
|
116566
115116
|
parameters: updateTaskParams,
|
|
116567
115117
|
async execute(args) {
|
|
116568
115118
|
const fields = {};
|
|
@@ -116625,7 +115175,21 @@ function createTaskTools(deps) {
|
|
|
116625
115175
|
return lines.join("\n");
|
|
116626
115176
|
}
|
|
116627
115177
|
};
|
|
116628
|
-
|
|
115178
|
+
const resetInProgress = {
|
|
115179
|
+
name: "reset_in_progress",
|
|
115180
|
+
description: "Bulk-recover stuck tasks: flip every `in_progress` task back to `pending` (optionally scoped to one project) WITHOUT changing their descriptions. Use this when a batch of tasks got marked in_progress by a dispatch that never actually ran or finished \u2014 e.g. an auth/network error rotated through the plan and left everything stuck in_progress. After this they can be re-dispatched normally.",
|
|
115181
|
+
parameters: resetInProgressParams,
|
|
115182
|
+
async execute(args) {
|
|
115183
|
+
const flipped = await tasksStore.resetInProgress(args.project);
|
|
115184
|
+
if (flipped.length === 0) {
|
|
115185
|
+
return args.project ? `No in_progress tasks for ${args.project}.` : "No in_progress tasks to reset.";
|
|
115186
|
+
}
|
|
115187
|
+
const lines = [`Reset ${flipped.length} task${flipped.length === 1 ? "" : "s"} to pending:`];
|
|
115188
|
+
for (const t of flipped) lines.push(` \u2192 ${formatTask(t)}`);
|
|
115189
|
+
return lines.join("\n");
|
|
115190
|
+
}
|
|
115191
|
+
};
|
|
115192
|
+
return [addTask, listTasks, updateTask, dispatchPending, resetInProgress];
|
|
116629
115193
|
}
|
|
116630
115194
|
|
|
116631
115195
|
// src/audio.ts
|
|
@@ -117778,12 +116342,33 @@ export {
|
|
|
117778
116342
|
transcribeVoice,
|
|
117779
116343
|
createAutoUpdater,
|
|
117780
116344
|
require_react,
|
|
116345
|
+
stringWidth,
|
|
116346
|
+
throttle,
|
|
116347
|
+
base_exports,
|
|
116348
|
+
is_in_ci_default,
|
|
116349
|
+
autoBind,
|
|
116350
|
+
require_signal_exit,
|
|
116351
|
+
dist_default,
|
|
116352
|
+
require_constants,
|
|
116353
|
+
src_default,
|
|
116354
|
+
wrapAnsi2 as wrapAnsi,
|
|
116355
|
+
terminalSize,
|
|
116356
|
+
require_scheduler,
|
|
116357
|
+
require_react_reconciler,
|
|
116358
|
+
widestLine,
|
|
116359
|
+
sliceAnsi,
|
|
116360
|
+
cliTruncate,
|
|
116361
|
+
indentString,
|
|
116362
|
+
require_cli_boxes,
|
|
116363
|
+
styledCharsFromTokens,
|
|
116364
|
+
styledCharsToString,
|
|
116365
|
+
tokenize4 as tokenize,
|
|
116366
|
+
cli_cursor_default,
|
|
116367
|
+
require_stack_utils,
|
|
116368
|
+
dist_default3 as dist_default2,
|
|
117781
116369
|
Box_default,
|
|
117782
116370
|
Text,
|
|
117783
|
-
render_default,
|
|
117784
116371
|
use_input_default,
|
|
117785
|
-
use_app_default,
|
|
117786
|
-
use_stdout_default,
|
|
117787
116372
|
require_jsx_runtime,
|
|
117788
116373
|
TerminalSizeProvider,
|
|
117789
116374
|
useTerminalSize,
|
|
@@ -117959,4 +116544,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
117959
116544
|
* LICENSE file in the root directory of this source tree.
|
|
117960
116545
|
*)
|
|
117961
116546
|
*/
|
|
117962
|
-
//# sourceMappingURL=chunk-
|
|
116547
|
+
//# sourceMappingURL=chunk-OIHP3D3X.js.map
|